From ed04c840d264bd8e0aa8efa0b9025316641715bf Mon Sep 17 00:00:00 2001 From: Lloyd Date: Sat, 29 Nov 2025 23:46:29 +0000 Subject: [PATCH] add frontend system stats and nav --- .../{index-r2jdFy7f.js => index-7Gn2-Mfw.js} | 350 +++++++++--------- repeater/web/html/assets/index-DB3Eq_QU.css | 1 + repeater/web/html/assets/index-Dmg9lJJT.css | 1 - repeater/web/html/index.html | 4 +- 4 files changed, 178 insertions(+), 178 deletions(-) rename repeater/web/html/assets/{index-r2jdFy7f.js => index-7Gn2-Mfw.js} (68%) create mode 100644 repeater/web/html/assets/index-DB3Eq_QU.css delete mode 100644 repeater/web/html/assets/index-Dmg9lJJT.css diff --git a/repeater/web/html/assets/index-r2jdFy7f.js b/repeater/web/html/assets/index-7Gn2-Mfw.js similarity index 68% rename from repeater/web/html/assets/index-r2jdFy7f.js rename to repeater/web/html/assets/index-7Gn2-Mfw.js index 7d1b18b..82895ed 100644 --- a/repeater/web/html/assets/index-r2jdFy7f.js +++ b/repeater/web/html/assets/index-7Gn2-Mfw.js @@ -1,54 +1,54 @@ -(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const K of document.querySelectorAll('link[rel="modulepreload"]'))B(K);new MutationObserver(K=>{for(const pt of K)if(pt.type==="childList")for(const _t of pt.addedNodes)_t.tagName==="LINK"&&_t.rel==="modulepreload"&&B(_t)}).observe(document,{childList:!0,subtree:!0});function E(K){const pt={};return K.integrity&&(pt.integrity=K.integrity),K.referrerPolicy&&(pt.referrerPolicy=K.referrerPolicy),K.crossOrigin==="use-credentials"?pt.credentials="include":K.crossOrigin==="anonymous"?pt.credentials="omit":pt.credentials="same-origin",pt}function B(K){if(K.ep)return;K.ep=!0;const pt=E(K);fetch(K.href,pt)}})();/** +function MG(d,s){for(var E=0;ER[Y]})}}}return Object.freeze(Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const Y of document.querySelectorAll('link[rel="modulepreload"]'))R(Y);new MutationObserver(Y=>{for(const dt of Y)if(dt.type==="childList")for(const _t of dt.addedNodes)_t.tagName==="LINK"&&_t.rel==="modulepreload"&&R(_t)}).observe(document,{childList:!0,subtree:!0});function E(Y){const dt={};return Y.integrity&&(dt.integrity=Y.integrity),Y.referrerPolicy&&(dt.referrerPolicy=Y.referrerPolicy),Y.crossOrigin==="use-credentials"?dt.credentials="include":Y.crossOrigin==="anonymous"?dt.credentials="omit":dt.credentials="same-origin",dt}function R(Y){if(Y.ep)return;Y.ep=!0;const dt=E(Y);fetch(Y.href,dt)}})();/** * @vue/shared v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function BA(d){const s=Object.create(null);for(const E of d.split(","))s[E]=1;return E=>E in s}const mf={},s_=[],dg=()=>{},uG=()=>!1,S4=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),NA=d=>d.startsWith("onUpdate:"),ap=Object.assign,jA=(d,s)=>{const E=d.indexOf(s);E>-1&&d.splice(E,1)},cG=Object.prototype.hasOwnProperty,Rh=(d,s)=>cG.call(d,s),au=Array.isArray,l_=d=>Q2(d)==="[object Map]",E4=d=>Q2(d)==="[object Set]",zC=d=>Q2(d)==="[object Date]",Vu=d=>typeof d=="function",sd=d=>typeof d=="string",Cm=d=>typeof d=="symbol",gf=d=>d!==null&&typeof d=="object",CI=d=>(gf(d)||Vu(d))&&Vu(d.then)&&Vu(d.catch),LI=Object.prototype.toString,Q2=d=>LI.call(d),hG=d=>Q2(d).slice(8,-1),PI=d=>Q2(d)==="[object Object]",UA=d=>sd(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,b2=BA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),C4=d=>{const s=Object.create(null);return E=>s[E]||(s[E]=d(E))},fG=/-(\w)/g,cm=C4(d=>d.replace(fG,(s,E)=>E?E.toUpperCase():"")),dG=/\B([A-Z])/g,Py=C4(d=>d.replace(dG,"-$1").toLowerCase()),L4=C4(d=>d.charAt(0).toUpperCase()+d.slice(1)),y8=C4(d=>d?`on${L4(d)}`:""),p1=(d,s)=>!Object.is(d,s),G5=(d,...s)=>{for(let E=0;E{Object.defineProperty(d,s,{configurable:!0,enumerable:!1,writable:B,value:E})},o4=d=>{const s=parseFloat(d);return isNaN(s)?d:s},pG=d=>{const s=sd(d)?Number(d):NaN;return isNaN(s)?d:s};let OC;const P4=()=>OC||(OC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hm(d){if(au(d)){const s={};for(let E=0;E{if(E){const B=E.split(gG);B.length>1&&(s[B[0].trim()]=B[1].trim())}}),s}function jo(d){let s="";if(sd(d))s=d;else if(au(d))for(let E=0;Ed_(E,s))}const zI=d=>!!(d&&d.__v_isRef===!0),Qi=d=>sd(d)?d:d==null?"":au(d)||gf(d)&&(d.toString===LI||!Vu(d.toString))?zI(d)?Qi(d.value):JSON.stringify(d,OI,2):String(d),OI=(d,s)=>zI(s)?OI(d,s.value):l_(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((E,[B,K],pt)=>(E[x8(B,pt)+" =>"]=K,E),{})}:E4(s)?{[`Set(${s.size})`]:[...s.values()].map(E=>x8(E))}:Cm(s)?x8(s):gf(s)&&!au(s)&&!PI(s)?String(s):s,x8=(d,s="")=>{var E;return Cm(d)?`Symbol(${(E=d.description)!=null?E:s})`:d};/** +**//*! #__NO_SIDE_EFFECTS__ */function jA(d){const s=Object.create(null);for(const E of d.split(","))s[E]=1;return E=>E in s}const mf={},l_=[],mg=()=>{},SG=()=>!1,C4=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),UA=d=>d.startsWith("onUpdate:"),ap=Object.assign,VA=(d,s)=>{const E=d.indexOf(s);E>-1&&d.splice(E,1)},EG=Object.prototype.hasOwnProperty,Rh=(d,s)=>EG.call(d,s),au=Array.isArray,u_=d=>Q2(d)==="[object Map]",L4=d=>Q2(d)==="[object Set]",DC=d=>Q2(d)==="[object Date]",Vu=d=>typeof d=="function",ld=d=>typeof d=="string",Cm=d=>typeof d=="symbol",gf=d=>d!==null&&typeof d=="object",II=d=>(gf(d)||Vu(d))&&Vu(d.then)&&Vu(d.catch),zI=Object.prototype.toString,Q2=d=>zI.call(d),CG=d=>Q2(d).slice(8,-1),OI=d=>Q2(d)==="[object Object]",HA=d=>ld(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,b2=jA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),P4=d=>{const s=Object.create(null);return E=>s[E]||(s[E]=d(E))},LG=/-(\w)/g,cm=P4(d=>d.replace(LG,(s,E)=>E?E.toUpperCase():"")),PG=/\B([A-Z])/g,zy=P4(d=>d.replace(PG,"-$1").toLowerCase()),I4=P4(d=>d.charAt(0).toUpperCase()+d.slice(1)),x8=P4(d=>d?`on${I4(d)}`:""),g1=(d,s)=>!Object.is(d,s),Y5=(d,...s)=>{for(let E=0;E{Object.defineProperty(d,s,{configurable:!0,enumerable:!1,writable:R,value:E})},s4=d=>{const s=parseFloat(d);return isNaN(s)?d:s},IG=d=>{const s=ld(d)?Number(d):NaN;return isNaN(s)?d:s};let FC;const z4=()=>FC||(FC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hm(d){if(au(d)){const s={};for(let E=0;E{if(E){const R=E.split(OG);R.length>1&&(s[R[0].trim()]=R[1].trim())}}),s}function Fo(d){let s="";if(ld(d))s=d;else if(au(d))for(let E=0;Ep_(E,s))}const FI=d=>!!(d&&d.__v_isRef===!0),Fi=d=>ld(d)?d:d==null?"":au(d)||gf(d)&&(d.toString===zI||!Vu(d.toString))?FI(d)?Fi(d.value):JSON.stringify(d,BI,2):String(d),BI=(d,s)=>FI(s)?BI(d,s.value):u_(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((E,[R,Y],dt)=>(E[_8(R,dt)+" =>"]=Y,E),{})}:L4(s)?{[`Set(${s.size})`]:[...s.values()].map(E=>_8(E))}:Cm(s)?_8(s):gf(s)&&!au(s)&&!OI(s)?String(s):s,_8=(d,s="")=>{var E;return Cm(d)?`Symbol(${(E=d.description)!=null?E:s})`:d};/** * @vue/reactivity v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let $p;class DI{constructor(s=!1){this.detached=s,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$p,!s&&$p&&(this.index=($p.scopes||($p.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let s,E;if(this.scopes)for(s=0,E=this.scopes.length;s0&&--this._on===0&&($p=this.prevScope,this.prevScope=void 0)}stop(s){if(this._active){this._active=!1;let E,B;for(E=0,B=this.effects.length;E0)return;if(k2){let s=k2;for(k2=void 0;s;){const E=s.next;s.next=void 0,s.flags&=-9,s=E}}let d;for(;w2;){let s=w2;for(w2=void 0;s;){const E=s.next;if(s.next=void 0,s.flags&=-9,s.flags&1)try{s.trigger()}catch(B){d||(d=B)}s=E}}if(d)throw d}function UI(d){for(let s=d.deps;s;s=s.nextDep)s.version=-1,s.prevActiveLink=s.dep.activeLink,s.dep.activeLink=s}function VI(d){let s,E=d.depsTail,B=E;for(;B;){const K=B.prevDep;B.version===-1?(B===E&&(E=K),WA(B),TG(B)):s=B,B.dep.activeLink=B.prevActiveLink,B.prevActiveLink=void 0,B=K}d.deps=s,d.depsTail=E}function nA(d){for(let s=d.deps;s;s=s.nextDep)if(s.dep.version!==s.version||s.dep.computed&&(HI(s.dep.computed)||s.dep.version!==s.version))return!0;return!!d._dirty}function HI(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===D2)||(d.globalVersion=D2,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!nA(d))))return;d.flags|=2;const s=d.dep,E=kf,B=Sm;kf=d,Sm=!0;try{UI(d);const K=d.fn(d._value);(s.version===0||p1(K,d._value))&&(d.flags|=128,d._value=K,s.version++)}catch(K){throw s.version++,K}finally{kf=E,Sm=B,VI(d),d.flags&=-3}}function WA(d,s=!1){const{dep:E,prevSub:B,nextSub:K}=d;if(B&&(B.nextSub=K,d.prevSub=void 0),K&&(K.prevSub=B,d.nextSub=void 0),E.subs===d&&(E.subs=B,!B&&E.computed)){E.computed.flags&=-5;for(let pt=E.computed.deps;pt;pt=pt.nextDep)WA(pt,!0)}!s&&!--E.sc&&E.map&&E.map.delete(E.key)}function TG(d){const{prevDep:s,nextDep:E}=d;s&&(s.nextDep=E,d.prevDep=void 0),E&&(E.prevDep=s,d.nextDep=void 0)}let Sm=!0;const WI=[];function av(){WI.push(Sm),Sm=!1}function ov(){const d=WI.pop();Sm=d===void 0?!0:d}function DC(d){const{cleanup:s}=d;if(d.cleanup=void 0,s){const E=kf;kf=void 0;try{s()}finally{kf=E}}}let D2=0;class AG{constructor(s,E){this.sub=s,this.dep=E,this.version=E.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qA{constructor(s){this.computed=s,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(s){if(!kf||!Sm||kf===this.computed)return;let E=this.activeLink;if(E===void 0||E.sub!==kf)E=this.activeLink=new AG(kf,this),kf.deps?(E.prevDep=kf.depsTail,kf.depsTail.nextDep=E,kf.depsTail=E):kf.deps=kf.depsTail=E,qI(E);else if(E.version===-1&&(E.version=this.version,E.nextDep)){const B=E.nextDep;B.prevDep=E.prevDep,E.prevDep&&(E.prevDep.nextDep=B),E.prevDep=kf.depsTail,E.nextDep=void 0,kf.depsTail.nextDep=E,kf.depsTail=E,kf.deps===E&&(kf.deps=B)}return E}trigger(s){this.version++,D2++,this.notify(s)}notify(s){VA();try{for(let E=this.subs;E;E=E.prevSub)E.sub.notify()&&E.sub.dep.notify()}finally{HA()}}}function qI(d){if(d.dep.sc++,d.sub.flags&4){const s=d.dep.computed;if(s&&!d.dep.subs){s.flags|=20;for(let B=s.deps;B;B=B.nextDep)qI(B)}const E=d.dep.subs;E!==d&&(d.prevSub=E,E&&(E.nextSub=d)),d.dep.subs=d}}const s4=new WeakMap,wy=Symbol(""),iA=Symbol(""),F2=Symbol("");function Zp(d,s,E){if(Sm&&kf){let B=s4.get(d);B||s4.set(d,B=new Map);let K=B.get(E);K||(B.set(E,K=new qA),K.map=B,K.key=E),K.track()}}function tv(d,s,E,B,K,pt){const _t=s4.get(d);if(!_t){D2++;return}const Ot=jt=>{jt&&jt.trigger()};if(VA(),s==="clear")_t.forEach(Ot);else{const jt=au(d),te=jt&&UA(E);if(jt&&E==="length"){const he=Number(B);_t.forEach((De,er)=>{(er==="length"||er===F2||!Cm(er)&&er>=he)&&Ot(De)})}else switch((E!==void 0||_t.has(void 0))&&Ot(_t.get(E)),te&&Ot(_t.get(F2)),s){case"add":jt?te&&Ot(_t.get("length")):(Ot(_t.get(wy)),l_(d)&&Ot(_t.get(iA)));break;case"delete":jt||(Ot(_t.get(wy)),l_(d)&&Ot(_t.get(iA)));break;case"set":l_(d)&&Ot(_t.get(wy));break}}HA()}function MG(d,s){const E=s4.get(d);return E&&E.get(s)}function Qx(d){const s=Uu(d);return s===d?s:(Zp(s,"iterate",F2),lm(d)?s:s.map(zp))}function I4(d){return Zp(d=Uu(d),"iterate",F2),d}const SG={__proto__:null,[Symbol.iterator](){return b8(this,Symbol.iterator,zp)},concat(...d){return Qx(this).concat(...d.map(s=>au(s)?Qx(s):s))},entries(){return b8(this,"entries",d=>(d[1]=zp(d[1]),d))},every(d,s){return Zg(this,"every",d,s,void 0,arguments)},filter(d,s){return Zg(this,"filter",d,s,E=>E.map(zp),arguments)},find(d,s){return Zg(this,"find",d,s,zp,arguments)},findIndex(d,s){return Zg(this,"findIndex",d,s,void 0,arguments)},findLast(d,s){return Zg(this,"findLast",d,s,zp,arguments)},findLastIndex(d,s){return Zg(this,"findLastIndex",d,s,void 0,arguments)},forEach(d,s){return Zg(this,"forEach",d,s,void 0,arguments)},includes(...d){return w8(this,"includes",d)},indexOf(...d){return w8(this,"indexOf",d)},join(d){return Qx(this).join(d)},lastIndexOf(...d){return w8(this,"lastIndexOf",d)},map(d,s){return Zg(this,"map",d,s,void 0,arguments)},pop(){return Jb(this,"pop")},push(...d){return Jb(this,"push",d)},reduce(d,...s){return FC(this,"reduce",d,s)},reduceRight(d,...s){return FC(this,"reduceRight",d,s)},shift(){return Jb(this,"shift")},some(d,s){return Zg(this,"some",d,s,void 0,arguments)},splice(...d){return Jb(this,"splice",d)},toReversed(){return Qx(this).toReversed()},toSorted(d){return Qx(this).toSorted(d)},toSpliced(...d){return Qx(this).toSpliced(...d)},unshift(...d){return Jb(this,"unshift",d)},values(){return b8(this,"values",zp)}};function b8(d,s,E){const B=I4(d),K=B[s]();return B!==d&&!lm(d)&&(K._next=K.next,K.next=()=>{const pt=K._next();return pt.value&&(pt.value=E(pt.value)),pt}),K}const EG=Array.prototype;function Zg(d,s,E,B,K,pt){const _t=I4(d),Ot=_t!==d&&!lm(d),jt=_t[s];if(jt!==EG[s]){const De=jt.apply(d,pt);return Ot?zp(De):De}let te=E;_t!==d&&(Ot?te=function(De,er){return E.call(this,zp(De),er,d)}:E.length>2&&(te=function(De,er){return E.call(this,De,er,d)}));const he=jt.call(_t,te,B);return Ot&&K?K(he):he}function FC(d,s,E,B){const K=I4(d);let pt=E;return K!==d&&(lm(d)?E.length>3&&(pt=function(_t,Ot,jt){return E.call(this,_t,Ot,jt,d)}):pt=function(_t,Ot,jt){return E.call(this,_t,zp(Ot),jt,d)}),K[s](pt,...B)}function w8(d,s,E){const B=Uu(d);Zp(B,"iterate",F2);const K=B[s](...E);return(K===-1||K===!1)&&GA(E[0])?(E[0]=Uu(E[0]),B[s](...E)):K}function Jb(d,s,E=[]){av(),VA();const B=Uu(d)[s].apply(d,E);return HA(),ov(),B}const CG=BA("__proto__,__v_isRef,__isVue"),$I=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(Cm));function LG(d){Cm(d)||(d=String(d));const s=Uu(this);return Zp(s,"has",d),s.hasOwnProperty(d)}class ZI{constructor(s=!1,E=!1){this._isReadonly=s,this._isShallow=E}get(s,E,B){if(E==="__v_skip")return s.__v_skip;const K=this._isReadonly,pt=this._isShallow;if(E==="__v_isReactive")return!K;if(E==="__v_isReadonly")return K;if(E==="__v_isShallow")return pt;if(E==="__v_raw")return B===(K?pt?jG:XI:pt?KI:YI).get(s)||Object.getPrototypeOf(s)===Object.getPrototypeOf(B)?s:void 0;const _t=au(s);if(!K){let jt;if(_t&&(jt=SG[E]))return jt;if(E==="hasOwnProperty")return LG}const Ot=Reflect.get(s,E,jd(s)?s:B);return(Cm(E)?$I.has(E):CG(E))||(K||Zp(s,"get",E),pt)?Ot:jd(Ot)?_t&&UA(E)?Ot:Ot.value:gf(Ot)?K?QI(Ot):My(Ot):Ot}}class GI extends ZI{constructor(s=!1){super(!1,s)}set(s,E,B,K){let pt=s[E];if(!this._isShallow){const jt=v1(pt);if(!lm(B)&&!v1(B)&&(pt=Uu(pt),B=Uu(B)),!au(s)&&jd(pt)&&!jd(B))return jt?!1:(pt.value=B,!0)}const _t=au(s)&&UA(E)?Number(E)d,M5=d=>Reflect.getPrototypeOf(d);function DG(d,s,E){return function(...B){const K=this.__v_raw,pt=Uu(K),_t=l_(pt),Ot=d==="entries"||d===Symbol.iterator&&_t,jt=d==="keys"&&_t,te=K[d](...B),he=E?aA:s?l4:zp;return!s&&Zp(pt,"iterate",jt?iA:wy),{next(){const{value:De,done:er}=te.next();return er?{value:De,done:er}:{value:Ot?[he(De[0]),he(De[1])]:he(De),done:er}},[Symbol.iterator](){return this}}}}function S5(d){return function(...s){return d==="delete"?!1:d==="clear"?void 0:this}}function FG(d,s){const E={get(K){const pt=this.__v_raw,_t=Uu(pt),Ot=Uu(K);d||(p1(K,Ot)&&Zp(_t,"get",K),Zp(_t,"get",Ot));const{has:jt}=M5(_t),te=s?aA:d?l4:zp;if(jt.call(_t,K))return te(pt.get(K));if(jt.call(_t,Ot))return te(pt.get(Ot));pt!==_t&&pt.get(K)},get size(){const K=this.__v_raw;return!d&&Zp(Uu(K),"iterate",wy),Reflect.get(K,"size",K)},has(K){const pt=this.__v_raw,_t=Uu(pt),Ot=Uu(K);return d||(p1(K,Ot)&&Zp(_t,"has",K),Zp(_t,"has",Ot)),K===Ot?pt.has(K):pt.has(K)||pt.has(Ot)},forEach(K,pt){const _t=this,Ot=_t.__v_raw,jt=Uu(Ot),te=s?aA:d?l4:zp;return!d&&Zp(jt,"iterate",wy),Ot.forEach((he,De)=>K.call(pt,te(he),te(De),_t))}};return ap(E,d?{add:S5("add"),set:S5("set"),delete:S5("delete"),clear:S5("clear")}:{add(K){!s&&!lm(K)&&!v1(K)&&(K=Uu(K));const pt=Uu(this);return M5(pt).has.call(pt,K)||(pt.add(K),tv(pt,"add",K,K)),this},set(K,pt){!s&&!lm(pt)&&!v1(pt)&&(pt=Uu(pt));const _t=Uu(this),{has:Ot,get:jt}=M5(_t);let te=Ot.call(_t,K);te||(K=Uu(K),te=Ot.call(_t,K));const he=jt.call(_t,K);return _t.set(K,pt),te?p1(pt,he)&&tv(_t,"set",K,pt):tv(_t,"add",K,pt),this},delete(K){const pt=Uu(this),{has:_t,get:Ot}=M5(pt);let jt=_t.call(pt,K);jt||(K=Uu(K),jt=_t.call(pt,K)),Ot&&Ot.call(pt,K);const te=pt.delete(K);return jt&&tv(pt,"delete",K,void 0),te},clear(){const K=Uu(this),pt=K.size!==0,_t=K.clear();return pt&&tv(K,"clear",void 0,void 0),_t}}),["keys","values","entries",Symbol.iterator].forEach(K=>{E[K]=DG(K,d,s)}),E}function $A(d,s){const E=FG(d,s);return(B,K,pt)=>K==="__v_isReactive"?!d:K==="__v_isReadonly"?d:K==="__v_raw"?B:Reflect.get(Rh(E,K)&&K in B?E:B,K,pt)}const RG={get:$A(!1,!1)},BG={get:$A(!1,!0)},NG={get:$A(!0,!1)};const YI=new WeakMap,KI=new WeakMap,XI=new WeakMap,jG=new WeakMap;function UG(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function VG(d){return d.__v_skip||!Object.isExtensible(d)?0:UG(hG(d))}function My(d){return v1(d)?d:ZA(d,!1,IG,RG,YI)}function JI(d){return ZA(d,!1,OG,BG,KI)}function QI(d){return ZA(d,!0,zG,NG,XI)}function ZA(d,s,E,B,K){if(!gf(d)||d.__v_raw&&!(s&&d.__v_isReactive))return d;const pt=VG(d);if(pt===0)return d;const _t=K.get(d);if(_t)return _t;const Ot=new Proxy(d,pt===2?B:E);return K.set(d,Ot),Ot}function m1(d){return v1(d)?m1(d.__v_raw):!!(d&&d.__v_isReactive)}function v1(d){return!!(d&&d.__v_isReadonly)}function lm(d){return!!(d&&d.__v_isShallow)}function GA(d){return d?!!d.__v_raw:!1}function Uu(d){const s=d&&d.__v_raw;return s?Uu(s):d}function YA(d){return!Rh(d,"__v_skip")&&Object.isExtensible(d)&&rA(d,"__v_skip",!0),d}const zp=d=>gf(d)?My(d):d,l4=d=>gf(d)?QI(d):d;function jd(d){return d?d.__v_isRef===!0:!1}function Ga(d){return tz(d,!1)}function HG(d){return tz(d,!0)}function tz(d,s){return jd(d)?d:new WG(d,s)}class WG{constructor(s,E){this.dep=new qA,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=E?s:Uu(s),this._value=E?s:zp(s),this.__v_isShallow=E}get value(){return this.dep.track(),this._value}set value(s){const E=this._rawValue,B=this.__v_isShallow||lm(s)||v1(s);s=B?s:Uu(s),p1(s,E)&&(this._rawValue=s,this._value=B?s:zp(s),this.dep.trigger())}}function zl(d){return jd(d)?d.value:d}const qG={get:(d,s,E)=>s==="__v_raw"?d:zl(Reflect.get(d,s,E)),set:(d,s,E,B)=>{const K=d[s];return jd(K)&&!jd(E)?(K.value=E,!0):Reflect.set(d,s,E,B)}};function ez(d){return m1(d)?d:new Proxy(d,qG)}function $G(d){const s=au(d)?new Array(d.length):{};for(const E in d)s[E]=GG(d,E);return s}class ZG{constructor(s,E,B){this._object=s,this._key=E,this._defaultValue=B,this.__v_isRef=!0,this._value=void 0}get value(){const s=this._object[this._key];return this._value=s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}get dep(){return MG(Uu(this._object),this._key)}}function GG(d,s,E){const B=d[s];return jd(B)?B:new ZG(d,s,E)}class YG{constructor(s,E,B){this.fn=s,this.setter=E,this._value=void 0,this.dep=new qA(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!E,this.isSSR=B}notify(){if(this.flags|=16,!(this.flags&8)&&kf!==this)return jI(this,!0),!0}get value(){const s=this.dep.track();return HI(this),s&&(s.version=this.dep.version),this._value}set value(s){this.setter&&this.setter(s)}}function KG(d,s,E=!1){let B,K;return Vu(d)?B=d:(B=d.get,K=d.set),new YG(B,K,E)}const E5={},u4=new WeakMap;let dy;function XG(d,s=!1,E=dy){if(E){let B=u4.get(E);B||u4.set(E,B=[]),B.push(d)}}function JG(d,s,E=mf){const{immediate:B,deep:K,once:pt,scheduler:_t,augmentJob:Ot,call:jt}=E,te=Jn=>K?Jn:lm(Jn)||K===!1||K===0?ev(Jn,1):ev(Jn);let he,De,er,pr,Mr=!1,Tr=!1;if(jd(d)?(De=()=>d.value,Mr=lm(d)):m1(d)?(De=()=>te(d),Mr=!0):au(d)?(Tr=!0,Mr=d.some(Jn=>m1(Jn)||lm(Jn)),De=()=>d.map(Jn=>{if(jd(Jn))return Jn.value;if(m1(Jn))return te(Jn);if(Vu(Jn))return jt?jt(Jn,2):Jn()})):Vu(d)?s?De=jt?()=>jt(d,2):d:De=()=>{if(er){av();try{er()}finally{ov()}}const Jn=dy;dy=he;try{return jt?jt(d,3,[pr]):d(pr)}finally{dy=Jn}}:De=dg,s&&K){const Jn=De,Bn=K===!0?1/0:K;De=()=>ev(Jn(),Bn)}const Vr=RI(),mn=()=>{he.stop(),Vr&&Vr.active&&jA(Vr.effects,he)};if(pt&&s){const Jn=s;s=(...Bn)=>{Jn(...Bn),mn()}}let Dt=Tr?new Array(d.length).fill(E5):E5;const cn=Jn=>{if(!(!(he.flags&1)||!he.dirty&&!Jn))if(s){const Bn=he.run();if(K||Mr||(Tr?Bn.some((ni,Wi)=>p1(ni,Dt[Wi])):p1(Bn,Dt))){er&&er();const ni=dy;dy=he;try{const Wi=[Bn,Dt===E5?void 0:Tr&&Dt[0]===E5?[]:Dt,pr];Dt=Bn,jt?jt(s,3,Wi):s(...Wi)}finally{dy=ni}}}else he.run()};return Ot&&Ot(cn),he=new BI(De),he.scheduler=_t?()=>_t(cn,!1):cn,pr=Jn=>XG(Jn,!1,he),er=he.onStop=()=>{const Jn=u4.get(he);if(Jn){if(jt)jt(Jn,4);else for(const Bn of Jn)Bn();u4.delete(he)}},s?B?cn(!0):Dt=he.run():_t?_t(cn.bind(null,!0),!0):he.run(),mn.pause=he.pause.bind(he),mn.resume=he.resume.bind(he),mn.stop=mn,mn}function ev(d,s=1/0,E){if(s<=0||!gf(d)||d.__v_skip||(E=E||new Set,E.has(d)))return d;if(E.add(d),s--,jd(d))ev(d.value,s,E);else if(au(d))for(let B=0;B{ev(B,s,E)});else if(PI(d)){for(const B in d)ev(d[B],s,E);for(const B of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,B)&&ev(d[B],s,E)}return d}/** +**/let $p;class RI{constructor(s=!1){this.detached=s,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$p,!s&&$p&&(this.index=($p.scopes||($p.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let s,E;if(this.scopes)for(s=0,E=this.scopes.length;s0&&--this._on===0&&($p=this.prevScope,this.prevScope=void 0)}stop(s){if(this._active){this._active=!1;let E,R;for(E=0,R=this.effects.length;E0)return;if(k2){let s=k2;for(k2=void 0;s;){const E=s.next;s.next=void 0,s.flags&=-9,s=E}}let d;for(;w2;){let s=w2;for(w2=void 0;s;){const E=s.next;if(s.next=void 0,s.flags&=-9,s.flags&1)try{s.trigger()}catch(R){d||(d=R)}s=E}}if(d)throw d}function WI(d){for(let s=d.deps;s;s=s.nextDep)s.version=-1,s.prevActiveLink=s.dep.activeLink,s.dep.activeLink=s}function qI(d){let s,E=d.depsTail,R=E;for(;R;){const Y=R.prevDep;R.version===-1?(R===E&&(E=Y),$A(R),VG(R)):s=R,R.dep.activeLink=R.prevActiveLink,R.prevActiveLink=void 0,R=Y}d.deps=s,d.depsTail=E}function oA(d){for(let s=d.deps;s;s=s.nextDep)if(s.dep.version!==s.version||s.dep.computed&&($I(s.dep.computed)||s.dep.version!==s.version))return!0;return!!d._dirty}function $I(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===D2)||(d.globalVersion=D2,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!oA(d))))return;d.flags|=2;const s=d.dep,E=kf,R=Sm;kf=d,Sm=!0;try{WI(d);const Y=d.fn(d._value);(s.version===0||g1(Y,d._value))&&(d.flags|=128,d._value=Y,s.version++)}catch(Y){throw s.version++,Y}finally{kf=E,Sm=R,qI(d),d.flags&=-3}}function $A(d,s=!1){const{dep:E,prevSub:R,nextSub:Y}=d;if(R&&(R.nextSub=Y,d.prevSub=void 0),Y&&(Y.prevSub=R,d.nextSub=void 0),E.subs===d&&(E.subs=R,!R&&E.computed)){E.computed.flags&=-5;for(let dt=E.computed.deps;dt;dt=dt.nextDep)$A(dt,!0)}!s&&!--E.sc&&E.map&&E.map.delete(E.key)}function VG(d){const{prevDep:s,nextDep:E}=d;s&&(s.nextDep=E,d.prevDep=void 0),E&&(E.prevDep=s,d.nextDep=void 0)}let Sm=!0;const ZI=[];function sv(){ZI.push(Sm),Sm=!1}function lv(){const d=ZI.pop();Sm=d===void 0?!0:d}function BC(d){const{cleanup:s}=d;if(d.cleanup=void 0,s){const E=kf;kf=void 0;try{s()}finally{kf=E}}}let D2=0;class HG{constructor(s,E){this.sub=s,this.dep=E,this.version=E.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ZA{constructor(s){this.computed=s,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(s){if(!kf||!Sm||kf===this.computed)return;let E=this.activeLink;if(E===void 0||E.sub!==kf)E=this.activeLink=new HG(kf,this),kf.deps?(E.prevDep=kf.depsTail,kf.depsTail.nextDep=E,kf.depsTail=E):kf.deps=kf.depsTail=E,GI(E);else if(E.version===-1&&(E.version=this.version,E.nextDep)){const R=E.nextDep;R.prevDep=E.prevDep,E.prevDep&&(E.prevDep.nextDep=R),E.prevDep=kf.depsTail,E.nextDep=void 0,kf.depsTail.nextDep=E,kf.depsTail=E,kf.deps===E&&(kf.deps=R)}return E}trigger(s){this.version++,D2++,this.notify(s)}notify(s){WA();try{for(let E=this.subs;E;E=E.prevSub)E.sub.notify()&&E.sub.dep.notify()}finally{qA()}}}function GI(d){if(d.dep.sc++,d.sub.flags&4){const s=d.dep.computed;if(s&&!d.dep.subs){s.flags|=20;for(let R=s.deps;R;R=R.nextDep)GI(R)}const E=d.dep.subs;E!==d&&(d.prevSub=E,E&&(E.nextSub=d)),d.dep.subs=d}}const l4=new WeakMap,Ty=Symbol(""),sA=Symbol(""),F2=Symbol("");function Zp(d,s,E){if(Sm&&kf){let R=l4.get(d);R||l4.set(d,R=new Map);let Y=R.get(E);Y||(R.set(E,Y=new ZA),Y.map=R,Y.key=E),Y.track()}}function ev(d,s,E,R,Y,dt){const _t=l4.get(d);if(!_t){D2++;return}const zt=jt=>{jt&&jt.trigger()};if(WA(),s==="clear")_t.forEach(zt);else{const jt=au(d),te=jt&&HA(E);if(jt&&E==="length"){const ce=Number(R);_t.forEach((Ie,Je)=>{(Je==="length"||Je===F2||!Cm(Je)&&Je>=ce)&&zt(Ie)})}else switch((E!==void 0||_t.has(void 0))&&zt(_t.get(E)),te&&zt(_t.get(F2)),s){case"add":jt?te&&zt(_t.get("length")):(zt(_t.get(Ty)),u_(d)&&zt(_t.get(sA)));break;case"delete":jt||(zt(_t.get(Ty)),u_(d)&&zt(_t.get(sA)));break;case"set":u_(d)&&zt(_t.get(Ty));break}}qA()}function WG(d,s){const E=l4.get(d);return E&&E.get(s)}function e_(d){const s=Eu(d);return s===d?s:(Zp(s,"iterate",F2),lm(d)?s:s.map(zp))}function O4(d){return Zp(d=Eu(d),"iterate",F2),d}const qG={__proto__:null,[Symbol.iterator](){return w8(this,Symbol.iterator,zp)},concat(...d){return e_(this).concat(...d.map(s=>au(s)?e_(s):s))},entries(){return w8(this,"entries",d=>(d[1]=zp(d[1]),d))},every(d,s){return Gg(this,"every",d,s,void 0,arguments)},filter(d,s){return Gg(this,"filter",d,s,E=>E.map(zp),arguments)},find(d,s){return Gg(this,"find",d,s,zp,arguments)},findIndex(d,s){return Gg(this,"findIndex",d,s,void 0,arguments)},findLast(d,s){return Gg(this,"findLast",d,s,zp,arguments)},findLastIndex(d,s){return Gg(this,"findLastIndex",d,s,void 0,arguments)},forEach(d,s){return Gg(this,"forEach",d,s,void 0,arguments)},includes(...d){return k8(this,"includes",d)},indexOf(...d){return k8(this,"indexOf",d)},join(d){return e_(this).join(d)},lastIndexOf(...d){return k8(this,"lastIndexOf",d)},map(d,s){return Gg(this,"map",d,s,void 0,arguments)},pop(){return Qb(this,"pop")},push(...d){return Qb(this,"push",d)},reduce(d,...s){return RC(this,"reduce",d,s)},reduceRight(d,...s){return RC(this,"reduceRight",d,s)},shift(){return Qb(this,"shift")},some(d,s){return Gg(this,"some",d,s,void 0,arguments)},splice(...d){return Qb(this,"splice",d)},toReversed(){return e_(this).toReversed()},toSorted(d){return e_(this).toSorted(d)},toSpliced(...d){return e_(this).toSpliced(...d)},unshift(...d){return Qb(this,"unshift",d)},values(){return w8(this,"values",zp)}};function w8(d,s,E){const R=O4(d),Y=R[s]();return R!==d&&!lm(d)&&(Y._next=Y.next,Y.next=()=>{const dt=Y._next();return dt.value&&(dt.value=E(dt.value)),dt}),Y}const $G=Array.prototype;function Gg(d,s,E,R,Y,dt){const _t=O4(d),zt=_t!==d&&!lm(d),jt=_t[s];if(jt!==$G[s]){const Ie=jt.apply(d,dt);return zt?zp(Ie):Ie}let te=E;_t!==d&&(zt?te=function(Ie,Je){return E.call(this,zp(Ie),Je,d)}:E.length>2&&(te=function(Ie,Je){return E.call(this,Ie,Je,d)}));const ce=jt.call(_t,te,R);return zt&&Y?Y(ce):ce}function RC(d,s,E,R){const Y=O4(d);let dt=E;return Y!==d&&(lm(d)?E.length>3&&(dt=function(_t,zt,jt){return E.call(this,_t,zt,jt,d)}):dt=function(_t,zt,jt){return E.call(this,_t,zp(zt),jt,d)}),Y[s](dt,...R)}function k8(d,s,E){const R=Eu(d);Zp(R,"iterate",F2);const Y=R[s](...E);return(Y===-1||Y===!1)&&KA(E[0])?(E[0]=Eu(E[0]),R[s](...E)):Y}function Qb(d,s,E=[]){sv(),WA();const R=Eu(d)[s].apply(d,E);return qA(),lv(),R}const ZG=jA("__proto__,__v_isRef,__isVue"),YI=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(Cm));function GG(d){Cm(d)||(d=String(d));const s=Eu(this);return Zp(s,"has",d),s.hasOwnProperty(d)}class KI{constructor(s=!1,E=!1){this._isReadonly=s,this._isShallow=E}get(s,E,R){if(E==="__v_skip")return s.__v_skip;const Y=this._isReadonly,dt=this._isShallow;if(E==="__v_isReactive")return!Y;if(E==="__v_isReadonly")return Y;if(E==="__v_isShallow")return dt;if(E==="__v_raw")return R===(Y?dt?iY:tz:dt?QI:JI).get(s)||Object.getPrototypeOf(s)===Object.getPrototypeOf(R)?s:void 0;const _t=au(s);if(!Y){let jt;if(_t&&(jt=qG[E]))return jt;if(E==="hasOwnProperty")return GG}const zt=Reflect.get(s,E,jd(s)?s:R);return(Cm(E)?YI.has(E):ZG(E))||(Y||Zp(s,"get",E),dt)?zt:jd(zt)?_t&&HA(E)?zt:zt.value:gf(zt)?Y?rz(zt):Ey(zt):zt}}class XI extends KI{constructor(s=!1){super(!1,s)}set(s,E,R,Y){let dt=s[E];if(!this._isShallow){const jt=x1(dt);if(!lm(R)&&!x1(R)&&(dt=Eu(dt),R=Eu(R)),!au(s)&&jd(dt)&&!jd(R))return jt?!1:(dt.value=R,!0)}const _t=au(s)&&HA(E)?Number(E)d,S5=d=>Reflect.getPrototypeOf(d);function QG(d,s,E){return function(...R){const Y=this.__v_raw,dt=Eu(Y),_t=u_(dt),zt=d==="entries"||d===Symbol.iterator&&_t,jt=d==="keys"&&_t,te=Y[d](...R),ce=E?lA:s?u4:zp;return!s&&Zp(dt,"iterate",jt?sA:Ty),{next(){const{value:Ie,done:Je}=te.next();return Je?{value:Ie,done:Je}:{value:zt?[ce(Ie[0]),ce(Ie[1])]:ce(Ie),done:Je}},[Symbol.iterator](){return this}}}}function E5(d){return function(...s){return d==="delete"?!1:d==="clear"?void 0:this}}function tY(d,s){const E={get(Y){const dt=this.__v_raw,_t=Eu(dt),zt=Eu(Y);d||(g1(Y,zt)&&Zp(_t,"get",Y),Zp(_t,"get",zt));const{has:jt}=S5(_t),te=s?lA:d?u4:zp;if(jt.call(_t,Y))return te(dt.get(Y));if(jt.call(_t,zt))return te(dt.get(zt));dt!==_t&&dt.get(Y)},get size(){const Y=this.__v_raw;return!d&&Zp(Eu(Y),"iterate",Ty),Reflect.get(Y,"size",Y)},has(Y){const dt=this.__v_raw,_t=Eu(dt),zt=Eu(Y);return d||(g1(Y,zt)&&Zp(_t,"has",Y),Zp(_t,"has",zt)),Y===zt?dt.has(Y):dt.has(Y)||dt.has(zt)},forEach(Y,dt){const _t=this,zt=_t.__v_raw,jt=Eu(zt),te=s?lA:d?u4:zp;return!d&&Zp(jt,"iterate",Ty),zt.forEach((ce,Ie)=>Y.call(dt,te(ce),te(Ie),_t))}};return ap(E,d?{add:E5("add"),set:E5("set"),delete:E5("delete"),clear:E5("clear")}:{add(Y){!s&&!lm(Y)&&!x1(Y)&&(Y=Eu(Y));const dt=Eu(this);return S5(dt).has.call(dt,Y)||(dt.add(Y),ev(dt,"add",Y,Y)),this},set(Y,dt){!s&&!lm(dt)&&!x1(dt)&&(dt=Eu(dt));const _t=Eu(this),{has:zt,get:jt}=S5(_t);let te=zt.call(_t,Y);te||(Y=Eu(Y),te=zt.call(_t,Y));const ce=jt.call(_t,Y);return _t.set(Y,dt),te?g1(dt,ce)&&ev(_t,"set",Y,dt):ev(_t,"add",Y,dt),this},delete(Y){const dt=Eu(this),{has:_t,get:zt}=S5(dt);let jt=_t.call(dt,Y);jt||(Y=Eu(Y),jt=_t.call(dt,Y)),zt&&zt.call(dt,Y);const te=dt.delete(Y);return jt&&ev(dt,"delete",Y,void 0),te},clear(){const Y=Eu(this),dt=Y.size!==0,_t=Y.clear();return dt&&ev(Y,"clear",void 0,void 0),_t}}),["keys","values","entries",Symbol.iterator].forEach(Y=>{E[Y]=QG(Y,d,s)}),E}function GA(d,s){const E=tY(d,s);return(R,Y,dt)=>Y==="__v_isReactive"?!d:Y==="__v_isReadonly"?d:Y==="__v_raw"?R:Reflect.get(Rh(E,Y)&&Y in R?E:R,Y,dt)}const eY={get:GA(!1,!1)},rY={get:GA(!1,!0)},nY={get:GA(!0,!1)};const JI=new WeakMap,QI=new WeakMap,tz=new WeakMap,iY=new WeakMap;function aY(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function oY(d){return d.__v_skip||!Object.isExtensible(d)?0:aY(CG(d))}function Ey(d){return x1(d)?d:YA(d,!1,KG,eY,JI)}function ez(d){return YA(d,!1,JG,rY,QI)}function rz(d){return YA(d,!0,XG,nY,tz)}function YA(d,s,E,R,Y){if(!gf(d)||d.__v_raw&&!(s&&d.__v_isReactive))return d;const dt=oY(d);if(dt===0)return d;const _t=Y.get(d);if(_t)return _t;const zt=new Proxy(d,dt===2?R:E);return Y.set(d,zt),zt}function v1(d){return x1(d)?v1(d.__v_raw):!!(d&&d.__v_isReactive)}function x1(d){return!!(d&&d.__v_isReadonly)}function lm(d){return!!(d&&d.__v_isShallow)}function KA(d){return d?!!d.__v_raw:!1}function Eu(d){const s=d&&d.__v_raw;return s?Eu(s):d}function XA(d){return!Rh(d,"__v_skip")&&Object.isExtensible(d)&&aA(d,"__v_skip",!0),d}const zp=d=>gf(d)?Ey(d):d,u4=d=>gf(d)?rz(d):d;function jd(d){return d?d.__v_isRef===!0:!1}function Ha(d){return nz(d,!1)}function sY(d){return nz(d,!0)}function nz(d,s){return jd(d)?d:new lY(d,s)}class lY{constructor(s,E){this.dep=new ZA,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=E?s:Eu(s),this._value=E?s:zp(s),this.__v_isShallow=E}get value(){return this.dep.track(),this._value}set value(s){const E=this._rawValue,R=this.__v_isShallow||lm(s)||x1(s);s=R?s:Eu(s),g1(s,E)&&(this._rawValue=s,this._value=R?s:zp(s),this.dep.trigger())}}function Ol(d){return jd(d)?d.value:d}const uY={get:(d,s,E)=>s==="__v_raw"?d:Ol(Reflect.get(d,s,E)),set:(d,s,E,R)=>{const Y=d[s];return jd(Y)&&!jd(E)?(Y.value=E,!0):Reflect.set(d,s,E,R)}};function iz(d){return v1(d)?d:new Proxy(d,uY)}function cY(d){const s=au(d)?new Array(d.length):{};for(const E in d)s[E]=fY(d,E);return s}class hY{constructor(s,E,R){this._object=s,this._key=E,this._defaultValue=R,this.__v_isRef=!0,this._value=void 0}get value(){const s=this._object[this._key];return this._value=s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}get dep(){return WG(Eu(this._object),this._key)}}function fY(d,s,E){const R=d[s];return jd(R)?R:new hY(d,s,E)}class dY{constructor(s,E,R){this.fn=s,this.setter=E,this._value=void 0,this.dep=new ZA(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!E,this.isSSR=R}notify(){if(this.flags|=16,!(this.flags&8)&&kf!==this)return HI(this,!0),!0}get value(){const s=this.dep.track();return $I(this),s&&(s.version=this.dep.version),this._value}set value(s){this.setter&&this.setter(s)}}function pY(d,s,E=!1){let R,Y;return Vu(d)?R=d:(R=d.get,Y=d.set),new dY(R,Y,E)}const C5={},c4=new WeakMap;let my;function mY(d,s=!1,E=my){if(E){let R=c4.get(E);R||c4.set(E,R=[]),R.push(d)}}function gY(d,s,E=mf){const{immediate:R,deep:Y,once:dt,scheduler:_t,augmentJob:zt,call:jt}=E,te=ti=>Y?ti:lm(ti)||Y===!1||Y===0?rv(ti,1):rv(ti);let ce,Ie,Je,fr,Ar=!1,kr=!1;if(jd(d)?(Ie=()=>d.value,Ar=lm(d)):v1(d)?(Ie=()=>te(d),Ar=!0):au(d)?(kr=!0,Ar=d.some(ti=>v1(ti)||lm(ti)),Ie=()=>d.map(ti=>{if(jd(ti))return ti.value;if(v1(ti))return te(ti);if(Vu(ti))return jt?jt(ti,2):ti()})):Vu(d)?s?Ie=jt?()=>jt(d,2):d:Ie=()=>{if(Je){sv();try{Je()}finally{lv()}}const ti=my;my=ce;try{return jt?jt(d,3,[fr]):d(fr)}finally{my=ti}}:Ie=mg,s&&Y){const ti=Ie,Dn=Y===!0?1/0:Y;Ie=()=>rv(ti(),Dn)}const Vr=jI(),fn=()=>{ce.stop(),Vr&&Vr.active&&VA(Vr.effects,ce)};if(dt&&s){const ti=s;s=(...Dn)=>{ti(...Dn),fn()}}let Dt=kr?new Array(d.length).fill(C5):C5;const cn=ti=>{if(!(!(ce.flags&1)||!ce.dirty&&!ti))if(s){const Dn=ce.run();if(Y||Ar||(kr?Dn.some((ii,Vi)=>g1(ii,Dt[Vi])):g1(Dn,Dt))){Je&&Je();const ii=my;my=ce;try{const Vi=[Dn,Dt===C5?void 0:kr&&Dt[0]===C5?[]:Dt,fr];Dt=Dn,jt?jt(s,3,Vi):s(...Vi)}finally{my=ii}}}else ce.run()};return zt&&zt(cn),ce=new UI(Ie),ce.scheduler=_t?()=>_t(cn,!1):cn,fr=ti=>mY(ti,!1,ce),Je=ce.onStop=()=>{const ti=c4.get(ce);if(ti){if(jt)jt(ti,4);else for(const Dn of ti)Dn();c4.delete(ce)}},s?R?cn(!0):Dt=ce.run():_t?_t(cn.bind(null,!0),!0):ce.run(),fn.pause=ce.pause.bind(ce),fn.resume=ce.resume.bind(ce),fn.stop=fn,fn}function rv(d,s=1/0,E){if(s<=0||!gf(d)||d.__v_skip||(E=E||new Set,E.has(d)))return d;if(E.add(d),s--,jd(d))rv(d.value,s,E);else if(au(d))for(let R=0;R{rv(R,s,E)});else if(OI(d)){for(const R in d)rv(d[R],s,E);for(const R of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,R)&&rv(d[R],s,E)}return d}/** * @vue/runtime-core v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function tw(d,s,E,B){try{return B?d(...B):d()}catch(K){z4(K,s,E)}}function Lm(d,s,E,B){if(Vu(d)){const K=tw(d,s,E,B);return K&&CI(K)&&K.catch(pt=>{z4(pt,s,E)}),K}if(au(d)){const K=[];for(let pt=0;pt>>1,K=f0[B],pt=R2(K);pt=R2(E)?f0.push(d):f0.splice(tY(s),0,d),d.flags|=1,nz()}}function nz(){c4||(c4=rz.then(az))}function eY(d){au(d)?u_.push(...d):i1&&d.id===-1?i1.splice(i_+1,0,d):d.flags&1||(u_.push(d),d.flags|=1),nz()}function RC(d,s,E=lg+1){for(;ER2(E)-R2(B));if(u_.length=0,i1){i1.push(...s);return}for(i1=s,i_=0;i_d.id==null?d.flags&2?-1:1/0:d.id;function az(d){try{for(lg=0;lg{B._d&&XC(-1);const pt=h4(s);let _t;try{_t=d(...K)}finally{h4(pt),B._d&&XC(1)}return _t};return B._n=!0,B._c=!0,B._d=!0,B}function Gp(d,s){if(Op===null)return d;const E=N4(Op),B=d.dirs||(d.dirs=[]);for(let K=0;Kd.__isTeleport,T2=d=>d&&(d.disabled||d.disabled===""),BC=d=>d&&(d.defer||d.defer===""),NC=d=>typeof SVGElement<"u"&&d instanceof SVGElement,jC=d=>typeof MathMLElement=="function"&&d instanceof MathMLElement,oA=(d,s)=>{const E=d&&d.to;return sd(E)?s?s(E):null:E},uz={name:"Teleport",__isTeleport:!0,process(d,s,E,B,K,pt,_t,Ot,jt,te){const{mc:he,pc:De,pbc:er,o:{insert:pr,querySelector:Mr,createText:Tr,createComment:Vr}}=te,mn=T2(s.props);let{shapeFlag:Dt,children:cn,dynamicChildren:Jn}=s;if(d==null){const Bn=s.el=Tr(""),ni=s.anchor=Tr("");pr(Bn,E,B),pr(ni,E,B);const Wi=(qr,Di)=>{Dt&16&&(K&&K.isCE&&(K.ce._teleportTarget=qr),he(cn,qr,Di,K,pt,_t,Ot,jt))},Un=()=>{const qr=s.target=oA(s.props,Mr),Di=cz(qr,s,Tr,pr);qr&&(_t!=="svg"&&NC(qr)?_t="svg":_t!=="mathml"&&jC(qr)&&(_t="mathml"),mn||(Wi(qr,Di),Y5(s,!1)))};mn&&(Wi(E,ni),Y5(s,!0)),BC(s.props)?(s.el.__isMounted=!1,c0(()=>{Un(),delete s.el.__isMounted},pt)):Un()}else{if(BC(s.props)&&d.el.__isMounted===!1){c0(()=>{uz.process(d,s,E,B,K,pt,_t,Ot,jt,te)},pt);return}s.el=d.el,s.targetStart=d.targetStart;const Bn=s.anchor=d.anchor,ni=s.target=d.target,Wi=s.targetAnchor=d.targetAnchor,Un=T2(d.props),qr=Un?E:ni,Di=Un?Bn:Wi;if(_t==="svg"||NC(ni)?_t="svg":(_t==="mathml"||jC(ni))&&(_t="mathml"),Jn?(er(d.dynamicChildren,Jn,qr,K,pt,_t,Ot),rM(d,s,!0)):jt||De(d,s,qr,Di,K,pt,_t,Ot,!1),mn)Un?s.props&&d.props&&s.props.to!==d.props.to&&(s.props.to=d.props.to):C5(s,E,Bn,te,1);else if((s.props&&s.props.to)!==(d.props&&d.props.to)){const Fi=s.target=oA(s.props,Mr);Fi&&C5(s,Fi,null,te,0)}else Un&&C5(s,ni,Wi,te,1);Y5(s,mn)}},remove(d,s,E,{um:B,o:{remove:K}},pt){const{shapeFlag:_t,children:Ot,anchor:jt,targetStart:te,targetAnchor:he,target:De,props:er}=d;if(De&&(K(te),K(he)),pt&&K(jt),_t&16){const pr=pt||!T2(er);for(let Mr=0;Mr{d.isMounted=!0}),gg(()=>{d.isUnmounting=!0}),d}const im=[Function,Array],fz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:im,onEnter:im,onAfterEnter:im,onEnterCancelled:im,onBeforeLeave:im,onLeave:im,onAfterLeave:im,onLeaveCancelled:im,onBeforeAppear:im,onAppear:im,onAfterAppear:im,onAppearCancelled:im},dz=d=>{const s=d.subTree;return s.component?dz(s.component):s},nY={name:"BaseTransition",props:fz,setup(d,{slots:s}){const E=B4(),B=hz();return()=>{const K=s.default&&JA(s.default(),!0);if(!K||!K.length)return;const pt=pz(K),_t=Uu(d),{mode:Ot}=_t;if(B.isLeaving)return k8(pt);const jt=UC(pt);if(!jt)return k8(pt);let te=B2(jt,_t,B,E,De=>te=De);jt.type!==Yp&&Sy(jt,te);let he=E.subTree&&UC(E.subTree);if(he&&he.type!==Yp&&!vy(jt,he)&&dz(E).type!==Yp){let De=B2(he,_t,B,E);if(Sy(he,De),Ot==="out-in"&&jt.type!==Yp)return B.isLeaving=!0,De.afterLeave=()=>{B.isLeaving=!1,E.job.flags&8||E.update(),delete De.afterLeave,he=void 0},k8(pt);Ot==="in-out"&&jt.type!==Yp?De.delayLeave=(er,pr,Mr)=>{const Tr=mz(B,he);Tr[String(he.key)]=he,er[a1]=()=>{pr(),er[a1]=void 0,delete te.delayedLeave,he=void 0},te.delayedLeave=()=>{Mr(),delete te.delayedLeave,he=void 0}}:he=void 0}else he&&(he=void 0);return pt}}};function pz(d){let s=d[0];if(d.length>1){for(const E of d)if(E.type!==Yp){s=E;break}}return s}const iY=nY;function mz(d,s){const{leavingVNodes:E}=d;let B=E.get(s.type);return B||(B=Object.create(null),E.set(s.type,B)),B}function B2(d,s,E,B,K){const{appear:pt,mode:_t,persisted:Ot=!1,onBeforeEnter:jt,onEnter:te,onAfterEnter:he,onEnterCancelled:De,onBeforeLeave:er,onLeave:pr,onAfterLeave:Mr,onLeaveCancelled:Tr,onBeforeAppear:Vr,onAppear:mn,onAfterAppear:Dt,onAppearCancelled:cn}=s,Jn=String(d.key),Bn=mz(E,d),ni=(qr,Di)=>{qr&&Lm(qr,B,9,Di)},Wi=(qr,Di)=>{const Fi=Di[1];ni(qr,Di),au(qr)?qr.every(Pi=>Pi.length<=1)&&Fi():qr.length<=1&&Fi()},Un={mode:_t,persisted:Ot,beforeEnter(qr){let Di=jt;if(!E.isMounted)if(pt)Di=Vr||jt;else return;qr[a1]&&qr[a1](!0);const Fi=Bn[Jn];Fi&&vy(d,Fi)&&Fi.el[a1]&&Fi.el[a1](),ni(Di,[qr])},enter(qr){let Di=te,Fi=he,Pi=De;if(!E.isMounted)if(pt)Di=mn||te,Fi=Dt||he,Pi=cn||De;else return;let bi=!1;const Yi=qr[L5]=Ca=>{bi||(bi=!0,Ca?ni(Pi,[qr]):ni(Fi,[qr]),Un.delayedLeave&&Un.delayedLeave(),qr[L5]=void 0)};Di?Wi(Di,[qr,Yi]):Yi()},leave(qr,Di){const Fi=String(d.key);if(qr[L5]&&qr[L5](!0),E.isUnmounting)return Di();ni(er,[qr]);let Pi=!1;const bi=qr[a1]=Yi=>{Pi||(Pi=!0,Di(),Yi?ni(Tr,[qr]):ni(Mr,[qr]),qr[a1]=void 0,Bn[Fi]===d&&delete Bn[Fi])};Bn[Fi]=d,pr?Wi(pr,[qr,bi]):bi()},clone(qr){const Di=B2(qr,s,E,B,K);return K&&K(Di),Di}};return Un}function k8(d){if(O4(d))return d=y1(d),d.children=null,d}function UC(d){if(!O4(d))return lz(d.type)&&d.children?pz(d.children):d;if(d.component)return d.component.subTree;const{shapeFlag:s,children:E}=d;if(E){if(s&16)return E[0];if(s&32&&Vu(E.default))return E.default()}}function Sy(d,s){d.shapeFlag&6&&d.component?(d.transition=s,Sy(d.component.subTree,s)):d.shapeFlag&128?(d.ssContent.transition=s.clone(d.ssContent),d.ssFallback.transition=s.clone(d.ssFallback)):d.transition=s}function JA(d,s=!1,E){let B=[],K=0;for(let pt=0;pt1)for(let pt=0;ptA2(Mr,s&&(au(s)?s[Tr]:s),E,B,K));return}if(c_(B)&&!K){B.shapeFlag&512&&B.type.__asyncResolved&&B.component.subTree.component&&A2(d,s,E,B.component.subTree);return}const pt=B.shapeFlag&4?N4(B.component):B.el,_t=K?null:pt,{i:Ot,r:jt}=d,te=s&&s.r,he=Ot.refs===mf?Ot.refs={}:Ot.refs,De=Ot.setupState,er=Uu(De),pr=De===mf?()=>!1:Mr=>Rh(er,Mr);if(te!=null&&te!==jt&&(sd(te)?(he[te]=null,pr(te)&&(De[te]=null)):jd(te)&&(te.value=null)),Vu(jt))tw(jt,Ot,12,[_t,he]);else{const Mr=sd(jt),Tr=jd(jt);if(Mr||Tr){const Vr=()=>{if(d.f){const mn=Mr?pr(jt)?De[jt]:he[jt]:jt.value;K?au(mn)&&jA(mn,pt):au(mn)?mn.includes(pt)||mn.push(pt):Mr?(he[jt]=[pt],pr(jt)&&(De[jt]=he[jt])):(jt.value=[pt],d.k&&(he[d.k]=jt.value))}else Mr?(he[jt]=_t,pr(jt)&&(De[jt]=_t)):Tr&&(jt.value=_t,d.k&&(he[d.k]=_t))};_t?(Vr.id=-1,c0(Vr,E)):Vr()}}}P4().requestIdleCallback;P4().cancelIdleCallback;const c_=d=>!!d.type.__asyncLoader,O4=d=>d.type.__isKeepAlive;function aY(d,s){vz(d,"a",s)}function oY(d,s){vz(d,"da",s)}function vz(d,s,E=Kp){const B=d.__wdc||(d.__wdc=()=>{let K=E;for(;K;){if(K.isDeactivated)return;K=K.parent}return d()});if(D4(s,B,E),E){let K=E.parent;for(;K&&K.parent;)O4(K.parent.vnode)&&sY(B,s,E,K),K=K.parent}}function sY(d,s,E,B){const K=D4(s,d,B,!0);Iy(()=>{jA(B[s],K)},E)}function D4(d,s,E=Kp,B=!1){if(E){const K=E[d]||(E[d]=[]),pt=s.__weh||(s.__weh=(..._t)=>{av();const Ot=rw(E),jt=Lm(s,E,d,_t);return Ot(),ov(),jt});return B?K.unshift(pt):K.push(pt),pt}}const sv=d=>(s,E=Kp)=>{(!U2||d==="sp")&&D4(d,(...B)=>s(...B),E)},lY=sv("bm"),bp=sv("m"),uY=sv("bu"),yz=sv("u"),gg=sv("bum"),Iy=sv("um"),cY=sv("sp"),hY=sv("rtg"),fY=sv("rtc");function dY(d,s=Kp){D4("ec",d,s)}const xz="components";function QA(d,s){return bz(xz,d,!0,s)||d}const _z=Symbol.for("v-ndc");function f4(d){return sd(d)?bz(xz,d,!1)||d:d||_z}function bz(d,s,E=!0,B=!1){const K=Op||Kp;if(K){const pt=K.type;{const Ot=eK(pt,!1);if(Ot&&(Ot===s||Ot===cm(s)||Ot===L4(cm(s))))return pt}const _t=VC(K[d]||pt[d],s)||VC(K.appContext[d],s);return!_t&&B?pt:_t}}function VC(d,s){return d&&(d[s]||d[cm(s)]||d[L4(cm(s))])}function Jh(d,s,E,B){let K;const pt=E,_t=au(d);if(_t||sd(d)){const Ot=_t&&m1(d);let jt=!1,te=!1;Ot&&(jt=!lm(d),te=v1(d),d=I4(d)),K=new Array(d.length);for(let he=0,De=d.length;hes(Ot,jt,void 0,pt));else{const Ot=Object.keys(d);K=new Array(Ot.length);for(let jt=0,te=Ot.length;jtj2(s)?!(s.type===Yp||s.type===Pu&&!wz(s.children)):!0)?d:null}const sA=d=>d?Uz(d)?N4(d):sA(d.parent):null,M2=ap(Object.create(null),{$:d=>d,$el:d=>d.vnode.el,$data:d=>d.data,$props:d=>d.props,$attrs:d=>d.attrs,$slots:d=>d.slots,$refs:d=>d.refs,$parent:d=>sA(d.parent),$root:d=>sA(d.root),$host:d=>d.ce,$emit:d=>d.emit,$options:d=>Tz(d),$forceUpdate:d=>d.f||(d.f=()=>{KA(d.update)}),$nextTick:d=>d.n||(d.n=om.bind(d.proxy)),$watch:d=>FY.bind(d)}),T8=(d,s)=>d!==mf&&!d.__isScriptSetup&&Rh(d,s),mY={get({_:d},s){if(s==="__v_skip")return!0;const{ctx:E,setupState:B,data:K,props:pt,accessCache:_t,type:Ot,appContext:jt}=d;let te;if(s[0]!=="$"){const pr=_t[s];if(pr!==void 0)switch(pr){case 1:return B[s];case 2:return K[s];case 4:return E[s];case 3:return pt[s]}else{if(T8(B,s))return _t[s]=1,B[s];if(K!==mf&&Rh(K,s))return _t[s]=2,K[s];if((te=d.propsOptions[0])&&Rh(te,s))return _t[s]=3,pt[s];if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];lA&&(_t[s]=0)}}const he=M2[s];let De,er;if(he)return s==="$attrs"&&Zp(d.attrs,"get",""),he(d);if((De=Ot.__cssModules)&&(De=De[s]))return De;if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];if(er=jt.config.globalProperties,Rh(er,s))return er[s]},set({_:d},s,E){const{data:B,setupState:K,ctx:pt}=d;return T8(K,s)?(K[s]=E,!0):B!==mf&&Rh(B,s)?(B[s]=E,!0):Rh(d.props,s)||s[0]==="$"&&s.slice(1)in d?!1:(pt[s]=E,!0)},has({_:{data:d,setupState:s,accessCache:E,ctx:B,appContext:K,propsOptions:pt}},_t){let Ot;return!!E[_t]||d!==mf&&Rh(d,_t)||T8(s,_t)||(Ot=pt[0])&&Rh(Ot,_t)||Rh(B,_t)||Rh(M2,_t)||Rh(K.config.globalProperties,_t)},defineProperty(d,s,E){return E.get!=null?d._.accessCache[s]=0:Rh(E,"value")&&this.set(d,s,E.value,null),Reflect.defineProperty(d,s,E)}};function HC(d){return au(d)?d.reduce((s,E)=>(s[E]=null,s),{}):d}let lA=!0;function gY(d){const s=Tz(d),E=d.proxy,B=d.ctx;lA=!1,s.beforeCreate&&WC(s.beforeCreate,d,"bc");const{data:K,computed:pt,methods:_t,watch:Ot,provide:jt,inject:te,created:he,beforeMount:De,mounted:er,beforeUpdate:pr,updated:Mr,activated:Tr,deactivated:Vr,beforeDestroy:mn,beforeUnmount:Dt,destroyed:cn,unmounted:Jn,render:Bn,renderTracked:ni,renderTriggered:Wi,errorCaptured:Un,serverPrefetch:qr,expose:Di,inheritAttrs:Fi,components:Pi,directives:bi,filters:Yi}=s;if(te&&vY(te,B,null),_t)for(const si in _t){const Ma=_t[si];Vu(Ma)&&(B[si]=Ma.bind(E))}if(K){const si=K.call(E,E);gf(si)&&(d.data=My(si))}if(lA=!0,pt)for(const si in pt){const Ma=pt[si],zo=Vu(Ma)?Ma.bind(E,E):Vu(Ma.get)?Ma.get.bind(E,E):dg,ho=!Vu(Ma)&&Vu(Ma.set)?Ma.set.bind(E):dg,mo=$o({get:zo,set:ho});Object.defineProperty(B,si,{enumerable:!0,configurable:!0,get:()=>mo.value,set:Ts=>mo.value=Ts})}if(Ot)for(const si in Ot)kz(Ot[si],B,E,si);if(jt){const si=Vu(jt)?jt.call(E):jt;Reflect.ownKeys(si).forEach(Ma=>{K5(Ma,si[Ma])})}he&&WC(he,d,"c");function Ni(si,Ma){au(Ma)?Ma.forEach(zo=>si(zo.bind(E))):Ma&&si(Ma.bind(E))}if(Ni(lY,De),Ni(bp,er),Ni(uY,pr),Ni(yz,Mr),Ni(aY,Tr),Ni(oY,Vr),Ni(dY,Un),Ni(fY,ni),Ni(hY,Wi),Ni(gg,Dt),Ni(Iy,Jn),Ni(cY,qr),au(Di))if(Di.length){const si=d.exposed||(d.exposed={});Di.forEach(Ma=>{Object.defineProperty(si,Ma,{get:()=>E[Ma],set:zo=>E[Ma]=zo,enumerable:!0})})}else d.exposed||(d.exposed={});Bn&&d.render===dg&&(d.render=Bn),Fi!=null&&(d.inheritAttrs=Fi),Pi&&(d.components=Pi),bi&&(d.directives=bi),qr&&gz(d)}function vY(d,s,E=dg){au(d)&&(d=uA(d));for(const B in d){const K=d[B];let pt;gf(K)?"default"in K?pt=um(K.from||B,K.default,!0):pt=um(K.from||B):pt=um(K),jd(pt)?Object.defineProperty(s,B,{enumerable:!0,configurable:!0,get:()=>pt.value,set:_t=>pt.value=_t}):s[B]=pt}}function WC(d,s,E){Lm(au(d)?d.map(B=>B.bind(s.proxy)):d.bind(s.proxy),s,E)}function kz(d,s,E,B){let K=B.includes(".")?Fz(E,B):()=>E[B];if(sd(d)){const pt=s[d];Vu(pt)&&Em(K,pt)}else if(Vu(d))Em(K,d.bind(E));else if(gf(d))if(au(d))d.forEach(pt=>kz(pt,s,E,B));else{const pt=Vu(d.handler)?d.handler.bind(E):s[d.handler];Vu(pt)&&Em(K,pt,d)}}function Tz(d){const s=d.type,{mixins:E,extends:B}=s,{mixins:K,optionsCache:pt,config:{optionMergeStrategies:_t}}=d.appContext,Ot=pt.get(s);let jt;return Ot?jt=Ot:!K.length&&!E&&!B?jt=s:(jt={},K.length&&K.forEach(te=>d4(jt,te,_t,!0)),d4(jt,s,_t)),gf(s)&&pt.set(s,jt),jt}function d4(d,s,E,B=!1){const{mixins:K,extends:pt}=s;pt&&d4(d,pt,E,!0),K&&K.forEach(_t=>d4(d,_t,E,!0));for(const _t in s)if(!(B&&_t==="expose")){const Ot=yY[_t]||E&&E[_t];d[_t]=Ot?Ot(d[_t],s[_t]):s[_t]}return d}const yY={data:qC,props:$C,emits:$C,methods:m2,computed:m2,beforeCreate:u0,created:u0,beforeMount:u0,mounted:u0,beforeUpdate:u0,updated:u0,beforeDestroy:u0,beforeUnmount:u0,destroyed:u0,unmounted:u0,activated:u0,deactivated:u0,errorCaptured:u0,serverPrefetch:u0,components:m2,directives:m2,watch:_Y,provide:qC,inject:xY};function qC(d,s){return s?d?function(){return ap(Vu(d)?d.call(this,this):d,Vu(s)?s.call(this,this):s)}:s:d}function xY(d,s){return m2(uA(d),uA(s))}function uA(d){if(au(d)){const s={};for(let E=0;E1)return E&&Vu(s)?s.call(B&&B.proxy):s}}function kY(){return!!(B4()||ky)}const Mz={},Sz=()=>Object.create(Mz),Ez=d=>Object.getPrototypeOf(d)===Mz;function TY(d,s,E,B=!1){const K={},pt=Sz();d.propsDefaults=Object.create(null),Cz(d,s,K,pt);for(const _t in d.propsOptions[0])_t in K||(K[_t]=void 0);E?d.props=B?K:JI(K):d.type.props?d.props=K:d.props=pt,d.attrs=pt}function AY(d,s,E,B){const{props:K,attrs:pt,vnode:{patchFlag:_t}}=d,Ot=Uu(K),[jt]=d.propsOptions;let te=!1;if((B||_t>0)&&!(_t&16)){if(_t&8){const he=d.vnode.dynamicProps;for(let De=0;De{jt=!0;const[er,pr]=Lz(De,s,!0);ap(_t,er),pr&&Ot.push(...pr)};!E&&s.mixins.length&&s.mixins.forEach(he),d.extends&&he(d.extends),d.mixins&&d.mixins.forEach(he)}if(!pt&&!jt)return gf(d)&&B.set(d,s_),s_;if(au(pt))for(let he=0;hed==="_"||d==="__"||d==="_ctx"||d==="$stable",eM=d=>au(d)?d.map(cg):[cg(d)],SY=(d,s,E)=>{if(s._n)return s;const B=ew((...K)=>eM(s(...K)),E);return B._c=!1,B},Pz=(d,s,E)=>{const B=d._ctx;for(const K in d){if(tM(K))continue;const pt=d[K];if(Vu(pt))s[K]=SY(K,pt,B);else if(pt!=null){const _t=eM(pt);s[K]=()=>_t}}},Iz=(d,s)=>{const E=eM(s);d.slots.default=()=>E},zz=(d,s,E)=>{for(const B in s)(E||!tM(B))&&(d[B]=s[B])},EY=(d,s,E)=>{const B=d.slots=Sz();if(d.vnode.shapeFlag&32){const K=s.__;K&&rA(B,"__",K,!0);const pt=s._;pt?(zz(B,s,E),E&&rA(B,"_",pt,!0)):Pz(s,B)}else s&&Iz(d,s)},CY=(d,s,E)=>{const{vnode:B,slots:K}=d;let pt=!0,_t=mf;if(B.shapeFlag&32){const Ot=s._;Ot?E&&Ot===1?pt=!1:zz(K,s,E):(pt=!s.$stable,Pz(s,K)),_t=s}else s&&(Iz(d,s),_t={default:1});if(pt)for(const Ot in K)!tM(Ot)&&_t[Ot]==null&&delete K[Ot]},c0=HY;function LY(d){return PY(d)}function PY(d,s){const E=P4();E.__VUE__=!0;const{insert:B,remove:K,patchProp:pt,createElement:_t,createText:Ot,createComment:jt,setText:te,setElementText:he,parentNode:De,nextSibling:er,setScopeId:pr=dg,insertStaticContent:Mr}=d,Tr=(vi,wi,hi,go=null,Mo=null,To=null,ms=void 0,bs=null,as=!!wi.dynamicChildren)=>{if(vi===wi)return;vi&&!vy(vi,wi)&&(go=da(vi),Ts(vi,Mo,To,!0),vi=null),wi.patchFlag===-2&&(as=!1,wi.dynamicChildren=null);const{type:Yo,ref:Ol,shapeFlag:Ns}=wi;switch(Yo){case R4:Vr(vi,wi,hi,go);break;case Yp:mn(vi,wi,hi,go);break;case X5:vi==null&&Dt(wi,hi,go,ms);break;case Pu:Pi(vi,wi,hi,go,Mo,To,ms,bs,as);break;default:Ns&1?Bn(vi,wi,hi,go,Mo,To,ms,bs,as):Ns&6?bi(vi,wi,hi,go,Mo,To,ms,bs,as):(Ns&64||Ns&128)&&Yo.process(vi,wi,hi,go,Mo,To,ms,bs,as,us)}Ol!=null&&Mo?A2(Ol,vi&&vi.ref,To,wi||vi,!wi):Ol==null&&vi&&vi.ref!=null&&A2(vi.ref,null,To,vi,!0)},Vr=(vi,wi,hi,go)=>{if(vi==null)B(wi.el=Ot(wi.children),hi,go);else{const Mo=wi.el=vi.el;wi.children!==vi.children&&te(Mo,wi.children)}},mn=(vi,wi,hi,go)=>{vi==null?B(wi.el=jt(wi.children||""),hi,go):wi.el=vi.el},Dt=(vi,wi,hi,go)=>{[vi.el,vi.anchor]=Mr(vi.children,wi,hi,go,vi.el,vi.anchor)},cn=({el:vi,anchor:wi},hi,go)=>{let Mo;for(;vi&&vi!==wi;)Mo=er(vi),B(vi,hi,go),vi=Mo;B(wi,hi,go)},Jn=({el:vi,anchor:wi})=>{let hi;for(;vi&&vi!==wi;)hi=er(vi),K(vi),vi=hi;K(wi)},Bn=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{wi.type==="svg"?ms="svg":wi.type==="math"&&(ms="mathml"),vi==null?ni(wi,hi,go,Mo,To,ms,bs,as):qr(vi,wi,Mo,To,ms,bs,as)},ni=(vi,wi,hi,go,Mo,To,ms,bs)=>{let as,Yo;const{props:Ol,shapeFlag:Ns,transition:Bl,dirs:vu}=vi;if(as=vi.el=_t(vi.type,To,Ol&&Ol.is,Ol),Ns&8?he(as,vi.children):Ns&16&&Un(vi.children,as,null,go,Mo,A8(vi,To),ms,bs),vu&&ay(vi,null,go,"created"),Wi(as,vi,vi.scopeId,ms,go),Ol){for(const fh in Ol)fh!=="value"&&!b2(fh)&&pt(as,fh,null,Ol[fh],To,go);"value"in Ol&&pt(as,"value",null,Ol.value,To),(Yo=Ol.onVnodeBeforeMount)&&ng(Yo,go,vi)}vu&&ay(vi,null,go,"beforeMount");const tc=IY(Mo,Bl);tc&&Bl.beforeEnter(as),B(as,wi,hi),((Yo=Ol&&Ol.onVnodeMounted)||tc||vu)&&c0(()=>{Yo&&ng(Yo,go,vi),tc&&Bl.enter(as),vu&&ay(vi,null,go,"mounted")},Mo)},Wi=(vi,wi,hi,go,Mo)=>{if(hi&&pr(vi,hi),go)for(let To=0;To{for(let Yo=as;Yo{const bs=wi.el=vi.el;let{patchFlag:as,dynamicChildren:Yo,dirs:Ol}=wi;as|=vi.patchFlag&16;const Ns=vi.props||mf,Bl=wi.props||mf;let vu;if(hi&&oy(hi,!1),(vu=Bl.onVnodeBeforeUpdate)&&ng(vu,hi,wi,vi),Ol&&ay(wi,vi,hi,"beforeUpdate"),hi&&oy(hi,!0),(Ns.innerHTML&&Bl.innerHTML==null||Ns.textContent&&Bl.textContent==null)&&he(bs,""),Yo?Di(vi.dynamicChildren,Yo,bs,hi,go,A8(wi,Mo),To):ms||Ma(vi,wi,bs,null,hi,go,A8(wi,Mo),To,!1),as>0){if(as&16)Fi(bs,Ns,Bl,hi,Mo);else if(as&2&&Ns.class!==Bl.class&&pt(bs,"class",null,Bl.class,Mo),as&4&&pt(bs,"style",Ns.style,Bl.style,Mo),as&8){const tc=wi.dynamicProps;for(let fh=0;fh{vu&&ng(vu,hi,wi,vi),Ol&&ay(wi,vi,hi,"updated")},go)},Di=(vi,wi,hi,go,Mo,To,ms)=>{for(let bs=0;bs{if(wi!==hi){if(wi!==mf)for(const To in wi)!b2(To)&&!(To in hi)&&pt(vi,To,wi[To],null,Mo,go);for(const To in hi){if(b2(To))continue;const ms=hi[To],bs=wi[To];ms!==bs&&To!=="value"&&pt(vi,To,bs,ms,Mo,go)}"value"in hi&&pt(vi,"value",wi.value,hi.value,Mo)}},Pi=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{const Yo=wi.el=vi?vi.el:Ot(""),Ol=wi.anchor=vi?vi.anchor:Ot("");let{patchFlag:Ns,dynamicChildren:Bl,slotScopeIds:vu}=wi;vu&&(bs=bs?bs.concat(vu):vu),vi==null?(B(Yo,hi,go),B(Ol,hi,go),Un(wi.children||[],hi,Ol,Mo,To,ms,bs,as)):Ns>0&&Ns&64&&Bl&&vi.dynamicChildren?(Di(vi.dynamicChildren,Bl,hi,Mo,To,ms,bs),(wi.key!=null||Mo&&wi===Mo.subTree)&&rM(vi,wi,!0)):Ma(vi,wi,hi,Ol,Mo,To,ms,bs,as)},bi=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{wi.slotScopeIds=bs,vi==null?wi.shapeFlag&512?Mo.ctx.activate(wi,hi,go,ms,as):Yi(wi,hi,go,Mo,To,ms,as):Ca(vi,wi,as)},Yi=(vi,wi,hi,go,Mo,To,ms)=>{const bs=vi.component=KY(vi,go,Mo);if(O4(vi)&&(bs.ctx.renderer=us),XY(bs,!1,ms),bs.asyncDep){if(Mo&&Mo.registerDep(bs,Ni,ms),!vi.el){const as=bs.subTree=Wl(Yp);mn(null,as,wi,hi),vi.placeholder=as.el}}else Ni(bs,vi,wi,hi,Mo,To,ms)},Ca=(vi,wi,hi)=>{const go=wi.component=vi.component;if(UY(vi,wi,hi))if(go.asyncDep&&!go.asyncResolved){si(go,wi,hi);return}else go.next=wi,go.update();else wi.el=vi.el,go.vnode=wi},Ni=(vi,wi,hi,go,Mo,To,ms)=>{const bs=()=>{if(vi.isMounted){let{next:Ns,bu:Bl,u:vu,parent:tc,vnode:fh}=vi;{const d0=Oz(vi);if(d0){Ns&&(Ns.el=fh.el,si(vi,Ns,ms)),d0.asyncDep.then(()=>{vi.isUnmounted||bs()});return}}let Fc=Ns,op;oy(vi,!1),Ns?(Ns.el=fh.el,si(vi,Ns,ms)):Ns=fh,Bl&&G5(Bl),(op=Ns.props&&Ns.props.onVnodeBeforeUpdate)&&ng(op,tc,Ns,fh),oy(vi,!0);const Kd=YC(vi),e0=vi.subTree;vi.subTree=Kd,Tr(e0,Kd,De(e0.el),da(e0),vi,Mo,To),Ns.el=Kd.el,Fc===null&&VY(vi,Kd.el),vu&&c0(vu,Mo),(op=Ns.props&&Ns.props.onVnodeUpdated)&&c0(()=>ng(op,tc,Ns,fh),Mo)}else{let Ns;const{el:Bl,props:vu}=wi,{bm:tc,m:fh,parent:Fc,root:op,type:Kd}=vi,e0=c_(wi);oy(vi,!1),tc&&G5(tc),!e0&&(Ns=vu&&vu.onVnodeBeforeMount)&&ng(Ns,Fc,wi),oy(vi,!0);{op.ce&&op.ce._def.shadowRoot!==!1&&op.ce._injectChildStyle(Kd);const d0=vi.subTree=YC(vi);Tr(null,d0,hi,go,vi,Mo,To),wi.el=d0.el}if(fh&&c0(fh,Mo),!e0&&(Ns=vu&&vu.onVnodeMounted)){const d0=wi;c0(()=>ng(Ns,Fc,d0),Mo)}(wi.shapeFlag&256||Fc&&c_(Fc.vnode)&&Fc.vnode.shapeFlag&256)&&vi.a&&c0(vi.a,Mo),vi.isMounted=!0,wi=hi=go=null}};vi.scope.on();const as=vi.effect=new BI(bs);vi.scope.off();const Yo=vi.update=as.run.bind(as),Ol=vi.job=as.runIfDirty.bind(as);Ol.i=vi,Ol.id=vi.uid,as.scheduler=()=>KA(Ol),oy(vi,!0),Yo()},si=(vi,wi,hi)=>{wi.component=vi;const go=vi.vnode.props;vi.vnode=wi,vi.next=null,AY(vi,wi.props,go,hi),CY(vi,wi.children,hi),av(),RC(vi),ov()},Ma=(vi,wi,hi,go,Mo,To,ms,bs,as=!1)=>{const Yo=vi&&vi.children,Ol=vi?vi.shapeFlag:0,Ns=wi.children,{patchFlag:Bl,shapeFlag:vu}=wi;if(Bl>0){if(Bl&128){ho(Yo,Ns,hi,go,Mo,To,ms,bs,as);return}else if(Bl&256){zo(Yo,Ns,hi,go,Mo,To,ms,bs,as);return}}vu&8?(Ol&16&&Ia(Yo,Mo,To),Ns!==Yo&&he(hi,Ns)):Ol&16?vu&16?ho(Yo,Ns,hi,go,Mo,To,ms,bs,as):Ia(Yo,Mo,To,!0):(Ol&8&&he(hi,""),vu&16&&Un(Ns,hi,go,Mo,To,ms,bs,as))},zo=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{vi=vi||s_,wi=wi||s_;const Yo=vi.length,Ol=wi.length,Ns=Math.min(Yo,Ol);let Bl;for(Bl=0;BlOl?Ia(vi,Mo,To,!0,!1,Ns):Un(wi,hi,go,Mo,To,ms,bs,as,Ns)},ho=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{let Yo=0;const Ol=wi.length;let Ns=vi.length-1,Bl=Ol-1;for(;Yo<=Ns&&Yo<=Bl;){const vu=vi[Yo],tc=wi[Yo]=as?o1(wi[Yo]):cg(wi[Yo]);if(vy(vu,tc))Tr(vu,tc,hi,null,Mo,To,ms,bs,as);else break;Yo++}for(;Yo<=Ns&&Yo<=Bl;){const vu=vi[Ns],tc=wi[Bl]=as?o1(wi[Bl]):cg(wi[Bl]);if(vy(vu,tc))Tr(vu,tc,hi,null,Mo,To,ms,bs,as);else break;Ns--,Bl--}if(Yo>Ns){if(Yo<=Bl){const vu=Bl+1,tc=vuBl)for(;Yo<=Ns;)Ts(vi[Yo],Mo,To,!0),Yo++;else{const vu=Yo,tc=Yo,fh=new Map;for(Yo=tc;Yo<=Bl;Yo++){const sp=wi[Yo]=as?o1(wi[Yo]):cg(wi[Yo]);sp.key!=null&&fh.set(sp.key,Yo)}let Fc,op=0;const Kd=Bl-tc+1;let e0=!1,d0=0;const Dm=new Array(Kd);for(Yo=0;Yo=Kd){Ts(sp,Mo,To,!0);continue}let p0;if(sp.key!=null)p0=fh.get(sp.key);else for(Fc=tc;Fc<=Bl;Fc++)if(Dm[Fc-tc]===0&&vy(sp,wi[Fc])){p0=Fc;break}p0===void 0?Ts(sp,Mo,To,!0):(Dm[p0-tc]=Yo+1,p0>=d0?d0=p0:e0=!0,Tr(sp,wi[p0],hi,null,Mo,To,ms,bs,as),op++)}const uv=e0?zY(Dm):s_;for(Fc=uv.length-1,Yo=Kd-1;Yo>=0;Yo--){const sp=tc+Yo,p0=wi[sp],Fm=wi[sp+1],Fy=sp+1{const{el:To,type:ms,transition:bs,children:as,shapeFlag:Yo}=vi;if(Yo&6){mo(vi.component.subTree,wi,hi,go);return}if(Yo&128){vi.suspense.move(wi,hi,go);return}if(Yo&64){ms.move(vi,wi,hi,us);return}if(ms===Pu){B(To,wi,hi);for(let Ns=0;Nsbs.enter(To),Mo);else{const{leave:Ns,delayLeave:Bl,afterLeave:vu}=bs,tc=()=>{vi.ctx.isUnmounted?K(To):B(To,wi,hi)},fh=()=>{Ns(To,()=>{tc(),vu&&vu()})};Bl?Bl(To,tc,fh):fh()}else B(To,wi,hi)},Ts=(vi,wi,hi,go=!1,Mo=!1)=>{const{type:To,props:ms,ref:bs,children:as,dynamicChildren:Yo,shapeFlag:Ol,patchFlag:Ns,dirs:Bl,cacheIndex:vu}=vi;if(Ns===-2&&(Mo=!1),bs!=null&&(av(),A2(bs,null,hi,vi,!0),ov()),vu!=null&&(wi.renderCache[vu]=void 0),Ol&256){wi.ctx.deactivate(vi);return}const tc=Ol&1&&Bl,fh=!c_(vi);let Fc;if(fh&&(Fc=ms&&ms.onVnodeBeforeUnmount)&&ng(Fc,wi,vi),Ol&6)ro(vi.component,hi,go);else{if(Ol&128){vi.suspense.unmount(hi,go);return}tc&&ay(vi,null,wi,"beforeUnmount"),Ol&64?vi.type.remove(vi,wi,hi,us,go):Yo&&!Yo.hasOnce&&(To!==Pu||Ns>0&&Ns&64)?Ia(Yo,wi,hi,!1,!0):(To===Pu&&Ns&384||!Mo&&Ol&16)&&Ia(as,wi,hi),go&&xl(vi)}(fh&&(Fc=ms&&ms.onVnodeUnmounted)||tc)&&c0(()=>{Fc&&ng(Fc,wi,vi),tc&&ay(vi,null,wi,"unmounted")},hi)},xl=vi=>{const{type:wi,el:hi,anchor:go,transition:Mo}=vi;if(wi===Pu){ko(hi,go);return}if(wi===X5){Jn(vi);return}const To=()=>{K(hi),Mo&&!Mo.persisted&&Mo.afterLeave&&Mo.afterLeave()};if(vi.shapeFlag&1&&Mo&&!Mo.persisted){const{leave:ms,delayLeave:bs}=Mo,as=()=>ms(hi,To);bs?bs(vi.el,To,as):as()}else To()},ko=(vi,wi)=>{let hi;for(;vi!==wi;)hi=er(vi),K(vi),vi=hi;K(wi)},ro=(vi,wi,hi)=>{const{bum:go,scope:Mo,job:To,subTree:ms,um:bs,m:as,a:Yo,parent:Ol,slots:{__:Ns}}=vi;GC(as),GC(Yo),go&&G5(go),Ol&&au(Ns)&&Ns.forEach(Bl=>{Ol.renderCache[Bl]=void 0}),Mo.stop(),To&&(To.flags|=8,Ts(ms,vi,wi,hi)),bs&&c0(bs,wi),c0(()=>{vi.isUnmounted=!0},wi),wi&&wi.pendingBranch&&!wi.isUnmounted&&vi.asyncDep&&!vi.asyncResolved&&vi.suspenseId===wi.pendingId&&(wi.deps--,wi.deps===0&&wi.resolve())},Ia=(vi,wi,hi,go=!1,Mo=!1,To=0)=>{for(let ms=To;ms{if(vi.shapeFlag&6)return da(vi.component.subTree);if(vi.shapeFlag&128)return vi.suspense.next();const wi=er(vi.anchor||vi.el),hi=wi&&wi[sz];return hi?er(hi):wi};let no=!1;const po=(vi,wi,hi)=>{vi==null?wi._vnode&&Ts(wi._vnode,null,null,!0):Tr(wi._vnode||null,vi,wi,null,null,null,hi),wi._vnode=vi,no||(no=!0,RC(),iz(),no=!1)},us={p:Tr,um:Ts,m:mo,r:xl,mt:Yi,mc:Un,pc:Ma,pbc:Di,n:da,o:d};return{render:po,hydrate:void 0,createApp:wY(po)}}function A8({type:d,props:s},E){return E==="svg"&&d==="foreignObject"||E==="mathml"&&d==="annotation-xml"&&s&&s.encoding&&s.encoding.includes("html")?void 0:E}function oy({effect:d,job:s},E){E?(d.flags|=32,s.flags|=4):(d.flags&=-33,s.flags&=-5)}function IY(d,s){return(!d||d&&!d.pendingBranch)&&s&&!s.persisted}function rM(d,s,E=!1){const B=d.children,K=s.children;if(au(B)&&au(K))for(let pt=0;pt>1,d[E[Ot]]0&&(s[B]=E[pt-1]),E[pt]=B)}}for(pt=E.length,_t=E[pt-1];pt-- >0;)E[pt]=_t,_t=s[_t];return E}function Oz(d){const s=d.subTree.component;if(s)return s.asyncDep&&!s.asyncResolved?s:Oz(s)}function GC(d){if(d)for(let s=0;sum(OY);function Em(d,s,E){return Dz(d,s,E)}function Dz(d,s,E=mf){const{immediate:B,deep:K,flush:pt,once:_t}=E,Ot=ap({},E),jt=s&&B||!s&&pt!=="post";let te;if(U2){if(pt==="sync"){const pr=DY();te=pr.__watcherHandles||(pr.__watcherHandles=[])}else if(!jt){const pr=()=>{};return pr.stop=dg,pr.resume=dg,pr.pause=dg,pr}}const he=Kp;Ot.call=(pr,Mr,Tr)=>Lm(pr,he,Mr,Tr);let De=!1;pt==="post"?Ot.scheduler=pr=>{c0(pr,he&&he.suspense)}:pt!=="sync"&&(De=!0,Ot.scheduler=(pr,Mr)=>{Mr?pr():KA(pr)}),Ot.augmentJob=pr=>{s&&(pr.flags|=4),De&&(pr.flags|=2,he&&(pr.id=he.uid,pr.i=he))};const er=JG(d,s,Ot);return U2&&(te?te.push(er):jt&&er()),er}function FY(d,s,E){const B=this.proxy,K=sd(d)?d.includes(".")?Fz(B,d):()=>B[d]:d.bind(B,B);let pt;Vu(s)?pt=s:(pt=s.handler,E=s);const _t=rw(this),Ot=Dz(K,pt.bind(B),E);return _t(),Ot}function Fz(d,s){const E=s.split(".");return()=>{let B=d;for(let K=0;Ks==="modelValue"||s==="model-value"?d.modelModifiers:d[`${s}Modifiers`]||d[`${cm(s)}Modifiers`]||d[`${Py(s)}Modifiers`];function BY(d,s,...E){if(d.isUnmounted)return;const B=d.vnode.props||mf;let K=E;const pt=s.startsWith("update:"),_t=pt&&RY(B,s.slice(7));_t&&(_t.trim&&(K=E.map(he=>sd(he)?he.trim():he)),_t.number&&(K=E.map(o4)));let Ot,jt=B[Ot=y8(s)]||B[Ot=y8(cm(s))];!jt&&pt&&(jt=B[Ot=y8(Py(s))]),jt&&Lm(jt,d,6,K);const te=B[Ot+"Once"];if(te){if(!d.emitted)d.emitted={};else if(d.emitted[Ot])return;d.emitted[Ot]=!0,Lm(te,d,6,K)}}function Rz(d,s,E=!1){const B=s.emitsCache,K=B.get(d);if(K!==void 0)return K;const pt=d.emits;let _t={},Ot=!1;if(!Vu(d)){const jt=te=>{const he=Rz(te,s,!0);he&&(Ot=!0,ap(_t,he))};!E&&s.mixins.length&&s.mixins.forEach(jt),d.extends&&jt(d.extends),d.mixins&&d.mixins.forEach(jt)}return!pt&&!Ot?(gf(d)&&B.set(d,null),null):(au(pt)?pt.forEach(jt=>_t[jt]=null):ap(_t,pt),gf(d)&&B.set(d,_t),_t)}function F4(d,s){return!d||!S4(s)?!1:(s=s.slice(2).replace(/Once$/,""),Rh(d,s[0].toLowerCase()+s.slice(1))||Rh(d,Py(s))||Rh(d,s))}function YC(d){const{type:s,vnode:E,proxy:B,withProxy:K,propsOptions:[pt],slots:_t,attrs:Ot,emit:jt,render:te,renderCache:he,props:De,data:er,setupState:pr,ctx:Mr,inheritAttrs:Tr}=d,Vr=h4(d);let mn,Dt;try{if(E.shapeFlag&4){const Jn=K||B,Bn=Jn;mn=cg(te.call(Bn,Jn,he,De,pr,er,Mr)),Dt=Ot}else{const Jn=s;mn=cg(Jn.length>1?Jn(De,{attrs:Ot,slots:_t,emit:jt}):Jn(De,null)),Dt=s.props?Ot:NY(Ot)}}catch(Jn){S2.length=0,z4(Jn,d,1),mn=Wl(Yp)}let cn=mn;if(Dt&&Tr!==!1){const Jn=Object.keys(Dt),{shapeFlag:Bn}=cn;Jn.length&&Bn&7&&(pt&&Jn.some(NA)&&(Dt=jY(Dt,pt)),cn=y1(cn,Dt,!1,!0))}return E.dirs&&(cn=y1(cn,null,!1,!0),cn.dirs=cn.dirs?cn.dirs.concat(E.dirs):E.dirs),E.transition&&Sy(cn,E.transition),mn=cn,h4(Vr),mn}const NY=d=>{let s;for(const E in d)(E==="class"||E==="style"||S4(E))&&((s||(s={}))[E]=d[E]);return s},jY=(d,s)=>{const E={};for(const B in d)(!NA(B)||!(B.slice(9)in s))&&(E[B]=d[B]);return E};function UY(d,s,E){const{props:B,children:K,component:pt}=d,{props:_t,children:Ot,patchFlag:jt}=s,te=pt.emitsOptions;if(s.dirs||s.transition)return!0;if(E&&jt>=0){if(jt&1024)return!0;if(jt&16)return B?KC(B,_t,te):!!_t;if(jt&8){const he=s.dynamicProps;for(let De=0;Ded.__isSuspense;function HY(d,s){s&&s.pendingBranch?au(d)?s.effects.push(...d):s.effects.push(d):eY(d)}const Pu=Symbol.for("v-fgt"),R4=Symbol.for("v-txt"),Yp=Symbol.for("v-cmt"),X5=Symbol.for("v-stc"),S2=[];let $0=null;function _i(d=!1){S2.push($0=d?null:[])}function WY(){S2.pop(),$0=S2[S2.length-1]||null}let N2=1;function XC(d,s=!1){N2+=d,d<0&&$0&&s&&($0.hasOnce=!0)}function Nz(d){return d.dynamicChildren=N2>0?$0||s_:null,WY(),N2>0&&$0&&$0.push(d),d}function zi(d,s,E,B,K,pt){return Nz(Ee(d,s,E,B,K,pt,!0))}function Z0(d,s,E,B,K){return Nz(Wl(d,s,E,B,K,!0))}function j2(d){return d?d.__v_isVNode===!0:!1}function vy(d,s){return d.type===s.type&&d.key===s.key}const jz=({key:d})=>d??null,J5=({ref:d,ref_key:s,ref_for:E})=>(typeof d=="number"&&(d=""+d),d!=null?sd(d)||jd(d)||Vu(d)?{i:Op,r:d,k:s,f:!!E}:d:null);function Ee(d,s=null,E=null,B=0,K=null,pt=d===Pu?0:1,_t=!1,Ot=!1){const jt={__v_isVNode:!0,__v_skip:!0,type:d,props:s,key:s&&jz(s),ref:s&&J5(s),scopeId:oz,slotScopeIds:null,children:E,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:pt,patchFlag:B,dynamicProps:K,dynamicChildren:null,appContext:null,ctx:Op};return Ot?(nM(jt,E),pt&128&&d.normalize(jt)):E&&(jt.shapeFlag|=sd(E)?8:16),N2>0&&!_t&&$0&&(jt.patchFlag>0||pt&6)&&jt.patchFlag!==32&&$0.push(jt),jt}const Wl=qY;function qY(d,s=null,E=null,B=0,K=null,pt=!1){if((!d||d===_z)&&(d=Yp),j2(d)){const Ot=y1(d,s,!0);return E&&nM(Ot,E),N2>0&&!pt&&$0&&(Ot.shapeFlag&6?$0[$0.indexOf(d)]=Ot:$0.push(Ot)),Ot.patchFlag=-2,Ot}if(rK(d)&&(d=d.__vccOpts),s){s=$Y(s);let{class:Ot,style:jt}=s;Ot&&!sd(Ot)&&(s.class=jo(Ot)),gf(jt)&&(GA(jt)&&!au(jt)&&(jt=ap({},jt)),s.style=hm(jt))}const _t=sd(d)?1:Bz(d)?128:lz(d)?64:gf(d)?4:Vu(d)?2:0;return Ee(d,s,E,B,K,_t,pt,!0)}function $Y(d){return d?GA(d)||Ez(d)?ap({},d):d:null}function y1(d,s,E=!1,B=!1){const{props:K,ref:pt,patchFlag:_t,children:Ot,transition:jt}=d,te=s?ZY(K||{},s):K,he={__v_isVNode:!0,__v_skip:!0,type:d.type,props:te,key:te&&jz(te),ref:s&&s.ref?E&&pt?au(pt)?pt.concat(J5(s)):[pt,J5(s)]:J5(s):pt,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:Ot,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:s&&d.type!==Pu?_t===-1?16:_t|16:_t,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:jt,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&y1(d.ssContent),ssFallback:d.ssFallback&&y1(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return jt&&B&&Sy(he,jt.clone(he)),he}function Qu(d=" ",s=0){return Wl(R4,null,d,s)}function $f(d,s){const E=Wl(X5,null,d);return E.staticCount=s,E}function is(d="",s=!1){return s?(_i(),Z0(Yp,null,d)):Wl(Yp,null,d)}function cg(d){return d==null||typeof d=="boolean"?Wl(Yp):au(d)?Wl(Pu,null,d.slice()):j2(d)?o1(d):Wl(R4,null,String(d))}function o1(d){return d.el===null&&d.patchFlag!==-1||d.memo?d:y1(d)}function nM(d,s){let E=0;const{shapeFlag:B}=d;if(s==null)s=null;else if(au(s))E=16;else if(typeof s=="object")if(B&65){const K=s.default;K&&(K._c&&(K._d=!1),nM(d,K()),K._c&&(K._d=!0));return}else{E=32;const K=s._;!K&&!Ez(s)?s._ctx=Op:K===3&&Op&&(Op.slots._===1?s._=1:(s._=2,d.patchFlag|=1024))}else Vu(s)?(s={default:s,_ctx:Op},E=32):(s=String(s),B&64?(E=16,s=[Qu(s)]):E=8);d.children=s,d.shapeFlag|=E}function ZY(...d){const s={};for(let E=0;EKp||Op;let p4,hA;{const d=P4(),s=(E,B)=>{let K;return(K=d[E])||(K=d[E]=[]),K.push(B),pt=>{K.length>1?K.forEach(_t=>_t(pt)):K[0](pt)}};p4=s("__VUE_INSTANCE_SETTERS__",E=>Kp=E),hA=s("__VUE_SSR_SETTERS__",E=>U2=E)}const rw=d=>{const s=Kp;return p4(d),d.scope.on(),()=>{d.scope.off(),p4(s)}},JC=()=>{Kp&&Kp.scope.off(),p4(null)};function Uz(d){return d.vnode.shapeFlag&4}let U2=!1;function XY(d,s=!1,E=!1){s&&hA(s);const{props:B,children:K}=d.vnode,pt=Uz(d);TY(d,B,pt,s),EY(d,K,E||s);const _t=pt?JY(d,s):void 0;return s&&hA(!1),_t}function JY(d,s){const E=d.type;d.accessCache=Object.create(null),d.proxy=new Proxy(d.ctx,mY);const{setup:B}=E;if(B){av();const K=d.setupContext=B.length>1?tK(d):null,pt=rw(d),_t=tw(B,d,0,[d.props,K]),Ot=CI(_t);if(ov(),pt(),(Ot||d.sp)&&!c_(d)&&gz(d),Ot){if(_t.then(JC,JC),s)return _t.then(jt=>{QC(d,jt)}).catch(jt=>{z4(jt,d,0)});d.asyncDep=_t}else QC(d,_t)}else Vz(d)}function QC(d,s,E){Vu(s)?d.type.__ssrInlineRender?d.ssrRender=s:d.render=s:gf(s)&&(d.setupState=ez(s)),Vz(d)}function Vz(d,s,E){const B=d.type;d.render||(d.render=B.render||dg);{const K=rw(d);av();try{gY(d)}finally{ov(),K()}}}const QY={get(d,s){return Zp(d,"get",""),d[s]}};function tK(d){const s=E=>{d.exposed=E||{}};return{attrs:new Proxy(d.attrs,QY),slots:d.slots,emit:d.emit,expose:s}}function N4(d){return d.exposed?d.exposeProxy||(d.exposeProxy=new Proxy(ez(YA(d.exposed)),{get(s,E){if(E in s)return s[E];if(E in M2)return M2[E](d)},has(s,E){return E in s||E in M2}})):d.proxy}function eK(d,s=!0){return Vu(d)?d.displayName||d.name:d.name||s&&d.__name}function rK(d){return Vu(d)&&"__vccOpts"in d}const $o=(d,s)=>KG(d,s,U2);function iM(d,s,E){const B=arguments.length;return B===2?gf(s)&&!au(s)?j2(s)?Wl(d,null,[s]):Wl(d,s):Wl(d,null,s):(B>3?E=Array.prototype.slice.call(arguments,2):B===3&&j2(E)&&(E=[E]),Wl(d,s,E))}const nK="3.5.18";/** +**/function tw(d,s,E,R){try{return R?d(...R):d()}catch(Y){D4(Y,s,E)}}function Lm(d,s,E,R){if(Vu(d)){const Y=tw(d,s,E,R);return Y&&II(Y)&&Y.catch(dt=>{D4(dt,s,E)}),Y}if(au(d)){const Y=[];for(let dt=0;dt>>1,Y=f0[R],dt=B2(Y);dt=B2(E)?f0.push(d):f0.splice(yY(s),0,d),d.flags|=1,oz()}}function oz(){h4||(h4=az.then(lz))}function xY(d){au(d)?c_.push(...d):o1&&d.id===-1?o1.splice(o_+1,0,d):d.flags&1||(c_.push(d),d.flags|=1),oz()}function NC(d,s,E=ug+1){for(;EB2(E)-B2(R));if(c_.length=0,o1){o1.push(...s);return}for(o1=s,o_=0;o_d.id==null?d.flags&2?-1:1/0:d.id;function lz(d){try{for(ug=0;ug{R._d&&QC(-1);const dt=f4(s);let _t;try{_t=d(...Y)}finally{f4(dt),R._d&&QC(1)}return _t};return R._n=!0,R._c=!0,R._d=!0,R}function Gp(d,s){if(Op===null)return d;const E=U4(Op),R=d.dirs||(d.dirs=[]);for(let Y=0;Yd.__isTeleport,T2=d=>d&&(d.disabled||d.disabled===""),jC=d=>d&&(d.defer||d.defer===""),UC=d=>typeof SVGElement<"u"&&d instanceof SVGElement,VC=d=>typeof MathMLElement=="function"&&d instanceof MathMLElement,uA=(d,s)=>{const E=d&&d.to;return ld(E)?s?s(E):null:E},fz={name:"Teleport",__isTeleport:!0,process(d,s,E,R,Y,dt,_t,zt,jt,te){const{mc:ce,pc:Ie,pbc:Je,o:{insert:fr,querySelector:Ar,createText:kr,createComment:Vr}}=te,fn=T2(s.props);let{shapeFlag:Dt,children:cn,dynamicChildren:ti}=s;if(d==null){const Dn=s.el=kr(""),ii=s.anchor=kr("");fr(Dn,E,R),fr(ii,E,R);const Vi=(Wr,Bi)=>{Dt&16&&(Y&&Y.isCE&&(Y.ce._teleportTarget=Wr),ce(cn,Wr,Bi,Y,dt,_t,zt,jt))},Nn=()=>{const Wr=s.target=uA(s.props,Ar),Bi=dz(Wr,s,kr,fr);Wr&&(_t!=="svg"&&UC(Wr)?_t="svg":_t!=="mathml"&&VC(Wr)&&(_t="mathml"),fn||(Vi(Wr,Bi),K5(s,!1)))};fn&&(Vi(E,ii),K5(s,!0)),jC(s.props)?(s.el.__isMounted=!1,c0(()=>{Nn(),delete s.el.__isMounted},dt)):Nn()}else{if(jC(s.props)&&d.el.__isMounted===!1){c0(()=>{fz.process(d,s,E,R,Y,dt,_t,zt,jt,te)},dt);return}s.el=d.el,s.targetStart=d.targetStart;const Dn=s.anchor=d.anchor,ii=s.target=d.target,Vi=s.targetAnchor=d.targetAnchor,Nn=T2(d.props),Wr=Nn?E:ii,Bi=Nn?Dn:Vi;if(_t==="svg"||UC(ii)?_t="svg":(_t==="mathml"||VC(ii))&&(_t="mathml"),ti?(Je(d.dynamicChildren,ti,Wr,Y,dt,_t,zt),iM(d,s,!0)):jt||Ie(d,s,Wr,Bi,Y,dt,_t,zt,!1),fn)Nn?s.props&&d.props&&s.props.to!==d.props.to&&(s.props.to=d.props.to):L5(s,E,Dn,te,1);else if((s.props&&s.props.to)!==(d.props&&d.props.to)){const Ri=s.target=uA(s.props,Ar);Ri&&L5(s,Ri,null,te,0)}else Nn&&L5(s,ii,Vi,te,1);K5(s,fn)}},remove(d,s,E,{um:R,o:{remove:Y}},dt){const{shapeFlag:_t,children:zt,anchor:jt,targetStart:te,targetAnchor:ce,target:Ie,props:Je}=d;if(Ie&&(Y(te),Y(ce)),dt&&Y(jt),_t&16){const fr=dt||!T2(Je);for(let Ar=0;Ar{d.isMounted=!0}),zm(()=>{d.isUnmounting=!0}),d}const am=[Function,Array],mz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:am,onEnter:am,onAfterEnter:am,onEnterCancelled:am,onBeforeLeave:am,onLeave:am,onAfterLeave:am,onLeaveCancelled:am,onBeforeAppear:am,onAppear:am,onAfterAppear:am,onAppearCancelled:am},gz=d=>{const s=d.subTree;return s.component?gz(s.component):s},bY={name:"BaseTransition",props:mz,setup(d,{slots:s}){const E=j4(),R=pz();return()=>{const Y=s.default&&tM(s.default(),!0);if(!Y||!Y.length)return;const dt=vz(Y),_t=Eu(d),{mode:zt}=_t;if(R.isLeaving)return T8(dt);const jt=HC(dt);if(!jt)return T8(dt);let te=R2(jt,_t,R,E,Ie=>te=Ie);jt.type!==Yp&&Cy(jt,te);let ce=E.subTree&&HC(E.subTree);if(ce&&ce.type!==Yp&&!xy(jt,ce)&&gz(E).type!==Yp){let Ie=R2(ce,_t,R,E);if(Cy(ce,Ie),zt==="out-in"&&jt.type!==Yp)return R.isLeaving=!0,Ie.afterLeave=()=>{R.isLeaving=!1,E.job.flags&8||E.update(),delete Ie.afterLeave,ce=void 0},T8(dt);zt==="in-out"&&jt.type!==Yp?Ie.delayLeave=(Je,fr,Ar)=>{const kr=yz(R,ce);kr[String(ce.key)]=ce,Je[s1]=()=>{fr(),Je[s1]=void 0,delete te.delayedLeave,ce=void 0},te.delayedLeave=()=>{Ar(),delete te.delayedLeave,ce=void 0}}:ce=void 0}else ce&&(ce=void 0);return dt}}};function vz(d){let s=d[0];if(d.length>1){for(const E of d)if(E.type!==Yp){s=E;break}}return s}const wY=bY;function yz(d,s){const{leavingVNodes:E}=d;let R=E.get(s.type);return R||(R=Object.create(null),E.set(s.type,R)),R}function R2(d,s,E,R,Y){const{appear:dt,mode:_t,persisted:zt=!1,onBeforeEnter:jt,onEnter:te,onAfterEnter:ce,onEnterCancelled:Ie,onBeforeLeave:Je,onLeave:fr,onAfterLeave:Ar,onLeaveCancelled:kr,onBeforeAppear:Vr,onAppear:fn,onAfterAppear:Dt,onAppearCancelled:cn}=s,ti=String(d.key),Dn=yz(E,d),ii=(Wr,Bi)=>{Wr&&Lm(Wr,R,9,Bi)},Vi=(Wr,Bi)=>{const Ri=Bi[1];ii(Wr,Bi),au(Wr)?Wr.every(Li=>Li.length<=1)&&Ri():Wr.length<=1&&Ri()},Nn={mode:_t,persisted:zt,beforeEnter(Wr){let Bi=jt;if(!E.isMounted)if(dt)Bi=Vr||jt;else return;Wr[s1]&&Wr[s1](!0);const Ri=Dn[ti];Ri&&xy(d,Ri)&&Ri.el[s1]&&Ri.el[s1](),ii(Bi,[Wr])},enter(Wr){let Bi=te,Ri=ce,Li=Ie;if(!E.isMounted)if(dt)Bi=fn||te,Ri=Dt||ce,Li=cn||Ie;else return;let $n=!1;const Hn=Wr[P5]=sa=>{$n||($n=!0,sa?ii(Li,[Wr]):ii(Ri,[Wr]),Nn.delayedLeave&&Nn.delayedLeave(),Wr[P5]=void 0)};Bi?Vi(Bi,[Wr,Hn]):Hn()},leave(Wr,Bi){const Ri=String(d.key);if(Wr[P5]&&Wr[P5](!0),E.isUnmounting)return Bi();ii(Je,[Wr]);let Li=!1;const $n=Wr[s1]=Hn=>{Li||(Li=!0,Bi(),Hn?ii(kr,[Wr]):ii(Ar,[Wr]),Wr[s1]=void 0,Dn[Ri]===d&&delete Dn[Ri])};Dn[Ri]=d,fr?Vi(fr,[Wr,$n]):$n()},clone(Wr){const Bi=R2(Wr,s,E,R,Y);return Y&&Y(Bi),Bi}};return Nn}function T8(d){if(F4(d))return d=_1(d),d.children=null,d}function HC(d){if(!F4(d))return hz(d.type)&&d.children?vz(d.children):d;if(d.component)return d.component.subTree;const{shapeFlag:s,children:E}=d;if(E){if(s&16)return E[0];if(s&32&&Vu(E.default))return E.default()}}function Cy(d,s){d.shapeFlag&6&&d.component?(d.transition=s,Cy(d.component.subTree,s)):d.shapeFlag&128?(d.ssContent.transition=s.clone(d.ssContent),d.ssFallback.transition=s.clone(d.ssFallback)):d.transition=s}function tM(d,s=!1,E){let R=[],Y=0;for(let dt=0;dt1)for(let dt=0;dtA2(Ar,s&&(au(s)?s[kr]:s),E,R,Y));return}if(h_(R)&&!Y){R.shapeFlag&512&&R.type.__asyncResolved&&R.component.subTree.component&&A2(d,s,E,R.component.subTree);return}const dt=R.shapeFlag&4?U4(R.component):R.el,_t=Y?null:dt,{i:zt,r:jt}=d,te=s&&s.r,ce=zt.refs===mf?zt.refs={}:zt.refs,Ie=zt.setupState,Je=Eu(Ie),fr=Ie===mf?()=>!1:Ar=>Rh(Je,Ar);if(te!=null&&te!==jt&&(ld(te)?(ce[te]=null,fr(te)&&(Ie[te]=null)):jd(te)&&(te.value=null)),Vu(jt))tw(jt,zt,12,[_t,ce]);else{const Ar=ld(jt),kr=jd(jt);if(Ar||kr){const Vr=()=>{if(d.f){const fn=Ar?fr(jt)?Ie[jt]:ce[jt]:jt.value;Y?au(fn)&&VA(fn,dt):au(fn)?fn.includes(dt)||fn.push(dt):Ar?(ce[jt]=[dt],fr(jt)&&(Ie[jt]=ce[jt])):(jt.value=[dt],d.k&&(ce[d.k]=jt.value))}else Ar?(ce[jt]=_t,fr(jt)&&(Ie[jt]=_t)):kr&&(jt.value=_t,d.k&&(ce[d.k]=_t))};_t?(Vr.id=-1,c0(Vr,E)):Vr()}}}z4().requestIdleCallback;z4().cancelIdleCallback;const h_=d=>!!d.type.__asyncLoader,F4=d=>d.type.__isKeepAlive;function kY(d,s){_z(d,"a",s)}function TY(d,s){_z(d,"da",s)}function _z(d,s,E=Kp){const R=d.__wdc||(d.__wdc=()=>{let Y=E;for(;Y;){if(Y.isDeactivated)return;Y=Y.parent}return d()});if(B4(s,R,E),E){let Y=E.parent;for(;Y&&Y.parent;)F4(Y.parent.vnode)&&AY(R,s,E,Y),Y=Y.parent}}function AY(d,s,E,R){const Y=B4(s,d,R,!0);Oy(()=>{VA(R[s],Y)},E)}function B4(d,s,E=Kp,R=!1){if(E){const Y=E[d]||(E[d]=[]),dt=s.__weh||(s.__weh=(..._t)=>{sv();const zt=rw(E),jt=Lm(s,E,d,_t);return zt(),lv(),jt});return R?Y.unshift(dt):Y.push(dt),dt}}const uv=d=>(s,E=Kp)=>{(!U2||d==="sp")&&B4(d,(...R)=>s(...R),E)},MY=uv("bm"),op=uv("m"),SY=uv("bu"),bz=uv("u"),zm=uv("bum"),Oy=uv("um"),EY=uv("sp"),CY=uv("rtg"),LY=uv("rtc");function PY(d,s=Kp){B4("ec",d,s)}const wz="components";function eM(d,s){return Tz(wz,d,!0,s)||d}const kz=Symbol.for("v-ndc");function d4(d){return ld(d)?Tz(wz,d,!1)||d:d||kz}function Tz(d,s,E=!0,R=!1){const Y=Op||Kp;if(Y){const dt=Y.type;{const zt=xK(dt,!1);if(zt&&(zt===s||zt===cm(s)||zt===I4(cm(s))))return dt}const _t=WC(Y[d]||dt[d],s)||WC(Y.appContext[d],s);return!_t&&R?dt:_t}}function WC(d,s){return d&&(d[s]||d[cm(s)]||d[I4(cm(s))])}function Mh(d,s,E,R){let Y;const dt=E,_t=au(d);if(_t||ld(d)){const zt=_t&&v1(d);let jt=!1,te=!1;zt&&(jt=!lm(d),te=x1(d),d=O4(d)),Y=new Array(d.length);for(let ce=0,Ie=d.length;ces(zt,jt,void 0,dt));else{const zt=Object.keys(d);Y=new Array(zt.length);for(let jt=0,te=zt.length;jtj2(s)?!(s.type===Yp||s.type===_u&&!Az(s.children)):!0)?d:null}const cA=d=>d?Wz(d)?U4(d):cA(d.parent):null,M2=ap(Object.create(null),{$:d=>d,$el:d=>d.vnode.el,$data:d=>d.data,$props:d=>d.props,$attrs:d=>d.attrs,$slots:d=>d.slots,$refs:d=>d.refs,$parent:d=>cA(d.parent),$root:d=>cA(d.root),$host:d=>d.ce,$emit:d=>d.emit,$options:d=>Sz(d),$forceUpdate:d=>d.f||(d.f=()=>{JA(d.update)}),$nextTick:d=>d.n||(d.n=S0.bind(d.proxy)),$watch:d=>tK.bind(d)}),A8=(d,s)=>d!==mf&&!d.__isScriptSetup&&Rh(d,s),zY={get({_:d},s){if(s==="__v_skip")return!0;const{ctx:E,setupState:R,data:Y,props:dt,accessCache:_t,type:zt,appContext:jt}=d;let te;if(s[0]!=="$"){const fr=_t[s];if(fr!==void 0)switch(fr){case 1:return R[s];case 2:return Y[s];case 4:return E[s];case 3:return dt[s]}else{if(A8(R,s))return _t[s]=1,R[s];if(Y!==mf&&Rh(Y,s))return _t[s]=2,Y[s];if((te=d.propsOptions[0])&&Rh(te,s))return _t[s]=3,dt[s];if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];hA&&(_t[s]=0)}}const ce=M2[s];let Ie,Je;if(ce)return s==="$attrs"&&Zp(d.attrs,"get",""),ce(d);if((Ie=zt.__cssModules)&&(Ie=Ie[s]))return Ie;if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];if(Je=jt.config.globalProperties,Rh(Je,s))return Je[s]},set({_:d},s,E){const{data:R,setupState:Y,ctx:dt}=d;return A8(Y,s)?(Y[s]=E,!0):R!==mf&&Rh(R,s)?(R[s]=E,!0):Rh(d.props,s)||s[0]==="$"&&s.slice(1)in d?!1:(dt[s]=E,!0)},has({_:{data:d,setupState:s,accessCache:E,ctx:R,appContext:Y,propsOptions:dt}},_t){let zt;return!!E[_t]||d!==mf&&Rh(d,_t)||A8(s,_t)||(zt=dt[0])&&Rh(zt,_t)||Rh(R,_t)||Rh(M2,_t)||Rh(Y.config.globalProperties,_t)},defineProperty(d,s,E){return E.get!=null?d._.accessCache[s]=0:Rh(E,"value")&&this.set(d,s,E.value,null),Reflect.defineProperty(d,s,E)}};function qC(d){return au(d)?d.reduce((s,E)=>(s[E]=null,s),{}):d}let hA=!0;function OY(d){const s=Sz(d),E=d.proxy,R=d.ctx;hA=!1,s.beforeCreate&&$C(s.beforeCreate,d,"bc");const{data:Y,computed:dt,methods:_t,watch:zt,provide:jt,inject:te,created:ce,beforeMount:Ie,mounted:Je,beforeUpdate:fr,updated:Ar,activated:kr,deactivated:Vr,beforeDestroy:fn,beforeUnmount:Dt,destroyed:cn,unmounted:ti,render:Dn,renderTracked:ii,renderTriggered:Vi,errorCaptured:Nn,serverPrefetch:Wr,expose:Bi,inheritAttrs:Ri,components:Li,directives:$n,filters:Hn}=s;if(te&&DY(te,R,null),_t)for(const Qn in _t){const la=_t[Qn];Vu(la)&&(R[Qn]=la.bind(E))}if(Y){const Qn=Y.call(E,E);gf(Qn)&&(d.data=Ey(Qn))}if(hA=!0,dt)for(const Qn in dt){const la=dt[Qn],Eo=Vu(la)?la.bind(E,E):Vu(la.get)?la.get.bind(E,E):mg,no=!Vu(la)&&Vu(la.set)?la.set.bind(E):mg,mo=Wo({get:Eo,set:no});Object.defineProperty(R,Qn,{enumerable:!0,configurable:!0,get:()=>mo.value,set:Ts=>mo.value=Ts})}if(zt)for(const Qn in zt)Mz(zt[Qn],R,E,Qn);if(jt){const Qn=Vu(jt)?jt.call(E):jt;Reflect.ownKeys(Qn).forEach(la=>{X5(la,Qn[la])})}ce&&$C(ce,d,"c");function Ti(Qn,la){au(la)?la.forEach(Eo=>Qn(Eo.bind(E))):la&&Qn(la.bind(E))}if(Ti(MY,Ie),Ti(op,Je),Ti(SY,fr),Ti(bz,Ar),Ti(kY,kr),Ti(TY,Vr),Ti(PY,Nn),Ti(LY,ii),Ti(CY,Vi),Ti(zm,Dt),Ti(Oy,ti),Ti(EY,Wr),au(Bi))if(Bi.length){const Qn=d.exposed||(d.exposed={});Bi.forEach(la=>{Object.defineProperty(Qn,la,{get:()=>E[la],set:Eo=>E[la]=Eo,enumerable:!0})})}else d.exposed||(d.exposed={});Dn&&d.render===mg&&(d.render=Dn),Ri!=null&&(d.inheritAttrs=Ri),Li&&(d.components=Li),$n&&(d.directives=$n),Wr&&xz(d)}function DY(d,s,E=mg){au(d)&&(d=fA(d));for(const R in d){const Y=d[R];let dt;gf(Y)?"default"in Y?dt=um(Y.from||R,Y.default,!0):dt=um(Y.from||R):dt=um(Y),jd(dt)?Object.defineProperty(s,R,{enumerable:!0,configurable:!0,get:()=>dt.value,set:_t=>dt.value=_t}):s[R]=dt}}function $C(d,s,E){Lm(au(d)?d.map(R=>R.bind(s.proxy)):d.bind(s.proxy),s,E)}function Mz(d,s,E,R){let Y=R.includes(".")?Nz(E,R):()=>E[R];if(ld(d)){const dt=s[d];Vu(dt)&&Em(Y,dt)}else if(Vu(d))Em(Y,d.bind(E));else if(gf(d))if(au(d))d.forEach(dt=>Mz(dt,s,E,R));else{const dt=Vu(d.handler)?d.handler.bind(E):s[d.handler];Vu(dt)&&Em(Y,dt,d)}}function Sz(d){const s=d.type,{mixins:E,extends:R}=s,{mixins:Y,optionsCache:dt,config:{optionMergeStrategies:_t}}=d.appContext,zt=dt.get(s);let jt;return zt?jt=zt:!Y.length&&!E&&!R?jt=s:(jt={},Y.length&&Y.forEach(te=>p4(jt,te,_t,!0)),p4(jt,s,_t)),gf(s)&&dt.set(s,jt),jt}function p4(d,s,E,R=!1){const{mixins:Y,extends:dt}=s;dt&&p4(d,dt,E,!0),Y&&Y.forEach(_t=>p4(d,_t,E,!0));for(const _t in s)if(!(R&&_t==="expose")){const zt=FY[_t]||E&&E[_t];d[_t]=zt?zt(d[_t],s[_t]):s[_t]}return d}const FY={data:ZC,props:GC,emits:GC,methods:g2,computed:g2,beforeCreate:u0,created:u0,beforeMount:u0,mounted:u0,beforeUpdate:u0,updated:u0,beforeDestroy:u0,beforeUnmount:u0,destroyed:u0,unmounted:u0,activated:u0,deactivated:u0,errorCaptured:u0,serverPrefetch:u0,components:g2,directives:g2,watch:RY,provide:ZC,inject:BY};function ZC(d,s){return s?d?function(){return ap(Vu(d)?d.call(this,this):d,Vu(s)?s.call(this,this):s)}:s:d}function BY(d,s){return g2(fA(d),fA(s))}function fA(d){if(au(d)){const s={};for(let E=0;E1)return E&&Vu(s)?s.call(R&&R.proxy):s}}function UY(){return!!(j4()||Ay)}const Cz={},Lz=()=>Object.create(Cz),Pz=d=>Object.getPrototypeOf(d)===Cz;function VY(d,s,E,R=!1){const Y={},dt=Lz();d.propsDefaults=Object.create(null),Iz(d,s,Y,dt);for(const _t in d.propsOptions[0])_t in Y||(Y[_t]=void 0);E?d.props=R?Y:ez(Y):d.type.props?d.props=Y:d.props=dt,d.attrs=dt}function HY(d,s,E,R){const{props:Y,attrs:dt,vnode:{patchFlag:_t}}=d,zt=Eu(Y),[jt]=d.propsOptions;let te=!1;if((R||_t>0)&&!(_t&16)){if(_t&8){const ce=d.vnode.dynamicProps;for(let Ie=0;Ie{jt=!0;const[Je,fr]=zz(Ie,s,!0);ap(_t,Je),fr&&zt.push(...fr)};!E&&s.mixins.length&&s.mixins.forEach(ce),d.extends&&ce(d.extends),d.mixins&&d.mixins.forEach(ce)}if(!dt&&!jt)return gf(d)&&R.set(d,l_),l_;if(au(dt))for(let ce=0;ced==="_"||d==="__"||d==="_ctx"||d==="$stable",nM=d=>au(d)?d.map(hg):[hg(d)],qY=(d,s,E)=>{if(s._n)return s;const R=ew((...Y)=>nM(s(...Y)),E);return R._c=!1,R},Oz=(d,s,E)=>{const R=d._ctx;for(const Y in d){if(rM(Y))continue;const dt=d[Y];if(Vu(dt))s[Y]=qY(Y,dt,R);else if(dt!=null){const _t=nM(dt);s[Y]=()=>_t}}},Dz=(d,s)=>{const E=nM(s);d.slots.default=()=>E},Fz=(d,s,E)=>{for(const R in s)(E||!rM(R))&&(d[R]=s[R])},$Y=(d,s,E)=>{const R=d.slots=Lz();if(d.vnode.shapeFlag&32){const Y=s.__;Y&&aA(R,"__",Y,!0);const dt=s._;dt?(Fz(R,s,E),E&&aA(R,"_",dt,!0)):Oz(s,R)}else s&&Dz(d,s)},ZY=(d,s,E)=>{const{vnode:R,slots:Y}=d;let dt=!0,_t=mf;if(R.shapeFlag&32){const zt=s._;zt?E&&zt===1?dt=!1:Fz(Y,s,E):(dt=!s.$stable,Oz(s,Y)),_t=s}else s&&(Dz(d,s),_t={default:1});if(dt)for(const zt in Y)!rM(zt)&&_t[zt]==null&&delete Y[zt]},c0=sK;function GY(d){return YY(d)}function YY(d,s){const E=z4();E.__VUE__=!0;const{insert:R,remove:Y,patchProp:dt,createElement:_t,createText:zt,createComment:jt,setText:te,setElementText:ce,parentNode:Ie,nextSibling:Je,setScopeId:fr=mg,insertStaticContent:Ar}=d,kr=(_i,Ai,pi,go=null,Mo=null,To=null,ms=void 0,bs=null,as=!!Ai.dynamicChildren)=>{if(_i===Ai)return;_i&&!xy(_i,Ai)&&(go=ma(_i),Ts(_i,Mo,To,!0),_i=null),Ai.patchFlag===-2&&(as=!1,Ai.dynamicChildren=null);const{type:Ko,ref:Dl,shapeFlag:Ns}=Ai;switch(Ko){case N4:Vr(_i,Ai,pi,go);break;case Yp:fn(_i,Ai,pi,go);break;case J5:_i==null&&Dt(Ai,pi,go,ms);break;case _u:Li(_i,Ai,pi,go,Mo,To,ms,bs,as);break;default:Ns&1?Dn(_i,Ai,pi,go,Mo,To,ms,bs,as):Ns&6?$n(_i,Ai,pi,go,Mo,To,ms,bs,as):(Ns&64||Ns&128)&&Ko.process(_i,Ai,pi,go,Mo,To,ms,bs,as,us)}Dl!=null&&Mo?A2(Dl,_i&&_i.ref,To,Ai||_i,!Ai):Dl==null&&_i&&_i.ref!=null&&A2(_i.ref,null,To,_i,!0)},Vr=(_i,Ai,pi,go)=>{if(_i==null)R(Ai.el=zt(Ai.children),pi,go);else{const Mo=Ai.el=_i.el;Ai.children!==_i.children&&te(Mo,Ai.children)}},fn=(_i,Ai,pi,go)=>{_i==null?R(Ai.el=jt(Ai.children||""),pi,go):Ai.el=_i.el},Dt=(_i,Ai,pi,go)=>{[_i.el,_i.anchor]=Ar(_i.children,Ai,pi,go,_i.el,_i.anchor)},cn=({el:_i,anchor:Ai},pi,go)=>{let Mo;for(;_i&&_i!==Ai;)Mo=Je(_i),R(_i,pi,go),_i=Mo;R(Ai,pi,go)},ti=({el:_i,anchor:Ai})=>{let pi;for(;_i&&_i!==Ai;)pi=Je(_i),Y(_i),_i=pi;Y(Ai)},Dn=(_i,Ai,pi,go,Mo,To,ms,bs,as)=>{Ai.type==="svg"?ms="svg":Ai.type==="math"&&(ms="mathml"),_i==null?ii(Ai,pi,go,Mo,To,ms,bs,as):Wr(_i,Ai,Mo,To,ms,bs,as)},ii=(_i,Ai,pi,go,Mo,To,ms,bs)=>{let as,Ko;const{props:Dl,shapeFlag:Ns,transition:Nl,dirs:vu}=_i;if(as=_i.el=_t(_i.type,To,Dl&&Dl.is,Dl),Ns&8?ce(as,_i.children):Ns&16&&Nn(_i.children,as,null,go,Mo,M8(_i,To),ms,bs),vu&&sy(_i,null,go,"created"),Vi(as,_i,_i.scopeId,ms,go),Dl){for(const dh in Dl)dh!=="value"&&!b2(dh)&&dt(as,dh,null,Dl[dh],To,go);"value"in Dl&&dt(as,"value",null,Dl.value,To),(Ko=Dl.onVnodeBeforeMount)&&ig(Ko,go,_i)}vu&&sy(_i,null,go,"beforeMount");const tc=KY(Mo,Nl);tc&&Nl.beforeEnter(as),R(as,Ai,pi),((Ko=Dl&&Dl.onVnodeMounted)||tc||vu)&&c0(()=>{Ko&&ig(Ko,go,_i),tc&&Nl.enter(as),vu&&sy(_i,null,go,"mounted")},Mo)},Vi=(_i,Ai,pi,go,Mo)=>{if(pi&&fr(_i,pi),go)for(let To=0;To{for(let Ko=as;Ko<_i.length;Ko++){const Dl=_i[Ko]=bs?l1(_i[Ko]):hg(_i[Ko]);kr(null,Dl,Ai,pi,go,Mo,To,ms,bs)}},Wr=(_i,Ai,pi,go,Mo,To,ms)=>{const bs=Ai.el=_i.el;let{patchFlag:as,dynamicChildren:Ko,dirs:Dl}=Ai;as|=_i.patchFlag&16;const Ns=_i.props||mf,Nl=Ai.props||mf;let vu;if(pi&&ly(pi,!1),(vu=Nl.onVnodeBeforeUpdate)&&ig(vu,pi,Ai,_i),Dl&&sy(Ai,_i,pi,"beforeUpdate"),pi&&ly(pi,!0),(Ns.innerHTML&&Nl.innerHTML==null||Ns.textContent&&Nl.textContent==null)&&ce(bs,""),Ko?Bi(_i.dynamicChildren,Ko,bs,pi,go,M8(Ai,Mo),To):ms||la(_i,Ai,bs,null,pi,go,M8(Ai,Mo),To,!1),as>0){if(as&16)Ri(bs,Ns,Nl,pi,Mo);else if(as&2&&Ns.class!==Nl.class&&dt(bs,"class",null,Nl.class,Mo),as&4&&dt(bs,"style",Ns.style,Nl.style,Mo),as&8){const tc=Ai.dynamicProps;for(let dh=0;dh{vu&&ig(vu,pi,Ai,_i),Dl&&sy(Ai,_i,pi,"updated")},go)},Bi=(_i,Ai,pi,go,Mo,To,ms)=>{for(let bs=0;bs{if(Ai!==pi){if(Ai!==mf)for(const To in Ai)!b2(To)&&!(To in pi)&&dt(_i,To,Ai[To],null,Mo,go);for(const To in pi){if(b2(To))continue;const ms=pi[To],bs=Ai[To];ms!==bs&&To!=="value"&&dt(_i,To,bs,ms,Mo,go)}"value"in pi&&dt(_i,"value",Ai.value,pi.value,Mo)}},Li=(_i,Ai,pi,go,Mo,To,ms,bs,as)=>{const Ko=Ai.el=_i?_i.el:zt(""),Dl=Ai.anchor=_i?_i.anchor:zt("");let{patchFlag:Ns,dynamicChildren:Nl,slotScopeIds:vu}=Ai;vu&&(bs=bs?bs.concat(vu):vu),_i==null?(R(Ko,pi,go),R(Dl,pi,go),Nn(Ai.children||[],pi,Dl,Mo,To,ms,bs,as)):Ns>0&&Ns&64&&Nl&&_i.dynamicChildren?(Bi(_i.dynamicChildren,Nl,pi,Mo,To,ms,bs),(Ai.key!=null||Mo&&Ai===Mo.subTree)&&iM(_i,Ai,!0)):la(_i,Ai,pi,Dl,Mo,To,ms,bs,as)},$n=(_i,Ai,pi,go,Mo,To,ms,bs,as)=>{Ai.slotScopeIds=bs,_i==null?Ai.shapeFlag&512?Mo.ctx.activate(Ai,pi,go,ms,as):Hn(Ai,pi,go,Mo,To,ms,as):sa(_i,Ai,as)},Hn=(_i,Ai,pi,go,Mo,To,ms)=>{const bs=_i.component=pK(_i,go,Mo);if(F4(_i)&&(bs.ctx.renderer=us),mK(bs,!1,ms),bs.asyncDep){if(Mo&&Mo.registerDep(bs,Ti,ms),!_i.el){const as=bs.subTree=El(Yp);fn(null,as,Ai,pi),_i.placeholder=as.el}}else Ti(bs,_i,Ai,pi,Mo,To,ms)},sa=(_i,Ai,pi)=>{const go=Ai.component=_i.component;if(aK(_i,Ai,pi))if(go.asyncDep&&!go.asyncResolved){Qn(go,Ai,pi);return}else go.next=Ai,go.update();else Ai.el=_i.el,go.vnode=Ai},Ti=(_i,Ai,pi,go,Mo,To,ms)=>{const bs=()=>{if(_i.isMounted){let{next:Ns,bu:Nl,u:vu,parent:tc,vnode:dh}=_i;{const d0=Bz(_i);if(d0){Ns&&(Ns.el=dh.el,Qn(_i,Ns,ms)),d0.asyncDep.then(()=>{_i.isUnmounted||bs()});return}}let Fc=Ns,sp;ly(_i,!1),Ns?(Ns.el=dh.el,Qn(_i,Ns,ms)):Ns=dh,Nl&&Y5(Nl),(sp=Ns.props&&Ns.props.onVnodeBeforeUpdate)&&ig(sp,tc,Ns,dh),ly(_i,!0);const Kd=XC(_i),e0=_i.subTree;_i.subTree=Kd,kr(e0,Kd,Ie(e0.el),ma(e0),_i,Mo,To),Ns.el=Kd.el,Fc===null&&oK(_i,Kd.el),vu&&c0(vu,Mo),(sp=Ns.props&&Ns.props.onVnodeUpdated)&&c0(()=>ig(sp,tc,Ns,dh),Mo)}else{let Ns;const{el:Nl,props:vu}=Ai,{bm:tc,m:dh,parent:Fc,root:sp,type:Kd}=_i,e0=h_(Ai);ly(_i,!1),tc&&Y5(tc),!e0&&(Ns=vu&&vu.onVnodeBeforeMount)&&ig(Ns,Fc,Ai),ly(_i,!0);{sp.ce&&sp.ce._def.shadowRoot!==!1&&sp.ce._injectChildStyle(Kd);const d0=_i.subTree=XC(_i);kr(null,d0,pi,go,_i,Mo,To),Ai.el=d0.el}if(dh&&c0(dh,Mo),!e0&&(Ns=vu&&vu.onVnodeMounted)){const d0=Ai;c0(()=>ig(Ns,Fc,d0),Mo)}(Ai.shapeFlag&256||Fc&&h_(Fc.vnode)&&Fc.vnode.shapeFlag&256)&&_i.a&&c0(_i.a,Mo),_i.isMounted=!0,Ai=pi=go=null}};_i.scope.on();const as=_i.effect=new UI(bs);_i.scope.off();const Ko=_i.update=as.run.bind(as),Dl=_i.job=as.runIfDirty.bind(as);Dl.i=_i,Dl.id=_i.uid,as.scheduler=()=>JA(Dl),ly(_i,!0),Ko()},Qn=(_i,Ai,pi)=>{Ai.component=_i;const go=_i.vnode.props;_i.vnode=Ai,_i.next=null,HY(_i,Ai.props,go,pi),ZY(_i,Ai.children,pi),sv(),NC(_i),lv()},la=(_i,Ai,pi,go,Mo,To,ms,bs,as=!1)=>{const Ko=_i&&_i.children,Dl=_i?_i.shapeFlag:0,Ns=Ai.children,{patchFlag:Nl,shapeFlag:vu}=Ai;if(Nl>0){if(Nl&128){no(Ko,Ns,pi,go,Mo,To,ms,bs,as);return}else if(Nl&256){Eo(Ko,Ns,pi,go,Mo,To,ms,bs,as);return}}vu&8?(Dl&16&&Ia(Ko,Mo,To),Ns!==Ko&&ce(pi,Ns)):Dl&16?vu&16?no(Ko,Ns,pi,go,Mo,To,ms,bs,as):Ia(Ko,Mo,To,!0):(Dl&8&&ce(pi,""),vu&16&&Nn(Ns,pi,go,Mo,To,ms,bs,as))},Eo=(_i,Ai,pi,go,Mo,To,ms,bs,as)=>{_i=_i||l_,Ai=Ai||l_;const Ko=_i.length,Dl=Ai.length,Ns=Math.min(Ko,Dl);let Nl;for(Nl=0;NlDl?Ia(_i,Mo,To,!0,!1,Ns):Nn(Ai,pi,go,Mo,To,ms,bs,as,Ns)},no=(_i,Ai,pi,go,Mo,To,ms,bs,as)=>{let Ko=0;const Dl=Ai.length;let Ns=_i.length-1,Nl=Dl-1;for(;Ko<=Ns&&Ko<=Nl;){const vu=_i[Ko],tc=Ai[Ko]=as?l1(Ai[Ko]):hg(Ai[Ko]);if(xy(vu,tc))kr(vu,tc,pi,null,Mo,To,ms,bs,as);else break;Ko++}for(;Ko<=Ns&&Ko<=Nl;){const vu=_i[Ns],tc=Ai[Nl]=as?l1(Ai[Nl]):hg(Ai[Nl]);if(xy(vu,tc))kr(vu,tc,pi,null,Mo,To,ms,bs,as);else break;Ns--,Nl--}if(Ko>Ns){if(Ko<=Nl){const vu=Nl+1,tc=vuNl)for(;Ko<=Ns;)Ts(_i[Ko],Mo,To,!0),Ko++;else{const vu=Ko,tc=Ko,dh=new Map;for(Ko=tc;Ko<=Nl;Ko++){const lp=Ai[Ko]=as?l1(Ai[Ko]):hg(Ai[Ko]);lp.key!=null&&dh.set(lp.key,Ko)}let Fc,sp=0;const Kd=Nl-tc+1;let e0=!1,d0=0;const Fm=new Array(Kd);for(Ko=0;Ko=Kd){Ts(lp,Mo,To,!0);continue}let p0;if(lp.key!=null)p0=dh.get(lp.key);else for(Fc=tc;Fc<=Nl;Fc++)if(Fm[Fc-tc]===0&&xy(lp,Ai[Fc])){p0=Fc;break}p0===void 0?Ts(lp,Mo,To,!0):(Fm[p0-tc]=Ko+1,p0>=d0?d0=p0:e0=!0,kr(lp,Ai[p0],pi,null,Mo,To,ms,bs,as),sp++)}const hv=e0?XY(Fm):l_;for(Fc=hv.length-1,Ko=Kd-1;Ko>=0;Ko--){const lp=tc+Ko,p0=Ai[lp],Bm=Ai[lp+1],Ry=lp+1{const{el:To,type:ms,transition:bs,children:as,shapeFlag:Ko}=_i;if(Ko&6){mo(_i.component.subTree,Ai,pi,go);return}if(Ko&128){_i.suspense.move(Ai,pi,go);return}if(Ko&64){ms.move(_i,Ai,pi,us);return}if(ms===_u){R(To,Ai,pi);for(let Ns=0;Nsbs.enter(To),Mo);else{const{leave:Ns,delayLeave:Nl,afterLeave:vu}=bs,tc=()=>{_i.ctx.isUnmounted?Y(To):R(To,Ai,pi)},dh=()=>{Ns(To,()=>{tc(),vu&&vu()})};Nl?Nl(To,tc,dh):dh()}else R(To,Ai,pi)},Ts=(_i,Ai,pi,go=!1,Mo=!1)=>{const{type:To,props:ms,ref:bs,children:as,dynamicChildren:Ko,shapeFlag:Dl,patchFlag:Ns,dirs:Nl,cacheIndex:vu}=_i;if(Ns===-2&&(Mo=!1),bs!=null&&(sv(),A2(bs,null,pi,_i,!0),lv()),vu!=null&&(Ai.renderCache[vu]=void 0),Dl&256){Ai.ctx.deactivate(_i);return}const tc=Dl&1&&Nl,dh=!h_(_i);let Fc;if(dh&&(Fc=ms&&ms.onVnodeBeforeUnmount)&&ig(Fc,Ai,_i),Dl&6)ro(_i.component,pi,go);else{if(Dl&128){_i.suspense.unmount(pi,go);return}tc&&sy(_i,null,Ai,"beforeUnmount"),Dl&64?_i.type.remove(_i,Ai,pi,us,go):Ko&&!Ko.hasOnce&&(To!==_u||Ns>0&&Ns&64)?Ia(Ko,Ai,pi,!1,!0):(To===_u&&Ns&384||!Mo&&Dl&16)&&Ia(as,Ai,pi),go&&xl(_i)}(dh&&(Fc=ms&&ms.onVnodeUnmounted)||tc)&&c0(()=>{Fc&&ig(Fc,Ai,_i),tc&&sy(_i,null,Ai,"unmounted")},pi)},xl=_i=>{const{type:Ai,el:pi,anchor:go,transition:Mo}=_i;if(Ai===_u){ko(pi,go);return}if(Ai===J5){ti(_i);return}const To=()=>{Y(pi),Mo&&!Mo.persisted&&Mo.afterLeave&&Mo.afterLeave()};if(_i.shapeFlag&1&&Mo&&!Mo.persisted){const{leave:ms,delayLeave:bs}=Mo,as=()=>ms(pi,To);bs?bs(_i.el,To,as):as()}else To()},ko=(_i,Ai)=>{let pi;for(;_i!==Ai;)pi=Je(_i),Y(_i),_i=pi;Y(Ai)},ro=(_i,Ai,pi)=>{const{bum:go,scope:Mo,job:To,subTree:ms,um:bs,m:as,a:Ko,parent:Dl,slots:{__:Ns}}=_i;KC(as),KC(Ko),go&&Y5(go),Dl&&au(Ns)&&Ns.forEach(Nl=>{Dl.renderCache[Nl]=void 0}),Mo.stop(),To&&(To.flags|=8,Ts(ms,_i,Ai,pi)),bs&&c0(bs,Ai),c0(()=>{_i.isUnmounted=!0},Ai),Ai&&Ai.pendingBranch&&!Ai.isUnmounted&&_i.asyncDep&&!_i.asyncResolved&&_i.suspenseId===Ai.pendingId&&(Ai.deps--,Ai.deps===0&&Ai.resolve())},Ia=(_i,Ai,pi,go=!1,Mo=!1,To=0)=>{for(let ms=To;ms<_i.length;ms++)Ts(_i[ms],Ai,pi,go,Mo)},ma=_i=>{if(_i.shapeFlag&6)return ma(_i.component.subTree);if(_i.shapeFlag&128)return _i.suspense.next();const Ai=Je(_i.anchor||_i.el),pi=Ai&&Ai[cz];return pi?Je(pi):Ai};let io=!1;const po=(_i,Ai,pi)=>{_i==null?Ai._vnode&&Ts(Ai._vnode,null,null,!0):kr(Ai._vnode||null,_i,Ai,null,null,null,pi),Ai._vnode=_i,io||(io=!0,NC(),sz(),io=!1)},us={p:kr,um:Ts,m:mo,r:xl,mt:Hn,mc:Nn,pc:la,pbc:Bi,n:ma,o:d};return{render:po,hydrate:void 0,createApp:jY(po)}}function M8({type:d,props:s},E){return E==="svg"&&d==="foreignObject"||E==="mathml"&&d==="annotation-xml"&&s&&s.encoding&&s.encoding.includes("html")?void 0:E}function ly({effect:d,job:s},E){E?(d.flags|=32,s.flags|=4):(d.flags&=-33,s.flags&=-5)}function KY(d,s){return(!d||d&&!d.pendingBranch)&&s&&!s.persisted}function iM(d,s,E=!1){const R=d.children,Y=s.children;if(au(R)&&au(Y))for(let dt=0;dt>1,d[E[zt]]0&&(s[R]=E[dt-1]),E[dt]=R)}}for(dt=E.length,_t=E[dt-1];dt-- >0;)E[dt]=_t,_t=s[_t];return E}function Bz(d){const s=d.subTree.component;if(s)return s.asyncDep&&!s.asyncResolved?s:Bz(s)}function KC(d){if(d)for(let s=0;sum(JY);function Em(d,s,E){return Rz(d,s,E)}function Rz(d,s,E=mf){const{immediate:R,deep:Y,flush:dt,once:_t}=E,zt=ap({},E),jt=s&&R||!s&&dt!=="post";let te;if(U2){if(dt==="sync"){const fr=QY();te=fr.__watcherHandles||(fr.__watcherHandles=[])}else if(!jt){const fr=()=>{};return fr.stop=mg,fr.resume=mg,fr.pause=mg,fr}}const ce=Kp;zt.call=(fr,Ar,kr)=>Lm(fr,ce,Ar,kr);let Ie=!1;dt==="post"?zt.scheduler=fr=>{c0(fr,ce&&ce.suspense)}:dt!=="sync"&&(Ie=!0,zt.scheduler=(fr,Ar)=>{Ar?fr():JA(fr)}),zt.augmentJob=fr=>{s&&(fr.flags|=4),Ie&&(fr.flags|=2,ce&&(fr.id=ce.uid,fr.i=ce))};const Je=gY(d,s,zt);return U2&&(te?te.push(Je):jt&&Je()),Je}function tK(d,s,E){const R=this.proxy,Y=ld(d)?d.includes(".")?Nz(R,d):()=>R[d]:d.bind(R,R);let dt;Vu(s)?dt=s:(dt=s.handler,E=s);const _t=rw(this),zt=Rz(Y,dt.bind(R),E);return _t(),zt}function Nz(d,s){const E=s.split(".");return()=>{let R=d;for(let Y=0;Ys==="modelValue"||s==="model-value"?d.modelModifiers:d[`${s}Modifiers`]||d[`${cm(s)}Modifiers`]||d[`${zy(s)}Modifiers`];function rK(d,s,...E){if(d.isUnmounted)return;const R=d.vnode.props||mf;let Y=E;const dt=s.startsWith("update:"),_t=dt&&eK(R,s.slice(7));_t&&(_t.trim&&(Y=E.map(ce=>ld(ce)?ce.trim():ce)),_t.number&&(Y=E.map(s4)));let zt,jt=R[zt=x8(s)]||R[zt=x8(cm(s))];!jt&&dt&&(jt=R[zt=x8(zy(s))]),jt&&Lm(jt,d,6,Y);const te=R[zt+"Once"];if(te){if(!d.emitted)d.emitted={};else if(d.emitted[zt])return;d.emitted[zt]=!0,Lm(te,d,6,Y)}}function jz(d,s,E=!1){const R=s.emitsCache,Y=R.get(d);if(Y!==void 0)return Y;const dt=d.emits;let _t={},zt=!1;if(!Vu(d)){const jt=te=>{const ce=jz(te,s,!0);ce&&(zt=!0,ap(_t,ce))};!E&&s.mixins.length&&s.mixins.forEach(jt),d.extends&&jt(d.extends),d.mixins&&d.mixins.forEach(jt)}return!dt&&!zt?(gf(d)&&R.set(d,null),null):(au(dt)?dt.forEach(jt=>_t[jt]=null):ap(_t,dt),gf(d)&&R.set(d,_t),_t)}function R4(d,s){return!d||!C4(s)?!1:(s=s.slice(2).replace(/Once$/,""),Rh(d,s[0].toLowerCase()+s.slice(1))||Rh(d,zy(s))||Rh(d,s))}function XC(d){const{type:s,vnode:E,proxy:R,withProxy:Y,propsOptions:[dt],slots:_t,attrs:zt,emit:jt,render:te,renderCache:ce,props:Ie,data:Je,setupState:fr,ctx:Ar,inheritAttrs:kr}=d,Vr=f4(d);let fn,Dt;try{if(E.shapeFlag&4){const ti=Y||R,Dn=ti;fn=hg(te.call(Dn,ti,ce,Ie,fr,Je,Ar)),Dt=zt}else{const ti=s;fn=hg(ti.length>1?ti(Ie,{attrs:zt,slots:_t,emit:jt}):ti(Ie,null)),Dt=s.props?zt:nK(zt)}}catch(ti){S2.length=0,D4(ti,d,1),fn=El(Yp)}let cn=fn;if(Dt&&kr!==!1){const ti=Object.keys(Dt),{shapeFlag:Dn}=cn;ti.length&&Dn&7&&(dt&&ti.some(UA)&&(Dt=iK(Dt,dt)),cn=_1(cn,Dt,!1,!0))}return E.dirs&&(cn=_1(cn,null,!1,!0),cn.dirs=cn.dirs?cn.dirs.concat(E.dirs):E.dirs),E.transition&&Cy(cn,E.transition),fn=cn,f4(Vr),fn}const nK=d=>{let s;for(const E in d)(E==="class"||E==="style"||C4(E))&&((s||(s={}))[E]=d[E]);return s},iK=(d,s)=>{const E={};for(const R in d)(!UA(R)||!(R.slice(9)in s))&&(E[R]=d[R]);return E};function aK(d,s,E){const{props:R,children:Y,component:dt}=d,{props:_t,children:zt,patchFlag:jt}=s,te=dt.emitsOptions;if(s.dirs||s.transition)return!0;if(E&&jt>=0){if(jt&1024)return!0;if(jt&16)return R?JC(R,_t,te):!!_t;if(jt&8){const ce=s.dynamicProps;for(let Ie=0;Ied.__isSuspense;function sK(d,s){s&&s.pendingBranch?au(d)?s.effects.push(...d):s.effects.push(d):xY(d)}const _u=Symbol.for("v-fgt"),N4=Symbol.for("v-txt"),Yp=Symbol.for("v-cmt"),J5=Symbol.for("v-stc"),S2=[];let Z0=null;function ci(d=!1){S2.push(Z0=d?null:[])}function lK(){S2.pop(),Z0=S2[S2.length-1]||null}let N2=1;function QC(d,s=!1){N2+=d,d<0&&Z0&&s&&(Z0.hasOnce=!0)}function Vz(d){return d.dynamicChildren=N2>0?Z0||l_:null,lK(),N2>0&&Z0&&Z0.push(d),d}function wi(d,s,E,R,Y,dt){return Vz(ye(d,s,E,R,Y,dt,!0))}function G0(d,s,E,R,Y){return Vz(El(d,s,E,R,Y,!0))}function j2(d){return d?d.__v_isVNode===!0:!1}function xy(d,s){return d.type===s.type&&d.key===s.key}const Hz=({key:d})=>d??null,Q5=({ref:d,ref_key:s,ref_for:E})=>(typeof d=="number"&&(d=""+d),d!=null?ld(d)||jd(d)||Vu(d)?{i:Op,r:d,k:s,f:!!E}:d:null);function ye(d,s=null,E=null,R=0,Y=null,dt=d===_u?0:1,_t=!1,zt=!1){const jt={__v_isVNode:!0,__v_skip:!0,type:d,props:s,key:s&&Hz(s),ref:s&&Q5(s),scopeId:uz,slotScopeIds:null,children:E,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:dt,patchFlag:R,dynamicProps:Y,dynamicChildren:null,appContext:null,ctx:Op};return zt?(aM(jt,E),dt&128&&d.normalize(jt)):E&&(jt.shapeFlag|=ld(E)?8:16),N2>0&&!_t&&Z0&&(jt.patchFlag>0||dt&6)&&jt.patchFlag!==32&&Z0.push(jt),jt}const El=uK;function uK(d,s=null,E=null,R=0,Y=null,dt=!1){if((!d||d===kz)&&(d=Yp),j2(d)){const zt=_1(d,s,!0);return E&&aM(zt,E),N2>0&&!dt&&Z0&&(zt.shapeFlag&6?Z0[Z0.indexOf(d)]=zt:Z0.push(zt)),zt.patchFlag=-2,zt}if(_K(d)&&(d=d.__vccOpts),s){s=cK(s);let{class:zt,style:jt}=s;zt&&!ld(zt)&&(s.class=Fo(zt)),gf(jt)&&(KA(jt)&&!au(jt)&&(jt=ap({},jt)),s.style=hm(jt))}const _t=ld(d)?1:Uz(d)?128:hz(d)?64:gf(d)?4:Vu(d)?2:0;return ye(d,s,E,R,Y,_t,dt,!0)}function cK(d){return d?KA(d)||Pz(d)?ap({},d):d:null}function _1(d,s,E=!1,R=!1){const{props:Y,ref:dt,patchFlag:_t,children:zt,transition:jt}=d,te=s?hK(Y||{},s):Y,ce={__v_isVNode:!0,__v_skip:!0,type:d.type,props:te,key:te&&Hz(te),ref:s&&s.ref?E&&dt?au(dt)?dt.concat(Q5(s)):[dt,Q5(s)]:Q5(s):dt,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:zt,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:s&&d.type!==_u?_t===-1?16:_t|16:_t,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:jt,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&_1(d.ssContent),ssFallback:d.ssFallback&&_1(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return jt&&R&&Cy(ce,jt.clone(ce)),ce}function Qu(d=" ",s=0){return El(N4,null,d,s)}function Ff(d,s){const E=El(J5,null,d);return E.staticCount=s,E}function Uo(d="",s=!1){return s?(ci(),G0(Yp,null,d)):El(Yp,null,d)}function hg(d){return d==null||typeof d=="boolean"?El(Yp):au(d)?El(_u,null,d.slice()):j2(d)?l1(d):El(N4,null,String(d))}function l1(d){return d.el===null&&d.patchFlag!==-1||d.memo?d:_1(d)}function aM(d,s){let E=0;const{shapeFlag:R}=d;if(s==null)s=null;else if(au(s))E=16;else if(typeof s=="object")if(R&65){const Y=s.default;Y&&(Y._c&&(Y._d=!1),aM(d,Y()),Y._c&&(Y._d=!0));return}else{E=32;const Y=s._;!Y&&!Pz(s)?s._ctx=Op:Y===3&&Op&&(Op.slots._===1?s._=1:(s._=2,d.patchFlag|=1024))}else Vu(s)?(s={default:s,_ctx:Op},E=32):(s=String(s),R&64?(E=16,s=[Qu(s)]):E=8);d.children=s,d.shapeFlag|=E}function hK(...d){const s={};for(let E=0;EKp||Op;let m4,pA;{const d=z4(),s=(E,R)=>{let Y;return(Y=d[E])||(Y=d[E]=[]),Y.push(R),dt=>{Y.length>1?Y.forEach(_t=>_t(dt)):Y[0](dt)}};m4=s("__VUE_INSTANCE_SETTERS__",E=>Kp=E),pA=s("__VUE_SSR_SETTERS__",E=>U2=E)}const rw=d=>{const s=Kp;return m4(d),d.scope.on(),()=>{d.scope.off(),m4(s)}},tL=()=>{Kp&&Kp.scope.off(),m4(null)};function Wz(d){return d.vnode.shapeFlag&4}let U2=!1;function mK(d,s=!1,E=!1){s&&pA(s);const{props:R,children:Y}=d.vnode,dt=Wz(d);VY(d,R,dt,s),$Y(d,Y,E||s);const _t=dt?gK(d,s):void 0;return s&&pA(!1),_t}function gK(d,s){const E=d.type;d.accessCache=Object.create(null),d.proxy=new Proxy(d.ctx,zY);const{setup:R}=E;if(R){sv();const Y=d.setupContext=R.length>1?yK(d):null,dt=rw(d),_t=tw(R,d,0,[d.props,Y]),zt=II(_t);if(lv(),dt(),(zt||d.sp)&&!h_(d)&&xz(d),zt){if(_t.then(tL,tL),s)return _t.then(jt=>{eL(d,jt)}).catch(jt=>{D4(jt,d,0)});d.asyncDep=_t}else eL(d,_t)}else qz(d)}function eL(d,s,E){Vu(s)?d.type.__ssrInlineRender?d.ssrRender=s:d.render=s:gf(s)&&(d.setupState=iz(s)),qz(d)}function qz(d,s,E){const R=d.type;d.render||(d.render=R.render||mg);{const Y=rw(d);sv();try{OY(d)}finally{lv(),Y()}}}const vK={get(d,s){return Zp(d,"get",""),d[s]}};function yK(d){const s=E=>{d.exposed=E||{}};return{attrs:new Proxy(d.attrs,vK),slots:d.slots,emit:d.emit,expose:s}}function U4(d){return d.exposed?d.exposeProxy||(d.exposeProxy=new Proxy(iz(XA(d.exposed)),{get(s,E){if(E in s)return s[E];if(E in M2)return M2[E](d)},has(s,E){return E in s||E in M2}})):d.proxy}function xK(d,s=!0){return Vu(d)?d.displayName||d.name:d.name||s&&d.__name}function _K(d){return Vu(d)&&"__vccOpts"in d}const Wo=(d,s)=>pY(d,s,U2);function oM(d,s,E){const R=arguments.length;return R===2?gf(s)&&!au(s)?j2(s)?El(d,null,[s]):El(d,s):El(d,null,s):(R>3?E=Array.prototype.slice.call(arguments,2):R===3&&j2(E)&&(E=[E]),El(d,s,E))}const bK="3.5.18";/** * @vue/runtime-dom v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let fA;const tL=typeof window<"u"&&window.trustedTypes;if(tL)try{fA=tL.createPolicy("vue",{createHTML:d=>d})}catch{}const Hz=fA?d=>fA.createHTML(d):d=>d,iK="http://www.w3.org/2000/svg",aK="http://www.w3.org/1998/Math/MathML",Jg=typeof document<"u"?document:null,eL=Jg&&Jg.createElement("template"),oK={insert:(d,s,E)=>{s.insertBefore(d,E||null)},remove:d=>{const s=d.parentNode;s&&s.removeChild(d)},createElement:(d,s,E,B)=>{const K=s==="svg"?Jg.createElementNS(iK,d):s==="mathml"?Jg.createElementNS(aK,d):E?Jg.createElement(d,{is:E}):Jg.createElement(d);return d==="select"&&B&&B.multiple!=null&&K.setAttribute("multiple",B.multiple),K},createText:d=>Jg.createTextNode(d),createComment:d=>Jg.createComment(d),setText:(d,s)=>{d.nodeValue=s},setElementText:(d,s)=>{d.textContent=s},parentNode:d=>d.parentNode,nextSibling:d=>d.nextSibling,querySelector:d=>Jg.querySelector(d),setScopeId(d,s){d.setAttribute(s,"")},insertStaticContent(d,s,E,B,K,pt){const _t=E?E.previousSibling:s.lastChild;if(K&&(K===pt||K.nextSibling))for(;s.insertBefore(K.cloneNode(!0),E),!(K===pt||!(K=K.nextSibling)););else{eL.innerHTML=Hz(B==="svg"?`${d}`:B==="mathml"?`${d}`:d);const Ot=eL.content;if(B==="svg"||B==="mathml"){const jt=Ot.firstChild;for(;jt.firstChild;)Ot.appendChild(jt.firstChild);Ot.removeChild(jt)}s.insertBefore(Ot,E)}return[_t?_t.nextSibling:s.firstChild,E?E.previousSibling:s.lastChild]}},Jv="transition",Qb="animation",p_=Symbol("_vtc"),Wz={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qz=ap({},fz,Wz),sK=d=>(d.displayName="Transition",d.props=qz,d),$z=sK((d,{slots:s})=>iM(iY,Zz(d),s)),sy=(d,s=[])=>{au(d)?d.forEach(E=>E(...s)):d&&d(...s)},rL=d=>d?au(d)?d.some(s=>s.length>1):d.length>1:!1;function Zz(d){const s={};for(const Pi in d)Pi in Wz||(s[Pi]=d[Pi]);if(d.css===!1)return s;const{name:E="v",type:B,duration:K,enterFromClass:pt=`${E}-enter-from`,enterActiveClass:_t=`${E}-enter-active`,enterToClass:Ot=`${E}-enter-to`,appearFromClass:jt=pt,appearActiveClass:te=_t,appearToClass:he=Ot,leaveFromClass:De=`${E}-leave-from`,leaveActiveClass:er=`${E}-leave-active`,leaveToClass:pr=`${E}-leave-to`}=d,Mr=lK(K),Tr=Mr&&Mr[0],Vr=Mr&&Mr[1],{onBeforeEnter:mn,onEnter:Dt,onEnterCancelled:cn,onLeave:Jn,onLeaveCancelled:Bn,onBeforeAppear:ni=mn,onAppear:Wi=Dt,onAppearCancelled:Un=cn}=s,qr=(Pi,bi,Yi,Ca)=>{Pi._enterCancelled=Ca,e1(Pi,bi?he:Ot),e1(Pi,bi?te:_t),Yi&&Yi()},Di=(Pi,bi)=>{Pi._isLeaving=!1,e1(Pi,De),e1(Pi,pr),e1(Pi,er),bi&&bi()},Fi=Pi=>(bi,Yi)=>{const Ca=Pi?Wi:Dt,Ni=()=>qr(bi,Pi,Yi);sy(Ca,[bi,Ni]),nL(()=>{e1(bi,Pi?jt:pt),og(bi,Pi?he:Ot),rL(Ca)||iL(bi,B,Tr,Ni)})};return ap(s,{onBeforeEnter(Pi){sy(mn,[Pi]),og(Pi,pt),og(Pi,_t)},onBeforeAppear(Pi){sy(ni,[Pi]),og(Pi,jt),og(Pi,te)},onEnter:Fi(!1),onAppear:Fi(!0),onLeave(Pi,bi){Pi._isLeaving=!0;const Yi=()=>Di(Pi,bi);og(Pi,De),Pi._enterCancelled?(og(Pi,er),dA()):(dA(),og(Pi,er)),nL(()=>{Pi._isLeaving&&(e1(Pi,De),og(Pi,pr),rL(Jn)||iL(Pi,B,Vr,Yi))}),sy(Jn,[Pi,Yi])},onEnterCancelled(Pi){qr(Pi,!1,void 0,!0),sy(cn,[Pi])},onAppearCancelled(Pi){qr(Pi,!0,void 0,!0),sy(Un,[Pi])},onLeaveCancelled(Pi){Di(Pi),sy(Bn,[Pi])}})}function lK(d){if(d==null)return null;if(gf(d))return[M8(d.enter),M8(d.leave)];{const s=M8(d);return[s,s]}}function M8(d){return pG(d)}function og(d,s){s.split(/\s+/).forEach(E=>E&&d.classList.add(E)),(d[p_]||(d[p_]=new Set)).add(s)}function e1(d,s){s.split(/\s+/).forEach(B=>B&&d.classList.remove(B));const E=d[p_];E&&(E.delete(s),E.size||(d[p_]=void 0))}function nL(d){requestAnimationFrame(()=>{requestAnimationFrame(d)})}let uK=0;function iL(d,s,E,B){const K=d._endId=++uK,pt=()=>{K===d._endId&&B()};if(E!=null)return setTimeout(pt,E);const{type:_t,timeout:Ot,propCount:jt}=Gz(d,s);if(!_t)return B();const te=_t+"end";let he=0;const De=()=>{d.removeEventListener(te,er),pt()},er=pr=>{pr.target===d&&++he>=jt&&De()};setTimeout(()=>{he(E[Mr]||"").split(", "),K=B(`${Jv}Delay`),pt=B(`${Jv}Duration`),_t=aL(K,pt),Ot=B(`${Qb}Delay`),jt=B(`${Qb}Duration`),te=aL(Ot,jt);let he=null,De=0,er=0;s===Jv?_t>0&&(he=Jv,De=_t,er=pt.length):s===Qb?te>0&&(he=Qb,De=te,er=jt.length):(De=Math.max(_t,te),he=De>0?_t>te?Jv:Qb:null,er=he?he===Jv?pt.length:jt.length:0);const pr=he===Jv&&/\b(transform|all)(,|$)/.test(B(`${Jv}Property`).toString());return{type:he,timeout:De,propCount:er,hasTransform:pr}}function aL(d,s){for(;d.lengthoL(E)+oL(d[B])))}function oL(d){return d==="auto"?0:Number(d.slice(0,-1).replace(",","."))*1e3}function dA(){return document.body.offsetHeight}function cK(d,s,E){const B=d[p_];B&&(s=(s?[s,...B]:[...B]).join(" ")),s==null?d.removeAttribute("class"):E?d.setAttribute("class",s):d.className=s}const m4=Symbol("_vod"),Yz=Symbol("_vsh"),t2={beforeMount(d,{value:s},{transition:E}){d[m4]=d.style.display==="none"?"":d.style.display,E&&s?E.beforeEnter(d):e2(d,s)},mounted(d,{value:s},{transition:E}){E&&s&&E.enter(d)},updated(d,{value:s,oldValue:E},{transition:B}){!s!=!E&&(B?s?(B.beforeEnter(d),e2(d,!0),B.enter(d)):B.leave(d,()=>{e2(d,!1)}):e2(d,s))},beforeUnmount(d,{value:s}){e2(d,s)}};function e2(d,s){d.style.display=s?d[m4]:"none",d[Yz]=!s}const hK=Symbol(""),fK=/(^|;)\s*display\s*:/;function dK(d,s,E){const B=d.style,K=sd(E);let pt=!1;if(E&&!K){if(s)if(sd(s))for(const _t of s.split(";")){const Ot=_t.slice(0,_t.indexOf(":")).trim();E[Ot]==null&&Q5(B,Ot,"")}else for(const _t in s)E[_t]==null&&Q5(B,_t,"");for(const _t in E)_t==="display"&&(pt=!0),Q5(B,_t,E[_t])}else if(K){if(s!==E){const _t=B[hK];_t&&(E+=";"+_t),B.cssText=E,pt=fK.test(E)}}else s&&d.removeAttribute("style");m4 in d&&(d[m4]=pt?B.display:"",d[Yz]&&(B.display="none"))}const sL=/\s*!important$/;function Q5(d,s,E){if(au(E))E.forEach(B=>Q5(d,s,B));else if(E==null&&(E=""),s.startsWith("--"))d.setProperty(s,E);else{const B=pK(d,s);sL.test(E)?d.setProperty(Py(B),E.replace(sL,""),"important"):d[B]=E}}const lL=["Webkit","Moz","ms"],S8={};function pK(d,s){const E=S8[s];if(E)return E;let B=cm(s);if(B!=="filter"&&B in d)return S8[s]=B;B=L4(B);for(let K=0;KE8||(yK.then(()=>E8=0),E8=Date.now());function _K(d,s){const E=B=>{if(!B._vts)B._vts=Date.now();else if(B._vts<=E.attached)return;Lm(bK(B,E.value),s,5,[B])};return E.value=d,E.attached=xK(),E}function bK(d,s){if(au(s)){const E=d.stopImmediatePropagation;return d.stopImmediatePropagation=()=>{E.call(d),d._stopped=!0},s.map(B=>K=>!K._stopped&&B&&B(K))}else return s}const pL=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&d.charCodeAt(2)>96&&d.charCodeAt(2)<123,wK=(d,s,E,B,K,pt)=>{const _t=K==="svg";s==="class"?cK(d,B,_t):s==="style"?dK(d,E,B):S4(s)?NA(s)||gK(d,s,E,B,pt):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):kK(d,s,B,_t))?(hL(d,s,B),!d.tagName.includes("-")&&(s==="value"||s==="checked"||s==="selected")&&cL(d,s,B,_t,pt,s!=="value")):d._isVueCE&&(/[A-Z]/.test(s)||!sd(B))?hL(d,cm(s),B,pt,s):(s==="true-value"?d._trueValue=B:s==="false-value"&&(d._falseValue=B),cL(d,s,B,_t))};function kK(d,s,E,B){if(B)return!!(s==="innerHTML"||s==="textContent"||s in d&&pL(s)&&Vu(E));if(s==="spellcheck"||s==="draggable"||s==="translate"||s==="autocorrect"||s==="form"||s==="list"&&d.tagName==="INPUT"||s==="type"&&d.tagName==="TEXTAREA")return!1;if(s==="width"||s==="height"){const K=d.tagName;if(K==="IMG"||K==="VIDEO"||K==="CANVAS"||K==="SOURCE")return!1}return pL(s)&&sd(E)?!1:s in d}const Kz=new WeakMap,Xz=new WeakMap,g4=Symbol("_moveCb"),mL=Symbol("_enterCb"),TK=d=>(delete d.props.mode,d),AK=TK({name:"TransitionGroup",props:ap({},qz,{tag:String,moveClass:String}),setup(d,{slots:s}){const E=B4(),B=hz();let K,pt;return yz(()=>{if(!K.length)return;const _t=d.moveClass||`${d.name||"v"}-move`;if(!LK(K[0].el,E.vnode.el,_t)){K=[];return}K.forEach(SK),K.forEach(EK);const Ot=K.filter(CK);dA(),Ot.forEach(jt=>{const te=jt.el,he=te.style;og(te,_t),he.transform=he.webkitTransform=he.transitionDuration="";const De=te[g4]=er=>{er&&er.target!==te||(!er||/transform$/.test(er.propertyName))&&(te.removeEventListener("transitionend",De),te[g4]=null,e1(te,_t))};te.addEventListener("transitionend",De)}),K=[]}),()=>{const _t=Uu(d),Ot=Zz(_t);let jt=_t.tag||Pu;if(K=[],pt)for(let te=0;te{Ot.split(/\s+/).forEach(jt=>jt&&B.classList.remove(jt))}),E.split(/\s+/).forEach(Ot=>Ot&&B.classList.add(Ot)),B.style.display="none";const pt=s.nodeType===1?s:s.parentNode;pt.appendChild(B);const{hasTransform:_t}=Gz(B);return pt.removeChild(B),_t}const m_=d=>{const s=d.props["onUpdate:modelValue"]||!1;return au(s)?E=>G5(s,E):s};function PK(d){d.target.composing=!0}function gL(d){const s=d.target;s.composing&&(s.composing=!1,s.dispatchEvent(new Event("input")))}const iv=Symbol("_assign"),aM={created(d,{modifiers:{lazy:s,trim:E,number:B}},K){d[iv]=m_(K);const pt=B||K.props&&K.props.type==="number";u1(d,s?"change":"input",_t=>{if(_t.target.composing)return;let Ot=d.value;E&&(Ot=Ot.trim()),pt&&(Ot=o4(Ot)),d[iv](Ot)}),E&&u1(d,"change",()=>{d.value=d.value.trim()}),s||(u1(d,"compositionstart",PK),u1(d,"compositionend",gL),u1(d,"change",gL))},mounted(d,{value:s}){d.value=s??""},beforeUpdate(d,{value:s,oldValue:E,modifiers:{lazy:B,trim:K,number:pt}},_t){if(d[iv]=m_(_t),d.composing)return;const Ot=(pt||d.type==="number")&&!/^0\d/.test(d.value)?o4(d.value):d.value,jt=s??"";Ot!==jt&&(document.activeElement===d&&d.type!=="range"&&(B&&s===E||K&&d.value.trim()===jt)||(d.value=jt))}},V2={created(d,{value:s},E){d.checked=d_(s,E.props.value),d[iv]=m_(E),u1(d,"change",()=>{d[iv](H2(d))})},beforeUpdate(d,{value:s,oldValue:E},B){d[iv]=m_(B),s!==E&&(d.checked=d_(s,B.props.value))}},pA={deep:!0,created(d,{value:s,modifiers:{number:E}},B){const K=E4(s);u1(d,"change",()=>{const pt=Array.prototype.filter.call(d.options,_t=>_t.selected).map(_t=>E?o4(H2(_t)):H2(_t));d[iv](d.multiple?K?new Set(pt):pt:pt[0]),d._assigning=!0,om(()=>{d._assigning=!1})}),d[iv]=m_(B)},mounted(d,{value:s}){vL(d,s)},beforeUpdate(d,s,E){d[iv]=m_(E)},updated(d,{value:s}){d._assigning||vL(d,s)}};function vL(d,s){const E=d.multiple,B=au(s);if(!(E&&!B&&!E4(s))){for(let K=0,pt=d.options.length;KString(te)===String(Ot)):_t.selected=wG(s,Ot)>-1}else _t.selected=s.has(Ot);else if(d_(H2(_t),s)){d.selectedIndex!==K&&(d.selectedIndex=K);return}}!E&&d.selectedIndex!==-1&&(d.selectedIndex=-1)}}function H2(d){return"_value"in d?d._value:d.value}const IK=["ctrl","shift","alt","meta"],zK={stop:d=>d.stopPropagation(),prevent:d=>d.preventDefault(),self:d=>d.target!==d.currentTarget,ctrl:d=>!d.ctrlKey,shift:d=>!d.shiftKey,alt:d=>!d.altKey,meta:d=>!d.metaKey,left:d=>"button"in d&&d.button!==0,middle:d=>"button"in d&&d.button!==1,right:d=>"button"in d&&d.button!==2,exact:(d,s)=>IK.some(E=>d[`${E}Key`]&&!s.includes(E))},Pm=(d,s)=>{const E=d._withMods||(d._withMods={}),B=s.join(".");return E[B]||(E[B]=(K,...pt)=>{for(let _t=0;_t{const s=DK().createApp(...d),{mount:E}=s;return s.mount=B=>{const K=BK(B);if(!K)return;const pt=s._component;!Vu(pt)&&!pt.render&&!pt.template&&(pt.template=K.innerHTML),K.nodeType===1&&(K.textContent="");const _t=E(K,!1,RK(K));return K instanceof Element&&(K.removeAttribute("v-cloak"),K.setAttribute("data-v-app","")),_t},s};function RK(d){if(d instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&d instanceof MathMLElement)return"mathml"}function BK(d){return sd(d)?document.querySelector(d):d}/*! +**/let mA;const rL=typeof window<"u"&&window.trustedTypes;if(rL)try{mA=rL.createPolicy("vue",{createHTML:d=>d})}catch{}const $z=mA?d=>mA.createHTML(d):d=>d,wK="http://www.w3.org/2000/svg",kK="http://www.w3.org/1998/Math/MathML",Qg=typeof document<"u"?document:null,nL=Qg&&Qg.createElement("template"),TK={insert:(d,s,E)=>{s.insertBefore(d,E||null)},remove:d=>{const s=d.parentNode;s&&s.removeChild(d)},createElement:(d,s,E,R)=>{const Y=s==="svg"?Qg.createElementNS(wK,d):s==="mathml"?Qg.createElementNS(kK,d):E?Qg.createElement(d,{is:E}):Qg.createElement(d);return d==="select"&&R&&R.multiple!=null&&Y.setAttribute("multiple",R.multiple),Y},createText:d=>Qg.createTextNode(d),createComment:d=>Qg.createComment(d),setText:(d,s)=>{d.nodeValue=s},setElementText:(d,s)=>{d.textContent=s},parentNode:d=>d.parentNode,nextSibling:d=>d.nextSibling,querySelector:d=>Qg.querySelector(d),setScopeId(d,s){d.setAttribute(s,"")},insertStaticContent(d,s,E,R,Y,dt){const _t=E?E.previousSibling:s.lastChild;if(Y&&(Y===dt||Y.nextSibling))for(;s.insertBefore(Y.cloneNode(!0),E),!(Y===dt||!(Y=Y.nextSibling)););else{nL.innerHTML=$z(R==="svg"?`${d}`:R==="mathml"?`${d}`:d);const zt=nL.content;if(R==="svg"||R==="mathml"){const jt=zt.firstChild;for(;jt.firstChild;)zt.appendChild(jt.firstChild);zt.removeChild(jt)}s.insertBefore(zt,E)}return[_t?_t.nextSibling:s.firstChild,E?E.previousSibling:s.lastChild]}},t1="transition",t2="animation",m_=Symbol("_vtc"),Zz={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Gz=ap({},mz,Zz),AK=d=>(d.displayName="Transition",d.props=Gz,d),Yz=AK((d,{slots:s})=>oM(wY,Kz(d),s)),uy=(d,s=[])=>{au(d)?d.forEach(E=>E(...s)):d&&d(...s)},iL=d=>d?au(d)?d.some(s=>s.length>1):d.length>1:!1;function Kz(d){const s={};for(const Li in d)Li in Zz||(s[Li]=d[Li]);if(d.css===!1)return s;const{name:E="v",type:R,duration:Y,enterFromClass:dt=`${E}-enter-from`,enterActiveClass:_t=`${E}-enter-active`,enterToClass:zt=`${E}-enter-to`,appearFromClass:jt=dt,appearActiveClass:te=_t,appearToClass:ce=zt,leaveFromClass:Ie=`${E}-leave-from`,leaveActiveClass:Je=`${E}-leave-active`,leaveToClass:fr=`${E}-leave-to`}=d,Ar=MK(Y),kr=Ar&&Ar[0],Vr=Ar&&Ar[1],{onBeforeEnter:fn,onEnter:Dt,onEnterCancelled:cn,onLeave:ti,onLeaveCancelled:Dn,onBeforeAppear:ii=fn,onAppear:Vi=Dt,onAppearCancelled:Nn=cn}=s,Wr=(Li,$n,Hn,sa)=>{Li._enterCancelled=sa,n1(Li,$n?ce:zt),n1(Li,$n?te:_t),Hn&&Hn()},Bi=(Li,$n)=>{Li._isLeaving=!1,n1(Li,Ie),n1(Li,fr),n1(Li,Je),$n&&$n()},Ri=Li=>($n,Hn)=>{const sa=Li?Vi:Dt,Ti=()=>Wr($n,Li,Hn);uy(sa,[$n,Ti]),aL(()=>{n1($n,Li?jt:dt),sg($n,Li?ce:zt),iL(sa)||oL($n,R,kr,Ti)})};return ap(s,{onBeforeEnter(Li){uy(fn,[Li]),sg(Li,dt),sg(Li,_t)},onBeforeAppear(Li){uy(ii,[Li]),sg(Li,jt),sg(Li,te)},onEnter:Ri(!1),onAppear:Ri(!0),onLeave(Li,$n){Li._isLeaving=!0;const Hn=()=>Bi(Li,$n);sg(Li,Ie),Li._enterCancelled?(sg(Li,Je),gA()):(gA(),sg(Li,Je)),aL(()=>{Li._isLeaving&&(n1(Li,Ie),sg(Li,fr),iL(ti)||oL(Li,R,Vr,Hn))}),uy(ti,[Li,Hn])},onEnterCancelled(Li){Wr(Li,!1,void 0,!0),uy(cn,[Li])},onAppearCancelled(Li){Wr(Li,!0,void 0,!0),uy(Nn,[Li])},onLeaveCancelled(Li){Bi(Li),uy(Dn,[Li])}})}function MK(d){if(d==null)return null;if(gf(d))return[S8(d.enter),S8(d.leave)];{const s=S8(d);return[s,s]}}function S8(d){return IG(d)}function sg(d,s){s.split(/\s+/).forEach(E=>E&&d.classList.add(E)),(d[m_]||(d[m_]=new Set)).add(s)}function n1(d,s){s.split(/\s+/).forEach(R=>R&&d.classList.remove(R));const E=d[m_];E&&(E.delete(s),E.size||(d[m_]=void 0))}function aL(d){requestAnimationFrame(()=>{requestAnimationFrame(d)})}let SK=0;function oL(d,s,E,R){const Y=d._endId=++SK,dt=()=>{Y===d._endId&&R()};if(E!=null)return setTimeout(dt,E);const{type:_t,timeout:zt,propCount:jt}=Xz(d,s);if(!_t)return R();const te=_t+"end";let ce=0;const Ie=()=>{d.removeEventListener(te,Je),dt()},Je=fr=>{fr.target===d&&++ce>=jt&&Ie()};setTimeout(()=>{ce(E[Ar]||"").split(", "),Y=R(`${t1}Delay`),dt=R(`${t1}Duration`),_t=sL(Y,dt),zt=R(`${t2}Delay`),jt=R(`${t2}Duration`),te=sL(zt,jt);let ce=null,Ie=0,Je=0;s===t1?_t>0&&(ce=t1,Ie=_t,Je=dt.length):s===t2?te>0&&(ce=t2,Ie=te,Je=jt.length):(Ie=Math.max(_t,te),ce=Ie>0?_t>te?t1:t2:null,Je=ce?ce===t1?dt.length:jt.length:0);const fr=ce===t1&&/\b(transform|all)(,|$)/.test(R(`${t1}Property`).toString());return{type:ce,timeout:Ie,propCount:Je,hasTransform:fr}}function sL(d,s){for(;d.lengthlL(E)+lL(d[R])))}function lL(d){return d==="auto"?0:Number(d.slice(0,-1).replace(",","."))*1e3}function gA(){return document.body.offsetHeight}function EK(d,s,E){const R=d[m_];R&&(s=(s?[s,...R]:[...R]).join(" ")),s==null?d.removeAttribute("class"):E?d.setAttribute("class",s):d.className=s}const g4=Symbol("_vod"),Jz=Symbol("_vsh"),e2={beforeMount(d,{value:s},{transition:E}){d[g4]=d.style.display==="none"?"":d.style.display,E&&s?E.beforeEnter(d):r2(d,s)},mounted(d,{value:s},{transition:E}){E&&s&&E.enter(d)},updated(d,{value:s,oldValue:E},{transition:R}){!s!=!E&&(R?s?(R.beforeEnter(d),r2(d,!0),R.enter(d)):R.leave(d,()=>{r2(d,!1)}):r2(d,s))},beforeUnmount(d,{value:s}){r2(d,s)}};function r2(d,s){d.style.display=s?d[g4]:"none",d[Jz]=!s}const CK=Symbol(""),LK=/(^|;)\s*display\s*:/;function PK(d,s,E){const R=d.style,Y=ld(E);let dt=!1;if(E&&!Y){if(s)if(ld(s))for(const _t of s.split(";")){const zt=_t.slice(0,_t.indexOf(":")).trim();E[zt]==null&&t4(R,zt,"")}else for(const _t in s)E[_t]==null&&t4(R,_t,"");for(const _t in E)_t==="display"&&(dt=!0),t4(R,_t,E[_t])}else if(Y){if(s!==E){const _t=R[CK];_t&&(E+=";"+_t),R.cssText=E,dt=LK.test(E)}}else s&&d.removeAttribute("style");g4 in d&&(d[g4]=dt?R.display:"",d[Jz]&&(R.display="none"))}const uL=/\s*!important$/;function t4(d,s,E){if(au(E))E.forEach(R=>t4(d,s,R));else if(E==null&&(E=""),s.startsWith("--"))d.setProperty(s,E);else{const R=IK(d,s);uL.test(E)?d.setProperty(zy(R),E.replace(uL,""),"important"):d[R]=E}}const cL=["Webkit","Moz","ms"],E8={};function IK(d,s){const E=E8[s];if(E)return E;let R=cm(s);if(R!=="filter"&&R in d)return E8[s]=R;R=I4(R);for(let Y=0;YC8||(FK.then(()=>C8=0),C8=Date.now());function RK(d,s){const E=R=>{if(!R._vts)R._vts=Date.now();else if(R._vts<=E.attached)return;Lm(NK(R,E.value),s,5,[R])};return E.value=d,E.attached=BK(),E}function NK(d,s){if(au(s)){const E=d.stopImmediatePropagation;return d.stopImmediatePropagation=()=>{E.call(d),d._stopped=!0},s.map(R=>Y=>!Y._stopped&&R&&R(Y))}else return s}const gL=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&d.charCodeAt(2)>96&&d.charCodeAt(2)<123,jK=(d,s,E,R,Y,dt)=>{const _t=Y==="svg";s==="class"?EK(d,R,_t):s==="style"?PK(d,E,R):C4(s)?UA(s)||OK(d,s,E,R,dt):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):UK(d,s,R,_t))?(dL(d,s,R),!d.tagName.includes("-")&&(s==="value"||s==="checked"||s==="selected")&&fL(d,s,R,_t,dt,s!=="value")):d._isVueCE&&(/[A-Z]/.test(s)||!ld(R))?dL(d,cm(s),R,dt,s):(s==="true-value"?d._trueValue=R:s==="false-value"&&(d._falseValue=R),fL(d,s,R,_t))};function UK(d,s,E,R){if(R)return!!(s==="innerHTML"||s==="textContent"||s in d&&gL(s)&&Vu(E));if(s==="spellcheck"||s==="draggable"||s==="translate"||s==="autocorrect"||s==="form"||s==="list"&&d.tagName==="INPUT"||s==="type"&&d.tagName==="TEXTAREA")return!1;if(s==="width"||s==="height"){const Y=d.tagName;if(Y==="IMG"||Y==="VIDEO"||Y==="CANVAS"||Y==="SOURCE")return!1}return gL(s)&&ld(E)?!1:s in d}const Qz=new WeakMap,tO=new WeakMap,v4=Symbol("_moveCb"),vL=Symbol("_enterCb"),VK=d=>(delete d.props.mode,d),HK=VK({name:"TransitionGroup",props:ap({},Gz,{tag:String,moveClass:String}),setup(d,{slots:s}){const E=j4(),R=pz();let Y,dt;return bz(()=>{if(!Y.length)return;const _t=d.moveClass||`${d.name||"v"}-move`;if(!GK(Y[0].el,E.vnode.el,_t)){Y=[];return}Y.forEach(qK),Y.forEach($K);const zt=Y.filter(ZK);gA(),zt.forEach(jt=>{const te=jt.el,ce=te.style;sg(te,_t),ce.transform=ce.webkitTransform=ce.transitionDuration="";const Ie=te[v4]=Je=>{Je&&Je.target!==te||(!Je||/transform$/.test(Je.propertyName))&&(te.removeEventListener("transitionend",Ie),te[v4]=null,n1(te,_t))};te.addEventListener("transitionend",Ie)}),Y=[]}),()=>{const _t=Eu(d),zt=Kz(_t);let jt=_t.tag||_u;if(Y=[],dt)for(let te=0;te{zt.split(/\s+/).forEach(jt=>jt&&R.classList.remove(jt))}),E.split(/\s+/).forEach(zt=>zt&&R.classList.add(zt)),R.style.display="none";const dt=s.nodeType===1?s:s.parentNode;dt.appendChild(R);const{hasTransform:_t}=Xz(R);return dt.removeChild(R),_t}const g_=d=>{const s=d.props["onUpdate:modelValue"]||!1;return au(s)?E=>Y5(s,E):s};function YK(d){d.target.composing=!0}function yL(d){const s=d.target;s.composing&&(s.composing=!1,s.dispatchEvent(new Event("input")))}const ov=Symbol("_assign"),sM={created(d,{modifiers:{lazy:s,trim:E,number:R}},Y){d[ov]=g_(Y);const dt=R||Y.props&&Y.props.type==="number";h1(d,s?"change":"input",_t=>{if(_t.target.composing)return;let zt=d.value;E&&(zt=zt.trim()),dt&&(zt=s4(zt)),d[ov](zt)}),E&&h1(d,"change",()=>{d.value=d.value.trim()}),s||(h1(d,"compositionstart",YK),h1(d,"compositionend",yL),h1(d,"change",yL))},mounted(d,{value:s}){d.value=s??""},beforeUpdate(d,{value:s,oldValue:E,modifiers:{lazy:R,trim:Y,number:dt}},_t){if(d[ov]=g_(_t),d.composing)return;const zt=(dt||d.type==="number")&&!/^0\d/.test(d.value)?s4(d.value):d.value,jt=s??"";zt!==jt&&(document.activeElement===d&&d.type!=="range"&&(R&&s===E||Y&&d.value.trim()===jt)||(d.value=jt))}},V2={created(d,{value:s},E){d.checked=p_(s,E.props.value),d[ov]=g_(E),h1(d,"change",()=>{d[ov](H2(d))})},beforeUpdate(d,{value:s,oldValue:E},R){d[ov]=g_(R),s!==E&&(d.checked=p_(s,R.props.value))}},vA={deep:!0,created(d,{value:s,modifiers:{number:E}},R){const Y=L4(s);h1(d,"change",()=>{const dt=Array.prototype.filter.call(d.options,_t=>_t.selected).map(_t=>E?s4(H2(_t)):H2(_t));d[ov](d.multiple?Y?new Set(dt):dt:dt[0]),d._assigning=!0,S0(()=>{d._assigning=!1})}),d[ov]=g_(R)},mounted(d,{value:s}){xL(d,s)},beforeUpdate(d,s,E){d[ov]=g_(E)},updated(d,{value:s}){d._assigning||xL(d,s)}};function xL(d,s){const E=d.multiple,R=au(s);if(!(E&&!R&&!L4(s))){for(let Y=0,dt=d.options.length;YString(te)===String(zt)):_t.selected=jG(s,zt)>-1}else _t.selected=s.has(zt);else if(p_(H2(_t),s)){d.selectedIndex!==Y&&(d.selectedIndex=Y);return}}!E&&d.selectedIndex!==-1&&(d.selectedIndex=-1)}}function H2(d){return"_value"in d?d._value:d.value}const KK=["ctrl","shift","alt","meta"],XK={stop:d=>d.stopPropagation(),prevent:d=>d.preventDefault(),self:d=>d.target!==d.currentTarget,ctrl:d=>!d.ctrlKey,shift:d=>!d.shiftKey,alt:d=>!d.altKey,meta:d=>!d.metaKey,left:d=>"button"in d&&d.button!==0,middle:d=>"button"in d&&d.button!==1,right:d=>"button"in d&&d.button!==2,exact:(d,s)=>KK.some(E=>d[`${E}Key`]&&!s.includes(E))},Pm=(d,s)=>{const E=d._withMods||(d._withMods={}),R=s.join(".");return E[R]||(E[R]=(Y,...dt)=>{for(let _t=0;_t{const s=QK().createApp(...d),{mount:E}=s;return s.mount=R=>{const Y=rX(R);if(!Y)return;const dt=s._component;!Vu(dt)&&!dt.render&&!dt.template&&(dt.template=Y.innerHTML),Y.nodeType===1&&(Y.textContent="");const _t=E(Y,!1,eX(Y));return Y instanceof Element&&(Y.removeAttribute("v-cloak"),Y.setAttribute("data-v-app","")),_t},s};function eX(d){if(d instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&d instanceof MathMLElement)return"mathml"}function rX(d){return ld(d)?document.querySelector(d):d}/*! * pinia v3.0.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Jz;const j4=d=>Jz=d,Qz=Symbol();function mA(d){return d&&typeof d=="object"&&Object.prototype.toString.call(d)==="[object Object]"&&typeof d.toJSON!="function"}var E2;(function(d){d.direct="direct",d.patchObject="patch object",d.patchFunction="patch function"})(E2||(E2={}));function NK(){const d=FI(!0),s=d.run(()=>Ga({}));let E=[],B=[];const K=YA({install(pt){j4(K),K._a=pt,pt.provide(Qz,K),pt.config.globalProperties.$pinia=K,B.forEach(_t=>E.push(_t)),B=[]},use(pt){return this._a?E.push(pt):B.push(pt),this},_p:E,_a:null,_e:d,_s:new Map,state:s});return K}const tO=()=>{};function xL(d,s,E,B=tO){d.add(s);const K=()=>{d.delete(s)&&B()};return!E&&RI()&&kG(K),K}function t_(d,...s){d.forEach(E=>{E(...s)})}const jK=d=>d(),_L=Symbol(),C8=Symbol();function gA(d,s){d instanceof Map&&s instanceof Map?s.forEach((E,B)=>d.set(B,E)):d instanceof Set&&s instanceof Set&&s.forEach(d.add,d);for(const E in s){if(!s.hasOwnProperty(E))continue;const B=s[E],K=d[E];mA(K)&&mA(B)&&d.hasOwnProperty(E)&&!jd(B)&&!m1(B)?d[E]=gA(K,B):d[E]=B}return d}const UK=Symbol();function VK(d){return!mA(d)||!Object.prototype.hasOwnProperty.call(d,UK)}const{assign:r1}=Object;function HK(d){return!!(jd(d)&&d.effect)}function WK(d,s,E,B){const{state:K,actions:pt,getters:_t}=s,Ot=E.state.value[d];let jt;function te(){Ot||(E.state.value[d]=K?K():{});const he=$G(E.state.value[d]);return r1(he,pt,Object.keys(_t||{}).reduce((De,er)=>(De[er]=YA($o(()=>{j4(E);const pr=E._s.get(d);return _t[er].call(pr,pr)})),De),{}))}return jt=eO(d,te,s,E,B,!0),jt}function eO(d,s,E={},B,K,pt){let _t;const Ot=r1({actions:{}},E),jt={deep:!0};let te,he,De=new Set,er=new Set,pr;const Mr=B.state.value[d];!pt&&!Mr&&(B.state.value[d]={}),Ga({});let Tr;function Vr(Un){let qr;te=he=!1,typeof Un=="function"?(Un(B.state.value[d]),qr={type:E2.patchFunction,storeId:d,events:pr}):(gA(B.state.value[d],Un),qr={type:E2.patchObject,payload:Un,storeId:d,events:pr});const Di=Tr=Symbol();om().then(()=>{Tr===Di&&(te=!0)}),he=!0,t_(De,qr,B.state.value[d])}const mn=pt?function(){const{state:qr}=E,Di=qr?qr():{};this.$patch(Fi=>{r1(Fi,Di)})}:tO;function Dt(){_t.stop(),De.clear(),er.clear(),B._s.delete(d)}const cn=(Un,qr="")=>{if(_L in Un)return Un[C8]=qr,Un;const Di=function(){j4(B);const Fi=Array.from(arguments),Pi=new Set,bi=new Set;function Yi(si){Pi.add(si)}function Ca(si){bi.add(si)}t_(er,{args:Fi,name:Di[C8],store:Bn,after:Yi,onError:Ca});let Ni;try{Ni=Un.apply(this&&this.$id===d?this:Bn,Fi)}catch(si){throw t_(bi,si),si}return Ni instanceof Promise?Ni.then(si=>(t_(Pi,si),si)).catch(si=>(t_(bi,si),Promise.reject(si))):(t_(Pi,Ni),Ni)};return Di[_L]=!0,Di[C8]=qr,Di},Jn={_p:B,$id:d,$onAction:xL.bind(null,er),$patch:Vr,$reset:mn,$subscribe(Un,qr={}){const Di=xL(De,Un,qr.detached,()=>Fi()),Fi=_t.run(()=>Em(()=>B.state.value[d],Pi=>{(qr.flush==="sync"?he:te)&&Un({storeId:d,type:E2.direct,events:pr},Pi)},r1({},jt,qr)));return Di},$dispose:Dt},Bn=My(Jn);B._s.set(d,Bn);const Wi=(B._a&&B._a.runWithContext||jK)(()=>B._e.run(()=>(_t=FI()).run(()=>s({action:cn}))));for(const Un in Wi){const qr=Wi[Un];if(jd(qr)&&!HK(qr)||m1(qr))pt||(Mr&&VK(qr)&&(jd(qr)?qr.value=Mr[Un]:gA(qr,Mr[Un])),B.state.value[d][Un]=qr);else if(typeof qr=="function"){const Di=cn(qr,Un);Wi[Un]=Di,Ot.actions[Un]=qr}}return r1(Bn,Wi),r1(Uu(Bn),Wi),Object.defineProperty(Bn,"$state",{get:()=>B.state.value[d],set:Un=>{Vr(qr=>{r1(qr,Un)})}}),B._p.forEach(Un=>{r1(Bn,_t.run(()=>Un({store:Bn,app:B._a,pinia:B,options:Ot})))}),Mr&&pt&&E.hydrate&&E.hydrate(Bn.$state,Mr),te=!0,he=!0,Bn}/*! #__NO_SIDE_EFFECTS__ */function oM(d,s,E){let B;const K=typeof s=="function";B=K?E:s;function pt(_t,Ot){const jt=kY();return _t=_t||(jt?um(Qz,null):null),_t&&j4(_t),_t=Jz,_t._s.has(d)||(K?eO(d,s,B,_t):WK(d,B,_t)),_t._s.get(d)}return pt.$id=d,pt}/*! + */let eO;const V4=d=>eO=d,rO=Symbol();function yA(d){return d&&typeof d=="object"&&Object.prototype.toString.call(d)==="[object Object]"&&typeof d.toJSON!="function"}var E2;(function(d){d.direct="direct",d.patchObject="patch object",d.patchFunction="patch function"})(E2||(E2={}));function nX(){const d=NI(!0),s=d.run(()=>Ha({}));let E=[],R=[];const Y=XA({install(dt){V4(Y),Y._a=dt,dt.provide(rO,Y),dt.config.globalProperties.$pinia=Y,R.forEach(_t=>E.push(_t)),R=[]},use(dt){return this._a?E.push(dt):R.push(dt),this},_p:E,_a:null,_e:d,_s:new Map,state:s});return Y}const nO=()=>{};function bL(d,s,E,R=nO){d.add(s);const Y=()=>{d.delete(s)&&R()};return!E&&jI()&&UG(Y),Y}function r_(d,...s){d.forEach(E=>{E(...s)})}const iX=d=>d(),wL=Symbol(),L8=Symbol();function xA(d,s){d instanceof Map&&s instanceof Map?s.forEach((E,R)=>d.set(R,E)):d instanceof Set&&s instanceof Set&&s.forEach(d.add,d);for(const E in s){if(!s.hasOwnProperty(E))continue;const R=s[E],Y=d[E];yA(Y)&&yA(R)&&d.hasOwnProperty(E)&&!jd(R)&&!v1(R)?d[E]=xA(Y,R):d[E]=R}return d}const aX=Symbol();function oX(d){return!yA(d)||!Object.prototype.hasOwnProperty.call(d,aX)}const{assign:i1}=Object;function sX(d){return!!(jd(d)&&d.effect)}function lX(d,s,E,R){const{state:Y,actions:dt,getters:_t}=s,zt=E.state.value[d];let jt;function te(){zt||(E.state.value[d]=Y?Y():{});const ce=cY(E.state.value[d]);return i1(ce,dt,Object.keys(_t||{}).reduce((Ie,Je)=>(Ie[Je]=XA(Wo(()=>{V4(E);const fr=E._s.get(d);return _t[Je].call(fr,fr)})),Ie),{}))}return jt=iO(d,te,s,E,R,!0),jt}function iO(d,s,E={},R,Y,dt){let _t;const zt=i1({actions:{}},E),jt={deep:!0};let te,ce,Ie=new Set,Je=new Set,fr;const Ar=R.state.value[d];!dt&&!Ar&&(R.state.value[d]={}),Ha({});let kr;function Vr(Nn){let Wr;te=ce=!1,typeof Nn=="function"?(Nn(R.state.value[d]),Wr={type:E2.patchFunction,storeId:d,events:fr}):(xA(R.state.value[d],Nn),Wr={type:E2.patchObject,payload:Nn,storeId:d,events:fr});const Bi=kr=Symbol();S0().then(()=>{kr===Bi&&(te=!0)}),ce=!0,r_(Ie,Wr,R.state.value[d])}const fn=dt?function(){const{state:Wr}=E,Bi=Wr?Wr():{};this.$patch(Ri=>{i1(Ri,Bi)})}:nO;function Dt(){_t.stop(),Ie.clear(),Je.clear(),R._s.delete(d)}const cn=(Nn,Wr="")=>{if(wL in Nn)return Nn[L8]=Wr,Nn;const Bi=function(){V4(R);const Ri=Array.from(arguments),Li=new Set,$n=new Set;function Hn(Qn){Li.add(Qn)}function sa(Qn){$n.add(Qn)}r_(Je,{args:Ri,name:Bi[L8],store:Dn,after:Hn,onError:sa});let Ti;try{Ti=Nn.apply(this&&this.$id===d?this:Dn,Ri)}catch(Qn){throw r_($n,Qn),Qn}return Ti instanceof Promise?Ti.then(Qn=>(r_(Li,Qn),Qn)).catch(Qn=>(r_($n,Qn),Promise.reject(Qn))):(r_(Li,Ti),Ti)};return Bi[wL]=!0,Bi[L8]=Wr,Bi},ti={_p:R,$id:d,$onAction:bL.bind(null,Je),$patch:Vr,$reset:fn,$subscribe(Nn,Wr={}){const Bi=bL(Ie,Nn,Wr.detached,()=>Ri()),Ri=_t.run(()=>Em(()=>R.state.value[d],Li=>{(Wr.flush==="sync"?ce:te)&&Nn({storeId:d,type:E2.direct,events:fr},Li)},i1({},jt,Wr)));return Bi},$dispose:Dt},Dn=Ey(ti);R._s.set(d,Dn);const Vi=(R._a&&R._a.runWithContext||iX)(()=>R._e.run(()=>(_t=NI()).run(()=>s({action:cn}))));for(const Nn in Vi){const Wr=Vi[Nn];if(jd(Wr)&&!sX(Wr)||v1(Wr))dt||(Ar&&oX(Wr)&&(jd(Wr)?Wr.value=Ar[Nn]:xA(Wr,Ar[Nn])),R.state.value[d][Nn]=Wr);else if(typeof Wr=="function"){const Bi=cn(Wr,Nn);Vi[Nn]=Bi,zt.actions[Nn]=Wr}}return i1(Dn,Vi),i1(Eu(Dn),Vi),Object.defineProperty(Dn,"$state",{get:()=>R.state.value[d],set:Nn=>{Vr(Wr=>{i1(Wr,Nn)})}}),R._p.forEach(Nn=>{i1(Dn,_t.run(()=>Nn({store:Dn,app:R._a,pinia:R,options:zt})))}),Ar&&dt&&E.hydrate&&E.hydrate(Dn.$state,Ar),te=!0,ce=!0,Dn}/*! #__NO_SIDE_EFFECTS__ */function lM(d,s,E){let R;const Y=typeof s=="function";R=Y?E:s;function dt(_t,zt){const jt=UY();return _t=_t||(jt?um(rO,null):null),_t&&V4(_t),_t=eO,_t._s.has(d)||(Y?iO(d,s,R,_t):lX(d,R,_t)),_t._s.get(d)}return dt.$id=d,dt}/*! * vue-router v4.6.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const a_=typeof document<"u";function rO(d){return typeof d=="object"||"displayName"in d||"props"in d||"__vccOpts"in d}function qK(d){return d.__esModule||d[Symbol.toStringTag]==="Module"||d.default&&rO(d.default)}const Fh=Object.assign;function L8(d,s){const E={};for(const B in s){const K=s[B];E[B]=Im(K)?K.map(d):d(K)}return E}const C2=()=>{},Im=Array.isArray;function bL(d,s){const E={};for(const B in d)E[B]=B in s?s[B]:d[B];return E}const nO=/#/g,$K=/&/g,ZK=/\//g,GK=/=/g,YK=/\?/g,iO=/\+/g,KK=/%5B/g,XK=/%5D/g,aO=/%5E/g,JK=/%60/g,oO=/%7B/g,QK=/%7C/g,sO=/%7D/g,tX=/%20/g;function sM(d){return d==null?"":encodeURI(""+d).replace(QK,"|").replace(KK,"[").replace(XK,"]")}function eX(d){return sM(d).replace(oO,"{").replace(sO,"}").replace(aO,"^")}function vA(d){return sM(d).replace(iO,"%2B").replace(tX,"+").replace(nO,"%23").replace($K,"%26").replace(JK,"`").replace(oO,"{").replace(sO,"}").replace(aO,"^")}function rX(d){return vA(d).replace(GK,"%3D")}function nX(d){return sM(d).replace(nO,"%23").replace(YK,"%3F")}function iX(d){return nX(d).replace(ZK,"%2F")}function W2(d){if(d==null)return null;try{return decodeURIComponent(""+d)}catch{}return""+d}const aX=/\/$/,oX=d=>d.replace(aX,"");function P8(d,s,E="/"){let B,K={},pt="",_t="";const Ot=s.indexOf("#");let jt=s.indexOf("?");return jt=Ot>=0&&jt>Ot?-1:jt,jt>=0&&(B=s.slice(0,jt),pt=s.slice(jt,Ot>0?Ot:s.length),K=d(pt.slice(1))),Ot>=0&&(B=B||s.slice(0,Ot),_t=s.slice(Ot,s.length)),B=cX(B??s,E),{fullPath:B+pt+_t,path:B,query:K,hash:W2(_t)}}function sX(d,s){const E=s.query?d(s.query):"";return s.path+(E&&"?")+E+(s.hash||"")}function wL(d,s){return!s||!d.toLowerCase().startsWith(s.toLowerCase())?d:d.slice(s.length)||"/"}function lX(d,s,E){const B=s.matched.length-1,K=E.matched.length-1;return B>-1&&B===K&&g_(s.matched[B],E.matched[K])&&lO(s.params,E.params)&&d(s.query)===d(E.query)&&s.hash===E.hash}function g_(d,s){return(d.aliasOf||d)===(s.aliasOf||s)}function lO(d,s){if(Object.keys(d).length!==Object.keys(s).length)return!1;for(const E in d)if(!uX(d[E],s[E]))return!1;return!0}function uX(d,s){return Im(d)?kL(d,s):Im(s)?kL(s,d):d===s}function kL(d,s){return Im(s)?d.length===s.length&&d.every((E,B)=>E===s[B]):d.length===1&&d[0]===s}function cX(d,s){if(d.startsWith("/"))return d;if(!d)return s;const E=s.split("/"),B=d.split("/"),K=B[B.length-1];(K===".."||K===".")&&B.push("");let pt=E.length-1,_t,Ot;for(_t=0;_t1&&pt--;else break;return E.slice(0,pt).join("/")+"/"+B.slice(_t).join("/")}const Qv={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let yA=function(d){return d.pop="pop",d.push="push",d}({}),I8=function(d){return d.back="back",d.forward="forward",d.unknown="",d}({});function hX(d){if(!d)if(a_){const s=document.querySelector("base");d=s&&s.getAttribute("href")||"/",d=d.replace(/^\w+:\/\/[^\/]+/,"")}else d="/";return d[0]!=="/"&&d[0]!=="#"&&(d="/"+d),oX(d)}const fX=/^[^#]+#/;function dX(d,s){return d.replace(fX,"#")+s}function pX(d,s){const E=document.documentElement.getBoundingClientRect(),B=d.getBoundingClientRect();return{behavior:s.behavior,left:B.left-E.left-(s.left||0),top:B.top-E.top-(s.top||0)}}const U4=()=>({left:window.scrollX,top:window.scrollY});function mX(d){let s;if("el"in d){const E=d.el,B=typeof E=="string"&&E.startsWith("#"),K=typeof E=="string"?B?document.getElementById(E.slice(1)):document.querySelector(E):E;if(!K)return;s=pX(K,d)}else s=d;"scrollBehavior"in document.documentElement.style?window.scrollTo(s):window.scrollTo(s.left!=null?s.left:window.scrollX,s.top!=null?s.top:window.scrollY)}function TL(d,s){return(history.state?history.state.position-s:-1)+d}const xA=new Map;function gX(d,s){xA.set(d,s)}function vX(d){const s=xA.get(d);return xA.delete(d),s}function yX(d){return typeof d=="string"||d&&typeof d=="object"}function uO(d){return typeof d=="string"||typeof d=="symbol"}let xd=function(d){return d[d.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",d[d.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",d[d.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",d[d.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",d[d.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",d}({});const cO=Symbol("");xd.MATCHER_NOT_FOUND+"",xd.NAVIGATION_GUARD_REDIRECT+"",xd.NAVIGATION_ABORTED+"",xd.NAVIGATION_CANCELLED+"",xd.NAVIGATION_DUPLICATED+"";function v_(d,s){return Fh(new Error,{type:d,[cO]:!0},s)}function Gg(d,s){return d instanceof Error&&cO in d&&(s==null||!!(d.type&s))}const xX=["params","query","hash"];function _X(d){if(typeof d=="string")return d;if(d.path!=null)return d.path;const s={};for(const E of xX)E in d&&(s[E]=d[E]);return JSON.stringify(s,null,2)}function bX(d){const s={};if(d===""||d==="?")return s;const E=(d[0]==="?"?d.slice(1):d).split("&");for(let B=0;BK&&vA(K)):[B&&vA(B)]).forEach(K=>{K!==void 0&&(s+=(s.length?"&":"")+E,K!=null&&(s+="="+K))})}return s}function wX(d){const s={};for(const E in d){const B=d[E];B!==void 0&&(s[E]=Im(B)?B.map(K=>K==null?null:""+K):B==null?B:""+B)}return s}const kX=Symbol(""),ML=Symbol(""),V4=Symbol(""),lM=Symbol(""),_A=Symbol("");function r2(){let d=[];function s(B){return d.push(B),()=>{const K=d.indexOf(B);K>-1&&d.splice(K,1)}}function E(){d=[]}return{add:s,list:()=>d.slice(),reset:E}}function s1(d,s,E,B,K,pt=_t=>_t()){const _t=B&&(B.enterCallbacks[K]=B.enterCallbacks[K]||[]);return()=>new Promise((Ot,jt)=>{const te=er=>{er===!1?jt(v_(xd.NAVIGATION_ABORTED,{from:E,to:s})):er instanceof Error?jt(er):yX(er)?jt(v_(xd.NAVIGATION_GUARD_REDIRECT,{from:s,to:er})):(_t&&B.enterCallbacks[K]===_t&&typeof er=="function"&&_t.push(er),Ot())},he=pt(()=>d.call(B&&B.instances[K],s,E,te));let De=Promise.resolve(he);d.length<3&&(De=De.then(te)),De.catch(er=>jt(er))})}function z8(d,s,E,B,K=pt=>pt()){const pt=[];for(const _t of d)for(const Ot in _t.components){let jt=_t.components[Ot];if(!(s!=="beforeRouteEnter"&&!_t.instances[Ot]))if(rO(jt)){const te=(jt.__vccOpts||jt)[s];te&&pt.push(s1(te,E,B,_t,Ot,K))}else{let te=jt();pt.push(()=>te.then(he=>{if(!he)throw new Error(`Couldn't resolve component "${Ot}" at "${_t.path}"`);const De=qK(he)?he.default:he;_t.mods[Ot]=he,_t.components[Ot]=De;const er=(De.__vccOpts||De)[s];return er&&s1(er,E,B,_t,Ot,K)()}))}}return pt}function TX(d,s){const E=[],B=[],K=[],pt=Math.max(s.matched.length,d.matched.length);for(let _t=0;_tg_(te,Ot))?B.push(Ot):E.push(Ot));const jt=d.matched[_t];jt&&(s.matched.find(te=>g_(te,jt))||K.push(jt))}return[E,B,K]}/*! + */const s_=typeof document<"u";function aO(d){return typeof d=="object"||"displayName"in d||"props"in d||"__vccOpts"in d}function uX(d){return d.__esModule||d[Symbol.toStringTag]==="Module"||d.default&&aO(d.default)}const Bh=Object.assign;function P8(d,s){const E={};for(const R in s){const Y=s[R];E[R]=Im(Y)?Y.map(d):d(Y)}return E}const C2=()=>{},Im=Array.isArray;function kL(d,s){const E={};for(const R in d)E[R]=R in s?s[R]:d[R];return E}const oO=/#/g,cX=/&/g,hX=/\//g,fX=/=/g,dX=/\?/g,sO=/\+/g,pX=/%5B/g,mX=/%5D/g,lO=/%5E/g,gX=/%60/g,uO=/%7B/g,vX=/%7C/g,cO=/%7D/g,yX=/%20/g;function uM(d){return d==null?"":encodeURI(""+d).replace(vX,"|").replace(pX,"[").replace(mX,"]")}function xX(d){return uM(d).replace(uO,"{").replace(cO,"}").replace(lO,"^")}function _A(d){return uM(d).replace(sO,"%2B").replace(yX,"+").replace(oO,"%23").replace(cX,"%26").replace(gX,"`").replace(uO,"{").replace(cO,"}").replace(lO,"^")}function _X(d){return _A(d).replace(fX,"%3D")}function bX(d){return uM(d).replace(oO,"%23").replace(dX,"%3F")}function wX(d){return bX(d).replace(hX,"%2F")}function W2(d){if(d==null)return null;try{return decodeURIComponent(""+d)}catch{}return""+d}const kX=/\/$/,TX=d=>d.replace(kX,"");function I8(d,s,E="/"){let R,Y={},dt="",_t="";const zt=s.indexOf("#");let jt=s.indexOf("?");return jt=zt>=0&&jt>zt?-1:jt,jt>=0&&(R=s.slice(0,jt),dt=s.slice(jt,zt>0?zt:s.length),Y=d(dt.slice(1))),zt>=0&&(R=R||s.slice(0,zt),_t=s.slice(zt,s.length)),R=EX(R??s,E),{fullPath:R+dt+_t,path:R,query:Y,hash:W2(_t)}}function AX(d,s){const E=s.query?d(s.query):"";return s.path+(E&&"?")+E+(s.hash||"")}function TL(d,s){return!s||!d.toLowerCase().startsWith(s.toLowerCase())?d:d.slice(s.length)||"/"}function MX(d,s,E){const R=s.matched.length-1,Y=E.matched.length-1;return R>-1&&R===Y&&v_(s.matched[R],E.matched[Y])&&hO(s.params,E.params)&&d(s.query)===d(E.query)&&s.hash===E.hash}function v_(d,s){return(d.aliasOf||d)===(s.aliasOf||s)}function hO(d,s){if(Object.keys(d).length!==Object.keys(s).length)return!1;for(const E in d)if(!SX(d[E],s[E]))return!1;return!0}function SX(d,s){return Im(d)?AL(d,s):Im(s)?AL(s,d):d===s}function AL(d,s){return Im(s)?d.length===s.length&&d.every((E,R)=>E===s[R]):d.length===1&&d[0]===s}function EX(d,s){if(d.startsWith("/"))return d;if(!d)return s;const E=s.split("/"),R=d.split("/"),Y=R[R.length-1];(Y===".."||Y===".")&&R.push("");let dt=E.length-1,_t,zt;for(_t=0;_t1&&dt--;else break;return E.slice(0,dt).join("/")+"/"+R.slice(_t).join("/")}const e1={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let bA=function(d){return d.pop="pop",d.push="push",d}({}),z8=function(d){return d.back="back",d.forward="forward",d.unknown="",d}({});function CX(d){if(!d)if(s_){const s=document.querySelector("base");d=s&&s.getAttribute("href")||"/",d=d.replace(/^\w+:\/\/[^\/]+/,"")}else d="/";return d[0]!=="/"&&d[0]!=="#"&&(d="/"+d),TX(d)}const LX=/^[^#]+#/;function PX(d,s){return d.replace(LX,"#")+s}function IX(d,s){const E=document.documentElement.getBoundingClientRect(),R=d.getBoundingClientRect();return{behavior:s.behavior,left:R.left-E.left-(s.left||0),top:R.top-E.top-(s.top||0)}}const H4=()=>({left:window.scrollX,top:window.scrollY});function zX(d){let s;if("el"in d){const E=d.el,R=typeof E=="string"&&E.startsWith("#"),Y=typeof E=="string"?R?document.getElementById(E.slice(1)):document.querySelector(E):E;if(!Y)return;s=IX(Y,d)}else s=d;"scrollBehavior"in document.documentElement.style?window.scrollTo(s):window.scrollTo(s.left!=null?s.left:window.scrollX,s.top!=null?s.top:window.scrollY)}function ML(d,s){return(history.state?history.state.position-s:-1)+d}const wA=new Map;function OX(d,s){wA.set(d,s)}function DX(d){const s=wA.get(d);return wA.delete(d),s}function FX(d){return typeof d=="string"||d&&typeof d=="object"}function fO(d){return typeof d=="string"||typeof d=="symbol"}let xd=function(d){return d[d.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",d[d.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",d[d.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",d[d.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",d[d.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",d}({});const dO=Symbol("");xd.MATCHER_NOT_FOUND+"",xd.NAVIGATION_GUARD_REDIRECT+"",xd.NAVIGATION_ABORTED+"",xd.NAVIGATION_CANCELLED+"",xd.NAVIGATION_DUPLICATED+"";function y_(d,s){return Bh(new Error,{type:d,[dO]:!0},s)}function Yg(d,s){return d instanceof Error&&dO in d&&(s==null||!!(d.type&s))}const BX=["params","query","hash"];function RX(d){if(typeof d=="string")return d;if(d.path!=null)return d.path;const s={};for(const E of BX)E in d&&(s[E]=d[E]);return JSON.stringify(s,null,2)}function NX(d){const s={};if(d===""||d==="?")return s;const E=(d[0]==="?"?d.slice(1):d).split("&");for(let R=0;RY&&_A(Y)):[R&&_A(R)]).forEach(Y=>{Y!==void 0&&(s+=(s.length?"&":"")+E,Y!=null&&(s+="="+Y))})}return s}function jX(d){const s={};for(const E in d){const R=d[E];R!==void 0&&(s[E]=Im(R)?R.map(Y=>Y==null?null:""+Y):R==null?R:""+R)}return s}const UX=Symbol(""),EL=Symbol(""),W4=Symbol(""),cM=Symbol(""),kA=Symbol("");function n2(){let d=[];function s(R){return d.push(R),()=>{const Y=d.indexOf(R);Y>-1&&d.splice(Y,1)}}function E(){d=[]}return{add:s,list:()=>d.slice(),reset:E}}function u1(d,s,E,R,Y,dt=_t=>_t()){const _t=R&&(R.enterCallbacks[Y]=R.enterCallbacks[Y]||[]);return()=>new Promise((zt,jt)=>{const te=Je=>{Je===!1?jt(y_(xd.NAVIGATION_ABORTED,{from:E,to:s})):Je instanceof Error?jt(Je):FX(Je)?jt(y_(xd.NAVIGATION_GUARD_REDIRECT,{from:s,to:Je})):(_t&&R.enterCallbacks[Y]===_t&&typeof Je=="function"&&_t.push(Je),zt())},ce=dt(()=>d.call(R&&R.instances[Y],s,E,te));let Ie=Promise.resolve(ce);d.length<3&&(Ie=Ie.then(te)),Ie.catch(Je=>jt(Je))})}function O8(d,s,E,R,Y=dt=>dt()){const dt=[];for(const _t of d)for(const zt in _t.components){let jt=_t.components[zt];if(!(s!=="beforeRouteEnter"&&!_t.instances[zt]))if(aO(jt)){const te=(jt.__vccOpts||jt)[s];te&&dt.push(u1(te,E,R,_t,zt,Y))}else{let te=jt();dt.push(()=>te.then(ce=>{if(!ce)throw new Error(`Couldn't resolve component "${zt}" at "${_t.path}"`);const Ie=uX(ce)?ce.default:ce;_t.mods[zt]=ce,_t.components[zt]=Ie;const Je=(Ie.__vccOpts||Ie)[s];return Je&&u1(Je,E,R,_t,zt,Y)()}))}}return dt}function VX(d,s){const E=[],R=[],Y=[],dt=Math.max(s.matched.length,d.matched.length);for(let _t=0;_tv_(te,zt))?R.push(zt):E.push(zt));const jt=d.matched[_t];jt&&(s.matched.find(te=>v_(te,jt))||Y.push(jt))}return[E,R,Y]}/*! * vue-router v4.6.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let AX=()=>location.protocol+"//"+location.host;function hO(d,s){const{pathname:E,search:B,hash:K}=s,pt=d.indexOf("#");if(pt>-1){let _t=K.includes(d.slice(pt))?d.slice(pt).length:1,Ot=K.slice(_t);return Ot[0]!=="/"&&(Ot="/"+Ot),wL(Ot,"")}return wL(E,d)+B+K}function MX(d,s,E,B){let K=[],pt=[],_t=null;const Ot=({state:er})=>{const pr=hO(d,location),Mr=E.value,Tr=s.value;let Vr=0;if(er){if(E.value=pr,s.value=er,_t&&_t===Mr){_t=null;return}Vr=Tr?er.position-Tr.position:0}else B(pr);K.forEach(mn=>{mn(E.value,Mr,{delta:Vr,type:yA.pop,direction:Vr?Vr>0?I8.forward:I8.back:I8.unknown})})};function jt(){_t=E.value}function te(er){K.push(er);const pr=()=>{const Mr=K.indexOf(er);Mr>-1&&K.splice(Mr,1)};return pt.push(pr),pr}function he(){if(document.visibilityState==="hidden"){const{history:er}=window;if(!er.state)return;er.replaceState(Fh({},er.state,{scroll:U4()}),"")}}function De(){for(const er of pt)er();pt=[],window.removeEventListener("popstate",Ot),window.removeEventListener("pagehide",he),document.removeEventListener("visibilitychange",he)}return window.addEventListener("popstate",Ot),window.addEventListener("pagehide",he),document.addEventListener("visibilitychange",he),{pauseListeners:jt,listen:te,destroy:De}}function SL(d,s,E,B=!1,K=!1){return{back:d,current:s,forward:E,replaced:B,position:window.history.length,scroll:K?U4():null}}function SX(d){const{history:s,location:E}=window,B={value:hO(d,E)},K={value:s.state};K.value||pt(B.value,{back:null,current:B.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function pt(jt,te,he){const De=d.indexOf("#"),er=De>-1?(E.host&&document.querySelector("base")?d:d.slice(De))+jt:AX()+d+jt;try{s[he?"replaceState":"pushState"](te,"",er),K.value=te}catch(pr){console.error(pr),E[he?"replace":"assign"](er)}}function _t(jt,te){pt(jt,Fh({},s.state,SL(K.value.back,jt,K.value.forward,!0),te,{position:K.value.position}),!0),B.value=jt}function Ot(jt,te){const he=Fh({},K.value,s.state,{forward:jt,scroll:U4()});pt(he.current,he,!0),pt(jt,Fh({},SL(B.value,jt,null),{position:he.position+1},te),!1),B.value=jt}return{location:B,state:K,push:Ot,replace:_t}}function EX(d){d=hX(d);const s=SX(d),E=MX(d,s.state,s.location,s.replace);function B(pt,_t=!0){_t||E.pauseListeners(),history.go(pt)}const K=Fh({location:"",base:d,go:B,createHref:dX.bind(null,d)},s,E);return Object.defineProperty(K,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(K,"state",{enumerable:!0,get:()=>s.state.value}),K}let xy=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.Group=2]="Group",d}({});var np=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.ParamRegExp=2]="ParamRegExp",d[d.ParamRegExpEnd=3]="ParamRegExpEnd",d[d.EscapeNext=4]="EscapeNext",d}(np||{});const CX={type:xy.Static,value:""},LX=/[a-zA-Z0-9_]/;function PX(d){if(!d)return[[]];if(d==="/")return[[CX]];if(!d.startsWith("/"))throw new Error(`Invalid path "${d}"`);function s(pr){throw new Error(`ERR (${E})/"${te}": ${pr}`)}let E=np.Static,B=E;const K=[];let pt;function _t(){pt&&K.push(pt),pt=[]}let Ot=0,jt,te="",he="";function De(){te&&(E===np.Static?pt.push({type:xy.Static,value:te}):E===np.Param||E===np.ParamRegExp||E===np.ParamRegExpEnd?(pt.length>1&&(jt==="*"||jt==="+")&&s(`A repeatable param (${te}) must be alone in its segment. eg: '/:ids+.`),pt.push({type:xy.Param,value:te,regexp:he,repeatable:jt==="*"||jt==="+",optional:jt==="*"||jt==="?"})):s("Invalid state to consume buffer"),te="")}function er(){te+=jt}for(;Ots.length?s.length===1&&s[0]===h0.Static+h0.Segment?1:-1:0}function fO(d,s){let E=0;const B=d.score,K=s.score;for(;E0&&s[s.length-1]<0}const FX={strict:!1,end:!0,sensitive:!1};function RX(d,s,E){const B=OX(PX(d.path),E),K=Fh(B,{record:d,parent:s,children:[],alias:[]});return s&&!K.record.aliasOf==!s.record.aliasOf&&s.children.push(K),K}function BX(d,s){const E=[],B=new Map;s=bL(FX,s);function K(De){return B.get(De)}function pt(De,er,pr){const Mr=!pr,Tr=PL(De);Tr.aliasOf=pr&&pr.record;const Vr=bL(s,De),mn=[Tr];if("alias"in De){const Jn=typeof De.alias=="string"?[De.alias]:De.alias;for(const Bn of Jn)mn.push(PL(Fh({},Tr,{components:pr?pr.record.components:Tr.components,path:Bn,aliasOf:pr?pr.record:Tr})))}let Dt,cn;for(const Jn of mn){const{path:Bn}=Jn;if(er&&Bn[0]!=="/"){const ni=er.record.path,Wi=ni[ni.length-1]==="/"?"":"/";Jn.path=er.record.path+(Bn&&Wi+Bn)}if(Dt=RX(Jn,er,Vr),pr?pr.alias.push(Dt):(cn=cn||Dt,cn!==Dt&&cn.alias.push(Dt),Mr&&De.name&&!IL(Dt)&&_t(De.name)),dO(Dt)&&jt(Dt),Tr.children){const ni=Tr.children;for(let Wi=0;Wi{_t(cn)}:C2}function _t(De){if(uO(De)){const er=B.get(De);er&&(B.delete(De),E.splice(E.indexOf(er),1),er.children.forEach(_t),er.alias.forEach(_t))}else{const er=E.indexOf(De);er>-1&&(E.splice(er,1),De.record.name&&B.delete(De.record.name),De.children.forEach(_t),De.alias.forEach(_t))}}function Ot(){return E}function jt(De){const er=UX(De,E);E.splice(er,0,De),De.record.name&&!IL(De)&&B.set(De.record.name,De)}function te(De,er){let pr,Mr={},Tr,Vr;if("name"in De&&De.name){if(pr=B.get(De.name),!pr)throw v_(xd.MATCHER_NOT_FOUND,{location:De});Vr=pr.record.name,Mr=Fh(LL(er.params,pr.keys.filter(cn=>!cn.optional).concat(pr.parent?pr.parent.keys.filter(cn=>cn.optional):[]).map(cn=>cn.name)),De.params&&LL(De.params,pr.keys.map(cn=>cn.name))),Tr=pr.stringify(Mr)}else if(De.path!=null)Tr=De.path,pr=E.find(cn=>cn.re.test(Tr)),pr&&(Mr=pr.parse(Tr),Vr=pr.record.name);else{if(pr=er.name?B.get(er.name):E.find(cn=>cn.re.test(er.path)),!pr)throw v_(xd.MATCHER_NOT_FOUND,{location:De,currentLocation:er});Vr=pr.record.name,Mr=Fh({},er.params,De.params),Tr=pr.stringify(Mr)}const mn=[];let Dt=pr;for(;Dt;)mn.unshift(Dt.record),Dt=Dt.parent;return{name:Vr,path:Tr,params:Mr,matched:mn,meta:jX(mn)}}d.forEach(De=>pt(De));function he(){E.length=0,B.clear()}return{addRoute:pt,resolve:te,removeRoute:_t,clearRoutes:he,getRoutes:Ot,getRecordMatcher:K}}function LL(d,s){const E={};for(const B of s)B in d&&(E[B]=d[B]);return E}function PL(d){const s={path:d.path,redirect:d.redirect,name:d.name,meta:d.meta||{},aliasOf:d.aliasOf,beforeEnter:d.beforeEnter,props:NX(d),children:d.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in d?d.components||null:d.component&&{default:d.component}};return Object.defineProperty(s,"mods",{value:{}}),s}function NX(d){const s={},E=d.props||!1;if("component"in d)s.default=E;else for(const B in d.components)s[B]=typeof E=="object"?E[B]:E;return s}function IL(d){for(;d;){if(d.record.aliasOf)return!0;d=d.parent}return!1}function jX(d){return d.reduce((s,E)=>Fh(s,E.meta),{})}function UX(d,s){let E=0,B=s.length;for(;E!==B;){const pt=E+B>>1;fO(d,s[pt])<0?B=pt:E=pt+1}const K=VX(d);return K&&(B=s.lastIndexOf(K,B-1)),B}function VX(d){let s=d;for(;s=s.parent;)if(dO(s)&&fO(d,s)===0)return s}function dO({record:d}){return!!(d.name||d.components&&Object.keys(d.components).length||d.redirect)}function zL(d){const s=um(V4),E=um(lM),B=$o(()=>{const jt=zl(d.to);return s.resolve(jt)}),K=$o(()=>{const{matched:jt}=B.value,{length:te}=jt,he=jt[te-1],De=E.matched;if(!he||!De.length)return-1;const er=De.findIndex(g_.bind(null,he));if(er>-1)return er;const pr=OL(jt[te-2]);return te>1&&OL(he)===pr&&De[De.length-1].path!==pr?De.findIndex(g_.bind(null,jt[te-2])):er}),pt=$o(()=>K.value>-1&&ZX(E.params,B.value.params)),_t=$o(()=>K.value>-1&&K.value===E.matched.length-1&&lO(E.params,B.value.params));function Ot(jt={}){if($X(jt)){const te=s[zl(d.replace)?"replace":"push"](zl(d.to)).catch(C2);return d.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>te),te}return Promise.resolve()}return{route:B,href:$o(()=>B.value.href),isActive:pt,isExactActive:_t,navigate:Ot}}function HX(d){return d.length===1?d[0]:d}const WX=Dc({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:zL,setup(d,{slots:s}){const E=My(zL(d)),{options:B}=um(V4),K=$o(()=>({[DL(d.activeClass,B.linkActiveClass,"router-link-active")]:E.isActive,[DL(d.exactActiveClass,B.linkExactActiveClass,"router-link-exact-active")]:E.isExactActive}));return()=>{const pt=s.default&&HX(s.default(E));return d.custom?pt:iM("a",{"aria-current":E.isExactActive?d.ariaCurrentValue:null,href:E.href,onClick:E.navigate,class:K.value},pt)}}}),qX=WX;function $X(d){if(!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)&&!d.defaultPrevented&&!(d.button!==void 0&&d.button!==0)){if(d.currentTarget&&d.currentTarget.getAttribute){const s=d.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(s))return}return d.preventDefault&&d.preventDefault(),!0}}function ZX(d,s){for(const E in s){const B=s[E],K=d[E];if(typeof B=="string"){if(B!==K)return!1}else if(!Im(K)||K.length!==B.length||B.some((pt,_t)=>pt!==K[_t]))return!1}return!0}function OL(d){return d?d.aliasOf?d.aliasOf.path:d.path:""}const DL=(d,s,E)=>d??s??E,GX=Dc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(d,{attrs:s,slots:E}){const B=um(_A),K=$o(()=>d.route||B.value),pt=um(ML,0),_t=$o(()=>{let te=zl(pt);const{matched:he}=K.value;let De;for(;(De=he[te])&&!De.components;)te++;return te}),Ot=$o(()=>K.value.matched[_t.value]);K5(ML,$o(()=>_t.value+1)),K5(kX,Ot),K5(_A,K);const jt=Ga();return Em(()=>[jt.value,Ot.value,d.name],([te,he,De],[er,pr,Mr])=>{he&&(he.instances[De]=te,pr&&pr!==he&&te&&te===er&&(he.leaveGuards.size||(he.leaveGuards=pr.leaveGuards),he.updateGuards.size||(he.updateGuards=pr.updateGuards))),te&&he&&(!pr||!g_(he,pr)||!er)&&(he.enterCallbacks[De]||[]).forEach(Tr=>Tr(te))},{flush:"post"}),()=>{const te=K.value,he=d.name,De=Ot.value,er=De&&De.components[he];if(!er)return FL(E.default,{Component:er,route:te});const pr=De.props[he],Mr=pr?pr===!0?te.params:typeof pr=="function"?pr(te):pr:null,Vr=iM(er,Fh({},Mr,s,{onVnodeUnmounted:mn=>{mn.component.isUnmounted&&(De.instances[he]=null)},ref:jt}));return FL(E.default,{Component:Vr,route:te})||Vr}}});function FL(d,s){if(!d)return null;const E=d(s);return E.length===1?E[0]:E}const YX=GX;function KX(d){const s=BX(d.routes,d),E=d.parseQuery||bX,B=d.stringifyQuery||AL,K=d.history,pt=r2(),_t=r2(),Ot=r2(),jt=HG(Qv);let te=Qv;a_&&d.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const he=L8.bind(null,da=>""+da),De=L8.bind(null,iX),er=L8.bind(null,W2);function pr(da,no){let po,us;return uO(da)?(po=s.getRecordMatcher(da),us=no):us=da,s.addRoute(us,po)}function Mr(da){const no=s.getRecordMatcher(da);no&&s.removeRoute(no)}function Tr(){return s.getRoutes().map(da=>da.record)}function Vr(da){return!!s.getRecordMatcher(da)}function mn(da,no){if(no=Fh({},no||jt.value),typeof da=="string"){const hi=P8(E,da,no.path),go=s.resolve({path:hi.path},no),Mo=K.createHref(hi.fullPath);return Fh(hi,go,{params:er(go.params),hash:W2(hi.hash),redirectedFrom:void 0,href:Mo})}let po;if(da.path!=null)po=Fh({},da,{path:P8(E,da.path,no.path).path});else{const hi=Fh({},da.params);for(const go in hi)hi[go]==null&&delete hi[go];po=Fh({},da,{params:De(hi)}),no.params=De(no.params)}const us=s.resolve(po,no),Ho=da.hash||"";us.params=he(er(us.params));const vi=sX(B,Fh({},da,{hash:eX(Ho),path:us.path})),wi=K.createHref(vi);return Fh({fullPath:vi,hash:Ho,query:B===AL?wX(da.query):da.query||{}},us,{redirectedFrom:void 0,href:wi})}function Dt(da){return typeof da=="string"?P8(E,da,jt.value.path):Fh({},da)}function cn(da,no){if(te!==da)return v_(xd.NAVIGATION_CANCELLED,{from:no,to:da})}function Jn(da){return Wi(da)}function Bn(da){return Jn(Fh(Dt(da),{replace:!0}))}function ni(da,no){const po=da.matched[da.matched.length-1];if(po&&po.redirect){const{redirect:us}=po;let Ho=typeof us=="function"?us(da,no):us;return typeof Ho=="string"&&(Ho=Ho.includes("?")||Ho.includes("#")?Ho=Dt(Ho):{path:Ho},Ho.params={}),Fh({query:da.query,hash:da.hash,params:Ho.path!=null?{}:da.params},Ho)}}function Wi(da,no){const po=te=mn(da),us=jt.value,Ho=da.state,vi=da.force,wi=da.replace===!0,hi=ni(po,us);if(hi)return Wi(Fh(Dt(hi),{state:typeof hi=="object"?Fh({},Ho,hi.state):Ho,force:vi,replace:wi}),no||po);const go=po;go.redirectedFrom=no;let Mo;return!vi&&lX(B,us,po)&&(Mo=v_(xd.NAVIGATION_DUPLICATED,{to:go,from:us}),mo(us,us,!0,!1)),(Mo?Promise.resolve(Mo):Di(go,us)).catch(To=>Gg(To)?Gg(To,xd.NAVIGATION_GUARD_REDIRECT)?To:ho(To):Ma(To,go,us)).then(To=>{if(To){if(Gg(To,xd.NAVIGATION_GUARD_REDIRECT))return Wi(Fh({replace:wi},Dt(To.to),{state:typeof To.to=="object"?Fh({},Ho,To.to.state):Ho,force:vi}),no||go)}else To=Pi(go,us,!0,wi,Ho);return Fi(go,us,To),To})}function Un(da,no){const po=cn(da,no);return po?Promise.reject(po):Promise.resolve()}function qr(da){const no=ko.values().next().value;return no&&typeof no.runWithContext=="function"?no.runWithContext(da):da()}function Di(da,no){let po;const[us,Ho,vi]=TX(da,no);po=z8(us.reverse(),"beforeRouteLeave",da,no);for(const hi of us)hi.leaveGuards.forEach(go=>{po.push(s1(go,da,no))});const wi=Un.bind(null,da,no);return po.push(wi),Ia(po).then(()=>{po=[];for(const hi of pt.list())po.push(s1(hi,da,no));return po.push(wi),Ia(po)}).then(()=>{po=z8(Ho,"beforeRouteUpdate",da,no);for(const hi of Ho)hi.updateGuards.forEach(go=>{po.push(s1(go,da,no))});return po.push(wi),Ia(po)}).then(()=>{po=[];for(const hi of vi)if(hi.beforeEnter)if(Im(hi.beforeEnter))for(const go of hi.beforeEnter)po.push(s1(go,da,no));else po.push(s1(hi.beforeEnter,da,no));return po.push(wi),Ia(po)}).then(()=>(da.matched.forEach(hi=>hi.enterCallbacks={}),po=z8(vi,"beforeRouteEnter",da,no,qr),po.push(wi),Ia(po))).then(()=>{po=[];for(const hi of _t.list())po.push(s1(hi,da,no));return po.push(wi),Ia(po)}).catch(hi=>Gg(hi,xd.NAVIGATION_CANCELLED)?hi:Promise.reject(hi))}function Fi(da,no,po){Ot.list().forEach(us=>qr(()=>us(da,no,po)))}function Pi(da,no,po,us,Ho){const vi=cn(da,no);if(vi)return vi;const wi=no===Qv,hi=a_?history.state:{};po&&(us||wi?K.replace(da.fullPath,Fh({scroll:wi&&hi&&hi.scroll},Ho)):K.push(da.fullPath,Ho)),jt.value=da,mo(da,no,po,wi),ho()}let bi;function Yi(){bi||(bi=K.listen((da,no,po)=>{if(!ro.listening)return;const us=mn(da),Ho=ni(us,ro.currentRoute.value);if(Ho){Wi(Fh(Ho,{replace:!0,force:!0}),us).catch(C2);return}te=us;const vi=jt.value;a_&&gX(TL(vi.fullPath,po.delta),U4()),Di(us,vi).catch(wi=>Gg(wi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_CANCELLED)?wi:Gg(wi,xd.NAVIGATION_GUARD_REDIRECT)?(Wi(Fh(Dt(wi.to),{force:!0}),us).then(hi=>{Gg(hi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&!po.delta&&po.type===yA.pop&&K.go(-1,!1)}).catch(C2),Promise.reject()):(po.delta&&K.go(-po.delta,!1),Ma(wi,us,vi))).then(wi=>{wi=wi||Pi(us,vi,!1),wi&&(po.delta&&!Gg(wi,xd.NAVIGATION_CANCELLED)?K.go(-po.delta,!1):po.type===yA.pop&&Gg(wi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&K.go(-1,!1)),Fi(us,vi,wi)}).catch(C2)}))}let Ca=r2(),Ni=r2(),si;function Ma(da,no,po){ho(da);const us=Ni.list();return us.length?us.forEach(Ho=>Ho(da,no,po)):console.error(da),Promise.reject(da)}function zo(){return si&&jt.value!==Qv?Promise.resolve():new Promise((da,no)=>{Ca.add([da,no])})}function ho(da){return si||(si=!da,Yi(),Ca.list().forEach(([no,po])=>da?po(da):no()),Ca.reset()),da}function mo(da,no,po,us){const{scrollBehavior:Ho}=d;if(!a_||!Ho)return Promise.resolve();const vi=!po&&vX(TL(da.fullPath,0))||(us||!po)&&history.state&&history.state.scroll||null;return om().then(()=>Ho(da,no,vi)).then(wi=>wi&&mX(wi)).catch(wi=>Ma(wi,da,no))}const Ts=da=>K.go(da);let xl;const ko=new Set,ro={currentRoute:jt,listening:!0,addRoute:pr,removeRoute:Mr,clearRoutes:s.clearRoutes,hasRoute:Vr,getRoutes:Tr,resolve:mn,options:d,push:Jn,replace:Bn,go:Ts,back:()=>Ts(-1),forward:()=>Ts(1),beforeEach:pt.add,beforeResolve:_t.add,afterEach:Ot.add,onError:Ni.add,isReady:zo,install(da){da.component("RouterLink",qX),da.component("RouterView",YX),da.config.globalProperties.$router=ro,Object.defineProperty(da.config.globalProperties,"$route",{enumerable:!0,get:()=>zl(jt)}),a_&&!xl&&jt.value===Qv&&(xl=!0,Jn(K.location).catch(us=>{}));const no={};for(const us in Qv)Object.defineProperty(no,us,{get:()=>jt.value[us],enumerable:!0});da.provide(V4,ro),da.provide(lM,JI(no)),da.provide(_A,jt);const po=da.unmount;ko.add(da),da.unmount=function(){ko.delete(da),ko.size<1&&(te=Qv,bi&&bi(),bi=null,jt.value=Qv,xl=!1,si=!1),po()}}};function Ia(da){return da.reduce((no,po)=>no.then(()=>qr(po)),Promise.resolve())}return ro}function pO(){return um(V4)}function mO(d){return um(lM)}function gO(d,s){return function(){return d.apply(s,arguments)}}const{toString:XX}=Object.prototype,{getPrototypeOf:uM}=Object,{iterator:H4,toStringTag:vO}=Symbol,W4=(d=>s=>{const E=XX.call(s);return d[E]||(d[E]=E.slice(8,-1).toLowerCase())})(Object.create(null)),zm=d=>(d=d.toLowerCase(),s=>W4(s)===d),q4=d=>s=>typeof s===d,{isArray:w_}=Array,y_=q4("undefined");function nw(d){return d!==null&&!y_(d)&&d.constructor!==null&&!y_(d.constructor)&&S0(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}const yO=zm("ArrayBuffer");function JX(d){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(d):s=d&&d.buffer&&yO(d.buffer),s}const QX=q4("string"),S0=q4("function"),xO=q4("number"),iw=d=>d!==null&&typeof d=="object",tJ=d=>d===!0||d===!1,t4=d=>{if(W4(d)!=="object")return!1;const s=uM(d);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(vO in d)&&!(H4 in d)},eJ=d=>{if(!iw(d)||nw(d))return!1;try{return Object.keys(d).length===0&&Object.getPrototypeOf(d)===Object.prototype}catch{return!1}},rJ=zm("Date"),nJ=zm("File"),iJ=zm("Blob"),aJ=zm("FileList"),oJ=d=>iw(d)&&S0(d.pipe),sJ=d=>{let s;return d&&(typeof FormData=="function"&&d instanceof FormData||S0(d.append)&&((s=W4(d))==="formdata"||s==="object"&&S0(d.toString)&&d.toString()==="[object FormData]"))},lJ=zm("URLSearchParams"),[uJ,cJ,hJ,fJ]=["ReadableStream","Request","Response","Headers"].map(zm),dJ=d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aw(d,s,{allOwnKeys:E=!1}={}){if(d===null||typeof d>"u")return;let B,K;if(typeof d!="object"&&(d=[d]),w_(d))for(B=0,K=d.length;B0;)if(K=E[B],s===K.toLowerCase())return K;return null}const _y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bO=d=>!y_(d)&&d!==_y;function bA(){const{caseless:d,skipUndefined:s}=bO(this)&&this||{},E={},B=(K,pt)=>{const _t=d&&_O(E,pt)||pt;t4(E[_t])&&t4(K)?E[_t]=bA(E[_t],K):t4(K)?E[_t]=bA({},K):w_(K)?E[_t]=K.slice():(!s||!y_(K))&&(E[_t]=K)};for(let K=0,pt=arguments.length;K(aw(s,(K,pt)=>{E&&S0(K)?d[pt]=gO(K,E):d[pt]=K},{allOwnKeys:B}),d),mJ=d=>(d.charCodeAt(0)===65279&&(d=d.slice(1)),d),gJ=(d,s,E,B)=>{d.prototype=Object.create(s.prototype,B),d.prototype.constructor=d,Object.defineProperty(d,"super",{value:s.prototype}),E&&Object.assign(d.prototype,E)},vJ=(d,s,E,B)=>{let K,pt,_t;const Ot={};if(s=s||{},d==null)return s;do{for(K=Object.getOwnPropertyNames(d),pt=K.length;pt-- >0;)_t=K[pt],(!B||B(_t,d,s))&&!Ot[_t]&&(s[_t]=d[_t],Ot[_t]=!0);d=E!==!1&&uM(d)}while(d&&(!E||E(d,s))&&d!==Object.prototype);return s},yJ=(d,s,E)=>{d=String(d),(E===void 0||E>d.length)&&(E=d.length),E-=s.length;const B=d.indexOf(s,E);return B!==-1&&B===E},xJ=d=>{if(!d)return null;if(w_(d))return d;let s=d.length;if(!xO(s))return null;const E=new Array(s);for(;s-- >0;)E[s]=d[s];return E},_J=(d=>s=>d&&s instanceof d)(typeof Uint8Array<"u"&&uM(Uint8Array)),bJ=(d,s)=>{const B=(d&&d[H4]).call(d);let K;for(;(K=B.next())&&!K.done;){const pt=K.value;s.call(d,pt[0],pt[1])}},wJ=(d,s)=>{let E;const B=[];for(;(E=d.exec(s))!==null;)B.push(E);return B},kJ=zm("HTMLFormElement"),TJ=d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(E,B,K){return B.toUpperCase()+K}),RL=(({hasOwnProperty:d})=>(s,E)=>d.call(s,E))(Object.prototype),AJ=zm("RegExp"),wO=(d,s)=>{const E=Object.getOwnPropertyDescriptors(d),B={};aw(E,(K,pt)=>{let _t;(_t=s(K,pt,d))!==!1&&(B[pt]=_t||K)}),Object.defineProperties(d,B)},MJ=d=>{wO(d,(s,E)=>{if(S0(d)&&["arguments","caller","callee"].indexOf(E)!==-1)return!1;const B=d[E];if(S0(B)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+E+"'")})}})},SJ=(d,s)=>{const E={},B=K=>{K.forEach(pt=>{E[pt]=!0})};return w_(d)?B(d):B(String(d).split(s)),E},EJ=()=>{},CJ=(d,s)=>d!=null&&Number.isFinite(d=+d)?d:s;function LJ(d){return!!(d&&S0(d.append)&&d[vO]==="FormData"&&d[H4])}const PJ=d=>{const s=new Array(10),E=(B,K)=>{if(iw(B)){if(s.indexOf(B)>=0)return;if(nw(B))return B;if(!("toJSON"in B)){s[K]=B;const pt=w_(B)?[]:{};return aw(B,(_t,Ot)=>{const jt=E(_t,K+1);!y_(jt)&&(pt[Ot]=jt)}),s[K]=void 0,pt}}return B};return E(d,0)},IJ=zm("AsyncFunction"),zJ=d=>d&&(iw(d)||S0(d))&&S0(d.then)&&S0(d.catch),kO=((d,s)=>d?setImmediate:s?((E,B)=>(_y.addEventListener("message",({source:K,data:pt})=>{K===_y&&pt===E&&B.length&&B.shift()()},!1),K=>{B.push(K),_y.postMessage(E,"*")}))(`axios@${Math.random()}`,[]):E=>setTimeout(E))(typeof setImmediate=="function",S0(_y.postMessage)),OJ=typeof queueMicrotask<"u"?queueMicrotask.bind(_y):typeof process<"u"&&process.nextTick||kO,DJ=d=>d!=null&&S0(d[H4]),eo={isArray:w_,isArrayBuffer:yO,isBuffer:nw,isFormData:sJ,isArrayBufferView:JX,isString:QX,isNumber:xO,isBoolean:tJ,isObject:iw,isPlainObject:t4,isEmptyObject:eJ,isReadableStream:uJ,isRequest:cJ,isResponse:hJ,isHeaders:fJ,isUndefined:y_,isDate:rJ,isFile:nJ,isBlob:iJ,isRegExp:AJ,isFunction:S0,isStream:oJ,isURLSearchParams:lJ,isTypedArray:_J,isFileList:aJ,forEach:aw,merge:bA,extend:pJ,trim:dJ,stripBOM:mJ,inherits:gJ,toFlatObject:vJ,kindOf:W4,kindOfTest:zm,endsWith:yJ,toArray:xJ,forEachEntry:bJ,matchAll:wJ,isHTMLForm:kJ,hasOwnProperty:RL,hasOwnProp:RL,reduceDescriptors:wO,freezeMethods:MJ,toObjectSet:SJ,toCamelCase:TJ,noop:EJ,toFiniteNumber:CJ,findKey:_O,global:_y,isContextDefined:bO,isSpecCompliantForm:LJ,toJSONObject:PJ,isAsyncFn:IJ,isThenable:zJ,setImmediate:kO,asap:OJ,isIterable:DJ};function Ju(d,s,E,B,K){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=d,this.name="AxiosError",s&&(this.code=s),E&&(this.config=E),B&&(this.request=B),K&&(this.response=K,this.status=K.status?K.status:null)}eo.inherits(Ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eo.toJSONObject(this.config),code:this.code,status:this.status}}});const TO=Ju.prototype,AO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(d=>{AO[d]={value:d}});Object.defineProperties(Ju,AO);Object.defineProperty(TO,"isAxiosError",{value:!0});Ju.from=(d,s,E,B,K,pt)=>{const _t=Object.create(TO);eo.toFlatObject(d,_t,function(he){return he!==Error.prototype},te=>te!=="isAxiosError");const Ot=d&&d.message?d.message:"Error",jt=s==null&&d?d.code:s;return Ju.call(_t,Ot,jt,E,B,K),d&&_t.cause==null&&Object.defineProperty(_t,"cause",{value:d,configurable:!0}),_t.name=d&&d.name||"Error",pt&&Object.assign(_t,pt),_t};const FJ=null;function wA(d){return eo.isPlainObject(d)||eo.isArray(d)}function MO(d){return eo.endsWith(d,"[]")?d.slice(0,-2):d}function BL(d,s,E){return d?d.concat(s).map(function(K,pt){return K=MO(K),!E&&pt?"["+K+"]":K}).join(E?".":""):s}function RJ(d){return eo.isArray(d)&&!d.some(wA)}const BJ=eo.toFlatObject(eo,{},null,function(s){return/^is[A-Z]/.test(s)});function $4(d,s,E){if(!eo.isObject(d))throw new TypeError("target must be an object");s=s||new FormData,E=eo.toFlatObject(E,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Tr,Vr){return!eo.isUndefined(Vr[Tr])});const B=E.metaTokens,K=E.visitor||he,pt=E.dots,_t=E.indexes,jt=(E.Blob||typeof Blob<"u"&&Blob)&&eo.isSpecCompliantForm(s);if(!eo.isFunction(K))throw new TypeError("visitor must be a function");function te(Mr){if(Mr===null)return"";if(eo.isDate(Mr))return Mr.toISOString();if(eo.isBoolean(Mr))return Mr.toString();if(!jt&&eo.isBlob(Mr))throw new Ju("Blob is not supported. Use a Buffer instead.");return eo.isArrayBuffer(Mr)||eo.isTypedArray(Mr)?jt&&typeof Blob=="function"?new Blob([Mr]):Buffer.from(Mr):Mr}function he(Mr,Tr,Vr){let mn=Mr;if(Mr&&!Vr&&typeof Mr=="object"){if(eo.endsWith(Tr,"{}"))Tr=B?Tr:Tr.slice(0,-2),Mr=JSON.stringify(Mr);else if(eo.isArray(Mr)&&RJ(Mr)||(eo.isFileList(Mr)||eo.endsWith(Tr,"[]"))&&(mn=eo.toArray(Mr)))return Tr=MO(Tr),mn.forEach(function(cn,Jn){!(eo.isUndefined(cn)||cn===null)&&s.append(_t===!0?BL([Tr],Jn,pt):_t===null?Tr:Tr+"[]",te(cn))}),!1}return wA(Mr)?!0:(s.append(BL(Vr,Tr,pt),te(Mr)),!1)}const De=[],er=Object.assign(BJ,{defaultVisitor:he,convertValue:te,isVisitable:wA});function pr(Mr,Tr){if(!eo.isUndefined(Mr)){if(De.indexOf(Mr)!==-1)throw Error("Circular reference detected in "+Tr.join("."));De.push(Mr),eo.forEach(Mr,function(mn,Dt){(!(eo.isUndefined(mn)||mn===null)&&K.call(s,mn,eo.isString(Dt)?Dt.trim():Dt,Tr,er))===!0&&pr(mn,Tr?Tr.concat(Dt):[Dt])}),De.pop()}}if(!eo.isObject(d))throw new TypeError("data must be an object");return pr(d),s}function NL(d){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'()~]|%20|%00/g,function(B){return s[B]})}function cM(d,s){this._pairs=[],d&&$4(d,this,s)}const SO=cM.prototype;SO.append=function(s,E){this._pairs.push([s,E])};SO.toString=function(s){const E=s?function(B){return s.call(this,B,NL)}:NL;return this._pairs.map(function(K){return E(K[0])+"="+E(K[1])},"").join("&")};function NJ(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function EO(d,s,E){if(!s)return d;const B=E&&E.encode||NJ;eo.isFunction(E)&&(E={serialize:E});const K=E&&E.serialize;let pt;if(K?pt=K(s,E):pt=eo.isURLSearchParams(s)?s.toString():new cM(s,E).toString(B),pt){const _t=d.indexOf("#");_t!==-1&&(d=d.slice(0,_t)),d+=(d.indexOf("?")===-1?"?":"&")+pt}return d}class jL{constructor(){this.handlers=[]}use(s,E,B){return this.handlers.push({fulfilled:s,rejected:E,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){eo.forEach(this.handlers,function(B){B!==null&&s(B)})}}const CO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jJ=typeof URLSearchParams<"u"?URLSearchParams:cM,UJ=typeof FormData<"u"?FormData:null,VJ=typeof Blob<"u"?Blob:null,HJ={isBrowser:!0,classes:{URLSearchParams:jJ,FormData:UJ,Blob:VJ},protocols:["http","https","file","blob","url","data"]},hM=typeof window<"u"&&typeof document<"u",kA=typeof navigator=="object"&&navigator||void 0,WJ=hM&&(!kA||["ReactNative","NativeScript","NS"].indexOf(kA.product)<0),qJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$J=hM&&window.location.href||"http://localhost",ZJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hM,hasStandardBrowserEnv:WJ,hasStandardBrowserWebWorkerEnv:qJ,navigator:kA,origin:$J},Symbol.toStringTag,{value:"Module"})),Xp={...ZJ,...HJ};function GJ(d,s){return $4(d,new Xp.classes.URLSearchParams,{visitor:function(E,B,K,pt){return Xp.isNode&&eo.isBuffer(E)?(this.append(B,E.toString("base64")),!1):pt.defaultVisitor.apply(this,arguments)},...s})}function YJ(d){return eo.matchAll(/\w+|\[(\w*)]/g,d).map(s=>s[0]==="[]"?"":s[1]||s[0])}function KJ(d){const s={},E=Object.keys(d);let B;const K=E.length;let pt;for(B=0;B=E.length;return _t=!_t&&eo.isArray(K)?K.length:_t,jt?(eo.hasOwnProp(K,_t)?K[_t]=[K[_t],B]:K[_t]=B,!Ot):((!K[_t]||!eo.isObject(K[_t]))&&(K[_t]=[]),s(E,B,K[_t],pt)&&eo.isArray(K[_t])&&(K[_t]=KJ(K[_t])),!Ot)}if(eo.isFormData(d)&&eo.isFunction(d.entries)){const E={};return eo.forEachEntry(d,(B,K)=>{s(YJ(B),K,E,0)}),E}return null}function XJ(d,s,E){if(eo.isString(d))try{return(s||JSON.parse)(d),eo.trim(d)}catch(B){if(B.name!=="SyntaxError")throw B}return(E||JSON.stringify)(d)}const ow={transitional:CO,adapter:["xhr","http","fetch"],transformRequest:[function(s,E){const B=E.getContentType()||"",K=B.indexOf("application/json")>-1,pt=eo.isObject(s);if(pt&&eo.isHTMLForm(s)&&(s=new FormData(s)),eo.isFormData(s))return K?JSON.stringify(LO(s)):s;if(eo.isArrayBuffer(s)||eo.isBuffer(s)||eo.isStream(s)||eo.isFile(s)||eo.isBlob(s)||eo.isReadableStream(s))return s;if(eo.isArrayBufferView(s))return s.buffer;if(eo.isURLSearchParams(s))return E.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let Ot;if(pt){if(B.indexOf("application/x-www-form-urlencoded")>-1)return GJ(s,this.formSerializer).toString();if((Ot=eo.isFileList(s))||B.indexOf("multipart/form-data")>-1){const jt=this.env&&this.env.FormData;return $4(Ot?{"files[]":s}:s,jt&&new jt,this.formSerializer)}}return pt||K?(E.setContentType("application/json",!1),XJ(s)):s}],transformResponse:[function(s){const E=this.transitional||ow.transitional,B=E&&E.forcedJSONParsing,K=this.responseType==="json";if(eo.isResponse(s)||eo.isReadableStream(s))return s;if(s&&eo.isString(s)&&(B&&!this.responseType||K)){const _t=!(E&&E.silentJSONParsing)&&K;try{return JSON.parse(s,this.parseReviver)}catch(Ot){if(_t)throw Ot.name==="SyntaxError"?Ju.from(Ot,Ju.ERR_BAD_RESPONSE,this,null,this.response):Ot}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xp.classes.FormData,Blob:Xp.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eo.forEach(["delete","get","head","post","put","patch"],d=>{ow.headers[d]={}});const JJ=eo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),QJ=d=>{const s={};let E,B,K;return d&&d.split(` -`).forEach(function(_t){K=_t.indexOf(":"),E=_t.substring(0,K).trim().toLowerCase(),B=_t.substring(K+1).trim(),!(!E||s[E]&&JJ[E])&&(E==="set-cookie"?s[E]?s[E].push(B):s[E]=[B]:s[E]=s[E]?s[E]+", "+B:B)}),s},UL=Symbol("internals");function n2(d){return d&&String(d).trim().toLowerCase()}function e4(d){return d===!1||d==null?d:eo.isArray(d)?d.map(e4):String(d)}function tQ(d){const s=Object.create(null),E=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=E.exec(d);)s[B[1]]=B[2];return s}const eQ=d=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(d.trim());function O8(d,s,E,B,K){if(eo.isFunction(B))return B.call(this,s,E);if(K&&(s=E),!!eo.isString(s)){if(eo.isString(B))return s.indexOf(B)!==-1;if(eo.isRegExp(B))return B.test(s)}}function rQ(d){return d.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,E,B)=>E.toUpperCase()+B)}function nQ(d,s){const E=eo.toCamelCase(" "+s);["get","set","has"].forEach(B=>{Object.defineProperty(d,B+E,{value:function(K,pt,_t){return this[B].call(this,s,K,pt,_t)},configurable:!0})})}let E0=class{constructor(s){s&&this.set(s)}set(s,E,B){const K=this;function pt(Ot,jt,te){const he=n2(jt);if(!he)throw new Error("header name must be a non-empty string");const De=eo.findKey(K,he);(!De||K[De]===void 0||te===!0||te===void 0&&K[De]!==!1)&&(K[De||jt]=e4(Ot))}const _t=(Ot,jt)=>eo.forEach(Ot,(te,he)=>pt(te,he,jt));if(eo.isPlainObject(s)||s instanceof this.constructor)_t(s,E);else if(eo.isString(s)&&(s=s.trim())&&!eQ(s))_t(QJ(s),E);else if(eo.isObject(s)&&eo.isIterable(s)){let Ot={},jt,te;for(const he of s){if(!eo.isArray(he))throw TypeError("Object iterator must return a key-value pair");Ot[te=he[0]]=(jt=Ot[te])?eo.isArray(jt)?[...jt,he[1]]:[jt,he[1]]:he[1]}_t(Ot,E)}else s!=null&&pt(E,s,B);return this}get(s,E){if(s=n2(s),s){const B=eo.findKey(this,s);if(B){const K=this[B];if(!E)return K;if(E===!0)return tQ(K);if(eo.isFunction(E))return E.call(this,K,B);if(eo.isRegExp(E))return E.exec(K);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,E){if(s=n2(s),s){const B=eo.findKey(this,s);return!!(B&&this[B]!==void 0&&(!E||O8(this,this[B],B,E)))}return!1}delete(s,E){const B=this;let K=!1;function pt(_t){if(_t=n2(_t),_t){const Ot=eo.findKey(B,_t);Ot&&(!E||O8(B,B[Ot],Ot,E))&&(delete B[Ot],K=!0)}}return eo.isArray(s)?s.forEach(pt):pt(s),K}clear(s){const E=Object.keys(this);let B=E.length,K=!1;for(;B--;){const pt=E[B];(!s||O8(this,this[pt],pt,s,!0))&&(delete this[pt],K=!0)}return K}normalize(s){const E=this,B={};return eo.forEach(this,(K,pt)=>{const _t=eo.findKey(B,pt);if(_t){E[_t]=e4(K),delete E[pt];return}const Ot=s?rQ(pt):String(pt).trim();Ot!==pt&&delete E[pt],E[Ot]=e4(K),B[Ot]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const E=Object.create(null);return eo.forEach(this,(B,K)=>{B!=null&&B!==!1&&(E[K]=s&&eo.isArray(B)?B.join(", "):B)}),E}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,E])=>s+": "+E).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...E){const B=new this(s);return E.forEach(K=>B.set(K)),B}static accessor(s){const B=(this[UL]=this[UL]={accessors:{}}).accessors,K=this.prototype;function pt(_t){const Ot=n2(_t);B[Ot]||(nQ(K,_t),B[Ot]=!0)}return eo.isArray(s)?s.forEach(pt):pt(s),this}};E0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);eo.reduceDescriptors(E0.prototype,({value:d},s)=>{let E=s[0].toUpperCase()+s.slice(1);return{get:()=>d,set(B){this[E]=B}}});eo.freezeMethods(E0);function D8(d,s){const E=this||ow,B=s||E,K=E0.from(B.headers);let pt=B.data;return eo.forEach(d,function(Ot){pt=Ot.call(E,pt,K.normalize(),s?s.status:void 0)}),K.normalize(),pt}function PO(d){return!!(d&&d.__CANCEL__)}function k_(d,s,E){Ju.call(this,d??"canceled",Ju.ERR_CANCELED,s,E),this.name="CanceledError"}eo.inherits(k_,Ju,{__CANCEL__:!0});function IO(d,s,E){const B=E.config.validateStatus;!E.status||!B||B(E.status)?d(E):s(new Ju("Request failed with status code "+E.status,[Ju.ERR_BAD_REQUEST,Ju.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}function iQ(d){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(d);return s&&s[1]||""}function aQ(d,s){d=d||10;const E=new Array(d),B=new Array(d);let K=0,pt=0,_t;return s=s!==void 0?s:1e3,function(jt){const te=Date.now(),he=B[pt];_t||(_t=te),E[K]=jt,B[K]=te;let De=pt,er=0;for(;De!==K;)er+=E[De++],De=De%d;if(K=(K+1)%d,K===pt&&(pt=(pt+1)%d),te-_t{E=he,K=null,pt&&(clearTimeout(pt),pt=null),d(...te)};return[(...te)=>{const he=Date.now(),De=he-E;De>=B?_t(te,he):(K=te,pt||(pt=setTimeout(()=>{pt=null,_t(K)},B-De)))},()=>K&&_t(K)]}const v4=(d,s,E=3)=>{let B=0;const K=aQ(50,250);return oQ(pt=>{const _t=pt.loaded,Ot=pt.lengthComputable?pt.total:void 0,jt=_t-B,te=K(jt),he=_t<=Ot;B=_t;const De={loaded:_t,total:Ot,progress:Ot?_t/Ot:void 0,bytes:jt,rate:te||void 0,estimated:te&&Ot&&he?(Ot-_t)/te:void 0,event:pt,lengthComputable:Ot!=null,[s?"download":"upload"]:!0};d(De)},E)},VL=(d,s)=>{const E=d!=null;return[B=>s[0]({lengthComputable:E,total:d,loaded:B}),s[1]]},HL=d=>(...s)=>eo.asap(()=>d(...s)),sQ=Xp.hasStandardBrowserEnv?((d,s)=>E=>(E=new URL(E,Xp.origin),d.protocol===E.protocol&&d.host===E.host&&(s||d.port===E.port)))(new URL(Xp.origin),Xp.navigator&&/(msie|trident)/i.test(Xp.navigator.userAgent)):()=>!0,lQ=Xp.hasStandardBrowserEnv?{write(d,s,E,B,K,pt,_t){if(typeof document>"u")return;const Ot=[`${d}=${encodeURIComponent(s)}`];eo.isNumber(E)&&Ot.push(`expires=${new Date(E).toUTCString()}`),eo.isString(B)&&Ot.push(`path=${B}`),eo.isString(K)&&Ot.push(`domain=${K}`),pt===!0&&Ot.push("secure"),eo.isString(_t)&&Ot.push(`SameSite=${_t}`),document.cookie=Ot.join("; ")},read(d){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+d+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function uQ(d){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(d)}function cQ(d,s){return s?d.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):d}function zO(d,s,E){let B=!uQ(s);return d&&(B||E==!1)?cQ(d,s):s}const WL=d=>d instanceof E0?{...d}:d;function Ey(d,s){s=s||{};const E={};function B(te,he,De,er){return eo.isPlainObject(te)&&eo.isPlainObject(he)?eo.merge.call({caseless:er},te,he):eo.isPlainObject(he)?eo.merge({},he):eo.isArray(he)?he.slice():he}function K(te,he,De,er){if(eo.isUndefined(he)){if(!eo.isUndefined(te))return B(void 0,te,De,er)}else return B(te,he,De,er)}function pt(te,he){if(!eo.isUndefined(he))return B(void 0,he)}function _t(te,he){if(eo.isUndefined(he)){if(!eo.isUndefined(te))return B(void 0,te)}else return B(void 0,he)}function Ot(te,he,De){if(De in s)return B(te,he);if(De in d)return B(void 0,te)}const jt={url:pt,method:pt,data:pt,baseURL:_t,transformRequest:_t,transformResponse:_t,paramsSerializer:_t,timeout:_t,timeoutMessage:_t,withCredentials:_t,withXSRFToken:_t,adapter:_t,responseType:_t,xsrfCookieName:_t,xsrfHeaderName:_t,onUploadProgress:_t,onDownloadProgress:_t,decompress:_t,maxContentLength:_t,maxBodyLength:_t,beforeRedirect:_t,transport:_t,httpAgent:_t,httpsAgent:_t,cancelToken:_t,socketPath:_t,responseEncoding:_t,validateStatus:Ot,headers:(te,he,De)=>K(WL(te),WL(he),De,!0)};return eo.forEach(Object.keys({...d,...s}),function(he){const De=jt[he]||K,er=De(d[he],s[he],he);eo.isUndefined(er)&&De!==Ot||(E[he]=er)}),E}const OO=d=>{const s=Ey({},d);let{data:E,withXSRFToken:B,xsrfHeaderName:K,xsrfCookieName:pt,headers:_t,auth:Ot}=s;if(s.headers=_t=E0.from(_t),s.url=EO(zO(s.baseURL,s.url,s.allowAbsoluteUrls),d.params,d.paramsSerializer),Ot&&_t.set("Authorization","Basic "+btoa((Ot.username||"")+":"+(Ot.password?unescape(encodeURIComponent(Ot.password)):""))),eo.isFormData(E)){if(Xp.hasStandardBrowserEnv||Xp.hasStandardBrowserWebWorkerEnv)_t.setContentType(void 0);else if(eo.isFunction(E.getHeaders)){const jt=E.getHeaders(),te=["content-type","content-length"];Object.entries(jt).forEach(([he,De])=>{te.includes(he.toLowerCase())&&_t.set(he,De)})}}if(Xp.hasStandardBrowserEnv&&(B&&eo.isFunction(B)&&(B=B(s)),B||B!==!1&&sQ(s.url))){const jt=K&&pt&&lQ.read(pt);jt&&_t.set(K,jt)}return s},hQ=typeof XMLHttpRequest<"u",fQ=hQ&&function(d){return new Promise(function(E,B){const K=OO(d);let pt=K.data;const _t=E0.from(K.headers).normalize();let{responseType:Ot,onUploadProgress:jt,onDownloadProgress:te}=K,he,De,er,pr,Mr;function Tr(){pr&&pr(),Mr&&Mr(),K.cancelToken&&K.cancelToken.unsubscribe(he),K.signal&&K.signal.removeEventListener("abort",he)}let Vr=new XMLHttpRequest;Vr.open(K.method.toUpperCase(),K.url,!0),Vr.timeout=K.timeout;function mn(){if(!Vr)return;const cn=E0.from("getAllResponseHeaders"in Vr&&Vr.getAllResponseHeaders()),Bn={data:!Ot||Ot==="text"||Ot==="json"?Vr.responseText:Vr.response,status:Vr.status,statusText:Vr.statusText,headers:cn,config:d,request:Vr};IO(function(Wi){E(Wi),Tr()},function(Wi){B(Wi),Tr()},Bn),Vr=null}"onloadend"in Vr?Vr.onloadend=mn:Vr.onreadystatechange=function(){!Vr||Vr.readyState!==4||Vr.status===0&&!(Vr.responseURL&&Vr.responseURL.indexOf("file:")===0)||setTimeout(mn)},Vr.onabort=function(){Vr&&(B(new Ju("Request aborted",Ju.ECONNABORTED,d,Vr)),Vr=null)},Vr.onerror=function(Jn){const Bn=Jn&&Jn.message?Jn.message:"Network Error",ni=new Ju(Bn,Ju.ERR_NETWORK,d,Vr);ni.event=Jn||null,B(ni),Vr=null},Vr.ontimeout=function(){let Jn=K.timeout?"timeout of "+K.timeout+"ms exceeded":"timeout exceeded";const Bn=K.transitional||CO;K.timeoutErrorMessage&&(Jn=K.timeoutErrorMessage),B(new Ju(Jn,Bn.clarifyTimeoutError?Ju.ETIMEDOUT:Ju.ECONNABORTED,d,Vr)),Vr=null},pt===void 0&&_t.setContentType(null),"setRequestHeader"in Vr&&eo.forEach(_t.toJSON(),function(Jn,Bn){Vr.setRequestHeader(Bn,Jn)}),eo.isUndefined(K.withCredentials)||(Vr.withCredentials=!!K.withCredentials),Ot&&Ot!=="json"&&(Vr.responseType=K.responseType),te&&([er,Mr]=v4(te,!0),Vr.addEventListener("progress",er)),jt&&Vr.upload&&([De,pr]=v4(jt),Vr.upload.addEventListener("progress",De),Vr.upload.addEventListener("loadend",pr)),(K.cancelToken||K.signal)&&(he=cn=>{Vr&&(B(!cn||cn.type?new k_(null,d,Vr):cn),Vr.abort(),Vr=null)},K.cancelToken&&K.cancelToken.subscribe(he),K.signal&&(K.signal.aborted?he():K.signal.addEventListener("abort",he)));const Dt=iQ(K.url);if(Dt&&Xp.protocols.indexOf(Dt)===-1){B(new Ju("Unsupported protocol "+Dt+":",Ju.ERR_BAD_REQUEST,d));return}Vr.send(pt||null)})},dQ=(d,s)=>{const{length:E}=d=d?d.filter(Boolean):[];if(s||E){let B=new AbortController,K;const pt=function(te){if(!K){K=!0,Ot();const he=te instanceof Error?te:this.reason;B.abort(he instanceof Ju?he:new k_(he instanceof Error?he.message:he))}};let _t=s&&setTimeout(()=>{_t=null,pt(new Ju(`timeout ${s} of ms exceeded`,Ju.ETIMEDOUT))},s);const Ot=()=>{d&&(_t&&clearTimeout(_t),_t=null,d.forEach(te=>{te.unsubscribe?te.unsubscribe(pt):te.removeEventListener("abort",pt)}),d=null)};d.forEach(te=>te.addEventListener("abort",pt));const{signal:jt}=B;return jt.unsubscribe=()=>eo.asap(Ot),jt}},pQ=function*(d,s){let E=d.byteLength;if(E{const K=mQ(d,s);let pt=0,_t,Ot=jt=>{_t||(_t=!0,B&&B(jt))};return new ReadableStream({async pull(jt){try{const{done:te,value:he}=await K.next();if(te){Ot(),jt.close();return}let De=he.byteLength;if(E){let er=pt+=De;E(er)}jt.enqueue(new Uint8Array(he))}catch(te){throw Ot(te),te}},cancel(jt){return Ot(jt),K.return()}},{highWaterMark:2})},$L=64*1024,{isFunction:P5}=eo,vQ=(({Request:d,Response:s})=>({Request:d,Response:s}))(eo.global),{ReadableStream:ZL,TextEncoder:GL}=eo.global,YL=(d,...s)=>{try{return!!d(...s)}catch{return!1}},yQ=d=>{d=eo.merge.call({skipUndefined:!0},vQ,d);const{fetch:s,Request:E,Response:B}=d,K=s?P5(s):typeof fetch=="function",pt=P5(E),_t=P5(B);if(!K)return!1;const Ot=K&&P5(ZL),jt=K&&(typeof GL=="function"?(Mr=>Tr=>Mr.encode(Tr))(new GL):async Mr=>new Uint8Array(await new E(Mr).arrayBuffer())),te=pt&&Ot&&YL(()=>{let Mr=!1;const Tr=new E(Xp.origin,{body:new ZL,method:"POST",get duplex(){return Mr=!0,"half"}}).headers.has("Content-Type");return Mr&&!Tr}),he=_t&&Ot&&YL(()=>eo.isReadableStream(new B("").body)),De={stream:he&&(Mr=>Mr.body)};K&&["text","arrayBuffer","blob","formData","stream"].forEach(Mr=>{!De[Mr]&&(De[Mr]=(Tr,Vr)=>{let mn=Tr&&Tr[Mr];if(mn)return mn.call(Tr);throw new Ju(`Response type '${Mr}' is not supported`,Ju.ERR_NOT_SUPPORT,Vr)})});const er=async Mr=>{if(Mr==null)return 0;if(eo.isBlob(Mr))return Mr.size;if(eo.isSpecCompliantForm(Mr))return(await new E(Xp.origin,{method:"POST",body:Mr}).arrayBuffer()).byteLength;if(eo.isArrayBufferView(Mr)||eo.isArrayBuffer(Mr))return Mr.byteLength;if(eo.isURLSearchParams(Mr)&&(Mr=Mr+""),eo.isString(Mr))return(await jt(Mr)).byteLength},pr=async(Mr,Tr)=>{const Vr=eo.toFiniteNumber(Mr.getContentLength());return Vr??er(Tr)};return async Mr=>{let{url:Tr,method:Vr,data:mn,signal:Dt,cancelToken:cn,timeout:Jn,onDownloadProgress:Bn,onUploadProgress:ni,responseType:Wi,headers:Un,withCredentials:qr="same-origin",fetchOptions:Di}=OO(Mr),Fi=s||fetch;Wi=Wi?(Wi+"").toLowerCase():"text";let Pi=dQ([Dt,cn&&cn.toAbortSignal()],Jn),bi=null;const Yi=Pi&&Pi.unsubscribe&&(()=>{Pi.unsubscribe()});let Ca;try{if(ni&&te&&Vr!=="get"&&Vr!=="head"&&(Ca=await pr(Un,mn))!==0){let mo=new E(Tr,{method:"POST",body:mn,duplex:"half"}),Ts;if(eo.isFormData(mn)&&(Ts=mo.headers.get("content-type"))&&Un.setContentType(Ts),mo.body){const[xl,ko]=VL(Ca,v4(HL(ni)));mn=qL(mo.body,$L,xl,ko)}}eo.isString(qr)||(qr=qr?"include":"omit");const Ni=pt&&"credentials"in E.prototype,si={...Di,signal:Pi,method:Vr.toUpperCase(),headers:Un.normalize().toJSON(),body:mn,duplex:"half",credentials:Ni?qr:void 0};bi=pt&&new E(Tr,si);let Ma=await(pt?Fi(bi,Di):Fi(Tr,si));const zo=he&&(Wi==="stream"||Wi==="response");if(he&&(Bn||zo&&Yi)){const mo={};["status","statusText","headers"].forEach(ro=>{mo[ro]=Ma[ro]});const Ts=eo.toFiniteNumber(Ma.headers.get("content-length")),[xl,ko]=Bn&&VL(Ts,v4(HL(Bn),!0))||[];Ma=new B(qL(Ma.body,$L,xl,()=>{ko&&ko(),Yi&&Yi()}),mo)}Wi=Wi||"text";let ho=await De[eo.findKey(De,Wi)||"text"](Ma,Mr);return!zo&&Yi&&Yi(),await new Promise((mo,Ts)=>{IO(mo,Ts,{data:ho,headers:E0.from(Ma.headers),status:Ma.status,statusText:Ma.statusText,config:Mr,request:bi})})}catch(Ni){throw Yi&&Yi(),Ni&&Ni.name==="TypeError"&&/Load failed|fetch/i.test(Ni.message)?Object.assign(new Ju("Network Error",Ju.ERR_NETWORK,Mr,bi),{cause:Ni.cause||Ni}):Ju.from(Ni,Ni&&Ni.code,Mr,bi)}}},xQ=new Map,DO=d=>{let s=d&&d.env||{};const{fetch:E,Request:B,Response:K}=s,pt=[B,K,E];let _t=pt.length,Ot=_t,jt,te,he=xQ;for(;Ot--;)jt=pt[Ot],te=he.get(jt),te===void 0&&he.set(jt,te=Ot?new Map:yQ(s)),he=te;return te};DO();const fM={http:FJ,xhr:fQ,fetch:{get:DO}};eo.forEach(fM,(d,s)=>{if(d){try{Object.defineProperty(d,"name",{value:s})}catch{}Object.defineProperty(d,"adapterName",{value:s})}});const KL=d=>`- ${d}`,_Q=d=>eo.isFunction(d)||d===null||d===!1;function bQ(d,s){d=eo.isArray(d)?d:[d];const{length:E}=d;let B,K;const pt={};for(let _t=0;_t`adapter ${jt} `+(te===!1?"is not supported by the environment":"is not available in the build"));let Ot=E?_t.length>1?`since : -`+_t.map(KL).join(` -`):" "+KL(_t[0]):"as no adapter specified";throw new Ju("There is no suitable adapter to dispatch the request "+Ot,"ERR_NOT_SUPPORT")}return K}const FO={getAdapter:bQ,adapters:fM};function F8(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new k_(null,d)}function XL(d){return F8(d),d.headers=E0.from(d.headers),d.data=D8.call(d,d.transformRequest),["post","put","patch"].indexOf(d.method)!==-1&&d.headers.setContentType("application/x-www-form-urlencoded",!1),FO.getAdapter(d.adapter||ow.adapter,d)(d).then(function(B){return F8(d),B.data=D8.call(d,d.transformResponse,B),B.headers=E0.from(B.headers),B},function(B){return PO(B)||(F8(d),B&&B.response&&(B.response.data=D8.call(d,d.transformResponse,B.response),B.response.headers=E0.from(B.response.headers))),Promise.reject(B)})}const RO="1.13.2",Z4={};["object","boolean","number","function","string","symbol"].forEach((d,s)=>{Z4[d]=function(B){return typeof B===d||"a"+(s<1?"n ":" ")+d}});const JL={};Z4.transitional=function(s,E,B){function K(pt,_t){return"[Axios v"+RO+"] Transitional option '"+pt+"'"+_t+(B?". "+B:"")}return(pt,_t,Ot)=>{if(s===!1)throw new Ju(K(_t," has been removed"+(E?" in "+E:"")),Ju.ERR_DEPRECATED);return E&&!JL[_t]&&(JL[_t]=!0,console.warn(K(_t," has been deprecated since v"+E+" and will be removed in the near future"))),s?s(pt,_t,Ot):!0}};Z4.spelling=function(s){return(E,B)=>(console.warn(`${B} is likely a misspelling of ${s}`),!0)};function wQ(d,s,E){if(typeof d!="object")throw new Ju("options must be an object",Ju.ERR_BAD_OPTION_VALUE);const B=Object.keys(d);let K=B.length;for(;K-- >0;){const pt=B[K],_t=s[pt];if(_t){const Ot=d[pt],jt=Ot===void 0||_t(Ot,pt,d);if(jt!==!0)throw new Ju("option "+pt+" must be "+jt,Ju.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new Ju("Unknown option "+pt,Ju.ERR_BAD_OPTION)}}const r4={assertOptions:wQ,validators:Z4},ig=r4.validators;let Ty=class{constructor(s){this.defaults=s||{},this.interceptors={request:new jL,response:new jL}}async request(s,E){try{return await this._request(s,E)}catch(B){if(B instanceof Error){let K={};Error.captureStackTrace?Error.captureStackTrace(K):K=new Error;const pt=K.stack?K.stack.replace(/^.+\n/,""):"";try{B.stack?pt&&!String(B.stack).endsWith(pt.replace(/^.+\n.+\n/,""))&&(B.stack+=` -`+pt):B.stack=pt}catch{}}throw B}}_request(s,E){typeof s=="string"?(E=E||{},E.url=s):E=s||{},E=Ey(this.defaults,E);const{transitional:B,paramsSerializer:K,headers:pt}=E;B!==void 0&&r4.assertOptions(B,{silentJSONParsing:ig.transitional(ig.boolean),forcedJSONParsing:ig.transitional(ig.boolean),clarifyTimeoutError:ig.transitional(ig.boolean)},!1),K!=null&&(eo.isFunction(K)?E.paramsSerializer={serialize:K}:r4.assertOptions(K,{encode:ig.function,serialize:ig.function},!0)),E.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?E.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:E.allowAbsoluteUrls=!0),r4.assertOptions(E,{baseUrl:ig.spelling("baseURL"),withXsrfToken:ig.spelling("withXSRFToken")},!0),E.method=(E.method||this.defaults.method||"get").toLowerCase();let _t=pt&&eo.merge(pt.common,pt[E.method]);pt&&eo.forEach(["delete","get","head","post","put","patch","common"],Mr=>{delete pt[Mr]}),E.headers=E0.concat(_t,pt);const Ot=[];let jt=!0;this.interceptors.request.forEach(function(Tr){typeof Tr.runWhen=="function"&&Tr.runWhen(E)===!1||(jt=jt&&Tr.synchronous,Ot.unshift(Tr.fulfilled,Tr.rejected))});const te=[];this.interceptors.response.forEach(function(Tr){te.push(Tr.fulfilled,Tr.rejected)});let he,De=0,er;if(!jt){const Mr=[XL.bind(this),void 0];for(Mr.unshift(...Ot),Mr.push(...te),er=Mr.length,he=Promise.resolve(E);De{if(!B._listeners)return;let pt=B._listeners.length;for(;pt-- >0;)B._listeners[pt](K);B._listeners=null}),this.promise.then=K=>{let pt;const _t=new Promise(Ot=>{B.subscribe(Ot),pt=Ot}).then(K);return _t.cancel=function(){B.unsubscribe(pt)},_t},s(function(pt,_t,Ot){B.reason||(B.reason=new k_(pt,_t,Ot),E(B.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const E=this._listeners.indexOf(s);E!==-1&&this._listeners.splice(E,1)}toAbortSignal(){const s=new AbortController,E=B=>{s.abort(B)};return this.subscribe(E),s.signal.unsubscribe=()=>this.unsubscribe(E),s.signal}static source(){let s;return{token:new BO(function(K){s=K}),cancel:s}}};function TQ(d){return function(E){return d.apply(null,E)}}function AQ(d){return eo.isObject(d)&&d.isAxiosError===!0}const TA={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(TA).forEach(([d,s])=>{TA[s]=d});function NO(d){const s=new Ty(d),E=gO(Ty.prototype.request,s);return eo.extend(E,Ty.prototype,s,{allOwnKeys:!0}),eo.extend(E,s,null,{allOwnKeys:!0}),E.create=function(K){return NO(Ey(d,K))},E}const _d=NO(ow);_d.Axios=Ty;_d.CanceledError=k_;_d.CancelToken=kQ;_d.isCancel=PO;_d.VERSION=RO;_d.toFormData=$4;_d.AxiosError=Ju;_d.Cancel=_d.CanceledError;_d.all=function(s){return Promise.all(s)};_d.spread=TQ;_d.isAxiosError=AQ;_d.mergeConfig=Ey;_d.AxiosHeaders=E0;_d.formToJSON=d=>LO(eo.isHTMLForm(d)?new FormData(d):d);_d.getAdapter=FO.getAdapter;_d.HttpStatusCode=TA;_d.default=_d;const{Axios:E1t,AxiosError:C1t,CanceledError:L1t,isCancel:P1t,CancelToken:I1t,VERSION:z1t,all:O1t,Cancel:D1t,isAxiosError:F1t,spread:R1t,toFormData:B1t,AxiosHeaders:N1t,HttpStatusCode:j1t,formToJSON:U1t,getAdapter:V1t,mergeConfig:H1t}=_d,MQ="/api",SQ="",EQ=MQ,CQ=SQ,yy=_d.create({baseURL:EQ,timeout:5e3,headers:{"Content-Type":"application/json"}});yy.interceptors.request.use(d=>d,d=>(console.error("API Request Error:",d),Promise.reject(d)));yy.interceptors.response.use(d=>d,d=>(console.error("API Response Error:",d.response?.data||d.message),Promise.reject(d)));class Ah{static async get(s,E){try{return(await yy.get(s,{params:E})).data}catch(B){throw this.handleError(B)}}static async post(s,E,B){try{return(await yy.post(s,E,B)).data}catch(K){throw this.handleError(K)}}static async put(s,E,B){try{return(await yy.put(s,E,B)).data}catch(K){throw this.handleError(K)}}static async delete(s,E){try{return(await yy.delete(s,E)).data}catch(B){throw this.handleError(B)}}static async getTransportKeys(){return this.get("transport_keys")}static async createTransportKey(s,E,B,K,pt){const _t={name:s,flood_policy:E,parent_id:K,last_used:pt};return B!==void 0&&(_t.transport_key=B),this.post("transport_keys",_t)}static async getTransportKey(s){return this.get(`transport_key/${s}`)}static async updateTransportKey(s,E,B,K,pt,_t){return this.put(`transport_key/${s}`,{name:E,flood_policy:B,transport_key:K,parent_id:pt,last_used:_t})}static async deleteTransportKey(s){return this.delete(`transport_key/${s}`)}static async updateGlobalFloodPolicy(s){return this.post("global_flood_policy",{global_flood_allow:s})}static async getLogs(){try{return(await yy.get("logs")).data}catch(s){throw this.handleError(s)}}static async deleteAdvert(s){return this.delete(`advert/${s}`)}static async pingNeighbor(s){return this.post("ping_neighbor",s)}static handleError(s){if(_d.isAxiosError(s)){if(s.response){const E=s.response.data?.error||s.response.data?.message||`HTTP ${s.response.status}`;return new Error(E)}else if(s.request)return new Error("Network error - no response received")}return new Error(s instanceof Error?s.message:"Unknown error occurred")}}const Om=oM("system",()=>{const d=Ga(null),s=Ga(!1),E=Ga(null),B=Ga(null),K=Ga("forward"),pt=Ga(!0),_t=Ga(0),Ot=Ga(10),jt=Ga(!1),te=$o(()=>d.value?.config?.node_name??"Unknown"),he=$o(()=>{const bi=d.value?.public_key;return!bi||bi==="Unknown"?"Unknown":bi.length>=16?`${bi.slice(0,8)} ... ${bi.slice(-8)}`:`${bi}`}),De=$o(()=>d.value!==null),er=$o(()=>d.value?.version??"Unknown"),pr=$o(()=>d.value?.core_version??"Unknown"),Mr=$o(()=>d.value?.noise_floor_dbm??null),Tr=$o(()=>Ot.value>0?Math.min(_t.value/Ot.value*100,100):0),Vr=$o(()=>K.value==="monitor"?{text:"Monitor Mode",title:"Monitoring only - not forwarding packets"}:pt.value?{text:"Active",title:"Forwarding with duty cycle enforcement"}:{text:"No Limits",title:"Forwarding without duty cycle enforcement"}),mn=$o(()=>K.value==="monitor"?{active:!1,warning:!0}:{active:!0,warning:!1}),Dt=$o(()=>pt.value?{active:!0,warning:!1}:{active:!1,warning:!0}),cn=bi=>{jt.value=bi};async function Jn(){try{s.value=!0,E.value=null;const bi=await Ah.get("/stats");if(bi.success&&bi.data)return d.value=bi.data,B.value=new Date,Bn(bi.data),bi.data;if(bi&&"version"in bi){const Yi=bi;return d.value=Yi,B.value=new Date,Bn(Yi),Yi}else throw new Error(bi.error||"Failed to fetch stats")}catch(bi){throw E.value=bi instanceof Error?bi.message:"Unknown error occurred",console.error("Error fetching stats:",bi),bi}finally{s.value=!1}}function Bn(bi){if(bi.config){const Ca=bi.config.repeater?.mode;(Ca==="forward"||Ca==="monitor")&&(K.value=Ca);const Ni=bi.config.duty_cycle;if(Ni){pt.value=Ni.enforcement_enabled!==!1;const si=Ni.max_airtime_percent;typeof si=="number"?Ot.value=si:si&&typeof si=="object"&&"parsedValue"in si&&(Ot.value=si.parsedValue||10)}}const Yi=bi.utilization_percent;typeof Yi=="number"?_t.value=Yi:Yi&&typeof Yi=="object"&&"parsedValue"in Yi&&(_t.value=Yi.parsedValue||0)}async function ni(bi){try{const Yi=await Ah.post("/set_mode",{mode:bi});if(Yi.success)return K.value=bi,!0;throw new Error(Yi.error||"Failed to set mode")}catch(Yi){throw E.value=Yi instanceof Error?Yi.message:"Unknown error occurred",console.error("Error setting mode:",Yi),Yi}}async function Wi(bi){try{const Yi=await Ah.post("/set_duty_cycle",{enabled:bi});if(Yi.success)return pt.value=bi,!0;throw new Error(Yi.error||"Failed to set duty cycle")}catch(Yi){throw E.value=Yi instanceof Error?Yi.message:"Unknown error occurred",console.error("Error setting duty cycle:",Yi),Yi}}async function Un(){try{const bi=await Ah.post("/send_advert",{},{timeout:1e4});if(bi.success)return console.log("Advertisement sent successfully:",bi.data),!0;throw new Error(bi.error||"Failed to send advert")}catch(bi){throw E.value=bi instanceof Error?bi.message:"Unknown error occurred",console.error("Error sending advert:",bi),bi}}async function qr(){const bi=K.value==="forward"?"monitor":"forward";return await ni(bi)}async function Di(){return await Wi(!pt.value)}async function Fi(bi=5e3){await Jn();const Yi=setInterval(async()=>{try{await Jn()}catch(Ca){console.error("Auto-refresh error:",Ca)}},bi);return()=>clearInterval(Yi)}function Pi(){d.value=null,E.value=null,B.value=null,s.value=!1,K.value="forward",pt.value=!0,_t.value=0,Ot.value=10}return{stats:d,isLoading:s,error:E,lastUpdated:B,currentMode:K,dutyCycleEnabled:pt,dutyCycleUtilization:_t,dutyCycleMax:Ot,cadCalibrationRunning:jt,nodeName:te,pubKey:he,hasStats:De,version:er,coreVersion:pr,noiseFloorDbm:Mr,dutyCyclePercentage:Tr,statusBadge:Vr,modeButtonState:mn,dutyCycleButtonState:Dt,fetchStats:Jn,setMode:ni,setDutyCycle:Wi,sendAdvert:Un,toggleMode:qr,toggleDutyCycle:Di,startAutoRefresh:Fi,reset:Pi,setCadCalibrationRunning:cn}}),ld=(d,s)=>{const E=d.__vccOpts||d;for(const[B,K]of s)E[B]=K;return E},LQ={},PQ={width:"23",height:"25",viewBox:"0 0 23 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IQ(d,s){return _i(),zi("svg",PQ,s[0]||(s[0]=[Ee("path",{d:"M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z",fill:"white"},null,-1),Ee("path",{d:"M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z",fill:"white"},null,-1)]))}const zQ=ld(LQ,[["render",IQ]]),OQ={},DQ={width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FQ(d,s){return _i(),zi("svg",DQ,s[0]||(s[0]=[$f('',12)]))}const RQ=ld(OQ,[["render",FQ]]),sw=oM("packets",()=>{const d=Ga(null),s=Ga(null),E=Ga([]),B=Ga([]),K=Ga(null),pt=Ga(!1),_t=Ga(null),Ot=Ga(null),jt=Ga([]),te=Ga([]),he=$o(()=>d.value!==null),De=$o(()=>s.value!==null),er=$o(()=>E.value.length>0),pr=$o(()=>B.value.length>0),Mr=$o(()=>K.value?.avg_noise_floor??0),Tr=$o(()=>d.value?.total_packets??0),Vr=$o(()=>d.value?.avg_rssi??0),mn=$o(()=>d.value?.avg_snr??0),Dt=$o(()=>s.value?.uptime_seconds??0),cn=$o(()=>{if(!d.value?.packet_types)return[];const Ni=d.value.packet_types,si=Ni.reduce((Ma,zo)=>Ma+zo.count,0);return Ni.map(Ma=>({type:Ma.type.toString(),count:Ma.count,percentage:si>0?Ma.count/si*100:0}))}),Jn=$o(()=>{const Ni={};return E.value.forEach(si=>{Ni[si.type]||(Ni[si.type]=[]),Ni[si.type].push(si)}),Ni});async function Bn(){try{const Ni=await Ah.get("/stats");if(Ni.success&&Ni.data){s.value=Ni.data;const si=new Date;return te.value.push({timestamp:si,stats:Ni.data}),te.value.length>50&&(te.value=te.value.slice(-50)),Ni.data}else if(Ni&&"version"in Ni){const si=Ni;s.value=si;const Ma=new Date;return te.value.push({timestamp:Ma,stats:si}),te.value.length>50&&(te.value=te.value.slice(-50)),si}else throw new Error(Ni.error||"Failed to fetch system stats")}catch(Ni){throw _t.value=Ni instanceof Error?Ni.message:"Unknown error occurred",console.error("Error fetching system stats:",Ni),Ni}}async function ni(Ni={hours:24}){try{const si=await Ah.get("/noise_floor_history",Ni);if(si.success&&si.data&&si.data.history)return B.value=si.data.history,Ot.value=new Date,si.data.history;throw new Error(si.error||"Failed to fetch noise floor history")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching noise floor history:",si),si}}async function Wi(Ni={hours:24}){try{const si=await Ah.get("/noise_floor_stats",Ni);if(si.success&&si.data&&si.data.stats)return K.value=si.data.stats,Ot.value=new Date,si.data.stats;throw new Error(si.error||"Failed to fetch noise floor stats")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching noise floor stats:",si),si}}const Un=$o(()=>!B.value||!Array.isArray(B.value)?[]:B.value.slice(-50).map(Ni=>Ni.noise_floor_dbm));async function qr(Ni={hours:24}){try{pt.value=!0,_t.value=null;const si=await Ah.get("/packet_stats",Ni);if(si.success&&si.data){d.value=si.data;const Ma=new Date;jt.value.push({timestamp:Ma,stats:si.data}),jt.value.length>50&&(jt.value=jt.value.slice(-50)),Ot.value=Ma}else throw new Error(si.error||"Failed to fetch packet stats")}catch(si){_t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching packet stats:",si)}finally{pt.value=!1}}async function Di(Ni={limit:100}){try{pt.value=!0,_t.value=null;const si=await Ah.get("/recent_packets",Ni);if(si.success&&si.data)E.value=si.data,Ot.value=new Date;else throw new Error(si.error||"Failed to fetch recent packets")}catch(si){_t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching recent packets:",si)}finally{pt.value=!1}}async function Fi(Ni){try{pt.value=!0,_t.value=null;const si=await Ah.get("/filtered_packets",Ni);if(si.success&&si.data)return E.value=si.data,Ot.value=new Date,si.data;throw new Error(si.error||"Failed to fetch filtered packets")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching filtered packets:",si),si}finally{pt.value=!1}}async function Pi(Ni){try{pt.value=!0,_t.value=null;const si=await Ah.get("/packet_by_hash",{packet_hash:Ni});if(si.success&&si.data)return si.data;throw new Error(si.error||"Packet not found")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching packet by hash:",si),si}finally{pt.value=!1}}const bi=$o(()=>{const Ni=jt.value,si=te.value;return{totalPackets:Ni.map(Ma=>Ma.stats.total_packets),transmittedPackets:Ni.map(Ma=>Ma.stats.transmitted_packets),droppedPackets:Ni.map(Ma=>Ma.stats.dropped_packets),avgRssi:Ni.map(Ma=>Ma.stats.avg_rssi),uptimeHours:si.map(Ma=>Math.floor((Ma.stats.uptime_seconds||0)/3600))}});async function Yi(Ni=3e4){await Promise.all([Bn(),qr(),Di(),ni({hours:1}),Wi({hours:1})]);const si=setInterval(async()=>{try{await Promise.all([Bn(),qr(),Di(),ni({hours:1}),Wi({hours:1})])}catch(Ma){console.error("Auto-refresh error:",Ma)}},Ni);return()=>clearInterval(si)}function Ca(){d.value=null,s.value=null,E.value=[],B.value=[],K.value=null,jt.value=[],te.value=[],_t.value=null,Ot.value=null,pt.value=!1}return{packetStats:d,systemStats:s,recentPackets:E,noiseFloorHistory:B,noiseFloorStats:K,packetStatsHistory:jt,systemStatsHistory:te,isLoading:pt,error:_t,lastUpdated:Ot,hasPacketStats:he,hasSystemStats:De,hasRecentPackets:er,hasNoiseFloorData:pr,currentNoiseFloor:Mr,totalPackets:Tr,averageRSSI:Vr,averageSNR:mn,uptime:Dt,packetTypeBreakdown:cn,recentPacketsByType:Jn,sparklineData:bi,noiseFloorSparklineData:Un,fetchSystemStats:Bn,fetchPacketStats:qr,fetchRecentPackets:Di,fetchFilteredPackets:Fi,getPacketByHash:Pi,fetchNoiseFloorHistory:ni,fetchNoiseFloorStats:Wi,startAutoRefresh:Yi,reset:Ca}}),BQ={class:"glass-card-green p-5 relative overflow-hidden"},NQ={key:0,class:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10 rounded-lg"},jQ={class:"flex items-baseline gap-2 mb-8"},UQ={class:"text-primary text-2xl font-medium"},VQ={class:"absolute bottom-0 left-5 w-[196px] h-[30px]",viewBox:"0 0 196 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HQ=["d"],WQ=["d"],qQ=["cy"],$Q=Dc({__name:"RFNoiseFloor",setup(d){const s=sw(),E=Om(),B=Ga(null),K=he=>{if(he.length<2)return"";const De=196,er=30,pr=4,Mr=-125,Vr=-105-Mr;let mn="";return he.forEach((Dt,cn)=>{const Jn=cn/(he.length-1)*De,Bn=(Dt-Mr)/Vr,ni=er-Bn*(er-pr*2)-pr;if(cn===0)mn+=`M ${Jn} ${ni}`;else{const Un=((cn-1)/(he.length-1)*De+Jn)/2;mn+=` Q ${Un} ${ni} ${Jn} ${ni}`}}),mn},pt=async()=>{try{await Promise.all([s.fetchNoiseFloorHistory({hours:1}),s.fetchNoiseFloorStats({hours:1})])}catch(he){console.error("Error fetching noise floor data:",he)}};bp(()=>{pt(),B.value=window.setInterval(pt,5e3)}),gg(()=>{B.value&&clearInterval(B.value)});const _t=$o(()=>{const he=s.noiseFloorSparklineData;return he&&he.length>0?he[he.length-1]:s.noiseFloorStats?.avg_noise_floor??-116}),Ot=$o(()=>s.noiseFloorSparklineData),jt=$o(()=>K(Ot.value)),te=$o(()=>{if(Ot.value.length===0)return 15;const he=Ot.value[Ot.value.length-1],De=-125,pr=-105-De;return 30-(he-De)/pr*22-4});return(he,De)=>(_i(),zi("div",BQ,[zl(E).cadCalibrationRunning?(_i(),zi("div",NQ,De[0]||(De[0]=[$f('
CAD Calibration

In Progress

',1)]))):is("",!0),De[4]||(De[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"RF NOISE FLOOR",-1)),Ee("div",jQ,[Ee("span",UQ,Qi(_t.value),1),De[1]||(De[1]=Ee("span",{class:"text-dark-text text-xs uppercase"},"dBm",-1))]),(_i(),zi("svg",VQ,[De[3]||(De[3]=$f('',1)),Ot.value.length>1?(_i(),zi("path",{key:0,d:`${jt.value} L 196 30 L 0 30 Z`,fill:"url(#rf-noise-gradient)",class:"transition-all duration-500 ease-out"},null,8,HQ)):is("",!0),Ot.value.length>1?(_i(),zi("path",{key:1,d:jt.value,stroke:"#B1FFFF","stroke-width":"2",fill:"none",filter:"url(#line-glow)",class:"transition-all duration-500 ease-out"},null,8,WQ)):is("",!0),Ot.value.length>0?(_i(),zi("circle",{key:2,cx:196,cy:te.value,r:"2",fill:"#B1FFFF",class:"animate-pulse"},De[2]||(De[2]=[Ee("animate",{attributeName:"r",values:"2;3;2",dur:"2s",repeatCount:"indefinite"},null,-1)]),8,qQ)):is("",!0)]))]))}}),jO=ld($Q,[["__scopeId","data-v-ad12b3cb"]]),ZQ={},GQ={width:"800px",height:"800px",viewBox:"0 -1.5 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"w-full h-full"};function YQ(d,s){return _i(),zi("svg",GQ,s[0]||(s[0]=[Ee("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[Ee("g",{transform:"translate(-420.000000, -3641.000000)",fill:"currentColor"},[Ee("g",{id:"icons",transform:"translate(56.000000, 160.000000)"},[Ee("path",{d:"M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831",id:"radio_tower-[#1019]"})])])],-1)]))}const KQ=ld(ZQ,[["render",YQ]]),XQ={class:"text-center"},JQ={class:"relative flex items-center justify-center mb-8"},QQ={class:"relative w-32 h-32"},ttt={class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"},ett={key:0,class:"absolute inset-0 flex items-center justify-center"},rtt={key:1,class:"absolute inset-0 flex items-center justify-center"},ntt={key:2,class:"absolute inset-0"},itt={class:"mb-6"},att={key:0,class:"text-white text-lg"},ott={key:1,class:"text-accent-green text-lg font-medium"},stt={key:2,class:"text-secondary text-lg"},ltt={key:3,class:"text-accent-red text-lg"},utt={key:4,class:"text-dark-text"},ctt={key:5,class:"mt-3"},htt={key:0,class:"text-secondary text-sm"},ftt={key:1,class:"text-accent-red text-sm"},dtt={key:0,class:"flex gap-3"},ptt={key:1,class:"text-dark-text text-sm"},mtt=Dc({name:"AdvertModal",__name:"AdvertModal",props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:["close","send"],setup(d,{emit:s}){const E=d,B=s,K=Ga(!1),pt=Ga(!1),_t=Ga(!1);Em(()=>E.isOpen,he=>{he?(K.value=!0,setTimeout(()=>{pt.value=!0},50)):(pt.value=!1,_t.value=!1,setTimeout(()=>{K.value=!1},300))},{immediate:!0}),Em(()=>E.isLoading,he=>{he||setTimeout(()=>{_t.value=!1},1e3)});const Ot=()=>{E.isLoading||B("close")},jt=()=>{E.isLoading||(_t.value=!0,B("send"))},te=he=>he?.includes("Network error - no response received")||he?.includes("timeout");return(he,De)=>(_i(),Z0(XA,{to:"body"},[K.value?(_i(),zi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:Pm(Ot,["self"])},[Ee("div",{class:jo(["absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300",pt.value?"opacity-100":"opacity-0"])},null,2),Ee("div",{class:jo(["relative glass-card rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300",pt.value?"scale-100 opacity-100":"scale-95 opacity-0"])},[he.isLoading?is("",!0):(_i(),zi("button",{key:0,onClick:Ot,class:"absolute top-4 right-4 text-dark-text hover:text-white transition-colors p-2"},De[0]||(De[0]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))),Ee("div",XQ,[De[6]||(De[6]=Ee("h2",{class:"text-white text-xl font-semibold mb-6"},"Send Advertisement",-1)),Ee("div",JQ,[Ee("div",QQ,[Ee("div",ttt,[Wl(KQ,{class:jo(["w-16 h-16 transition-all duration-500",[he.isLoading?"animate-pulse":"",he.isSuccess?"text-accent-green":he.error&&!te(he.error)?"text-accent-red":"text-primary"]]),style:hm({filter:he.isLoading?"drop-shadow(0 0 8px currentColor)":he.isSuccess?"drop-shadow(0 0 8px #A5E5B6)":he.error&&!te(he.error)?"drop-shadow(0 0 8px #FB787B)":"drop-shadow(0 0 4px #AAE8E8)"})},null,8,["class","style"])]),he.isLoading||he.isSuccess?(_i(),zi("div",ett,[Ee("div",{class:jo(["absolute w-16 h-16 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/60":"border-primary/60"]]),style:{"animation-duration":"1.5s"}},null,2),Ee("div",{class:jo(["absolute w-24 h-24 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/40":"border-primary/40"]]),style:{"animation-duration":"2s","animation-delay":"0.3s"}},null,2),Ee("div",{class:jo(["absolute w-32 h-32 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/20":"border-primary/20"]]),style:{"animation-duration":"2.5s","animation-delay":"0.6s"}},null,2)])):is("",!0),_t.value?(_i(),zi("div",rtt,De[1]||(De[1]=[Ee("div",{class:"absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast"},null,-1),Ee("div",{class:"absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast",style:{"animation-delay":"0.1s"}},null,-1),Ee("div",{class:"absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast",style:{"animation-delay":"0.2s"}},null,-1),Ee("div",{class:"absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast",style:{"animation-delay":"0.3s"}},null,-1)]))):is("",!0),he.isLoading||he.isSuccess?(_i(),zi("div",ntt,[Ee("div",{class:jo(["absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"0.5s"}},De[2]||(De[2]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1s"}},De[3]||(De[3]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1.5s",transform:"translateY(-50%)"}},De[4]||(De[4]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"2s"}},De[5]||(De[5]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2)])):is("",!0)])]),Ee("div",itt,[he.isLoading?(_i(),zi("p",att," Broadcasting advertisement... ")):he.isSuccess?(_i(),zi("p",ott," Advertisement sent successfully! ")):he.error&&te(he.error)?(_i(),zi("p",stt," Advertisement likely sent ")):he.error?(_i(),zi("p",ltt," Failed to send advertisement ")):(_i(),zi("p",utt," This will broadcast your node's presence to nearby nodes. ")),he.error?(_i(),zi("div",ctt,[te(he.error)?(_i(),zi("p",htt," Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. ")):(_i(),zi("p",ftt,Qi(he.error),1))])):is("",!0)]),!he.isLoading&&!he.isSuccess?(_i(),zi("div",dtt,[Ee("button",{onClick:Ot,class:"flex-1 glass-card border border-dark-border hover:border-primary rounded-[10px] px-6 py-3 text-dark-text hover:text-white transition-all duration-200"}," Cancel "),Ee("button",{onClick:jt,class:jo(["flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg",[he.error&&te(he.error)?"bg-secondary hover:bg-secondary/90 text-dark-bg hover:shadow-secondary/20":"bg-primary hover:bg-primary/90 text-dark-bg hover:shadow-primary/20"]])},Qi(he.error&&te(he.error)?"Try Again":"Send Advertisement"),3)])):is("",!0),he.isSuccess?(_i(),zi("div",ptt," Closing automatically... ")):is("",!0)])],2)])):is("",!0)]))}}),UO=ld(mtt,[["__scopeId","data-v-a5eb8c7f"]]),gtt={},vtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ytt(d,s){return _i(),zi("svg",vtt,s[0]||(s[0]=[$f('',2)]))}const VO=ld(gtt,[["render",ytt]]),xtt={},_tt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function btt(d,s){return _i(),zi("svg",_tt,s[0]||(s[0]=[$f('',9)]))}const HO=ld(xtt,[["render",btt]]),wtt={},ktt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ttt(d,s){return _i(),zi("svg",ktt,s[0]||(s[0]=[$f('',2)]))}const WO=ld(wtt,[["render",Ttt]]),Att={},Mtt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Stt(d,s){return _i(),zi("svg",Mtt,s[0]||(s[0]=[Ee("path",{d:"M9.81633 1.99133L8.5085 0.683492C8.29229 0.466088 8.03511 0.293723 7.75185 0.176372C7.46859 0.059021 7.16486 -0.000985579 6.85825 -0.000175002H1.75C1.28587 -0.000175002 0.840752 0.184199 0.512563 0.512388C0.184375 0.840577 0 1.2857 0 1.74983V13.9998H10.5V3.64099C10.4985 3.02248 10.2528 2.4296 9.81633 1.99133ZM8.9915 2.81616C9.02083 2.84799 9.04829 2.88149 9.07375 2.91649H7.58333V1.42608C7.61834 1.45153 7.65184 1.479 7.68367 1.50833L8.9915 2.81616ZM1.16667 12.8332V1.74983C1.16667 1.59512 1.22812 1.44674 1.33752 1.33735C1.44692 1.22795 1.59529 1.16649 1.75 1.16649H6.41667V4.08316H9.33333V12.8332H1.16667ZM2.33333 9.33316H8.16667V5.83316H2.33333V9.33316ZM3.5 6.99983H7V8.16649H3.5V6.99983ZM2.33333 10.4998H8.16667V11.6665H2.33333V10.4998Z",fill:"white"},null,-1)]))}const qO=ld(Att,[["render",Stt]]),Ett={},Ctt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ltt(d,s){return _i(),zi("svg",Ctt,s[0]||(s[0]=[$f('',2)]))}const $O=ld(Ett,[["render",Ltt]]),Ptt={},Itt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ztt(d,s){return _i(),zi("svg",Itt,s[0]||(s[0]=[Ee("path",{d:"M10.5 14.0004H9.33333V11.0586C9.33287 10.6013 9.15099 10.1628 8.82761 9.83942C8.50422 9.51603 8.06575 9.33415 7.60842 9.33369H2.89158C2.43425 9.33415 1.99578 9.51603 1.67239 9.83942C1.34901 10.1628 1.16713 10.6013 1.16667 11.0586V14.0004H0V11.0586C0.000926233 10.292 0.305872 9.55705 0.847948 9.01497C1.39002 8.47289 2.12497 8.16795 2.89158 8.16702H7.60842C8.37503 8.16795 9.10998 8.47289 9.65205 9.01497C10.1941 9.55705 10.4991 10.292 10.5 11.0586V14.0004Z",fill:"white"},null,-1),Ee("path",{d:"M5.25 6.99997C4.55777 6.99997 3.88108 6.7947 3.30551 6.41011C2.72993 6.02553 2.28133 5.4789 2.01642 4.83936C1.75152 4.19982 1.6822 3.49609 1.81725 2.81716C1.9523 2.13822 2.28564 1.51458 2.77513 1.0251C3.26461 0.535614 3.88825 0.202271 4.56719 0.0672226C5.24612 -0.0678257 5.94985 0.00148598 6.58939 0.266393C7.22894 0.531299 7.77556 0.979903 8.16015 1.55548C8.54473 2.13105 8.75 2.80774 8.75 3.49997C8.74908 4.42794 8.38003 5.31765 7.72385 5.97382C7.06768 6.63 6.17798 6.99904 5.25 6.99997ZM5.25 1.16664C4.78851 1.16664 4.33739 1.30349 3.95367 1.55988C3.56996 1.81627 3.27089 2.18068 3.09428 2.60704C2.91768 3.0334 2.87147 3.50256 2.9615 3.95518C3.05153 4.4078 3.27376 4.82357 3.60009 5.14989C3.92641 5.47621 4.34217 5.69844 4.79479 5.78847C5.24741 5.8785 5.71657 5.83229 6.14293 5.65569C6.56929 5.47909 6.93371 5.18002 7.1901 4.7963C7.44649 4.41259 7.58334 3.96146 7.58334 3.49997C7.58334 2.88113 7.3375 2.28764 6.89992 1.85006C6.46233 1.41247 5.86884 1.16664 5.25 1.16664Z",fill:"white"},null,-1)]))}const ZO=ld(Ptt,[["render",ztt]]),Ott={},Dtt={width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ftt(d,s){return _i(),zi("svg",Dtt,s[0]||(s[0]=[Ee("path",{d:"M6.77889 9.16667H10.1122V12.5M4.11222 3.83333H0.77889V0.5M10.3906 4.50227C10.0168 3.57711 9.39097 2.77536 8.58423 2.18815C7.77749 1.60094 6.82233 1.25168 5.82707 1.18034C4.8318 1.109 3.83627 1.31827 2.95402 1.78441C2.07177 2.25055 1.3381 2.95503 0.836182 3.81742M0.500244 8.49805C0.874034 9.42321 1.49986 10.225 2.30661 10.8122C3.11335 11.3994 4.06948 11.7482 5.06474 11.8195C6.06001 11.8909 7.05473 11.6816 7.93697 11.2155C8.81922 10.7494 9.55239 10.045 10.0543 9.18262",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const GO=ld(Ott,[["render",Ftt]]),Rtt={},Btt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ntt(d,s){return _i(),zi("svg",Btt,s[0]||(s[0]=[$f('',2)]))}const YO=ld(Rtt,[["render",Ntt]]),jtt={class:"w-[285px] flex-shrink-0 p-[15px] hidden lg:block"},Utt={class:"glass-card h-full p-6"},Vtt={class:"mb-12"},Htt={class:"text-[#C3C3C3] text-sm"},Wtt=["title"],qtt={class:"text-[#C3C3C3] text-sm mt-1"},$tt={class:"mb-8"},Ztt={class:"mb-8"},Gtt={class:"space-y-2"},Ytt=["onClick"],Ktt={class:"mb-8"},Xtt={class:"space-y-2"},Jtt=["onClick"],Qtt=["disabled"],tet={class:"flex items-center gap-3"},eet=["disabled"],ret={class:"flex items-center gap-3"},net={class:"mb-4"},iet={class:"flex items-center gap-2"},aet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},oet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},set={key:0,class:"mb-4"},uet={class:"text-dark-text text-xs mb-2"},cet={class:"text-white"},het={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},fet={class:"flex items-center justify-between"},det={class:"flex items-center gap-2 text-dark-text text-xs"},pet={class:"flex items-center gap-2"},met={href:"https://github.com/rightup",target:"_blank",class:"inline-block"},get={href:"https://buymeacoffee.com/rightup",target:"_blank",class:"inline-block"},vet=Dc({name:"SidebarNav",__name:"Sidebar",setup(d){const s=pO(),E=mO(),B=Om(),K=Ga(!1),pt=Ga(!1),_t=Ga(!1),Ot=Ga(!1),jt=Ga(!1),te=Ga(null);let he=null;bp(async()=>{he=await B.startAutoRefresh(5e3)}),Iy(()=>{he&&he()});const De={dashboard:HO,neighbors:ZO,statistics:$O,configuration:VO,logs:qO,help:WO},er=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],pr=$o(()=>Bn=>E.path===Bn),Mr=Bn=>{s.push(Bn)},Tr=async()=>{K.value=!0,te.value=null;try{await B.sendAdvert(),jt.value=!0,setTimeout(()=>{Vr()},2e3)}catch(Bn){te.value=Bn instanceof Error?Bn.message:"Unknown error occurred",console.error("Failed to send advert:",Bn)}finally{K.value=!1}},Vr=()=>{Ot.value=!1,jt.value=!1,te.value=null,K.value=!1},mn=async()=>{if(!pt.value){pt.value=!0;try{await B.toggleMode()}catch(Bn){console.error("Failed to toggle mode:",Bn)}finally{pt.value=!1}}},Dt=async()=>{if(!_t.value){_t.value=!0;try{await B.toggleDutyCycle()}catch(Bn){console.error("Failed to toggle duty cycle:",Bn)}finally{_t.value=!1}}},cn=Ga(new Date().toLocaleTimeString());setInterval(()=>{cn.value=new Date().toLocaleTimeString()},1e3);const Jn=$o(()=>{const Bn=B.dutyCyclePercentage;let ni="#A5E5B6";return Bn>90?ni="#FB787B":Bn>70&&(ni="#FFC246"),{width:Bn===0?"2px":`${Math.max(Bn,2)}%`,backgroundColor:ni}});return(Bn,ni)=>(_i(),zi(Pu,null,[Ee("aside",jtt,[Ee("div",Utt,[Ee("div",Vtt,[ni[1]||(ni[1]=Ee("h1",{class:"text-white text-[22px] font-bold mb-2"},"pyMC Repeater",-1)),Ee("p",Htt,[Qu(Qi(zl(B).nodeName)+" ",1),Ee("span",{class:jo(["inline-block w-2 h-2 rounded-full ml-2",zl(B).statusBadge.text==="Active"?"bg-accent-green":zl(B).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:zl(B).statusBadge.title},null,10,Wtt)]),Ee("p",qtt,"<"+Qi(zl(B).pubKey)+">",1)]),ni[10]||(ni[10]=Ee("div",{class:"border-t border-dark-border mb-6"},null,-1)),Ee("div",$tt,[ni[3]||(ni[3]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"Actions",-1)),Ee("button",{onClick:ni[0]||(ni[0]=Wi=>Ot.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors"},ni[2]||(ni[2]=[Ee("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),Ee("div",Ztt,[ni[4]||(ni[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"Monitoring",-1)),Ee("div",Gtt,[(_i(!0),zi(Pu,null,Jh(er.slice(0,3),Wi=>(_i(),zi("button",{key:Wi.name,onClick:Un=>Mr(Wi.route),class:jo([pr.value(Wi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(De[Wi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Wi.name),1)],10,Ytt))),128))])]),Ee("div",Ktt,[ni[5]||(ni[5]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"System",-1)),Ee("div",Xtt,[(_i(!0),zi(Pu,null,Jh(er.slice(3),Wi=>(_i(),zi("button",{key:Wi.name,onClick:Un=>Mr(Wi.route),class:jo([pr.value(Wi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(De[Wi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Wi.name),1)],10,Jtt))),128))])]),Wl(jO,{"current-value":zl(B).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-6"},null,8,["current-value"]),Ee("button",{onClick:mn,disabled:pt.value,class:jo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",zl(B).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",tet,[Wl(GO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),ni[6]||(ni[6]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(B).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Qi(pt.value?"Changing...":zl(B).currentMode.charAt(0).toUpperCase()+zl(B).currentMode.slice(1)),3)],10,Qtt),Ee("button",{onClick:Dt,disabled:_t.value,class:jo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",zl(B).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",ret,[Wl(YO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),ni[7]||(ni[7]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(B).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Qi(_t.value?"Changing...":zl(B).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,eet),Ee("div",net,[Ee("div",iet,[Ee("span",aet," R:v"+Qi(zl(B).version),1),Ee("span",oet," C:v"+Qi(zl(B).coreVersion),1)])]),ni[11]||(ni[11]=Ee("div",{class:"border-t border-accent-green mb-4"},null,-1)),zl(B).dutyCycleEnabled?(_i(),zi("div",set,[Ee("p",uet,[ni[8]||(ni[8]=Qu(" Duty Cycle: ",-1)),Ee("span",cet,Qi(zl(B).dutyCycleUtilization.toFixed(1))+"% / "+Qi(zl(B).dutyCycleMax.toFixed(1))+"%",1)]),Ee("div",het,[Ee("div",{class:"h-full rounded-full transition-all duration-300",style:hm(Jn.value)},null,4)])])):is("",!0),Ee("div",fet,[Ee("div",det,[ni[9]||(ni[9]=Ee("svg",{class:"w-3 h-3",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z",fill:"currentColor"})],-1)),Qu(" Last Updated: "+Qi(cn.value),1)]),Ee("div",pet,[Ee("a",met,[Wl(zQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})]),Ee("a",get,[Wl(RQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})])])])])]),Wl(UO,{isOpen:Ot.value,isLoading:K.value,isSuccess:jt.value,error:te.value,onClose:Vr,onSend:Tr},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),yet={key:0,class:"fixed inset-0 z-40 lg:hidden"},xet={class:"absolute left-0 top-0 bottom-0 w-72 p-4"},_et={class:"glass-card h-full p-6 overflow-auto"},bet={class:"mb-6 flex items-center justify-between"},wet={class:"text-[#C3C3C3] text-sm"},ket=["title"],Tet={class:"text-[#C3C3C3] text-sm mt-1"},Aet={class:"mb-4"},Met={class:"mb-4"},Eet={class:"space-y-2 mb-3"},Cet=["onClick"],Let={class:"mb-4"},Pet={class:"space-y-2 mb-3"},Iet=["onClick"],zet=["disabled"],Oet={class:"flex items-center gap-3"},Det=["disabled"],Fet={class:"flex items-center gap-3"},Ret={class:"mb-4"},Bet={class:"flex items-center gap-2"},Net={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},jet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Uet={key:0,class:"mb-4"},Vet={class:"text-dark-text text-xs mb-2"},Het={class:"text-white"},Wet={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},qet={class:"text-dark-text text-xs"},$et=Dc({name:"MobileSidebar",__name:"MobileSidebar",props:{showMobileSidebar:{type:Boolean}},emits:["update:showMobileSidebar"],setup(d,{emit:s}){const E=s,B=pO(),K=mO(),pt=Om(),_t=Ga(!1),Ot=Ga(!1),jt=Ga(!1),te=Ga(!1),he=Ga(!1),De=Ga(null);let er=null;bp(async()=>{er=await pt.startAutoRefresh(5e3)}),Iy(()=>{er&&er()});const pr={dashboard:HO,neighbors:ZO,statistics:$O,configuration:VO,logs:qO,help:WO},Mr=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],Tr=$o(()=>Un=>K.path===Un),Vr=Un=>{B.push(Un),mn()},mn=()=>{E("update:showMobileSidebar",!1)},Dt=async()=>{_t.value=!0,De.value=null;try{await pt.sendAdvert(),he.value=!0,setTimeout(()=>{cn()},2e3)}catch(Un){De.value=Un instanceof Error?Un.message:"Unknown error occurred",console.error("Failed to send advert:",Un)}finally{_t.value=!1}},cn=()=>{te.value=!1,he.value=!1,De.value=null,_t.value=!1},Jn=async()=>{if(!Ot.value){Ot.value=!0;try{await pt.toggleMode()}catch(Un){console.error("Failed to toggle mode:",Un)}finally{Ot.value=!1}}},Bn=async()=>{if(!jt.value){jt.value=!0;try{await pt.toggleDutyCycle()}catch(Un){console.error("Failed to toggle duty cycle:",Un)}finally{jt.value=!1}}},ni=Ga(new Date().toLocaleTimeString());setInterval(()=>{ni.value=new Date().toLocaleTimeString()},1e3);const Wi=$o(()=>{const Un=pt.dutyCyclePercentage;let qr="#A5E5B6";return Un>90?qr="#FB787B":Un>70&&(qr="#FFC246"),{width:Un===0?"2px":`${Math.max(Un,2)}%`,backgroundColor:qr}});return(Un,qr)=>(_i(),zi(Pu,null,[Un.showMobileSidebar?(_i(),zi("div",yet,[Ee("div",{class:"absolute inset-0 bg-black/50",onClick:mn}),Ee("div",xet,[Ee("div",_et,[Ee("div",bet,[Ee("div",null,[qr[1]||(qr[1]=Ee("h1",{class:"text-white text-[20px] font-bold"},"pyMC Repeater",-1)),Ee("p",wet,[Qu(Qi(zl(pt).nodeName)+" ",1),Ee("span",{class:jo(["inline-block w-2 h-2 rounded-full ml-2",zl(pt).statusBadge.text==="Active"?"bg-accent-green":zl(pt).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:zl(pt).statusBadge.title},null,10,ket)]),Ee("p",Tet,"<"+Qi(zl(pt).pubKey)+">",1)]),Ee("button",{onClick:mn,class:"text-dark-text"},"✕")]),qr[9]||(qr[9]=Ee("div",{class:"border-t border-dark-border mb-4"},null,-1)),Ee("div",Aet,[qr[3]||(qr[3]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"Actions",-1)),Ee("button",{onClick:qr[0]||(qr[0]=Di=>te.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors mb-2"},qr[2]||(qr[2]=[Ee("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),Ee("div",Met,[qr[4]||(qr[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"Monitoring",-1)),Ee("div",Eet,[(_i(!0),zi(Pu,null,Jh(Mr.slice(0,3),Di=>(_i(),zi("button",{key:Di.name,onClick:Fi=>Vr(Di.route),class:jo([Tr.value(Di.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(pr[Di.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Di.name),1)],10,Cet))),128))])]),Ee("div",Let,[qr[5]||(qr[5]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"System",-1)),Ee("div",Pet,[(_i(!0),zi(Pu,null,Jh(Mr.slice(3),Di=>(_i(),zi("button",{key:Di.name,onClick:Fi=>Vr(Di.route),class:jo([Tr.value(Di.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(pr[Di.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Di.name),1)],10,Iet))),128))])]),Wl(jO,{"current-value":zl(pt).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-4"},null,8,["current-value"]),Ee("button",{onClick:Jn,disabled:Ot.value,class:jo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",zl(pt).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",Oet,[Wl(GO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),qr[6]||(qr[6]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(pt).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Qi(Ot.value?"Changing...":zl(pt).currentMode.charAt(0).toUpperCase()+zl(pt).currentMode.slice(1)),3)],10,zet),Ee("button",{onClick:Bn,disabled:jt.value,class:jo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",zl(pt).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",Fet,[Wl(YO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),qr[7]||(qr[7]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(pt).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Qi(jt.value?"Changing...":zl(pt).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,Det),Ee("div",Ret,[Ee("div",Bet,[Ee("span",Net," R:v"+Qi(zl(pt).version),1),Ee("span",jet," C:v"+Qi(zl(pt).coreVersion),1)])]),qr[10]||(qr[10]=Ee("div",{class:"border-t border-accent-green mb-4"},null,-1)),zl(pt).dutyCycleEnabled?(_i(),zi("div",Uet,[Ee("p",Vet,[qr[8]||(qr[8]=Qu(" Duty Cycle: ",-1)),Ee("span",Het,Qi(zl(pt).dutyCycleUtilization.toFixed(1))+"% / "+Qi(zl(pt).dutyCycleMax.toFixed(1))+"%",1)]),Ee("div",Wet,[Ee("div",{class:"h-full rounded-full transition-all duration-300",style:hm(Wi.value)},null,4)])])):is("",!0),Ee("p",qet,"Last Updated: "+Qi(ni.value),1)])])])):is("",!0),Wl(UO,{isOpen:te.value,isLoading:_t.value,isSuccess:he.value,error:De.value,onClose:cn,onSend:Dt},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),Zet={class:"glass-card p-6 mb-5 rounded-[20px] relative z-10"},Get={class:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"},Yet={class:"flex items-center gap-3"},Ket={class:"text-right mr-4"},Xet={key:0,class:"flex items-center gap-2"},Jet={key:1,class:"space-y-1"},Qet={class:"text-dark-text text-sm"},trt={class:"text-primary font-medium"},ert={key:0,class:"text-xs text-dark-text/80"},rrt={key:0},nrt={key:1,class:"text-xs text-dark-text/60"},irt={key:2},art={key:0,class:"text-xs text-dark-text/60"},ort=["disabled"],srt={class:"flex items-center justify-between mb-3"},lrt={class:"flex items-center gap-2"},urt=["disabled"],crt=["disabled"],hrt={class:"space-y-3 text-sm"},frt={key:0,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},drt={class:"flex items-center justify-between"},prt={class:"text-accent-red font-bold"},mrt={class:"text-xs text-gray-400 mt-1"},grt={key:1,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-accent-green"},vrt={class:"flex items-center justify-between"},yrt={class:"text-accent-green font-bold"},xrt={key:0,class:"text-xs text-gray-400 mt-1"},_rt={key:2,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},brt={key:3,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},wrt={class:"text-xs text-gray-400"},krt={class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-primary"},Trt={class:"flex items-center justify-between"},Art={class:"text-primary font-bold"},Mrt={key:0,class:"text-xs text-gray-400 mt-1"},Srt={class:"flex items-center justify-between"},Ert={class:"text-white font-medium"},Crt={key:0,class:"mt-2"},Lrt={class:"text-xs text-gray-400"},Prt={class:"text-gray-300"},Irt={key:4,class:"bg-[#0B1014] p-4 rounded-lg border border-white/10 text-center"},zrt={key:5,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 text-center"},Ort=Dc({name:"TopBar",__name:"TopBar",emits:["toggleMobileSidebar"],setup(d,{emit:s}){const E=s,B=Om(),K=Ga(!1),pt=Ga(null),_t=Ga({hasUpdate:!1,currentVersion:"",latestVersion:"",isChecking:!1,lastChecked:null,error:null}),Ot=Ga({}),jt=Ga(!0),te=Ga(null),he=["Chat Node","Repeater","Room Server"];function De(Un){const qr=Un.target;pt.value&&!pt.value.contains(qr)&&(K.value=!1)}const er=async()=>{try{jt.value=!0;const Un={};for(const qr of he)try{const Di=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(qr)}&hours=168`);Di.success&&Array.isArray(Di.data)?Un[qr]=Di.data:Un[qr]=[]}catch(Di){console.error(`Error fetching ${qr} nodes:`,Di),Un[qr]=[]}Ot.value=Un,te.value=new Date}catch(Un){console.error("Error updating tracked nodes:",Un)}finally{jt.value=!1}},pr=async()=>{if(!_t.value.isChecking)try{_t.value.isChecking=!0,_t.value.error=null,await B.fetchStats();const Un=B.version;if(!Un||Un==="Unknown"){_t.value.error="Unable to determine current version";return}const Di=await fetch("https://raw.githubusercontent.com/rightup/pyMC_Repeater/main/repeater/__init__.py");if(!Di.ok)throw new Error(`GitHub request failed: ${Di.status}`);const Pi=(await Di.text()).match(/__version__\s*=\s*["']([^"']+)["']/);if(!Pi)throw new Error("Could not parse version from GitHub file");const bi=Pi[1];_t.value.currentVersion=Un,_t.value.latestVersion=bi,_t.value.lastChecked=new Date,_t.value.hasUpdate=Un!==bi}catch(Un){console.error("Error checking for updates:",Un),_t.value.error=Un instanceof Error?Un.message:"Failed to check for updates"}finally{_t.value.isChecking=!1}},Mr=$o(()=>Object.values(Ot.value).reduce((qr,Di)=>qr+Di.length,0)),Tr=$o(()=>he.map(qr=>({type:qr,count:Ot.value[qr]?.length||0})).filter(qr=>qr.count>0)),Vr=$o(()=>_t.value.hasUpdate||Mr.value>0),mn=Un=>({"Chat Node":"text-blue-400",Repeater:"text-accent-green","Room Server":"text-accent-purple"})[Un]||"text-gray-400",Dt=Un=>{const qr=Ot.value[Un]||[];return qr.length===0?"None":qr.reduce((Fi,Pi)=>Pi.last_seen>Fi.last_seen?Pi:Fi,qr[0]).node_name||"Unknown Node"};let cn=null,Jn=null;const Bn=()=>{cn&&clearInterval(cn),cn=setInterval(()=>{er()},3e4),Jn&&clearInterval(Jn),Jn=setInterval(()=>{pr()},6e5)},ni=()=>{cn&&(clearInterval(cn),cn=null),Jn&&(clearInterval(Jn),Jn=null)};bp(()=>{document.addEventListener("click",De),er(),pr(),Bn()}),gg(()=>{document.removeEventListener("click",De),ni()});const Wi=()=>{E("toggleMobileSidebar")};return(Un,qr)=>(_i(),zi("div",Zet,[Ee("div",Get,[Ee("div",{class:"flex items-center gap-3"},[Ee("button",{onClick:Wi,class:"lg:hidden w-10 h-10 rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors"},qr[2]||(qr[2]=[Ee("svg",{class:"w-5 h-5 text-white",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M3 6h14M3 10h14M3 14h14",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),qr[3]||(qr[3]=Ee("div",null,[Ee("h1",{class:"text-white text-[35px] font-bold mb-2"},"Welcome👋")],-1))]),Ee("div",Yet,[Ee("div",Ket,[jt.value?(_i(),zi("div",Xet,qr[4]||(qr[4]=[Ee("div",{class:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary"},null,-1),Ee("p",{class:"text-dark-text text-sm"},"Loading tracking data...",-1)]))):Mr.value>0?(_i(),zi("div",Jet,[Ee("p",Qet,[qr[5]||(qr[5]=Qu(" Tracking: ",-1)),Ee("span",trt,Qi(Mr.value)+" node"+Qi(Mr.value===1?"":"s"),1)]),Tr.value.length>1?(_i(),zi("div",ert,[(_i(!0),zi(Pu,null,Jh(Tr.value,(Di,Fi)=>(_i(),zi("span",{key:Di.type,class:"inline"},[Qu(Qi(Di.count)+" "+Qi(Di.type)+Qi(Di.count===1?"":"s"),1),FiK.value=!K.value,["stop"])),class:"w-[35px] h-[35px] rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors relative"},[qr[8]||(qr[8]=Ee("svg",{class:"w-5 h-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),Vr.value?(_i(),zi("span",{key:0,class:jo(["absolute top-2 right-2 w-2 h-2 rounded-full",_t.value.hasUpdate?"bg-accent-red animate-pulse":"bg-primary"])},null,2)):is("",!0)]),K.value?(_i(),zi("div",{key:0,ref_key:"notifRef",ref:pt,class:"absolute right-6 top-14 z-[100] w-80 bg-[#1A1E1F] border border-white/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm",onClick:qr[1]||(qr[1]=Pm(()=>{},["stop"]))},[Ee("div",srt,[qr[10]||(qr[10]=Ee("p",{class:"text-white font-semibold"},"System Status",-1)),Ee("div",lrt,[Ee("button",{onClick:pr,disabled:_t.value.isChecking,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50",title:"Check for updates"},Qi(_t.value.isChecking?"Checking...":"Check Updates"),9,urt),qr[9]||(qr[9]=Ee("span",{class:"text-dark-text text-xs"},"•",-1)),Ee("button",{onClick:er,disabled:jt.value,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50"},Qi(jt.value?"Updating...":"Refresh"),9,crt)])]),Ee("div",hrt,[_t.value.hasUpdate?(_i(),zi("div",frt,[Ee("div",drt,[qr[11]||(qr[11]=Ee("span",{class:"text-white font-medium"},"Update Available",-1)),Ee("span",prt,Qi(_t.value.latestVersion),1)]),Ee("div",mrt," Current: "+Qi(_t.value.currentVersion),1),qr[12]||(qr[12]=Ee("div",{class:"text-xs text-gray-300 mt-2"},[Ee("a",{href:"https://github.com/rightup/pyMC_Repeater",target:"_blank",class:"text-accent-red hover:text-accent-red/80 underline"}," Goto Github→ ")],-1))])):_t.value.currentVersion&&!_t.value.isChecking?(_i(),zi("div",grt,[Ee("div",vrt,[qr[13]||(qr[13]=Ee("span",{class:"text-white font-medium"},"Up to Date",-1)),Ee("span",yrt,Qi(_t.value.currentVersion),1)]),_t.value.lastChecked?(_i(),zi("div",xrt," Last checked: "+Qi(_t.value.lastChecked.toLocaleTimeString()),1)):is("",!0)])):_t.value.isChecking?(_i(),zi("div",_rt,qr[14]||(qr[14]=[Ee("div",{class:"flex items-center justify-center gap-2"},[Ee("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Ee("span",{class:"text-gray-300"},"Checking for updates...")],-1)]))):_t.value.error?(_i(),zi("div",brt,[qr[15]||(qr[15]=Ee("div",{class:"text-white font-medium mb-1"},"Update Check Failed",-1)),Ee("div",wrt,Qi(_t.value.error),1)])):is("",!0),qr[20]||(qr[20]=Ee("div",{class:"border-t border-white/10"},null,-1)),qr[21]||(qr[21]=Ee("div",{class:"text-white font-medium text-sm mb-2"},"Mesh Network Status",-1)),Ee("div",krt,[Ee("div",Trt,[qr[16]||(qr[16]=Ee("span",{class:"text-white font-medium"},"Total Tracked Nodes",-1)),Ee("span",Art,Qi(Mr.value),1)]),te.value?(_i(),zi("div",Mrt," Last updated: "+Qi(te.value.toLocaleString()),1)):is("",!0)]),(_i(!0),zi(Pu,null,Jh(Tr.value,Di=>(_i(),zi("div",{key:Di.type,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},[Ee("div",Srt,[Ee("span",Ert,Qi(Di.type)+Qi(Di.count===1?"":"s"),1),Ee("span",{class:jo([mn(Di.type),"font-bold"])},Qi(Di.count),3)]),Ot.value[Di.type]?.length>0?(_i(),zi("div",Crt,[Ee("div",Lrt,[qr[17]||(qr[17]=Qu(" Latest: ",-1)),Ee("span",Prt,Qi(Dt(Di.type)),1)])])):is("",!0)]))),128)),Mr.value===0&&!jt.value?(_i(),zi("div",Irt,qr[18]||(qr[18]=[Ee("div",{class:"text-gray-400"},[Ee("svg",{class:"w-8 h-8 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]),Ee("span",null,"No mesh nodes detected")],-1)]))):is("",!0),jt.value?(_i(),zi("div",zrt,qr[19]||(qr[19]=[Ee("div",{class:"flex items-center justify-center gap-2"},[Ee("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Ee("span",{class:"text-gray-300"},"Scanning mesh network...")],-1)]))):is("",!0)])],512)):is("",!0)])])]))}}),Drt=ld(Ort,[["__scopeId","data-v-0a06f286"]]),Frt={class:"min-h-screen bg-dark-bg overflow-hidden relative font-sans"},Rrt={class:"relative flex min-h-screen"},Brt={class:"flex-1 p-4 lg:p-[15px] overflow-y-auto"},Nrt=Dc({name:"DashboardLayout",__name:"DashboardLayout",setup(d){const s=Ga(!1),E=()=>{s.value=!s.value},B=()=>{s.value=!1};return(K,pt)=>{const _t=QA("router-view");return _i(),zi("div",Frt,[pt[1]||(pt[1]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"},null,-1)),pt[2]||(pt[2]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"},null,-1)),pt[3]||(pt[3]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"},null,-1)),Ee("div",Rrt,[Wl(vet,{class:"hidden lg:block"}),Wl($et,{showMobileSidebar:s.value,"onUpdate:showMobileSidebar":pt[0]||(pt[0]=Ot=>s.value=Ot),onClose:B},null,8,["showMobileSidebar"]),Ee("main",Brt,[Wl(Drt,{onToggleMobileSidebar:E}),Wl(_t)])])])}}}),jrt=Dc({__name:"App",setup(d){return(s,E)=>(_i(),Z0(Nrt))}}),Urt={class:"sparkline-container"},Vrt={class:"text-white text-sm font-semibold mb-4"},Hrt={class:"flex items-end gap-4"},Wrt=["id","width","height","viewBox"],qrt=["id"],$rt=["stop-color"],Zrt=["stop-color"],Grt=["d","fill"],Yrt=["d","stroke"],Krt=["cx","cy","fill"],Xrt=Dc({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},width:{default:131},height:{default:37},animate:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0}},setup(d){const s=d,E=$o(()=>{if(s.data&&s.data.length>0)return s.data;const _t=typeof s.value=="number"?s.value:10,Ot=20,jt=_t*.3;return Array.from({length:Ot},(te,he)=>{const De=Math.sin(he/Ot*Math.PI*2)*jt*.5,er=(Math.random()-.5)*jt*.3;return Math.max(0,_t+De+er)})}),B=$o(()=>{const _t=E.value;if(_t.length<2)return"";const Ot=Math.max(..._t),jt=Math.min(..._t),te=Ot-jt||1,he=s.width/(_t.length-1);let De="";return _t.forEach((er,pr)=>{const Mr=pr*he,Tr=s.height-(er-jt)/te*s.height;if(pr===0)De+=`M ${Mr} ${Tr}`;else{const mn=((pr-1)*he+Mr)/2;De+=` Q ${mn} ${Tr} ${Mr} ${Tr}`}}),De}),K=Ga("");bp(()=>{K.value=B.value}),Em(()=>s.data,(_t,Ot)=>{const jt=!Ot||_t.length!==Ot.length||Math.abs(_t.length-Ot.length)>5;s.animate&&jt?(K.value="",setTimeout(()=>{K.value=B.value},50)):K.value=B.value});const pt=$o(()=>`sparkline-${s.title.replace(/\s+/g,"-").toLowerCase()}`);return(_t,Ot)=>(_i(),zi("div",Urt,[Ee("p",Vrt,Qi(_t.title),1),Ee("div",Hrt,[Ee("span",{class:"text-[30px] font-bold",style:hm({color:_t.color})},[Qu(Qi(_t.value),1),pY(_t.$slots,"unit",{},void 0)],4),_t.showChart?(_i(),zi("svg",{key:0,id:pt.value,class:"mb-3 sparkline-svg",width:_t.width,height:_t.height,viewBox:`0 0 ${_t.width} ${_t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("defs",null,[Ee("linearGradient",{id:`gradient-${pt.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[Ee("stop",{offset:"0%","stop-color":_t.color,"stop-opacity":"0.3"},null,8,$rt),Ee("stop",{offset:"100%","stop-color":_t.color,"stop-opacity":"0.1"},null,8,Zrt)],8,qrt)]),Ee("path",{d:`${K.value} L ${_t.width} ${_t.height} L 0 ${_t.height} Z`,fill:`url(#gradient-${pt.value})`,class:"sparkline-fill"},null,8,Grt),Ee("path",{d:K.value,stroke:_t.color,"stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:jo(["sparkline-path",{"animate-draw":_t.animate}])},null,10,Yrt),E.value.length>0?(_i(),zi("circle",{key:0,cx:_t.width,cy:_t.height-(E.value[E.value.length-1]-Math.min(...E.value))/(Math.max(...E.value)-Math.min(...E.value)||1)*_t.height,r:"2",fill:_t.color,class:jo(["sparkline-dot",{"animate-pulse":_t.animate}])},null,10,Krt)):is("",!0)],8,Wrt)):is("",!0)])]))}}),o_=ld(Xrt,[["__scopeId","data-v-574bf55e"]]),Jrt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-5"},Qrt=Dc({name:"StatsCards",__name:"StatsCards",setup(d){const s=sw(),E=Ga(null),B=$o(()=>{const _t=s.packetStats,Ot=s.systemStats,jt=te=>{const he=Math.floor(te/86400),De=Math.floor(te%86400/3600),er=Math.floor(te%3600/60);return he>0?`${he}d ${De}h`:De>0?`${De}h ${er}m`:`${er}m`};return{packetsReceived:_t?.total_packets||0,packetsForwarded:_t?.transmitted_packets||0,uptimeFormatted:Ot?jt(Ot.uptime_seconds||0):"0m",uptimeHours:Ot?Math.floor((Ot.uptime_seconds||0)/3600):0,droppedPackets:_t?.dropped_packets||0,signalQuality:Math.round((_t?.avg_rssi||0)+120)}}),K=$o(()=>s.sparklineData),pt=async()=>{try{await Promise.all([s.fetchSystemStats(),s.fetchPacketStats({hours:24})])}catch(_t){console.error("Error fetching stats:",_t)}};return bp(()=>{pt(),E.value=window.setInterval(pt,5e3)}),gg(()=>{E.value&&clearInterval(E.value)}),(_t,Ot)=>(_i(),zi("div",Jrt,[Wl(o_,{title:"RX Packets",value:B.value.packetsReceived,color:"#AAE8E8",data:K.value.totalPackets},null,8,["value","data"]),Wl(o_,{title:"Forward",value:B.value.packetsForwarded,color:"#FFC246",data:K.value.transmittedPackets},null,8,["value","data"]),Wl(o_,{title:"Up Time",value:B.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1},null,8,["value"]),Wl(o_,{title:"Dropped",value:B.value.droppedPackets,color:"#FB787B",data:K.value.droppedPackets},null,8,["value","data"])]))}}),tnt={class:"glass-card rounded-[10px] p-6"},ent={class:"h-80 relative"},rnt={key:0,class:"absolute inset-0 flex items-center justify-center"},nnt={key:1,class:"absolute inset-0 flex items-center justify-center"},int={class:"text-red-400"},ant={key:2,class:"absolute inset-0 flex items-center justify-center"},ont={key:3,class:"h-full flex items-end justify-around gap-2 px-4"},snt={class:"relative w-full h-64 flex flex-col justify-end"},lnt={class:"text-white text-xs font-semibold drop-shadow-lg backdrop-blur-sm bg-black/20 px-2 py-0.5 rounded-md border border-white/10"},unt={class:"mt-2 text-center"},cnt={class:"text-white text-xs font-medium leading-tight"},hnt={key:0,class:"mt-4 text-sm text-white text-center"},fnt=Dc({name:"SignalQualityChart",__name:"SignalQualityChart",setup(d){const s=Ga([]),E=Ga(null),B=Ga(!0),K=Ga(null),pt=["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(139, 92, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(6, 182, 212, 0.8)","rgba(249, 115, 22, 0.8)","rgba(132, 204, 22, 0.8)","rgba(236, 72, 153, 0.8)","rgba(107, 114, 128, 0.8)"],_t=async()=>{try{K.value=null;const jt=await Ah.get("/packet_type_graph_data");if(jt?.success&&jt?.data){const te=jt.data;if(te?.series){const he=[];te.series.forEach((De,er)=>{let pr=0;De.data&&Array.isArray(De.data)&&(pr=De.data.reduce((Mr,Tr)=>Mr+(Tr[1]||0),0)),pr>0&&he.push({name:De.name||`Type ${De.type}`,type:De.type,count:pr,color:pt[er%pt.length]})}),he.sort((De,er)=>er.count-De.count),s.value=he,B.value=!1}else console.error("No series data found in response"),K.value="No series data in server response",B.value=!1}else console.error("Invalid API response structure:",jt),K.value="Invalid response from server",B.value=!1}catch(jt){console.error("Failed to fetch packet type data:",jt),K.value=jt instanceof Error?jt.message:"Failed to load data",B.value=!1}},Ot=jt=>{if(s.value.length===0)return 0;const te=Math.max(...s.value.map(he=>he.count));return Math.max(jt/te*100,2)};return bp(()=>{_t(),E.value=setInterval(()=>{_t()},3e4)}),gg(()=>{E.value&&clearInterval(E.value)}),(jt,te)=>(_i(),zi("div",tnt,[te[2]||(te[2]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Packet Types",-1)),te[3]||(te[3]=Ee("p",{class:"text-white text-sm uppercase mb-4"},"Distribution by Type",-1)),Ee("div",ent,[B.value?(_i(),zi("div",rnt,te[0]||(te[0]=[Ee("div",{class:"text-white"},"Loading packet types...",-1)]))):K.value?(_i(),zi("div",nnt,[Ee("div",int,Qi(K.value),1)])):s.value.length===0?(_i(),zi("div",ant,te[1]||(te[1]=[Ee("div",{class:"text-white"},"No packet data available",-1)]))):(_i(),zi("div",ont,[(_i(!0),zi(Pu,null,Jh(s.value,he=>(_i(),zi("div",{key:he.type,class:"flex flex-col items-center flex-1 max-w-20 h-full"},[Ee("div",snt,[Ee("div",{class:"w-full rounded-t-[10px] transition-all duration-500 ease-out flex items-end justify-center pb-1 backdrop-blur-[50px] shadow-lg border border-white/20 hover:border-white/30",style:hm({height:Ot(he.count)+"%",background:`linear-gradient(135deg, - ${he.color} 0%, - ${he.color.replace("0.8","0.6")} 30%, - ${he.color.replace("0.8","0.4")} 70%, - ${he.color.replace("0.8","0.3")} 100%), + */let HX=()=>location.protocol+"//"+location.host;function pO(d,s){const{pathname:E,search:R,hash:Y}=s,dt=d.indexOf("#");if(dt>-1){let _t=Y.includes(d.slice(dt))?d.slice(dt).length:1,zt=Y.slice(_t);return zt[0]!=="/"&&(zt="/"+zt),TL(zt,"")}return TL(E,d)+R+Y}function WX(d,s,E,R){let Y=[],dt=[],_t=null;const zt=({state:Je})=>{const fr=pO(d,location),Ar=E.value,kr=s.value;let Vr=0;if(Je){if(E.value=fr,s.value=Je,_t&&_t===Ar){_t=null;return}Vr=kr?Je.position-kr.position:0}else R(fr);Y.forEach(fn=>{fn(E.value,Ar,{delta:Vr,type:bA.pop,direction:Vr?Vr>0?z8.forward:z8.back:z8.unknown})})};function jt(){_t=E.value}function te(Je){Y.push(Je);const fr=()=>{const Ar=Y.indexOf(Je);Ar>-1&&Y.splice(Ar,1)};return dt.push(fr),fr}function ce(){if(document.visibilityState==="hidden"){const{history:Je}=window;if(!Je.state)return;Je.replaceState(Bh({},Je.state,{scroll:H4()}),"")}}function Ie(){for(const Je of dt)Je();dt=[],window.removeEventListener("popstate",zt),window.removeEventListener("pagehide",ce),document.removeEventListener("visibilitychange",ce)}return window.addEventListener("popstate",zt),window.addEventListener("pagehide",ce),document.addEventListener("visibilitychange",ce),{pauseListeners:jt,listen:te,destroy:Ie}}function CL(d,s,E,R=!1,Y=!1){return{back:d,current:s,forward:E,replaced:R,position:window.history.length,scroll:Y?H4():null}}function qX(d){const{history:s,location:E}=window,R={value:pO(d,E)},Y={value:s.state};Y.value||dt(R.value,{back:null,current:R.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function dt(jt,te,ce){const Ie=d.indexOf("#"),Je=Ie>-1?(E.host&&document.querySelector("base")?d:d.slice(Ie))+jt:HX()+d+jt;try{s[ce?"replaceState":"pushState"](te,"",Je),Y.value=te}catch(fr){console.error(fr),E[ce?"replace":"assign"](Je)}}function _t(jt,te){dt(jt,Bh({},s.state,CL(Y.value.back,jt,Y.value.forward,!0),te,{position:Y.value.position}),!0),R.value=jt}function zt(jt,te){const ce=Bh({},Y.value,s.state,{forward:jt,scroll:H4()});dt(ce.current,ce,!0),dt(jt,Bh({},CL(R.value,jt,null),{position:ce.position+1},te),!1),R.value=jt}return{location:R,state:Y,push:zt,replace:_t}}function $X(d){d=CX(d);const s=qX(d),E=WX(d,s.state,s.location,s.replace);function R(dt,_t=!0){_t||E.pauseListeners(),history.go(dt)}const Y=Bh({location:"",base:d,go:R,createHref:PX.bind(null,d)},s,E);return Object.defineProperty(Y,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(Y,"state",{enumerable:!0,get:()=>s.state.value}),Y}let by=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.Group=2]="Group",d}({});var np=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.ParamRegExp=2]="ParamRegExp",d[d.ParamRegExpEnd=3]="ParamRegExpEnd",d[d.EscapeNext=4]="EscapeNext",d}(np||{});const ZX={type:by.Static,value:""},GX=/[a-zA-Z0-9_]/;function YX(d){if(!d)return[[]];if(d==="/")return[[ZX]];if(!d.startsWith("/"))throw new Error(`Invalid path "${d}"`);function s(fr){throw new Error(`ERR (${E})/"${te}": ${fr}`)}let E=np.Static,R=E;const Y=[];let dt;function _t(){dt&&Y.push(dt),dt=[]}let zt=0,jt,te="",ce="";function Ie(){te&&(E===np.Static?dt.push({type:by.Static,value:te}):E===np.Param||E===np.ParamRegExp||E===np.ParamRegExpEnd?(dt.length>1&&(jt==="*"||jt==="+")&&s(`A repeatable param (${te}) must be alone in its segment. eg: '/:ids+.`),dt.push({type:by.Param,value:te,regexp:ce,repeatable:jt==="*"||jt==="+",optional:jt==="*"||jt==="?"})):s("Invalid state to consume buffer"),te="")}function Je(){te+=jt}for(;zts.length?s.length===1&&s[0]===h0.Static+h0.Segment?1:-1:0}function mO(d,s){let E=0;const R=d.score,Y=s.score;for(;E0&&s[s.length-1]<0}const tJ={strict:!1,end:!0,sensitive:!1};function eJ(d,s,E){const R=JX(YX(d.path),E),Y=Bh(R,{record:d,parent:s,children:[],alias:[]});return s&&!Y.record.aliasOf==!s.record.aliasOf&&s.children.push(Y),Y}function rJ(d,s){const E=[],R=new Map;s=kL(tJ,s);function Y(Ie){return R.get(Ie)}function dt(Ie,Je,fr){const Ar=!fr,kr=zL(Ie);kr.aliasOf=fr&&fr.record;const Vr=kL(s,Ie),fn=[kr];if("alias"in Ie){const ti=typeof Ie.alias=="string"?[Ie.alias]:Ie.alias;for(const Dn of ti)fn.push(zL(Bh({},kr,{components:fr?fr.record.components:kr.components,path:Dn,aliasOf:fr?fr.record:kr})))}let Dt,cn;for(const ti of fn){const{path:Dn}=ti;if(Je&&Dn[0]!=="/"){const ii=Je.record.path,Vi=ii[ii.length-1]==="/"?"":"/";ti.path=Je.record.path+(Dn&&Vi+Dn)}if(Dt=eJ(ti,Je,Vr),fr?fr.alias.push(Dt):(cn=cn||Dt,cn!==Dt&&cn.alias.push(Dt),Ar&&Ie.name&&!OL(Dt)&&_t(Ie.name)),gO(Dt)&&jt(Dt),kr.children){const ii=kr.children;for(let Vi=0;Vi{_t(cn)}:C2}function _t(Ie){if(fO(Ie)){const Je=R.get(Ie);Je&&(R.delete(Ie),E.splice(E.indexOf(Je),1),Je.children.forEach(_t),Je.alias.forEach(_t))}else{const Je=E.indexOf(Ie);Je>-1&&(E.splice(Je,1),Ie.record.name&&R.delete(Ie.record.name),Ie.children.forEach(_t),Ie.alias.forEach(_t))}}function zt(){return E}function jt(Ie){const Je=aJ(Ie,E);E.splice(Je,0,Ie),Ie.record.name&&!OL(Ie)&&R.set(Ie.record.name,Ie)}function te(Ie,Je){let fr,Ar={},kr,Vr;if("name"in Ie&&Ie.name){if(fr=R.get(Ie.name),!fr)throw y_(xd.MATCHER_NOT_FOUND,{location:Ie});Vr=fr.record.name,Ar=Bh(IL(Je.params,fr.keys.filter(cn=>!cn.optional).concat(fr.parent?fr.parent.keys.filter(cn=>cn.optional):[]).map(cn=>cn.name)),Ie.params&&IL(Ie.params,fr.keys.map(cn=>cn.name))),kr=fr.stringify(Ar)}else if(Ie.path!=null)kr=Ie.path,fr=E.find(cn=>cn.re.test(kr)),fr&&(Ar=fr.parse(kr),Vr=fr.record.name);else{if(fr=Je.name?R.get(Je.name):E.find(cn=>cn.re.test(Je.path)),!fr)throw y_(xd.MATCHER_NOT_FOUND,{location:Ie,currentLocation:Je});Vr=fr.record.name,Ar=Bh({},Je.params,Ie.params),kr=fr.stringify(Ar)}const fn=[];let Dt=fr;for(;Dt;)fn.unshift(Dt.record),Dt=Dt.parent;return{name:Vr,path:kr,params:Ar,matched:fn,meta:iJ(fn)}}d.forEach(Ie=>dt(Ie));function ce(){E.length=0,R.clear()}return{addRoute:dt,resolve:te,removeRoute:_t,clearRoutes:ce,getRoutes:zt,getRecordMatcher:Y}}function IL(d,s){const E={};for(const R of s)R in d&&(E[R]=d[R]);return E}function zL(d){const s={path:d.path,redirect:d.redirect,name:d.name,meta:d.meta||{},aliasOf:d.aliasOf,beforeEnter:d.beforeEnter,props:nJ(d),children:d.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in d?d.components||null:d.component&&{default:d.component}};return Object.defineProperty(s,"mods",{value:{}}),s}function nJ(d){const s={},E=d.props||!1;if("component"in d)s.default=E;else for(const R in d.components)s[R]=typeof E=="object"?E[R]:E;return s}function OL(d){for(;d;){if(d.record.aliasOf)return!0;d=d.parent}return!1}function iJ(d){return d.reduce((s,E)=>Bh(s,E.meta),{})}function aJ(d,s){let E=0,R=s.length;for(;E!==R;){const dt=E+R>>1;mO(d,s[dt])<0?R=dt:E=dt+1}const Y=oJ(d);return Y&&(R=s.lastIndexOf(Y,R-1)),R}function oJ(d){let s=d;for(;s=s.parent;)if(gO(s)&&mO(d,s)===0)return s}function gO({record:d}){return!!(d.name||d.components&&Object.keys(d.components).length||d.redirect)}function DL(d){const s=um(W4),E=um(cM),R=Wo(()=>{const jt=Ol(d.to);return s.resolve(jt)}),Y=Wo(()=>{const{matched:jt}=R.value,{length:te}=jt,ce=jt[te-1],Ie=E.matched;if(!ce||!Ie.length)return-1;const Je=Ie.findIndex(v_.bind(null,ce));if(Je>-1)return Je;const fr=FL(jt[te-2]);return te>1&&FL(ce)===fr&&Ie[Ie.length-1].path!==fr?Ie.findIndex(v_.bind(null,jt[te-2])):Je}),dt=Wo(()=>Y.value>-1&&hJ(E.params,R.value.params)),_t=Wo(()=>Y.value>-1&&Y.value===E.matched.length-1&&hO(E.params,R.value.params));function zt(jt={}){if(cJ(jt)){const te=s[Ol(d.replace)?"replace":"push"](Ol(d.to)).catch(C2);return d.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>te),te}return Promise.resolve()}return{route:R,href:Wo(()=>R.value.href),isActive:dt,isExactActive:_t,navigate:zt}}function sJ(d){return d.length===1?d[0]:d}const lJ=Ec({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:DL,setup(d,{slots:s}){const E=Ey(DL(d)),{options:R}=um(W4),Y=Wo(()=>({[BL(d.activeClass,R.linkActiveClass,"router-link-active")]:E.isActive,[BL(d.exactActiveClass,R.linkExactActiveClass,"router-link-exact-active")]:E.isExactActive}));return()=>{const dt=s.default&&sJ(s.default(E));return d.custom?dt:oM("a",{"aria-current":E.isExactActive?d.ariaCurrentValue:null,href:E.href,onClick:E.navigate,class:Y.value},dt)}}}),uJ=lJ;function cJ(d){if(!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)&&!d.defaultPrevented&&!(d.button!==void 0&&d.button!==0)){if(d.currentTarget&&d.currentTarget.getAttribute){const s=d.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(s))return}return d.preventDefault&&d.preventDefault(),!0}}function hJ(d,s){for(const E in s){const R=s[E],Y=d[E];if(typeof R=="string"){if(R!==Y)return!1}else if(!Im(Y)||Y.length!==R.length||R.some((dt,_t)=>dt!==Y[_t]))return!1}return!0}function FL(d){return d?d.aliasOf?d.aliasOf.path:d.path:""}const BL=(d,s,E)=>d??s??E,fJ=Ec({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(d,{attrs:s,slots:E}){const R=um(kA),Y=Wo(()=>d.route||R.value),dt=um(EL,0),_t=Wo(()=>{let te=Ol(dt);const{matched:ce}=Y.value;let Ie;for(;(Ie=ce[te])&&!Ie.components;)te++;return te}),zt=Wo(()=>Y.value.matched[_t.value]);X5(EL,Wo(()=>_t.value+1)),X5(UX,zt),X5(kA,Y);const jt=Ha();return Em(()=>[jt.value,zt.value,d.name],([te,ce,Ie],[Je,fr,Ar])=>{ce&&(ce.instances[Ie]=te,fr&&fr!==ce&&te&&te===Je&&(ce.leaveGuards.size||(ce.leaveGuards=fr.leaveGuards),ce.updateGuards.size||(ce.updateGuards=fr.updateGuards))),te&&ce&&(!fr||!v_(ce,fr)||!Je)&&(ce.enterCallbacks[Ie]||[]).forEach(kr=>kr(te))},{flush:"post"}),()=>{const te=Y.value,ce=d.name,Ie=zt.value,Je=Ie&&Ie.components[ce];if(!Je)return RL(E.default,{Component:Je,route:te});const fr=Ie.props[ce],Ar=fr?fr===!0?te.params:typeof fr=="function"?fr(te):fr:null,Vr=oM(Je,Bh({},Ar,s,{onVnodeUnmounted:fn=>{fn.component.isUnmounted&&(Ie.instances[ce]=null)},ref:jt}));return RL(E.default,{Component:Vr,route:te})||Vr}}});function RL(d,s){if(!d)return null;const E=d(s);return E.length===1?E[0]:E}const dJ=fJ;function pJ(d){const s=rJ(d.routes,d),E=d.parseQuery||NX,R=d.stringifyQuery||SL,Y=d.history,dt=n2(),_t=n2(),zt=n2(),jt=sY(e1);let te=e1;s_&&d.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const ce=P8.bind(null,ma=>""+ma),Ie=P8.bind(null,wX),Je=P8.bind(null,W2);function fr(ma,io){let po,us;return fO(ma)?(po=s.getRecordMatcher(ma),us=io):us=ma,s.addRoute(us,po)}function Ar(ma){const io=s.getRecordMatcher(ma);io&&s.removeRoute(io)}function kr(){return s.getRoutes().map(ma=>ma.record)}function Vr(ma){return!!s.getRecordMatcher(ma)}function fn(ma,io){if(io=Bh({},io||jt.value),typeof ma=="string"){const pi=I8(E,ma,io.path),go=s.resolve({path:pi.path},io),Mo=Y.createHref(pi.fullPath);return Bh(pi,go,{params:Je(go.params),hash:W2(pi.hash),redirectedFrom:void 0,href:Mo})}let po;if(ma.path!=null)po=Bh({},ma,{path:I8(E,ma.path,io.path).path});else{const pi=Bh({},ma.params);for(const go in pi)pi[go]==null&&delete pi[go];po=Bh({},ma,{params:Ie(pi)}),io.params=Ie(io.params)}const us=s.resolve(po,io),qo=ma.hash||"";us.params=ce(Je(us.params));const _i=AX(R,Bh({},ma,{hash:xX(qo),path:us.path})),Ai=Y.createHref(_i);return Bh({fullPath:_i,hash:qo,query:R===SL?jX(ma.query):ma.query||{}},us,{redirectedFrom:void 0,href:Ai})}function Dt(ma){return typeof ma=="string"?I8(E,ma,jt.value.path):Bh({},ma)}function cn(ma,io){if(te!==ma)return y_(xd.NAVIGATION_CANCELLED,{from:io,to:ma})}function ti(ma){return Vi(ma)}function Dn(ma){return ti(Bh(Dt(ma),{replace:!0}))}function ii(ma,io){const po=ma.matched[ma.matched.length-1];if(po&&po.redirect){const{redirect:us}=po;let qo=typeof us=="function"?us(ma,io):us;return typeof qo=="string"&&(qo=qo.includes("?")||qo.includes("#")?qo=Dt(qo):{path:qo},qo.params={}),Bh({query:ma.query,hash:ma.hash,params:qo.path!=null?{}:ma.params},qo)}}function Vi(ma,io){const po=te=fn(ma),us=jt.value,qo=ma.state,_i=ma.force,Ai=ma.replace===!0,pi=ii(po,us);if(pi)return Vi(Bh(Dt(pi),{state:typeof pi=="object"?Bh({},qo,pi.state):qo,force:_i,replace:Ai}),io||po);const go=po;go.redirectedFrom=io;let Mo;return!_i&&MX(R,us,po)&&(Mo=y_(xd.NAVIGATION_DUPLICATED,{to:go,from:us}),mo(us,us,!0,!1)),(Mo?Promise.resolve(Mo):Bi(go,us)).catch(To=>Yg(To)?Yg(To,xd.NAVIGATION_GUARD_REDIRECT)?To:no(To):la(To,go,us)).then(To=>{if(To){if(Yg(To,xd.NAVIGATION_GUARD_REDIRECT))return Vi(Bh({replace:Ai},Dt(To.to),{state:typeof To.to=="object"?Bh({},qo,To.to.state):qo,force:_i}),io||go)}else To=Li(go,us,!0,Ai,qo);return Ri(go,us,To),To})}function Nn(ma,io){const po=cn(ma,io);return po?Promise.reject(po):Promise.resolve()}function Wr(ma){const io=ko.values().next().value;return io&&typeof io.runWithContext=="function"?io.runWithContext(ma):ma()}function Bi(ma,io){let po;const[us,qo,_i]=VX(ma,io);po=O8(us.reverse(),"beforeRouteLeave",ma,io);for(const pi of us)pi.leaveGuards.forEach(go=>{po.push(u1(go,ma,io))});const Ai=Nn.bind(null,ma,io);return po.push(Ai),Ia(po).then(()=>{po=[];for(const pi of dt.list())po.push(u1(pi,ma,io));return po.push(Ai),Ia(po)}).then(()=>{po=O8(qo,"beforeRouteUpdate",ma,io);for(const pi of qo)pi.updateGuards.forEach(go=>{po.push(u1(go,ma,io))});return po.push(Ai),Ia(po)}).then(()=>{po=[];for(const pi of _i)if(pi.beforeEnter)if(Im(pi.beforeEnter))for(const go of pi.beforeEnter)po.push(u1(go,ma,io));else po.push(u1(pi.beforeEnter,ma,io));return po.push(Ai),Ia(po)}).then(()=>(ma.matched.forEach(pi=>pi.enterCallbacks={}),po=O8(_i,"beforeRouteEnter",ma,io,Wr),po.push(Ai),Ia(po))).then(()=>{po=[];for(const pi of _t.list())po.push(u1(pi,ma,io));return po.push(Ai),Ia(po)}).catch(pi=>Yg(pi,xd.NAVIGATION_CANCELLED)?pi:Promise.reject(pi))}function Ri(ma,io,po){zt.list().forEach(us=>Wr(()=>us(ma,io,po)))}function Li(ma,io,po,us,qo){const _i=cn(ma,io);if(_i)return _i;const Ai=io===e1,pi=s_?history.state:{};po&&(us||Ai?Y.replace(ma.fullPath,Bh({scroll:Ai&&pi&&pi.scroll},qo)):Y.push(ma.fullPath,qo)),jt.value=ma,mo(ma,io,po,Ai),no()}let $n;function Hn(){$n||($n=Y.listen((ma,io,po)=>{if(!ro.listening)return;const us=fn(ma),qo=ii(us,ro.currentRoute.value);if(qo){Vi(Bh(qo,{replace:!0,force:!0}),us).catch(C2);return}te=us;const _i=jt.value;s_&&OX(ML(_i.fullPath,po.delta),H4()),Bi(us,_i).catch(Ai=>Yg(Ai,xd.NAVIGATION_ABORTED|xd.NAVIGATION_CANCELLED)?Ai:Yg(Ai,xd.NAVIGATION_GUARD_REDIRECT)?(Vi(Bh(Dt(Ai.to),{force:!0}),us).then(pi=>{Yg(pi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&!po.delta&&po.type===bA.pop&&Y.go(-1,!1)}).catch(C2),Promise.reject()):(po.delta&&Y.go(-po.delta,!1),la(Ai,us,_i))).then(Ai=>{Ai=Ai||Li(us,_i,!1),Ai&&(po.delta&&!Yg(Ai,xd.NAVIGATION_CANCELLED)?Y.go(-po.delta,!1):po.type===bA.pop&&Yg(Ai,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&Y.go(-1,!1)),Ri(us,_i,Ai)}).catch(C2)}))}let sa=n2(),Ti=n2(),Qn;function la(ma,io,po){no(ma);const us=Ti.list();return us.length?us.forEach(qo=>qo(ma,io,po)):console.error(ma),Promise.reject(ma)}function Eo(){return Qn&&jt.value!==e1?Promise.resolve():new Promise((ma,io)=>{sa.add([ma,io])})}function no(ma){return Qn||(Qn=!ma,Hn(),sa.list().forEach(([io,po])=>ma?po(ma):io()),sa.reset()),ma}function mo(ma,io,po,us){const{scrollBehavior:qo}=d;if(!s_||!qo)return Promise.resolve();const _i=!po&&DX(ML(ma.fullPath,0))||(us||!po)&&history.state&&history.state.scroll||null;return S0().then(()=>qo(ma,io,_i)).then(Ai=>Ai&&zX(Ai)).catch(Ai=>la(Ai,ma,io))}const Ts=ma=>Y.go(ma);let xl;const ko=new Set,ro={currentRoute:jt,listening:!0,addRoute:fr,removeRoute:Ar,clearRoutes:s.clearRoutes,hasRoute:Vr,getRoutes:kr,resolve:fn,options:d,push:ti,replace:Dn,go:Ts,back:()=>Ts(-1),forward:()=>Ts(1),beforeEach:dt.add,beforeResolve:_t.add,afterEach:zt.add,onError:Ti.add,isReady:Eo,install(ma){ma.component("RouterLink",uJ),ma.component("RouterView",dJ),ma.config.globalProperties.$router=ro,Object.defineProperty(ma.config.globalProperties,"$route",{enumerable:!0,get:()=>Ol(jt)}),s_&&!xl&&jt.value===e1&&(xl=!0,ti(Y.location).catch(us=>{}));const io={};for(const us in e1)Object.defineProperty(io,us,{get:()=>jt.value[us],enumerable:!0});ma.provide(W4,ro),ma.provide(cM,ez(io)),ma.provide(kA,jt);const po=ma.unmount;ko.add(ma),ma.unmount=function(){ko.delete(ma),ko.size<1&&(te=e1,$n&&$n(),$n=null,jt.value=e1,xl=!1,Qn=!1),po()}}};function Ia(ma){return ma.reduce((io,po)=>io.then(()=>Wr(po)),Promise.resolve())}return ro}function vO(){return um(W4)}function yO(d){return um(cM)}function xO(d,s){return function(){return d.apply(s,arguments)}}const{toString:mJ}=Object.prototype,{getPrototypeOf:hM}=Object,{iterator:q4,toStringTag:_O}=Symbol,$4=(d=>s=>{const E=mJ.call(s);return d[E]||(d[E]=E.slice(8,-1).toLowerCase())})(Object.create(null)),Om=d=>(d=d.toLowerCase(),s=>$4(s)===d),Z4=d=>s=>typeof s===d,{isArray:k_}=Array,x_=Z4("undefined");function nw(d){return d!==null&&!x_(d)&&d.constructor!==null&&!x_(d.constructor)&&E0(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}const bO=Om("ArrayBuffer");function gJ(d){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(d):s=d&&d.buffer&&bO(d.buffer),s}const vJ=Z4("string"),E0=Z4("function"),wO=Z4("number"),iw=d=>d!==null&&typeof d=="object",yJ=d=>d===!0||d===!1,e4=d=>{if($4(d)!=="object")return!1;const s=hM(d);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(_O in d)&&!(q4 in d)},xJ=d=>{if(!iw(d)||nw(d))return!1;try{return Object.keys(d).length===0&&Object.getPrototypeOf(d)===Object.prototype}catch{return!1}},_J=Om("Date"),bJ=Om("File"),wJ=Om("Blob"),kJ=Om("FileList"),TJ=d=>iw(d)&&E0(d.pipe),AJ=d=>{let s;return d&&(typeof FormData=="function"&&d instanceof FormData||E0(d.append)&&((s=$4(d))==="formdata"||s==="object"&&E0(d.toString)&&d.toString()==="[object FormData]"))},MJ=Om("URLSearchParams"),[SJ,EJ,CJ,LJ]=["ReadableStream","Request","Response","Headers"].map(Om),PJ=d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aw(d,s,{allOwnKeys:E=!1}={}){if(d===null||typeof d>"u")return;let R,Y;if(typeof d!="object"&&(d=[d]),k_(d))for(R=0,Y=d.length;R0;)if(Y=E[R],s===Y.toLowerCase())return Y;return null}const wy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TO=d=>!x_(d)&&d!==wy;function TA(){const{caseless:d,skipUndefined:s}=TO(this)&&this||{},E={},R=(Y,dt)=>{const _t=d&&kO(E,dt)||dt;e4(E[_t])&&e4(Y)?E[_t]=TA(E[_t],Y):e4(Y)?E[_t]=TA({},Y):k_(Y)?E[_t]=Y.slice():(!s||!x_(Y))&&(E[_t]=Y)};for(let Y=0,dt=arguments.length;Y(aw(s,(Y,dt)=>{E&&E0(Y)?d[dt]=xO(Y,E):d[dt]=Y},{allOwnKeys:R}),d),zJ=d=>(d.charCodeAt(0)===65279&&(d=d.slice(1)),d),OJ=(d,s,E,R)=>{d.prototype=Object.create(s.prototype,R),d.prototype.constructor=d,Object.defineProperty(d,"super",{value:s.prototype}),E&&Object.assign(d.prototype,E)},DJ=(d,s,E,R)=>{let Y,dt,_t;const zt={};if(s=s||{},d==null)return s;do{for(Y=Object.getOwnPropertyNames(d),dt=Y.length;dt-- >0;)_t=Y[dt],(!R||R(_t,d,s))&&!zt[_t]&&(s[_t]=d[_t],zt[_t]=!0);d=E!==!1&&hM(d)}while(d&&(!E||E(d,s))&&d!==Object.prototype);return s},FJ=(d,s,E)=>{d=String(d),(E===void 0||E>d.length)&&(E=d.length),E-=s.length;const R=d.indexOf(s,E);return R!==-1&&R===E},BJ=d=>{if(!d)return null;if(k_(d))return d;let s=d.length;if(!wO(s))return null;const E=new Array(s);for(;s-- >0;)E[s]=d[s];return E},RJ=(d=>s=>d&&s instanceof d)(typeof Uint8Array<"u"&&hM(Uint8Array)),NJ=(d,s)=>{const R=(d&&d[q4]).call(d);let Y;for(;(Y=R.next())&&!Y.done;){const dt=Y.value;s.call(d,dt[0],dt[1])}},jJ=(d,s)=>{let E;const R=[];for(;(E=d.exec(s))!==null;)R.push(E);return R},UJ=Om("HTMLFormElement"),VJ=d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(E,R,Y){return R.toUpperCase()+Y}),NL=(({hasOwnProperty:d})=>(s,E)=>d.call(s,E))(Object.prototype),HJ=Om("RegExp"),AO=(d,s)=>{const E=Object.getOwnPropertyDescriptors(d),R={};aw(E,(Y,dt)=>{let _t;(_t=s(Y,dt,d))!==!1&&(R[dt]=_t||Y)}),Object.defineProperties(d,R)},WJ=d=>{AO(d,(s,E)=>{if(E0(d)&&["arguments","caller","callee"].indexOf(E)!==-1)return!1;const R=d[E];if(E0(R)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+E+"'")})}})},qJ=(d,s)=>{const E={},R=Y=>{Y.forEach(dt=>{E[dt]=!0})};return k_(d)?R(d):R(String(d).split(s)),E},$J=()=>{},ZJ=(d,s)=>d!=null&&Number.isFinite(d=+d)?d:s;function GJ(d){return!!(d&&E0(d.append)&&d[_O]==="FormData"&&d[q4])}const YJ=d=>{const s=new Array(10),E=(R,Y)=>{if(iw(R)){if(s.indexOf(R)>=0)return;if(nw(R))return R;if(!("toJSON"in R)){s[Y]=R;const dt=k_(R)?[]:{};return aw(R,(_t,zt)=>{const jt=E(_t,Y+1);!x_(jt)&&(dt[zt]=jt)}),s[Y]=void 0,dt}}return R};return E(d,0)},KJ=Om("AsyncFunction"),XJ=d=>d&&(iw(d)||E0(d))&&E0(d.then)&&E0(d.catch),MO=((d,s)=>d?setImmediate:s?((E,R)=>(wy.addEventListener("message",({source:Y,data:dt})=>{Y===wy&&dt===E&&R.length&&R.shift()()},!1),Y=>{R.push(Y),wy.postMessage(E,"*")}))(`axios@${Math.random()}`,[]):E=>setTimeout(E))(typeof setImmediate=="function",E0(wy.postMessage)),JJ=typeof queueMicrotask<"u"?queueMicrotask.bind(wy):typeof process<"u"&&process.nextTick||MO,QJ=d=>d!=null&&E0(d[q4]),eo={isArray:k_,isArrayBuffer:bO,isBuffer:nw,isFormData:AJ,isArrayBufferView:gJ,isString:vJ,isNumber:wO,isBoolean:yJ,isObject:iw,isPlainObject:e4,isEmptyObject:xJ,isReadableStream:SJ,isRequest:EJ,isResponse:CJ,isHeaders:LJ,isUndefined:x_,isDate:_J,isFile:bJ,isBlob:wJ,isRegExp:HJ,isFunction:E0,isStream:TJ,isURLSearchParams:MJ,isTypedArray:RJ,isFileList:kJ,forEach:aw,merge:TA,extend:IJ,trim:PJ,stripBOM:zJ,inherits:OJ,toFlatObject:DJ,kindOf:$4,kindOfTest:Om,endsWith:FJ,toArray:BJ,forEachEntry:NJ,matchAll:jJ,isHTMLForm:UJ,hasOwnProperty:NL,hasOwnProp:NL,reduceDescriptors:AO,freezeMethods:WJ,toObjectSet:qJ,toCamelCase:VJ,noop:$J,toFiniteNumber:ZJ,findKey:kO,global:wy,isContextDefined:TO,isSpecCompliantForm:GJ,toJSONObject:YJ,isAsyncFn:KJ,isThenable:XJ,setImmediate:MO,asap:JJ,isIterable:QJ};function Ju(d,s,E,R,Y){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=d,this.name="AxiosError",s&&(this.code=s),E&&(this.config=E),R&&(this.request=R),Y&&(this.response=Y,this.status=Y.status?Y.status:null)}eo.inherits(Ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eo.toJSONObject(this.config),code:this.code,status:this.status}}});const SO=Ju.prototype,EO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(d=>{EO[d]={value:d}});Object.defineProperties(Ju,EO);Object.defineProperty(SO,"isAxiosError",{value:!0});Ju.from=(d,s,E,R,Y,dt)=>{const _t=Object.create(SO);eo.toFlatObject(d,_t,function(ce){return ce!==Error.prototype},te=>te!=="isAxiosError");const zt=d&&d.message?d.message:"Error",jt=s==null&&d?d.code:s;return Ju.call(_t,zt,jt,E,R,Y),d&&_t.cause==null&&Object.defineProperty(_t,"cause",{value:d,configurable:!0}),_t.name=d&&d.name||"Error",dt&&Object.assign(_t,dt),_t};const tQ=null;function AA(d){return eo.isPlainObject(d)||eo.isArray(d)}function CO(d){return eo.endsWith(d,"[]")?d.slice(0,-2):d}function jL(d,s,E){return d?d.concat(s).map(function(Y,dt){return Y=CO(Y),!E&&dt?"["+Y+"]":Y}).join(E?".":""):s}function eQ(d){return eo.isArray(d)&&!d.some(AA)}const rQ=eo.toFlatObject(eo,{},null,function(s){return/^is[A-Z]/.test(s)});function G4(d,s,E){if(!eo.isObject(d))throw new TypeError("target must be an object");s=s||new FormData,E=eo.toFlatObject(E,{metaTokens:!0,dots:!1,indexes:!1},!1,function(kr,Vr){return!eo.isUndefined(Vr[kr])});const R=E.metaTokens,Y=E.visitor||ce,dt=E.dots,_t=E.indexes,jt=(E.Blob||typeof Blob<"u"&&Blob)&&eo.isSpecCompliantForm(s);if(!eo.isFunction(Y))throw new TypeError("visitor must be a function");function te(Ar){if(Ar===null)return"";if(eo.isDate(Ar))return Ar.toISOString();if(eo.isBoolean(Ar))return Ar.toString();if(!jt&&eo.isBlob(Ar))throw new Ju("Blob is not supported. Use a Buffer instead.");return eo.isArrayBuffer(Ar)||eo.isTypedArray(Ar)?jt&&typeof Blob=="function"?new Blob([Ar]):Buffer.from(Ar):Ar}function ce(Ar,kr,Vr){let fn=Ar;if(Ar&&!Vr&&typeof Ar=="object"){if(eo.endsWith(kr,"{}"))kr=R?kr:kr.slice(0,-2),Ar=JSON.stringify(Ar);else if(eo.isArray(Ar)&&eQ(Ar)||(eo.isFileList(Ar)||eo.endsWith(kr,"[]"))&&(fn=eo.toArray(Ar)))return kr=CO(kr),fn.forEach(function(cn,ti){!(eo.isUndefined(cn)||cn===null)&&s.append(_t===!0?jL([kr],ti,dt):_t===null?kr:kr+"[]",te(cn))}),!1}return AA(Ar)?!0:(s.append(jL(Vr,kr,dt),te(Ar)),!1)}const Ie=[],Je=Object.assign(rQ,{defaultVisitor:ce,convertValue:te,isVisitable:AA});function fr(Ar,kr){if(!eo.isUndefined(Ar)){if(Ie.indexOf(Ar)!==-1)throw Error("Circular reference detected in "+kr.join("."));Ie.push(Ar),eo.forEach(Ar,function(fn,Dt){(!(eo.isUndefined(fn)||fn===null)&&Y.call(s,fn,eo.isString(Dt)?Dt.trim():Dt,kr,Je))===!0&&fr(fn,kr?kr.concat(Dt):[Dt])}),Ie.pop()}}if(!eo.isObject(d))throw new TypeError("data must be an object");return fr(d),s}function UL(d){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'()~]|%20|%00/g,function(R){return s[R]})}function fM(d,s){this._pairs=[],d&&G4(d,this,s)}const LO=fM.prototype;LO.append=function(s,E){this._pairs.push([s,E])};LO.toString=function(s){const E=s?function(R){return s.call(this,R,UL)}:UL;return this._pairs.map(function(Y){return E(Y[0])+"="+E(Y[1])},"").join("&")};function nQ(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function PO(d,s,E){if(!s)return d;const R=E&&E.encode||nQ;eo.isFunction(E)&&(E={serialize:E});const Y=E&&E.serialize;let dt;if(Y?dt=Y(s,E):dt=eo.isURLSearchParams(s)?s.toString():new fM(s,E).toString(R),dt){const _t=d.indexOf("#");_t!==-1&&(d=d.slice(0,_t)),d+=(d.indexOf("?")===-1?"?":"&")+dt}return d}class VL{constructor(){this.handlers=[]}use(s,E,R){return this.handlers.push({fulfilled:s,rejected:E,synchronous:R?R.synchronous:!1,runWhen:R?R.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){eo.forEach(this.handlers,function(R){R!==null&&s(R)})}}const IO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iQ=typeof URLSearchParams<"u"?URLSearchParams:fM,aQ=typeof FormData<"u"?FormData:null,oQ=typeof Blob<"u"?Blob:null,sQ={isBrowser:!0,classes:{URLSearchParams:iQ,FormData:aQ,Blob:oQ},protocols:["http","https","file","blob","url","data"]},dM=typeof window<"u"&&typeof document<"u",MA=typeof navigator=="object"&&navigator||void 0,lQ=dM&&(!MA||["ReactNative","NativeScript","NS"].indexOf(MA.product)<0),uQ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cQ=dM&&window.location.href||"http://localhost",hQ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dM,hasStandardBrowserEnv:lQ,hasStandardBrowserWebWorkerEnv:uQ,navigator:MA,origin:cQ},Symbol.toStringTag,{value:"Module"})),Xp={...hQ,...sQ};function fQ(d,s){return G4(d,new Xp.classes.URLSearchParams,{visitor:function(E,R,Y,dt){return Xp.isNode&&eo.isBuffer(E)?(this.append(R,E.toString("base64")),!1):dt.defaultVisitor.apply(this,arguments)},...s})}function dQ(d){return eo.matchAll(/\w+|\[(\w*)]/g,d).map(s=>s[0]==="[]"?"":s[1]||s[0])}function pQ(d){const s={},E=Object.keys(d);let R;const Y=E.length;let dt;for(R=0;R=E.length;return _t=!_t&&eo.isArray(Y)?Y.length:_t,jt?(eo.hasOwnProp(Y,_t)?Y[_t]=[Y[_t],R]:Y[_t]=R,!zt):((!Y[_t]||!eo.isObject(Y[_t]))&&(Y[_t]=[]),s(E,R,Y[_t],dt)&&eo.isArray(Y[_t])&&(Y[_t]=pQ(Y[_t])),!zt)}if(eo.isFormData(d)&&eo.isFunction(d.entries)){const E={};return eo.forEachEntry(d,(R,Y)=>{s(dQ(R),Y,E,0)}),E}return null}function mQ(d,s,E){if(eo.isString(d))try{return(s||JSON.parse)(d),eo.trim(d)}catch(R){if(R.name!=="SyntaxError")throw R}return(E||JSON.stringify)(d)}const ow={transitional:IO,adapter:["xhr","http","fetch"],transformRequest:[function(s,E){const R=E.getContentType()||"",Y=R.indexOf("application/json")>-1,dt=eo.isObject(s);if(dt&&eo.isHTMLForm(s)&&(s=new FormData(s)),eo.isFormData(s))return Y?JSON.stringify(zO(s)):s;if(eo.isArrayBuffer(s)||eo.isBuffer(s)||eo.isStream(s)||eo.isFile(s)||eo.isBlob(s)||eo.isReadableStream(s))return s;if(eo.isArrayBufferView(s))return s.buffer;if(eo.isURLSearchParams(s))return E.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let zt;if(dt){if(R.indexOf("application/x-www-form-urlencoded")>-1)return fQ(s,this.formSerializer).toString();if((zt=eo.isFileList(s))||R.indexOf("multipart/form-data")>-1){const jt=this.env&&this.env.FormData;return G4(zt?{"files[]":s}:s,jt&&new jt,this.formSerializer)}}return dt||Y?(E.setContentType("application/json",!1),mQ(s)):s}],transformResponse:[function(s){const E=this.transitional||ow.transitional,R=E&&E.forcedJSONParsing,Y=this.responseType==="json";if(eo.isResponse(s)||eo.isReadableStream(s))return s;if(s&&eo.isString(s)&&(R&&!this.responseType||Y)){const _t=!(E&&E.silentJSONParsing)&&Y;try{return JSON.parse(s,this.parseReviver)}catch(zt){if(_t)throw zt.name==="SyntaxError"?Ju.from(zt,Ju.ERR_BAD_RESPONSE,this,null,this.response):zt}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xp.classes.FormData,Blob:Xp.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eo.forEach(["delete","get","head","post","put","patch"],d=>{ow.headers[d]={}});const gQ=eo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vQ=d=>{const s={};let E,R,Y;return d&&d.split(` +`).forEach(function(_t){Y=_t.indexOf(":"),E=_t.substring(0,Y).trim().toLowerCase(),R=_t.substring(Y+1).trim(),!(!E||s[E]&&gQ[E])&&(E==="set-cookie"?s[E]?s[E].push(R):s[E]=[R]:s[E]=s[E]?s[E]+", "+R:R)}),s},HL=Symbol("internals");function i2(d){return d&&String(d).trim().toLowerCase()}function r4(d){return d===!1||d==null?d:eo.isArray(d)?d.map(r4):String(d)}function yQ(d){const s=Object.create(null),E=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let R;for(;R=E.exec(d);)s[R[1]]=R[2];return s}const xQ=d=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(d.trim());function D8(d,s,E,R,Y){if(eo.isFunction(R))return R.call(this,s,E);if(Y&&(s=E),!!eo.isString(s)){if(eo.isString(R))return s.indexOf(R)!==-1;if(eo.isRegExp(R))return R.test(s)}}function _Q(d){return d.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,E,R)=>E.toUpperCase()+R)}function bQ(d,s){const E=eo.toCamelCase(" "+s);["get","set","has"].forEach(R=>{Object.defineProperty(d,R+E,{value:function(Y,dt,_t){return this[R].call(this,s,Y,dt,_t)},configurable:!0})})}let C0=class{constructor(s){s&&this.set(s)}set(s,E,R){const Y=this;function dt(zt,jt,te){const ce=i2(jt);if(!ce)throw new Error("header name must be a non-empty string");const Ie=eo.findKey(Y,ce);(!Ie||Y[Ie]===void 0||te===!0||te===void 0&&Y[Ie]!==!1)&&(Y[Ie||jt]=r4(zt))}const _t=(zt,jt)=>eo.forEach(zt,(te,ce)=>dt(te,ce,jt));if(eo.isPlainObject(s)||s instanceof this.constructor)_t(s,E);else if(eo.isString(s)&&(s=s.trim())&&!xQ(s))_t(vQ(s),E);else if(eo.isObject(s)&&eo.isIterable(s)){let zt={},jt,te;for(const ce of s){if(!eo.isArray(ce))throw TypeError("Object iterator must return a key-value pair");zt[te=ce[0]]=(jt=zt[te])?eo.isArray(jt)?[...jt,ce[1]]:[jt,ce[1]]:ce[1]}_t(zt,E)}else s!=null&&dt(E,s,R);return this}get(s,E){if(s=i2(s),s){const R=eo.findKey(this,s);if(R){const Y=this[R];if(!E)return Y;if(E===!0)return yQ(Y);if(eo.isFunction(E))return E.call(this,Y,R);if(eo.isRegExp(E))return E.exec(Y);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,E){if(s=i2(s),s){const R=eo.findKey(this,s);return!!(R&&this[R]!==void 0&&(!E||D8(this,this[R],R,E)))}return!1}delete(s,E){const R=this;let Y=!1;function dt(_t){if(_t=i2(_t),_t){const zt=eo.findKey(R,_t);zt&&(!E||D8(R,R[zt],zt,E))&&(delete R[zt],Y=!0)}}return eo.isArray(s)?s.forEach(dt):dt(s),Y}clear(s){const E=Object.keys(this);let R=E.length,Y=!1;for(;R--;){const dt=E[R];(!s||D8(this,this[dt],dt,s,!0))&&(delete this[dt],Y=!0)}return Y}normalize(s){const E=this,R={};return eo.forEach(this,(Y,dt)=>{const _t=eo.findKey(R,dt);if(_t){E[_t]=r4(Y),delete E[dt];return}const zt=s?_Q(dt):String(dt).trim();zt!==dt&&delete E[dt],E[zt]=r4(Y),R[zt]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const E=Object.create(null);return eo.forEach(this,(R,Y)=>{R!=null&&R!==!1&&(E[Y]=s&&eo.isArray(R)?R.join(", "):R)}),E}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,E])=>s+": "+E).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...E){const R=new this(s);return E.forEach(Y=>R.set(Y)),R}static accessor(s){const R=(this[HL]=this[HL]={accessors:{}}).accessors,Y=this.prototype;function dt(_t){const zt=i2(_t);R[zt]||(bQ(Y,_t),R[zt]=!0)}return eo.isArray(s)?s.forEach(dt):dt(s),this}};C0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);eo.reduceDescriptors(C0.prototype,({value:d},s)=>{let E=s[0].toUpperCase()+s.slice(1);return{get:()=>d,set(R){this[E]=R}}});eo.freezeMethods(C0);function F8(d,s){const E=this||ow,R=s||E,Y=C0.from(R.headers);let dt=R.data;return eo.forEach(d,function(zt){dt=zt.call(E,dt,Y.normalize(),s?s.status:void 0)}),Y.normalize(),dt}function OO(d){return!!(d&&d.__CANCEL__)}function T_(d,s,E){Ju.call(this,d??"canceled",Ju.ERR_CANCELED,s,E),this.name="CanceledError"}eo.inherits(T_,Ju,{__CANCEL__:!0});function DO(d,s,E){const R=E.config.validateStatus;!E.status||!R||R(E.status)?d(E):s(new Ju("Request failed with status code "+E.status,[Ju.ERR_BAD_REQUEST,Ju.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}function wQ(d){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(d);return s&&s[1]||""}function kQ(d,s){d=d||10;const E=new Array(d),R=new Array(d);let Y=0,dt=0,_t;return s=s!==void 0?s:1e3,function(jt){const te=Date.now(),ce=R[dt];_t||(_t=te),E[Y]=jt,R[Y]=te;let Ie=dt,Je=0;for(;Ie!==Y;)Je+=E[Ie++],Ie=Ie%d;if(Y=(Y+1)%d,Y===dt&&(dt=(dt+1)%d),te-_t{E=ce,Y=null,dt&&(clearTimeout(dt),dt=null),d(...te)};return[(...te)=>{const ce=Date.now(),Ie=ce-E;Ie>=R?_t(te,ce):(Y=te,dt||(dt=setTimeout(()=>{dt=null,_t(Y)},R-Ie)))},()=>Y&&_t(Y)]}const y4=(d,s,E=3)=>{let R=0;const Y=kQ(50,250);return TQ(dt=>{const _t=dt.loaded,zt=dt.lengthComputable?dt.total:void 0,jt=_t-R,te=Y(jt),ce=_t<=zt;R=_t;const Ie={loaded:_t,total:zt,progress:zt?_t/zt:void 0,bytes:jt,rate:te||void 0,estimated:te&&zt&&ce?(zt-_t)/te:void 0,event:dt,lengthComputable:zt!=null,[s?"download":"upload"]:!0};d(Ie)},E)},WL=(d,s)=>{const E=d!=null;return[R=>s[0]({lengthComputable:E,total:d,loaded:R}),s[1]]},qL=d=>(...s)=>eo.asap(()=>d(...s)),AQ=Xp.hasStandardBrowserEnv?((d,s)=>E=>(E=new URL(E,Xp.origin),d.protocol===E.protocol&&d.host===E.host&&(s||d.port===E.port)))(new URL(Xp.origin),Xp.navigator&&/(msie|trident)/i.test(Xp.navigator.userAgent)):()=>!0,MQ=Xp.hasStandardBrowserEnv?{write(d,s,E,R,Y,dt,_t){if(typeof document>"u")return;const zt=[`${d}=${encodeURIComponent(s)}`];eo.isNumber(E)&&zt.push(`expires=${new Date(E).toUTCString()}`),eo.isString(R)&&zt.push(`path=${R}`),eo.isString(Y)&&zt.push(`domain=${Y}`),dt===!0&&zt.push("secure"),eo.isString(_t)&&zt.push(`SameSite=${_t}`),document.cookie=zt.join("; ")},read(d){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+d+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function SQ(d){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(d)}function EQ(d,s){return s?d.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):d}function FO(d,s,E){let R=!SQ(s);return d&&(R||E==!1)?EQ(d,s):s}const $L=d=>d instanceof C0?{...d}:d;function Ly(d,s){s=s||{};const E={};function R(te,ce,Ie,Je){return eo.isPlainObject(te)&&eo.isPlainObject(ce)?eo.merge.call({caseless:Je},te,ce):eo.isPlainObject(ce)?eo.merge({},ce):eo.isArray(ce)?ce.slice():ce}function Y(te,ce,Ie,Je){if(eo.isUndefined(ce)){if(!eo.isUndefined(te))return R(void 0,te,Ie,Je)}else return R(te,ce,Ie,Je)}function dt(te,ce){if(!eo.isUndefined(ce))return R(void 0,ce)}function _t(te,ce){if(eo.isUndefined(ce)){if(!eo.isUndefined(te))return R(void 0,te)}else return R(void 0,ce)}function zt(te,ce,Ie){if(Ie in s)return R(te,ce);if(Ie in d)return R(void 0,te)}const jt={url:dt,method:dt,data:dt,baseURL:_t,transformRequest:_t,transformResponse:_t,paramsSerializer:_t,timeout:_t,timeoutMessage:_t,withCredentials:_t,withXSRFToken:_t,adapter:_t,responseType:_t,xsrfCookieName:_t,xsrfHeaderName:_t,onUploadProgress:_t,onDownloadProgress:_t,decompress:_t,maxContentLength:_t,maxBodyLength:_t,beforeRedirect:_t,transport:_t,httpAgent:_t,httpsAgent:_t,cancelToken:_t,socketPath:_t,responseEncoding:_t,validateStatus:zt,headers:(te,ce,Ie)=>Y($L(te),$L(ce),Ie,!0)};return eo.forEach(Object.keys({...d,...s}),function(ce){const Ie=jt[ce]||Y,Je=Ie(d[ce],s[ce],ce);eo.isUndefined(Je)&&Ie!==zt||(E[ce]=Je)}),E}const BO=d=>{const s=Ly({},d);let{data:E,withXSRFToken:R,xsrfHeaderName:Y,xsrfCookieName:dt,headers:_t,auth:zt}=s;if(s.headers=_t=C0.from(_t),s.url=PO(FO(s.baseURL,s.url,s.allowAbsoluteUrls),d.params,d.paramsSerializer),zt&&_t.set("Authorization","Basic "+btoa((zt.username||"")+":"+(zt.password?unescape(encodeURIComponent(zt.password)):""))),eo.isFormData(E)){if(Xp.hasStandardBrowserEnv||Xp.hasStandardBrowserWebWorkerEnv)_t.setContentType(void 0);else if(eo.isFunction(E.getHeaders)){const jt=E.getHeaders(),te=["content-type","content-length"];Object.entries(jt).forEach(([ce,Ie])=>{te.includes(ce.toLowerCase())&&_t.set(ce,Ie)})}}if(Xp.hasStandardBrowserEnv&&(R&&eo.isFunction(R)&&(R=R(s)),R||R!==!1&&AQ(s.url))){const jt=Y&&dt&&MQ.read(dt);jt&&_t.set(Y,jt)}return s},CQ=typeof XMLHttpRequest<"u",LQ=CQ&&function(d){return new Promise(function(E,R){const Y=BO(d);let dt=Y.data;const _t=C0.from(Y.headers).normalize();let{responseType:zt,onUploadProgress:jt,onDownloadProgress:te}=Y,ce,Ie,Je,fr,Ar;function kr(){fr&&fr(),Ar&&Ar(),Y.cancelToken&&Y.cancelToken.unsubscribe(ce),Y.signal&&Y.signal.removeEventListener("abort",ce)}let Vr=new XMLHttpRequest;Vr.open(Y.method.toUpperCase(),Y.url,!0),Vr.timeout=Y.timeout;function fn(){if(!Vr)return;const cn=C0.from("getAllResponseHeaders"in Vr&&Vr.getAllResponseHeaders()),Dn={data:!zt||zt==="text"||zt==="json"?Vr.responseText:Vr.response,status:Vr.status,statusText:Vr.statusText,headers:cn,config:d,request:Vr};DO(function(Vi){E(Vi),kr()},function(Vi){R(Vi),kr()},Dn),Vr=null}"onloadend"in Vr?Vr.onloadend=fn:Vr.onreadystatechange=function(){!Vr||Vr.readyState!==4||Vr.status===0&&!(Vr.responseURL&&Vr.responseURL.indexOf("file:")===0)||setTimeout(fn)},Vr.onabort=function(){Vr&&(R(new Ju("Request aborted",Ju.ECONNABORTED,d,Vr)),Vr=null)},Vr.onerror=function(ti){const Dn=ti&&ti.message?ti.message:"Network Error",ii=new Ju(Dn,Ju.ERR_NETWORK,d,Vr);ii.event=ti||null,R(ii),Vr=null},Vr.ontimeout=function(){let ti=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded";const Dn=Y.transitional||IO;Y.timeoutErrorMessage&&(ti=Y.timeoutErrorMessage),R(new Ju(ti,Dn.clarifyTimeoutError?Ju.ETIMEDOUT:Ju.ECONNABORTED,d,Vr)),Vr=null},dt===void 0&&_t.setContentType(null),"setRequestHeader"in Vr&&eo.forEach(_t.toJSON(),function(ti,Dn){Vr.setRequestHeader(Dn,ti)}),eo.isUndefined(Y.withCredentials)||(Vr.withCredentials=!!Y.withCredentials),zt&&zt!=="json"&&(Vr.responseType=Y.responseType),te&&([Je,Ar]=y4(te,!0),Vr.addEventListener("progress",Je)),jt&&Vr.upload&&([Ie,fr]=y4(jt),Vr.upload.addEventListener("progress",Ie),Vr.upload.addEventListener("loadend",fr)),(Y.cancelToken||Y.signal)&&(ce=cn=>{Vr&&(R(!cn||cn.type?new T_(null,d,Vr):cn),Vr.abort(),Vr=null)},Y.cancelToken&&Y.cancelToken.subscribe(ce),Y.signal&&(Y.signal.aborted?ce():Y.signal.addEventListener("abort",ce)));const Dt=wQ(Y.url);if(Dt&&Xp.protocols.indexOf(Dt)===-1){R(new Ju("Unsupported protocol "+Dt+":",Ju.ERR_BAD_REQUEST,d));return}Vr.send(dt||null)})},PQ=(d,s)=>{const{length:E}=d=d?d.filter(Boolean):[];if(s||E){let R=new AbortController,Y;const dt=function(te){if(!Y){Y=!0,zt();const ce=te instanceof Error?te:this.reason;R.abort(ce instanceof Ju?ce:new T_(ce instanceof Error?ce.message:ce))}};let _t=s&&setTimeout(()=>{_t=null,dt(new Ju(`timeout ${s} of ms exceeded`,Ju.ETIMEDOUT))},s);const zt=()=>{d&&(_t&&clearTimeout(_t),_t=null,d.forEach(te=>{te.unsubscribe?te.unsubscribe(dt):te.removeEventListener("abort",dt)}),d=null)};d.forEach(te=>te.addEventListener("abort",dt));const{signal:jt}=R;return jt.unsubscribe=()=>eo.asap(zt),jt}},IQ=function*(d,s){let E=d.byteLength;if(E{const Y=zQ(d,s);let dt=0,_t,zt=jt=>{_t||(_t=!0,R&&R(jt))};return new ReadableStream({async pull(jt){try{const{done:te,value:ce}=await Y.next();if(te){zt(),jt.close();return}let Ie=ce.byteLength;if(E){let Je=dt+=Ie;E(Je)}jt.enqueue(new Uint8Array(ce))}catch(te){throw zt(te),te}},cancel(jt){return zt(jt),Y.return()}},{highWaterMark:2})},GL=64*1024,{isFunction:I5}=eo,DQ=(({Request:d,Response:s})=>({Request:d,Response:s}))(eo.global),{ReadableStream:YL,TextEncoder:KL}=eo.global,XL=(d,...s)=>{try{return!!d(...s)}catch{return!1}},FQ=d=>{d=eo.merge.call({skipUndefined:!0},DQ,d);const{fetch:s,Request:E,Response:R}=d,Y=s?I5(s):typeof fetch=="function",dt=I5(E),_t=I5(R);if(!Y)return!1;const zt=Y&&I5(YL),jt=Y&&(typeof KL=="function"?(Ar=>kr=>Ar.encode(kr))(new KL):async Ar=>new Uint8Array(await new E(Ar).arrayBuffer())),te=dt&&zt&&XL(()=>{let Ar=!1;const kr=new E(Xp.origin,{body:new YL,method:"POST",get duplex(){return Ar=!0,"half"}}).headers.has("Content-Type");return Ar&&!kr}),ce=_t&&zt&&XL(()=>eo.isReadableStream(new R("").body)),Ie={stream:ce&&(Ar=>Ar.body)};Y&&["text","arrayBuffer","blob","formData","stream"].forEach(Ar=>{!Ie[Ar]&&(Ie[Ar]=(kr,Vr)=>{let fn=kr&&kr[Ar];if(fn)return fn.call(kr);throw new Ju(`Response type '${Ar}' is not supported`,Ju.ERR_NOT_SUPPORT,Vr)})});const Je=async Ar=>{if(Ar==null)return 0;if(eo.isBlob(Ar))return Ar.size;if(eo.isSpecCompliantForm(Ar))return(await new E(Xp.origin,{method:"POST",body:Ar}).arrayBuffer()).byteLength;if(eo.isArrayBufferView(Ar)||eo.isArrayBuffer(Ar))return Ar.byteLength;if(eo.isURLSearchParams(Ar)&&(Ar=Ar+""),eo.isString(Ar))return(await jt(Ar)).byteLength},fr=async(Ar,kr)=>{const Vr=eo.toFiniteNumber(Ar.getContentLength());return Vr??Je(kr)};return async Ar=>{let{url:kr,method:Vr,data:fn,signal:Dt,cancelToken:cn,timeout:ti,onDownloadProgress:Dn,onUploadProgress:ii,responseType:Vi,headers:Nn,withCredentials:Wr="same-origin",fetchOptions:Bi}=BO(Ar),Ri=s||fetch;Vi=Vi?(Vi+"").toLowerCase():"text";let Li=PQ([Dt,cn&&cn.toAbortSignal()],ti),$n=null;const Hn=Li&&Li.unsubscribe&&(()=>{Li.unsubscribe()});let sa;try{if(ii&&te&&Vr!=="get"&&Vr!=="head"&&(sa=await fr(Nn,fn))!==0){let mo=new E(kr,{method:"POST",body:fn,duplex:"half"}),Ts;if(eo.isFormData(fn)&&(Ts=mo.headers.get("content-type"))&&Nn.setContentType(Ts),mo.body){const[xl,ko]=WL(sa,y4(qL(ii)));fn=ZL(mo.body,GL,xl,ko)}}eo.isString(Wr)||(Wr=Wr?"include":"omit");const Ti=dt&&"credentials"in E.prototype,Qn={...Bi,signal:Li,method:Vr.toUpperCase(),headers:Nn.normalize().toJSON(),body:fn,duplex:"half",credentials:Ti?Wr:void 0};$n=dt&&new E(kr,Qn);let la=await(dt?Ri($n,Bi):Ri(kr,Qn));const Eo=ce&&(Vi==="stream"||Vi==="response");if(ce&&(Dn||Eo&&Hn)){const mo={};["status","statusText","headers"].forEach(ro=>{mo[ro]=la[ro]});const Ts=eo.toFiniteNumber(la.headers.get("content-length")),[xl,ko]=Dn&&WL(Ts,y4(qL(Dn),!0))||[];la=new R(ZL(la.body,GL,xl,()=>{ko&&ko(),Hn&&Hn()}),mo)}Vi=Vi||"text";let no=await Ie[eo.findKey(Ie,Vi)||"text"](la,Ar);return!Eo&&Hn&&Hn(),await new Promise((mo,Ts)=>{DO(mo,Ts,{data:no,headers:C0.from(la.headers),status:la.status,statusText:la.statusText,config:Ar,request:$n})})}catch(Ti){throw Hn&&Hn(),Ti&&Ti.name==="TypeError"&&/Load failed|fetch/i.test(Ti.message)?Object.assign(new Ju("Network Error",Ju.ERR_NETWORK,Ar,$n),{cause:Ti.cause||Ti}):Ju.from(Ti,Ti&&Ti.code,Ar,$n)}}},BQ=new Map,RO=d=>{let s=d&&d.env||{};const{fetch:E,Request:R,Response:Y}=s,dt=[R,Y,E];let _t=dt.length,zt=_t,jt,te,ce=BQ;for(;zt--;)jt=dt[zt],te=ce.get(jt),te===void 0&&ce.set(jt,te=zt?new Map:FQ(s)),ce=te;return te};RO();const pM={http:tQ,xhr:LQ,fetch:{get:RO}};eo.forEach(pM,(d,s)=>{if(d){try{Object.defineProperty(d,"name",{value:s})}catch{}Object.defineProperty(d,"adapterName",{value:s})}});const JL=d=>`- ${d}`,RQ=d=>eo.isFunction(d)||d===null||d===!1;function NQ(d,s){d=eo.isArray(d)?d:[d];const{length:E}=d;let R,Y;const dt={};for(let _t=0;_t`adapter ${jt} `+(te===!1?"is not supported by the environment":"is not available in the build"));let zt=E?_t.length>1?`since : +`+_t.map(JL).join(` +`):" "+JL(_t[0]):"as no adapter specified";throw new Ju("There is no suitable adapter to dispatch the request "+zt,"ERR_NOT_SUPPORT")}return Y}const NO={getAdapter:NQ,adapters:pM};function B8(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new T_(null,d)}function QL(d){return B8(d),d.headers=C0.from(d.headers),d.data=F8.call(d,d.transformRequest),["post","put","patch"].indexOf(d.method)!==-1&&d.headers.setContentType("application/x-www-form-urlencoded",!1),NO.getAdapter(d.adapter||ow.adapter,d)(d).then(function(R){return B8(d),R.data=F8.call(d,d.transformResponse,R),R.headers=C0.from(R.headers),R},function(R){return OO(R)||(B8(d),R&&R.response&&(R.response.data=F8.call(d,d.transformResponse,R.response),R.response.headers=C0.from(R.response.headers))),Promise.reject(R)})}const jO="1.13.2",Y4={};["object","boolean","number","function","string","symbol"].forEach((d,s)=>{Y4[d]=function(R){return typeof R===d||"a"+(s<1?"n ":" ")+d}});const tP={};Y4.transitional=function(s,E,R){function Y(dt,_t){return"[Axios v"+jO+"] Transitional option '"+dt+"'"+_t+(R?". "+R:"")}return(dt,_t,zt)=>{if(s===!1)throw new Ju(Y(_t," has been removed"+(E?" in "+E:"")),Ju.ERR_DEPRECATED);return E&&!tP[_t]&&(tP[_t]=!0,console.warn(Y(_t," has been deprecated since v"+E+" and will be removed in the near future"))),s?s(dt,_t,zt):!0}};Y4.spelling=function(s){return(E,R)=>(console.warn(`${R} is likely a misspelling of ${s}`),!0)};function jQ(d,s,E){if(typeof d!="object")throw new Ju("options must be an object",Ju.ERR_BAD_OPTION_VALUE);const R=Object.keys(d);let Y=R.length;for(;Y-- >0;){const dt=R[Y],_t=s[dt];if(_t){const zt=d[dt],jt=zt===void 0||_t(zt,dt,d);if(jt!==!0)throw new Ju("option "+dt+" must be "+jt,Ju.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new Ju("Unknown option "+dt,Ju.ERR_BAD_OPTION)}}const n4={assertOptions:jQ,validators:Y4},ag=n4.validators;let My=class{constructor(s){this.defaults=s||{},this.interceptors={request:new VL,response:new VL}}async request(s,E){try{return await this._request(s,E)}catch(R){if(R instanceof Error){let Y={};Error.captureStackTrace?Error.captureStackTrace(Y):Y=new Error;const dt=Y.stack?Y.stack.replace(/^.+\n/,""):"";try{R.stack?dt&&!String(R.stack).endsWith(dt.replace(/^.+\n.+\n/,""))&&(R.stack+=` +`+dt):R.stack=dt}catch{}}throw R}}_request(s,E){typeof s=="string"?(E=E||{},E.url=s):E=s||{},E=Ly(this.defaults,E);const{transitional:R,paramsSerializer:Y,headers:dt}=E;R!==void 0&&n4.assertOptions(R,{silentJSONParsing:ag.transitional(ag.boolean),forcedJSONParsing:ag.transitional(ag.boolean),clarifyTimeoutError:ag.transitional(ag.boolean)},!1),Y!=null&&(eo.isFunction(Y)?E.paramsSerializer={serialize:Y}:n4.assertOptions(Y,{encode:ag.function,serialize:ag.function},!0)),E.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?E.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:E.allowAbsoluteUrls=!0),n4.assertOptions(E,{baseUrl:ag.spelling("baseURL"),withXsrfToken:ag.spelling("withXSRFToken")},!0),E.method=(E.method||this.defaults.method||"get").toLowerCase();let _t=dt&&eo.merge(dt.common,dt[E.method]);dt&&eo.forEach(["delete","get","head","post","put","patch","common"],Ar=>{delete dt[Ar]}),E.headers=C0.concat(_t,dt);const zt=[];let jt=!0;this.interceptors.request.forEach(function(kr){typeof kr.runWhen=="function"&&kr.runWhen(E)===!1||(jt=jt&&kr.synchronous,zt.unshift(kr.fulfilled,kr.rejected))});const te=[];this.interceptors.response.forEach(function(kr){te.push(kr.fulfilled,kr.rejected)});let ce,Ie=0,Je;if(!jt){const Ar=[QL.bind(this),void 0];for(Ar.unshift(...zt),Ar.push(...te),Je=Ar.length,ce=Promise.resolve(E);Ie{if(!R._listeners)return;let dt=R._listeners.length;for(;dt-- >0;)R._listeners[dt](Y);R._listeners=null}),this.promise.then=Y=>{let dt;const _t=new Promise(zt=>{R.subscribe(zt),dt=zt}).then(Y);return _t.cancel=function(){R.unsubscribe(dt)},_t},s(function(dt,_t,zt){R.reason||(R.reason=new T_(dt,_t,zt),E(R.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const E=this._listeners.indexOf(s);E!==-1&&this._listeners.splice(E,1)}toAbortSignal(){const s=new AbortController,E=R=>{s.abort(R)};return this.subscribe(E),s.signal.unsubscribe=()=>this.unsubscribe(E),s.signal}static source(){let s;return{token:new UO(function(Y){s=Y}),cancel:s}}};function VQ(d){return function(E){return d.apply(null,E)}}function HQ(d){return eo.isObject(d)&&d.isAxiosError===!0}const SA={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(SA).forEach(([d,s])=>{SA[s]=d});function VO(d){const s=new My(d),E=xO(My.prototype.request,s);return eo.extend(E,My.prototype,s,{allOwnKeys:!0}),eo.extend(E,s,null,{allOwnKeys:!0}),E.create=function(Y){return VO(Ly(d,Y))},E}const _d=VO(ow);_d.Axios=My;_d.CanceledError=T_;_d.CancelToken=UQ;_d.isCancel=OO;_d.VERSION=jO;_d.toFormData=G4;_d.AxiosError=Ju;_d.Cancel=_d.CanceledError;_d.all=function(s){return Promise.all(s)};_d.spread=VQ;_d.isAxiosError=HQ;_d.mergeConfig=Ly;_d.AxiosHeaders=C0;_d.formToJSON=d=>zO(eo.isHTMLForm(d)?new FormData(d):d);_d.getAdapter=NO.getAdapter;_d.HttpStatusCode=SA;_d.default=_d;const{Axios:Uyt,AxiosError:Vyt,CanceledError:Hyt,isCancel:Wyt,CancelToken:qyt,VERSION:$yt,all:Zyt,Cancel:Gyt,isAxiosError:Yyt,spread:Kyt,toFormData:Xyt,AxiosHeaders:Jyt,HttpStatusCode:Qyt,formToJSON:txt,getAdapter:ext,mergeConfig:rxt}=_d,WQ="/api",qQ="",$Q=WQ,ZQ=qQ,_y=_d.create({baseURL:$Q,timeout:5e3,headers:{"Content-Type":"application/json"}});_y.interceptors.request.use(d=>d,d=>(console.error("API Request Error:",d),Promise.reject(d)));_y.interceptors.response.use(d=>d,d=>(console.error("API Response Error:",d.response?.data||d.message),Promise.reject(d)));class ah{static async get(s,E){try{return(await _y.get(s,{params:E})).data}catch(R){throw this.handleError(R)}}static async post(s,E,R){try{return(await _y.post(s,E,R)).data}catch(Y){throw this.handleError(Y)}}static async put(s,E,R){try{return(await _y.put(s,E,R)).data}catch(Y){throw this.handleError(Y)}}static async delete(s,E){try{return(await _y.delete(s,E)).data}catch(R){throw this.handleError(R)}}static async getTransportKeys(){return this.get("transport_keys")}static async createTransportKey(s,E,R,Y,dt){const _t={name:s,flood_policy:E,parent_id:Y,last_used:dt};return R!==void 0&&(_t.transport_key=R),this.post("transport_keys",_t)}static async getTransportKey(s){return this.get(`transport_key/${s}`)}static async updateTransportKey(s,E,R,Y,dt,_t){return this.put(`transport_key/${s}`,{name:E,flood_policy:R,transport_key:Y,parent_id:dt,last_used:_t})}static async deleteTransportKey(s){return this.delete(`transport_key/${s}`)}static async updateGlobalFloodPolicy(s){return this.post("global_flood_policy",{global_flood_allow:s})}static async getLogs(){try{return(await _y.get("logs")).data}catch(s){throw this.handleError(s)}}static async deleteAdvert(s){return this.delete(`advert/${s}`)}static async pingNeighbor(s){return this.post("ping_neighbor",s)}static handleError(s){if(_d.isAxiosError(s)){if(s.response){const E=s.response.data?.error||s.response.data?.message||`HTTP ${s.response.status}`;return new Error(E)}else if(s.request)return new Error("Network error - no response received")}return new Error(s instanceof Error?s.message:"Unknown error occurred")}}const Dm=lM("system",()=>{const d=Ha(null),s=Ha(!1),E=Ha(null),R=Ha(null),Y=Ha("forward"),dt=Ha(!0),_t=Ha(0),zt=Ha(10),jt=Ha(!1),te=Wo(()=>d.value?.config?.node_name??"Unknown"),ce=Wo(()=>{const $n=d.value?.public_key;return!$n||$n==="Unknown"?"Unknown":$n.length>=16?`${$n.slice(0,8)} ... ${$n.slice(-8)}`:`${$n}`}),Ie=Wo(()=>d.value!==null),Je=Wo(()=>d.value?.version??"Unknown"),fr=Wo(()=>d.value?.core_version??"Unknown"),Ar=Wo(()=>d.value?.noise_floor_dbm??null),kr=Wo(()=>zt.value>0?Math.min(_t.value/zt.value*100,100):0),Vr=Wo(()=>Y.value==="monitor"?{text:"Monitor Mode",title:"Monitoring only - not forwarding packets"}:dt.value?{text:"Active",title:"Forwarding with duty cycle enforcement"}:{text:"No Limits",title:"Forwarding without duty cycle enforcement"}),fn=Wo(()=>Y.value==="monitor"?{active:!1,warning:!0}:{active:!0,warning:!1}),Dt=Wo(()=>dt.value?{active:!0,warning:!1}:{active:!1,warning:!0}),cn=$n=>{jt.value=$n};async function ti(){try{s.value=!0,E.value=null;const $n=await ah.get("/stats");if($n.success&&$n.data)return d.value=$n.data,R.value=new Date,Dn($n.data),$n.data;if($n&&"version"in $n){const Hn=$n;return d.value=Hn,R.value=new Date,Dn(Hn),Hn}else throw new Error($n.error||"Failed to fetch stats")}catch($n){throw E.value=$n instanceof Error?$n.message:"Unknown error occurred",console.error("Error fetching stats:",$n),$n}finally{s.value=!1}}function Dn($n){if($n.config){const sa=$n.config.repeater?.mode;(sa==="forward"||sa==="monitor")&&(Y.value=sa);const Ti=$n.config.duty_cycle;if(Ti){dt.value=Ti.enforcement_enabled!==!1;const Qn=Ti.max_airtime_percent;typeof Qn=="number"?zt.value=Qn:Qn&&typeof Qn=="object"&&"parsedValue"in Qn&&(zt.value=Qn.parsedValue||10)}}const Hn=$n.utilization_percent;typeof Hn=="number"?_t.value=Hn:Hn&&typeof Hn=="object"&&"parsedValue"in Hn&&(_t.value=Hn.parsedValue||0)}async function ii($n){try{const Hn=await ah.post("/set_mode",{mode:$n});if(Hn.success)return Y.value=$n,!0;throw new Error(Hn.error||"Failed to set mode")}catch(Hn){throw E.value=Hn instanceof Error?Hn.message:"Unknown error occurred",console.error("Error setting mode:",Hn),Hn}}async function Vi($n){try{const Hn=await ah.post("/set_duty_cycle",{enabled:$n});if(Hn.success)return dt.value=$n,!0;throw new Error(Hn.error||"Failed to set duty cycle")}catch(Hn){throw E.value=Hn instanceof Error?Hn.message:"Unknown error occurred",console.error("Error setting duty cycle:",Hn),Hn}}async function Nn(){try{const $n=await ah.post("/send_advert",{},{timeout:1e4});if($n.success)return console.log("Advertisement sent successfully:",$n.data),!0;throw new Error($n.error||"Failed to send advert")}catch($n){throw E.value=$n instanceof Error?$n.message:"Unknown error occurred",console.error("Error sending advert:",$n),$n}}async function Wr(){const $n=Y.value==="forward"?"monitor":"forward";return await ii($n)}async function Bi(){return await Vi(!dt.value)}async function Ri($n=5e3){await ti();const Hn=setInterval(async()=>{try{await ti()}catch(sa){console.error("Auto-refresh error:",sa)}},$n);return()=>clearInterval(Hn)}function Li(){d.value=null,E.value=null,R.value=null,s.value=!1,Y.value="forward",dt.value=!0,_t.value=0,zt.value=10}return{stats:d,isLoading:s,error:E,lastUpdated:R,currentMode:Y,dutyCycleEnabled:dt,dutyCycleUtilization:_t,dutyCycleMax:zt,cadCalibrationRunning:jt,nodeName:te,pubKey:ce,hasStats:Ie,version:Je,coreVersion:fr,noiseFloorDbm:Ar,dutyCyclePercentage:kr,statusBadge:Vr,modeButtonState:fn,dutyCycleButtonState:Dt,fetchStats:ti,setMode:ii,setDutyCycle:Vi,sendAdvert:Nn,toggleMode:Wr,toggleDutyCycle:Bi,startAutoRefresh:Ri,reset:Li,setCadCalibrationRunning:cn}}),Bf=(d,s)=>{const E=d.__vccOpts||d;for(const[R,Y]of s)E[R]=Y;return E},GQ={},YQ={width:"23",height:"25",viewBox:"0 0 23 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KQ(d,s){return ci(),wi("svg",YQ,s[0]||(s[0]=[ye("path",{d:"M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z",fill:"white"},null,-1),ye("path",{d:"M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z",fill:"white"},null,-1)]))}const XQ=Bf(GQ,[["render",KQ]]),JQ={},QQ={width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ttt(d,s){return ci(),wi("svg",QQ,s[0]||(s[0]=[Ff('',12)]))}const ett=Bf(JQ,[["render",ttt]]),sw=lM("packets",()=>{const d=Ha(null),s=Ha(null),E=Ha([]),R=Ha([]),Y=Ha(null),dt=Ha(!1),_t=Ha(null),zt=Ha(null),jt=Ha([]),te=Ha([]),ce=Wo(()=>d.value!==null),Ie=Wo(()=>s.value!==null),Je=Wo(()=>E.value.length>0),fr=Wo(()=>R.value.length>0),Ar=Wo(()=>Y.value?.avg_noise_floor??0),kr=Wo(()=>d.value?.total_packets??0),Vr=Wo(()=>d.value?.avg_rssi??0),fn=Wo(()=>d.value?.avg_snr??0),Dt=Wo(()=>s.value?.uptime_seconds??0),cn=Wo(()=>{if(!d.value?.packet_types)return[];const Ti=d.value.packet_types,Qn=Ti.reduce((la,Eo)=>la+Eo.count,0);return Ti.map(la=>({type:la.type.toString(),count:la.count,percentage:Qn>0?la.count/Qn*100:0}))}),ti=Wo(()=>{const Ti={};return E.value.forEach(Qn=>{Ti[Qn.type]||(Ti[Qn.type]=[]),Ti[Qn.type].push(Qn)}),Ti});async function Dn(){try{const Ti=await ah.get("/stats");if(Ti.success&&Ti.data){s.value=Ti.data;const Qn=new Date;return te.value.push({timestamp:Qn,stats:Ti.data}),te.value.length>50&&(te.value=te.value.slice(-50)),Ti.data}else if(Ti&&"version"in Ti){const Qn=Ti;s.value=Qn;const la=new Date;return te.value.push({timestamp:la,stats:Qn}),te.value.length>50&&(te.value=te.value.slice(-50)),Qn}else throw new Error(Ti.error||"Failed to fetch system stats")}catch(Ti){throw _t.value=Ti instanceof Error?Ti.message:"Unknown error occurred",console.error("Error fetching system stats:",Ti),Ti}}async function ii(Ti={hours:24}){try{const Qn=await ah.get("/noise_floor_history",Ti);if(Qn.success&&Qn.data&&Qn.data.history)return R.value=Qn.data.history,zt.value=new Date,Qn.data.history;throw new Error(Qn.error||"Failed to fetch noise floor history")}catch(Qn){throw _t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching noise floor history:",Qn),Qn}}async function Vi(Ti={hours:24}){try{const Qn=await ah.get("/noise_floor_stats",Ti);if(Qn.success&&Qn.data&&Qn.data.stats)return Y.value=Qn.data.stats,zt.value=new Date,Qn.data.stats;throw new Error(Qn.error||"Failed to fetch noise floor stats")}catch(Qn){throw _t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching noise floor stats:",Qn),Qn}}const Nn=Wo(()=>!R.value||!Array.isArray(R.value)?[]:R.value.slice(-50).map(Ti=>Ti.noise_floor_dbm));async function Wr(Ti={hours:24}){try{dt.value=!0,_t.value=null;const Qn=await ah.get("/packet_stats",Ti);if(Qn.success&&Qn.data){d.value=Qn.data;const la=new Date;jt.value.push({timestamp:la,stats:Qn.data}),jt.value.length>50&&(jt.value=jt.value.slice(-50)),zt.value=la}else throw new Error(Qn.error||"Failed to fetch packet stats")}catch(Qn){_t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching packet stats:",Qn)}finally{dt.value=!1}}async function Bi(Ti={limit:100}){try{dt.value=!0,_t.value=null;const Qn=await ah.get("/recent_packets",Ti);if(Qn.success&&Qn.data)E.value=Qn.data,zt.value=new Date;else throw new Error(Qn.error||"Failed to fetch recent packets")}catch(Qn){_t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching recent packets:",Qn)}finally{dt.value=!1}}async function Ri(Ti){try{dt.value=!0,_t.value=null;const Qn=await ah.get("/filtered_packets",Ti);if(Qn.success&&Qn.data)return E.value=Qn.data,zt.value=new Date,Qn.data;throw new Error(Qn.error||"Failed to fetch filtered packets")}catch(Qn){throw _t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching filtered packets:",Qn),Qn}finally{dt.value=!1}}async function Li(Ti){try{dt.value=!0,_t.value=null;const Qn=await ah.get("/packet_by_hash",{packet_hash:Ti});if(Qn.success&&Qn.data)return Qn.data;throw new Error(Qn.error||"Packet not found")}catch(Qn){throw _t.value=Qn instanceof Error?Qn.message:"Unknown error occurred",console.error("Error fetching packet by hash:",Qn),Qn}finally{dt.value=!1}}const $n=Wo(()=>{const Ti=jt.value,Qn=te.value;return{totalPackets:Ti.map(la=>la.stats.total_packets),transmittedPackets:Ti.map(la=>la.stats.transmitted_packets),droppedPackets:Ti.map(la=>la.stats.dropped_packets),avgRssi:Ti.map(la=>la.stats.avg_rssi),uptimeHours:Qn.map(la=>Math.floor((la.stats.uptime_seconds||0)/3600))}});async function Hn(Ti=3e4){await Promise.all([Dn(),Wr(),Bi(),ii({hours:1}),Vi({hours:1})]);const Qn=setInterval(async()=>{try{await Promise.all([Dn(),Wr(),Bi(),ii({hours:1}),Vi({hours:1})])}catch(la){console.error("Auto-refresh error:",la)}},Ti);return()=>clearInterval(Qn)}function sa(){d.value=null,s.value=null,E.value=[],R.value=[],Y.value=null,jt.value=[],te.value=[],_t.value=null,zt.value=null,dt.value=!1}return{packetStats:d,systemStats:s,recentPackets:E,noiseFloorHistory:R,noiseFloorStats:Y,packetStatsHistory:jt,systemStatsHistory:te,isLoading:dt,error:_t,lastUpdated:zt,hasPacketStats:ce,hasSystemStats:Ie,hasRecentPackets:Je,hasNoiseFloorData:fr,currentNoiseFloor:Ar,totalPackets:kr,averageRSSI:Vr,averageSNR:fn,uptime:Dt,packetTypeBreakdown:cn,recentPacketsByType:ti,sparklineData:$n,noiseFloorSparklineData:Nn,fetchSystemStats:Dn,fetchPacketStats:Wr,fetchRecentPackets:Bi,fetchFilteredPackets:Ri,getPacketByHash:Li,fetchNoiseFloorHistory:ii,fetchNoiseFloorStats:Vi,startAutoRefresh:Hn,reset:sa}}),rtt={class:"glass-card-green p-5 relative overflow-hidden"},ntt={key:0,class:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10 rounded-lg"},itt={class:"flex items-baseline gap-2 mb-8"},att={class:"text-primary text-2xl font-medium"},ott={class:"absolute bottom-0 left-5 w-[196px] h-[30px]",viewBox:"0 0 196 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},stt=["d"],ltt=["d"],utt=["cy"],ctt=Ec({__name:"RFNoiseFloor",setup(d){const s=sw(),E=Dm(),R=Ha(null),Y=ce=>{if(ce.length<2)return"";const Ie=196,Je=30,fr=4,Ar=-125,Vr=-105-Ar;let fn="";return ce.forEach((Dt,cn)=>{const ti=cn/(ce.length-1)*Ie,Dn=(Dt-Ar)/Vr,ii=Je-Dn*(Je-fr*2)-fr;if(cn===0)fn+=`M ${ti} ${ii}`;else{const Nn=((cn-1)/(ce.length-1)*Ie+ti)/2;fn+=` Q ${Nn} ${ii} ${ti} ${ii}`}}),fn},dt=async()=>{try{await Promise.all([s.fetchNoiseFloorHistory({hours:1}),s.fetchNoiseFloorStats({hours:1})])}catch(ce){console.error("Error fetching noise floor data:",ce)}};op(()=>{dt(),R.value=window.setInterval(dt,5e3)}),zm(()=>{R.value&&clearInterval(R.value)});const _t=Wo(()=>{const ce=s.noiseFloorSparklineData;return ce&&ce.length>0?ce[ce.length-1]:s.noiseFloorStats?.avg_noise_floor??-116}),zt=Wo(()=>s.noiseFloorSparklineData),jt=Wo(()=>Y(zt.value)),te=Wo(()=>{if(zt.value.length===0)return 15;const ce=zt.value[zt.value.length-1],Ie=-125,fr=-105-Ie;return 30-(ce-Ie)/fr*22-4});return(ce,Ie)=>(ci(),wi("div",rtt,[Ol(E).cadCalibrationRunning?(ci(),wi("div",ntt,Ie[0]||(Ie[0]=[Ff('
CAD Calibration

In Progress

',1)]))):Uo("",!0),Ie[4]||(Ie[4]=ye("p",{class:"text-dark-text text-xs uppercase mb-2"},"RF NOISE FLOOR",-1)),ye("div",itt,[ye("span",att,Fi(_t.value),1),Ie[1]||(Ie[1]=ye("span",{class:"text-dark-text text-xs uppercase"},"dBm",-1))]),(ci(),wi("svg",ott,[Ie[3]||(Ie[3]=Ff('',1)),zt.value.length>1?(ci(),wi("path",{key:0,d:`${jt.value} L 196 30 L 0 30 Z`,fill:"url(#rf-noise-gradient)",class:"transition-all duration-500 ease-out"},null,8,stt)):Uo("",!0),zt.value.length>1?(ci(),wi("path",{key:1,d:jt.value,stroke:"#B1FFFF","stroke-width":"2",fill:"none",filter:"url(#line-glow)",class:"transition-all duration-500 ease-out"},null,8,ltt)):Uo("",!0),zt.value.length>0?(ci(),wi("circle",{key:2,cx:196,cy:te.value,r:"2",fill:"#B1FFFF",class:"animate-pulse"},Ie[2]||(Ie[2]=[ye("animate",{attributeName:"r",values:"2;3;2",dur:"2s",repeatCount:"indefinite"},null,-1)]),8,utt)):Uo("",!0)]))]))}}),HO=Bf(ctt,[["__scopeId","data-v-ad12b3cb"]]),htt={},ftt={width:"800px",height:"800px",viewBox:"0 -1.5 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"w-full h-full"};function dtt(d,s){return ci(),wi("svg",ftt,s[0]||(s[0]=[ye("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[ye("g",{transform:"translate(-420.000000, -3641.000000)",fill:"currentColor"},[ye("g",{id:"icons",transform:"translate(56.000000, 160.000000)"},[ye("path",{d:"M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831",id:"radio_tower-[#1019]"})])])],-1)]))}const ptt=Bf(htt,[["render",dtt]]),mtt={class:"text-center"},gtt={class:"relative flex items-center justify-center mb-8"},vtt={class:"relative w-32 h-32"},ytt={class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"},xtt={key:0,class:"absolute inset-0 flex items-center justify-center"},_tt={key:1,class:"absolute inset-0 flex items-center justify-center"},btt={key:2,class:"absolute inset-0"},wtt={class:"mb-6"},ktt={key:0,class:"text-white text-lg"},Ttt={key:1,class:"text-accent-green text-lg font-medium"},Att={key:2,class:"text-secondary text-lg"},Mtt={key:3,class:"text-accent-red text-lg"},Stt={key:4,class:"text-dark-text"},Ett={key:5,class:"mt-3"},Ctt={key:0,class:"text-secondary text-sm"},Ltt={key:1,class:"text-accent-red text-sm"},Ptt={key:0,class:"flex gap-3"},Itt={key:1,class:"text-dark-text text-sm"},ztt=Ec({name:"AdvertModal",__name:"AdvertModal",props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:["close","send"],setup(d,{emit:s}){const E=d,R=s,Y=Ha(!1),dt=Ha(!1),_t=Ha(!1);Em(()=>E.isOpen,ce=>{ce?(Y.value=!0,setTimeout(()=>{dt.value=!0},50)):(dt.value=!1,_t.value=!1,setTimeout(()=>{Y.value=!1},300))},{immediate:!0}),Em(()=>E.isLoading,ce=>{ce||setTimeout(()=>{_t.value=!1},1e3)});const zt=()=>{E.isLoading||R("close")},jt=()=>{E.isLoading||(_t.value=!0,R("send"))},te=ce=>ce?.includes("Network error - no response received")||ce?.includes("timeout");return(ce,Ie)=>(ci(),G0(QA,{to:"body"},[Y.value?(ci(),wi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:Pm(zt,["self"])},[ye("div",{class:Fo(["absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300",dt.value?"opacity-100":"opacity-0"])},null,2),ye("div",{class:Fo(["relative glass-card rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300",dt.value?"scale-100 opacity-100":"scale-95 opacity-0"])},[ce.isLoading?Uo("",!0):(ci(),wi("button",{key:0,onClick:zt,class:"absolute top-4 right-4 text-dark-text hover:text-white transition-colors p-2"},Ie[0]||(Ie[0]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))),ye("div",mtt,[Ie[6]||(Ie[6]=ye("h2",{class:"text-white text-xl font-semibold mb-6"},"Send Advertisement",-1)),ye("div",gtt,[ye("div",vtt,[ye("div",ytt,[El(ptt,{class:Fo(["w-16 h-16 transition-all duration-500",[ce.isLoading?"animate-pulse":"",ce.isSuccess?"text-accent-green":ce.error&&!te(ce.error)?"text-accent-red":"text-primary"]]),style:hm({filter:ce.isLoading?"drop-shadow(0 0 8px currentColor)":ce.isSuccess?"drop-shadow(0 0 8px #A5E5B6)":ce.error&&!te(ce.error)?"drop-shadow(0 0 8px #FB787B)":"drop-shadow(0 0 4px #AAE8E8)"})},null,8,["class","style"])]),ce.isLoading||ce.isSuccess?(ci(),wi("div",xtt,[ye("div",{class:Fo(["absolute w-16 h-16 rounded-full border-2 animate-ping",[ce.isSuccess?"border-accent-green/60":"border-primary/60"]]),style:{"animation-duration":"1.5s"}},null,2),ye("div",{class:Fo(["absolute w-24 h-24 rounded-full border-2 animate-ping",[ce.isSuccess?"border-accent-green/40":"border-primary/40"]]),style:{"animation-duration":"2s","animation-delay":"0.3s"}},null,2),ye("div",{class:Fo(["absolute w-32 h-32 rounded-full border-2 animate-ping",[ce.isSuccess?"border-accent-green/20":"border-primary/20"]]),style:{"animation-duration":"2.5s","animation-delay":"0.6s"}},null,2)])):Uo("",!0),_t.value?(ci(),wi("div",_tt,Ie[1]||(Ie[1]=[ye("div",{class:"absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast"},null,-1),ye("div",{class:"absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast",style:{"animation-delay":"0.1s"}},null,-1),ye("div",{class:"absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast",style:{"animation-delay":"0.2s"}},null,-1),ye("div",{class:"absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast",style:{"animation-delay":"0.3s"}},null,-1)]))):Uo("",!0),ce.isLoading||ce.isSuccess?(ci(),wi("div",btt,[ye("div",{class:Fo(["absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[ce.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"0.5s"}},Ie[2]||(Ie[2]=[ye("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),ye("div",{class:Fo(["absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[ce.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1s"}},Ie[3]||(Ie[3]=[ye("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),ye("div",{class:Fo(["absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[ce.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1.5s",transform:"translateY(-50%)"}},Ie[4]||(Ie[4]=[ye("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),ye("div",{class:Fo(["absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[ce.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"2s"}},Ie[5]||(Ie[5]=[ye("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2)])):Uo("",!0)])]),ye("div",wtt,[ce.isLoading?(ci(),wi("p",ktt," Broadcasting advertisement... ")):ce.isSuccess?(ci(),wi("p",Ttt," Advertisement sent successfully! ")):ce.error&&te(ce.error)?(ci(),wi("p",Att," Advertisement likely sent ")):ce.error?(ci(),wi("p",Mtt," Failed to send advertisement ")):(ci(),wi("p",Stt," This will broadcast your node's presence to nearby nodes. ")),ce.error?(ci(),wi("div",Ett,[te(ce.error)?(ci(),wi("p",Ctt," Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. ")):(ci(),wi("p",Ltt,Fi(ce.error),1))])):Uo("",!0)]),!ce.isLoading&&!ce.isSuccess?(ci(),wi("div",Ptt,[ye("button",{onClick:zt,class:"flex-1 glass-card border border-dark-border hover:border-primary rounded-[10px] px-6 py-3 text-dark-text hover:text-white transition-all duration-200"}," Cancel "),ye("button",{onClick:jt,class:Fo(["flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg",[ce.error&&te(ce.error)?"bg-secondary hover:bg-secondary/90 text-dark-bg hover:shadow-secondary/20":"bg-primary hover:bg-primary/90 text-dark-bg hover:shadow-primary/20"]])},Fi(ce.error&&te(ce.error)?"Try Again":"Send Advertisement"),3)])):Uo("",!0),ce.isSuccess?(ci(),wi("div",Itt," Closing automatically... ")):Uo("",!0)])],2)])):Uo("",!0)]))}}),WO=Bf(ztt,[["__scopeId","data-v-a5eb8c7f"]]),Ott={},Dtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ftt(d,s){return ci(),wi("svg",Dtt,s[0]||(s[0]=[Ff('',2)]))}const qO=Bf(Ott,[["render",Ftt]]),Btt={},Rtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ntt(d,s){return ci(),wi("svg",Rtt,s[0]||(s[0]=[Ff('',9)]))}const $O=Bf(Btt,[["render",Ntt]]),jtt={},Utt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Vtt(d,s){return ci(),wi("svg",Utt,s[0]||(s[0]=[Ff('',2)]))}const ZO=Bf(jtt,[["render",Vtt]]),Htt={},Wtt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qtt(d,s){return ci(),wi("svg",Wtt,s[0]||(s[0]=[ye("path",{d:"M9.81633 1.99133L8.5085 0.683492C8.29229 0.466088 8.03511 0.293723 7.75185 0.176372C7.46859 0.059021 7.16486 -0.000985579 6.85825 -0.000175002H1.75C1.28587 -0.000175002 0.840752 0.184199 0.512563 0.512388C0.184375 0.840577 0 1.2857 0 1.74983V13.9998H10.5V3.64099C10.4985 3.02248 10.2528 2.4296 9.81633 1.99133ZM8.9915 2.81616C9.02083 2.84799 9.04829 2.88149 9.07375 2.91649H7.58333V1.42608C7.61834 1.45153 7.65184 1.479 7.68367 1.50833L8.9915 2.81616ZM1.16667 12.8332V1.74983C1.16667 1.59512 1.22812 1.44674 1.33752 1.33735C1.44692 1.22795 1.59529 1.16649 1.75 1.16649H6.41667V4.08316H9.33333V12.8332H1.16667ZM2.33333 9.33316H8.16667V5.83316H2.33333V9.33316ZM3.5 6.99983H7V8.16649H3.5V6.99983ZM2.33333 10.4998H8.16667V11.6665H2.33333V10.4998Z",fill:"white"},null,-1)]))}const GO=Bf(Htt,[["render",qtt]]),$tt={},Ztt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gtt(d,s){return ci(),wi("svg",Ztt,s[0]||(s[0]=[Ff('',2)]))}const YO=Bf($tt,[["render",Gtt]]),Ytt={name:"SystemIcon"},Ktt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xtt(d,s,E,R,Y,dt){return ci(),wi("svg",Ktt,s[0]||(s[0]=[Ff('',5)]))}const KO=Bf(Ytt,[["render",Xtt]]),Jtt={},Qtt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tet(d,s){return ci(),wi("svg",Qtt,s[0]||(s[0]=[ye("path",{d:"M10.5 14.0004H9.33333V11.0586C9.33287 10.6013 9.15099 10.1628 8.82761 9.83942C8.50422 9.51603 8.06575 9.33415 7.60842 9.33369H2.89158C2.43425 9.33415 1.99578 9.51603 1.67239 9.83942C1.34901 10.1628 1.16713 10.6013 1.16667 11.0586V14.0004H0V11.0586C0.000926233 10.292 0.305872 9.55705 0.847948 9.01497C1.39002 8.47289 2.12497 8.16795 2.89158 8.16702H7.60842C8.37503 8.16795 9.10998 8.47289 9.65205 9.01497C10.1941 9.55705 10.4991 10.292 10.5 11.0586V14.0004Z",fill:"white"},null,-1),ye("path",{d:"M5.25 6.99997C4.55777 6.99997 3.88108 6.7947 3.30551 6.41011C2.72993 6.02553 2.28133 5.4789 2.01642 4.83936C1.75152 4.19982 1.6822 3.49609 1.81725 2.81716C1.9523 2.13822 2.28564 1.51458 2.77513 1.0251C3.26461 0.535614 3.88825 0.202271 4.56719 0.0672226C5.24612 -0.0678257 5.94985 0.00148598 6.58939 0.266393C7.22894 0.531299 7.77556 0.979903 8.16015 1.55548C8.54473 2.13105 8.75 2.80774 8.75 3.49997C8.74908 4.42794 8.38003 5.31765 7.72385 5.97382C7.06768 6.63 6.17798 6.99904 5.25 6.99997ZM5.25 1.16664C4.78851 1.16664 4.33739 1.30349 3.95367 1.55988C3.56996 1.81627 3.27089 2.18068 3.09428 2.60704C2.91768 3.0334 2.87147 3.50256 2.9615 3.95518C3.05153 4.4078 3.27376 4.82357 3.60009 5.14989C3.92641 5.47621 4.34217 5.69844 4.79479 5.78847C5.24741 5.8785 5.71657 5.83229 6.14293 5.65569C6.56929 5.47909 6.93371 5.18002 7.1901 4.7963C7.44649 4.41259 7.58334 3.96146 7.58334 3.49997C7.58334 2.88113 7.3375 2.28764 6.89992 1.85006C6.46233 1.41247 5.86884 1.16664 5.25 1.16664Z",fill:"white"},null,-1)]))}const XO=Bf(Jtt,[["render",tet]]),eet={},ret={width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function net(d,s){return ci(),wi("svg",ret,s[0]||(s[0]=[ye("path",{d:"M6.77889 9.16667H10.1122V12.5M4.11222 3.83333H0.77889V0.5M10.3906 4.50227C10.0168 3.57711 9.39097 2.77536 8.58423 2.18815C7.77749 1.60094 6.82233 1.25168 5.82707 1.18034C4.8318 1.109 3.83627 1.31827 2.95402 1.78441C2.07177 2.25055 1.3381 2.95503 0.836182 3.81742M0.500244 8.49805C0.874034 9.42321 1.49986 10.225 2.30661 10.8122C3.11335 11.3994 4.06948 11.7482 5.06474 11.8195C6.06001 11.8909 7.05473 11.6816 7.93697 11.2155C8.81922 10.7494 9.55239 10.045 10.0543 9.18262",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const JO=Bf(eet,[["render",net]]),iet={},aet={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oet(d,s){return ci(),wi("svg",aet,s[0]||(s[0]=[Ff('',2)]))}const QO=Bf(iet,[["render",oet]]),set={class:"w-[285px] flex-shrink-0 p-[15px] hidden lg:block"},uet={class:"glass-card h-full p-6"},cet={class:"mb-12"},het={class:"text-[#C3C3C3] text-sm"},fet=["title"],det={class:"text-[#C3C3C3] text-sm mt-1"},pet={class:"mb-8"},met={class:"mb-8"},get={class:"space-y-2"},vet=["onClick"],yet={class:"mb-8"},xet={class:"space-y-2"},_et=["onClick"],bet=["disabled"],wet={class:"flex items-center gap-3"},ket=["disabled"],Tet={class:"flex items-center gap-3"},Aet={class:"mb-4"},Met={class:"flex items-center gap-2"},Eet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Cet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Let={key:0,class:"mb-4"},Pet={class:"text-dark-text text-xs mb-2"},Iet={class:"text-white"},zet={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},Oet={class:"flex items-center justify-between"},Det={class:"flex items-center gap-2 text-dark-text text-xs"},Fet={class:"flex items-center gap-2"},Bet={href:"https://github.com/rightup",target:"_blank",class:"inline-block"},Ret={href:"https://buymeacoffee.com/rightup",target:"_blank",class:"inline-block"},Net=Ec({name:"SidebarNav",__name:"Sidebar",setup(d){const s=vO(),E=yO(),R=Dm(),Y=Ha(!1),dt=Ha(!1),_t=Ha(!1),zt=Ha(!1),jt=Ha(!1),te=Ha(null);let ce=null;op(async()=>{ce=await R.startAutoRefresh(5e3)}),Oy(()=>{ce&&ce()});const Ie={dashboard:$O,neighbors:XO,statistics:YO,"system-stats":KO,configuration:qO,logs:GO,help:ZO},Je=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"System Stats",icon:"system-stats",route:"/system-stats"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],fr=Wo(()=>Dn=>E.path===Dn),Ar=Dn=>{s.push(Dn)},kr=async()=>{Y.value=!0,te.value=null;try{await R.sendAdvert(),jt.value=!0,setTimeout(()=>{Vr()},2e3)}catch(Dn){te.value=Dn instanceof Error?Dn.message:"Unknown error occurred",console.error("Failed to send advert:",Dn)}finally{Y.value=!1}},Vr=()=>{zt.value=!1,jt.value=!1,te.value=null,Y.value=!1},fn=async()=>{if(!dt.value){dt.value=!0;try{await R.toggleMode()}catch(Dn){console.error("Failed to toggle mode:",Dn)}finally{dt.value=!1}}},Dt=async()=>{if(!_t.value){_t.value=!0;try{await R.toggleDutyCycle()}catch(Dn){console.error("Failed to toggle duty cycle:",Dn)}finally{_t.value=!1}}},cn=Ha(new Date().toLocaleTimeString());setInterval(()=>{cn.value=new Date().toLocaleTimeString()},1e3);const ti=Wo(()=>{const Dn=R.dutyCyclePercentage;let ii="#A5E5B6";return Dn>90?ii="#FB787B":Dn>70&&(ii="#FFC246"),{width:Dn===0?"2px":`${Math.max(Dn,2)}%`,backgroundColor:ii}});return(Dn,ii)=>(ci(),wi(_u,null,[ye("aside",set,[ye("div",uet,[ye("div",cet,[ii[1]||(ii[1]=ye("h1",{class:"text-white text-[22px] font-bold mb-2"},"pyMC Repeater",-1)),ye("p",het,[Qu(Fi(Ol(R).nodeName)+" ",1),ye("span",{class:Fo(["inline-block w-2 h-2 rounded-full ml-2",Ol(R).statusBadge.text==="Active"?"bg-accent-green":Ol(R).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:Ol(R).statusBadge.title},null,10,fet)]),ye("p",det,"<"+Fi(Ol(R).pubKey)+">",1)]),ii[10]||(ii[10]=ye("div",{class:"border-t border-dark-border mb-6"},null,-1)),ye("div",pet,[ii[3]||(ii[3]=ye("p",{class:"text-dark-text text-xs uppercase mb-4"},"Actions",-1)),ye("button",{onClick:ii[0]||(ii[0]=Vi=>zt.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors"},ii[2]||(ii[2]=[ye("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),ye("div",met,[ii[4]||(ii[4]=ye("p",{class:"text-dark-text text-xs uppercase mb-4"},"Monitoring",-1)),ye("div",get,[(ci(!0),wi(_u,null,Mh(Je.slice(0,3),Vi=>(ci(),wi("button",{key:Vi.name,onClick:Nn=>Ar(Vi.route),class:Fo([fr.value(Vi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(ci(),G0(d4(Ie[Vi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Fi(Vi.name),1)],10,vet))),128))])]),ye("div",yet,[ii[5]||(ii[5]=ye("p",{class:"text-dark-text text-xs uppercase mb-4"},"System",-1)),ye("div",xet,[(ci(!0),wi(_u,null,Mh(Je.slice(3),Vi=>(ci(),wi("button",{key:Vi.name,onClick:Nn=>Ar(Vi.route),class:Fo([fr.value(Vi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(ci(),G0(d4(Ie[Vi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Fi(Vi.name),1)],10,_et))),128))])]),El(HO,{"current-value":Ol(R).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-6"},null,8,["current-value"]),ye("button",{onClick:fn,disabled:dt.value,class:Fo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ol(R).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[ye("div",wet,[El(JO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),ii[6]||(ii[6]=ye("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),ye("span",{class:Fo(["text-xs font-medium group-hover:text-white transition-colors",Ol(R).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Fi(dt.value?"Changing...":Ol(R).currentMode.charAt(0).toUpperCase()+Ol(R).currentMode.slice(1)),3)],10,bet),ye("button",{onClick:Dt,disabled:_t.value,class:Fo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ol(R).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[ye("div",Tet,[El(QO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),ii[7]||(ii[7]=ye("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),ye("span",{class:Fo(["text-xs font-medium group-hover:text-white transition-colors",Ol(R).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Fi(_t.value?"Changing...":Ol(R).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,ket),ye("div",Aet,[ye("div",Met,[ye("span",Eet," R:v"+Fi(Ol(R).version),1),ye("span",Cet," C:v"+Fi(Ol(R).coreVersion),1)])]),ii[11]||(ii[11]=ye("div",{class:"border-t border-accent-green mb-4"},null,-1)),Ol(R).dutyCycleEnabled?(ci(),wi("div",Let,[ye("p",Pet,[ii[8]||(ii[8]=Qu(" Duty Cycle: ",-1)),ye("span",Iet,Fi(Ol(R).dutyCycleUtilization.toFixed(1))+"% / "+Fi(Ol(R).dutyCycleMax.toFixed(1))+"%",1)]),ye("div",zet,[ye("div",{class:"h-full rounded-full transition-all duration-300",style:hm(ti.value)},null,4)])])):Uo("",!0),ye("div",Oet,[ye("div",Det,[ii[9]||(ii[9]=ye("svg",{class:"w-3 h-3",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z",fill:"currentColor"})],-1)),Qu(" Last Updated: "+Fi(cn.value),1)]),ye("div",Fet,[ye("a",Bet,[El(XQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})]),ye("a",Ret,[El(ett,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})])])])])]),El(WO,{isOpen:zt.value,isLoading:Y.value,isSuccess:jt.value,error:te.value,onClose:Vr,onSend:kr},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),jet={key:0,class:"fixed inset-0 z-40 lg:hidden"},Uet={class:"absolute left-0 top-0 bottom-0 w-72 p-4"},Vet={class:"glass-card h-full p-6 overflow-auto"},Het={class:"mb-6 flex items-center justify-between"},Wet={class:"text-[#C3C3C3] text-sm"},qet=["title"],$et={class:"text-[#C3C3C3] text-sm mt-1"},Zet={class:"mb-4"},Get={class:"mb-4"},Yet={class:"space-y-2 mb-3"},Ket=["onClick"],Xet={class:"mb-4"},Jet={class:"space-y-2 mb-3"},Qet=["onClick"],trt=["disabled"],ert={class:"flex items-center gap-3"},rrt=["disabled"],nrt={class:"flex items-center gap-3"},irt={class:"mb-4"},art={class:"flex items-center gap-2"},ort={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},srt={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},lrt={key:0,class:"mb-4"},urt={class:"text-dark-text text-xs mb-2"},crt={class:"text-white"},hrt={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},frt={class:"text-dark-text text-xs"},drt=Ec({name:"MobileSidebar",__name:"MobileSidebar",props:{showMobileSidebar:{type:Boolean}},emits:["update:showMobileSidebar"],setup(d,{emit:s}){const E=s,R=vO(),Y=yO(),dt=Dm(),_t=Ha(!1),zt=Ha(!1),jt=Ha(!1),te=Ha(!1),ce=Ha(!1),Ie=Ha(null);let Je=null;op(async()=>{Je=await dt.startAutoRefresh(5e3)}),Oy(()=>{Je&&Je()});const fr={dashboard:$O,neighbors:XO,statistics:YO,"system-stats":KO,configuration:qO,logs:GO,help:ZO},Ar=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"System Stats",icon:"system-stats",route:"/system-stats"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],kr=Wo(()=>Nn=>Y.path===Nn),Vr=Nn=>{R.push(Nn),fn()},fn=()=>{E("update:showMobileSidebar",!1)},Dt=async()=>{_t.value=!0,Ie.value=null;try{await dt.sendAdvert(),ce.value=!0,setTimeout(()=>{cn()},2e3)}catch(Nn){Ie.value=Nn instanceof Error?Nn.message:"Unknown error occurred",console.error("Failed to send advert:",Nn)}finally{_t.value=!1}},cn=()=>{te.value=!1,ce.value=!1,Ie.value=null,_t.value=!1},ti=async()=>{if(!zt.value){zt.value=!0;try{await dt.toggleMode()}catch(Nn){console.error("Failed to toggle mode:",Nn)}finally{zt.value=!1}}},Dn=async()=>{if(!jt.value){jt.value=!0;try{await dt.toggleDutyCycle()}catch(Nn){console.error("Failed to toggle duty cycle:",Nn)}finally{jt.value=!1}}},ii=Ha(new Date().toLocaleTimeString());setInterval(()=>{ii.value=new Date().toLocaleTimeString()},1e3);const Vi=Wo(()=>{const Nn=dt.dutyCyclePercentage;let Wr="#A5E5B6";return Nn>90?Wr="#FB787B":Nn>70&&(Wr="#FFC246"),{width:Nn===0?"2px":`${Math.max(Nn,2)}%`,backgroundColor:Wr}});return(Nn,Wr)=>(ci(),wi(_u,null,[Nn.showMobileSidebar?(ci(),wi("div",jet,[ye("div",{class:"absolute inset-0 bg-black/50",onClick:fn}),ye("div",Uet,[ye("div",Vet,[ye("div",Het,[ye("div",null,[Wr[1]||(Wr[1]=ye("h1",{class:"text-white text-[20px] font-bold"},"pyMC Repeater",-1)),ye("p",Wet,[Qu(Fi(Ol(dt).nodeName)+" ",1),ye("span",{class:Fo(["inline-block w-2 h-2 rounded-full ml-2",Ol(dt).statusBadge.text==="Active"?"bg-accent-green":Ol(dt).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:Ol(dt).statusBadge.title},null,10,qet)]),ye("p",$et,"<"+Fi(Ol(dt).pubKey)+">",1)]),ye("button",{onClick:fn,class:"text-dark-text"},"✕")]),Wr[9]||(Wr[9]=ye("div",{class:"border-t border-dark-border mb-4"},null,-1)),ye("div",Zet,[Wr[3]||(Wr[3]=ye("p",{class:"text-dark-text text-xs uppercase mb-2"},"Actions",-1)),ye("button",{onClick:Wr[0]||(Wr[0]=Bi=>te.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors mb-2"},Wr[2]||(Wr[2]=[ye("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),ye("div",Get,[Wr[4]||(Wr[4]=ye("p",{class:"text-dark-text text-xs uppercase mb-2"},"Monitoring",-1)),ye("div",Yet,[(ci(!0),wi(_u,null,Mh(Ar.slice(0,3),Bi=>(ci(),wi("button",{key:Bi.name,onClick:Ri=>Vr(Bi.route),class:Fo([kr.value(Bi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(ci(),G0(d4(fr[Bi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Fi(Bi.name),1)],10,Ket))),128))])]),ye("div",Xet,[Wr[5]||(Wr[5]=ye("p",{class:"text-dark-text text-xs uppercase mb-2"},"System",-1)),ye("div",Jet,[(ci(!0),wi(_u,null,Mh(Ar.slice(3),Bi=>(ci(),wi("button",{key:Bi.name,onClick:Ri=>Vr(Bi.route),class:Fo([kr.value(Bi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(ci(),G0(d4(fr[Bi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Fi(Bi.name),1)],10,Qet))),128))])]),El(HO,{"current-value":Ol(dt).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-4"},null,8,["current-value"]),ye("button",{onClick:ti,disabled:zt.value,class:Fo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",Ol(dt).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[ye("div",ert,[El(JO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),Wr[6]||(Wr[6]=ye("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),ye("span",{class:Fo(["text-xs font-medium group-hover:text-white transition-colors",Ol(dt).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Fi(zt.value?"Changing...":Ol(dt).currentMode.charAt(0).toUpperCase()+Ol(dt).currentMode.slice(1)),3)],10,trt),ye("button",{onClick:Dn,disabled:jt.value,class:Fo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",Ol(dt).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[ye("div",nrt,[El(QO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),Wr[7]||(Wr[7]=ye("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),ye("span",{class:Fo(["text-xs font-medium group-hover:text-white transition-colors",Ol(dt).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Fi(jt.value?"Changing...":Ol(dt).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,rrt),ye("div",irt,[ye("div",art,[ye("span",ort," R:v"+Fi(Ol(dt).version),1),ye("span",srt," C:v"+Fi(Ol(dt).coreVersion),1)])]),Wr[10]||(Wr[10]=ye("div",{class:"border-t border-accent-green mb-4"},null,-1)),Ol(dt).dutyCycleEnabled?(ci(),wi("div",lrt,[ye("p",urt,[Wr[8]||(Wr[8]=Qu(" Duty Cycle: ",-1)),ye("span",crt,Fi(Ol(dt).dutyCycleUtilization.toFixed(1))+"% / "+Fi(Ol(dt).dutyCycleMax.toFixed(1))+"%",1)]),ye("div",hrt,[ye("div",{class:"h-full rounded-full transition-all duration-300",style:hm(Vi.value)},null,4)])])):Uo("",!0),ye("p",frt,"Last Updated: "+Fi(ii.value),1)])])])):Uo("",!0),El(WO,{isOpen:te.value,isLoading:_t.value,isSuccess:ce.value,error:Ie.value,onClose:cn,onSend:Dt},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),prt={class:"glass-card p-6 mb-5 rounded-[20px] relative z-10"},mrt={class:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"},grt={class:"flex items-center gap-3"},vrt={class:"text-right mr-4"},yrt={key:0,class:"flex items-center gap-2"},xrt={key:1,class:"space-y-1"},_rt={class:"text-dark-text text-sm"},brt={class:"text-primary font-medium"},wrt={key:0,class:"text-xs text-dark-text/80"},krt={key:0},Trt={key:1,class:"text-xs text-dark-text/60"},Art={key:2},Mrt={key:0,class:"text-xs text-dark-text/60"},Srt=["disabled"],Ert={class:"flex items-center justify-between mb-3"},Crt={class:"flex items-center gap-2"},Lrt=["disabled"],Prt=["disabled"],Irt={class:"space-y-3 text-sm"},zrt={key:0,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Ort={class:"flex items-center justify-between"},Drt={class:"text-accent-red font-bold"},Frt={class:"text-xs text-gray-400 mt-1"},Brt={key:1,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-accent-green"},Rrt={class:"flex items-center justify-between"},Nrt={class:"text-accent-green font-bold"},jrt={key:0,class:"text-xs text-gray-400 mt-1"},Urt={key:2,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},Vrt={key:3,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Hrt={class:"text-xs text-gray-400"},Wrt={class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-primary"},qrt={class:"flex items-center justify-between"},$rt={class:"text-primary font-bold"},Zrt={key:0,class:"text-xs text-gray-400 mt-1"},Grt={class:"flex items-center justify-between"},Yrt={class:"text-white font-medium"},Krt={key:0,class:"mt-2"},Xrt={class:"text-xs text-gray-400"},Jrt={class:"text-gray-300"},Qrt={key:4,class:"bg-[#0B1014] p-4 rounded-lg border border-white/10 text-center"},tnt={key:5,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 text-center"},ent=Ec({name:"TopBar",__name:"TopBar",emits:["toggleMobileSidebar"],setup(d,{emit:s}){const E=s,R=Dm(),Y=Ha(!1),dt=Ha(null),_t=Ha({hasUpdate:!1,currentVersion:"",latestVersion:"",isChecking:!1,lastChecked:null,error:null}),zt=Ha({}),jt=Ha(!0),te=Ha(null),ce=["Chat Node","Repeater","Room Server"];function Ie(Nn){const Wr=Nn.target;dt.value&&!dt.value.contains(Wr)&&(Y.value=!1)}const Je=async()=>{try{jt.value=!0;const Nn={};for(const Wr of ce)try{const Bi=await ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(Wr)}&hours=168`);Bi.success&&Array.isArray(Bi.data)?Nn[Wr]=Bi.data:Nn[Wr]=[]}catch(Bi){console.error(`Error fetching ${Wr} nodes:`,Bi),Nn[Wr]=[]}zt.value=Nn,te.value=new Date}catch(Nn){console.error("Error updating tracked nodes:",Nn)}finally{jt.value=!1}},fr=async()=>{if(!_t.value.isChecking)try{_t.value.isChecking=!0,_t.value.error=null,await R.fetchStats();const Nn=R.version;if(!Nn||Nn==="Unknown"){_t.value.error="Unable to determine current version";return}const Bi=await fetch("https://raw.githubusercontent.com/rightup/pyMC_Repeater/main/repeater/__init__.py");if(!Bi.ok)throw new Error(`GitHub request failed: ${Bi.status}`);const Li=(await Bi.text()).match(/__version__\s*=\s*["']([^"']+)["']/);if(!Li)throw new Error("Could not parse version from GitHub file");const $n=Li[1];_t.value.currentVersion=Nn,_t.value.latestVersion=$n,_t.value.lastChecked=new Date,_t.value.hasUpdate=Nn!==$n}catch(Nn){console.error("Error checking for updates:",Nn),_t.value.error=Nn instanceof Error?Nn.message:"Failed to check for updates"}finally{_t.value.isChecking=!1}},Ar=Wo(()=>Object.values(zt.value).reduce((Wr,Bi)=>Wr+Bi.length,0)),kr=Wo(()=>ce.map(Wr=>({type:Wr,count:zt.value[Wr]?.length||0})).filter(Wr=>Wr.count>0)),Vr=Wo(()=>_t.value.hasUpdate||Ar.value>0),fn=Nn=>({"Chat Node":"text-blue-400",Repeater:"text-accent-green","Room Server":"text-accent-purple"})[Nn]||"text-gray-400",Dt=Nn=>{const Wr=zt.value[Nn]||[];return Wr.length===0?"None":Wr.reduce((Ri,Li)=>Li.last_seen>Ri.last_seen?Li:Ri,Wr[0]).node_name||"Unknown Node"};let cn=null,ti=null;const Dn=()=>{cn&&clearInterval(cn),cn=setInterval(()=>{Je()},3e4),ti&&clearInterval(ti),ti=setInterval(()=>{fr()},6e5)},ii=()=>{cn&&(clearInterval(cn),cn=null),ti&&(clearInterval(ti),ti=null)};op(()=>{document.addEventListener("click",Ie),Je(),fr(),Dn()}),zm(()=>{document.removeEventListener("click",Ie),ii()});const Vi=()=>{E("toggleMobileSidebar")};return(Nn,Wr)=>(ci(),wi("div",prt,[ye("div",mrt,[ye("div",{class:"flex items-center gap-3"},[ye("button",{onClick:Vi,class:"lg:hidden w-10 h-10 rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors"},Wr[2]||(Wr[2]=[ye("svg",{class:"w-5 h-5 text-white",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M3 6h14M3 10h14M3 14h14",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),Wr[3]||(Wr[3]=ye("div",null,[ye("h1",{class:"text-white text-[35px] font-bold mb-2"},"Welcome👋")],-1))]),ye("div",grt,[ye("div",vrt,[jt.value?(ci(),wi("div",yrt,Wr[4]||(Wr[4]=[ye("div",{class:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary"},null,-1),ye("p",{class:"text-dark-text text-sm"},"Loading tracking data...",-1)]))):Ar.value>0?(ci(),wi("div",xrt,[ye("p",_rt,[Wr[5]||(Wr[5]=Qu(" Tracking: ",-1)),ye("span",brt,Fi(Ar.value)+" node"+Fi(Ar.value===1?"":"s"),1)]),kr.value.length>1?(ci(),wi("div",wrt,[(ci(!0),wi(_u,null,Mh(kr.value,(Bi,Ri)=>(ci(),wi("span",{key:Bi.type,class:"inline"},[Qu(Fi(Bi.count)+" "+Fi(Bi.type)+Fi(Bi.count===1?"":"s"),1),RiY.value=!Y.value,["stop"])),class:"w-[35px] h-[35px] rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors relative"},[Wr[8]||(Wr[8]=ye("svg",{class:"w-5 h-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),Vr.value?(ci(),wi("span",{key:0,class:Fo(["absolute top-2 right-2 w-2 h-2 rounded-full",_t.value.hasUpdate?"bg-accent-red animate-pulse":"bg-primary"])},null,2)):Uo("",!0)]),Y.value?(ci(),wi("div",{key:0,ref_key:"notifRef",ref:dt,class:"absolute right-6 top-14 z-[100] w-80 bg-[#1A1E1F] border border-white/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm",onClick:Wr[1]||(Wr[1]=Pm(()=>{},["stop"]))},[ye("div",Ert,[Wr[10]||(Wr[10]=ye("p",{class:"text-white font-semibold"},"System Status",-1)),ye("div",Crt,[ye("button",{onClick:fr,disabled:_t.value.isChecking,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50",title:"Check for updates"},Fi(_t.value.isChecking?"Checking...":"Check Updates"),9,Lrt),Wr[9]||(Wr[9]=ye("span",{class:"text-dark-text text-xs"},"•",-1)),ye("button",{onClick:Je,disabled:jt.value,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50"},Fi(jt.value?"Updating...":"Refresh"),9,Prt)])]),ye("div",Irt,[_t.value.hasUpdate?(ci(),wi("div",zrt,[ye("div",Ort,[Wr[11]||(Wr[11]=ye("span",{class:"text-white font-medium"},"Update Available",-1)),ye("span",Drt,Fi(_t.value.latestVersion),1)]),ye("div",Frt," Current: "+Fi(_t.value.currentVersion),1),Wr[12]||(Wr[12]=ye("div",{class:"text-xs text-gray-300 mt-2"},[ye("a",{href:"https://github.com/rightup/pyMC_Repeater",target:"_blank",class:"text-accent-red hover:text-accent-red/80 underline"}," Goto Github→ ")],-1))])):_t.value.currentVersion&&!_t.value.isChecking?(ci(),wi("div",Brt,[ye("div",Rrt,[Wr[13]||(Wr[13]=ye("span",{class:"text-white font-medium"},"Up to Date",-1)),ye("span",Nrt,Fi(_t.value.currentVersion),1)]),_t.value.lastChecked?(ci(),wi("div",jrt," Last checked: "+Fi(_t.value.lastChecked.toLocaleTimeString()),1)):Uo("",!0)])):_t.value.isChecking?(ci(),wi("div",Urt,Wr[14]||(Wr[14]=[ye("div",{class:"flex items-center justify-center gap-2"},[ye("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),ye("span",{class:"text-gray-300"},"Checking for updates...")],-1)]))):_t.value.error?(ci(),wi("div",Vrt,[Wr[15]||(Wr[15]=ye("div",{class:"text-white font-medium mb-1"},"Update Check Failed",-1)),ye("div",Hrt,Fi(_t.value.error),1)])):Uo("",!0),Wr[20]||(Wr[20]=ye("div",{class:"border-t border-white/10"},null,-1)),Wr[21]||(Wr[21]=ye("div",{class:"text-white font-medium text-sm mb-2"},"Mesh Network Status",-1)),ye("div",Wrt,[ye("div",qrt,[Wr[16]||(Wr[16]=ye("span",{class:"text-white font-medium"},"Total Tracked Nodes",-1)),ye("span",$rt,Fi(Ar.value),1)]),te.value?(ci(),wi("div",Zrt," Last updated: "+Fi(te.value.toLocaleString()),1)):Uo("",!0)]),(ci(!0),wi(_u,null,Mh(kr.value,Bi=>(ci(),wi("div",{key:Bi.type,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},[ye("div",Grt,[ye("span",Yrt,Fi(Bi.type)+Fi(Bi.count===1?"":"s"),1),ye("span",{class:Fo([fn(Bi.type),"font-bold"])},Fi(Bi.count),3)]),zt.value[Bi.type]?.length>0?(ci(),wi("div",Krt,[ye("div",Xrt,[Wr[17]||(Wr[17]=Qu(" Latest: ",-1)),ye("span",Jrt,Fi(Dt(Bi.type)),1)])])):Uo("",!0)]))),128)),Ar.value===0&&!jt.value?(ci(),wi("div",Qrt,Wr[18]||(Wr[18]=[ye("div",{class:"text-gray-400"},[ye("svg",{class:"w-8 h-8 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]),ye("span",null,"No mesh nodes detected")],-1)]))):Uo("",!0),jt.value?(ci(),wi("div",tnt,Wr[19]||(Wr[19]=[ye("div",{class:"flex items-center justify-center gap-2"},[ye("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),ye("span",{class:"text-gray-300"},"Scanning mesh network...")],-1)]))):Uo("",!0)])],512)):Uo("",!0)])])]))}}),rnt=Bf(ent,[["__scopeId","data-v-0a06f286"]]),nnt={class:"min-h-screen bg-dark-bg overflow-hidden relative font-sans"},int={class:"relative flex min-h-screen"},ant={class:"flex-1 p-4 lg:p-[15px] overflow-y-auto"},ont=Ec({name:"DashboardLayout",__name:"DashboardLayout",setup(d){const s=Ha(!1),E=()=>{s.value=!s.value},R=()=>{s.value=!1};return(Y,dt)=>{const _t=eM("router-view");return ci(),wi("div",nnt,[dt[1]||(dt[1]=ye("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"},null,-1)),dt[2]||(dt[2]=ye("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"},null,-1)),dt[3]||(dt[3]=ye("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"},null,-1)),ye("div",int,[El(Net,{class:"hidden lg:block"}),El(drt,{showMobileSidebar:s.value,"onUpdate:showMobileSidebar":dt[0]||(dt[0]=zt=>s.value=zt),onClose:R},null,8,["showMobileSidebar"]),ye("main",ant,[El(rnt,{onToggleMobileSidebar:E}),El(_t)])])])}}}),snt=Ec({__name:"App",setup(d){return(s,E)=>(ci(),G0(ont))}}),lnt={class:"sparkline-container"},unt={class:"text-white text-sm font-semibold mb-4"},cnt={class:"flex items-end gap-4"},hnt=["id","width","height","viewBox"],fnt=["id"],dnt=["stop-color"],pnt=["stop-color"],mnt=["d","fill"],gnt=["d","stroke"],vnt=["cx","cy","fill"],ynt=Ec({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},width:{default:131},height:{default:37},animate:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0}},setup(d){const s=d,E=Wo(()=>{if(s.data&&s.data.length>0)return s.data;const _t=typeof s.value=="number"?s.value:10,zt=20,jt=_t*.3;return Array.from({length:zt},(te,ce)=>{const Ie=Math.sin(ce/zt*Math.PI*2)*jt*.5,Je=(Math.random()-.5)*jt*.3;return Math.max(0,_t+Ie+Je)})}),R=Wo(()=>{const _t=E.value;if(_t.length<2)return"";const zt=Math.max(..._t),jt=Math.min(..._t),te=zt-jt||1,ce=s.width/(_t.length-1);let Ie="";return _t.forEach((Je,fr)=>{const Ar=fr*ce,kr=s.height-(Je-jt)/te*s.height;if(fr===0)Ie+=`M ${Ar} ${kr}`;else{const fn=((fr-1)*ce+Ar)/2;Ie+=` Q ${fn} ${kr} ${Ar} ${kr}`}}),Ie}),Y=Ha("");op(()=>{Y.value=R.value}),Em(()=>s.data,(_t,zt)=>{const jt=!zt||_t.length!==zt.length||Math.abs(_t.length-zt.length)>5;s.animate&&jt?(Y.value="",setTimeout(()=>{Y.value=R.value},50)):Y.value=R.value});const dt=Wo(()=>`sparkline-${s.title.replace(/\s+/g,"-").toLowerCase()}`);return(_t,zt)=>(ci(),wi("div",lnt,[ye("p",unt,Fi(_t.title),1),ye("div",cnt,[ye("span",{class:"text-[30px] font-bold",style:hm({color:_t.color})},[Qu(Fi(_t.value),1),IY(_t.$slots,"unit",{},void 0)],4),_t.showChart?(ci(),wi("svg",{key:0,id:dt.value,class:"mb-3 sparkline-svg",width:_t.width,height:_t.height,viewBox:`0 0 ${_t.width} ${_t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("defs",null,[ye("linearGradient",{id:`gradient-${dt.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[ye("stop",{offset:"0%","stop-color":_t.color,"stop-opacity":"0.3"},null,8,dnt),ye("stop",{offset:"100%","stop-color":_t.color,"stop-opacity":"0.1"},null,8,pnt)],8,fnt)]),ye("path",{d:`${Y.value} L ${_t.width} ${_t.height} L 0 ${_t.height} Z`,fill:`url(#gradient-${dt.value})`,class:"sparkline-fill"},null,8,mnt),ye("path",{d:Y.value,stroke:_t.color,"stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:Fo(["sparkline-path",{"animate-draw":_t.animate}])},null,10,gnt),E.value.length>0?(ci(),wi("circle",{key:0,cx:_t.width,cy:_t.height-(E.value[E.value.length-1]-Math.min(...E.value))/(Math.max(...E.value)-Math.min(...E.value)||1)*_t.height,r:"2",fill:_t.color,class:Fo(["sparkline-dot",{"animate-pulse":_t.animate}])},null,10,vnt)):Uo("",!0)],8,hnt)):Uo("",!0)])]))}}),pg=Bf(ynt,[["__scopeId","data-v-574bf55e"]]),xnt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-5"},_nt=Ec({name:"StatsCards",__name:"StatsCards",setup(d){const s=sw(),E=Ha(null),R=Wo(()=>{const _t=s.packetStats,zt=s.systemStats,jt=te=>{const ce=Math.floor(te/86400),Ie=Math.floor(te%86400/3600),Je=Math.floor(te%3600/60);return ce>0?`${ce}d ${Ie}h`:Ie>0?`${Ie}h ${Je}m`:`${Je}m`};return{packetsReceived:_t?.total_packets||0,packetsForwarded:_t?.transmitted_packets||0,uptimeFormatted:zt?jt(zt.uptime_seconds||0):"0m",uptimeHours:zt?Math.floor((zt.uptime_seconds||0)/3600):0,droppedPackets:_t?.dropped_packets||0,signalQuality:Math.round((_t?.avg_rssi||0)+120)}}),Y=Wo(()=>s.sparklineData),dt=async()=>{try{await Promise.all([s.fetchSystemStats(),s.fetchPacketStats({hours:24})])}catch(_t){console.error("Error fetching stats:",_t)}};return op(()=>{dt(),E.value=window.setInterval(dt,5e3)}),zm(()=>{E.value&&clearInterval(E.value)}),(_t,zt)=>(ci(),wi("div",xnt,[El(pg,{title:"RX Packets",value:R.value.packetsReceived,color:"#AAE8E8",data:Y.value.totalPackets},null,8,["value","data"]),El(pg,{title:"Forward",value:R.value.packetsForwarded,color:"#FFC246",data:Y.value.transmittedPackets},null,8,["value","data"]),El(pg,{title:"Up Time",value:R.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1},null,8,["value"]),El(pg,{title:"Dropped",value:R.value.droppedPackets,color:"#FB787B",data:Y.value.droppedPackets},null,8,["value","data"])]))}}),bnt={class:"glass-card rounded-[10px] p-6"},wnt={class:"h-80 relative"},knt={key:0,class:"absolute inset-0 flex items-center justify-center"},Tnt={key:1,class:"absolute inset-0 flex items-center justify-center"},Ant={class:"text-red-400"},Mnt={key:2,class:"absolute inset-0 flex items-center justify-center"},Snt={key:3,class:"h-full flex items-end justify-around gap-2 px-4"},Ent={class:"relative w-full h-64 flex flex-col justify-end"},Cnt={class:"text-white text-xs font-semibold drop-shadow-lg backdrop-blur-sm bg-black/20 px-2 py-0.5 rounded-md border border-white/10"},Lnt={class:"mt-2 text-center"},Pnt={class:"text-white text-xs font-medium leading-tight"},Int={key:0,class:"mt-4 text-sm text-white text-center"},znt=Ec({name:"SignalQualityChart",__name:"SignalQualityChart",setup(d){const s=Ha([]),E=Ha(null),R=Ha(!0),Y=Ha(null),dt=["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(139, 92, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(6, 182, 212, 0.8)","rgba(249, 115, 22, 0.8)","rgba(132, 204, 22, 0.8)","rgba(236, 72, 153, 0.8)","rgba(107, 114, 128, 0.8)"],_t=async()=>{try{Y.value=null;const jt=await ah.get("/packet_type_graph_data");if(jt?.success&&jt?.data){const te=jt.data;if(te?.series){const ce=[];te.series.forEach((Ie,Je)=>{let fr=0;Ie.data&&Array.isArray(Ie.data)&&(fr=Ie.data.reduce((Ar,kr)=>Ar+(kr[1]||0),0)),fr>0&&ce.push({name:Ie.name||`Type ${Ie.type}`,type:Ie.type,count:fr,color:dt[Je%dt.length]})}),ce.sort((Ie,Je)=>Je.count-Ie.count),s.value=ce,R.value=!1}else console.error("No series data found in response"),Y.value="No series data in server response",R.value=!1}else console.error("Invalid API response structure:",jt),Y.value="Invalid response from server",R.value=!1}catch(jt){console.error("Failed to fetch packet type data:",jt),Y.value=jt instanceof Error?jt.message:"Failed to load data",R.value=!1}},zt=jt=>{if(s.value.length===0)return 0;const te=Math.max(...s.value.map(ce=>ce.count));return Math.max(jt/te*100,2)};return op(()=>{_t(),E.value=setInterval(()=>{_t()},3e4)}),zm(()=>{E.value&&clearInterval(E.value)}),(jt,te)=>(ci(),wi("div",bnt,[te[2]||(te[2]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Packet Types",-1)),te[3]||(te[3]=ye("p",{class:"text-white text-sm uppercase mb-4"},"Distribution by Type",-1)),ye("div",wnt,[R.value?(ci(),wi("div",knt,te[0]||(te[0]=[ye("div",{class:"text-white"},"Loading packet types...",-1)]))):Y.value?(ci(),wi("div",Tnt,[ye("div",Ant,Fi(Y.value),1)])):s.value.length===0?(ci(),wi("div",Mnt,te[1]||(te[1]=[ye("div",{class:"text-white"},"No packet data available",-1)]))):(ci(),wi("div",Snt,[(ci(!0),wi(_u,null,Mh(s.value,ce=>(ci(),wi("div",{key:ce.type,class:"flex flex-col items-center flex-1 max-w-20 h-full"},[ye("div",Ent,[ye("div",{class:"w-full rounded-t-[10px] transition-all duration-500 ease-out flex items-end justify-center pb-1 backdrop-blur-[50px] shadow-lg border border-white/20 hover:border-white/30",style:hm({height:zt(ce.count)+"%",background:`linear-gradient(135deg, + ${ce.color} 0%, + ${ce.color.replace("0.8","0.6")} 30%, + ${ce.color.replace("0.8","0.4")} 70%, + ${ce.color.replace("0.8","0.3")} 100%), linear-gradient(91deg, rgba(34, 34, 34, 0.43) 1.17%, rgba(135, 135, 136, 0.10) 99.82%)`,backgroundBlendMode:"overlay, normal",minHeight:"8px",boxShadow:` - 0 8px 32px ${he.color.replace("0.8","0.3")}, + 0 8px 32px ${ce.color.replace("0.8","0.3")}, 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2) - `})},[Ee("span",lnt,Qi(he.count),1)],4)]),Ee("div",unt,[Ee("div",cnt,Qi(he.name.replace(/\([^)]*\)/g,"").trim()),1)])]))),128))]))]),s.value.length>0?(_i(),zi("div",hnt," Total packet types: "+Qi(s.value.length)+" | Total packets: "+Qi(s.value.reduce((he,De)=>he+De.count,0)),1)):is("",!0)]))}}),dnt=ld(fnt,[["__scopeId","data-v-dc58fd68"]]),pnt={class:"glass-card rounded-[10px] p-6"},mnt={class:"relative h-48"},gnt={class:"mt-4 grid grid-cols-2 gap-4"},vnt={class:"text-center"},ynt={class:"text-2xl font-bold text-white"},xnt={class:"text-center"},_nt={class:"text-2xl font-bold text-white"},bnt={class:"mt-3 grid grid-cols-3 gap-3 text-center"},wnt={class:"text-sm font-semibold text-accent-purple"},knt={class:"text-sm font-semibold text-accent-red"},Tnt={class:"text-sm font-semibold text-white"},Ant=Dc({name:"PerformanceChart",__name:"PerformanceChart",setup(d){const s=sw(),E=Ga(null),B=Ga([]),K=Ga(null),pt=Ga(!0),_t=async()=>{try{pt.value=!0;const jt=await Ah.get("/recent_packets",{limit:50});if(!jt.success){B.value=[],pt.value=!1,om(()=>{Ot()});return}const te=jt.data||[],he=Date.now(),De=24,er=12,pr=De*60*60*1e3/er,Mr=[];for(let Tr=0;Tr{const ni=Bn.timestamp*1e3;return ni>=Vr&&ni!Bn.transmitted).length,Jn=Dt.filter(Bn=>Bn.transmitted).length;Mr.push({time:new Date(Vr+pr/2).toISOString(),rxPackets:cn,txPackets:Jn})}B.value=Mr,pt.value=!1,om(()=>{Ot()})}catch{B.value=[],pt.value=!1,om(()=>{Ot()})}},Ot=()=>{if(!E.value)return;const jt=E.value,te=jt.getContext("2d");if(!te)return;const he=jt.parentElement;if(!he)return;const De=he.getBoundingClientRect(),er=De.width,pr=De.height;jt.width=er*window.devicePixelRatio,jt.height=pr*window.devicePixelRatio,jt.style.width=er+"px",jt.style.height=pr+"px",te.scale(window.devicePixelRatio,window.devicePixelRatio);const Mr=20;if(te.clearRect(0,0,er,pr),pt.value){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("Loading chart data...",er/2,pr/2);return}if(B.value.length===0){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("No data available",er/2,pr/2);return}const Tr=B.value.every(Un=>Un.rxPackets===0&&Un.txPackets===0),Vr=er-Mr*2,mn=pr-Mr*2,Dt=B.value.flatMap(Un=>[Un.rxPackets,Un.txPackets]),cn=Math.min(...Dt),Jn=Math.max(...Dt),Bn=cn,ni=Jn,Wi=Math.max(ni-Bn,1);if(te.strokeStyle="rgba(255, 255, 255, 0.1)",te.lineWidth=1,Bn<=0&&ni>=0){te.strokeStyle="rgba(255, 255, 255, 0.3)",te.lineWidth=2;const Un=pr-Mr-(0-Bn)/Wi*mn;te.beginPath(),te.moveTo(Mr,Un),te.lineTo(er-Mr,Un),te.stroke(),Un>20&&Un1&&(te.strokeStyle="#EBA0FC",te.lineWidth=2,te.beginPath(),B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.rxPackets-Bn)/Wi*mn;qr===0?te.moveTo(Di,Fi):te.lineTo(Di,Fi)}),te.stroke(),te.fillStyle="#EBA0FC",B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.rxPackets-Bn)/Wi*mn;te.beginPath(),te.arc(Di,Fi,2,0,2*Math.PI),te.fill()})),B.value.length>1&&(te.strokeStyle="#FB787B",te.lineWidth=2,te.beginPath(),B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.txPackets-Bn)/Wi*mn;qr===0?te.moveTo(Di,Fi):te.lineTo(Di,Fi)}),te.stroke(),te.fillStyle="#FB787B",B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.txPackets-Bn)/Wi*mn;te.beginPath(),te.arc(Di,Fi,2,0,2*Math.PI),te.fill()})),te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="12px system-ui",te.textAlign="center",Tr&&(te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="14px system-ui",te.textAlign="center",te.fillText("No packet activity in last 24 hours",er/2,pr-15))};return bp(()=>{_t(),K.value=window.setInterval(_t,3e4),om(()=>{Ot(),setTimeout(()=>{Ot()},100)}),window.addEventListener("resize",Ot)}),gg(()=>{K.value&&clearInterval(K.value),window.removeEventListener("resize",Ot)}),(jt,te)=>(_i(),zi("div",pnt,[te[5]||(te[5]=$f('

Performance Metrics

Packet Activity (Last 24 Hours)

Received
Transmitted
',3)),Ee("div",mnt,[Ee("canvas",{ref_key:"chartRef",ref:E,class:"absolute inset-0 w-full h-full"},null,512)]),Ee("div",gnt,[Ee("div",vnt,[Ee("div",ynt,Qi(zl(s).packetStats?.total_packets||0),1),te[0]||(te[0]=Ee("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Received",-1))]),Ee("div",xnt,[Ee("div",_nt,Qi(zl(s).packetStats?.transmitted_packets||0),1),te[1]||(te[1]=Ee("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Transmitted",-1))])]),Ee("div",bnt,[Ee("div",null,[Ee("div",wnt,Qi(B.value.length>0?Math.round(B.value.reduce((he,De)=>he+De.rxPackets,0)/B.value.length*100)/100:0),1),te[2]||(te[2]=Ee("div",{class:"text-xs text-white/60"},"Avg RX/hr",-1))]),Ee("div",null,[Ee("div",knt,Qi(B.value.length>0?Math.round(B.value.reduce((he,De)=>he+De.txPackets,0)/B.value.length*100)/100:0),1),te[3]||(te[3]=Ee("div",{class:"text-xs text-white/60"},"Avg TX/hr",-1))]),Ee("div",null,[Ee("div",Tnt,Qi(zl(s).packetStats?.dropped_packets||0),1),te[4]||(te[4]=Ee("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),Mnt=ld(Ant,[["__scopeId","data-v-2ece57e8"]]),Snt={class:"relative w-full max-w-4xl max-h-[90vh] overflow-hidden"},Ent={class:"glass-card rounded-[20px] p-8 backdrop-blur-[50px] shadow-2xl border border-white/20"},Cnt={class:"flex items-center justify-between mb-6"},Lnt={class:"text-white/70 text-sm"},Pnt={class:"max-h-[70vh] overflow-y-auto custom-scrollbar"},Int={class:"mb-6"},znt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Ont={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Dnt={class:"space-y-3"},Fnt={class:"flex justify-between py-2 border-b border-white/10"},Rnt={class:"text-white font-mono text-sm"},Bnt={class:"flex justify-between py-2 border-b border-white/10"},Nnt={class:"text-white font-mono text-xs break-all"},jnt={key:0,class:"flex justify-between py-2 border-b border-white/10"},Unt={class:"text-white font-mono text-xs"},Vnt={class:"space-y-3"},Hnt={class:"flex justify-between py-2 border-b border-white/10"},Wnt={class:"text-white font-semibold"},qnt={class:"flex justify-between py-2 border-b border-white/10"},$nt={class:"text-white font-semibold"},Znt={class:"flex justify-between py-2 border-b border-white/10"},Gnt={class:"mb-6"},Ynt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Knt={class:"space-y-3"},Xnt={class:"flex justify-between py-2 border-b border-white/10"},Jnt={class:"text-white"},Qnt={key:0,class:"pt-2"},tit={class:"glass-card bg-black/30 rounded-[10px] p-4 mb-4"},eit={class:"w-full overflow-x-auto"},rit={class:"text-white/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},nit={class:"flex items-center justify-between mb-3"},iit={class:"text-white/80 text-sm font-semibold"},ait={class:"text-white/60 text-xs"},oit={class:"glass-card bg-black/40 rounded-[8px] p-3 mb-3 overflow-x-auto"},sit={class:"font-mono text-sm text-white whitespace-pre min-w-full"},lit={class:"glass-card bg-white/5 rounded-[10px] overflow-hidden"},uit={class:"text-cyan-400 text-sm font-mono"},cit={class:"text-white text-sm"},hit={class:"text-white text-sm font-semibold"},fit={class:"text-orange-400 text-sm font-mono"},dit={key:0,class:"text-white/60 text-xs italic mt-2 px-1"},pit={key:1,class:"py-2"},mit={class:"mb-6"},git={class:"glass-card bg-white/5 rounded-[15px] p-4"},vit={class:"space-y-4"},yit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},xit={class:"flex justify-between py-2 border-b border-white/10"},_it={class:"flex justify-between py-2 border-b border-white/10"},bit={key:0,class:"py-2"},wit={class:"glass-card bg-black/20 rounded-[10px] p-4"},kit={class:"flex items-center flex-wrap gap-2"},Tit={class:"relative group"},Ait={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Mit={class:"font-mono text-xs font-semibold text-white/90"},Sit={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Eit={key:0,class:"mx-2 text-cyan-400/60"},Cit={key:1,class:"py-2"},Lit={class:"text-white/70 text-sm mb-2 flex items-center"},Pit={key:0,class:"w-4 h-4 ml-2 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Iit={key:1,class:"text-yellow-400 text-xs ml-1"},zit={class:"glass-card bg-black/20 rounded-[10px] p-4"},Oit={class:"flex items-center flex-wrap gap-2"},Dit={class:"relative group"},Fit={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},Rit={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Bit={key:0,class:"mx-1 text-orange-400/60"},Nit={class:"mb-6"},jit={class:"glass-card bg-white/5 rounded-[15px] p-4"},Uit={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},Vit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},Hit={class:"text-lg font-bold text-white"},Wit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},qit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},$it={class:"text-lg font-bold text-white"},Zit={class:"mb-4"},Git={class:"flex items-center gap-3"},Yit={class:"flex gap-1"},Kit={class:"text-white/80 text-sm capitalize"},Xit={key:0,class:"mb-4"},Jit={class:"text-white/70 text-sm mb-3"},Qit={class:"space-y-2"},tat={class:"flex items-center gap-3"},eat={class:"text-white/60 text-sm"},rat={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},nat={class:"space-y-2"},iat={class:"flex justify-between py-2 border-b border-white/10"},aat={class:"text-white"},oat={class:"flex justify-between py-2 border-b border-white/10"},sat={class:"space-y-2"},lat={class:"flex justify-between py-2 border-b border-white/10"},uat={key:0,class:"flex justify-between py-2 border-b border-white/10"},cat={class:"text-red-400 text-sm"},hat={class:"mt-6 pt-4 border-t border-white/10 flex justify-end"},fat=Dc({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(d,{emit:s}){const E=d,B=s,K=Dt=>new Date(Dt*1e3).toLocaleString(),pt=Dt=>Dt.transmitted?Dt.is_duplicate?"text-amber-400":Dt.drop_reason?"text-red-400":"text-green-400":"text-red-400",_t=Dt=>Dt.transmitted?Dt.is_duplicate?"Duplicate":Dt.drop_reason?"Dropped":"Forwarded":"Dropped",Ot=Dt=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[Dt]||`Unknown Type (${Dt})`,jt=Dt=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Dt]||`Unknown Route (${Dt})`,te=Dt=>{if(!Dt)return"None";const Jn=Dt.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],Bn=[];for(let ni=0;ni{try{let Bn=0;const ni=cn.length/2;if(ni>=100){if(cn.length>=Bn+64){const Wi=cn.slice(Bn,Bn+64);Dt.push({name:"Public Key",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+63)/2}`,hexData:Wi.match(/.{8}/g)?.join(" ")||Wi,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${Wi.slice(0,16)}...${Wi.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),Bn+=64}if(cn.length>=Bn+8){const Wi=cn.slice(Bn,Bn+8),Un=parseInt(Wi,16),qr=new Date(Un*1e3);Dt.push({name:"Timestamp",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+7)/2}`,hexData:Wi.match(/.{2}/g)?.join(" ")||Wi,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${Un} (${qr.toLocaleString()})`,binary:Un.toString(2).padStart(32,"0")}]}),Bn+=8}if(cn.length>=Bn+128){const Wi=cn.slice(Bn,Bn+128);Dt.push({name:"Signature",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+127)/2}`,hexData:Wi.match(/.{8}/g)?.join(" ")||Wi,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${Wi.slice(0,16)}...${Wi.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),Bn+=128}if(cn.length>Bn){const Wi=cn.slice(Bn);De(Dt,Wi,Jn+Bn)}}else Dt.push({name:"ADVERT AppData (Partial)",byteRange:`${Jn/2}-${Jn/2+ni-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Partial ADVERT data - appears to be just AppData portion (${ni} bytes)`,fields:[{bits:`0-${ni*8-1}`,name:"Partial Data",value:`${ni} bytes - attempting to decode as AppData`,binary:`${ni} bytes (${ni*8} bits)`}]}),De(Dt,cn,Jn)}catch(Bn){Dt.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:cn.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Bn instanceof Error?Bn.message:"Unknown error"}`,binary:"Invalid"}]})}},De=(Dt,cn,Jn)=>{try{const Bn=cn.length/2;Dt.push({name:"AppData",byteRange:`${Jn/2}-${Jn/2+Bn-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Node advertisement application data (${Bn} bytes)`,fields:[{bits:`0-${Bn*8-1}`,name:"Application Data",value:`${Bn} bytes (contains flags, location, name, etc.)`,binary:`${Bn} bytes (${Bn*8} bits)`}]});let ni=0;if(cn.length>=2){const Wi=parseInt(cn.slice(ni,ni+2),16),Un=[],qr=!!(Wi&16),Di=!!(Wi&32),Fi=!!(Wi&64),Pi=!!(Wi&128);if(Wi&1&&Un.push("is chat node"),Wi&2&&Un.push("is repeater"),Wi&4&&Un.push("is room server"),Wi&8&&Un.push("is sensor"),qr&&Un.push("has location"),Di&&Un.push("has feature 1"),Fi&&Un.push("has feature 2"),Pi&&Un.push("has name"),Dt.push({name:"AppData Flags",byteRange:`${(Jn+ni)/2}`,hexData:`0x${cn.slice(ni,ni+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:Un.join(", ")||"none",binary:Wi.toString(2).padStart(8,"0")}]}),ni+=2,qr&&cn.length>=ni+16){const bi=cn.slice(ni,ni+8),Yi=[];for(let xl=6;xl>=0;xl-=2)Yi.push(bi.slice(xl,xl+2));const Ca=parseInt(Yi.join(""),16),Ni=Ca>2147483647?Ca-4294967296:Ca,si=Ni/1e6,Ma=cn.slice(ni+8,ni+16),zo=[];for(let xl=6;xl>=0;xl-=2)zo.push(Ma.slice(xl,xl+2));const ho=parseInt(zo.join(""),16),mo=ho>2147483647?ho-4294967296:ho,Ts=mo/1e6;Dt.push({name:"Location Data",byteRange:`${(Jn+ni)/2}-${(Jn+ni+15)/2}`,hexData:`${bi.match(/.{2}/g)?.join(" ")||bi} ${Ma.match(/.{2}/g)?.join(" ")||Ma}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${si.toFixed(6)}° (raw: ${Ni})`,binary:Ni.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${Ts.toFixed(6)}° (raw: ${mo})`,binary:mo.toString(2).padStart(32,"0")}]}),ni+=16}if(Di&&cn.length>=ni+4){const bi=cn.slice(ni,ni+4),Yi=parseInt(bi,16);Dt.push({name:"Feature 1",byteRange:`${(Jn+ni)/2}-${(Jn+ni+3)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${Yi}`,binary:Yi.toString(2).padStart(16,"0")}]}),ni+=4}if(Fi&&cn.length>=ni+4){const bi=cn.slice(ni,ni+4),Yi=parseInt(bi,16);Dt.push({name:"Feature 2",byteRange:`${(Jn+ni)/2}-${(Jn+ni+3)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${Yi}`,binary:Yi.toString(2).padStart(16,"0")}]}),ni+=4}if(Pi&&cn.length>ni){const bi=cn.slice(ni),Yi=bi.match(/.{2}/g)||[],Ca=Yi.map(Ni=>{const si=parseInt(Ni,16);return si>=32&&si<=126?String.fromCharCode(si):"."}).join("").replace(/\.+$/,"");Dt.push({name:"Node Name",byteRange:`${(Jn+ni)/2}-${(Jn+cn.length-1)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:`Node name string (${Yi.length} bytes)`,fields:[{bits:`0-${Yi.length*8-1}`,name:"Node Name",value:`"${Ca}"`,binary:`ASCII text (${Yi.length} bytes)`}]})}}}catch(Bn){Dt.push({name:"AppData Parse Error",byteRange:"N/A",hexData:cn.slice(0,Math.min(32,cn.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Bn instanceof Error?Bn.message:"Unknown error"}`,binary:"Invalid"}]})}},er=Dt=>{if(!Dt)return[];if(Array.isArray(Dt))return Dt;if(typeof Dt=="string")try{return JSON.parse(Dt)}catch{return[]}return[]},pr=Dt=>{const cn=[];if(!Dt)return cn;try{const Jn=Dt.raw_packet;if(Jn){const Bn=Jn.replace(/\s+/g,"").toUpperCase();let ni=0;if(Bn.length>=2){const Wi=Bn.slice(ni,ni+2),Un=parseInt(Wi,16),qr=Un&3,Di=(Un&60)>>2,Fi=(Un&192)>>6,Pi={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},bi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(cn.push({name:"Header",byteRange:"0",hexData:`0x${Wi}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Pi[qr]||"Unknown",binary:qr.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:bi[Di]||"Unknown",binary:Di.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:Fi.toString(),binary:Fi.toString(2).padStart(2,"0")}]}),ni+=2,(qr===0||qr===3)&&Bn.length>=ni+8){const Ca=Bn.slice(ni,ni+8),Ni=parseInt(Ca.slice(0,4),16),si=parseInt(Ca.slice(4,8),16);cn.push({name:"Transport Codes",byteRange:"1-4",hexData:`${Ca.slice(0,4)} ${Ca.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:Ni.toString(),binary:Ni.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:si.toString(),binary:si.toString(2).padStart(16,"0")}]}),ni+=8}if(Bn.length>=ni+2){const Ca=Bn.slice(ni,ni+2),Ni=parseInt(Ca,16);if(cn.push({name:"Path Length",byteRange:`${ni/2}`,hexData:`0x${Ca}`,description:`${Ni} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${Ni} bytes`,binary:Ni.toString(2).padStart(8,"0")}]}),ni+=2,Ni>0&&Bn.length>=ni+Ni*2){const si=Bn.slice(ni,ni+Ni*2);cn.push({name:"Path Data",byteRange:`${ni/2}-${(ni+Ni*2-2)/2}`,hexData:si.match(/.{2}/g)?.join(" ")||si,description:"Routing path information",fields:[{bits:`0-${Ni*8-1}`,name:"Route Path",value:`${Ni} bytes of routing data`,binary:`${Ni} bytes (${Ni*8} bits)`}]}),ni+=Ni*2}}if(Bn.length>ni){const Ca=Bn.slice(ni),Ni=Ca.length/2;Di===4?he(cn,Ca,ni):cn.push({name:"Payload Data",byteRange:`${ni/2}-${ni/2+Ni-1}`,hexData:Ca.match(/.{2}/g)?.join(" ")||Ca,description:"Application data content",fields:[{bits:`0-${Ni*8-1}`,name:"Application Data",value:`${Ni} bytes`,binary:`${Ni} bytes (${Ni*8} bits)`}]})}}}else{if(Dt.header){const Bn=Dt.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),ni=parseInt(Bn,16),Wi=ni&3,Un=(ni&60)>>2,qr=(ni&192)>>6,Di={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},Fi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};cn.push({name:"Header",byteRange:"0",hexData:`0x${Bn}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Di[Wi]||"Unknown",binary:Wi.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:Fi[Un]||"Unknown",binary:Un.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:qr.toString(),binary:qr.toString(2).padStart(2,"0")}]}),Dt.transport_codes&&cn.push({name:"Transport Codes",byteRange:"1-4",hexData:Dt.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:Dt.transport_codes,binary:"Available in separate field"}]}),Dt.original_path&&Dt.original_path.length>0&&cn.push({name:"Original Path",byteRange:"?",hexData:Dt.original_path.join(" "),description:`Original routing path (${Dt.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.original_path.length} nodes`,binary:"Available as node list"}]}),Dt.forwarded_path&&Dt.forwarded_path.length>0&&cn.push({name:"Forwarded Path",byteRange:"?",hexData:Dt.forwarded_path.join(" "),description:`Forwarded routing path (${Dt.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(Dt.payload){const Bn=Dt.payload.replace(/\s+/g,"").toUpperCase(),ni=Bn.length/2;Dt.type===4?he(cn,Bn,0):cn.push({name:"Payload Data",byteRange:`0-${ni-1}`,hexData:Bn.match(/.{2}/g)?.join(" ")||Bn,description:`Application data content (${ni} bytes)`,fields:[{bits:`0-${ni*8-1}`,name:"Application Data",value:`${ni} bytes`,binary:`${ni} bytes (${ni*8} bits)`}]})}}}catch{cn.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return cn},Mr=Dt=>Dt>=10?"text-green-400":Dt>=5?"text-cyan-400":Dt>=0?"text-yellow-400":"text-red-400",Tr=(Dt,cn=8)=>{const Bn={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20}[cn]||-10;let ni,Wi;return Dt>=Bn+10?(ni=4,Wi="signal-excellent"):Dt>=Bn+5?(ni=3,Wi="signal-good"):Dt>=Bn?(ni=2,Wi="signal-fair"):(ni=1,Wi="signal-poor"),{level:ni,className:Wi}},Vr=Dt=>{Dt.key==="Escape"&&B("close")},mn=Dt=>{Dt.target===Dt.currentTarget&&B("close")};return(Dt,cn)=>(_i(),Z0(XA,{to:"body"},[Wl($z,{name:"modal",appear:""},{default:ew(()=>[Dt.isOpen&&Dt.packet?(_i(),zi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:mn,onKeydown:Vr,tabindex:"0"},[cn[36]||(cn[36]=Ee("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),Ee("div",Snt,[Ee("div",Ent,[Ee("div",Cnt,[Ee("div",null,[cn[2]||(cn[2]=Ee("h2",{class:"text-2xl font-bold text-white mb-1"},"Packet Details",-1)),Ee("p",Lnt,Qi(Ot(Dt.packet.type))+" - "+Qi(jt(Dt.packet.route)),1)]),Ee("button",{onClick:cn[0]||(cn[0]=Jn=>B("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors duration-200 text-white/70 hover:text-white"},cn[3]||(cn[3]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",Pnt,[Ee("div",Int,[cn[10]||(cn[10]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),Qu(" Basic Information ")],-1)),Ee("div",znt,[Ee("div",Ont,[Ee("div",Dnt,[Ee("div",Fnt,[cn[4]||(cn[4]=Ee("span",{class:"text-white/70 text-sm"},"Timestamp",-1)),Ee("span",Rnt,Qi(K(Dt.packet.timestamp)),1)]),Ee("div",Bnt,[cn[5]||(cn[5]=Ee("span",{class:"text-white/70 text-sm"},"Packet Hash",-1)),Ee("span",Nnt,Qi(Dt.packet.packet_hash),1)]),Dt.packet.header?(_i(),zi("div",jnt,[cn[6]||(cn[6]=Ee("span",{class:"text-white/70 text-sm"},"Header",-1)),Ee("span",Unt,Qi(Dt.packet.header),1)])):is("",!0)]),Ee("div",Vnt,[Ee("div",Hnt,[cn[7]||(cn[7]=Ee("span",{class:"text-white/70 text-sm"},"Type",-1)),Ee("span",Wnt,Qi(Dt.packet.type)+" ("+Qi(Ot(Dt.packet.type))+")",1)]),Ee("div",qnt,[cn[8]||(cn[8]=Ee("span",{class:"text-white/70 text-sm"},"Route",-1)),Ee("span",$nt,Qi(Dt.packet.route)+" ("+Qi(jt(Dt.packet.route))+")",1)]),Ee("div",Znt,[cn[9]||(cn[9]=Ee("span",{class:"text-white/70 text-sm"},"Status",-1)),Ee("span",{class:jo(["font-semibold",pt(Dt.packet)])},Qi(_t(Dt.packet)),3)])])])])]),Ee("div",Gnt,[cn[16]||(cn[16]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),Qu(" Payload Data ")],-1)),Ee("div",Ynt,[Ee("div",Knt,[Ee("div",Xnt,[cn[11]||(cn[11]=Ee("span",{class:"text-white/70 text-sm"},"Payload Length",-1)),Ee("span",Jnt,Qi(Dt.packet.payload_length||Dt.packet.length)+" bytes",1)]),Dt.packet.payload?(_i(),zi("div",Qnt,[cn[14]||(cn[14]=Ee("div",{class:"text-white/70 text-sm mb-3"},"Payload Analysis",-1)),Ee("div",tit,[cn[12]||(cn[12]=Ee("div",{class:"text-white/70 text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),Ee("div",eit,[Ee("pre",rit,Qi(te(Dt.packet.payload)),1)])]),(_i(!0),zi(Pu,null,Jh(pr(Dt.packet).filter(Jn=>!Jn.name.includes("Parse Error")),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"mb-4"},[Ee("div",nit,[Ee("h4",iit,Qi(Jn.name),1),Ee("span",ait,"Bytes "+Qi(Jn.byteRange),1)]),Ee("div",oit,[Ee("div",sit,Qi(Jn.hexData),1)]),Ee("div",lit,[cn[13]||(cn[13]=Ee("div",{class:"grid grid-cols-4 gap-4 p-3 bg-white/10 text-white/70 text-xs font-semibold uppercase tracking-wide"},[Ee("div",null,"Bits"),Ee("div",null,"Field"),Ee("div",null,"Value"),Ee("div",null,"Binary")],-1)),(_i(!0),zi(Pu,null,Jh(Jn.fields,(ni,Wi)=>(_i(),zi("div",{key:Wi,class:"grid grid-cols-4 gap-4 p-3 border-b border-white/5 last:border-b-0 hover:bg-white/5 transition-colors"},[Ee("div",uit,Qi(ni.bits),1),Ee("div",cit,Qi(ni.name),1),Ee("div",hit,Qi(ni.value),1),Ee("div",fit,Qi(ni.binary),1)]))),128))]),Jn.description?(_i(),zi("div",dit,Qi(Jn.description),1)):is("",!0)]))),128))])):(_i(),zi("div",pit,cn[15]||(cn[15]=[Ee("span",{class:"text-white/70 text-sm"},"Payload:",-1),Ee("span",{class:"text-white/50 ml-2"},"None",-1)])))])])]),Ee("div",mit,[cn[24]||(cn[24]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),Qu(" Path Information ")],-1)),Ee("div",git,[Ee("div",vit,[Ee("div",yit,[Ee("div",xit,[cn[17]||(cn[17]=Ee("span",{class:"text-white/70 text-sm"},"Source Hash",-1)),Ee("span",{class:jo(["text-white font-mono text-xs",E.localHash&&Dt.packet.src_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Dt.packet.src_hash||"Unknown"),3)]),Ee("div",_it,[cn[18]||(cn[18]=Ee("span",{class:"text-white/70 text-sm"},"Destination Hash",-1)),Ee("span",{class:jo(["text-white font-mono text-xs",E.localHash&&Dt.packet.dst_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Dt.packet.dst_hash||"Broadcast"),3)])]),er(Dt.packet.original_path).length>0?(_i(),zi("div",bit,[cn[20]||(cn[20]=Ee("div",{class:"text-white/70 text-sm mb-2"},"Original Path",-1)),Ee("div",wit,[Ee("div",kit,[(_i(!0),zi(Pu,null,Jh(er(Dt.packet.original_path),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center"},[Ee("div",Tit,[Ee("div",Ait,[Ee("div",Mit,Qi(Jn.length<=2?Jn.toUpperCase():Jn.slice(0,2).toUpperCase()),1)]),Ee("div",Sit," Node: "+Qi(Jn),1)]),Bn0?(_i(),zi("div",Cit,[Ee("div",Lit,[cn[22]||(cn[22]=Qu(" Forwarded Path ",-1)),JSON.stringify(er(Dt.packet.original_path))!==JSON.stringify(er(Dt.packet.forwarded_path))?(_i(),zi("svg",Pit,cn[21]||(cn[21]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):is("",!0),JSON.stringify(er(Dt.packet.original_path))!==JSON.stringify(er(Dt.packet.forwarded_path))?(_i(),zi("span",Iit,"(Modified)")):is("",!0)]),Ee("div",zit,[Ee("div",Oit,[(_i(!0),zi(Pu,null,Jh(er(Dt.packet.forwarded_path),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center"},[Ee("div",Dit,[Ee("div",{class:jo(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-400/40 rounded-lg transform transition-all hover:scale-105",E.localHash&&Jn===E.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-400/60"])},[Ee("div",{class:jo(["font-mono text-xs font-semibold",E.localHash&&Jn===E.localHash?"text-yellow-200":"text-white/90"])},Qi(Jn.slice(0,2).toUpperCase()),3),E.localHash&&Jn===E.localHash?(_i(),zi("div",Fit)):is("",!0)],2),Ee("div",Rit,Qi(Jn),1)]),BnEe("div",{key:Jn,class:jo(["w-2 h-6 rounded-sm transition-all duration-300",Jn<=Tr(Dt.packet.snr).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[Tr(Dt.packet.snr).className]:"bg-white/10"])},null,2)),64))]),Ee("span",Kit,Qi(Tr(Dt.packet.snr).className.replace("signal-","")),1)])]),Dt.packet.is_trace&&Dt.packet.path_snr_details&&Dt.packet.path_snr_details.length>0?(_i(),zi("div",Xit,[Ee("div",Jit,"Path SNR Details ("+Qi(Dt.packet.path_snr_details.length)+" hops)",1),Ee("div",Qit,[(_i(!0),zi(Pu,null,Jh(Dt.packet.path_snr_details,(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center justify-between p-2 glass-card bg-black/20 rounded-[8px]"},[Ee("div",tat,[Ee("span",eat,Qi(Bn+1)+".",1),Ee("span",{class:jo(["font-mono text-xs text-white",E.localHash&&Jn.hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Jn.hash),3)]),Ee("span",{class:jo(["text-sm font-bold",Mr(Jn.snr_db)])},Qi(Jn.snr_db.toFixed(1))+"dB ",3)]))),128))])])):is("",!0),Ee("div",rat,[Ee("div",nat,[Ee("div",iat,[cn[31]||(cn[31]=Ee("span",{class:"text-white/70 text-sm"},"TX Delay",-1)),Ee("span",aat,Qi(Number(Dt.packet.tx_delay_ms)>0?Number(Dt.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),Ee("div",oat,[cn[32]||(cn[32]=Ee("span",{class:"text-white/70 text-sm"},"Transmitted",-1)),Ee("span",{class:jo(Dt.packet.transmitted?"text-green-400":"text-red-400")},Qi(Dt.packet.transmitted?"Yes":"No"),3)])]),Ee("div",sat,[Ee("div",lat,[cn[33]||(cn[33]=Ee("span",{class:"text-white/70 text-sm"},"Is Duplicate",-1)),Ee("span",{class:jo(Dt.packet.is_duplicate?"text-amber-400":"text-white/60")},Qi(Dt.packet.is_duplicate?"Yes":"No"),3)]),Dt.packet.drop_reason?(_i(),zi("div",uat,[cn[34]||(cn[34]=Ee("span",{class:"text-white/70 text-sm"},"Drop Reason",-1)),Ee("span",cat,Qi(Dt.packet.drop_reason),1)])):is("",!0)])])])])]),Ee("div",hat,[Ee("button",{onClick:cn[1]||(cn[1]=Jn=>B("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-white transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):is("",!0)]),_:1})]))}}),dat=ld(fat,[["__scopeId","data-v-3b73bfd6"]]),pat={class:"glass-card rounded-[20px] p-6"},mat={class:"flex justify-between items-center mb-6"},gat={class:"flex items-center gap-3"},vat={class:"text-dark-text text-sm"},yat=["title"],xat={key:1,class:"text-primary text-sm"},_at={key:2,class:"text-accent-red text-sm"},bat={class:"flex items-center gap-3"},wat={class:"flex flex-col"},kat=["value"],Tat={class:"flex flex-col"},Aat=["value"],Mat={class:"flex flex-col"},Sat={class:"flex flex-col"},Eat=["disabled"],Cat={class:"space-y-4 overflow-hidden"},Lat=["onClick"],Pat={class:"grid grid-cols-12 gap-2 items-center"},Iat={class:"col-span-1 text-white text-sm"},zat={class:"col-span-1 flex items-center gap-2"},Oat={class:"text-white text-xs"},Dat={class:"col-span-2"},Fat={class:"col-span-1 text-white text-xs"},Rat={class:"col-span-2"},Bat={class:"space-y-1"},Nat={class:"inline-block px-2 py-0.5 rounded bg-[#588187] text-accent-cyan text-xs"},jat={class:"col-span-1 text-white text-xs"},Uat={class:"col-span-1 text-white text-xs"},Vat={class:"col-span-1 text-white text-xs"},Hat={class:"col-span-1 text-white text-xs"},Wat={class:"col-span-1"},qat={key:0,class:"text-accent-red text-[8px] italic truncate"},$at={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-dark-border"},Zat={class:"flex items-center gap-4"},Gat={class:"text-dark-text text-sm"},Yat={key:0,class:"flex items-center gap-2"},Kat=["disabled"],Xat={class:"text-dark-text text-xs"},Jat={class:"flex items-center gap-2"},Qat=["disabled"],tot={class:"flex items-center gap-1"},eot={key:1,class:"text-dark-text text-sm px-2"},rot=["onClick"],not={key:2,class:"text-dark-text text-sm px-2"},iot=["disabled"],aot={key:1,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},oot={class:"flex items-center gap-4"},sot={class:"text-dark-text text-sm"},lot={class:"text-dark-text text-xs"},uot={key:2,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},i2=10,ly=1e3,cot=Dc({name:"PacketTable",__name:"PacketTable",setup(d){const s=sw(),E=Ga(1),B=Ga(null),K=Ga(100),pt=Ga(!1),_t=Ga(null),Ot=Ga(!1),jt=zo=>{_t.value=zo,Ot.value=!0},te=()=>{Ot.value=!1,_t.value=null},he=Ga("all"),De=Ga("all"),er=Ga(!1),pr=Ga(null),Mr=["all","0","1","2","3","4","5","6","7","8","9","10","11"],Tr=["all","1","2"],Vr=$o(()=>{let zo=s.recentPackets;if(he.value!=="all"){const ho=parseInt(he.value);zo=zo.filter(mo=>mo.type===ho)}if(De.value!=="all"){const ho=parseInt(De.value);zo=zo.filter(mo=>mo.route===ho)}return er.value&&pr.value!==null&&(zo=zo.filter(ho=>ho.timestamp>=pr.value)),zo}),mn=$o(()=>{const zo=(E.value-1)*i2,ho=zo+i2;return Vr.value.slice(zo,ho)}),Dt=$o(()=>Math.ceil(Vr.value.length/i2)),cn=$o(()=>E.value===Dt.value),Jn=$o(()=>s.recentPackets.length>=K.value&&K.valuecn.value&&Jn.value&&!pt.value),ni=zo=>new Date(zo*1e3).toLocaleTimeString("en-US",{hour12:!1}),Wi=zo=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTI_PART",11:"CONTROL"})[zo]||`TYPE_${zo}`,Un=zo=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[zo]||`Route ${zo}`,qr=zo=>zo.transmitted?"text-accent-green":"text-primary",Di=zo=>zo.drop_reason?"Dropped":zo.transmitted?"Forward":"Received",Fi=zo=>zo===1?"bg-[#223231] text-accent-cyan":"bg-secondary/30 text-secondary",Pi=zo=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[zo]||"bg-gray-500",bi=zo=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[zo]||"border-l-gray-500",Yi=()=>{he.value="all",De.value="all",er.value=!1,pr.value=null,E.value=1},Ca=()=>{er.value?(er.value=!1,pr.value=null):(er.value=!0,pr.value=Date.now()/1e3),E.value=1},Ni=$o(()=>pr.value?new Date(pr.value*1e3).toLocaleTimeString():""),si=async zo=>{try{const ho=zo||K.value;await s.fetchRecentPackets({limit:ho})}catch(ho){console.error("Error fetching packet data:",ho)}},Ma=async()=>{if(!(pt.value||K.value>=ly)){pt.value=!0;try{const zo=Math.min(K.value+200,ly);K.value=zo,await si(zo)}catch(zo){console.error("Error loading more records:",zo)}finally{pt.value=!1}}};return bp(async()=>{await si(),B.value=window.setInterval(si,5e3)}),gg(()=>{B.value&&clearInterval(B.value)}),(zo,ho)=>(_i(),zi(Pu,null,[Ee("div",pat,[Ee("div",mat,[Ee("div",gat,[ho[6]||(ho[6]=Ee("h3",{class:"text-white text-xl font-semibold"},"Recent Packets",-1)),Ee("span",vat," ("+Qi(Vr.value.length)+" of "+Qi(zl(s).recentPackets.length)+") ",1),er.value?(_i(),zi("span",{key:0,class:"text-primary text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20",title:`Filter activated at ${Ni.value}`}," Live Mode (since "+Qi(Ni.value)+") ",9,yat)):is("",!0),zl(s).isLoading?(_i(),zi("span",xat,"Loading...")):is("",!0),zl(s).error?(_i(),zi("span",_at,Qi(zl(s).error),1)):is("",!0)]),Ee("div",bat,[Ee("div",wat,[ho[7]||(ho[7]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Type",-1)),Gp(Ee("select",{"onUpdate:modelValue":ho[0]||(ho[0]=mo=>he.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(_i(),zi(Pu,null,Jh(Mr,mo=>Ee("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Qi(mo==="all"?"All Types":`Type ${mo} (${Wi(parseInt(mo))})`),9,kat)),64))],512),[[pA,he.value]])]),Ee("div",Tat,[ho[8]||(ho[8]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Route",-1)),Gp(Ee("select",{"onUpdate:modelValue":ho[1]||(ho[1]=mo=>De.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(_i(),zi(Pu,null,Jh(Tr,mo=>Ee("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Qi(mo==="all"?"All Routes":`Route ${mo} (${Un(parseInt(mo))})`),9,Aat)),64))],512),[[pA,De.value]])]),Ee("div",Mat,[ho[9]||(ho[9]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Filter",-1)),Ee("button",{onClick:Ca,class:jo(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":er.value,"border-dark-border text-dark-text hover:border-primary hover:text-white hover:bg-primary/5":!er.value}])},Qi(er.value?"New Only":"Show New"),3)]),Ee("div",Sat,[ho[10]||(ho[10]=Ee("label",{class:"text-transparent text-xs mb-1"},".",-1)),Ee("button",{onClick:Yi,class:jo(["glass-card border border-dark-border hover:border-primary rounded-[10px] px-4 py-2 text-dark-text hover:text-white text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-dark-border hover:text-dark-text":he.value==="all"&&De.value==="all"&&!er.value,"hover:bg-primary/10":he.value!=="all"||De.value!=="all"||er.value}]),disabled:he.value==="all"&&De.value==="all"&&!er.value}," Reset ",10,Eat)])])]),ho[14]||(ho[14]=$f('
Time
Type
Route
LEN
Path/Hashes
RSSI
SNR
Score
TX Delay
Status
',1)),Ee("div",Cat,[Wl(MK,{name:"packet-list",tag:"div",class:"space-y-4",appear:""},{default:ew(()=>[(_i(!0),zi(Pu,null,Jh(mn.value,(mo,Ts)=>(_i(),zi("div",{key:`${mo.packet_hash}_${mo.timestamp}_${Ts}`,class:jo(["packet-row border-b border-dark-border/50 pb-4 hover:bg-white/5 transition-colors duration-200 cursor-pointer rounded-[10px] p-2 border-l-4",bi(mo.type)]),onClick:xl=>jt(mo)},[Ee("div",Pat,[Ee("div",Iat,Qi(ni(mo.timestamp)),1),Ee("div",zat,[Ee("div",{class:jo(["w-2 h-2 rounded-full",Pi(mo.type)])},null,2),Ee("span",Oat,Qi(Wi(mo.type)),1)]),Ee("div",Dat,[Ee("span",{class:jo(["inline-block px-2 py-1 rounded text-xs font-medium",Fi(mo.route)])},Qi(Un(mo.route)),3)]),Ee("div",Fat,Qi(mo.length)+"B",1),Ee("div",Rat,[Ee("div",Bat,[Ee("span",Nat,Qi(mo.src_hash?.slice(-4)||"????")+" → "+Qi(mo.dst_hash?.slice(-4)||"????"),1)])]),Ee("div",jat,Qi(mo.rssi.toFixed(0)),1),Ee("div",Uat,Qi(mo.snr.toFixed(1))+"dB",1),Ee("div",Vat,Qi(mo.score.toFixed(2)),1),Ee("div",Hat,Qi(Number(mo.tx_delay_ms)>0?Number(mo.tx_delay_ms).toFixed(1)+"ms":""),1),Ee("div",Wat,[Ee("div",null,[Ee("span",{class:jo(["text-xs font-medium",qr(mo)])},Qi(Di(mo)),3),mo.drop_reason?(_i(),zi("p",qat,Qi(mo.drop_reason),1)):is("",!0)])])])],10,Lat))),128))]),_:1})]),Dt.value>1?(_i(),zi("div",$at,[Ee("div",Zat,[Ee("span",Gat," Showing "+Qi((E.value-1)*i2+1)+" - "+Qi(Math.min(E.value*i2,Vr.value.length))+" of "+Qi(Vr.value.length)+" packets ",1),Bn.value?(_i(),zi("div",Yat,[ho[11]||(ho[11]=Ee("span",{class:"text-dark-text text-xs"},"•",-1)),Ee("button",{onClick:Ma,disabled:pt.value,class:jo(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!pt.value,"text-dark-text border-dark-border cursor-not-allowed opacity-50":pt.value}])},Qi(pt.value?"Loading...":`Load ${Math.min(200,ly-K.value)} more`),11,Kat),Ee("span",Xat,"("+Qi(K.value)+"/"+Qi(ly)+" max)",1)])):is("",!0)]),Ee("div",Jat,[Ee("button",{onClick:ho[2]||(ho[2]=mo=>E.value=E.value-1),disabled:E.value<=1,class:jo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value<=1,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value>1}])}," Previous ",10,Qat),Ee("div",tot,[E.value>3?(_i(),zi("button",{key:0,onClick:ho[3]||(ho[3]=mo=>E.value=1),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):is("",!0),E.value>4?(_i(),zi("span",eot,"...")):is("",!0),(_i(!0),zi(Pu,null,Jh(Array.from({length:Math.min(5,Dt.value)},(mo,Ts)=>Math.max(1,Math.min(E.value-2,Dt.value-4))+Ts).filter(mo=>mo<=Dt.value),mo=>(_i(),zi("button",{key:mo,onClick:Ts=>E.value=mo,class:jo(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-primary bg-primary/10 text-primary":E.value===mo,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value!==mo}])},Qi(mo),11,rot))),128)),E.valueE.value=Dt.value),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},Qi(Dt.value),1)):is("",!0)]),Ee("button",{onClick:ho[5]||(ho[5]=mo=>E.value=E.value+1),disabled:E.value>=Dt.value,class:jo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value>=Dt.value,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value(_i(),zi("div",null,[Wl(Qrt),Ee("div",fot,[Wl(Mnt),Wl(dnt)]),Wl(hot)]))}}),pot={class:"bg-white/5 border border-white/10 rounded-lg p-4 mb-6"},mot={class:"flex items-center gap-3"},got={class:"flex-1 min-w-0"},vot={class:"text-white font-medium truncate"},yot={class:"text-white/60 text-sm font-mono"},xot={key:0,class:"text-white/50 text-xs"},_ot={key:1,class:"text-white/50 text-xs"},bot=Dc({__name:"DeleteNeighborModal",props:{show:{type:Boolean},neighbor:{}},emits:["close","delete"],setup(d,{emit:s}){const E=d,B=s,K=()=>{E.neighbor&&(B("delete",E.neighbor.id),pt())},pt=()=>{B("close")},_t=Ot=>{Ot.target===Ot.currentTarget&&pt()};return(Ot,jt)=>Ot.show&&Ot.neighbor?(_i(),zi("div",{key:0,onClick:_t,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:jt[0]||(jt[0]=Pm(()=>{},["stop"]))},[Ee("div",{class:"flex items-center gap-3 mb-6"},[jt[2]||(jt[2]=Ee("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),jt[3]||(jt[3]=Ee("div",null,[Ee("h3",{class:"text-xl font-semibold text-white"},"Delete Neighbor"),Ee("p",{class:"text-white/60 text-sm mt-1"}," Are you sure you want to delete this neighbor? ")],-1)),Ee("button",{onClick:pt,class:"ml-auto text-white/60 hover:text-white transition-colors"},jt[1]||(jt[1]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",pot,[Ee("div",mot,[Ee("div",got,[Ee("div",vot,Qi(Ot.neighbor?.node_name||Ot.neighbor?.long_name||Ot.neighbor?.short_name||"Unknown"),1),Ee("div",yot," ID: "+Qi(Ot.neighbor?.node_num_hex||Ot.neighbor?.node_num||Ot.neighbor?.id||"N/A"),1),Ot.neighbor?.contact_type?(_i(),zi("div",xot,Qi(Ot.neighbor.contact_type),1)):is("",!0),Ot.neighbor?.hw_model?(_i(),zi("div",_ot,Qi(Ot.neighbor.hw_model),1)):is("",!0)])])]),jt[4]||(jt[4]=Ee("div",{class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},[Ee("div",{class:"flex items-center gap-2 text-accent-red text-sm"},[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),Ee("span",null,"This action cannot be undone")])],-1)),Ee("div",{class:"flex gap-3"},[Ee("button",{onClick:pt,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{onClick:K,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"}," Delete ")])])])):is("",!0)}});function KO(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var g2={exports:{}};/* @preserve + `})},[ye("span",Cnt,Fi(ce.count),1)],4)]),ye("div",Lnt,[ye("div",Pnt,Fi(ce.name.replace(/\([^)]*\)/g,"").trim()),1)])]))),128))]))]),s.value.length>0?(ci(),wi("div",Int," Total packet types: "+Fi(s.value.length)+" | Total packets: "+Fi(s.value.reduce((ce,Ie)=>ce+Ie.count,0)),1)):Uo("",!0)]))}}),Ont=Bf(znt,[["__scopeId","data-v-dc58fd68"]]),Dnt={class:"glass-card rounded-[10px] p-6"},Fnt={class:"relative h-48"},Bnt={class:"mt-4 grid grid-cols-2 gap-4"},Rnt={class:"text-center"},Nnt={class:"text-2xl font-bold text-white"},jnt={class:"text-center"},Unt={class:"text-2xl font-bold text-white"},Vnt={class:"mt-3 grid grid-cols-3 gap-3 text-center"},Hnt={class:"text-sm font-semibold text-accent-purple"},Wnt={class:"text-sm font-semibold text-accent-red"},qnt={class:"text-sm font-semibold text-white"},$nt=Ec({name:"PerformanceChart",__name:"PerformanceChart",setup(d){const s=sw(),E=Ha(null),R=Ha([]),Y=Ha(null),dt=Ha(!0),_t=async()=>{try{dt.value=!0;const jt=await ah.get("/recent_packets",{limit:50});if(!jt.success){R.value=[],dt.value=!1,S0(()=>{zt()});return}const te=jt.data||[],ce=Date.now(),Ie=24,Je=12,fr=Ie*60*60*1e3/Je,Ar=[];for(let kr=0;kr{const ii=Dn.timestamp*1e3;return ii>=Vr&&ii!Dn.transmitted).length,ti=Dt.filter(Dn=>Dn.transmitted).length;Ar.push({time:new Date(Vr+fr/2).toISOString(),rxPackets:cn,txPackets:ti})}R.value=Ar,dt.value=!1,S0(()=>{zt()})}catch{R.value=[],dt.value=!1,S0(()=>{zt()})}},zt=()=>{if(!E.value)return;const jt=E.value,te=jt.getContext("2d");if(!te)return;const ce=jt.parentElement;if(!ce)return;const Ie=ce.getBoundingClientRect(),Je=Ie.width,fr=Ie.height;jt.width=Je*window.devicePixelRatio,jt.height=fr*window.devicePixelRatio,jt.style.width=Je+"px",jt.style.height=fr+"px",te.scale(window.devicePixelRatio,window.devicePixelRatio);const Ar=20;if(te.clearRect(0,0,Je,fr),dt.value){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("Loading chart data...",Je/2,fr/2);return}if(R.value.length===0){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("No data available",Je/2,fr/2);return}const kr=R.value.every(Nn=>Nn.rxPackets===0&&Nn.txPackets===0),Vr=Je-Ar*2,fn=fr-Ar*2,Dt=R.value.flatMap(Nn=>[Nn.rxPackets,Nn.txPackets]),cn=Math.min(...Dt),ti=Math.max(...Dt),Dn=cn,ii=ti,Vi=Math.max(ii-Dn,1);if(te.strokeStyle="rgba(255, 255, 255, 0.1)",te.lineWidth=1,Dn<=0&&ii>=0){te.strokeStyle="rgba(255, 255, 255, 0.3)",te.lineWidth=2;const Nn=fr-Ar-(0-Dn)/Vi*fn;te.beginPath(),te.moveTo(Ar,Nn),te.lineTo(Je-Ar,Nn),te.stroke(),Nn>20&&Nn1&&(te.strokeStyle="#EBA0FC",te.lineWidth=2,te.beginPath(),R.value.forEach((Nn,Wr)=>{const Bi=Ar+Vr*Wr/(R.value.length-1),Ri=fr-Ar-(Nn.rxPackets-Dn)/Vi*fn;Wr===0?te.moveTo(Bi,Ri):te.lineTo(Bi,Ri)}),te.stroke(),te.fillStyle="#EBA0FC",R.value.forEach((Nn,Wr)=>{const Bi=Ar+Vr*Wr/(R.value.length-1),Ri=fr-Ar-(Nn.rxPackets-Dn)/Vi*fn;te.beginPath(),te.arc(Bi,Ri,2,0,2*Math.PI),te.fill()})),R.value.length>1&&(te.strokeStyle="#FB787B",te.lineWidth=2,te.beginPath(),R.value.forEach((Nn,Wr)=>{const Bi=Ar+Vr*Wr/(R.value.length-1),Ri=fr-Ar-(Nn.txPackets-Dn)/Vi*fn;Wr===0?te.moveTo(Bi,Ri):te.lineTo(Bi,Ri)}),te.stroke(),te.fillStyle="#FB787B",R.value.forEach((Nn,Wr)=>{const Bi=Ar+Vr*Wr/(R.value.length-1),Ri=fr-Ar-(Nn.txPackets-Dn)/Vi*fn;te.beginPath(),te.arc(Bi,Ri,2,0,2*Math.PI),te.fill()})),te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="12px system-ui",te.textAlign="center",kr&&(te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="14px system-ui",te.textAlign="center",te.fillText("No packet activity in last 24 hours",Je/2,fr-15))};return op(()=>{_t(),Y.value=window.setInterval(_t,3e4),S0(()=>{zt(),setTimeout(()=>{zt()},100)}),window.addEventListener("resize",zt)}),zm(()=>{Y.value&&clearInterval(Y.value),window.removeEventListener("resize",zt)}),(jt,te)=>(ci(),wi("div",Dnt,[te[5]||(te[5]=Ff('

Performance Metrics

Packet Activity (Last 24 Hours)

Received
Transmitted
',3)),ye("div",Fnt,[ye("canvas",{ref_key:"chartRef",ref:E,class:"absolute inset-0 w-full h-full"},null,512)]),ye("div",Bnt,[ye("div",Rnt,[ye("div",Nnt,Fi(Ol(s).packetStats?.total_packets||0),1),te[0]||(te[0]=ye("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Received",-1))]),ye("div",jnt,[ye("div",Unt,Fi(Ol(s).packetStats?.transmitted_packets||0),1),te[1]||(te[1]=ye("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Transmitted",-1))])]),ye("div",Vnt,[ye("div",null,[ye("div",Hnt,Fi(R.value.length>0?Math.round(R.value.reduce((ce,Ie)=>ce+Ie.rxPackets,0)/R.value.length*100)/100:0),1),te[2]||(te[2]=ye("div",{class:"text-xs text-white/60"},"Avg RX/hr",-1))]),ye("div",null,[ye("div",Wnt,Fi(R.value.length>0?Math.round(R.value.reduce((ce,Ie)=>ce+Ie.txPackets,0)/R.value.length*100)/100:0),1),te[3]||(te[3]=ye("div",{class:"text-xs text-white/60"},"Avg TX/hr",-1))]),ye("div",null,[ye("div",qnt,Fi(Ol(s).packetStats?.dropped_packets||0),1),te[4]||(te[4]=ye("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),Znt=Bf($nt,[["__scopeId","data-v-2ece57e8"]]),Gnt={class:"relative w-full max-w-4xl max-h-[90vh] overflow-hidden"},Ynt={class:"glass-card rounded-[20px] p-8 backdrop-blur-[50px] shadow-2xl border border-white/20"},Knt={class:"flex items-center justify-between mb-6"},Xnt={class:"text-white/70 text-sm"},Jnt={class:"max-h-[70vh] overflow-y-auto custom-scrollbar"},Qnt={class:"mb-6"},tit={class:"glass-card bg-white/5 rounded-[15px] p-4"},eit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},rit={class:"space-y-3"},nit={class:"flex justify-between py-2 border-b border-white/10"},iit={class:"text-white font-mono text-sm"},ait={class:"flex justify-between py-2 border-b border-white/10"},oit={class:"text-white font-mono text-xs break-all"},sit={key:0,class:"flex justify-between py-2 border-b border-white/10"},lit={class:"text-white font-mono text-xs"},uit={class:"space-y-3"},cit={class:"flex justify-between py-2 border-b border-white/10"},hit={class:"text-white font-semibold"},fit={class:"flex justify-between py-2 border-b border-white/10"},dit={class:"text-white font-semibold"},pit={class:"flex justify-between py-2 border-b border-white/10"},mit={class:"mb-6"},git={class:"glass-card bg-white/5 rounded-[15px] p-4"},vit={class:"space-y-3"},yit={class:"flex justify-between py-2 border-b border-white/10"},xit={class:"text-white"},_it={key:0,class:"pt-2"},bit={class:"glass-card bg-black/30 rounded-[10px] p-4 mb-4"},wit={class:"w-full overflow-x-auto"},kit={class:"text-white/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},Tit={class:"flex items-center justify-between mb-3"},Ait={class:"text-white/80 text-sm font-semibold"},Mit={class:"text-white/60 text-xs"},Sit={class:"glass-card bg-black/40 rounded-[8px] p-3 mb-3 overflow-x-auto"},Eit={class:"font-mono text-sm text-white whitespace-pre min-w-full"},Cit={class:"glass-card bg-white/5 rounded-[10px] overflow-hidden"},Lit={class:"text-cyan-400 text-sm font-mono"},Pit={class:"text-white text-sm"},Iit={class:"text-white text-sm font-semibold"},zit={class:"text-orange-400 text-sm font-mono"},Oit={key:0,class:"text-white/60 text-xs italic mt-2 px-1"},Dit={key:1,class:"py-2"},Fit={class:"mb-6"},Bit={class:"glass-card bg-white/5 rounded-[15px] p-4"},Rit={class:"space-y-4"},Nit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},jit={class:"flex justify-between py-2 border-b border-white/10"},Uit={class:"flex justify-between py-2 border-b border-white/10"},Vit={key:0,class:"py-2"},Hit={class:"glass-card bg-black/20 rounded-[10px] p-4"},Wit={class:"flex items-center flex-wrap gap-2"},qit={class:"relative group"},$it={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Zit={class:"font-mono text-xs font-semibold text-white/90"},Git={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Yit={key:0,class:"mx-2 text-cyan-400/60"},Kit={key:1,class:"py-2"},Xit={class:"text-white/70 text-sm mb-2 flex items-center"},Jit={key:0,class:"w-4 h-4 ml-2 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Qit={key:1,class:"text-yellow-400 text-xs ml-1"},tat={class:"glass-card bg-black/20 rounded-[10px] p-4"},eat={class:"flex items-center flex-wrap gap-2"},rat={class:"relative group"},nat={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},iat={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},aat={key:0,class:"mx-1 text-orange-400/60"},oat={class:"mb-6"},sat={class:"glass-card bg-white/5 rounded-[15px] p-4"},lat={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},uat={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},cat={class:"text-lg font-bold text-white"},hat={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},fat={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},dat={class:"text-lg font-bold text-white"},pat={class:"mb-4"},mat={class:"flex items-center gap-3"},gat={class:"flex gap-1"},vat={class:"text-white/80 text-sm capitalize"},yat={key:0,class:"mb-4"},xat={class:"text-white/70 text-sm mb-3"},_at={class:"space-y-2"},bat={class:"flex items-center gap-3"},wat={class:"text-white/60 text-sm"},kat={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Tat={class:"space-y-2"},Aat={class:"flex justify-between py-2 border-b border-white/10"},Mat={class:"text-white"},Sat={class:"flex justify-between py-2 border-b border-white/10"},Eat={class:"space-y-2"},Cat={class:"flex justify-between py-2 border-b border-white/10"},Lat={key:0,class:"flex justify-between py-2 border-b border-white/10"},Pat={class:"text-red-400 text-sm"},Iat={class:"mt-6 pt-4 border-t border-white/10 flex justify-end"},zat=Ec({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(d,{emit:s}){const E=d,R=s,Y=Dt=>new Date(Dt*1e3).toLocaleString(),dt=Dt=>Dt.transmitted?Dt.is_duplicate?"text-amber-400":Dt.drop_reason?"text-red-400":"text-green-400":"text-red-400",_t=Dt=>Dt.transmitted?Dt.is_duplicate?"Duplicate":Dt.drop_reason?"Dropped":"Forwarded":"Dropped",zt=Dt=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[Dt]||`Unknown Type (${Dt})`,jt=Dt=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Dt]||`Unknown Route (${Dt})`,te=Dt=>{if(!Dt)return"None";const ti=Dt.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],Dn=[];for(let ii=0;ii{try{let Dn=0;const ii=cn.length/2;if(ii>=100){if(cn.length>=Dn+64){const Vi=cn.slice(Dn,Dn+64);Dt.push({name:"Public Key",byteRange:`${(ti+Dn)/2}-${(ti+Dn+63)/2}`,hexData:Vi.match(/.{8}/g)?.join(" ")||Vi,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${Vi.slice(0,16)}...${Vi.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),Dn+=64}if(cn.length>=Dn+8){const Vi=cn.slice(Dn,Dn+8),Nn=parseInt(Vi,16),Wr=new Date(Nn*1e3);Dt.push({name:"Timestamp",byteRange:`${(ti+Dn)/2}-${(ti+Dn+7)/2}`,hexData:Vi.match(/.{2}/g)?.join(" ")||Vi,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${Nn} (${Wr.toLocaleString()})`,binary:Nn.toString(2).padStart(32,"0")}]}),Dn+=8}if(cn.length>=Dn+128){const Vi=cn.slice(Dn,Dn+128);Dt.push({name:"Signature",byteRange:`${(ti+Dn)/2}-${(ti+Dn+127)/2}`,hexData:Vi.match(/.{8}/g)?.join(" ")||Vi,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${Vi.slice(0,16)}...${Vi.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),Dn+=128}if(cn.length>Dn){const Vi=cn.slice(Dn);Ie(Dt,Vi,ti+Dn)}}else Dt.push({name:"ADVERT AppData (Partial)",byteRange:`${ti/2}-${ti/2+ii-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Partial ADVERT data - appears to be just AppData portion (${ii} bytes)`,fields:[{bits:`0-${ii*8-1}`,name:"Partial Data",value:`${ii} bytes - attempting to decode as AppData`,binary:`${ii} bytes (${ii*8} bits)`}]}),Ie(Dt,cn,ti)}catch(Dn){Dt.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:cn.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Dn instanceof Error?Dn.message:"Unknown error"}`,binary:"Invalid"}]})}},Ie=(Dt,cn,ti)=>{try{const Dn=cn.length/2;Dt.push({name:"AppData",byteRange:`${ti/2}-${ti/2+Dn-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Node advertisement application data (${Dn} bytes)`,fields:[{bits:`0-${Dn*8-1}`,name:"Application Data",value:`${Dn} bytes (contains flags, location, name, etc.)`,binary:`${Dn} bytes (${Dn*8} bits)`}]});let ii=0;if(cn.length>=2){const Vi=parseInt(cn.slice(ii,ii+2),16),Nn=[],Wr=!!(Vi&16),Bi=!!(Vi&32),Ri=!!(Vi&64),Li=!!(Vi&128);if(Vi&1&&Nn.push("is chat node"),Vi&2&&Nn.push("is repeater"),Vi&4&&Nn.push("is room server"),Vi&8&&Nn.push("is sensor"),Wr&&Nn.push("has location"),Bi&&Nn.push("has feature 1"),Ri&&Nn.push("has feature 2"),Li&&Nn.push("has name"),Dt.push({name:"AppData Flags",byteRange:`${(ti+ii)/2}`,hexData:`0x${cn.slice(ii,ii+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:Nn.join(", ")||"none",binary:Vi.toString(2).padStart(8,"0")}]}),ii+=2,Wr&&cn.length>=ii+16){const $n=cn.slice(ii,ii+8),Hn=[];for(let xl=6;xl>=0;xl-=2)Hn.push($n.slice(xl,xl+2));const sa=parseInt(Hn.join(""),16),Ti=sa>2147483647?sa-4294967296:sa,Qn=Ti/1e6,la=cn.slice(ii+8,ii+16),Eo=[];for(let xl=6;xl>=0;xl-=2)Eo.push(la.slice(xl,xl+2));const no=parseInt(Eo.join(""),16),mo=no>2147483647?no-4294967296:no,Ts=mo/1e6;Dt.push({name:"Location Data",byteRange:`${(ti+ii)/2}-${(ti+ii+15)/2}`,hexData:`${$n.match(/.{2}/g)?.join(" ")||$n} ${la.match(/.{2}/g)?.join(" ")||la}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${Qn.toFixed(6)}° (raw: ${Ti})`,binary:Ti.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${Ts.toFixed(6)}° (raw: ${mo})`,binary:mo.toString(2).padStart(32,"0")}]}),ii+=16}if(Bi&&cn.length>=ii+4){const $n=cn.slice(ii,ii+4),Hn=parseInt($n,16);Dt.push({name:"Feature 1",byteRange:`${(ti+ii)/2}-${(ti+ii+3)/2}`,hexData:$n.match(/.{2}/g)?.join(" ")||$n,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${Hn}`,binary:Hn.toString(2).padStart(16,"0")}]}),ii+=4}if(Ri&&cn.length>=ii+4){const $n=cn.slice(ii,ii+4),Hn=parseInt($n,16);Dt.push({name:"Feature 2",byteRange:`${(ti+ii)/2}-${(ti+ii+3)/2}`,hexData:$n.match(/.{2}/g)?.join(" ")||$n,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${Hn}`,binary:Hn.toString(2).padStart(16,"0")}]}),ii+=4}if(Li&&cn.length>ii){const $n=cn.slice(ii),Hn=$n.match(/.{2}/g)||[],sa=Hn.map(Ti=>{const Qn=parseInt(Ti,16);return Qn>=32&&Qn<=126?String.fromCharCode(Qn):"."}).join("").replace(/\.+$/,"");Dt.push({name:"Node Name",byteRange:`${(ti+ii)/2}-${(ti+cn.length-1)/2}`,hexData:$n.match(/.{2}/g)?.join(" ")||$n,description:`Node name string (${Hn.length} bytes)`,fields:[{bits:`0-${Hn.length*8-1}`,name:"Node Name",value:`"${sa}"`,binary:`ASCII text (${Hn.length} bytes)`}]})}}}catch(Dn){Dt.push({name:"AppData Parse Error",byteRange:"N/A",hexData:cn.slice(0,Math.min(32,cn.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Dn instanceof Error?Dn.message:"Unknown error"}`,binary:"Invalid"}]})}},Je=Dt=>{if(!Dt)return[];if(Array.isArray(Dt))return Dt;if(typeof Dt=="string")try{return JSON.parse(Dt)}catch{return[]}return[]},fr=Dt=>{const cn=[];if(!Dt)return cn;try{const ti=Dt.raw_packet;if(ti){const Dn=ti.replace(/\s+/g,"").toUpperCase();let ii=0;if(Dn.length>=2){const Vi=Dn.slice(ii,ii+2),Nn=parseInt(Vi,16),Wr=Nn&3,Bi=(Nn&60)>>2,Ri=(Nn&192)>>6,Li={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},$n={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(cn.push({name:"Header",byteRange:"0",hexData:`0x${Vi}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Li[Wr]||"Unknown",binary:Wr.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:$n[Bi]||"Unknown",binary:Bi.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:Ri.toString(),binary:Ri.toString(2).padStart(2,"0")}]}),ii+=2,(Wr===0||Wr===3)&&Dn.length>=ii+8){const sa=Dn.slice(ii,ii+8),Ti=parseInt(sa.slice(0,4),16),Qn=parseInt(sa.slice(4,8),16);cn.push({name:"Transport Codes",byteRange:"1-4",hexData:`${sa.slice(0,4)} ${sa.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:Ti.toString(),binary:Ti.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:Qn.toString(),binary:Qn.toString(2).padStart(16,"0")}]}),ii+=8}if(Dn.length>=ii+2){const sa=Dn.slice(ii,ii+2),Ti=parseInt(sa,16);if(cn.push({name:"Path Length",byteRange:`${ii/2}`,hexData:`0x${sa}`,description:`${Ti} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${Ti} bytes`,binary:Ti.toString(2).padStart(8,"0")}]}),ii+=2,Ti>0&&Dn.length>=ii+Ti*2){const Qn=Dn.slice(ii,ii+Ti*2);cn.push({name:"Path Data",byteRange:`${ii/2}-${(ii+Ti*2-2)/2}`,hexData:Qn.match(/.{2}/g)?.join(" ")||Qn,description:"Routing path information",fields:[{bits:`0-${Ti*8-1}`,name:"Route Path",value:`${Ti} bytes of routing data`,binary:`${Ti} bytes (${Ti*8} bits)`}]}),ii+=Ti*2}}if(Dn.length>ii){const sa=Dn.slice(ii),Ti=sa.length/2;Bi===4?ce(cn,sa,ii):cn.push({name:"Payload Data",byteRange:`${ii/2}-${ii/2+Ti-1}`,hexData:sa.match(/.{2}/g)?.join(" ")||sa,description:"Application data content",fields:[{bits:`0-${Ti*8-1}`,name:"Application Data",value:`${Ti} bytes`,binary:`${Ti} bytes (${Ti*8} bits)`}]})}}}else{if(Dt.header){const Dn=Dt.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),ii=parseInt(Dn,16),Vi=ii&3,Nn=(ii&60)>>2,Wr=(ii&192)>>6,Bi={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},Ri={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};cn.push({name:"Header",byteRange:"0",hexData:`0x${Dn}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Bi[Vi]||"Unknown",binary:Vi.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:Ri[Nn]||"Unknown",binary:Nn.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:Wr.toString(),binary:Wr.toString(2).padStart(2,"0")}]}),Dt.transport_codes&&cn.push({name:"Transport Codes",byteRange:"1-4",hexData:Dt.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:Dt.transport_codes,binary:"Available in separate field"}]}),Dt.original_path&&Dt.original_path.length>0&&cn.push({name:"Original Path",byteRange:"?",hexData:Dt.original_path.join(" "),description:`Original routing path (${Dt.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.original_path.length} nodes`,binary:"Available as node list"}]}),Dt.forwarded_path&&Dt.forwarded_path.length>0&&cn.push({name:"Forwarded Path",byteRange:"?",hexData:Dt.forwarded_path.join(" "),description:`Forwarded routing path (${Dt.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(Dt.payload){const Dn=Dt.payload.replace(/\s+/g,"").toUpperCase(),ii=Dn.length/2;Dt.type===4?ce(cn,Dn,0):cn.push({name:"Payload Data",byteRange:`0-${ii-1}`,hexData:Dn.match(/.{2}/g)?.join(" ")||Dn,description:`Application data content (${ii} bytes)`,fields:[{bits:`0-${ii*8-1}`,name:"Application Data",value:`${ii} bytes`,binary:`${ii} bytes (${ii*8} bits)`}]})}}}catch{cn.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return cn},Ar=Dt=>Dt>=10?"text-green-400":Dt>=5?"text-cyan-400":Dt>=0?"text-yellow-400":"text-red-400",kr=(Dt,cn=8)=>{const Dn={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20}[cn]||-10;let ii,Vi;return Dt>=Dn+10?(ii=4,Vi="signal-excellent"):Dt>=Dn+5?(ii=3,Vi="signal-good"):Dt>=Dn?(ii=2,Vi="signal-fair"):(ii=1,Vi="signal-poor"),{level:ii,className:Vi}},Vr=Dt=>{Dt.key==="Escape"&&R("close")},fn=Dt=>{Dt.target===Dt.currentTarget&&R("close")};return(Dt,cn)=>(ci(),G0(QA,{to:"body"},[El(Yz,{name:"modal",appear:""},{default:ew(()=>[Dt.isOpen&&Dt.packet?(ci(),wi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:fn,onKeydown:Vr,tabindex:"0"},[cn[36]||(cn[36]=ye("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),ye("div",Gnt,[ye("div",Ynt,[ye("div",Knt,[ye("div",null,[cn[2]||(cn[2]=ye("h2",{class:"text-2xl font-bold text-white mb-1"},"Packet Details",-1)),ye("p",Xnt,Fi(zt(Dt.packet.type))+" - "+Fi(jt(Dt.packet.route)),1)]),ye("button",{onClick:cn[0]||(cn[0]=ti=>R("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors duration-200 text-white/70 hover:text-white"},cn[3]||(cn[3]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),ye("div",Jnt,[ye("div",Qnt,[cn[10]||(cn[10]=ye("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[ye("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),Qu(" Basic Information ")],-1)),ye("div",tit,[ye("div",eit,[ye("div",rit,[ye("div",nit,[cn[4]||(cn[4]=ye("span",{class:"text-white/70 text-sm"},"Timestamp",-1)),ye("span",iit,Fi(Y(Dt.packet.timestamp)),1)]),ye("div",ait,[cn[5]||(cn[5]=ye("span",{class:"text-white/70 text-sm"},"Packet Hash",-1)),ye("span",oit,Fi(Dt.packet.packet_hash),1)]),Dt.packet.header?(ci(),wi("div",sit,[cn[6]||(cn[6]=ye("span",{class:"text-white/70 text-sm"},"Header",-1)),ye("span",lit,Fi(Dt.packet.header),1)])):Uo("",!0)]),ye("div",uit,[ye("div",cit,[cn[7]||(cn[7]=ye("span",{class:"text-white/70 text-sm"},"Type",-1)),ye("span",hit,Fi(Dt.packet.type)+" ("+Fi(zt(Dt.packet.type))+")",1)]),ye("div",fit,[cn[8]||(cn[8]=ye("span",{class:"text-white/70 text-sm"},"Route",-1)),ye("span",dit,Fi(Dt.packet.route)+" ("+Fi(jt(Dt.packet.route))+")",1)]),ye("div",pit,[cn[9]||(cn[9]=ye("span",{class:"text-white/70 text-sm"},"Status",-1)),ye("span",{class:Fo(["font-semibold",dt(Dt.packet)])},Fi(_t(Dt.packet)),3)])])])])]),ye("div",mit,[cn[16]||(cn[16]=ye("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[ye("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),Qu(" Payload Data ")],-1)),ye("div",git,[ye("div",vit,[ye("div",yit,[cn[11]||(cn[11]=ye("span",{class:"text-white/70 text-sm"},"Payload Length",-1)),ye("span",xit,Fi(Dt.packet.payload_length||Dt.packet.length)+" bytes",1)]),Dt.packet.payload?(ci(),wi("div",_it,[cn[14]||(cn[14]=ye("div",{class:"text-white/70 text-sm mb-3"},"Payload Analysis",-1)),ye("div",bit,[cn[12]||(cn[12]=ye("div",{class:"text-white/70 text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),ye("div",wit,[ye("pre",kit,Fi(te(Dt.packet.payload)),1)])]),(ci(!0),wi(_u,null,Mh(fr(Dt.packet).filter(ti=>!ti.name.includes("Parse Error")),(ti,Dn)=>(ci(),wi("div",{key:Dn,class:"mb-4"},[ye("div",Tit,[ye("h4",Ait,Fi(ti.name),1),ye("span",Mit,"Bytes "+Fi(ti.byteRange),1)]),ye("div",Sit,[ye("div",Eit,Fi(ti.hexData),1)]),ye("div",Cit,[cn[13]||(cn[13]=ye("div",{class:"grid grid-cols-4 gap-4 p-3 bg-white/10 text-white/70 text-xs font-semibold uppercase tracking-wide"},[ye("div",null,"Bits"),ye("div",null,"Field"),ye("div",null,"Value"),ye("div",null,"Binary")],-1)),(ci(!0),wi(_u,null,Mh(ti.fields,(ii,Vi)=>(ci(),wi("div",{key:Vi,class:"grid grid-cols-4 gap-4 p-3 border-b border-white/5 last:border-b-0 hover:bg-white/5 transition-colors"},[ye("div",Lit,Fi(ii.bits),1),ye("div",Pit,Fi(ii.name),1),ye("div",Iit,Fi(ii.value),1),ye("div",zit,Fi(ii.binary),1)]))),128))]),ti.description?(ci(),wi("div",Oit,Fi(ti.description),1)):Uo("",!0)]))),128))])):(ci(),wi("div",Dit,cn[15]||(cn[15]=[ye("span",{class:"text-white/70 text-sm"},"Payload:",-1),ye("span",{class:"text-white/50 ml-2"},"None",-1)])))])])]),ye("div",Fit,[cn[24]||(cn[24]=ye("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[ye("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),Qu(" Path Information ")],-1)),ye("div",Bit,[ye("div",Rit,[ye("div",Nit,[ye("div",jit,[cn[17]||(cn[17]=ye("span",{class:"text-white/70 text-sm"},"Source Hash",-1)),ye("span",{class:Fo(["text-white font-mono text-xs",E.localHash&&Dt.packet.src_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Fi(Dt.packet.src_hash||"Unknown"),3)]),ye("div",Uit,[cn[18]||(cn[18]=ye("span",{class:"text-white/70 text-sm"},"Destination Hash",-1)),ye("span",{class:Fo(["text-white font-mono text-xs",E.localHash&&Dt.packet.dst_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Fi(Dt.packet.dst_hash||"Broadcast"),3)])]),Je(Dt.packet.original_path).length>0?(ci(),wi("div",Vit,[cn[20]||(cn[20]=ye("div",{class:"text-white/70 text-sm mb-2"},"Original Path",-1)),ye("div",Hit,[ye("div",Wit,[(ci(!0),wi(_u,null,Mh(Je(Dt.packet.original_path),(ti,Dn)=>(ci(),wi("div",{key:Dn,class:"flex items-center"},[ye("div",qit,[ye("div",$it,[ye("div",Zit,Fi(ti.length<=2?ti.toUpperCase():ti.slice(0,2).toUpperCase()),1)]),ye("div",Git," Node: "+Fi(ti),1)]),Dn0?(ci(),wi("div",Kit,[ye("div",Xit,[cn[22]||(cn[22]=Qu(" Forwarded Path ",-1)),JSON.stringify(Je(Dt.packet.original_path))!==JSON.stringify(Je(Dt.packet.forwarded_path))?(ci(),wi("svg",Jit,cn[21]||(cn[21]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):Uo("",!0),JSON.stringify(Je(Dt.packet.original_path))!==JSON.stringify(Je(Dt.packet.forwarded_path))?(ci(),wi("span",Qit,"(Modified)")):Uo("",!0)]),ye("div",tat,[ye("div",eat,[(ci(!0),wi(_u,null,Mh(Je(Dt.packet.forwarded_path),(ti,Dn)=>(ci(),wi("div",{key:Dn,class:"flex items-center"},[ye("div",rat,[ye("div",{class:Fo(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-400/40 rounded-lg transform transition-all hover:scale-105",E.localHash&&ti===E.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-400/60"])},[ye("div",{class:Fo(["font-mono text-xs font-semibold",E.localHash&&ti===E.localHash?"text-yellow-200":"text-white/90"])},Fi(ti.slice(0,2).toUpperCase()),3),E.localHash&&ti===E.localHash?(ci(),wi("div",nat)):Uo("",!0)],2),ye("div",iat,Fi(ti),1)]),Dnye("div",{key:ti,class:Fo(["w-2 h-6 rounded-sm transition-all duration-300",ti<=kr(Dt.packet.snr).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[kr(Dt.packet.snr).className]:"bg-white/10"])},null,2)),64))]),ye("span",vat,Fi(kr(Dt.packet.snr).className.replace("signal-","")),1)])]),Dt.packet.is_trace&&Dt.packet.path_snr_details&&Dt.packet.path_snr_details.length>0?(ci(),wi("div",yat,[ye("div",xat,"Path SNR Details ("+Fi(Dt.packet.path_snr_details.length)+" hops)",1),ye("div",_at,[(ci(!0),wi(_u,null,Mh(Dt.packet.path_snr_details,(ti,Dn)=>(ci(),wi("div",{key:Dn,class:"flex items-center justify-between p-2 glass-card bg-black/20 rounded-[8px]"},[ye("div",bat,[ye("span",wat,Fi(Dn+1)+".",1),ye("span",{class:Fo(["font-mono text-xs text-white",E.localHash&&ti.hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Fi(ti.hash),3)]),ye("span",{class:Fo(["text-sm font-bold",Ar(ti.snr_db)])},Fi(ti.snr_db.toFixed(1))+"dB ",3)]))),128))])])):Uo("",!0),ye("div",kat,[ye("div",Tat,[ye("div",Aat,[cn[31]||(cn[31]=ye("span",{class:"text-white/70 text-sm"},"TX Delay",-1)),ye("span",Mat,Fi(Number(Dt.packet.tx_delay_ms)>0?Number(Dt.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),ye("div",Sat,[cn[32]||(cn[32]=ye("span",{class:"text-white/70 text-sm"},"Transmitted",-1)),ye("span",{class:Fo(Dt.packet.transmitted?"text-green-400":"text-red-400")},Fi(Dt.packet.transmitted?"Yes":"No"),3)])]),ye("div",Eat,[ye("div",Cat,[cn[33]||(cn[33]=ye("span",{class:"text-white/70 text-sm"},"Is Duplicate",-1)),ye("span",{class:Fo(Dt.packet.is_duplicate?"text-amber-400":"text-white/60")},Fi(Dt.packet.is_duplicate?"Yes":"No"),3)]),Dt.packet.drop_reason?(ci(),wi("div",Lat,[cn[34]||(cn[34]=ye("span",{class:"text-white/70 text-sm"},"Drop Reason",-1)),ye("span",Pat,Fi(Dt.packet.drop_reason),1)])):Uo("",!0)])])])])]),ye("div",Iat,[ye("button",{onClick:cn[1]||(cn[1]=ti=>R("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-white transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):Uo("",!0)]),_:1})]))}}),Oat=Bf(zat,[["__scopeId","data-v-3b73bfd6"]]),Dat={class:"glass-card rounded-[20px] p-6"},Fat={class:"flex justify-between items-center mb-6"},Bat={class:"flex items-center gap-3"},Rat={class:"text-dark-text text-sm"},Nat=["title"],jat={key:1,class:"text-primary text-sm"},Uat={key:2,class:"text-accent-red text-sm"},Vat={class:"flex items-center gap-3"},Hat={class:"flex flex-col"},Wat=["value"],qat={class:"flex flex-col"},$at=["value"],Zat={class:"flex flex-col"},Gat={class:"flex flex-col"},Yat=["disabled"],Kat={class:"space-y-4 overflow-hidden"},Xat=["onClick"],Jat={class:"grid grid-cols-12 gap-2 items-center"},Qat={class:"col-span-1 text-white text-sm"},tot={class:"col-span-1 flex items-center gap-2"},eot={class:"text-white text-xs"},rot={class:"col-span-2"},not={class:"col-span-1 text-white text-xs"},iot={class:"col-span-2"},aot={class:"space-y-1"},oot={class:"inline-block px-2 py-0.5 rounded bg-[#588187] text-accent-cyan text-xs"},sot={class:"col-span-1 text-white text-xs"},lot={class:"col-span-1 text-white text-xs"},uot={class:"col-span-1 text-white text-xs"},cot={class:"col-span-1 text-white text-xs"},hot={class:"col-span-1"},fot={key:0,class:"text-accent-red text-[8px] italic truncate"},dot={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-dark-border"},pot={class:"flex items-center gap-4"},mot={class:"text-dark-text text-sm"},got={key:0,class:"flex items-center gap-2"},vot=["disabled"],yot={class:"text-dark-text text-xs"},xot={class:"flex items-center gap-2"},_ot=["disabled"],bot={class:"flex items-center gap-1"},wot={key:1,class:"text-dark-text text-sm px-2"},kot=["onClick"],Tot={key:2,class:"text-dark-text text-sm px-2"},Aot=["disabled"],Mot={key:1,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},Sot={class:"flex items-center gap-4"},Eot={class:"text-dark-text text-sm"},Cot={class:"text-dark-text text-xs"},Lot={key:2,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},a2=10,cy=1e3,Pot=Ec({name:"PacketTable",__name:"PacketTable",setup(d){const s=sw(),E=Ha(1),R=Ha(null),Y=Ha(100),dt=Ha(!1),_t=Ha(null),zt=Ha(!1),jt=Eo=>{_t.value=Eo,zt.value=!0},te=()=>{zt.value=!1,_t.value=null},ce=Ha("all"),Ie=Ha("all"),Je=Ha(!1),fr=Ha(null),Ar=["all","0","1","2","3","4","5","6","7","8","9","10","11"],kr=["all","1","2"],Vr=Wo(()=>{let Eo=s.recentPackets;if(ce.value!=="all"){const no=parseInt(ce.value);Eo=Eo.filter(mo=>mo.type===no)}if(Ie.value!=="all"){const no=parseInt(Ie.value);Eo=Eo.filter(mo=>mo.route===no)}return Je.value&&fr.value!==null&&(Eo=Eo.filter(no=>no.timestamp>=fr.value)),Eo}),fn=Wo(()=>{const Eo=(E.value-1)*a2,no=Eo+a2;return Vr.value.slice(Eo,no)}),Dt=Wo(()=>Math.ceil(Vr.value.length/a2)),cn=Wo(()=>E.value===Dt.value),ti=Wo(()=>s.recentPackets.length>=Y.value&&Y.valuecn.value&&ti.value&&!dt.value),ii=Eo=>new Date(Eo*1e3).toLocaleTimeString("en-US",{hour12:!1}),Vi=Eo=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTI_PART",11:"CONTROL"})[Eo]||`TYPE_${Eo}`,Nn=Eo=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[Eo]||`Route ${Eo}`,Wr=Eo=>Eo.transmitted?"text-accent-green":"text-primary",Bi=Eo=>Eo.drop_reason?"Dropped":Eo.transmitted?"Forward":"Received",Ri=Eo=>Eo===1?"bg-[#223231] text-accent-cyan":"bg-secondary/30 text-secondary",Li=Eo=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[Eo]||"bg-gray-500",$n=Eo=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[Eo]||"border-l-gray-500",Hn=()=>{ce.value="all",Ie.value="all",Je.value=!1,fr.value=null,E.value=1},sa=()=>{Je.value?(Je.value=!1,fr.value=null):(Je.value=!0,fr.value=Date.now()/1e3),E.value=1},Ti=Wo(()=>fr.value?new Date(fr.value*1e3).toLocaleTimeString():""),Qn=async Eo=>{try{const no=Eo||Y.value;await s.fetchRecentPackets({limit:no})}catch(no){console.error("Error fetching packet data:",no)}},la=async()=>{if(!(dt.value||Y.value>=cy)){dt.value=!0;try{const Eo=Math.min(Y.value+200,cy);Y.value=Eo,await Qn(Eo)}catch(Eo){console.error("Error loading more records:",Eo)}finally{dt.value=!1}}};return op(async()=>{await Qn(),R.value=window.setInterval(Qn,5e3)}),zm(()=>{R.value&&clearInterval(R.value)}),(Eo,no)=>(ci(),wi(_u,null,[ye("div",Dat,[ye("div",Fat,[ye("div",Bat,[no[6]||(no[6]=ye("h3",{class:"text-white text-xl font-semibold"},"Recent Packets",-1)),ye("span",Rat," ("+Fi(Vr.value.length)+" of "+Fi(Ol(s).recentPackets.length)+") ",1),Je.value?(ci(),wi("span",{key:0,class:"text-primary text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20",title:`Filter activated at ${Ti.value}`}," Live Mode (since "+Fi(Ti.value)+") ",9,Nat)):Uo("",!0),Ol(s).isLoading?(ci(),wi("span",jat,"Loading...")):Uo("",!0),Ol(s).error?(ci(),wi("span",Uat,Fi(Ol(s).error),1)):Uo("",!0)]),ye("div",Vat,[ye("div",Hat,[no[7]||(no[7]=ye("label",{class:"text-dark-text text-xs mb-1"},"Type",-1)),Gp(ye("select",{"onUpdate:modelValue":no[0]||(no[0]=mo=>ce.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(ci(),wi(_u,null,Mh(Ar,mo=>ye("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Fi(mo==="all"?"All Types":`Type ${mo} (${Vi(parseInt(mo))})`),9,Wat)),64))],512),[[vA,ce.value]])]),ye("div",qat,[no[8]||(no[8]=ye("label",{class:"text-dark-text text-xs mb-1"},"Route",-1)),Gp(ye("select",{"onUpdate:modelValue":no[1]||(no[1]=mo=>Ie.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(ci(),wi(_u,null,Mh(kr,mo=>ye("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Fi(mo==="all"?"All Routes":`Route ${mo} (${Nn(parseInt(mo))})`),9,$at)),64))],512),[[vA,Ie.value]])]),ye("div",Zat,[no[9]||(no[9]=ye("label",{class:"text-dark-text text-xs mb-1"},"Filter",-1)),ye("button",{onClick:sa,class:Fo(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":Je.value,"border-dark-border text-dark-text hover:border-primary hover:text-white hover:bg-primary/5":!Je.value}])},Fi(Je.value?"New Only":"Show New"),3)]),ye("div",Gat,[no[10]||(no[10]=ye("label",{class:"text-transparent text-xs mb-1"},".",-1)),ye("button",{onClick:Hn,class:Fo(["glass-card border border-dark-border hover:border-primary rounded-[10px] px-4 py-2 text-dark-text hover:text-white text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-dark-border hover:text-dark-text":ce.value==="all"&&Ie.value==="all"&&!Je.value,"hover:bg-primary/10":ce.value!=="all"||Ie.value!=="all"||Je.value}]),disabled:ce.value==="all"&&Ie.value==="all"&&!Je.value}," Reset ",10,Yat)])])]),no[14]||(no[14]=Ff('
Time
Type
Route
LEN
Path/Hashes
RSSI
SNR
Score
TX Delay
Status
',1)),ye("div",Kat,[El(WK,{name:"packet-list",tag:"div",class:"space-y-4",appear:""},{default:ew(()=>[(ci(!0),wi(_u,null,Mh(fn.value,(mo,Ts)=>(ci(),wi("div",{key:`${mo.packet_hash}_${mo.timestamp}_${Ts}`,class:Fo(["packet-row border-b border-dark-border/50 pb-4 hover:bg-white/5 transition-colors duration-200 cursor-pointer rounded-[10px] p-2 border-l-4",$n(mo.type)]),onClick:xl=>jt(mo)},[ye("div",Jat,[ye("div",Qat,Fi(ii(mo.timestamp)),1),ye("div",tot,[ye("div",{class:Fo(["w-2 h-2 rounded-full",Li(mo.type)])},null,2),ye("span",eot,Fi(Vi(mo.type)),1)]),ye("div",rot,[ye("span",{class:Fo(["inline-block px-2 py-1 rounded text-xs font-medium",Ri(mo.route)])},Fi(Nn(mo.route)),3)]),ye("div",not,Fi(mo.length)+"B",1),ye("div",iot,[ye("div",aot,[ye("span",oot,Fi(mo.src_hash?.slice(-4)||"????")+" → "+Fi(mo.dst_hash?.slice(-4)||"????"),1)])]),ye("div",sot,Fi(mo.rssi.toFixed(0)),1),ye("div",lot,Fi(mo.snr.toFixed(1))+"dB",1),ye("div",uot,Fi(mo.score.toFixed(2)),1),ye("div",cot,Fi(Number(mo.tx_delay_ms)>0?Number(mo.tx_delay_ms).toFixed(1)+"ms":""),1),ye("div",hot,[ye("div",null,[ye("span",{class:Fo(["text-xs font-medium",Wr(mo)])},Fi(Bi(mo)),3),mo.drop_reason?(ci(),wi("p",fot,Fi(mo.drop_reason),1)):Uo("",!0)])])])],10,Xat))),128))]),_:1})]),Dt.value>1?(ci(),wi("div",dot,[ye("div",pot,[ye("span",mot," Showing "+Fi((E.value-1)*a2+1)+" - "+Fi(Math.min(E.value*a2,Vr.value.length))+" of "+Fi(Vr.value.length)+" packets ",1),Dn.value?(ci(),wi("div",got,[no[11]||(no[11]=ye("span",{class:"text-dark-text text-xs"},"•",-1)),ye("button",{onClick:la,disabled:dt.value,class:Fo(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!dt.value,"text-dark-text border-dark-border cursor-not-allowed opacity-50":dt.value}])},Fi(dt.value?"Loading...":`Load ${Math.min(200,cy-Y.value)} more`),11,vot),ye("span",yot,"("+Fi(Y.value)+"/"+Fi(cy)+" max)",1)])):Uo("",!0)]),ye("div",xot,[ye("button",{onClick:no[2]||(no[2]=mo=>E.value=E.value-1),disabled:E.value<=1,class:Fo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value<=1,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value>1}])}," Previous ",10,_ot),ye("div",bot,[E.value>3?(ci(),wi("button",{key:0,onClick:no[3]||(no[3]=mo=>E.value=1),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):Uo("",!0),E.value>4?(ci(),wi("span",wot,"...")):Uo("",!0),(ci(!0),wi(_u,null,Mh(Array.from({length:Math.min(5,Dt.value)},(mo,Ts)=>Math.max(1,Math.min(E.value-2,Dt.value-4))+Ts).filter(mo=>mo<=Dt.value),mo=>(ci(),wi("button",{key:mo,onClick:Ts=>E.value=mo,class:Fo(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-primary bg-primary/10 text-primary":E.value===mo,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value!==mo}])},Fi(mo),11,kot))),128)),E.valueE.value=Dt.value),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},Fi(Dt.value),1)):Uo("",!0)]),ye("button",{onClick:no[5]||(no[5]=mo=>E.value=E.value+1),disabled:E.value>=Dt.value,class:Fo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value>=Dt.value,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value(ci(),wi("div",null,[El(_nt),ye("div",zot,[El(Znt),El(Ont)]),El(Iot)]))}}),Dot={class:"bg-white/5 border border-white/10 rounded-lg p-4 mb-6"},Fot={class:"flex items-center gap-3"},Bot={class:"flex-1 min-w-0"},Rot={class:"text-white font-medium truncate"},Not={class:"text-white/60 text-sm font-mono"},jot={key:0,class:"text-white/50 text-xs"},Uot={key:1,class:"text-white/50 text-xs"},Vot=Ec({__name:"DeleteNeighborModal",props:{show:{type:Boolean},neighbor:{}},emits:["close","delete"],setup(d,{emit:s}){const E=d,R=s,Y=()=>{E.neighbor&&(R("delete",E.neighbor.id),dt())},dt=()=>{R("close")},_t=zt=>{zt.target===zt.currentTarget&&dt()};return(zt,jt)=>zt.show&&zt.neighbor?(ci(),wi("div",{key:0,onClick:_t,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[ye("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:jt[0]||(jt[0]=Pm(()=>{},["stop"]))},[ye("div",{class:"flex items-center gap-3 mb-6"},[jt[2]||(jt[2]=ye("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),jt[3]||(jt[3]=ye("div",null,[ye("h3",{class:"text-xl font-semibold text-white"},"Delete Neighbor"),ye("p",{class:"text-white/60 text-sm mt-1"}," Are you sure you want to delete this neighbor? ")],-1)),ye("button",{onClick:dt,class:"ml-auto text-white/60 hover:text-white transition-colors"},jt[1]||(jt[1]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),ye("div",Dot,[ye("div",Fot,[ye("div",Bot,[ye("div",Rot,Fi(zt.neighbor?.node_name||zt.neighbor?.long_name||zt.neighbor?.short_name||"Unknown"),1),ye("div",Not," ID: "+Fi(zt.neighbor?.node_num_hex||zt.neighbor?.node_num||zt.neighbor?.id||"N/A"),1),zt.neighbor?.contact_type?(ci(),wi("div",jot,Fi(zt.neighbor.contact_type),1)):Uo("",!0),zt.neighbor?.hw_model?(ci(),wi("div",Uot,Fi(zt.neighbor.hw_model),1)):Uo("",!0)])])]),jt[4]||(jt[4]=ye("div",{class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},[ye("div",{class:"flex items-center gap-2 text-accent-red text-sm"},[ye("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),ye("span",null,"This action cannot be undone")])],-1)),ye("div",{class:"flex gap-3"},[ye("button",{onClick:dt,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),ye("button",{onClick:Y,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"}," Delete ")])])])):Uo("",!0)}});function tD(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var v2={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */var wot=g2.exports,QL;function kot(){return QL||(QL=1,function(d,s){(function(E,B){B(s)})(wot,function(E){var B="1.9.4";function K(ct){var Bt,me,Qe,zr;for(me=1,Qe=arguments.length;me"u"||!L||!L.Mixin)){ct=cn(ct)?ct:[ct];for(var Bt=0;Bt0?Math.floor(ct):Math.ceil(ct)};Ma.prototype={clone:function(){return new Ma(this.x,this.y)},add:function(ct){return this.clone()._add(ho(ct))},_add:function(ct){return this.x+=ct.x,this.y+=ct.y,this},subtract:function(ct){return this.clone()._subtract(ho(ct))},_subtract:function(ct){return this.x-=ct.x,this.y-=ct.y,this},divideBy:function(ct){return this.clone()._divideBy(ct)},_divideBy:function(ct){return this.x/=ct,this.y/=ct,this},multiplyBy:function(ct){return this.clone()._multiplyBy(ct)},_multiplyBy:function(ct){return this.x*=ct,this.y*=ct,this},scaleBy:function(ct){return new Ma(this.x*ct.x,this.y*ct.y)},unscaleBy:function(ct){return new Ma(this.x/ct.x,this.y/ct.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=zo(this.x),this.y=zo(this.y),this},distanceTo:function(ct){ct=ho(ct);var Bt=ct.x-this.x,me=ct.y-this.y;return Math.sqrt(Bt*Bt+me*me)},equals:function(ct){return ct=ho(ct),ct.x===this.x&&ct.y===this.y},contains:function(ct){return ct=ho(ct),Math.abs(ct.x)<=Math.abs(this.x)&&Math.abs(ct.y)<=Math.abs(this.y)},toString:function(){return"Point("+er(this.x)+", "+er(this.y)+")"}};function ho(ct,Bt,me){return ct instanceof Ma?ct:cn(ct)?new Ma(ct[0],ct[1]):ct==null?ct:typeof ct=="object"&&"x"in ct&&"y"in ct?new Ma(ct.x,ct.y):new Ma(ct,Bt,me)}function mo(ct,Bt){if(ct)for(var me=Bt?[ct,Bt]:ct,Qe=0,zr=me.length;Qe=this.min.x&&me.x<=this.max.x&&Bt.y>=this.min.y&&me.y<=this.max.y},intersects:function(ct){ct=Ts(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,An=zr.x>=Bt.x&&Qe.x<=me.x,qi=zr.y>=Bt.y&&Qe.y<=me.y;return An&&qi},overlaps:function(ct){ct=Ts(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,An=zr.x>Bt.x&&Qe.xBt.y&&Qe.y=Bt.lat&&zr.lat<=me.lat&&Qe.lng>=Bt.lng&&zr.lng<=me.lng},intersects:function(ct){ct=ko(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>=Bt.lat&&Qe.lat<=me.lat,qi=zr.lng>=Bt.lng&&Qe.lng<=me.lng;return An&&qi},overlaps:function(ct){ct=ko(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>Bt.lat&&Qe.latBt.lng&&Qe.lng1,l6=function(){var ct=!1;try{var Bt=Object.defineProperty({},"passive",{get:function(){ct=!0}});window.addEventListener("testPassiveEventSupport",De,Bt),window.removeEventListener("testPassiveEventSupport",De,Bt)}catch{}return ct}(),u6=function(){return!!document.createElement("canvas").getContext}(),A_=!!(document.createElementNS&&go("svg").createSVGRect),c6=!!A_&&function(){var ct=document.createElement("div");return ct.innerHTML="",(ct.firstChild&&ct.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),h6=!A_&&function(){try{var ct=document.createElement("div");ct.innerHTML='';var Bt=ct.firstChild;return Bt.style.behavior="url(#default#VML)",Bt&&typeof Bt.adj=="object"}catch{return!1}}(),mw=navigator.platform.indexOf("Mac")===0,M_=navigator.platform.indexOf("Linux")===0;function r0(ct){return navigator.userAgent.toLowerCase().indexOf(ct)>=0}var El={ie:ms,ielt9:bs,edge:as,webkit:Yo,android:Ol,android23:Ns,androidStock:vu,opera:tc,chrome:fh,gecko:Fc,safari:op,phantom:Kd,opera12:e0,win:d0,ie3d:Dm,webkit3d:uv,gecko3d:sp,any3d:p0,mobile:Fm,mobileWebkit:Fy,mobileWebkit3d:n6,msPointer:fw,pointer:dw,touch:i6,touchNative:pw,mobileOpera:a6,mobileGecko:o6,retina:s6,passiveEvents:l6,canvas:u6,svg:A_,vml:h6,inlineSvg:c6,mac:mw,linux:M_},Yc=El.msPointer?"MSPointerDown":"pointerdown",kd=El.msPointer?"MSPointerMove":"pointermove",S_=El.msPointer?"MSPointerUp":"pointerup",Zu=El.msPointer?"MSPointerCancel":"pointercancel",_1={touchstart:Yc,touchmove:kd,touchend:S_,touchcancel:Zu},gw={touchstart:p6,touchmove:G0,touchend:G0,touchcancel:G0},cv={},Ry=!1;function b1(ct,Bt,me){return Bt==="touchstart"&&E_(),gw[Bt]?(me=gw[Bt].bind(this,me),ct.addEventListener(_1[Bt],me,!1),me):(console.warn("wrong event specified:",Bt),De)}function f6(ct,Bt,me){if(!_1[Bt]){console.warn("wrong event specified:",Bt);return}ct.removeEventListener(_1[Bt],me,!1)}function Jo(ct){cv[ct.pointerId]=ct}function d6(ct){cv[ct.pointerId]&&(cv[ct.pointerId]=ct)}function w1(ct){delete cv[ct.pointerId]}function E_(){Ry||(document.addEventListener(Yc,Jo,!0),document.addEventListener(kd,d6,!0),document.addEventListener(S_,w1,!0),document.addEventListener(Zu,w1,!0),Ry=!0)}function G0(ct,Bt){if(Bt.pointerType!==(Bt.MSPOINTER_TYPE_MOUSE||"mouse")){Bt.touches=[];for(var me in cv)Bt.touches.push(cv[me]);Bt.changedTouches=[Bt],ct(Bt)}}function p6(ct,Bt){Bt.MSPOINTER_TYPE_TOUCH&&Bt.pointerType===Bt.MSPOINTER_TYPE_TOUCH&&mc(Bt),G0(ct,Bt)}function m6(ct){var Bt={},me,Qe;for(Qe in ct)me=ct[Qe],Bt[Qe]=me&&me.bind?me.bind(ct):me;return ct=Bt,Bt.type="dblclick",Bt.detail=2,Bt.isTrusted=!1,Bt._simulated=!0,Bt}var g6=200;function v6(ct,Bt){ct.addEventListener("dblclick",Bt);var me=0,Qe;function zr(An){if(An.detail!==1){Qe=An.detail;return}if(!(An.pointerType==="mouse"||An.sourceCapabilities&&!An.sourceCapabilities.firesTouchEvents)){var qi=_w(An);if(!(qi.some(function(Ka){return Ka instanceof HTMLLabelElement&&Ka.attributes.for})&&!qi.some(function(Ka){return Ka instanceof HTMLInputElement||Ka instanceof HTMLSelectElement}))){var ja=Date.now();ja-me<=g6?(Qe++,Qe===2&&Bt(m6(An))):Qe=1,me=ja}}}return ct.addEventListener("click",zr),{dblclick:Bt,simDblclick:zr}}function C_(ct,Bt){ct.removeEventListener("dblclick",Bt.dblclick),ct.removeEventListener("click",Bt.simDblclick)}var L_=Nm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),k1=Nm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vw=k1==="webkitTransition"||k1==="OTransition"?k1+"End":"transitionend";function yw(ct){return typeof ct=="string"?document.getElementById(ct):ct}function T1(ct,Bt){var me=ct.style[Bt]||ct.currentStyle&&ct.currentStyle[Bt];if((!me||me==="auto")&&document.defaultView){var Qe=document.defaultView.getComputedStyle(ct,null);me=Qe?Qe[Bt]:null}return me==="auto"?null:me}function Ec(ct,Bt,me){var Qe=document.createElement(ct);return Qe.className=Bt||"",me&&me.appendChild(Qe),Qe}function Tf(ct){var Bt=ct.parentNode;Bt&&Bt.removeChild(ct)}function By(ct){for(;ct.firstChild;)ct.removeChild(ct.firstChild)}function hv(ct){var Bt=ct.parentNode;Bt&&Bt.lastChild!==ct&&Bt.appendChild(ct)}function kn(ct){var Bt=ct.parentNode;Bt&&Bt.firstChild!==ct&&Bt.insertBefore(ct,Bt.firstChild)}function P_(ct,Bt){if(ct.classList!==void 0)return ct.classList.contains(Bt);var me=Bm(ct);return me.length>0&&new RegExp("(^|\\s)"+Bt+"(\\s|$)").test(me)}function Wu(ct,Bt){if(ct.classList!==void 0)for(var me=Mr(Bt),Qe=0,zr=me.length;Qe0?2*window.devicePixelRatio:1;function Tc(ct){return El.edge?ct.wheelDeltaY/2:ct.deltaY&&ct.deltaMode===0?-ct.deltaY/Xc:ct.deltaY&&ct.deltaMode===1?-ct.deltaY*20:ct.deltaY&&ct.deltaMode===2?-ct.deltaY*60:ct.deltaX||ct.deltaZ?0:ct.wheelDelta?(ct.wheelDeltaY||ct.wheelDelta)/2:ct.detail&&Math.abs(ct.detail)<32765?-ct.detail*20:ct.detail?ct.detail/-32765*60:0}function bg(ct,Bt){var me=Bt.relatedTarget;if(!me)return!0;try{for(;me&&me!==ct;)me=me.parentNode}catch{return!1}return me!==ct}var Fp={__proto__:null,on:zu,off:Nh,stopPropagation:n0,disableScrollPropagation:dm,disableClickPropagation:fv,preventDefault:mc,stop:_g,getPropagationPath:_w,getMousePosition:Xd,getWheelDelta:Tc,isExternalTarget:bg,addListener:zu,removeListener:Nh},S1=si.extend({run:function(ct,Bt,me,Qe){this.stop(),this._el=ct,this._inProgress=!0,this._duration=me||.25,this._easeOutPower=1/Math.max(Qe||.5,.2),this._startPos=Rc(ct),this._offset=Bt.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Fi(this._animate,this),this._step()},_step:function(ct){var Bt=+new Date-this._startTime,me=this._duration*1e3;Btthis.options.maxZoom)?this.setZoom(ct):this},panInsideBounds:function(ct,Bt){this._enforcingBounds=!0;var me=this.getCenter(),Qe=this._limitCenter(me,this._zoom,ko(ct));return me.equals(Qe)||this.panTo(Qe,Bt),this._enforcingBounds=!1,this},panInside:function(ct,Bt){Bt=Bt||{};var me=ho(Bt.paddingTopLeft||Bt.padding||[0,0]),Qe=ho(Bt.paddingBottomRight||Bt.padding||[0,0]),zr=this.project(this.getCenter()),An=this.project(ct),qi=this.getPixelBounds(),ja=Ts([qi.min.add(me),qi.max.subtract(Qe)]),Ka=ja.getSize();if(!ja.contains(An)){this._enforcingBounds=!0;var xo=An.subtract(ja.getCenter()),Ws=ja.extend(An).getSize().subtract(Ka);zr.x+=xo.x<0?-Ws.x:Ws.x,zr.y+=xo.y<0?-Ws.y:Ws.y,this.panTo(this.unproject(zr),Bt),this._enforcingBounds=!1}return this},invalidateSize:function(ct){if(!this._loaded)return this;ct=K({animate:!1,pan:!0},ct===!0?{animate:!0}:ct);var Bt=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var me=this.getSize(),Qe=Bt.divideBy(2).round(),zr=me.divideBy(2).round(),An=Qe.subtract(zr);return!An.x&&!An.y?this:(ct.animate&&ct.pan?this.panBy(An):(ct.pan&&this._rawPanBy(An),this.fire("move"),ct.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(_t(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:Bt,newSize:me}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(ct){if(ct=this._locateOptions=K({timeout:1e4,watch:!1},ct),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var Bt=_t(this._handleGeolocationResponse,this),me=_t(this._handleGeolocationError,this);return ct.watch?this._locationWatchId=navigator.geolocation.watchPosition(Bt,me,ct):navigator.geolocation.getCurrentPosition(Bt,me,ct),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(ct){if(this._container._leaflet_id){var Bt=ct.code,me=ct.message||(Bt===1?"permission denied":Bt===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:Bt,message:"Geolocation error: "+me+"."})}},_handleGeolocationResponse:function(ct){if(this._container._leaflet_id){var Bt=ct.coords.latitude,me=ct.coords.longitude,Qe=new ro(Bt,me),zr=Qe.toBounds(ct.coords.accuracy*2),An=this._locateOptions;if(An.setView){var qi=this.getBoundsZoom(zr);this.setView(Qe,An.maxZoom?Math.min(qi,An.maxZoom):qi)}var ja={latlng:Qe,bounds:zr,timestamp:ct.timestamp};for(var Ka in ct.coords)typeof ct.coords[Ka]=="number"&&(ja[Ka]=ct.coords[Ka]);this.fire("locationfound",ja)}},addHandler:function(ct,Bt){if(!Bt)return this;var me=this[ct]=new Bt(this);return this._handlers.push(me),this.options[ct]&&me.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Tf(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Pi(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var ct;for(ct in this._layers)this._layers[ct].remove();for(ct in this._panes)Tf(this._panes[ct]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(ct,Bt){var me="leaflet-pane"+(ct?" leaflet-"+ct.replace("Pane","")+"-pane":""),Qe=Ec("div",me,Bt||this._mapPane);return ct&&(this._panes[ct]=Qe),Qe},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var ct=this.getPixelBounds(),Bt=this.unproject(ct.getBottomLeft()),me=this.unproject(ct.getTopRight());return new xl(Bt,me)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(ct,Bt,me){ct=ko(ct),me=ho(me||[0,0]);var Qe=this.getZoom()||0,zr=this.getMinZoom(),An=this.getMaxZoom(),qi=ct.getNorthWest(),ja=ct.getSouthEast(),Ka=this.getSize().subtract(me),xo=Ts(this.project(ja,Qe),this.project(qi,Qe)).getSize(),Ws=El.any3d?this.options.zoomSnap:1,_l=Ka.x/xo.x,Fu=Ka.y/xo.y,Md=Bt?Math.max(_l,Fu):Math.min(_l,Fu);return Qe=this.getScaleZoom(Md,Qe),Ws&&(Qe=Math.round(Qe/(Ws/100))*(Ws/100),Qe=Bt?Math.ceil(Qe/Ws)*Ws:Math.floor(Qe/Ws)*Ws),Math.max(zr,Math.min(An,Qe))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Ma(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(ct,Bt){var me=this._getTopLeftPoint(ct,Bt);return new mo(me,me.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(ct){return this.options.crs.getProjectedBounds(ct===void 0?this.getZoom():ct)},getPane:function(ct){return typeof ct=="string"?this._panes[ct]:ct},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(ct,Bt){var me=this.options.crs;return Bt=Bt===void 0?this._zoom:Bt,me.scale(ct)/me.scale(Bt)},getScaleZoom:function(ct,Bt){var me=this.options.crs;Bt=Bt===void 0?this._zoom:Bt;var Qe=me.zoom(ct*me.scale(Bt));return isNaN(Qe)?1/0:Qe},project:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.latLngToPoint(Ia(ct),Bt)},unproject:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.pointToLatLng(ho(ct),Bt)},layerPointToLatLng:function(ct){var Bt=ho(ct).add(this.getPixelOrigin());return this.unproject(Bt)},latLngToLayerPoint:function(ct){var Bt=this.project(Ia(ct))._round();return Bt._subtract(this.getPixelOrigin())},wrapLatLng:function(ct){return this.options.crs.wrapLatLng(Ia(ct))},wrapLatLngBounds:function(ct){return this.options.crs.wrapLatLngBounds(ko(ct))},distance:function(ct,Bt){return this.options.crs.distance(Ia(ct),Ia(Bt))},containerPointToLayerPoint:function(ct){return ho(ct).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(ct){return ho(ct).add(this._getMapPanePos())},containerPointToLatLng:function(ct){var Bt=this.containerPointToLayerPoint(ho(ct));return this.layerPointToLatLng(Bt)},latLngToContainerPoint:function(ct){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Ia(ct)))},mouseEventToContainerPoint:function(ct){return Xd(ct,this._container)},mouseEventToLayerPoint:function(ct){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(ct))},mouseEventToLatLng:function(ct){return this.layerPointToLatLng(this.mouseEventToLayerPoint(ct))},_initContainer:function(ct){var Bt=this._container=yw(ct);if(Bt){if(Bt._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");zu(Bt,"scroll",this._onScroll,this),this._containerId=jt(Bt)},_initLayout:function(){var ct=this._container;this._fadeAnimated=this.options.fadeAnimation&&El.any3d,Wu(ct,"leaflet-container"+(El.touch?" leaflet-touch":"")+(El.retina?" leaflet-retina":"")+(El.ielt9?" leaflet-oldie":"")+(El.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var Bt=T1(ct,"position");Bt!=="absolute"&&Bt!=="relative"&&Bt!=="fixed"&&Bt!=="sticky"&&(ct.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var ct=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ic(this._mapPane,new Ma(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Wu(ct.markerPane,"leaflet-zoom-hide"),Wu(ct.shadowPane,"leaflet-zoom-hide"))},_resetView:function(ct,Bt,me){ic(this._mapPane,new Ma(0,0));var Qe=!this._loaded;this._loaded=!0,Bt=this._limitZoom(Bt),this.fire("viewprereset");var zr=this._zoom!==Bt;this._moveStart(zr,me)._move(ct,Bt)._moveEnd(zr),this.fire("viewreset"),Qe&&this.fire("load")},_moveStart:function(ct,Bt){return ct&&this.fire("zoomstart"),Bt||this.fire("movestart"),this},_move:function(ct,Bt,me,Qe){Bt===void 0&&(Bt=this._zoom);var zr=this._zoom!==Bt;return this._zoom=Bt,this._lastCenter=ct,this._pixelOrigin=this._getNewPixelOrigin(ct),Qe?me&&me.pinch&&this.fire("zoom",me):((zr||me&&me.pinch)&&this.fire("zoom",me),this.fire("move",me)),this},_moveEnd:function(ct){return ct&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Pi(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(ct){ic(this._mapPane,this._getMapPanePos().subtract(ct))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(ct){this._targets={},this._targets[jt(this._container)]=this;var Bt=ct?Nh:zu;Bt(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&Bt(window,"resize",this._onResize,this),El.any3d&&this.options.transform3DLimit&&(ct?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Pi(this._resizeRequest),this._resizeRequest=Fi(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var ct=this._getMapPanePos();Math.max(Math.abs(ct.x),Math.abs(ct.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(ct,Bt){for(var me=[],Qe,zr=Bt==="mouseout"||Bt==="mouseover",An=ct.target||ct.srcElement,qi=!1;An;){if(Qe=this._targets[jt(An)],Qe&&(Bt==="click"||Bt==="preclick")&&this._draggableMoved(Qe)){qi=!0;break}if(Qe&&Qe.listens(Bt,!0)&&(zr&&!bg(An,ct)||(me.push(Qe),zr))||An===this._container)break;An=An.parentNode}return!me.length&&!qi&&!zr&&this.listens(Bt,!0)&&(me=[this]),me},_isClickDisabled:function(ct){for(;ct&&ct!==this._container;){if(ct._leaflet_disable_click)return!0;ct=ct.parentNode}},_handleDOMEvent:function(ct){var Bt=ct.target||ct.srcElement;if(!(!this._loaded||Bt._leaflet_disable_events||ct.type==="click"&&this._isClickDisabled(Bt))){var me=ct.type;me==="mousedown"&&Ud(Bt),this._fireDOMEvent(ct,me)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(ct,Bt,me){if(ct.type==="click"){var Qe=K({},ct);Qe.type="preclick",this._fireDOMEvent(Qe,Qe.type,me)}var zr=this._findEventTargets(ct,Bt);if(me){for(var An=[],qi=0;qi0?Math.round(ct-Bt)/2:Math.max(0,Math.ceil(ct))-Math.max(0,Math.floor(Bt))},_limitZoom:function(ct){var Bt=this.getMinZoom(),me=this.getMaxZoom(),Qe=El.any3d?this.options.zoomSnap:1;return Qe&&(ct=Math.round(ct/Qe)*Qe),Math.max(Bt,Math.min(me,ct))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ff(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(ct,Bt){var me=this._getCenterOffset(ct)._trunc();return(Bt&&Bt.animate)!==!0&&!this.getSize().contains(me)?!1:(this.panBy(me,Bt),!0)},_createAnimProxy:function(){var ct=this._proxy=Ec("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(ct),this.on("zoomanim",function(Bt){var me=L_,Qe=this._proxy.style[me];mu(this._proxy,this.project(Bt.center,Bt.zoom),this.getZoomScale(Bt.zoom,1)),Qe===this._proxy.style[me]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Tf(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var ct=this.getCenter(),Bt=this.getZoom();mu(this._proxy,this.project(ct,Bt),this.getZoomScale(Bt,1))},_catchTransitionEnd:function(ct){this._animatingZoom&&ct.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(ct,Bt,me){if(this._animatingZoom)return!0;if(me=me||{},!this._zoomAnimated||me.animate===!1||this._nothingToAnimate()||Math.abs(Bt-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Qe=this.getZoomScale(Bt),zr=this._getCenterOffset(ct)._divideBy(1-1/Qe);return me.animate!==!0&&!this.getSize().contains(zr)?!1:(Fi(function(){this._moveStart(!0,me.noMoveStart||!1)._animateZoom(ct,Bt,!0)},this),!0)},_animateZoom:function(ct,Bt,me,Qe){this._mapPane&&(me&&(this._animatingZoom=!0,this._animateToCenter=ct,this._animateToZoom=Bt,Wu(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:ct,zoom:Bt,noUpdate:Qe}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(_t(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ff(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Vs(ct,Bt){return new Ac(ct,Bt)}var lp=Yi.extend({options:{position:"topright"},initialize:function(ct){Tr(this,ct)},getPosition:function(){return this.options.position},setPosition:function(ct){var Bt=this._map;return Bt&&Bt.removeControl(this),this.options.position=ct,Bt&&Bt.addControl(this),this},getContainer:function(){return this._container},addTo:function(ct){this.remove(),this._map=ct;var Bt=this._container=this.onAdd(ct),me=this.getPosition(),Qe=ct._controlCorners[me];return Wu(Bt,"leaflet-control"),me.indexOf("bottom")!==-1?Qe.insertBefore(Bt,Qe.firstChild):Qe.appendChild(Bt),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Tf(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(ct){this._map&&ct&&ct.screenX>0&&ct.screenY>0&&this._map.getContainer().focus()}}),i0=function(ct){return new lp(ct)};Ac.include({addControl:function(ct){return ct.addTo(this),this},removeControl:function(ct){return ct.remove(),this},_initControlPos:function(){var ct=this._controlCorners={},Bt="leaflet-",me=this._controlContainer=Ec("div",Bt+"control-container",this._container);function Qe(zr,An){var qi=Bt+zr+" "+Bt+An;ct[zr+An]=Ec("div",qi,me)}Qe("top","left"),Qe("top","right"),Qe("bottom","left"),Qe("bottom","right")},_clearControlPos:function(){for(var ct in this._controlCorners)Tf(this._controlCorners[ct]);Tf(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var dv=lp.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(ct,Bt,me,Qe){return me1,this._baseLayersList.style.display=ct?"":"none"),this._separator.style.display=Bt&&ct?"":"none",this},_onLayerChange:function(ct){this._handlingClick||this._update();var Bt=this._getLayer(jt(ct.target)),me=Bt.overlay?ct.type==="add"?"overlayadd":"overlayremove":ct.type==="add"?"baselayerchange":null;me&&this._map.fire(me,Bt)},_createRadioElement:function(ct,Bt){var me='",Qe=document.createElement("div");return Qe.innerHTML=me,Qe.firstChild},_addItem:function(ct){var Bt=document.createElement("label"),me=this._map.hasLayer(ct.layer),Qe;ct.overlay?(Qe=document.createElement("input"),Qe.type="checkbox",Qe.className="leaflet-control-layers-selector",Qe.defaultChecked=me):Qe=this._createRadioElement("leaflet-base-layers_"+jt(this),me),this._layerControlInputs.push(Qe),Qe.layerId=jt(ct.layer),zu(Qe,"click",this._onInputClick,this);var zr=document.createElement("span");zr.innerHTML=" "+ct.name;var An=document.createElement("span");Bt.appendChild(An),An.appendChild(Qe),An.appendChild(zr);var qi=ct.overlay?this._overlaysList:this._baseLayersList;return qi.appendChild(Bt),this._checkDisabledLayers(),Bt},_onInputClick:function(){if(!this._preventClick){var ct=this._layerControlInputs,Bt,me,Qe=[],zr=[];this._handlingClick=!0;for(var An=ct.length-1;An>=0;An--)Bt=ct[An],me=this._getLayer(Bt.layerId).layer,Bt.checked?Qe.push(me):Bt.checked||zr.push(me);for(An=0;An=0;zr--)Bt=ct[zr],me=this._getLayer(Bt.layerId).layer,Bt.disabled=me.options.minZoom!==void 0&&Qeme.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var ct=this._section;this._preventClick=!0,zu(ct,"click",mc),this.expand();var Bt=this;setTimeout(function(){Nh(ct,"click",mc),Bt._preventClick=!1})}}),Y0=function(ct,Bt,me){return new dv(ct,Bt,me)},Ls=lp.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(ct){var Bt="leaflet-control-zoom",me=Ec("div",Bt+" leaflet-bar"),Qe=this.options;return this._zoomInButton=this._createButton(Qe.zoomInText,Qe.zoomInTitle,Bt+"-in",me,this._zoomIn),this._zoomOutButton=this._createButton(Qe.zoomOutText,Qe.zoomOutTitle,Bt+"-out",me,this._zoomOut),this._updateDisabled(),ct.on("zoomend zoomlevelschange",this._updateDisabled,this),me},onRemove:function(ct){ct.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(ct){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(ct.shiftKey?3:1))},_createButton:function(ct,Bt,me,Qe,zr){var An=Ec("a",me,Qe);return An.innerHTML=ct,An.href="#",An.title=Bt,An.setAttribute("role","button"),An.setAttribute("aria-label",Bt),fv(An),zu(An,"click",_g),zu(An,"click",zr,this),zu(An,"click",this._refocusOnMap,this),An},_updateDisabled:function(){var ct=this._map,Bt="leaflet-disabled";Ff(this._zoomInButton,Bt),Ff(this._zoomOutButton,Bt),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||ct._zoom===ct.getMinZoom())&&(Wu(this._zoomOutButton,Bt),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||ct._zoom===ct.getMaxZoom())&&(Wu(this._zoomInButton,Bt),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ac.mergeOptions({zoomControl:!0}),Ac.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ls,this.addControl(this.zoomControl))});var bw=function(ct){return new Ls(ct)},I_=lp.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(ct){var Bt="leaflet-control-scale",me=Ec("div",Bt),Qe=this.options;return this._addScales(Qe,Bt+"-line",me),ct.on(Qe.updateWhenIdle?"moveend":"move",this._update,this),ct.whenReady(this._update,this),me},onRemove:function(ct){ct.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(ct,Bt,me){ct.metric&&(this._mScale=Ec("div",Bt,me)),ct.imperial&&(this._iScale=Ec("div",Bt,me))},_update:function(){var ct=this._map,Bt=ct.getSize().y/2,me=ct.distance(ct.containerPointToLatLng([0,Bt]),ct.containerPointToLatLng([this.options.maxWidth,Bt]));this._updateScales(me)},_updateScales:function(ct){this.options.metric&&ct&&this._updateMetric(ct),this.options.imperial&&ct&&this._updateImperial(ct)},_updateMetric:function(ct){var Bt=this._getRoundNum(ct),me=Bt<1e3?Bt+" m":Bt/1e3+" km";this._updateScale(this._mScale,me,Bt/ct)},_updateImperial:function(ct){var Bt=ct*3.2808399,me,Qe,zr;Bt>5280?(me=Bt/5280,Qe=this._getRoundNum(me),this._updateScale(this._iScale,Qe+" mi",Qe/me)):(zr=this._getRoundNum(Bt),this._updateScale(this._iScale,zr+" ft",zr/Bt))},_updateScale:function(ct,Bt,me){ct.style.width=Math.round(this.options.maxWidth*me)+"px",ct.innerHTML=Bt},_getRoundNum:function(ct){var Bt=Math.pow(10,(Math.floor(ct)+"").length-1),me=ct/Bt;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:1,Bt*me}}),y6=function(ct){return new I_(ct)},z_='',O_=lp.extend({options:{position:"bottomright",prefix:''+(El.inlineSvg?z_+" ":"")+"Leaflet"},initialize:function(ct){Tr(this,ct),this._attributions={}},onAdd:function(ct){ct.attributionControl=this,this._container=Ec("div","leaflet-control-attribution"),fv(this._container);for(var Bt in ct._layers)ct._layers[Bt].getAttribution&&this.addAttribution(ct._layers[Bt].getAttribution());return this._update(),ct.on("layeradd",this._addAttribution,this),this._container},onRemove:function(ct){ct.off("layeradd",this._addAttribution,this)},_addAttribution:function(ct){ct.layer.getAttribution&&(this.addAttribution(ct.layer.getAttribution()),ct.layer.once("remove",function(){this.removeAttribution(ct.layer.getAttribution())},this))},setPrefix:function(ct){return this.options.prefix=ct,this._update(),this},addAttribution:function(ct){return ct?(this._attributions[ct]||(this._attributions[ct]=0),this._attributions[ct]++,this._update(),this):this},removeAttribution:function(ct){return ct?(this._attributions[ct]&&(this._attributions[ct]--,this._update()),this):this},_update:function(){if(this._map){var ct=[];for(var Bt in this._attributions)this._attributions[Bt]&&ct.push(Bt);var me=[];this.options.prefix&&me.push(this.options.prefix),ct.length&&me.push(ct.join(", ")),this._container.innerHTML=me.join(' ')}}});Ac.mergeOptions({attributionControl:!0}),Ac.addInitHook(function(){this.options.attributionControl&&new O_().addTo(this)});var x6=function(ct){return new O_(ct)};lp.Layers=dv,lp.Zoom=Ls,lp.Scale=I_,lp.Attribution=O_,i0.layers=Y0,i0.zoom=bw,i0.scale=y6,i0.attribution=x6;var K0=Yi.extend({initialize:function(ct){this._map=ct},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});K0.addTo=function(ct,Bt){return ct.addHandler(Bt,this),this};var up={Events:Ni},P0=El.touch?"touchstart mousedown":"mousedown",jm=si.extend({options:{clickTolerance:3},initialize:function(ct,Bt,me,Qe){Tr(this,Qe),this._element=ct,this._dragStartTarget=Bt||ct,this._preventOutline=me},enable:function(){this._enabled||(zu(this._dragStartTarget,P0,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(jm._dragging===this&&this.finishDrag(!0),Nh(this._dragStartTarget,P0,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(ct){if(this._enabled&&(this._moved=!1,!P_(this._element,"leaflet-zoom-anim"))){if(ct.touches&&ct.touches.length!==1){jm._dragging===this&&this.finishDrag();return}if(!(jm._dragging||ct.shiftKey||ct.which!==1&&ct.button!==1&&!ct.touches)&&(jm._dragging=this,this._preventOutline&&Ud(this._element),Kc(),C0(),!this._moving)){this.fire("down");var Bt=ct.touches?ct.touches[0]:ct,me=Td(this._element);this._startPoint=new Ma(Bt.clientX,Bt.clientY),this._startPos=Rc(this._element),this._parentScale=M1(me);var Qe=ct.type==="mousedown";zu(document,Qe?"mousemove":"touchmove",this._onMove,this),zu(document,Qe?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(ct){if(this._enabled){if(ct.touches&&ct.touches.length>1){this._moved=!0;return}var Bt=ct.touches&&ct.touches.length===1?ct.touches[0]:ct,me=new Ma(Bt.clientX,Bt.clientY)._subtract(this._startPoint);!me.x&&!me.y||Math.abs(me.x)+Math.abs(me.y)An&&(qi=ja,An=Ka);An>me&&(Bt[qi]=1,kg(ct,Bt,me,Qe,qi),kg(ct,Bt,me,qi,zr))}function kw(ct,Bt){for(var me=[ct[0]],Qe=1,zr=0,An=ct.length;QeBt&&(me.push(ct[Qe]),zr=Qe);return zrBt.max.x&&(me|=2),ct.yBt.max.y&&(me|=8),me}function w6(ct,Bt){var me=Bt.x-ct.x,Qe=Bt.y-ct.y;return me*me+Qe*Qe}function pv(ct,Bt,me,Qe){var zr=Bt.x,An=Bt.y,qi=me.x-zr,ja=me.y-An,Ka=qi*qi+ja*ja,xo;return Ka>0&&(xo=((ct.x-zr)*qi+(ct.y-An)*ja)/Ka,xo>1?(zr=me.x,An=me.y):xo>0&&(zr+=qi*xo,An+=ja*xo)),qi=ct.x-zr,ja=ct.y-An,Qe?qi*qi+ja*ja:new Ma(zr,An)}function g0(ct){return!cn(ct[0])||typeof ct[0][0]!="object"&&typeof ct[0][0]<"u"}function Tw(ct){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),g0(ct)}function Aw(ct,Bt){var me,Qe,zr,An,qi,ja,Ka,xo;if(!ct||ct.length===0)throw new Error("latlngs not passed");g0(ct)||(console.warn("latlngs are not flat! Only the first ring will be used"),ct=ct[0]);var Ws=Ia([0,0]),_l=ko(ct),Fu=_l.getNorthWest().distanceTo(_l.getSouthWest())*_l.getNorthEast().distanceTo(_l.getNorthWest());Fu<1700&&(Ws=Uy(ct));var Md=ct.length,Rf=[];for(me=0;meQe){Ka=(An-Qe)/zr,xo=[ja.x-Ka*(ja.x-qi.x),ja.y-Ka*(ja.y-qi.y)];break}var kp=Bt.unproject(ho(xo));return Ia([kp.lat+Ws.lat,kp.lng+Ws.lng])}var tf={__proto__:null,simplify:F_,pointToSegmentDistance:ww,closestPointOnSegment:wg,clipSegment:B_,_getEdgeIntersection:Tg,_getBitCode:Ag,_sqClosestPointOnSegment:pv,isFlat:g0,_flat:Tw,polylineCenter:Aw},v0={project:function(ct){return new Ma(ct.lng,ct.lat)},unproject:function(ct){return new ro(ct.y,ct.x)},bounds:new mo([-180,-90],[180,90])},mv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new mo([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(ct){var Bt=Math.PI/180,me=this.R,Qe=ct.lat*Bt,zr=this.R_MINOR/me,An=Math.sqrt(1-zr*zr),qi=An*Math.sin(Qe),ja=Math.tan(Math.PI/4-Qe/2)/Math.pow((1-qi)/(1+qi),An/2);return Qe=-me*Math.log(Math.max(ja,1e-10)),new Ma(ct.lng*Bt*me,Qe)},unproject:function(ct){for(var Bt=180/Math.PI,me=this.R,Qe=this.R_MINOR/me,zr=Math.sqrt(1-Qe*Qe),An=Math.exp(-ct.y/me),qi=Math.PI/2-2*Math.atan(An),ja=0,Ka=.1,xo;ja<15&&Math.abs(Ka)>1e-7;ja++)xo=zr*Math.sin(qi),xo=Math.pow((1-xo)/(1+xo),zr/2),Ka=Math.PI/2-2*Math.atan(An*xo)-qi,qi+=Ka;return new ro(qi*Bt,ct.x*Bt/me)}},N_={__proto__:null,LonLat:v0,Mercator:mv,SphericalMercator:us},j_=K({},no,{code:"EPSG:3395",projection:mv,transformation:function(){var ct=.5/(Math.PI*mv.R);return vi(ct,.5,-ct,.5)}()}),Vy=K({},no,{code:"EPSG:4326",projection:v0,transformation:vi(1/180,1,-1/180,.5)}),Mg=K({},da,{projection:v0,transformation:vi(1,0,-1,0),scale:function(ct){return Math.pow(2,ct)},zoom:function(ct){return Math.log(ct)/Math.LN2},distance:function(ct,Bt){var me=Bt.lng-ct.lng,Qe=Bt.lat-ct.lat;return Math.sqrt(me*me+Qe*Qe)},infinite:!0});da.Earth=no,da.EPSG3395=j_,da.EPSG3857=wi,da.EPSG900913=hi,da.EPSG4326=Vy,da.Simple=Mg;var a0=si.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(ct){return ct.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(ct){return ct&&ct.removeLayer(this),this},getPane:function(ct){return this._map.getPane(ct?this.options[ct]||ct:this.options.pane)},addInteractiveTarget:function(ct){return this._map._targets[jt(ct)]=this,this},removeInteractiveTarget:function(ct){return delete this._map._targets[jt(ct)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(ct){var Bt=ct.target;if(Bt.hasLayer(this)){if(this._map=Bt,this._zoomAnimated=Bt._zoomAnimated,this.getEvents){var me=this.getEvents();Bt.on(me,this),this.once("remove",function(){Bt.off(me,this)},this)}this.onAdd(Bt),this.fire("add"),Bt.fire("layeradd",{layer:this})}}});Ac.include({addLayer:function(ct){if(!ct._layerAdd)throw new Error("The provided object is not a Layer.");var Bt=jt(ct);return this._layers[Bt]?this:(this._layers[Bt]=ct,ct._mapToAdd=this,ct.beforeAdd&&ct.beforeAdd(this),this.whenReady(ct._layerAdd,ct),this)},removeLayer:function(ct){var Bt=jt(ct);return this._layers[Bt]?(this._loaded&&ct.onRemove(this),delete this._layers[Bt],this._loaded&&(this.fire("layerremove",{layer:ct}),ct.fire("remove")),ct._map=ct._mapToAdd=null,this):this},hasLayer:function(ct){return jt(ct)in this._layers},eachLayer:function(ct,Bt){for(var me in this._layers)ct.call(Bt,this._layers[me]);return this},_addLayers:function(ct){ct=ct?cn(ct)?ct:[ct]:[];for(var Bt=0,me=ct.length;Btthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&Bt[0]instanceof ro&&Bt[0].equals(Bt[me-1])&&Bt.pop(),Bt},_setLatLngs:function(ct){y0.prototype._setLatLngs.call(this,ct),g0(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return g0(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var ct=this._renderer._bounds,Bt=this.options.weight,me=new Ma(Bt,Bt);if(ct=new mo(ct.min.subtract(me),ct.max.add(me)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(ct))){if(this.options.noClip){this._parts=this._rings;return}for(var Qe=0,zr=this._rings.length,An;Qect.y!=zr.y>ct.y&&ct.x<(zr.x-Qe.x)*(ct.y-Qe.y)/(zr.y-Qe.y)+Qe.x&&(Bt=!Bt);return Bt||y0.prototype._containsPoint.call(this,ct,!0)}});function T6(ct,Bt){return new yv(ct,Bt)}var pm=wp.extend({initialize:function(ct,Bt){Tr(this,Bt),this._layers={},ct&&this.addData(ct)},addData:function(ct){var Bt=cn(ct)?ct:ct.features,me,Qe,zr;if(Bt){for(me=0,Qe=Bt.length;me0&&zr.push(zr[0].slice()),zr}function mm(ct,Bt){return ct.feature?K({},ct.feature,{geometry:Bt}):Yy(Bt)}function Yy(ct){return ct.type==="Feature"||ct.type==="FeatureCollection"?ct:{type:"Feature",properties:{},geometry:ct}}var q_={toGeoJSON:function(ct){return mm(this,{type:"Point",coordinates:W_(this.getLatLng(),ct)})}};E1.include(q_),qy.include(q_),Wy.include(q_),y0.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Gy(this._latlngs,Bt?1:0,!1,ct);return mm(this,{type:(Bt?"Multi":"")+"LineString",coordinates:me})}}),yv.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Bt&&!g0(this._latlngs[0]),Qe=Gy(this._latlngs,me?2:Bt?1:0,!0,ct);return Bt||(Qe=[Qe]),mm(this,{type:(me?"Multi":"")+"Polygon",coordinates:Qe})}}),Sg.include({toMultiPoint:function(ct){var Bt=[];return this.eachLayer(function(me){Bt.push(me.toGeoJSON(ct).geometry.coordinates)}),mm(this,{type:"MultiPoint",coordinates:Bt})},toGeoJSON:function(ct){var Bt=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(Bt==="MultiPoint")return this.toMultiPoint(ct);var me=Bt==="GeometryCollection",Qe=[];return this.eachLayer(function(zr){if(zr.toGeoJSON){var An=zr.toGeoJSON(ct);if(me)Qe.push(An.geometry);else{var qi=Yy(An);qi.type==="FeatureCollection"?Qe.push.apply(Qe,qi.features):Qe.push(qi)}}}),me?mm(this,{geometries:Qe,type:"GeometryCollection"}):{type:"FeatureCollection",features:Qe}}});function $_(ct,Bt){return new pm(ct,Bt)}var Ky=$_,gm=a0.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(ct,Bt,me){this._url=ct,this._bounds=ko(Bt),Tr(this,me)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Wu(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Tf(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(ct){return this.options.opacity=ct,this._image&&this._updateOpacity(),this},setStyle:function(ct){return ct.opacity&&this.setOpacity(ct.opacity),this},bringToFront:function(){return this._map&&hv(this._image),this},bringToBack:function(){return this._map&&kn(this._image),this},setUrl:function(ct){return this._url=ct,this._image&&(this._image.src=ct),this},setBounds:function(ct){return this._bounds=ko(ct),this._map&&this._reset(),this},getEvents:function(){var ct={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(ct.zoomanim=this._animateZoom),ct},setZIndex:function(ct){return this.options.zIndex=ct,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var ct=this._url.tagName==="IMG",Bt=this._image=ct?this._url:Ec("img");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=De,Bt.onmousemove=De,Bt.onload=_t(this.fire,this,"load"),Bt.onerror=_t(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Bt.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),ct){this._url=Bt.src;return}Bt.src=this._url,Bt.alt=this.options.alt},_animateZoom:function(ct){var Bt=this._map.getZoomScale(ct.zoom),me=this._map._latLngBoundsToNewLayerBounds(this._bounds,ct.zoom,ct.center).min;mu(this._image,me,Bt)},_reset:function(){var ct=this._image,Bt=new mo(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),me=Bt.getSize();ic(ct,Bt.min),ct.style.width=me.x+"px",ct.style.height=me.y+"px"},_updateOpacity:function(){m0(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var ct=this.options.errorOverlayUrl;ct&&this._url!==ct&&(this._url=ct,this._image.src=ct)},getCenter:function(){return this._bounds.getCenter()}}),vm=function(ct,Bt,me){return new gm(ct,Bt,me)},I0=gm.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var ct=this._url.tagName==="VIDEO",Bt=this._image=ct?this._url:Ec("video");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=De,Bt.onmousemove=De,Bt.onloadeddata=_t(this.fire,this,"load"),ct){for(var me=Bt.getElementsByTagName("source"),Qe=[],zr=0;zr0?Qe:[Bt.src];return}cn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(Bt.style,"objectFit")&&(Bt.style.objectFit="fill"),Bt.autoplay=!!this.options.autoplay,Bt.loop=!!this.options.loop,Bt.muted=!!this.options.muted,Bt.playsInline=!!this.options.playsInline;for(var An=0;Anzr?(Bt.height=zr+"px",Wu(ct,An)):Ff(ct,An),this._containerWidth=this._container.offsetWidth},_animateZoom:function(ct){var Bt=this._map._latLngToNewLayerPoint(this._latlng,ct.zoom,ct.center),me=this._getAnchor();ic(this._container,Bt.add(me))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var ct=this._map,Bt=parseInt(T1(this._container,"marginBottom"),10)||0,me=this._container.offsetHeight+Bt,Qe=this._containerWidth,zr=new Ma(this._containerLeft,-me-this._containerBottom);zr._add(Rc(this._container));var An=ct.layerPointToContainerPoint(zr),qi=ho(this.options.autoPanPadding),ja=ho(this.options.autoPanPaddingTopLeft||qi),Ka=ho(this.options.autoPanPaddingBottomRight||qi),xo=ct.getSize(),Ws=0,_l=0;An.x+Qe+Ka.x>xo.x&&(Ws=An.x+Qe-xo.x+Ka.x),An.x-Ws-ja.x<0&&(Ws=An.x-ja.x),An.y+me+Ka.y>xo.y&&(_l=An.y+me-xo.y+Ka.y),An.y-_l-ja.y<0&&(_l=An.y-ja.y),(Ws||_l)&&(this.options.keepInView&&(this._autopanning=!0),ct.fire("autopanstart").panBy([Ws,_l]))}},_getAnchor:function(){return ho(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vf=function(ct,Bt){return new Eg(ct,Bt)};Ac.mergeOptions({closePopupOnClick:!0}),Ac.include({openPopup:function(ct,Bt,me){return this._initOverlay(Eg,ct,Bt,me).openOn(this),this},closePopup:function(ct){return ct=arguments.length?ct:this._popup,ct&&ct.close(),this}}),a0.include({bindPopup:function(ct,Bt){return this._popup=this._initOverlay(Eg,this._popup,ct,Bt),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(ct){return this._popup&&(this instanceof wp||(this._popup._source=this),this._popup._prepareOpen(ct||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(ct){return this._popup&&this._popup.setContent(ct),this},getPopup:function(){return this._popup},_openPopup:function(ct){if(!(!this._popup||!this._map)){_g(ct);var Bt=ct.layer||ct.target;if(this._popup._source===Bt&&!(Bt instanceof Vm)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(ct.latlng);return}this._popup._source=Bt,this.openPopup(ct.latlng)}},_movePopup:function(ct){this._popup.setLatLng(ct.latlng)},_onKeyPress:function(ct){ct.originalEvent.keyCode===13&&this._openPopup(ct)}});var C1=X0.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(ct){X0.prototype.onAdd.call(this,ct),this.setOpacity(this.options.opacity),ct.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(ct){X0.prototype.onRemove.call(this,ct),ct.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var ct=X0.prototype.getEvents.call(this);return this.options.permanent||(ct.preclick=this.close),ct},_initLayout:function(){var ct="leaflet-tooltip",Bt=ct+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ec("div",Bt),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+jt(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(ct){var Bt,me,Qe=this._map,zr=this._container,An=Qe.latLngToContainerPoint(Qe.getCenter()),qi=Qe.layerPointToContainerPoint(ct),ja=this.options.direction,Ka=zr.offsetWidth,xo=zr.offsetHeight,Ws=ho(this.options.offset),_l=this._getAnchor();ja==="top"?(Bt=Ka/2,me=xo):ja==="bottom"?(Bt=Ka/2,me=0):ja==="center"?(Bt=Ka/2,me=xo/2):ja==="right"?(Bt=0,me=xo/2):ja==="left"?(Bt=Ka,me=xo/2):qi.xthis.options.maxZoom||meQe?this._retainParent(zr,An,qi,Qe):!1)},_retainChildren:function(ct,Bt,me,Qe){for(var zr=2*ct;zr<2*ct+2;zr++)for(var An=2*Bt;An<2*Bt+2;An++){var qi=new Ma(zr,An);qi.z=me+1;var ja=this._tileCoordsToKey(qi),Ka=this._tiles[ja];if(Ka&&Ka.active){Ka.retain=!0;continue}else Ka&&Ka.loaded&&(Ka.retain=!0);me+1this.options.maxZoom||this.options.minZoom!==void 0&&zr1){this._setView(ct,me);return}for(var _l=zr.min.y;_l<=zr.max.y;_l++)for(var Fu=zr.min.x;Fu<=zr.max.x;Fu++){var Md=new Ma(Fu,_l);if(Md.z=this._tileZoom,!!this._isValidTile(Md)){var Rf=this._tiles[this._tileCoordsToKey(Md)];Rf?Rf.current=!0:qi.push(Md)}}if(qi.sort(function(kp,Wm){return kp.distanceTo(An)-Wm.distanceTo(An)}),qi.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _0=document.createDocumentFragment();for(Fu=0;Fume.max.x)||!Bt.wrapLat&&(ct.yme.max.y))return!1}if(!this.options.bounds)return!0;var Qe=this._tileCoordsToBounds(ct);return ko(this.options.bounds).overlaps(Qe)},_keyToBounds:function(ct){return this._tileCoordsToBounds(this._keyToTileCoords(ct))},_tileCoordsToNwSe:function(ct){var Bt=this._map,me=this.getTileSize(),Qe=ct.scaleBy(me),zr=Qe.add(me),An=Bt.unproject(Qe,ct.z),qi=Bt.unproject(zr,ct.z);return[An,qi]},_tileCoordsToBounds:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=new xl(Bt[0],Bt[1]);return this.options.noWrap||(me=this._map.wrapLatLngBounds(me)),me},_tileCoordsToKey:function(ct){return ct.x+":"+ct.y+":"+ct.z},_keyToTileCoords:function(ct){var Bt=ct.split(":"),me=new Ma(+Bt[0],+Bt[1]);return me.z=+Bt[2],me},_removeTile:function(ct){var Bt=this._tiles[ct];Bt&&(Tf(Bt.el),delete this._tiles[ct],this.fire("tileunload",{tile:Bt.el,coords:this._keyToTileCoords(ct)}))},_initTile:function(ct){Wu(ct,"leaflet-tile");var Bt=this.getTileSize();ct.style.width=Bt.x+"px",ct.style.height=Bt.y+"px",ct.onselectstart=De,ct.onmousemove=De,El.ielt9&&this.options.opacity<1&&m0(ct,this.options.opacity)},_addTile:function(ct,Bt){var me=this._getTilePos(ct),Qe=this._tileCoordsToKey(ct),zr=this.createTile(this._wrapCoords(ct),_t(this._tileReady,this,ct));this._initTile(zr),this.createTile.length<2&&Fi(_t(this._tileReady,this,ct,null,zr)),ic(zr,me),this._tiles[Qe]={el:zr,coords:ct,current:!0},Bt.appendChild(zr),this.fire("tileloadstart",{tile:zr,coords:ct})},_tileReady:function(ct,Bt,me){Bt&&this.fire("tileerror",{error:Bt,tile:me,coords:ct});var Qe=this._tileCoordsToKey(ct);me=this._tiles[Qe],me&&(me.loaded=+new Date,this._map._fadeAnimated?(m0(me.el,0),Pi(this._fadeFrame),this._fadeFrame=Fi(this._updateOpacity,this)):(me.active=!0,this._pruneTiles()),Bt||(Wu(me.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:me.el,coords:ct})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),El.ielt9||!this._map._fadeAnimated?Fi(this._pruneTiles,this):setTimeout(_t(this._pruneTiles,this),250)))},_getTilePos:function(ct){return ct.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(ct){var Bt=new Ma(this._wrapX?he(ct.x,this._wrapX):ct.x,this._wrapY?he(ct.y,this._wrapY):ct.y);return Bt.z=ct.z,Bt},_pxBoundsToTileRange:function(ct){var Bt=this.getTileSize();return new mo(ct.min.unscaleBy(Bt).floor(),ct.max.unscaleBy(Bt).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var ct in this._tiles)if(!this._tiles[ct].loaded)return!1;return!0}});function G_(ct){return new L1(ct)}var o0=L1.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(ct,Bt){this._url=ct,Bt=Tr(this,Bt),Bt.detectRetina&&El.retina&&Bt.maxZoom>0?(Bt.tileSize=Math.floor(Bt.tileSize/2),Bt.zoomReverse?(Bt.zoomOffset--,Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom+1)):(Bt.zoomOffset++,Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom-1)),Bt.minZoom=Math.max(0,Bt.minZoom)):Bt.zoomReverse?Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom):Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom),typeof Bt.subdomains=="string"&&(Bt.subdomains=Bt.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(ct,Bt){return this._url===ct&&Bt===void 0&&(Bt=!0),this._url=ct,Bt||this.redraw(),this},createTile:function(ct,Bt){var me=document.createElement("img");return zu(me,"load",_t(this._tileOnLoad,this,Bt,me)),zu(me,"error",_t(this._tileOnError,this,Bt,me)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(me.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(me.referrerPolicy=this.options.referrerPolicy),me.alt="",me.src=this.getTileUrl(ct),me},getTileUrl:function(ct){var Bt={r:El.retina?"@2x":"",s:this._getSubdomain(ct),x:ct.x,y:ct.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var me=this._globalTileRange.max.y-ct.y;this.options.tms&&(Bt.y=me),Bt["-y"]=me}return Dt(this._url,K(Bt,this.options))},_tileOnLoad:function(ct,Bt){El.ielt9?setTimeout(_t(ct,this,null,Bt),0):ct(null,Bt)},_tileOnError:function(ct,Bt,me){var Qe=this.options.errorTileUrl;Qe&&Bt.getAttribute("src")!==Qe&&(Bt.src=Qe),ct(me,Bt)},_onTileRemove:function(ct){ct.tile.onload=null},_getZoomForUrl:function(){var ct=this._tileZoom,Bt=this.options.maxZoom,me=this.options.zoomReverse,Qe=this.options.zoomOffset;return me&&(ct=Bt-ct),ct+Qe},_getSubdomain:function(ct){var Bt=Math.abs(ct.x+ct.y)%this.options.subdomains.length;return this.options.subdomains[Bt]},_abortLoading:function(){var ct,Bt;for(ct in this._tiles)if(this._tiles[ct].coords.z!==this._tileZoom&&(Bt=this._tiles[ct].el,Bt.onload=De,Bt.onerror=De,!Bt.complete)){Bt.src=Bn;var me=this._tiles[ct].coords;Tf(Bt),delete this._tiles[ct],this.fire("tileabort",{tile:Bt,coords:me})}},_removeTile:function(ct){var Bt=this._tiles[ct];if(Bt)return Bt.el.setAttribute("src",Bn),L1.prototype._removeTile.call(this,ct)},_tileReady:function(ct,Bt,me){if(!(!this._map||me&&me.getAttribute("src")===Bn))return L1.prototype._tileReady.call(this,ct,Bt,me)}});function Xy(ct,Bt){return new o0(ct,Bt)}var Jy=o0.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(ct,Bt){this._url=ct;var me=K({},this.defaultWmsParams);for(var Qe in Bt)Qe in this.options||(me[Qe]=Bt[Qe]);Bt=Tr(this,Bt);var zr=Bt.detectRetina&&El.retina?2:1,An=this.getTileSize();me.width=An.x*zr,me.height=An.y*zr,this.wmsParams=me},onAdd:function(ct){this._crs=this.options.crs||ct.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var Bt=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[Bt]=this._crs.code,o0.prototype.onAdd.call(this,ct)},getTileUrl:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=this._crs,Qe=Ts(me.project(Bt[0]),me.project(Bt[1])),zr=Qe.min,An=Qe.max,qi=(this._wmsVersion>=1.3&&this._crs===Vy?[zr.y,zr.x,An.y,An.x]:[zr.x,zr.y,An.x,An.y]).join(","),ja=o0.prototype.getTileUrl.call(this,ct);return ja+Vr(this.wmsParams,ja,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+qi},setParams:function(ct,Bt){return K(this.wmsParams,ct),Bt||this.redraw(),this}});function Iw(ct,Bt){return new Jy(ct,Bt)}o0.WMS=Jy,Xy.wms=Iw;var ym=a0.extend({options:{padding:.1},initialize:function(ct){Tr(this,ct),jt(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Wu(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var ct={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(ct.zoomanim=this._onAnimZoom),ct},_onAnimZoom:function(ct){this._updateTransform(ct.center,ct.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(ct,Bt){var me=this._map.getZoomScale(Bt,this._zoom),Qe=this._map.getSize().multiplyBy(.5+this.options.padding),zr=this._map.project(this._center,Bt),An=Qe.multiplyBy(-me).add(zr).subtract(this._map._getNewPixelOrigin(ct,Bt));El.any3d?mu(this._container,An,me):ic(this._container,An)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var ct in this._layers)this._layers[ct]._reset()},_onZoomEnd:function(){for(var ct in this._layers)this._layers[ct]._project()},_updatePaths:function(){for(var ct in this._layers)this._layers[ct]._update()},_update:function(){var ct=this.options.padding,Bt=this._map.getSize(),me=this._map.containerPointToLayerPoint(Bt.multiplyBy(-ct)).round();this._bounds=new mo(me,me.add(Bt.multiplyBy(1+ct*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),zw=ym.extend({options:{tolerance:0},getEvents:function(){var ct=ym.prototype.getEvents.call(this);return ct.viewprereset=this._onViewPreReset,ct},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ym.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var ct=this._container=document.createElement("canvas");zu(ct,"mousemove",this._onMouseMove,this),zu(ct,"click dblclick mousedown mouseup contextmenu",this._onClick,this),zu(ct,"mouseout",this._handleMouseOut,this),ct._leaflet_disable_events=!0,this._ctx=ct.getContext("2d")},_destroyContainer:function(){Pi(this._redrawRequest),delete this._ctx,Tf(this._container),Nh(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var ct;this._redrawBounds=null;for(var Bt in this._layers)ct=this._layers[Bt],ct._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=this._container,me=ct.getSize(),Qe=El.retina?2:1;ic(Bt,ct.min),Bt.width=Qe*me.x,Bt.height=Qe*me.y,Bt.style.width=me.x+"px",Bt.style.height=me.y+"px",El.retina&&this._ctx.scale(2,2),this._ctx.translate(-ct.min.x,-ct.min.y),this.fire("update")}},_reset:function(){ym.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(ct){this._updateDashArray(ct),this._layers[jt(ct)]=ct;var Bt=ct._order={layer:ct,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=Bt),this._drawLast=Bt,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(ct){this._requestRedraw(ct)},_removePath:function(ct){var Bt=ct._order,me=Bt.next,Qe=Bt.prev;me?me.prev=Qe:this._drawLast=Qe,Qe?Qe.next=me:this._drawFirst=me,delete ct._order,delete this._layers[jt(ct)],this._requestRedraw(ct)},_updatePath:function(ct){this._extendRedrawBounds(ct),ct._project(),ct._update(),this._requestRedraw(ct)},_updateStyle:function(ct){this._updateDashArray(ct),this._requestRedraw(ct)},_updateDashArray:function(ct){if(typeof ct.options.dashArray=="string"){var Bt=ct.options.dashArray.split(/[, ]+/),me=[],Qe,zr;for(zr=0;zr')}}catch{}return function(ct){return document.createElement("<"+ct+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),S6={_initContainer:function(){this._container=Ec("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ym.prototype._update.call(this),this.fire("update"))},_initPath:function(ct){var Bt=ct._container=P1("shape");Wu(Bt,"leaflet-vml-shape "+(this.options.className||"")),Bt.coordsize="1 1",ct._path=P1("path"),Bt.appendChild(ct._path),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){var Bt=ct._container;this._container.appendChild(Bt),ct.options.interactive&&ct.addInteractiveTarget(Bt)},_removePath:function(ct){var Bt=ct._container;Tf(Bt),ct.removeInteractiveTarget(Bt),delete this._layers[jt(ct)]},_updateStyle:function(ct){var Bt=ct._stroke,me=ct._fill,Qe=ct.options,zr=ct._container;zr.stroked=!!Qe.stroke,zr.filled=!!Qe.fill,Qe.stroke?(Bt||(Bt=ct._stroke=P1("stroke")),zr.appendChild(Bt),Bt.weight=Qe.weight+"px",Bt.color=Qe.color,Bt.opacity=Qe.opacity,Qe.dashArray?Bt.dashStyle=cn(Qe.dashArray)?Qe.dashArray.join(" "):Qe.dashArray.replace(/( *, *)/g," "):Bt.dashStyle="",Bt.endcap=Qe.lineCap.replace("butt","flat"),Bt.joinstyle=Qe.lineJoin):Bt&&(zr.removeChild(Bt),ct._stroke=null),Qe.fill?(me||(me=ct._fill=P1("fill")),zr.appendChild(me),me.color=Qe.fillColor||Qe.color,me.opacity=Qe.fillOpacity):me&&(zr.removeChild(me),ct._fill=null)},_updateCircle:function(ct){var Bt=ct._point.round(),me=Math.round(ct._radius),Qe=Math.round(ct._radiusY||me);this._setPath(ct,ct._empty()?"M0 0":"AL "+Bt.x+","+Bt.y+" "+me+","+Qe+" 0,"+65535*360)},_setPath:function(ct,Bt){ct._path.v=Bt},_bringToFront:function(ct){hv(ct._container)},_bringToBack:function(ct){kn(ct._container)}},Hm=El.vml?P1:go,Rp=ym.extend({_initContainer:function(){this._container=Hm("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Hm("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Tf(this._container),Nh(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=ct.getSize(),me=this._container;(!this._svgSize||!this._svgSize.equals(Bt))&&(this._svgSize=Bt,me.setAttribute("width",Bt.x),me.setAttribute("height",Bt.y)),ic(me,ct.min),me.setAttribute("viewBox",[ct.min.x,ct.min.y,Bt.x,Bt.y].join(" ")),this.fire("update")}},_initPath:function(ct){var Bt=ct._path=Hm("path");ct.options.className&&Wu(Bt,ct.options.className),ct.options.interactive&&Wu(Bt,"leaflet-interactive"),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(ct._path),ct.addInteractiveTarget(ct._path)},_removePath:function(ct){Tf(ct._path),ct.removeInteractiveTarget(ct._path),delete this._layers[jt(ct)]},_updatePath:function(ct){ct._project(),ct._update()},_updateStyle:function(ct){var Bt=ct._path,me=ct.options;Bt&&(me.stroke?(Bt.setAttribute("stroke",me.color),Bt.setAttribute("stroke-opacity",me.opacity),Bt.setAttribute("stroke-width",me.weight),Bt.setAttribute("stroke-linecap",me.lineCap),Bt.setAttribute("stroke-linejoin",me.lineJoin),me.dashArray?Bt.setAttribute("stroke-dasharray",me.dashArray):Bt.removeAttribute("stroke-dasharray"),me.dashOffset?Bt.setAttribute("stroke-dashoffset",me.dashOffset):Bt.removeAttribute("stroke-dashoffset")):Bt.setAttribute("stroke","none"),me.fill?(Bt.setAttribute("fill",me.fillColor||me.color),Bt.setAttribute("fill-opacity",me.fillOpacity),Bt.setAttribute("fill-rule",me.fillRule||"evenodd")):Bt.setAttribute("fill","none"))},_updatePoly:function(ct,Bt){this._setPath(ct,Mo(ct._parts,Bt))},_updateCircle:function(ct){var Bt=ct._point,me=Math.max(Math.round(ct._radius),1),Qe=Math.max(Math.round(ct._radiusY),1)||me,zr="a"+me+","+Qe+" 0 1,0 ",An=ct._empty()?"M0 0":"M"+(Bt.x-me)+","+Bt.y+zr+me*2+",0 "+zr+-me*2+",0 ";this._setPath(ct,An)},_setPath:function(ct,Bt){ct._path.setAttribute("d",Bt)},_bringToFront:function(ct){hv(ct._path)},_bringToBack:function(ct){kn(ct._path)}});El.vml&&Rp.include(S6);function Ow(ct){return El.svg||El.vml?new Rp(ct):null}Ac.include({getRenderer:function(ct){var Bt=ct.options.renderer||this._getPaneRenderer(ct.options.pane)||this.options.renderer||this._renderer;return Bt||(Bt=this._renderer=this._createRenderer()),this.hasLayer(Bt)||this.addLayer(Bt),Bt},_getPaneRenderer:function(ct){if(ct==="overlayPane"||ct===void 0)return!1;var Bt=this._paneRenderers[ct];return Bt===void 0&&(Bt=this._createRenderer({pane:ct}),this._paneRenderers[ct]=Bt),Bt},_createRenderer:function(ct){return this.options.preferCanvas&&Y_(ct)||Ow(ct)}});var s0=yv.extend({initialize:function(ct,Bt){yv.prototype.initialize.call(this,this._boundsToLatLngs(ct),Bt)},setBounds:function(ct){return this.setLatLngs(this._boundsToLatLngs(ct))},_boundsToLatLngs:function(ct){return ct=ko(ct),[ct.getSouthWest(),ct.getNorthWest(),ct.getNorthEast(),ct.getSouthEast()]}});function z0(ct,Bt){return new s0(ct,Bt)}Rp.create=Hm,Rp.pointsToPath=Mo,pm.geometryToLayer=$y,pm.coordsToLatLng=H_,pm.coordsToLatLngs=Zy,pm.latLngToCoords=W_,pm.latLngsToCoords=Gy,pm.getFeature=mm,pm.asFeature=Yy,Ac.mergeOptions({boxZoom:!0});var xv=K0.extend({initialize:function(ct){this._map=ct,this._container=ct._container,this._pane=ct._panes.overlayPane,this._resetStateTimeout=0,ct.on("unload",this._destroy,this)},addHooks:function(){zu(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Nh(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Tf(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(ct){if(!ct.shiftKey||ct.which!==1&&ct.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),C0(),Kc(),this._startPoint=this._map.mouseEventToContainerPoint(ct),zu(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(ct){this._moved||(this._moved=!0,this._box=Ec("div","leaflet-zoom-box",this._container),Wu(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(ct);var Bt=new mo(this._point,this._startPoint),me=Bt.getSize();ic(this._box,Bt.min),this._box.style.width=me.x+"px",this._box.style.height=me.y+"px"},_finish:function(){this._moved&&(Tf(this._box),Ff(this._container,"leaflet-crosshair")),vg(),Dp(),Nh(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(ct){if(!(ct.which!==1&&ct.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(_t(this._resetState,this),0);var Bt=new xl(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(Bt).fire("boxzoomend",{boxZoomBounds:Bt})}},_onKeyDown:function(ct){ct.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ac.addInitHook("addHandler","boxZoom",xv),Ac.mergeOptions({doubleClickZoom:!0});var x0=K0.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(ct){var Bt=this._map,me=Bt.getZoom(),Qe=Bt.options.zoomDelta,zr=ct.originalEvent.shiftKey?me-Qe:me+Qe;Bt.options.doubleClickZoom==="center"?Bt.setZoom(zr):Bt.setZoomAround(ct.containerPoint,zr)}});Ac.addInitHook("addHandler","doubleClickZoom",x0),Ac.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var O0=K0.extend({addHooks:function(){if(!this._draggable){var ct=this._map;this._draggable=new jm(ct._mapPane,ct._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),ct.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),ct.on("zoomend",this._onZoomEnd,this),ct.whenReady(this._onZoomEnd,this))}Wu(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ff(this._map._container,"leaflet-grab"),Ff(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var ct=this._map;if(ct._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var Bt=ko(this._map.options.maxBounds);this._offsetLimit=Ts(this._map.latLngToContainerPoint(Bt.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(Bt.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;ct.fire("movestart").fire("dragstart"),ct.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(ct){if(this._map.options.inertia){var Bt=this._lastTime=+new Date,me=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(me),this._times.push(Bt),this._prunePositions(Bt)}this._map.fire("move",ct).fire("drag",ct)},_prunePositions:function(ct){for(;this._positions.length>1&&ct-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var ct=this._map.getSize().divideBy(2),Bt=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=Bt.subtract(ct).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(ct,Bt){return ct-(ct-Bt)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var ct=this._draggable._newPos.subtract(this._draggable._startPos),Bt=this._offsetLimit;ct.xBt.max.x&&(ct.x=this._viscousLimit(ct.x,Bt.max.x)),ct.y>Bt.max.y&&(ct.y=this._viscousLimit(ct.y,Bt.max.y)),this._draggable._newPos=this._draggable._startPos.add(ct)}},_onPreDragWrap:function(){var ct=this._worldWidth,Bt=Math.round(ct/2),me=this._initialWorldOffset,Qe=this._draggable._newPos.x,zr=(Qe-Bt+me)%ct+Bt-me,An=(Qe+Bt+me)%ct-Bt-me,qi=Math.abs(zr+me)0?An:-An))-Bt;this._delta=0,this._startTime=null,qi&&(ct.options.scrollWheelZoom==="center"?ct.setZoom(Bt+qi):ct.setZoomAround(this._lastMousePos,Bt+qi))}});Ac.addInitHook("addHandler","scrollWheelZoom",Cg);var Fw=600;Ac.mergeOptions({tapHold:El.touchNative&&El.safari&&El.mobile,tapTolerance:15});var Rw=K0.extend({addHooks:function(){zu(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Nh(this._map._container,"touchstart",this._onDown,this)},_onDown:function(ct){if(clearTimeout(this._holdTimeout),ct.touches.length===1){var Bt=ct.touches[0];this._startPos=this._newPos=new Ma(Bt.clientX,Bt.clientY),this._holdTimeout=setTimeout(_t(function(){this._cancel(),this._isTapValid()&&(zu(document,"touchend",mc),zu(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",Bt))},this),Fw),zu(document,"touchend touchcancel contextmenu",this._cancel,this),zu(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function ct(){Nh(document,"touchend",mc),Nh(document,"touchend touchcancel",ct)},_cancel:function(){clearTimeout(this._holdTimeout),Nh(document,"touchend touchcancel contextmenu",this._cancel,this),Nh(document,"touchmove",this._onMove,this)},_onMove:function(ct){var Bt=ct.touches[0];this._newPos=new Ma(Bt.clientX,Bt.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(ct,Bt){var me=new MouseEvent(ct,{bubbles:!0,cancelable:!0,view:window,screenX:Bt.screenX,screenY:Bt.screenY,clientX:Bt.clientX,clientY:Bt.clientY});me._simulated=!0,Bt.target.dispatchEvent(me)}});Ac.addInitHook("addHandler","tapHold",Rw),Ac.mergeOptions({touchZoom:El.touch,bounceAtZoomLimits:!0});var D0=K0.extend({addHooks:function(){Wu(this._map._container,"leaflet-touch-zoom"),zu(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ff(this._map._container,"leaflet-touch-zoom"),Nh(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(ct){var Bt=this._map;if(!(!ct.touches||ct.touches.length!==2||Bt._animatingZoom||this._zooming)){var me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]);this._centerPoint=Bt.getSize()._divideBy(2),this._startLatLng=Bt.containerPointToLatLng(this._centerPoint),Bt.options.touchZoom!=="center"&&(this._pinchStartLatLng=Bt.containerPointToLatLng(me.add(Qe)._divideBy(2))),this._startDist=me.distanceTo(Qe),this._startZoom=Bt.getZoom(),this._moved=!1,this._zooming=!0,Bt._stop(),zu(document,"touchmove",this._onTouchMove,this),zu(document,"touchend touchcancel",this._onTouchEnd,this),mc(ct)}},_onTouchMove:function(ct){if(!(!ct.touches||ct.touches.length!==2||!this._zooming)){var Bt=this._map,me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]),zr=me.distanceTo(Qe)/this._startDist;if(this._zoom=Bt.getScaleZoom(zr,this._startZoom),!Bt.options.bounceAtZoomLimits&&(this._zoomBt.getMaxZoom()&&zr>1)&&(this._zoom=Bt._limitZoom(this._zoom)),Bt.options.touchZoom==="center"){if(this._center=this._startLatLng,zr===1)return}else{var An=me._add(Qe)._divideBy(2)._subtract(this._centerPoint);if(zr===1&&An.x===0&&An.y===0)return;this._center=Bt.unproject(Bt.project(this._pinchStartLatLng,this._zoom).subtract(An),this._zoom)}this._moved||(Bt._moveStart(!0,!1),this._moved=!0),Pi(this._animRequest);var qi=_t(Bt._move,Bt,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Fi(qi,this,!0),mc(ct)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Pi(this._animRequest),Nh(document,"touchmove",this._onTouchMove,this),Nh(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Ac.addInitHook("addHandler","touchZoom",D0),Ac.BoxZoom=xv,Ac.DoubleClickZoom=x0,Ac.Drag=O0,Ac.Keyboard=Dw,Ac.ScrollWheelZoom=Cg,Ac.TapHold=Rw,Ac.TouchZoom=D0,E.Bounds=mo,E.Browser=El,E.CRS=da,E.Canvas=zw,E.Circle=qy,E.CircleMarker=Wy,E.Class=Yi,E.Control=lp,E.DivIcon=Pw,E.DivOverlay=X0,E.DomEvent=Fp,E.DomUtil=kc,E.Draggable=jm,E.Evented=si,E.FeatureGroup=wp,E.GeoJSON=pm,E.GridLayer=L1,E.Handler=K0,E.Icon=Um,E.ImageOverlay=gm,E.LatLng=ro,E.LatLngBounds=xl,E.Layer=a0,E.LayerGroup=Sg,E.LineUtil=tf,E.Map=Ac,E.Marker=E1,E.Mixin=up,E.Path=Vm,E.Point=Ma,E.PolyUtil=_6,E.Polygon=yv,E.Polyline=y0,E.Popup=Eg,E.PosAnimation=S1,E.Projection=N_,E.Rectangle=s0,E.Renderer=ym,E.SVG=Rp,E.SVGOverlay=Z_,E.TileLayer=o0,E.Tooltip=C1,E.Transformation=Ho,E.Util=bi,E.VideoOverlay=I0,E.bind=_t,E.bounds=Ts,E.canvas=Y_,E.circle=vv,E.circleMarker=Sw,E.control=i0,E.divIcon=M6,E.extend=K,E.featureGroup=Mw,E.geoJSON=$_,E.geoJson=Ky,E.gridLayer=G_,E.icon=U_,E.imageOverlay=vm,E.latLng=Ia,E.latLngBounds=ko,E.layerGroup=Hy,E.map=Vs,E.marker=k6,E.point=ho,E.polygon=T6,E.polyline=Ew,E.popup=vf,E.rectangle=z0,E.setOptions=Tr,E.stamp=jt,E.svg=Ow,E.svgOverlay=A6,E.tileLayer=Xy,E.tooltip=Lw,E.transformation=vi,E.version=B,E.videoOverlay=ef;var F0=window.L;E.noConflict=function(){return window.L=F0,this},window.L=E})}(g2,g2.exports)),g2.exports}var Tot=kot();const Mm=KO(Tot),tP=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],R8=1,a2=8;class dM{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[E,B]=new Uint8Array(s,0,2);if(E!==219)throw new Error("Data does not appear to be in a KDBush format.");const K=B>>4;if(K!==R8)throw new Error(`Got v${K} data when expected v${R8}.`);const pt=tP[B&15];if(!pt)throw new Error("Unrecognized array type.");const[_t]=new Uint16Array(s,2,1),[Ot]=new Uint32Array(s,4,1);return new dM(Ot,_t,pt,s)}constructor(s,E=64,B=Float64Array,K){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+E,2),65535),this.ArrayType=B,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;const pt=tP.indexOf(this.ArrayType),_t=s*2*this.ArrayType.BYTES_PER_ELEMENT,Ot=s*this.IndexArrayType.BYTES_PER_ELEMENT,jt=(8-Ot%8)%8;if(pt<0)throw new Error(`Unexpected typed array class: ${B}.`);K&&K instanceof ArrayBuffer?(this.data=K,this.ids=new this.IndexArrayType(this.data,a2,s),this.coords=new this.ArrayType(this.data,a2+Ot+jt,s*2),this._pos=s*2,this._finished=!0):(this.data=new ArrayBuffer(a2+_t+Ot+jt),this.ids=new this.IndexArrayType(this.data,a2,s),this.coords=new this.ArrayType(this.data,a2+Ot+jt,s*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(R8<<4)+pt]),new Uint16Array(this.data,2,1)[0]=E,new Uint32Array(this.data,4,1)[0]=s)}add(s,E){const B=this._pos>>1;return this.ids[B]=B,this.coords[this._pos++]=s,this.coords[this._pos++]=E,B}finish(){const s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return AA(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,E,B,K){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:pt,coords:_t,nodeSize:Ot}=this,jt=[0,pt.length-1,0],te=[];for(;jt.length;){const he=jt.pop()||0,De=jt.pop()||0,er=jt.pop()||0;if(De-er<=Ot){for(let Vr=er;Vr<=De;Vr++){const mn=_t[2*Vr],Dt=_t[2*Vr+1];mn>=s&&mn<=B&&Dt>=E&&Dt<=K&&te.push(pt[Vr])}continue}const pr=er+De>>1,Mr=_t[2*pr],Tr=_t[2*pr+1];Mr>=s&&Mr<=B&&Tr>=E&&Tr<=K&&te.push(pt[pr]),(he===0?s<=Mr:E<=Tr)&&(jt.push(er),jt.push(pr-1),jt.push(1-he)),(he===0?B>=Mr:K>=Tr)&&(jt.push(pr+1),jt.push(De),jt.push(1-he))}return te}within(s,E,B){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:K,coords:pt,nodeSize:_t}=this,Ot=[0,K.length-1,0],jt=[],te=B*B;for(;Ot.length;){const he=Ot.pop()||0,De=Ot.pop()||0,er=Ot.pop()||0;if(De-er<=_t){for(let Vr=er;Vr<=De;Vr++)eP(pt[2*Vr],pt[2*Vr+1],s,E)<=te&&jt.push(K[Vr]);continue}const pr=er+De>>1,Mr=pt[2*pr],Tr=pt[2*pr+1];eP(Mr,Tr,s,E)<=te&&jt.push(K[pr]),(he===0?s-B<=Mr:E-B<=Tr)&&(Ot.push(er),Ot.push(pr-1),Ot.push(1-he)),(he===0?s+B>=Mr:E+B>=Tr)&&(Ot.push(pr+1),Ot.push(De),Ot.push(1-he))}return jt}}function AA(d,s,E,B,K,pt){if(K-B<=E)return;const _t=B+K>>1;XO(d,s,_t,B,K,pt),AA(d,s,E,B,_t-1,1-pt),AA(d,s,E,_t+1,K,1-pt)}function XO(d,s,E,B,K,pt){for(;K>B;){if(K-B>600){const te=K-B+1,he=E-B+1,De=Math.log(te),er=.5*Math.exp(2*De/3),pr=.5*Math.sqrt(De*er*(te-er)/te)*(he-te/2<0?-1:1),Mr=Math.max(B,Math.floor(E-he*er/te+pr)),Tr=Math.min(K,Math.floor(E+(te-he)*er/te+pr));XO(d,s,E,Mr,Tr,pt)}const _t=s[2*E+pt];let Ot=B,jt=K;for(o2(d,s,B,E),s[2*K+pt]>_t&&o2(d,s,B,K);Ot_t;)jt--}s[2*B+pt]===_t?o2(d,s,B,jt):(jt++,o2(d,s,jt,K)),jt<=E&&(B=jt+1),E<=jt&&(K=jt-1)}}function o2(d,s,E,B){B8(d,E,B),B8(s,2*E,2*B),B8(s,2*E+1,2*B+1)}function B8(d,s,E){const B=d[s];d[s]=d[E],d[E]=B}function eP(d,s,E,B){const K=d-E,pt=s-B;return K*K+pt*pt}const Aot={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:d=>d},rP=Math.fround||(d=>s=>(d[0]=+s,d[0]))(new Float32Array(1)),uy=2,l1=3,N8=4,n1=5,JO=6;class Mot{constructor(s){this.options=Object.assign(Object.create(Aot),s),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(s){const{log:E,minZoom:B,maxZoom:K}=this.options;E&&console.time("total time");const pt=`prepare ${s.length} points`;E&&console.time(pt),this.points=s;const _t=[];for(let jt=0;jt=B;jt--){const te=+Date.now();Ot=this.trees[jt]=this._createTree(this._cluster(Ot,jt)),E&&console.log("z%d: %d clusters in %dms",jt,Ot.numItems,+Date.now()-te)}return E&&console.timeEnd("total time"),this}getClusters(s,E){let B=((s[0]+180)%360+360)%360-180;const K=Math.max(-90,Math.min(90,s[1]));let pt=s[2]===180?180:((s[2]+180)%360+360)%360-180;const _t=Math.max(-90,Math.min(90,s[3]));if(s[2]-s[0]>=360)B=-180,pt=180;else if(B>pt){const De=this.getClusters([B,K,180,_t],E),er=this.getClusters([-180,K,pt,_t],E);return De.concat(er)}const Ot=this.trees[this._limitZoom(E)],jt=Ot.range(I5(B),z5(_t),I5(pt),z5(K)),te=Ot.data,he=[];for(const De of jt){const er=this.stride*De;he.push(te[er+n1]>1?nP(te,er,this.clusterProps):this.points[te[er+l1]])}return he}getChildren(s){const E=this._getOriginId(s),B=this._getOriginZoom(s),K="No cluster with the specified id.",pt=this.trees[B];if(!pt)throw new Error(K);const _t=pt.data;if(E*this.stride>=_t.length)throw new Error(K);const Ot=this.options.radius/(this.options.extent*Math.pow(2,B-1)),jt=_t[E*this.stride],te=_t[E*this.stride+1],he=pt.within(jt,te,Ot),De=[];for(const er of he){const pr=er*this.stride;_t[pr+N8]===s&&De.push(_t[pr+n1]>1?nP(_t,pr,this.clusterProps):this.points[_t[pr+l1]])}if(De.length===0)throw new Error(K);return De}getLeaves(s,E,B){E=E||10,B=B||0;const K=[];return this._appendLeaves(K,s,E,B,0),K}getTile(s,E,B){const K=this.trees[this._limitZoom(s)],pt=Math.pow(2,s),{extent:_t,radius:Ot}=this.options,jt=Ot/_t,te=(B-jt)/pt,he=(B+1+jt)/pt,De={features:[]};return this._addTileFeatures(K.range((E-jt)/pt,te,(E+1+jt)/pt,he),K.data,E,B,pt,De),E===0&&this._addTileFeatures(K.range(1-jt/pt,te,1,he),K.data,pt,B,pt,De),E===pt-1&&this._addTileFeatures(K.range(0,te,jt/pt,he),K.data,-1,B,pt,De),De.features.length?De:null}getClusterExpansionZoom(s){let E=this._getOriginZoom(s)-1;for(;E<=this.options.maxZoom;){const B=this.getChildren(s);if(E++,B.length!==1)break;s=B[0].properties.cluster_id}return E}_appendLeaves(s,E,B,K,pt){const _t=this.getChildren(E);for(const Ot of _t){const jt=Ot.properties;if(jt&&jt.cluster?pt+jt.point_count<=K?pt+=jt.point_count:pt=this._appendLeaves(s,jt.cluster_id,B,K,pt):pt1;let he,De,er;if(te)he=QO(E,jt,this.clusterProps),De=E[jt],er=E[jt+1];else{const Tr=this.points[E[jt+l1]];he=Tr.properties;const[Vr,mn]=Tr.geometry.coordinates;De=I5(Vr),er=z5(mn)}const pr={type:1,geometry:[[Math.round(this.options.extent*(De*pt-B)),Math.round(this.options.extent*(er*pt-K))]],tags:he};let Mr;te||this.options.generateId?Mr=E[jt+l1]:Mr=this.points[E[jt+l1]].id,Mr!==void 0&&(pr.id=Mr),_t.features.push(pr)}}_limitZoom(s){return Math.max(this.options.minZoom,Math.min(Math.floor(+s),this.options.maxZoom+1))}_cluster(s,E){const{radius:B,extent:K,reduce:pt,minPoints:_t}=this.options,Ot=B/(K*Math.pow(2,E)),jt=s.data,te=[],he=this.stride;for(let De=0;DeE&&(Vr+=jt[Dt+n1])}if(Vr>Tr&&Vr>=_t){let mn=er*Tr,Dt=pr*Tr,cn,Jn=-1;const Bn=((De/he|0)<<5)+(E+1)+this.points.length;for(const ni of Mr){const Wi=ni*he;if(jt[Wi+uy]<=E)continue;jt[Wi+uy]=E;const Un=jt[Wi+n1];mn+=jt[Wi]*Un,Dt+=jt[Wi+1]*Un,jt[Wi+N8]=Bn,pt&&(cn||(cn=this._map(jt,De,!0),Jn=this.clusterProps.length,this.clusterProps.push(cn)),pt(cn,this._map(jt,Wi)))}jt[De+N8]=Bn,te.push(mn/Vr,Dt/Vr,1/0,Bn,-1,Vr),pt&&te.push(Jn)}else{for(let mn=0;mn1)for(const mn of Mr){const Dt=mn*he;if(!(jt[Dt+uy]<=E)){jt[Dt+uy]=E;for(let cn=0;cn>5}_getOriginZoom(s){return(s-this.points.length)%32}_map(s,E,B){if(s[E+n1]>1){const _t=this.clusterProps[s[E+JO]];return B?Object.assign({},_t):_t}const K=this.points[s[E+l1]].properties,pt=this.options.map(K);return B&&pt===K?Object.assign({},pt):pt}}function nP(d,s,E){return{type:"Feature",id:d[s+l1],properties:QO(d,s,E),geometry:{type:"Point",coordinates:[Sot(d[s]),Eot(d[s+1])]}}}function QO(d,s,E){const B=d[s+n1],K=B>=1e4?`${Math.round(B/1e3)}k`:B>=1e3?`${Math.round(B/100)/10}k`:B,pt=d[s+JO],_t=pt===-1?{}:Object.assign({},E[pt]);return Object.assign(_t,{cluster:!0,cluster_id:d[s+l1],point_count:B,point_count_abbreviated:K})}function I5(d){return d/360+.5}function z5(d){const s=Math.sin(d*Math.PI/180),E=.5-.25*Math.log((1+s)/(1-s))/Math.PI;return E<0?0:E>1?1:E}function Sot(d){return(d-.5)*360}function Eot(d){const s=(180-d*360)*Math.PI/180;return 360*Math.atan(Math.exp(s))/Math.PI-90}const Cot={class:"map-container"},Lot={key:0,class:"flex items-center justify-center h-96 bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px]"},Pot={key:2,class:"map-legend"},Iot={class:"legend-footer"},zot={key:3,class:"map-attribution"},Oot=Dc({__name:"NetworkMap",props:{adverts:{},baseLatitude:{default:null},baseLongitude:{default:null}},setup(d,{expose:s}){typeof window<"u"&&!window.chrome&&(window.chrome={runtime:{}});const E=d,B=Ga();let K=null;const pt=Ga(new Map);let _t=null;const Ot=Ga(new Map),jt=Ga([]),te=Ga(!0),he=Ga(60),De=Ga(14),er=$o(()=>E.baseLatitude!==null&&E.baseLongitude!==null&&typeof E.baseLatitude=="number"&&typeof E.baseLongitude=="number"&&E.baseLatitude!==0&&E.baseLongitude!==0&&Math.abs(E.baseLatitude)<=90&&Math.abs(E.baseLongitude)<=180),pr=Un=>new Date(Un*1e3).toLocaleString(),Mr=Un=>Un?`${Un} dBm`:"N/A",Tr=Un=>Un?`${Un} dB`:"N/A",Vr=Un=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Un||0]||"Unknown",mn=(Un,qr,Di,Fi)=>{const bi=(Di-Un)*Math.PI/180,Yi=(Fi-qr)*Math.PI/180,Ca=Math.sin(bi/2)*Math.sin(bi/2)+Math.cos(Un*Math.PI/180)*Math.cos(Di*Math.PI/180)*Math.sin(Yi/2)*Math.sin(Yi/2);return 6371*(2*Math.atan2(Math.sqrt(Ca),Math.sqrt(1-Ca)))},Dt=()=>{K&&(jt.value.forEach(Un=>{K&&Un.remove()}),jt.value.length=0,K.remove(),K=null),pt.value.clear(),Ot.value.clear(),_t=null},cn=Un=>{const qr=new Map;return Un.filter(Di=>Di.latitude!==null&&Di.longitude!==null).map(Di=>{let Fi=Di.latitude,Pi=Di.longitude;const bi=`${Fi.toFixed(6)}_${Pi.toFixed(6)}`,Yi=qr.get(bi)||0;if(qr.set(bi,Yi+1),Yi>0){const Ni=Yi*60*(Math.PI/180);Fi+=Math.sin(Ni)*.001*(Yi*.5),Pi+=Math.cos(Ni)*.001*(Yi*.5)}return{type:"Feature",properties:{advert:{...Di,jittered_latitude:Fi,jittered_longitude:Pi}},geometry:{type:"Point",coordinates:[Pi,Fi]}}})},Jn=Un=>{_t=new Mot({radius:he.value,maxZoom:De.value,minPoints:2}),_t.load(Un)},Bn=async()=>{if(!B.value||!er.value){console.warn("Cannot initialize map: missing container or coordinates");return}Dt(),await om();const Un=E.baseLatitude,qr=E.baseLongitude;try{K=Mm.map(B.value,{center:[Un,qr],zoom:10,zoomControl:!0,scrollWheelZoom:!0,doubleClickZoom:!0,boxZoom:!0,keyboard:!0,attributionControl:!1});try{const si=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:'© OpenStreetMap contributors © CARTO',errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}),Ma=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:"",errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="});si.addTo(K),Ma.addTo(K)}catch(si){console.warn("Error loading tiles:",si)}const Di=(si,Ma=!1)=>{const zo=Ma?16:12;return Mm.divIcon({className:"custom-div-icon",html:`
`,iconSize:[zo+4,zo+4],iconAnchor:[(zo+4)/2,(zo+4)/2]})},Fi=si=>{const Ma=si<10?30:si<100?40:50;return Mm.divIcon({className:"custom-cluster-icon",html:` + */var Hot=v2.exports,eP;function Wot(){return eP||(eP=1,function(d,s){(function(E,R){R(s)})(Hot,function(E){var R="1.9.4";function Y(ct){var Rt,me,tr,zr;for(me=1,tr=arguments.length;me"u"||!L||!L.Mixin)){ct=cn(ct)?ct:[ct];for(var Rt=0;Rt0?Math.floor(ct):Math.ceil(ct)};la.prototype={clone:function(){return new la(this.x,this.y)},add:function(ct){return this.clone()._add(no(ct))},_add:function(ct){return this.x+=ct.x,this.y+=ct.y,this},subtract:function(ct){return this.clone()._subtract(no(ct))},_subtract:function(ct){return this.x-=ct.x,this.y-=ct.y,this},divideBy:function(ct){return this.clone()._divideBy(ct)},_divideBy:function(ct){return this.x/=ct,this.y/=ct,this},multiplyBy:function(ct){return this.clone()._multiplyBy(ct)},_multiplyBy:function(ct){return this.x*=ct,this.y*=ct,this},scaleBy:function(ct){return new la(this.x*ct.x,this.y*ct.y)},unscaleBy:function(ct){return new la(this.x/ct.x,this.y/ct.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Eo(this.x),this.y=Eo(this.y),this},distanceTo:function(ct){ct=no(ct);var Rt=ct.x-this.x,me=ct.y-this.y;return Math.sqrt(Rt*Rt+me*me)},equals:function(ct){return ct=no(ct),ct.x===this.x&&ct.y===this.y},contains:function(ct){return ct=no(ct),Math.abs(ct.x)<=Math.abs(this.x)&&Math.abs(ct.y)<=Math.abs(this.y)},toString:function(){return"Point("+Je(this.x)+", "+Je(this.y)+")"}};function no(ct,Rt,me){return ct instanceof la?ct:cn(ct)?new la(ct[0],ct[1]):ct==null?ct:typeof ct=="object"&&"x"in ct&&"y"in ct?new la(ct.x,ct.y):new la(ct,Rt,me)}function mo(ct,Rt){if(ct)for(var me=Rt?[ct,Rt]:ct,tr=0,zr=me.length;tr=this.min.x&&me.x<=this.max.x&&Rt.y>=this.min.y&&me.y<=this.max.y},intersects:function(ct){ct=Ts(ct);var Rt=this.min,me=this.max,tr=ct.min,zr=ct.max,An=zr.x>=Rt.x&&tr.x<=me.x,Zi=zr.y>=Rt.y&&tr.y<=me.y;return An&&Zi},overlaps:function(ct){ct=Ts(ct);var Rt=this.min,me=this.max,tr=ct.min,zr=ct.max,An=zr.x>Rt.x&&tr.xRt.y&&tr.y=Rt.lat&&zr.lat<=me.lat&&tr.lng>=Rt.lng&&zr.lng<=me.lng},intersects:function(ct){ct=ko(ct);var Rt=this._southWest,me=this._northEast,tr=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>=Rt.lat&&tr.lat<=me.lat,Zi=zr.lng>=Rt.lng&&tr.lng<=me.lng;return An&&Zi},overlaps:function(ct){ct=ko(ct);var Rt=this._southWest,me=this._northEast,tr=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>Rt.lat&&tr.latRt.lng&&tr.lng1,u6=function(){var ct=!1;try{var Rt=Object.defineProperty({},"passive",{get:function(){ct=!0}});window.addEventListener("testPassiveEventSupport",Ie,Rt),window.removeEventListener("testPassiveEventSupport",Ie,Rt)}catch{}return ct}(),c6=function(){return!!document.createElement("canvas").getContext}(),M_=!!(document.createElementNS&&go("svg").createSVGRect),h6=!!M_&&function(){var ct=document.createElement("div");return ct.innerHTML="",(ct.firstChild&&ct.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),f6=!M_&&function(){try{var ct=document.createElement("div");ct.innerHTML='';var Rt=ct.firstChild;return Rt.style.behavior="url(#default#VML)",Rt&&typeof Rt.adj=="object"}catch{return!1}}(),gw=navigator.platform.indexOf("Mac")===0,S_=navigator.platform.indexOf("Linux")===0;function r0(ct){return navigator.userAgent.toLowerCase().indexOf(ct)>=0}var Cl={ie:ms,ielt9:bs,edge:as,webkit:Ko,android:Dl,android23:Ns,androidStock:vu,opera:tc,chrome:dh,gecko:Fc,safari:sp,phantom:Kd,opera12:e0,win:d0,ie3d:Fm,webkit3d:hv,gecko3d:lp,any3d:p0,mobile:Bm,mobileWebkit:Ry,mobileWebkit3d:i6,msPointer:dw,pointer:pw,touch:a6,touchNative:mw,mobileOpera:o6,mobileGecko:s6,retina:l6,passiveEvents:u6,canvas:c6,svg:M_,vml:f6,inlineSvg:h6,mac:gw,linux:S_},Yc=Cl.msPointer?"MSPointerDown":"pointerdown",kd=Cl.msPointer?"MSPointerMove":"pointermove",E_=Cl.msPointer?"MSPointerUp":"pointerup",Zu=Cl.msPointer?"MSPointerCancel":"pointercancel",w1={touchstart:Yc,touchmove:kd,touchend:E_,touchcancel:Zu},vw={touchstart:m6,touchmove:Y0,touchend:Y0,touchcancel:Y0},fv={},Ny=!1;function k1(ct,Rt,me){return Rt==="touchstart"&&C_(),vw[Rt]?(me=vw[Rt].bind(this,me),ct.addEventListener(w1[Rt],me,!1),me):(console.warn("wrong event specified:",Rt),Ie)}function d6(ct,Rt,me){if(!w1[Rt]){console.warn("wrong event specified:",Rt);return}ct.removeEventListener(w1[Rt],me,!1)}function Qo(ct){fv[ct.pointerId]=ct}function p6(ct){fv[ct.pointerId]&&(fv[ct.pointerId]=ct)}function T1(ct){delete fv[ct.pointerId]}function C_(){Ny||(document.addEventListener(Yc,Qo,!0),document.addEventListener(kd,p6,!0),document.addEventListener(E_,T1,!0),document.addEventListener(Zu,T1,!0),Ny=!0)}function Y0(ct,Rt){if(Rt.pointerType!==(Rt.MSPOINTER_TYPE_MOUSE||"mouse")){Rt.touches=[];for(var me in fv)Rt.touches.push(fv[me]);Rt.changedTouches=[Rt],ct(Rt)}}function m6(ct,Rt){Rt.MSPOINTER_TYPE_TOUCH&&Rt.pointerType===Rt.MSPOINTER_TYPE_TOUCH&&mc(Rt),Y0(ct,Rt)}function g6(ct){var Rt={},me,tr;for(tr in ct)me=ct[tr],Rt[tr]=me&&me.bind?me.bind(ct):me;return ct=Rt,Rt.type="dblclick",Rt.detail=2,Rt.isTrusted=!1,Rt._simulated=!0,Rt}var v6=200;function y6(ct,Rt){ct.addEventListener("dblclick",Rt);var me=0,tr;function zr(An){if(An.detail!==1){tr=An.detail;return}if(!(An.pointerType==="mouse"||An.sourceCapabilities&&!An.sourceCapabilities.firesTouchEvents)){var Zi=bw(An);if(!(Zi.some(function(Ka){return Ka instanceof HTMLLabelElement&&Ka.attributes.for})&&!Zi.some(function(Ka){return Ka instanceof HTMLInputElement||Ka instanceof HTMLSelectElement}))){var ja=Date.now();ja-me<=v6?(tr++,tr===2&&Rt(g6(An))):tr=1,me=ja}}}return ct.addEventListener("click",zr),{dblclick:Rt,simDblclick:zr}}function L_(ct,Rt){ct.removeEventListener("dblclick",Rt.dblclick),ct.removeEventListener("click",Rt.simDblclick)}var P_=jm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),A1=jm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),yw=A1==="webkitTransition"||A1==="OTransition"?A1+"End":"transitionend";function xw(ct){return typeof ct=="string"?document.getElementById(ct):ct}function M1(ct,Rt){var me=ct.style[Rt]||ct.currentStyle&&ct.currentStyle[Rt];if((!me||me==="auto")&&document.defaultView){var tr=document.defaultView.getComputedStyle(ct,null);me=tr?tr[Rt]:null}return me==="auto"?null:me}function Cc(ct,Rt,me){var tr=document.createElement(ct);return tr.className=Rt||"",me&&me.appendChild(tr),tr}function Tf(ct){var Rt=ct.parentNode;Rt&&Rt.removeChild(ct)}function jy(ct){for(;ct.firstChild;)ct.removeChild(ct.firstChild)}function dv(ct){var Rt=ct.parentNode;Rt&&Rt.lastChild!==ct&&Rt.appendChild(ct)}function kn(ct){var Rt=ct.parentNode;Rt&&Rt.firstChild!==ct&&Rt.insertBefore(ct,Rt.firstChild)}function I_(ct,Rt){if(ct.classList!==void 0)return ct.classList.contains(Rt);var me=Nm(ct);return me.length>0&&new RegExp("(^|\\s)"+Rt+"(\\s|$)").test(me)}function Wu(ct,Rt){if(ct.classList!==void 0)for(var me=Ar(Rt),tr=0,zr=me.length;tr0?2*window.devicePixelRatio:1;function Tc(ct){return Cl.edge?ct.wheelDeltaY/2:ct.deltaY&&ct.deltaMode===0?-ct.deltaY/Xc:ct.deltaY&&ct.deltaMode===1?-ct.deltaY*20:ct.deltaY&&ct.deltaMode===2?-ct.deltaY*60:ct.deltaX||ct.deltaZ?0:ct.wheelDelta?(ct.wheelDeltaY||ct.wheelDelta)/2:ct.detail&&Math.abs(ct.detail)<32765?-ct.detail*20:ct.detail?ct.detail/-32765*60:0}function wg(ct,Rt){var me=Rt.relatedTarget;if(!me)return!0;try{for(;me&&me!==ct;)me=me.parentNode}catch{return!1}return me!==ct}var Fp={__proto__:null,on:Ou,off:jh,stopPropagation:n0,disableScrollPropagation:dm,disableClickPropagation:pv,preventDefault:mc,stop:bg,getPropagationPath:bw,getMousePosition:Xd,getWheelDelta:Tc,isExternalTarget:wg,addListener:Ou,removeListener:jh},C1=Qn.extend({run:function(ct,Rt,me,tr){this.stop(),this._el=ct,this._inProgress=!0,this._duration=me||.25,this._easeOutPower=1/Math.max(tr||.5,.2),this._startPos=Bc(ct),this._offset=Rt.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Ri(this._animate,this),this._step()},_step:function(ct){var Rt=+new Date-this._startTime,me=this._duration*1e3;Rtthis.options.maxZoom)?this.setZoom(ct):this},panInsideBounds:function(ct,Rt){this._enforcingBounds=!0;var me=this.getCenter(),tr=this._limitCenter(me,this._zoom,ko(ct));return me.equals(tr)||this.panTo(tr,Rt),this._enforcingBounds=!1,this},panInside:function(ct,Rt){Rt=Rt||{};var me=no(Rt.paddingTopLeft||Rt.padding||[0,0]),tr=no(Rt.paddingBottomRight||Rt.padding||[0,0]),zr=this.project(this.getCenter()),An=this.project(ct),Zi=this.getPixelBounds(),ja=Ts([Zi.min.add(me),Zi.max.subtract(tr)]),Ka=ja.getSize();if(!ja.contains(An)){this._enforcingBounds=!0;var xo=An.subtract(ja.getCenter()),Ws=ja.extend(An).getSize().subtract(Ka);zr.x+=xo.x<0?-Ws.x:Ws.x,zr.y+=xo.y<0?-Ws.y:Ws.y,this.panTo(this.unproject(zr),Rt),this._enforcingBounds=!1}return this},invalidateSize:function(ct){if(!this._loaded)return this;ct=Y({animate:!1,pan:!0},ct===!0?{animate:!0}:ct);var Rt=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var me=this.getSize(),tr=Rt.divideBy(2).round(),zr=me.divideBy(2).round(),An=tr.subtract(zr);return!An.x&&!An.y?this:(ct.animate&&ct.pan?this.panBy(An):(ct.pan&&this._rawPanBy(An),this.fire("move"),ct.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(_t(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:Rt,newSize:me}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(ct){if(ct=this._locateOptions=Y({timeout:1e4,watch:!1},ct),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var Rt=_t(this._handleGeolocationResponse,this),me=_t(this._handleGeolocationError,this);return ct.watch?this._locationWatchId=navigator.geolocation.watchPosition(Rt,me,ct):navigator.geolocation.getCurrentPosition(Rt,me,ct),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(ct){if(this._container._leaflet_id){var Rt=ct.code,me=ct.message||(Rt===1?"permission denied":Rt===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:Rt,message:"Geolocation error: "+me+"."})}},_handleGeolocationResponse:function(ct){if(this._container._leaflet_id){var Rt=ct.coords.latitude,me=ct.coords.longitude,tr=new ro(Rt,me),zr=tr.toBounds(ct.coords.accuracy*2),An=this._locateOptions;if(An.setView){var Zi=this.getBoundsZoom(zr);this.setView(tr,An.maxZoom?Math.min(Zi,An.maxZoom):Zi)}var ja={latlng:tr,bounds:zr,timestamp:ct.timestamp};for(var Ka in ct.coords)typeof ct.coords[Ka]=="number"&&(ja[Ka]=ct.coords[Ka]);this.fire("locationfound",ja)}},addHandler:function(ct,Rt){if(!Rt)return this;var me=this[ct]=new Rt(this);return this._handlers.push(me),this.options[ct]&&me.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Tf(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Li(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var ct;for(ct in this._layers)this._layers[ct].remove();for(ct in this._panes)Tf(this._panes[ct]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(ct,Rt){var me="leaflet-pane"+(ct?" leaflet-"+ct.replace("Pane","")+"-pane":""),tr=Cc("div",me,Rt||this._mapPane);return ct&&(this._panes[ct]=tr),tr},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var ct=this.getPixelBounds(),Rt=this.unproject(ct.getBottomLeft()),me=this.unproject(ct.getTopRight());return new xl(Rt,me)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(ct,Rt,me){ct=ko(ct),me=no(me||[0,0]);var tr=this.getZoom()||0,zr=this.getMinZoom(),An=this.getMaxZoom(),Zi=ct.getNorthWest(),ja=ct.getSouthEast(),Ka=this.getSize().subtract(me),xo=Ts(this.project(ja,tr),this.project(Zi,tr)).getSize(),Ws=Cl.any3d?this.options.zoomSnap:1,_l=Ka.x/xo.x,Bu=Ka.y/xo.y,Md=Rt?Math.max(_l,Bu):Math.min(_l,Bu);return tr=this.getScaleZoom(Md,tr),Ws&&(tr=Math.round(tr/(Ws/100))*(Ws/100),tr=Rt?Math.ceil(tr/Ws)*Ws:Math.floor(tr/Ws)*Ws),Math.max(zr,Math.min(An,tr))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new la(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(ct,Rt){var me=this._getTopLeftPoint(ct,Rt);return new mo(me,me.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(ct){return this.options.crs.getProjectedBounds(ct===void 0?this.getZoom():ct)},getPane:function(ct){return typeof ct=="string"?this._panes[ct]:ct},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(ct,Rt){var me=this.options.crs;return Rt=Rt===void 0?this._zoom:Rt,me.scale(ct)/me.scale(Rt)},getScaleZoom:function(ct,Rt){var me=this.options.crs;Rt=Rt===void 0?this._zoom:Rt;var tr=me.zoom(ct*me.scale(Rt));return isNaN(tr)?1/0:tr},project:function(ct,Rt){return Rt=Rt===void 0?this._zoom:Rt,this.options.crs.latLngToPoint(Ia(ct),Rt)},unproject:function(ct,Rt){return Rt=Rt===void 0?this._zoom:Rt,this.options.crs.pointToLatLng(no(ct),Rt)},layerPointToLatLng:function(ct){var Rt=no(ct).add(this.getPixelOrigin());return this.unproject(Rt)},latLngToLayerPoint:function(ct){var Rt=this.project(Ia(ct))._round();return Rt._subtract(this.getPixelOrigin())},wrapLatLng:function(ct){return this.options.crs.wrapLatLng(Ia(ct))},wrapLatLngBounds:function(ct){return this.options.crs.wrapLatLngBounds(ko(ct))},distance:function(ct,Rt){return this.options.crs.distance(Ia(ct),Ia(Rt))},containerPointToLayerPoint:function(ct){return no(ct).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(ct){return no(ct).add(this._getMapPanePos())},containerPointToLatLng:function(ct){var Rt=this.containerPointToLayerPoint(no(ct));return this.layerPointToLatLng(Rt)},latLngToContainerPoint:function(ct){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Ia(ct)))},mouseEventToContainerPoint:function(ct){return Xd(ct,this._container)},mouseEventToLayerPoint:function(ct){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(ct))},mouseEventToLatLng:function(ct){return this.layerPointToLatLng(this.mouseEventToLayerPoint(ct))},_initContainer:function(ct){var Rt=this._container=xw(ct);if(Rt){if(Rt._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ou(Rt,"scroll",this._onScroll,this),this._containerId=jt(Rt)},_initLayout:function(){var ct=this._container;this._fadeAnimated=this.options.fadeAnimation&&Cl.any3d,Wu(ct,"leaflet-container"+(Cl.touch?" leaflet-touch":"")+(Cl.retina?" leaflet-retina":"")+(Cl.ielt9?" leaflet-oldie":"")+(Cl.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var Rt=M1(ct,"position");Rt!=="absolute"&&Rt!=="relative"&&Rt!=="fixed"&&Rt!=="sticky"&&(ct.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var ct=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ic(this._mapPane,new la(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Wu(ct.markerPane,"leaflet-zoom-hide"),Wu(ct.shadowPane,"leaflet-zoom-hide"))},_resetView:function(ct,Rt,me){ic(this._mapPane,new la(0,0));var tr=!this._loaded;this._loaded=!0,Rt=this._limitZoom(Rt),this.fire("viewprereset");var zr=this._zoom!==Rt;this._moveStart(zr,me)._move(ct,Rt)._moveEnd(zr),this.fire("viewreset"),tr&&this.fire("load")},_moveStart:function(ct,Rt){return ct&&this.fire("zoomstart"),Rt||this.fire("movestart"),this},_move:function(ct,Rt,me,tr){Rt===void 0&&(Rt=this._zoom);var zr=this._zoom!==Rt;return this._zoom=Rt,this._lastCenter=ct,this._pixelOrigin=this._getNewPixelOrigin(ct),tr?me&&me.pinch&&this.fire("zoom",me):((zr||me&&me.pinch)&&this.fire("zoom",me),this.fire("move",me)),this},_moveEnd:function(ct){return ct&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Li(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(ct){ic(this._mapPane,this._getMapPanePos().subtract(ct))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(ct){this._targets={},this._targets[jt(this._container)]=this;var Rt=ct?jh:Ou;Rt(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&Rt(window,"resize",this._onResize,this),Cl.any3d&&this.options.transform3DLimit&&(ct?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Li(this._resizeRequest),this._resizeRequest=Ri(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var ct=this._getMapPanePos();Math.max(Math.abs(ct.x),Math.abs(ct.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(ct,Rt){for(var me=[],tr,zr=Rt==="mouseout"||Rt==="mouseover",An=ct.target||ct.srcElement,Zi=!1;An;){if(tr=this._targets[jt(An)],tr&&(Rt==="click"||Rt==="preclick")&&this._draggableMoved(tr)){Zi=!0;break}if(tr&&tr.listens(Rt,!0)&&(zr&&!wg(An,ct)||(me.push(tr),zr))||An===this._container)break;An=An.parentNode}return!me.length&&!Zi&&!zr&&this.listens(Rt,!0)&&(me=[this]),me},_isClickDisabled:function(ct){for(;ct&&ct!==this._container;){if(ct._leaflet_disable_click)return!0;ct=ct.parentNode}},_handleDOMEvent:function(ct){var Rt=ct.target||ct.srcElement;if(!(!this._loaded||Rt._leaflet_disable_events||ct.type==="click"&&this._isClickDisabled(Rt))){var me=ct.type;me==="mousedown"&&Ud(Rt),this._fireDOMEvent(ct,me)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(ct,Rt,me){if(ct.type==="click"){var tr=Y({},ct);tr.type="preclick",this._fireDOMEvent(tr,tr.type,me)}var zr=this._findEventTargets(ct,Rt);if(me){for(var An=[],Zi=0;Zi0?Math.round(ct-Rt)/2:Math.max(0,Math.ceil(ct))-Math.max(0,Math.floor(Rt))},_limitZoom:function(ct){var Rt=this.getMinZoom(),me=this.getMaxZoom(),tr=Cl.any3d?this.options.zoomSnap:1;return tr&&(ct=Math.round(ct/tr)*tr),Math.max(Rt,Math.min(me,ct))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Rf(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(ct,Rt){var me=this._getCenterOffset(ct)._trunc();return(Rt&&Rt.animate)!==!0&&!this.getSize().contains(me)?!1:(this.panBy(me,Rt),!0)},_createAnimProxy:function(){var ct=this._proxy=Cc("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(ct),this.on("zoomanim",function(Rt){var me=P_,tr=this._proxy.style[me];mu(this._proxy,this.project(Rt.center,Rt.zoom),this.getZoomScale(Rt.zoom,1)),tr===this._proxy.style[me]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Tf(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var ct=this.getCenter(),Rt=this.getZoom();mu(this._proxy,this.project(ct,Rt),this.getZoomScale(Rt,1))},_catchTransitionEnd:function(ct){this._animatingZoom&&ct.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(ct,Rt,me){if(this._animatingZoom)return!0;if(me=me||{},!this._zoomAnimated||me.animate===!1||this._nothingToAnimate()||Math.abs(Rt-this._zoom)>this.options.zoomAnimationThreshold)return!1;var tr=this.getZoomScale(Rt),zr=this._getCenterOffset(ct)._divideBy(1-1/tr);return me.animate!==!0&&!this.getSize().contains(zr)?!1:(Ri(function(){this._moveStart(!0,me.noMoveStart||!1)._animateZoom(ct,Rt,!0)},this),!0)},_animateZoom:function(ct,Rt,me,tr){this._mapPane&&(me&&(this._animatingZoom=!0,this._animateToCenter=ct,this._animateToZoom=Rt,Wu(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:ct,zoom:Rt,noUpdate:tr}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(_t(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Rf(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Vs(ct,Rt){return new Ac(ct,Rt)}var up=Hn.extend({options:{position:"topright"},initialize:function(ct){kr(this,ct)},getPosition:function(){return this.options.position},setPosition:function(ct){var Rt=this._map;return Rt&&Rt.removeControl(this),this.options.position=ct,Rt&&Rt.addControl(this),this},getContainer:function(){return this._container},addTo:function(ct){this.remove(),this._map=ct;var Rt=this._container=this.onAdd(ct),me=this.getPosition(),tr=ct._controlCorners[me];return Wu(Rt,"leaflet-control"),me.indexOf("bottom")!==-1?tr.insertBefore(Rt,tr.firstChild):tr.appendChild(Rt),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Tf(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(ct){this._map&&ct&&ct.screenX>0&&ct.screenY>0&&this._map.getContainer().focus()}}),i0=function(ct){return new up(ct)};Ac.include({addControl:function(ct){return ct.addTo(this),this},removeControl:function(ct){return ct.remove(),this},_initControlPos:function(){var ct=this._controlCorners={},Rt="leaflet-",me=this._controlContainer=Cc("div",Rt+"control-container",this._container);function tr(zr,An){var Zi=Rt+zr+" "+Rt+An;ct[zr+An]=Cc("div",Zi,me)}tr("top","left"),tr("top","right"),tr("bottom","left"),tr("bottom","right")},_clearControlPos:function(){for(var ct in this._controlCorners)Tf(this._controlCorners[ct]);Tf(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var mv=up.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(ct,Rt,me,tr){return me1,this._baseLayersList.style.display=ct?"":"none"),this._separator.style.display=Rt&&ct?"":"none",this},_onLayerChange:function(ct){this._handlingClick||this._update();var Rt=this._getLayer(jt(ct.target)),me=Rt.overlay?ct.type==="add"?"overlayadd":"overlayremove":ct.type==="add"?"baselayerchange":null;me&&this._map.fire(me,Rt)},_createRadioElement:function(ct,Rt){var me='",tr=document.createElement("div");return tr.innerHTML=me,tr.firstChild},_addItem:function(ct){var Rt=document.createElement("label"),me=this._map.hasLayer(ct.layer),tr;ct.overlay?(tr=document.createElement("input"),tr.type="checkbox",tr.className="leaflet-control-layers-selector",tr.defaultChecked=me):tr=this._createRadioElement("leaflet-base-layers_"+jt(this),me),this._layerControlInputs.push(tr),tr.layerId=jt(ct.layer),Ou(tr,"click",this._onInputClick,this);var zr=document.createElement("span");zr.innerHTML=" "+ct.name;var An=document.createElement("span");Rt.appendChild(An),An.appendChild(tr),An.appendChild(zr);var Zi=ct.overlay?this._overlaysList:this._baseLayersList;return Zi.appendChild(Rt),this._checkDisabledLayers(),Rt},_onInputClick:function(){if(!this._preventClick){var ct=this._layerControlInputs,Rt,me,tr=[],zr=[];this._handlingClick=!0;for(var An=ct.length-1;An>=0;An--)Rt=ct[An],me=this._getLayer(Rt.layerId).layer,Rt.checked?tr.push(me):Rt.checked||zr.push(me);for(An=0;An=0;zr--)Rt=ct[zr],me=this._getLayer(Rt.layerId).layer,Rt.disabled=me.options.minZoom!==void 0&&trme.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var ct=this._section;this._preventClick=!0,Ou(ct,"click",mc),this.expand();var Rt=this;setTimeout(function(){jh(ct,"click",mc),Rt._preventClick=!1})}}),K0=function(ct,Rt,me){return new mv(ct,Rt,me)},Ls=up.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(ct){var Rt="leaflet-control-zoom",me=Cc("div",Rt+" leaflet-bar"),tr=this.options;return this._zoomInButton=this._createButton(tr.zoomInText,tr.zoomInTitle,Rt+"-in",me,this._zoomIn),this._zoomOutButton=this._createButton(tr.zoomOutText,tr.zoomOutTitle,Rt+"-out",me,this._zoomOut),this._updateDisabled(),ct.on("zoomend zoomlevelschange",this._updateDisabled,this),me},onRemove:function(ct){ct.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(ct){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(ct.shiftKey?3:1))},_createButton:function(ct,Rt,me,tr,zr){var An=Cc("a",me,tr);return An.innerHTML=ct,An.href="#",An.title=Rt,An.setAttribute("role","button"),An.setAttribute("aria-label",Rt),pv(An),Ou(An,"click",bg),Ou(An,"click",zr,this),Ou(An,"click",this._refocusOnMap,this),An},_updateDisabled:function(){var ct=this._map,Rt="leaflet-disabled";Rf(this._zoomInButton,Rt),Rf(this._zoomOutButton,Rt),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||ct._zoom===ct.getMinZoom())&&(Wu(this._zoomOutButton,Rt),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||ct._zoom===ct.getMaxZoom())&&(Wu(this._zoomInButton,Rt),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ac.mergeOptions({zoomControl:!0}),Ac.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ls,this.addControl(this.zoomControl))});var ww=function(ct){return new Ls(ct)},z_=up.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(ct){var Rt="leaflet-control-scale",me=Cc("div",Rt),tr=this.options;return this._addScales(tr,Rt+"-line",me),ct.on(tr.updateWhenIdle?"moveend":"move",this._update,this),ct.whenReady(this._update,this),me},onRemove:function(ct){ct.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(ct,Rt,me){ct.metric&&(this._mScale=Cc("div",Rt,me)),ct.imperial&&(this._iScale=Cc("div",Rt,me))},_update:function(){var ct=this._map,Rt=ct.getSize().y/2,me=ct.distance(ct.containerPointToLatLng([0,Rt]),ct.containerPointToLatLng([this.options.maxWidth,Rt]));this._updateScales(me)},_updateScales:function(ct){this.options.metric&&ct&&this._updateMetric(ct),this.options.imperial&&ct&&this._updateImperial(ct)},_updateMetric:function(ct){var Rt=this._getRoundNum(ct),me=Rt<1e3?Rt+" m":Rt/1e3+" km";this._updateScale(this._mScale,me,Rt/ct)},_updateImperial:function(ct){var Rt=ct*3.2808399,me,tr,zr;Rt>5280?(me=Rt/5280,tr=this._getRoundNum(me),this._updateScale(this._iScale,tr+" mi",tr/me)):(zr=this._getRoundNum(Rt),this._updateScale(this._iScale,zr+" ft",zr/Rt))},_updateScale:function(ct,Rt,me){ct.style.width=Math.round(this.options.maxWidth*me)+"px",ct.innerHTML=Rt},_getRoundNum:function(ct){var Rt=Math.pow(10,(Math.floor(ct)+"").length-1),me=ct/Rt;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:1,Rt*me}}),x6=function(ct){return new z_(ct)},O_='',D_=up.extend({options:{position:"bottomright",prefix:''+(Cl.inlineSvg?O_+" ":"")+"Leaflet"},initialize:function(ct){kr(this,ct),this._attributions={}},onAdd:function(ct){ct.attributionControl=this,this._container=Cc("div","leaflet-control-attribution"),pv(this._container);for(var Rt in ct._layers)ct._layers[Rt].getAttribution&&this.addAttribution(ct._layers[Rt].getAttribution());return this._update(),ct.on("layeradd",this._addAttribution,this),this._container},onRemove:function(ct){ct.off("layeradd",this._addAttribution,this)},_addAttribution:function(ct){ct.layer.getAttribution&&(this.addAttribution(ct.layer.getAttribution()),ct.layer.once("remove",function(){this.removeAttribution(ct.layer.getAttribution())},this))},setPrefix:function(ct){return this.options.prefix=ct,this._update(),this},addAttribution:function(ct){return ct?(this._attributions[ct]||(this._attributions[ct]=0),this._attributions[ct]++,this._update(),this):this},removeAttribution:function(ct){return ct?(this._attributions[ct]&&(this._attributions[ct]--,this._update()),this):this},_update:function(){if(this._map){var ct=[];for(var Rt in this._attributions)this._attributions[Rt]&&ct.push(Rt);var me=[];this.options.prefix&&me.push(this.options.prefix),ct.length&&me.push(ct.join(", ")),this._container.innerHTML=me.join(' ')}}});Ac.mergeOptions({attributionControl:!0}),Ac.addInitHook(function(){this.options.attributionControl&&new D_().addTo(this)});var _6=function(ct){return new D_(ct)};up.Layers=mv,up.Zoom=Ls,up.Scale=z_,up.Attribution=D_,i0.layers=K0,i0.zoom=ww,i0.scale=x6,i0.attribution=_6;var X0=Hn.extend({initialize:function(ct){this._map=ct},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});X0.addTo=function(ct,Rt){return ct.addHandler(Rt,this),this};var cp={Events:Ti},I0=Cl.touch?"touchstart mousedown":"mousedown",Um=Qn.extend({options:{clickTolerance:3},initialize:function(ct,Rt,me,tr){kr(this,tr),this._element=ct,this._dragStartTarget=Rt||ct,this._preventOutline=me},enable:function(){this._enabled||(Ou(this._dragStartTarget,I0,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Um._dragging===this&&this.finishDrag(!0),jh(this._dragStartTarget,I0,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(ct){if(this._enabled&&(this._moved=!1,!I_(this._element,"leaflet-zoom-anim"))){if(ct.touches&&ct.touches.length!==1){Um._dragging===this&&this.finishDrag();return}if(!(Um._dragging||ct.shiftKey||ct.which!==1&&ct.button!==1&&!ct.touches)&&(Um._dragging=this,this._preventOutline&&Ud(this._element),Kc(),L0(),!this._moving)){this.fire("down");var Rt=ct.touches?ct.touches[0]:ct,me=Td(this._element);this._startPoint=new la(Rt.clientX,Rt.clientY),this._startPos=Bc(this._element),this._parentScale=E1(me);var tr=ct.type==="mousedown";Ou(document,tr?"mousemove":"touchmove",this._onMove,this),Ou(document,tr?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(ct){if(this._enabled){if(ct.touches&&ct.touches.length>1){this._moved=!0;return}var Rt=ct.touches&&ct.touches.length===1?ct.touches[0]:ct,me=new la(Rt.clientX,Rt.clientY)._subtract(this._startPoint);!me.x&&!me.y||Math.abs(me.x)+Math.abs(me.y)An&&(Zi=ja,An=Ka);An>me&&(Rt[Zi]=1,Tg(ct,Rt,me,tr,Zi),Tg(ct,Rt,me,Zi,zr))}function Tw(ct,Rt){for(var me=[ct[0]],tr=1,zr=0,An=ct.length;trRt&&(me.push(ct[tr]),zr=tr);return zrRt.max.x&&(me|=2),ct.yRt.max.y&&(me|=8),me}function k6(ct,Rt){var me=Rt.x-ct.x,tr=Rt.y-ct.y;return me*me+tr*tr}function gv(ct,Rt,me,tr){var zr=Rt.x,An=Rt.y,Zi=me.x-zr,ja=me.y-An,Ka=Zi*Zi+ja*ja,xo;return Ka>0&&(xo=((ct.x-zr)*Zi+(ct.y-An)*ja)/Ka,xo>1?(zr=me.x,An=me.y):xo>0&&(zr+=Zi*xo,An+=ja*xo)),Zi=ct.x-zr,ja=ct.y-An,tr?Zi*Zi+ja*ja:new la(zr,An)}function g0(ct){return!cn(ct[0])||typeof ct[0][0]!="object"&&typeof ct[0][0]<"u"}function Aw(ct){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),g0(ct)}function Mw(ct,Rt){var me,tr,zr,An,Zi,ja,Ka,xo;if(!ct||ct.length===0)throw new Error("latlngs not passed");g0(ct)||(console.warn("latlngs are not flat! Only the first ring will be used"),ct=ct[0]);var Ws=Ia([0,0]),_l=ko(ct),Bu=_l.getNorthWest().distanceTo(_l.getSouthWest())*_l.getNorthEast().distanceTo(_l.getNorthWest());Bu<1700&&(Ws=Hy(ct));var Md=ct.length,Nf=[];for(me=0;metr){Ka=(An-tr)/zr,xo=[ja.x-Ka*(ja.x-Zi.x),ja.y-Ka*(ja.y-Zi.y)];break}var kp=Rt.unproject(no(xo));return Ia([kp.lat+Ws.lat,kp.lng+Ws.lng])}var tf={__proto__:null,simplify:B_,pointToSegmentDistance:kw,closestPointOnSegment:kg,clipSegment:N_,_getEdgeIntersection:Ag,_getBitCode:Mg,_sqClosestPointOnSegment:gv,isFlat:g0,_flat:Aw,polylineCenter:Mw},v0={project:function(ct){return new la(ct.lng,ct.lat)},unproject:function(ct){return new ro(ct.y,ct.x)},bounds:new mo([-180,-90],[180,90])},vv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new mo([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(ct){var Rt=Math.PI/180,me=this.R,tr=ct.lat*Rt,zr=this.R_MINOR/me,An=Math.sqrt(1-zr*zr),Zi=An*Math.sin(tr),ja=Math.tan(Math.PI/4-tr/2)/Math.pow((1-Zi)/(1+Zi),An/2);return tr=-me*Math.log(Math.max(ja,1e-10)),new la(ct.lng*Rt*me,tr)},unproject:function(ct){for(var Rt=180/Math.PI,me=this.R,tr=this.R_MINOR/me,zr=Math.sqrt(1-tr*tr),An=Math.exp(-ct.y/me),Zi=Math.PI/2-2*Math.atan(An),ja=0,Ka=.1,xo;ja<15&&Math.abs(Ka)>1e-7;ja++)xo=zr*Math.sin(Zi),xo=Math.pow((1-xo)/(1+xo),zr/2),Ka=Math.PI/2-2*Math.atan(An*xo)-Zi,Zi+=Ka;return new ro(Zi*Rt,ct.x*Rt/me)}},j_={__proto__:null,LonLat:v0,Mercator:vv,SphericalMercator:us},U_=Y({},io,{code:"EPSG:3395",projection:vv,transformation:function(){var ct=.5/(Math.PI*vv.R);return _i(ct,.5,-ct,.5)}()}),Wy=Y({},io,{code:"EPSG:4326",projection:v0,transformation:_i(1/180,1,-1/180,.5)}),Sg=Y({},ma,{projection:v0,transformation:_i(1,0,-1,0),scale:function(ct){return Math.pow(2,ct)},zoom:function(ct){return Math.log(ct)/Math.LN2},distance:function(ct,Rt){var me=Rt.lng-ct.lng,tr=Rt.lat-ct.lat;return Math.sqrt(me*me+tr*tr)},infinite:!0});ma.Earth=io,ma.EPSG3395=U_,ma.EPSG3857=Ai,ma.EPSG900913=pi,ma.EPSG4326=Wy,ma.Simple=Sg;var a0=Qn.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(ct){return ct.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(ct){return ct&&ct.removeLayer(this),this},getPane:function(ct){return this._map.getPane(ct?this.options[ct]||ct:this.options.pane)},addInteractiveTarget:function(ct){return this._map._targets[jt(ct)]=this,this},removeInteractiveTarget:function(ct){return delete this._map._targets[jt(ct)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(ct){var Rt=ct.target;if(Rt.hasLayer(this)){if(this._map=Rt,this._zoomAnimated=Rt._zoomAnimated,this.getEvents){var me=this.getEvents();Rt.on(me,this),this.once("remove",function(){Rt.off(me,this)},this)}this.onAdd(Rt),this.fire("add"),Rt.fire("layeradd",{layer:this})}}});Ac.include({addLayer:function(ct){if(!ct._layerAdd)throw new Error("The provided object is not a Layer.");var Rt=jt(ct);return this._layers[Rt]?this:(this._layers[Rt]=ct,ct._mapToAdd=this,ct.beforeAdd&&ct.beforeAdd(this),this.whenReady(ct._layerAdd,ct),this)},removeLayer:function(ct){var Rt=jt(ct);return this._layers[Rt]?(this._loaded&&ct.onRemove(this),delete this._layers[Rt],this._loaded&&(this.fire("layerremove",{layer:ct}),ct.fire("remove")),ct._map=ct._mapToAdd=null,this):this},hasLayer:function(ct){return jt(ct)in this._layers},eachLayer:function(ct,Rt){for(var me in this._layers)ct.call(Rt,this._layers[me]);return this},_addLayers:function(ct){ct=ct?cn(ct)?ct:[ct]:[];for(var Rt=0,me=ct.length;Rtthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&Rt[0]instanceof ro&&Rt[0].equals(Rt[me-1])&&Rt.pop(),Rt},_setLatLngs:function(ct){y0.prototype._setLatLngs.call(this,ct),g0(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return g0(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var ct=this._renderer._bounds,Rt=this.options.weight,me=new la(Rt,Rt);if(ct=new mo(ct.min.subtract(me),ct.max.add(me)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(ct))){if(this.options.noClip){this._parts=this._rings;return}for(var tr=0,zr=this._rings.length,An;trct.y!=zr.y>ct.y&&ct.x<(zr.x-tr.x)*(ct.y-tr.y)/(zr.y-tr.y)+tr.x&&(Rt=!Rt);return Rt||y0.prototype._containsPoint.call(this,ct,!0)}});function A6(ct,Rt){return new _v(ct,Rt)}var pm=wp.extend({initialize:function(ct,Rt){kr(this,Rt),this._layers={},ct&&this.addData(ct)},addData:function(ct){var Rt=cn(ct)?ct:ct.features,me,tr,zr;if(Rt){for(me=0,tr=Rt.length;me0&&zr.push(zr[0].slice()),zr}function mm(ct,Rt){return ct.feature?Y({},ct.feature,{geometry:Rt}):Xy(Rt)}function Xy(ct){return ct.type==="Feature"||ct.type==="FeatureCollection"?ct:{type:"Feature",properties:{},geometry:ct}}var $_={toGeoJSON:function(ct){return mm(this,{type:"Point",coordinates:q_(this.getLatLng(),ct)})}};L1.include($_),Zy.include($_),$y.include($_),y0.include({toGeoJSON:function(ct){var Rt=!g0(this._latlngs),me=Ky(this._latlngs,Rt?1:0,!1,ct);return mm(this,{type:(Rt?"Multi":"")+"LineString",coordinates:me})}}),_v.include({toGeoJSON:function(ct){var Rt=!g0(this._latlngs),me=Rt&&!g0(this._latlngs[0]),tr=Ky(this._latlngs,me?2:Rt?1:0,!0,ct);return Rt||(tr=[tr]),mm(this,{type:(me?"Multi":"")+"Polygon",coordinates:tr})}}),Eg.include({toMultiPoint:function(ct){var Rt=[];return this.eachLayer(function(me){Rt.push(me.toGeoJSON(ct).geometry.coordinates)}),mm(this,{type:"MultiPoint",coordinates:Rt})},toGeoJSON:function(ct){var Rt=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(Rt==="MultiPoint")return this.toMultiPoint(ct);var me=Rt==="GeometryCollection",tr=[];return this.eachLayer(function(zr){if(zr.toGeoJSON){var An=zr.toGeoJSON(ct);if(me)tr.push(An.geometry);else{var Zi=Xy(An);Zi.type==="FeatureCollection"?tr.push.apply(tr,Zi.features):tr.push(Zi)}}}),me?mm(this,{geometries:tr,type:"GeometryCollection"}):{type:"FeatureCollection",features:tr}}});function Z_(ct,Rt){return new pm(ct,Rt)}var Jy=Z_,gm=a0.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(ct,Rt,me){this._url=ct,this._bounds=ko(Rt),kr(this,me)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Wu(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Tf(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(ct){return this.options.opacity=ct,this._image&&this._updateOpacity(),this},setStyle:function(ct){return ct.opacity&&this.setOpacity(ct.opacity),this},bringToFront:function(){return this._map&&dv(this._image),this},bringToBack:function(){return this._map&&kn(this._image),this},setUrl:function(ct){return this._url=ct,this._image&&(this._image.src=ct),this},setBounds:function(ct){return this._bounds=ko(ct),this._map&&this._reset(),this},getEvents:function(){var ct={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(ct.zoomanim=this._animateZoom),ct},setZIndex:function(ct){return this.options.zIndex=ct,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var ct=this._url.tagName==="IMG",Rt=this._image=ct?this._url:Cc("img");if(Wu(Rt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Rt,"leaflet-zoom-animated"),this.options.className&&Wu(Rt,this.options.className),Rt.onselectstart=Ie,Rt.onmousemove=Ie,Rt.onload=_t(this.fire,this,"load"),Rt.onerror=_t(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Rt.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),ct){this._url=Rt.src;return}Rt.src=this._url,Rt.alt=this.options.alt},_animateZoom:function(ct){var Rt=this._map.getZoomScale(ct.zoom),me=this._map._latLngBoundsToNewLayerBounds(this._bounds,ct.zoom,ct.center).min;mu(this._image,me,Rt)},_reset:function(){var ct=this._image,Rt=new mo(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),me=Rt.getSize();ic(ct,Rt.min),ct.style.width=me.x+"px",ct.style.height=me.y+"px"},_updateOpacity:function(){m0(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var ct=this.options.errorOverlayUrl;ct&&this._url!==ct&&(this._url=ct,this._image.src=ct)},getCenter:function(){return this._bounds.getCenter()}}),vm=function(ct,Rt,me){return new gm(ct,Rt,me)},z0=gm.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var ct=this._url.tagName==="VIDEO",Rt=this._image=ct?this._url:Cc("video");if(Wu(Rt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Rt,"leaflet-zoom-animated"),this.options.className&&Wu(Rt,this.options.className),Rt.onselectstart=Ie,Rt.onmousemove=Ie,Rt.onloadeddata=_t(this.fire,this,"load"),ct){for(var me=Rt.getElementsByTagName("source"),tr=[],zr=0;zr0?tr:[Rt.src];return}cn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(Rt.style,"objectFit")&&(Rt.style.objectFit="fill"),Rt.autoplay=!!this.options.autoplay,Rt.loop=!!this.options.loop,Rt.muted=!!this.options.muted,Rt.playsInline=!!this.options.playsInline;for(var An=0;Anzr?(Rt.height=zr+"px",Wu(ct,An)):Rf(ct,An),this._containerWidth=this._container.offsetWidth},_animateZoom:function(ct){var Rt=this._map._latLngToNewLayerPoint(this._latlng,ct.zoom,ct.center),me=this._getAnchor();ic(this._container,Rt.add(me))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var ct=this._map,Rt=parseInt(M1(this._container,"marginBottom"),10)||0,me=this._container.offsetHeight+Rt,tr=this._containerWidth,zr=new la(this._containerLeft,-me-this._containerBottom);zr._add(Bc(this._container));var An=ct.layerPointToContainerPoint(zr),Zi=no(this.options.autoPanPadding),ja=no(this.options.autoPanPaddingTopLeft||Zi),Ka=no(this.options.autoPanPaddingBottomRight||Zi),xo=ct.getSize(),Ws=0,_l=0;An.x+tr+Ka.x>xo.x&&(Ws=An.x+tr-xo.x+Ka.x),An.x-Ws-ja.x<0&&(Ws=An.x-ja.x),An.y+me+Ka.y>xo.y&&(_l=An.y+me-xo.y+Ka.y),An.y-_l-ja.y<0&&(_l=An.y-ja.y),(Ws||_l)&&(this.options.keepInView&&(this._autopanning=!0),ct.fire("autopanstart").panBy([Ws,_l]))}},_getAnchor:function(){return no(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vf=function(ct,Rt){return new Cg(ct,Rt)};Ac.mergeOptions({closePopupOnClick:!0}),Ac.include({openPopup:function(ct,Rt,me){return this._initOverlay(Cg,ct,Rt,me).openOn(this),this},closePopup:function(ct){return ct=arguments.length?ct:this._popup,ct&&ct.close(),this}}),a0.include({bindPopup:function(ct,Rt){return this._popup=this._initOverlay(Cg,this._popup,ct,Rt),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(ct){return this._popup&&(this instanceof wp||(this._popup._source=this),this._popup._prepareOpen(ct||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(ct){return this._popup&&this._popup.setContent(ct),this},getPopup:function(){return this._popup},_openPopup:function(ct){if(!(!this._popup||!this._map)){bg(ct);var Rt=ct.layer||ct.target;if(this._popup._source===Rt&&!(Rt instanceof Hm)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(ct.latlng);return}this._popup._source=Rt,this.openPopup(ct.latlng)}},_movePopup:function(ct){this._popup.setLatLng(ct.latlng)},_onKeyPress:function(ct){ct.originalEvent.keyCode===13&&this._openPopup(ct)}});var P1=J0.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(ct){J0.prototype.onAdd.call(this,ct),this.setOpacity(this.options.opacity),ct.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(ct){J0.prototype.onRemove.call(this,ct),ct.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var ct=J0.prototype.getEvents.call(this);return this.options.permanent||(ct.preclick=this.close),ct},_initLayout:function(){var ct="leaflet-tooltip",Rt=ct+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Cc("div",Rt),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+jt(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(ct){var Rt,me,tr=this._map,zr=this._container,An=tr.latLngToContainerPoint(tr.getCenter()),Zi=tr.layerPointToContainerPoint(ct),ja=this.options.direction,Ka=zr.offsetWidth,xo=zr.offsetHeight,Ws=no(this.options.offset),_l=this._getAnchor();ja==="top"?(Rt=Ka/2,me=xo):ja==="bottom"?(Rt=Ka/2,me=0):ja==="center"?(Rt=Ka/2,me=xo/2):ja==="right"?(Rt=0,me=xo/2):ja==="left"?(Rt=Ka,me=xo/2):Zi.xthis.options.maxZoom||metr?this._retainParent(zr,An,Zi,tr):!1)},_retainChildren:function(ct,Rt,me,tr){for(var zr=2*ct;zr<2*ct+2;zr++)for(var An=2*Rt;An<2*Rt+2;An++){var Zi=new la(zr,An);Zi.z=me+1;var ja=this._tileCoordsToKey(Zi),Ka=this._tiles[ja];if(Ka&&Ka.active){Ka.retain=!0;continue}else Ka&&Ka.loaded&&(Ka.retain=!0);me+1this.options.maxZoom||this.options.minZoom!==void 0&&zr1){this._setView(ct,me);return}for(var _l=zr.min.y;_l<=zr.max.y;_l++)for(var Bu=zr.min.x;Bu<=zr.max.x;Bu++){var Md=new la(Bu,_l);if(Md.z=this._tileZoom,!!this._isValidTile(Md)){var Nf=this._tiles[this._tileCoordsToKey(Md)];Nf?Nf.current=!0:Zi.push(Md)}}if(Zi.sort(function(kp,qm){return kp.distanceTo(An)-qm.distanceTo(An)}),Zi.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _0=document.createDocumentFragment();for(Bu=0;Bume.max.x)||!Rt.wrapLat&&(ct.yme.max.y))return!1}if(!this.options.bounds)return!0;var tr=this._tileCoordsToBounds(ct);return ko(this.options.bounds).overlaps(tr)},_keyToBounds:function(ct){return this._tileCoordsToBounds(this._keyToTileCoords(ct))},_tileCoordsToNwSe:function(ct){var Rt=this._map,me=this.getTileSize(),tr=ct.scaleBy(me),zr=tr.add(me),An=Rt.unproject(tr,ct.z),Zi=Rt.unproject(zr,ct.z);return[An,Zi]},_tileCoordsToBounds:function(ct){var Rt=this._tileCoordsToNwSe(ct),me=new xl(Rt[0],Rt[1]);return this.options.noWrap||(me=this._map.wrapLatLngBounds(me)),me},_tileCoordsToKey:function(ct){return ct.x+":"+ct.y+":"+ct.z},_keyToTileCoords:function(ct){var Rt=ct.split(":"),me=new la(+Rt[0],+Rt[1]);return me.z=+Rt[2],me},_removeTile:function(ct){var Rt=this._tiles[ct];Rt&&(Tf(Rt.el),delete this._tiles[ct],this.fire("tileunload",{tile:Rt.el,coords:this._keyToTileCoords(ct)}))},_initTile:function(ct){Wu(ct,"leaflet-tile");var Rt=this.getTileSize();ct.style.width=Rt.x+"px",ct.style.height=Rt.y+"px",ct.onselectstart=Ie,ct.onmousemove=Ie,Cl.ielt9&&this.options.opacity<1&&m0(ct,this.options.opacity)},_addTile:function(ct,Rt){var me=this._getTilePos(ct),tr=this._tileCoordsToKey(ct),zr=this.createTile(this._wrapCoords(ct),_t(this._tileReady,this,ct));this._initTile(zr),this.createTile.length<2&&Ri(_t(this._tileReady,this,ct,null,zr)),ic(zr,me),this._tiles[tr]={el:zr,coords:ct,current:!0},Rt.appendChild(zr),this.fire("tileloadstart",{tile:zr,coords:ct})},_tileReady:function(ct,Rt,me){Rt&&this.fire("tileerror",{error:Rt,tile:me,coords:ct});var tr=this._tileCoordsToKey(ct);me=this._tiles[tr],me&&(me.loaded=+new Date,this._map._fadeAnimated?(m0(me.el,0),Li(this._fadeFrame),this._fadeFrame=Ri(this._updateOpacity,this)):(me.active=!0,this._pruneTiles()),Rt||(Wu(me.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:me.el,coords:ct})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Cl.ielt9||!this._map._fadeAnimated?Ri(this._pruneTiles,this):setTimeout(_t(this._pruneTiles,this),250)))},_getTilePos:function(ct){return ct.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(ct){var Rt=new la(this._wrapX?ce(ct.x,this._wrapX):ct.x,this._wrapY?ce(ct.y,this._wrapY):ct.y);return Rt.z=ct.z,Rt},_pxBoundsToTileRange:function(ct){var Rt=this.getTileSize();return new mo(ct.min.unscaleBy(Rt).floor(),ct.max.unscaleBy(Rt).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var ct in this._tiles)if(!this._tiles[ct].loaded)return!1;return!0}});function Y_(ct){return new I1(ct)}var o0=I1.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(ct,Rt){this._url=ct,Rt=kr(this,Rt),Rt.detectRetina&&Cl.retina&&Rt.maxZoom>0?(Rt.tileSize=Math.floor(Rt.tileSize/2),Rt.zoomReverse?(Rt.zoomOffset--,Rt.minZoom=Math.min(Rt.maxZoom,Rt.minZoom+1)):(Rt.zoomOffset++,Rt.maxZoom=Math.max(Rt.minZoom,Rt.maxZoom-1)),Rt.minZoom=Math.max(0,Rt.minZoom)):Rt.zoomReverse?Rt.minZoom=Math.min(Rt.maxZoom,Rt.minZoom):Rt.maxZoom=Math.max(Rt.minZoom,Rt.maxZoom),typeof Rt.subdomains=="string"&&(Rt.subdomains=Rt.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(ct,Rt){return this._url===ct&&Rt===void 0&&(Rt=!0),this._url=ct,Rt||this.redraw(),this},createTile:function(ct,Rt){var me=document.createElement("img");return Ou(me,"load",_t(this._tileOnLoad,this,Rt,me)),Ou(me,"error",_t(this._tileOnError,this,Rt,me)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(me.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(me.referrerPolicy=this.options.referrerPolicy),me.alt="",me.src=this.getTileUrl(ct),me},getTileUrl:function(ct){var Rt={r:Cl.retina?"@2x":"",s:this._getSubdomain(ct),x:ct.x,y:ct.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var me=this._globalTileRange.max.y-ct.y;this.options.tms&&(Rt.y=me),Rt["-y"]=me}return Dt(this._url,Y(Rt,this.options))},_tileOnLoad:function(ct,Rt){Cl.ielt9?setTimeout(_t(ct,this,null,Rt),0):ct(null,Rt)},_tileOnError:function(ct,Rt,me){var tr=this.options.errorTileUrl;tr&&Rt.getAttribute("src")!==tr&&(Rt.src=tr),ct(me,Rt)},_onTileRemove:function(ct){ct.tile.onload=null},_getZoomForUrl:function(){var ct=this._tileZoom,Rt=this.options.maxZoom,me=this.options.zoomReverse,tr=this.options.zoomOffset;return me&&(ct=Rt-ct),ct+tr},_getSubdomain:function(ct){var Rt=Math.abs(ct.x+ct.y)%this.options.subdomains.length;return this.options.subdomains[Rt]},_abortLoading:function(){var ct,Rt;for(ct in this._tiles)if(this._tiles[ct].coords.z!==this._tileZoom&&(Rt=this._tiles[ct].el,Rt.onload=Ie,Rt.onerror=Ie,!Rt.complete)){Rt.src=Dn;var me=this._tiles[ct].coords;Tf(Rt),delete this._tiles[ct],this.fire("tileabort",{tile:Rt,coords:me})}},_removeTile:function(ct){var Rt=this._tiles[ct];if(Rt)return Rt.el.setAttribute("src",Dn),I1.prototype._removeTile.call(this,ct)},_tileReady:function(ct,Rt,me){if(!(!this._map||me&&me.getAttribute("src")===Dn))return I1.prototype._tileReady.call(this,ct,Rt,me)}});function Qy(ct,Rt){return new o0(ct,Rt)}var tx=o0.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(ct,Rt){this._url=ct;var me=Y({},this.defaultWmsParams);for(var tr in Rt)tr in this.options||(me[tr]=Rt[tr]);Rt=kr(this,Rt);var zr=Rt.detectRetina&&Cl.retina?2:1,An=this.getTileSize();me.width=An.x*zr,me.height=An.y*zr,this.wmsParams=me},onAdd:function(ct){this._crs=this.options.crs||ct.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var Rt=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[Rt]=this._crs.code,o0.prototype.onAdd.call(this,ct)},getTileUrl:function(ct){var Rt=this._tileCoordsToNwSe(ct),me=this._crs,tr=Ts(me.project(Rt[0]),me.project(Rt[1])),zr=tr.min,An=tr.max,Zi=(this._wmsVersion>=1.3&&this._crs===Wy?[zr.y,zr.x,An.y,An.x]:[zr.x,zr.y,An.x,An.y]).join(","),ja=o0.prototype.getTileUrl.call(this,ct);return ja+Vr(this.wmsParams,ja,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Zi},setParams:function(ct,Rt){return Y(this.wmsParams,ct),Rt||this.redraw(),this}});function zw(ct,Rt){return new tx(ct,Rt)}o0.WMS=tx,Qy.wms=zw;var ym=a0.extend({options:{padding:.1},initialize:function(ct){kr(this,ct),jt(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Wu(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var ct={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(ct.zoomanim=this._onAnimZoom),ct},_onAnimZoom:function(ct){this._updateTransform(ct.center,ct.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(ct,Rt){var me=this._map.getZoomScale(Rt,this._zoom),tr=this._map.getSize().multiplyBy(.5+this.options.padding),zr=this._map.project(this._center,Rt),An=tr.multiplyBy(-me).add(zr).subtract(this._map._getNewPixelOrigin(ct,Rt));Cl.any3d?mu(this._container,An,me):ic(this._container,An)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var ct in this._layers)this._layers[ct]._reset()},_onZoomEnd:function(){for(var ct in this._layers)this._layers[ct]._project()},_updatePaths:function(){for(var ct in this._layers)this._layers[ct]._update()},_update:function(){var ct=this.options.padding,Rt=this._map.getSize(),me=this._map.containerPointToLayerPoint(Rt.multiplyBy(-ct)).round();this._bounds=new mo(me,me.add(Rt.multiplyBy(1+ct*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ow=ym.extend({options:{tolerance:0},getEvents:function(){var ct=ym.prototype.getEvents.call(this);return ct.viewprereset=this._onViewPreReset,ct},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ym.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var ct=this._container=document.createElement("canvas");Ou(ct,"mousemove",this._onMouseMove,this),Ou(ct,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ou(ct,"mouseout",this._handleMouseOut,this),ct._leaflet_disable_events=!0,this._ctx=ct.getContext("2d")},_destroyContainer:function(){Li(this._redrawRequest),delete this._ctx,Tf(this._container),jh(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var ct;this._redrawBounds=null;for(var Rt in this._layers)ct=this._layers[Rt],ct._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Rt=this._container,me=ct.getSize(),tr=Cl.retina?2:1;ic(Rt,ct.min),Rt.width=tr*me.x,Rt.height=tr*me.y,Rt.style.width=me.x+"px",Rt.style.height=me.y+"px",Cl.retina&&this._ctx.scale(2,2),this._ctx.translate(-ct.min.x,-ct.min.y),this.fire("update")}},_reset:function(){ym.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(ct){this._updateDashArray(ct),this._layers[jt(ct)]=ct;var Rt=ct._order={layer:ct,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=Rt),this._drawLast=Rt,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(ct){this._requestRedraw(ct)},_removePath:function(ct){var Rt=ct._order,me=Rt.next,tr=Rt.prev;me?me.prev=tr:this._drawLast=tr,tr?tr.next=me:this._drawFirst=me,delete ct._order,delete this._layers[jt(ct)],this._requestRedraw(ct)},_updatePath:function(ct){this._extendRedrawBounds(ct),ct._project(),ct._update(),this._requestRedraw(ct)},_updateStyle:function(ct){this._updateDashArray(ct),this._requestRedraw(ct)},_updateDashArray:function(ct){if(typeof ct.options.dashArray=="string"){var Rt=ct.options.dashArray.split(/[, ]+/),me=[],tr,zr;for(zr=0;zr')}}catch{}return function(ct){return document.createElement("<"+ct+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),E6={_initContainer:function(){this._container=Cc("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ym.prototype._update.call(this),this.fire("update"))},_initPath:function(ct){var Rt=ct._container=z1("shape");Wu(Rt,"leaflet-vml-shape "+(this.options.className||"")),Rt.coordsize="1 1",ct._path=z1("path"),Rt.appendChild(ct._path),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){var Rt=ct._container;this._container.appendChild(Rt),ct.options.interactive&&ct.addInteractiveTarget(Rt)},_removePath:function(ct){var Rt=ct._container;Tf(Rt),ct.removeInteractiveTarget(Rt),delete this._layers[jt(ct)]},_updateStyle:function(ct){var Rt=ct._stroke,me=ct._fill,tr=ct.options,zr=ct._container;zr.stroked=!!tr.stroke,zr.filled=!!tr.fill,tr.stroke?(Rt||(Rt=ct._stroke=z1("stroke")),zr.appendChild(Rt),Rt.weight=tr.weight+"px",Rt.color=tr.color,Rt.opacity=tr.opacity,tr.dashArray?Rt.dashStyle=cn(tr.dashArray)?tr.dashArray.join(" "):tr.dashArray.replace(/( *, *)/g," "):Rt.dashStyle="",Rt.endcap=tr.lineCap.replace("butt","flat"),Rt.joinstyle=tr.lineJoin):Rt&&(zr.removeChild(Rt),ct._stroke=null),tr.fill?(me||(me=ct._fill=z1("fill")),zr.appendChild(me),me.color=tr.fillColor||tr.color,me.opacity=tr.fillOpacity):me&&(zr.removeChild(me),ct._fill=null)},_updateCircle:function(ct){var Rt=ct._point.round(),me=Math.round(ct._radius),tr=Math.round(ct._radiusY||me);this._setPath(ct,ct._empty()?"M0 0":"AL "+Rt.x+","+Rt.y+" "+me+","+tr+" 0,"+65535*360)},_setPath:function(ct,Rt){ct._path.v=Rt},_bringToFront:function(ct){dv(ct._container)},_bringToBack:function(ct){kn(ct._container)}},Wm=Cl.vml?z1:go,Bp=ym.extend({_initContainer:function(){this._container=Wm("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wm("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Tf(this._container),jh(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Rt=ct.getSize(),me=this._container;(!this._svgSize||!this._svgSize.equals(Rt))&&(this._svgSize=Rt,me.setAttribute("width",Rt.x),me.setAttribute("height",Rt.y)),ic(me,ct.min),me.setAttribute("viewBox",[ct.min.x,ct.min.y,Rt.x,Rt.y].join(" ")),this.fire("update")}},_initPath:function(ct){var Rt=ct._path=Wm("path");ct.options.className&&Wu(Rt,ct.options.className),ct.options.interactive&&Wu(Rt,"leaflet-interactive"),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(ct._path),ct.addInteractiveTarget(ct._path)},_removePath:function(ct){Tf(ct._path),ct.removeInteractiveTarget(ct._path),delete this._layers[jt(ct)]},_updatePath:function(ct){ct._project(),ct._update()},_updateStyle:function(ct){var Rt=ct._path,me=ct.options;Rt&&(me.stroke?(Rt.setAttribute("stroke",me.color),Rt.setAttribute("stroke-opacity",me.opacity),Rt.setAttribute("stroke-width",me.weight),Rt.setAttribute("stroke-linecap",me.lineCap),Rt.setAttribute("stroke-linejoin",me.lineJoin),me.dashArray?Rt.setAttribute("stroke-dasharray",me.dashArray):Rt.removeAttribute("stroke-dasharray"),me.dashOffset?Rt.setAttribute("stroke-dashoffset",me.dashOffset):Rt.removeAttribute("stroke-dashoffset")):Rt.setAttribute("stroke","none"),me.fill?(Rt.setAttribute("fill",me.fillColor||me.color),Rt.setAttribute("fill-opacity",me.fillOpacity),Rt.setAttribute("fill-rule",me.fillRule||"evenodd")):Rt.setAttribute("fill","none"))},_updatePoly:function(ct,Rt){this._setPath(ct,Mo(ct._parts,Rt))},_updateCircle:function(ct){var Rt=ct._point,me=Math.max(Math.round(ct._radius),1),tr=Math.max(Math.round(ct._radiusY),1)||me,zr="a"+me+","+tr+" 0 1,0 ",An=ct._empty()?"M0 0":"M"+(Rt.x-me)+","+Rt.y+zr+me*2+",0 "+zr+-me*2+",0 ";this._setPath(ct,An)},_setPath:function(ct,Rt){ct._path.setAttribute("d",Rt)},_bringToFront:function(ct){dv(ct._path)},_bringToBack:function(ct){kn(ct._path)}});Cl.vml&&Bp.include(E6);function Dw(ct){return Cl.svg||Cl.vml?new Bp(ct):null}Ac.include({getRenderer:function(ct){var Rt=ct.options.renderer||this._getPaneRenderer(ct.options.pane)||this.options.renderer||this._renderer;return Rt||(Rt=this._renderer=this._createRenderer()),this.hasLayer(Rt)||this.addLayer(Rt),Rt},_getPaneRenderer:function(ct){if(ct==="overlayPane"||ct===void 0)return!1;var Rt=this._paneRenderers[ct];return Rt===void 0&&(Rt=this._createRenderer({pane:ct}),this._paneRenderers[ct]=Rt),Rt},_createRenderer:function(ct){return this.options.preferCanvas&&K_(ct)||Dw(ct)}});var s0=_v.extend({initialize:function(ct,Rt){_v.prototype.initialize.call(this,this._boundsToLatLngs(ct),Rt)},setBounds:function(ct){return this.setLatLngs(this._boundsToLatLngs(ct))},_boundsToLatLngs:function(ct){return ct=ko(ct),[ct.getSouthWest(),ct.getNorthWest(),ct.getNorthEast(),ct.getSouthEast()]}});function O0(ct,Rt){return new s0(ct,Rt)}Bp.create=Wm,Bp.pointsToPath=Mo,pm.geometryToLayer=Gy,pm.coordsToLatLng=W_,pm.coordsToLatLngs=Yy,pm.latLngToCoords=q_,pm.latLngsToCoords=Ky,pm.getFeature=mm,pm.asFeature=Xy,Ac.mergeOptions({boxZoom:!0});var bv=X0.extend({initialize:function(ct){this._map=ct,this._container=ct._container,this._pane=ct._panes.overlayPane,this._resetStateTimeout=0,ct.on("unload",this._destroy,this)},addHooks:function(){Ou(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){jh(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Tf(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(ct){if(!ct.shiftKey||ct.which!==1&&ct.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),L0(),Kc(),this._startPoint=this._map.mouseEventToContainerPoint(ct),Ou(document,{contextmenu:bg,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(ct){this._moved||(this._moved=!0,this._box=Cc("div","leaflet-zoom-box",this._container),Wu(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(ct);var Rt=new mo(this._point,this._startPoint),me=Rt.getSize();ic(this._box,Rt.min),this._box.style.width=me.x+"px",this._box.style.height=me.y+"px"},_finish:function(){this._moved&&(Tf(this._box),Rf(this._container,"leaflet-crosshair")),yg(),Dp(),jh(document,{contextmenu:bg,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(ct){if(!(ct.which!==1&&ct.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(_t(this._resetState,this),0);var Rt=new xl(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(Rt).fire("boxzoomend",{boxZoomBounds:Rt})}},_onKeyDown:function(ct){ct.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ac.addInitHook("addHandler","boxZoom",bv),Ac.mergeOptions({doubleClickZoom:!0});var x0=X0.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(ct){var Rt=this._map,me=Rt.getZoom(),tr=Rt.options.zoomDelta,zr=ct.originalEvent.shiftKey?me-tr:me+tr;Rt.options.doubleClickZoom==="center"?Rt.setZoom(zr):Rt.setZoomAround(ct.containerPoint,zr)}});Ac.addInitHook("addHandler","doubleClickZoom",x0),Ac.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var D0=X0.extend({addHooks:function(){if(!this._draggable){var ct=this._map;this._draggable=new Um(ct._mapPane,ct._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),ct.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),ct.on("zoomend",this._onZoomEnd,this),ct.whenReady(this._onZoomEnd,this))}Wu(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Rf(this._map._container,"leaflet-grab"),Rf(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var ct=this._map;if(ct._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var Rt=ko(this._map.options.maxBounds);this._offsetLimit=Ts(this._map.latLngToContainerPoint(Rt.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(Rt.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;ct.fire("movestart").fire("dragstart"),ct.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(ct){if(this._map.options.inertia){var Rt=this._lastTime=+new Date,me=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(me),this._times.push(Rt),this._prunePositions(Rt)}this._map.fire("move",ct).fire("drag",ct)},_prunePositions:function(ct){for(;this._positions.length>1&&ct-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var ct=this._map.getSize().divideBy(2),Rt=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=Rt.subtract(ct).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(ct,Rt){return ct-(ct-Rt)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var ct=this._draggable._newPos.subtract(this._draggable._startPos),Rt=this._offsetLimit;ct.xRt.max.x&&(ct.x=this._viscousLimit(ct.x,Rt.max.x)),ct.y>Rt.max.y&&(ct.y=this._viscousLimit(ct.y,Rt.max.y)),this._draggable._newPos=this._draggable._startPos.add(ct)}},_onPreDragWrap:function(){var ct=this._worldWidth,Rt=Math.round(ct/2),me=this._initialWorldOffset,tr=this._draggable._newPos.x,zr=(tr-Rt+me)%ct+Rt-me,An=(tr+Rt+me)%ct-Rt-me,Zi=Math.abs(zr+me)0?An:-An))-Rt;this._delta=0,this._startTime=null,Zi&&(ct.options.scrollWheelZoom==="center"?ct.setZoom(Rt+Zi):ct.setZoomAround(this._lastMousePos,Rt+Zi))}});Ac.addInitHook("addHandler","scrollWheelZoom",Lg);var Bw=600;Ac.mergeOptions({tapHold:Cl.touchNative&&Cl.safari&&Cl.mobile,tapTolerance:15});var Rw=X0.extend({addHooks:function(){Ou(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){jh(this._map._container,"touchstart",this._onDown,this)},_onDown:function(ct){if(clearTimeout(this._holdTimeout),ct.touches.length===1){var Rt=ct.touches[0];this._startPos=this._newPos=new la(Rt.clientX,Rt.clientY),this._holdTimeout=setTimeout(_t(function(){this._cancel(),this._isTapValid()&&(Ou(document,"touchend",mc),Ou(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",Rt))},this),Bw),Ou(document,"touchend touchcancel contextmenu",this._cancel,this),Ou(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function ct(){jh(document,"touchend",mc),jh(document,"touchend touchcancel",ct)},_cancel:function(){clearTimeout(this._holdTimeout),jh(document,"touchend touchcancel contextmenu",this._cancel,this),jh(document,"touchmove",this._onMove,this)},_onMove:function(ct){var Rt=ct.touches[0];this._newPos=new la(Rt.clientX,Rt.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(ct,Rt){var me=new MouseEvent(ct,{bubbles:!0,cancelable:!0,view:window,screenX:Rt.screenX,screenY:Rt.screenY,clientX:Rt.clientX,clientY:Rt.clientY});me._simulated=!0,Rt.target.dispatchEvent(me)}});Ac.addInitHook("addHandler","tapHold",Rw),Ac.mergeOptions({touchZoom:Cl.touch,bounceAtZoomLimits:!0});var F0=X0.extend({addHooks:function(){Wu(this._map._container,"leaflet-touch-zoom"),Ou(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Rf(this._map._container,"leaflet-touch-zoom"),jh(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(ct){var Rt=this._map;if(!(!ct.touches||ct.touches.length!==2||Rt._animatingZoom||this._zooming)){var me=Rt.mouseEventToContainerPoint(ct.touches[0]),tr=Rt.mouseEventToContainerPoint(ct.touches[1]);this._centerPoint=Rt.getSize()._divideBy(2),this._startLatLng=Rt.containerPointToLatLng(this._centerPoint),Rt.options.touchZoom!=="center"&&(this._pinchStartLatLng=Rt.containerPointToLatLng(me.add(tr)._divideBy(2))),this._startDist=me.distanceTo(tr),this._startZoom=Rt.getZoom(),this._moved=!1,this._zooming=!0,Rt._stop(),Ou(document,"touchmove",this._onTouchMove,this),Ou(document,"touchend touchcancel",this._onTouchEnd,this),mc(ct)}},_onTouchMove:function(ct){if(!(!ct.touches||ct.touches.length!==2||!this._zooming)){var Rt=this._map,me=Rt.mouseEventToContainerPoint(ct.touches[0]),tr=Rt.mouseEventToContainerPoint(ct.touches[1]),zr=me.distanceTo(tr)/this._startDist;if(this._zoom=Rt.getScaleZoom(zr,this._startZoom),!Rt.options.bounceAtZoomLimits&&(this._zoomRt.getMaxZoom()&&zr>1)&&(this._zoom=Rt._limitZoom(this._zoom)),Rt.options.touchZoom==="center"){if(this._center=this._startLatLng,zr===1)return}else{var An=me._add(tr)._divideBy(2)._subtract(this._centerPoint);if(zr===1&&An.x===0&&An.y===0)return;this._center=Rt.unproject(Rt.project(this._pinchStartLatLng,this._zoom).subtract(An),this._zoom)}this._moved||(Rt._moveStart(!0,!1),this._moved=!0),Li(this._animRequest);var Zi=_t(Rt._move,Rt,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Ri(Zi,this,!0),mc(ct)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Li(this._animRequest),jh(document,"touchmove",this._onTouchMove,this),jh(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Ac.addInitHook("addHandler","touchZoom",F0),Ac.BoxZoom=bv,Ac.DoubleClickZoom=x0,Ac.Drag=D0,Ac.Keyboard=Fw,Ac.ScrollWheelZoom=Lg,Ac.TapHold=Rw,Ac.TouchZoom=F0,E.Bounds=mo,E.Browser=Cl,E.CRS=ma,E.Canvas=Ow,E.Circle=Zy,E.CircleMarker=$y,E.Class=Hn,E.Control=up,E.DivIcon=Iw,E.DivOverlay=J0,E.DomEvent=Fp,E.DomUtil=kc,E.Draggable=Um,E.Evented=Qn,E.FeatureGroup=wp,E.GeoJSON=pm,E.GridLayer=I1,E.Handler=X0,E.Icon=Vm,E.ImageOverlay=gm,E.LatLng=ro,E.LatLngBounds=xl,E.Layer=a0,E.LayerGroup=Eg,E.LineUtil=tf,E.Map=Ac,E.Marker=L1,E.Mixin=cp,E.Path=Hm,E.Point=la,E.PolyUtil=b6,E.Polygon=_v,E.Polyline=y0,E.Popup=Cg,E.PosAnimation=C1,E.Projection=j_,E.Rectangle=s0,E.Renderer=ym,E.SVG=Bp,E.SVGOverlay=G_,E.TileLayer=o0,E.Tooltip=P1,E.Transformation=qo,E.Util=$n,E.VideoOverlay=z0,E.bind=_t,E.bounds=Ts,E.canvas=K_,E.circle=xv,E.circleMarker=Ew,E.control=i0,E.divIcon=S6,E.extend=Y,E.featureGroup=Sw,E.geoJSON=Z_,E.geoJson=Jy,E.gridLayer=Y_,E.icon=V_,E.imageOverlay=vm,E.latLng=Ia,E.latLngBounds=ko,E.layerGroup=qy,E.map=Vs,E.marker=T6,E.point=no,E.polygon=A6,E.polyline=Cw,E.popup=vf,E.rectangle=O0,E.setOptions=kr,E.stamp=jt,E.svg=Dw,E.svgOverlay=M6,E.tileLayer=Qy,E.tooltip=Pw,E.transformation=_i,E.version=R,E.videoOverlay=ef;var B0=window.L;E.noConflict=function(){return window.L=B0,this},window.L=E})}(v2,v2.exports)),v2.exports}var qot=Wot();const Mm=tD(qot),rP=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],R8=1,o2=8;class mM{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[E,R]=new Uint8Array(s,0,2);if(E!==219)throw new Error("Data does not appear to be in a KDBush format.");const Y=R>>4;if(Y!==R8)throw new Error(`Got v${Y} data when expected v${R8}.`);const dt=rP[R&15];if(!dt)throw new Error("Unrecognized array type.");const[_t]=new Uint16Array(s,2,1),[zt]=new Uint32Array(s,4,1);return new mM(zt,_t,dt,s)}constructor(s,E=64,R=Float64Array,Y){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+E,2),65535),this.ArrayType=R,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;const dt=rP.indexOf(this.ArrayType),_t=s*2*this.ArrayType.BYTES_PER_ELEMENT,zt=s*this.IndexArrayType.BYTES_PER_ELEMENT,jt=(8-zt%8)%8;if(dt<0)throw new Error(`Unexpected typed array class: ${R}.`);Y&&Y instanceof ArrayBuffer?(this.data=Y,this.ids=new this.IndexArrayType(this.data,o2,s),this.coords=new this.ArrayType(this.data,o2+zt+jt,s*2),this._pos=s*2,this._finished=!0):(this.data=new ArrayBuffer(o2+_t+zt+jt),this.ids=new this.IndexArrayType(this.data,o2,s),this.coords=new this.ArrayType(this.data,o2+zt+jt,s*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(R8<<4)+dt]),new Uint16Array(this.data,2,1)[0]=E,new Uint32Array(this.data,4,1)[0]=s)}add(s,E){const R=this._pos>>1;return this.ids[R]=R,this.coords[this._pos++]=s,this.coords[this._pos++]=E,R}finish(){const s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return EA(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,E,R,Y){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:dt,coords:_t,nodeSize:zt}=this,jt=[0,dt.length-1,0],te=[];for(;jt.length;){const ce=jt.pop()||0,Ie=jt.pop()||0,Je=jt.pop()||0;if(Ie-Je<=zt){for(let Vr=Je;Vr<=Ie;Vr++){const fn=_t[2*Vr],Dt=_t[2*Vr+1];fn>=s&&fn<=R&&Dt>=E&&Dt<=Y&&te.push(dt[Vr])}continue}const fr=Je+Ie>>1,Ar=_t[2*fr],kr=_t[2*fr+1];Ar>=s&&Ar<=R&&kr>=E&&kr<=Y&&te.push(dt[fr]),(ce===0?s<=Ar:E<=kr)&&(jt.push(Je),jt.push(fr-1),jt.push(1-ce)),(ce===0?R>=Ar:Y>=kr)&&(jt.push(fr+1),jt.push(Ie),jt.push(1-ce))}return te}within(s,E,R){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Y,coords:dt,nodeSize:_t}=this,zt=[0,Y.length-1,0],jt=[],te=R*R;for(;zt.length;){const ce=zt.pop()||0,Ie=zt.pop()||0,Je=zt.pop()||0;if(Ie-Je<=_t){for(let Vr=Je;Vr<=Ie;Vr++)nP(dt[2*Vr],dt[2*Vr+1],s,E)<=te&&jt.push(Y[Vr]);continue}const fr=Je+Ie>>1,Ar=dt[2*fr],kr=dt[2*fr+1];nP(Ar,kr,s,E)<=te&&jt.push(Y[fr]),(ce===0?s-R<=Ar:E-R<=kr)&&(zt.push(Je),zt.push(fr-1),zt.push(1-ce)),(ce===0?s+R>=Ar:E+R>=kr)&&(zt.push(fr+1),zt.push(Ie),zt.push(1-ce))}return jt}}function EA(d,s,E,R,Y,dt){if(Y-R<=E)return;const _t=R+Y>>1;eD(d,s,_t,R,Y,dt),EA(d,s,E,R,_t-1,1-dt),EA(d,s,E,_t+1,Y,1-dt)}function eD(d,s,E,R,Y,dt){for(;Y>R;){if(Y-R>600){const te=Y-R+1,ce=E-R+1,Ie=Math.log(te),Je=.5*Math.exp(2*Ie/3),fr=.5*Math.sqrt(Ie*Je*(te-Je)/te)*(ce-te/2<0?-1:1),Ar=Math.max(R,Math.floor(E-ce*Je/te+fr)),kr=Math.min(Y,Math.floor(E+(te-ce)*Je/te+fr));eD(d,s,E,Ar,kr,dt)}const _t=s[2*E+dt];let zt=R,jt=Y;for(s2(d,s,R,E),s[2*Y+dt]>_t&&s2(d,s,R,Y);zt_t;)jt--}s[2*R+dt]===_t?s2(d,s,R,jt):(jt++,s2(d,s,jt,Y)),jt<=E&&(R=jt+1),E<=jt&&(Y=jt-1)}}function s2(d,s,E,R){N8(d,E,R),N8(s,2*E,2*R),N8(s,2*E+1,2*R+1)}function N8(d,s,E){const R=d[s];d[s]=d[E],d[E]=R}function nP(d,s,E,R){const Y=d-E,dt=s-R;return Y*Y+dt*dt}const $ot={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:d=>d},iP=Math.fround||(d=>s=>(d[0]=+s,d[0]))(new Float32Array(1)),hy=2,c1=3,j8=4,a1=5,rD=6;class Zot{constructor(s){this.options=Object.assign(Object.create($ot),s),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(s){const{log:E,minZoom:R,maxZoom:Y}=this.options;E&&console.time("total time");const dt=`prepare ${s.length} points`;E&&console.time(dt),this.points=s;const _t=[];for(let jt=0;jt=R;jt--){const te=+Date.now();zt=this.trees[jt]=this._createTree(this._cluster(zt,jt)),E&&console.log("z%d: %d clusters in %dms",jt,zt.numItems,+Date.now()-te)}return E&&console.timeEnd("total time"),this}getClusters(s,E){let R=((s[0]+180)%360+360)%360-180;const Y=Math.max(-90,Math.min(90,s[1]));let dt=s[2]===180?180:((s[2]+180)%360+360)%360-180;const _t=Math.max(-90,Math.min(90,s[3]));if(s[2]-s[0]>=360)R=-180,dt=180;else if(R>dt){const Ie=this.getClusters([R,Y,180,_t],E),Je=this.getClusters([-180,Y,dt,_t],E);return Ie.concat(Je)}const zt=this.trees[this._limitZoom(E)],jt=zt.range(z5(R),O5(_t),z5(dt),O5(Y)),te=zt.data,ce=[];for(const Ie of jt){const Je=this.stride*Ie;ce.push(te[Je+a1]>1?aP(te,Je,this.clusterProps):this.points[te[Je+c1]])}return ce}getChildren(s){const E=this._getOriginId(s),R=this._getOriginZoom(s),Y="No cluster with the specified id.",dt=this.trees[R];if(!dt)throw new Error(Y);const _t=dt.data;if(E*this.stride>=_t.length)throw new Error(Y);const zt=this.options.radius/(this.options.extent*Math.pow(2,R-1)),jt=_t[E*this.stride],te=_t[E*this.stride+1],ce=dt.within(jt,te,zt),Ie=[];for(const Je of ce){const fr=Je*this.stride;_t[fr+j8]===s&&Ie.push(_t[fr+a1]>1?aP(_t,fr,this.clusterProps):this.points[_t[fr+c1]])}if(Ie.length===0)throw new Error(Y);return Ie}getLeaves(s,E,R){E=E||10,R=R||0;const Y=[];return this._appendLeaves(Y,s,E,R,0),Y}getTile(s,E,R){const Y=this.trees[this._limitZoom(s)],dt=Math.pow(2,s),{extent:_t,radius:zt}=this.options,jt=zt/_t,te=(R-jt)/dt,ce=(R+1+jt)/dt,Ie={features:[]};return this._addTileFeatures(Y.range((E-jt)/dt,te,(E+1+jt)/dt,ce),Y.data,E,R,dt,Ie),E===0&&this._addTileFeatures(Y.range(1-jt/dt,te,1,ce),Y.data,dt,R,dt,Ie),E===dt-1&&this._addTileFeatures(Y.range(0,te,jt/dt,ce),Y.data,-1,R,dt,Ie),Ie.features.length?Ie:null}getClusterExpansionZoom(s){let E=this._getOriginZoom(s)-1;for(;E<=this.options.maxZoom;){const R=this.getChildren(s);if(E++,R.length!==1)break;s=R[0].properties.cluster_id}return E}_appendLeaves(s,E,R,Y,dt){const _t=this.getChildren(E);for(const zt of _t){const jt=zt.properties;if(jt&&jt.cluster?dt+jt.point_count<=Y?dt+=jt.point_count:dt=this._appendLeaves(s,jt.cluster_id,R,Y,dt):dt1;let ce,Ie,Je;if(te)ce=nD(E,jt,this.clusterProps),Ie=E[jt],Je=E[jt+1];else{const kr=this.points[E[jt+c1]];ce=kr.properties;const[Vr,fn]=kr.geometry.coordinates;Ie=z5(Vr),Je=O5(fn)}const fr={type:1,geometry:[[Math.round(this.options.extent*(Ie*dt-R)),Math.round(this.options.extent*(Je*dt-Y))]],tags:ce};let Ar;te||this.options.generateId?Ar=E[jt+c1]:Ar=this.points[E[jt+c1]].id,Ar!==void 0&&(fr.id=Ar),_t.features.push(fr)}}_limitZoom(s){return Math.max(this.options.minZoom,Math.min(Math.floor(+s),this.options.maxZoom+1))}_cluster(s,E){const{radius:R,extent:Y,reduce:dt,minPoints:_t}=this.options,zt=R/(Y*Math.pow(2,E)),jt=s.data,te=[],ce=this.stride;for(let Ie=0;IeE&&(Vr+=jt[Dt+a1])}if(Vr>kr&&Vr>=_t){let fn=Je*kr,Dt=fr*kr,cn,ti=-1;const Dn=((Ie/ce|0)<<5)+(E+1)+this.points.length;for(const ii of Ar){const Vi=ii*ce;if(jt[Vi+hy]<=E)continue;jt[Vi+hy]=E;const Nn=jt[Vi+a1];fn+=jt[Vi]*Nn,Dt+=jt[Vi+1]*Nn,jt[Vi+j8]=Dn,dt&&(cn||(cn=this._map(jt,Ie,!0),ti=this.clusterProps.length,this.clusterProps.push(cn)),dt(cn,this._map(jt,Vi)))}jt[Ie+j8]=Dn,te.push(fn/Vr,Dt/Vr,1/0,Dn,-1,Vr),dt&&te.push(ti)}else{for(let fn=0;fn1)for(const fn of Ar){const Dt=fn*ce;if(!(jt[Dt+hy]<=E)){jt[Dt+hy]=E;for(let cn=0;cn>5}_getOriginZoom(s){return(s-this.points.length)%32}_map(s,E,R){if(s[E+a1]>1){const _t=this.clusterProps[s[E+rD]];return R?Object.assign({},_t):_t}const Y=this.points[s[E+c1]].properties,dt=this.options.map(Y);return R&&dt===Y?Object.assign({},dt):dt}}function aP(d,s,E){return{type:"Feature",id:d[s+c1],properties:nD(d,s,E),geometry:{type:"Point",coordinates:[Got(d[s]),Yot(d[s+1])]}}}function nD(d,s,E){const R=d[s+a1],Y=R>=1e4?`${Math.round(R/1e3)}k`:R>=1e3?`${Math.round(R/100)/10}k`:R,dt=d[s+rD],_t=dt===-1?{}:Object.assign({},E[dt]);return Object.assign(_t,{cluster:!0,cluster_id:d[s+c1],point_count:R,point_count_abbreviated:Y})}function z5(d){return d/360+.5}function O5(d){const s=Math.sin(d*Math.PI/180),E=.5-.25*Math.log((1+s)/(1-s))/Math.PI;return E<0?0:E>1?1:E}function Got(d){return(d-.5)*360}function Yot(d){const s=(180-d*360)*Math.PI/180;return 360*Math.atan(Math.exp(s))/Math.PI-90}const Kot={class:"map-container"},Xot={key:0,class:"flex items-center justify-center h-96 bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px]"},Jot={key:2,class:"map-legend"},Qot={class:"legend-footer"},tst={key:3,class:"map-attribution"},est=Ec({__name:"NetworkMap",props:{adverts:{},baseLatitude:{default:null},baseLongitude:{default:null}},setup(d,{expose:s}){typeof window<"u"&&!window.chrome&&(window.chrome={runtime:{}});const E=d,R=Ha();let Y=null;const dt=Ha(new Map);let _t=null;const zt=Ha(new Map),jt=Ha([]),te=Ha(!0),ce=Ha(60),Ie=Ha(14),Je=Wo(()=>E.baseLatitude!==null&&E.baseLongitude!==null&&typeof E.baseLatitude=="number"&&typeof E.baseLongitude=="number"&&E.baseLatitude!==0&&E.baseLongitude!==0&&Math.abs(E.baseLatitude)<=90&&Math.abs(E.baseLongitude)<=180),fr=Nn=>new Date(Nn*1e3).toLocaleString(),Ar=Nn=>Nn?`${Nn} dBm`:"N/A",kr=Nn=>Nn?`${Nn} dB`:"N/A",Vr=Nn=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Nn||0]||"Unknown",fn=(Nn,Wr,Bi,Ri)=>{const $n=(Bi-Nn)*Math.PI/180,Hn=(Ri-Wr)*Math.PI/180,sa=Math.sin($n/2)*Math.sin($n/2)+Math.cos(Nn*Math.PI/180)*Math.cos(Bi*Math.PI/180)*Math.sin(Hn/2)*Math.sin(Hn/2);return 6371*(2*Math.atan2(Math.sqrt(sa),Math.sqrt(1-sa)))},Dt=()=>{Y&&(jt.value.forEach(Nn=>{Y&&Nn.remove()}),jt.value.length=0,Y.remove(),Y=null),dt.value.clear(),zt.value.clear(),_t=null},cn=Nn=>{const Wr=new Map;return Nn.filter(Bi=>Bi.latitude!==null&&Bi.longitude!==null).map(Bi=>{let Ri=Bi.latitude,Li=Bi.longitude;const $n=`${Ri.toFixed(6)}_${Li.toFixed(6)}`,Hn=Wr.get($n)||0;if(Wr.set($n,Hn+1),Hn>0){const Ti=Hn*60*(Math.PI/180);Ri+=Math.sin(Ti)*.001*(Hn*.5),Li+=Math.cos(Ti)*.001*(Hn*.5)}return{type:"Feature",properties:{advert:{...Bi,jittered_latitude:Ri,jittered_longitude:Li}},geometry:{type:"Point",coordinates:[Li,Ri]}}})},ti=Nn=>{_t=new Zot({radius:ce.value,maxZoom:Ie.value,minPoints:2}),_t.load(Nn)},Dn=async()=>{if(!R.value||!Je.value){console.warn("Cannot initialize map: missing container or coordinates");return}Dt(),await S0();const Nn=E.baseLatitude,Wr=E.baseLongitude;try{Y=Mm.map(R.value,{center:[Nn,Wr],zoom:10,zoomControl:!0,scrollWheelZoom:!0,doubleClickZoom:!0,boxZoom:!0,keyboard:!0,attributionControl:!1});try{const Qn=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:'© OpenStreetMap contributors © CARTO',errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}),la=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:"",errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="});Qn.addTo(Y),la.addTo(Y)}catch(Qn){console.warn("Error loading tiles:",Qn)}const Bi=(Qn,la=!1)=>{const Eo=la?16:12;return Mm.divIcon({className:"custom-div-icon",html:`
`,iconSize:[Eo+4,Eo+4],iconAnchor:[(Eo+4)/2,(Eo+4)/2]})},Ri=Qn=>{const la=Qn<10?30:Qn<100?40:50;return Mm.divIcon({className:"custom-cluster-icon",html:`
- ${si} + ${Qn}
- `,iconSize:[Ma,Ma],iconAnchor:[Ma/2,Ma/2]})},Pi=Di("#ef4444",!0);Mm.marker([Un,qr],{icon:Pi}).addTo(K).bindPopup(` + `,iconSize:[la,la],iconAnchor:[la/2,la/2]})},Li=Bi("#ef4444",!0);Mm.marker([Nn,Wr],{icon:Li}).addTo(Y).bindPopup(`
Base Station
Base Station
- ${Un.toFixed(6)}, ${qr.toFixed(6)} + ${Nn.toFixed(6)}, ${Wr.toFixed(6)}
- `);const bi={Unknown:"#9CA3AF","Chat Node":"#60A5FA",Repeater:"#A5E5B6","Room Server":"#EBA0FC","Hybrid Node":"#FFC246"},Yi=(si,Ma,zo,ho,mo=0)=>{if(!K)return;const Ts=si.jittered_latitude||si.latitude,xl=si.jittered_longitude||si.longitude;if(Ts===null||xl===null)return;const ko=si.route_type||0;let ro=ho,Ia=3,da=.7,no;ko===2?(ro="#A5E5B6",Ia=4,da=.9):ko===1?(ro="#FFC246",no="10, 5",da=.8):ko===3?(ro="#059669",Ia=5,da=.95):ko===0?(ro="#ea580c",no="12, 6",da=.8):(ro="#9CA3AF",no="2, 5",da=.6);const po=[Ma,zo],us=[Ts,xl],Ho=Mm.polyline([po,us],{color:ro,weight:Ia,opacity:0,dashArray:no,className:"connection-line"}).addTo(K),vi=Mm.polyline([po,po],{color:ro,weight:Ia,opacity:0,dashArray:no,className:"connection-line animated-line"}).addTo(K);setTimeout(()=>{let wi=0;const hi=30;vi.setStyle({opacity:da+.2});const go=()=>{wi++;const Mo=wi/hi,To=po[0]+(us[0]-po[0])*Mo,ms=po[1]+(us[1]-po[1])*Mo;vi.setLatLngs([po,[To,ms]]),wi{K&&vi&&vi.remove(),Ho.setStyle({opacity:da}),Ho.on("mouseover",()=>{Ho.setStyle({weight:Ia+2,opacity:Math.min(da+.3,1)})}),Ho.on("mouseout",()=>{Ho.setStyle({weight:Ia,opacity:da})});const bs=mn(Ma,zo,Ts,xl);Ho.bindPopup(` + `);const $n={Unknown:"#9CA3AF","Chat Node":"#60A5FA",Repeater:"#A5E5B6","Room Server":"#EBA0FC","Hybrid Node":"#FFC246"},Hn=(Qn,la,Eo,no,mo=0)=>{if(!Y)return;const Ts=Qn.jittered_latitude||Qn.latitude,xl=Qn.jittered_longitude||Qn.longitude;if(Ts===null||xl===null)return;const ko=Qn.route_type||0;let ro=no,Ia=3,ma=.7,io;ko===2?(ro="#A5E5B6",Ia=4,ma=.9):ko===1?(ro="#FFC246",io="10, 5",ma=.8):ko===3?(ro="#059669",Ia=5,ma=.95):ko===0?(ro="#ea580c",io="12, 6",ma=.8):(ro="#9CA3AF",io="2, 5",ma=.6);const po=[la,Eo],us=[Ts,xl],qo=Mm.polyline([po,us],{color:ro,weight:Ia,opacity:0,dashArray:io,className:"connection-line"}).addTo(Y),_i=Mm.polyline([po,po],{color:ro,weight:Ia,opacity:0,dashArray:io,className:"connection-line animated-line"}).addTo(Y);setTimeout(()=>{let Ai=0;const pi=30;_i.setStyle({opacity:ma+.2});const go=()=>{Ai++;const Mo=Ai/pi,To=po[0]+(us[0]-po[0])*Mo,ms=po[1]+(us[1]-po[1])*Mo;_i.setLatLngs([po,[To,ms]]),Ai{Y&&_i&&_i.remove(),qo.setStyle({opacity:ma}),qo.on("mouseover",()=>{qo.setStyle({weight:Ia+2,opacity:Math.min(ma+.3,1)})}),qo.on("mouseout",()=>{qo.setStyle({weight:Ia,opacity:ma})});const bs=fn(la,Eo,Ts,xl);qo.bindPopup(`
- Connection to ${si.node_name||"Unknown Node"}
+ Connection to ${Qn.node_name||"Unknown Node"}
Distance: ${bs.toFixed(2)} km
- Route: ${Vr(si.route_type)}
- Signal: ${Mr(si.rssi)} / ${Tr(si.snr)} + Route: ${Vr(Qn.route_type)}
+ Signal: ${Ar(Qn.rssi)} / ${kr(Qn.snr)}
- `),jt.value.push(Ho)},200)};go()},mo)},Ca=()=>{if(!K||!_t)return;const si=K.getBounds(),Ma=Math.floor(K.getZoom());Ot.value.forEach(ho=>{K&&ho.remove()}),Ot.value.clear(),jt.value.forEach(ho=>{K&&ho.remove()}),jt.value.length=0,_t.getClusters([si.getWest(),si.getSouth(),si.getEast(),si.getNorth()],Ma).forEach(ho=>{const[mo,Ts]=ho.geometry.coordinates,xl=ho.properties;if(xl.cluster){const ko=Mm.marker([Ts,mo],{icon:Fi(xl.point_count||0)}).addTo(K);ko.on("click",()=>{if(K&&_t){const us=_t.getClusterExpansionZoom(xl.cluster_id);K.setView([Ts,mo],us)}});const Ia=_t.getLeaves(xl.cluster_id,1/0).map(us=>`
+ `),jt.value.push(qo)},200)};go()},mo)},sa=()=>{if(!Y||!_t)return;const Qn=Y.getBounds(),la=Math.floor(Y.getZoom());zt.value.forEach(no=>{Y&&no.remove()}),zt.value.clear(),jt.value.forEach(no=>{Y&&no.remove()}),jt.value.length=0,_t.getClusters([Qn.getWest(),Qn.getSouth(),Qn.getEast(),Qn.getNorth()],la).forEach(no=>{const[mo,Ts]=no.geometry.coordinates,xl=no.properties;if(xl.cluster){const ko=Mm.marker([Ts,mo],{icon:Ri(xl.point_count||0)}).addTo(Y);ko.on("click",()=>{if(Y&&_t){const us=_t.getClusterExpansionZoom(xl.cluster_id);Y.setView([Ts,mo],us)}});const Ia=_t.getLeaves(xl.cluster_id,1/0).map(us=>`
• ${us.properties.advert.node_name||"Unknown Node"} (${us.properties.advert.contact_type})
`).join("");ko.bindPopup(`
@@ -89,110 +89,110 @@ Click to zoom in and separate nodes
- `),Ot.value.set(`cluster-${xl.cluster_id}`,ko);const da=mn(Un,qr,Ts,mo),no=Math.min(Math.floor(da*5),200),po={node_name:`Cluster of ${xl.point_count} nodes`,contact_type:"Cluster",route_type:2,rssi:null,snr:null,jittered_latitude:Ts,jittered_longitude:mo,latitude:Ts,longitude:mo};Yi(po,Un,qr,"#AAE8E8",no)}else{const ko=xl.advert,ro=bi[ko.contact_type]||bi.Unknown,Ia=Di(ro),da=Ts,no=mo,po=mn(Un,qr,da,no),us=Mm.marker([da,no],{icon:Ia}).addTo(K).bindPopup(` + `),zt.value.set(`cluster-${xl.cluster_id}`,ko);const ma=fn(Nn,Wr,Ts,mo),io=Math.min(Math.floor(ma*5),200),po={node_name:`Cluster of ${xl.point_count} nodes`,contact_type:"Cluster",route_type:2,rssi:null,snr:null,jittered_latitude:Ts,jittered_longitude:mo,latitude:Ts,longitude:mo};Hn(po,Nn,Wr,"#AAE8E8",io)}else{const ko=xl.advert,ro=$n[ko.contact_type]||$n.Unknown,Ia=Bi(ro),ma=Ts,io=mo,po=fn(Nn,Wr,ma,io),us=Mm.marker([ma,io],{icon:Ia}).addTo(Y).bindPopup(`
${ko.node_name||"Unknown Node"}
Type: ${ko.contact_type}
Distance: ${po.toFixed(2)} km
- Signal: ${Mr(ko.rssi)} / ${Tr(ko.snr)}
+ Signal: ${Ar(ko.rssi)} / ${kr(ko.snr)}
Route: ${Vr(ko.route_type)}
- Last Seen: ${pr(ko.last_seen)} + Last Seen: ${fr(ko.last_seen)} ${ko.jittered_latitude?'
Position adjusted to separate overlapping nodes':""}
- `);pt.value.set(ko.pubkey,us),Ot.value.set(`node-${ko.pubkey}`,us);const Ho=Math.min(Math.floor(po*5),200),vi={...ko,jittered_latitude:da,jittered_longitude:no};Yi(vi,Un,qr,ro,Ho)}})},Ni=(si,Ma)=>{let zo=0;cn(E.adverts).forEach(mo=>{const Ts=mo.properties.advert;if(Ts.latitude!==null&&Ts.longitude!==null){const xl=bi[Ts.contact_type]||bi.Unknown,ko=Di(xl),ro=Ts.jittered_latitude||Ts.latitude,Ia=Ts.jittered_longitude||Ts.longitude,da=Mm.marker([ro,Ia],{icon:ko}).addTo(K).bindPopup(` + `);dt.value.set(ko.pubkey,us),zt.value.set(`node-${ko.pubkey}`,us);const qo=Math.min(Math.floor(po*5),200),_i={...ko,jittered_latitude:ma,jittered_longitude:io};Hn(_i,Nn,Wr,ro,qo)}})},Ti=(Qn,la)=>{let Eo=0;cn(E.adverts).forEach(mo=>{const Ts=mo.properties.advert;if(Ts.latitude!==null&&Ts.longitude!==null){const xl=$n[Ts.contact_type]||$n.Unknown,ko=Bi(xl),ro=Ts.jittered_latitude||Ts.latitude,Ia=Ts.jittered_longitude||Ts.longitude,ma=Mm.marker([ro,Ia],{icon:ko}).addTo(Y).bindPopup(`
${Ts.node_name||"Unknown Node"}
Type: ${Ts.contact_type}
- Distance: ${mn(si,Ma,ro,Ia).toFixed(2)} km
- Signal: ${Mr(Ts.rssi)} / ${Tr(Ts.snr)}
+ Distance: ${fn(Qn,la,ro,Ia).toFixed(2)} km
+ Signal: ${Ar(Ts.rssi)} / ${kr(Ts.snr)}
Route: ${Vr(Ts.route_type)}
- Last Seen: ${pr(Ts.last_seen)} + Last Seen: ${fr(Ts.last_seen)} ${Ts.jittered_latitude?'
Position adjusted to separate overlapping nodes':""}
- `);pt.value.set(Ts.pubkey,da);const no=da.getElement();no&&(no.style.opacity="0",no.style.transition="opacity 0.5s ease-out"),Yi(Ts,si,Ma,xl,zo),setTimeout(()=>{no&&(no.style.opacity="1")},zo+1e3),zo+=100}})};if(te.value&&E.adverts.length>0)try{const si=cn(E.adverts);Jn(si);const Ma=Math.min(14,K.getZoom());K.setZoom(Ma),setTimeout(()=>{try{Ca()}catch(zo){console.warn("Error updating clusters:",zo),Ni(Un,qr)}},100),K.on("moveend",()=>{try{Ca()}catch(zo){console.warn("Error updating clusters on move:",zo)}}),K.on("zoomend",()=>{try{Ca()}catch(zo){console.warn("Error updating clusters on zoom:",zo)}})}catch(si){console.warn("Error initializing clustering:",si),Ni(Un,qr)}else Ni(Un,qr);setTimeout(()=>{K&&K.invalidateSize()},1e3)}catch(Di){console.error("Error initializing map:",Di)}};return s({highlightNode:Un=>{const qr=pt.value.get(Un);if(qr){const Di=qr.getElement();if(Di){const Fi=Di.querySelector("div");Fi&&Fi.classList.add("marker-highlight")}}},unhighlightNode:Un=>{const qr=pt.value.get(Un);if(qr){const Di=qr.getElement();if(Di){const Fi=Di.querySelector("div");Fi&&Fi.classList.remove("marker-highlight")}}},initializeOpenStreetMap:Bn}),Em(()=>E.adverts,()=>{K&&er.value&&setTimeout(()=>{Bn()},100)},{immediate:!1}),bp(()=>{er.value&&E.adverts.length>0&&setTimeout(()=>{Bn()},300)}),Iy(()=>{Dt()}),(Un,qr)=>(_i(),zi("div",Cot,[er.value?(_i(),zi("div",{key:1,ref_key:"mapContainer",ref:B,class:"leaflet-map-container h-96 w-full bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden",style:{"min-height":"384px",position:"relative"}},null,512)):(_i(),zi("div",Lot,qr[0]||(qr[0]=[$f('

No valid coordinates available

Configure base station location to view map

',1)]))),er.value&&Un.adverts.length>0?(_i(),zi("div",Pot,[qr[1]||(qr[1]=$f('
Network Map
Node Types
Base Station
Chat Node
Repeater
Room Server
Hybrid Node
Unknown
2+
Cluster
Route Types
Direct
Transport Direct
Flood
Transport Flood
',3)),Ee("div",Iot,Qi(Un.adverts.length)+" node"+Qi(Un.adverts.length!==1?"s":"")+" visible ",1)])):is("",!0),er.value?(_i(),zi("div",zot," © OpenStreetMap contributors © CARTO ")):is("",!0)]))}}),Dot=ld(Oot,[["__scopeId","data-v-ab4f1a7c"]]),Fot={class:"relative","data-menu-container":""},Rot=Dc({__name:"NeighborMenu",props:{neighbor:{},canPing:{type:Boolean}},emits:["ping","delete"],setup(d,{emit:s}){const E=window.__neighborMenuManager||{activeMenu:null,setActiveMenu:Mr=>{if(E.activeMenu&&E.activeMenu!==Mr)try{E.activeMenu.closeMenu()}catch(Tr){console.warn("Error closing previous menu:",Tr)}E.activeMenu=Mr}};window.__neighborMenuManager=E;const B=d,K=s,pt=Ga(!1),_t=Ga(),Ot=Ga({top:0,left:0}),jt=()=>{pt.value=!1,document.removeEventListener("click",De,!0),document.removeEventListener("keydown",er),E.activeMenu===te&&(E.activeMenu=null)},te={closeMenu:jt},he=()=>{jt(),K("delete",B.neighbor)},De=Mr=>{Mr.target.closest("[data-menu-container]")||jt()},er=Mr=>{Mr.key==="Escape"&&jt()},pr=async()=>{if(!pt.value&&_t.value){E.setActiveMenu(te);const Mr=_t.value.getBoundingClientRect();Ot.value={top:Mr.bottom+4,left:Mr.left},pt.value=!0,await om(),document.addEventListener("click",De,!0),document.addEventListener("keydown",er)}else jt()};return Iy(()=>{jt()}),(Mr,Tr)=>(_i(),zi("div",Fot,[Ee("button",{ref_key:"buttonRef",ref:_t,onClick:pr,class:jo(["p-1 rounded hover:bg-white/10 transition-colors text-white/60 hover:text-white/80",{"bg-white/10 text-white/80":pt.value}]),"data-menu-container":""},Tr[0]||(Tr[0]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)]),2),(_i(),Z0(XA,{to:"body"},[pt.value?(_i(),zi("div",{key:0,class:"fixed w-36 bg-dark-card/90 backdrop-blur-lg border border-white/20 rounded-[15px] shadow-2xl z-[999999]",style:hm({top:Ot.value.top+"px",left:Ot.value.left+"px"}),"data-menu-container":""},[Ee("div",{class:"py-2"},[Ee("button",{onClick:he,class:"flex items-center gap-3 w-full px-4 py-3 text-sm text-accent-red hover:bg-accent-red/10 transition-colors"},Tr[1]||(Tr[1]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),Ee("span",{class:"font-medium"},"Delete",-1)]))])],4)):is("",!0)]))]))}}),Bot={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},Not={class:"flex items-center justify-between mb-4"},jot={class:"flex items-center gap-3"},Uot={class:"text-white text-lg font-semibold"},Vot={class:"bg-white/10 text-white text-xs px-2 py-1 rounded-full"},Hot={key:0,class:"flex bg-dark-card/30 backdrop-blur rounded-lg border border-white/10 p-1"},Wot={class:"overflow-x-auto"},qot={class:"w-full"},$ot={class:"bg-dark-bg/50"},Zot={class:"bg-dark-bg/30"},Got=["onMouseenter","onMouseleave"],Yot=["onClick","title"],Kot={key:0,class:"ml-1 text-xs"},Xot={key:0,class:"flex items-center gap-3"},Jot={class:"text-white/70"},Qot={class:"flex gap-1"},tst=["onClick"],est=["onClick"],rst={key:1,class:"text-dark-text"},nst={class:"flex items-center gap-2"},ist={class:"flex items-end gap-0.5"},ast={class:"flex items-center gap-2"},ost=["title"],sst=["title"],lst=Dc({__name:"NeighborTable",props:{contactType:{},contactTypeKey:{},adverts:{},color:{},baseLatitude:{default:null},baseLongitude:{default:null},isCompactView:{type:Boolean,default:!1},isFirstTable:{type:Boolean,default:!1},showViewToggle:{type:Boolean,default:!1}},emits:["highlight-node","unhighlight-node","menu-ping","menu-delete","toggle-view"],setup(d,{emit:s}){const E=Ga(null),B=d,K=s,pt=qr=>new Date(qr*1e3).toLocaleString(),_t=qr=>`${qr.slice(0,8)}...${qr.slice(-8)}`,Ot=qr=>{switch(qr){case 2:return{text:"Direct",bgColor:"bg-green-500/20",borderColor:"border-green-400/30",textColor:"text-green-400"};case 3:return{text:"Transport Direct",bgColor:"bg-green-600/20",borderColor:"border-green-500/30",textColor:"text-green-500"};case 1:return{text:"Flood",bgColor:"bg-yellow-500/20",borderColor:"border-yellow-400/30",textColor:"text-yellow-400"};case 0:return{text:"Transport Flood",bgColor:"bg-orange-500/20",borderColor:"border-orange-400/30",textColor:"text-orange-400"};default:return{text:"Unknown",bgColor:"bg-gray-500/20",borderColor:"border-gray-400/30",textColor:"text-gray-400"}}},jt=qr=>qr?`${qr} dBm`:"N/A",te=qr=>qr?`${qr} dB`:"N/A",he=(qr,Di,Fi,Pi)=>{const Yi=(Fi-qr)*Math.PI/180,Ca=(Pi-Di)*Math.PI/180,Ni=Math.sin(Yi/2)*Math.sin(Yi/2)+Math.cos(qr*Math.PI/180)*Math.cos(Fi*Math.PI/180)*Math.sin(Ca/2)*Math.sin(Ca/2);return 6371*(2*Math.atan2(Math.sqrt(Ni),Math.sqrt(1-Ni)))},De=qr=>B.baseLatitude===null||B.baseLongitude===null||qr.latitude===null||qr.longitude===null?"N/A":`${he(B.baseLatitude,B.baseLongitude,qr.latitude,qr.longitude).toFixed(1)} km`,er=async qr=>{try{return await navigator.clipboard.writeText(qr),!0}catch{const Di=document.createElement("textarea");return Di.value=qr,document.body.appendChild(Di),Di.select(),document.execCommand("copy"),document.body.removeChild(Di),!0}},pr=qr=>{const Di=Date.now(),Fi=qr*1e3,Pi=Di-Fi,bi=Math.floor(Pi/1e3),Yi=Math.floor(bi/60),Ca=Math.floor(Yi/60),Ni=Math.floor(Ca/24);return bi<60?`${bi}s ago`:Yi<60?`${Yi}m ago`:Ca<24?`${Ca}h ago`:`${Ni}d ago`},Mr=qr=>{const Di=Date.now(),Fi=qr*1e3,Pi=Di-Fi,bi=Math.floor(Pi/(1e3*60*60));return bi<1?{color:"text-green-400"}:bi<26?{color:"text-yellow-400"}:{color:"text-red-400"}},Tr=async(qr,Di)=>{const Fi=`${qr.toFixed(6)}, ${Di.toFixed(6)}`;await er(Fi)},Vr=(qr,Di)=>{const Fi=`https://www.google.com/maps?q=${qr},${Di}`;window.open(Fi,"_blank")},mn=async qr=>{await er(qr),E.value=qr,setTimeout(()=>{E.value=null},2e3)},Dt=qr=>qr?qr>=-50?{bars:5,color:"text-green-400"}:qr>=-60?{bars:4,color:"text-green-300"}:qr>=-70?{bars:3,color:"text-yellow-400"}:qr>=-80?{bars:2,color:"text-orange-400"}:qr>=-90?{bars:1,color:"text-red-400"}:{bars:0,color:"text-red-500"}:{bars:0,color:"text-gray-400"},cn=()=>B.isCompactView?"py-2 px-2":"py-4 px-3",Jn=()=>{K("toggle-view")},Bn=qr=>{K("highlight-node",qr)},ni=qr=>{K("unhighlight-node",qr)},Wi=qr=>{K("menu-ping",qr)},Un=qr=>{K("menu-delete",qr)};return(qr,Di)=>(_i(),zi("div",Bot,[Ee("div",Not,[Ee("div",jot,[Ee("div",{class:"w-3 h-3 rounded-full border border-white/20",style:hm({backgroundColor:qr.color})},null,4),Ee("h3",Uot,Qi(qr.contactType),1),Ee("span",Vot,Qi(qr.adverts.length),1)]),qr.isFirstTable&&qr.showViewToggle?(_i(),zi("div",Hot,[Ee("button",{onClick:Jn,class:jo(["p-2 rounded-md transition-colors",qr.isCompactView?"text-white/60 hover:text-primary hover:bg-primary/10":"bg-primary/20 text-primary border border-primary/30"]),title:"Comfortable view"},Di[0]||(Di[0]=[Ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"3",y:"3",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"12",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2),Ee("button",{onClick:Jn,class:jo(["p-2 rounded-md transition-colors",qr.isCompactView?"bg-primary/20 text-primary border border-primary/30":"text-white/60 hover:text-primary hover:bg-primary/10"]),title:"Compact view"},Di[1]||(Di[1]=[Ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"3",y:"3",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"10",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"17",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2)])):is("",!0)]),Ee("div",Wot,[Ee("table",qot,[Ee("thead",null,[Ee("tr",$ot,[Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},null,2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Node Name",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Public Key",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Location",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Distance",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Route Type",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"RSSI",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"SNR",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Last Seen",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"First Seen",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Advert Count",2)])]),Ee("tbody",Zot,[(_i(!0),zi(Pu,null,Jh(qr.adverts,Fi=>(_i(),zi("tr",{key:Fi.id,class:"hover:bg-white/5 transition-colors",onMouseenter:Pi=>Bn(Fi.pubkey),onMouseleave:Pi=>ni(Fi.pubkey)},[Ee("td",{class:jo(cn())},[Wl(Rot,{neighbor:Fi,onPing:Wi,onDelete:Un},null,8,["neighbor"])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(Fi.node_name||"Unknown"),3),Ee("td",{class:jo(`${cn()} text-white text-sm font-mono`)},[Ee("button",{onClick:Pi=>mn(Fi.pubkey),class:jo(["text-white hover:text-primary-light transition-colors cursor-pointer underline underline-offset-2 decoration-white/30 hover:decoration-primary-light/60",E.value===Fi.pubkey?"text-green-400 decoration-green-400/60":""]),title:E.value===Fi.pubkey?"Copied!":"Click to copy full public key"},[Qu(Qi(_t(Fi.pubkey))+" ",1),E.value===Fi.pubkey?(_i(),zi("span",Kot,"✓")):is("",!0)],10,Yot)],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Fi.latitude!==null&&Fi.longitude!==null?(_i(),zi("div",Xot,[Ee("span",Jot,Qi(Fi.latitude.toFixed(4))+", "+Qi(Fi.longitude.toFixed(4)),1),Ee("div",Qot,[Ee("button",{onClick:Pi=>Tr(Fi.latitude,Fi.longitude),class:"text-white/60 hover:text-white transition-colors cursor-pointer",title:"Copy coordinates to clipboard"},Di[2]||(Di[2]=[Ee("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2"}),Ee("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1",stroke:"currentColor","stroke-width":"2"})],-1)]),8,tst),Ee("button",{onClick:Pi=>Vr(Fi.latitude,Fi.longitude),class:"text-white/60 hover:text-blue-400 transition-colors cursor-pointer",title:"Open in Google Maps"},Di[3]||(Di[3]=[Ee("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z",stroke:"currentColor","stroke-width":"2"}),Ee("circle",{cx:"12",cy:"10",r:"3",stroke:"currentColor","stroke-width":"2"})],-1)]),8,est)])])):(_i(),zi("span",rst,"Unknown"))],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(De(Fi)),3),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("span",{class:jo(["inline-block px-2 py-1 rounded-full text-xs border transition-colors",Ot(Fi.route_type).bgColor,Ot(Fi.route_type).borderColor,Ot(Fi.route_type).textColor])},Qi(Ot(Fi.route_type).text),3)],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("div",nst,[Ee("div",ist,[(_i(),zi(Pu,null,Jh(5,Pi=>Ee("div",{key:Pi,class:jo(["w-1 transition-colors",Pi<=Dt(Fi.rssi).bars?Dt(Fi.rssi).color:"text-gray-600"]),style:hm({height:`${4+Pi*2}px`})},Di[4]||(Di[4]=[Ee("div",{class:"w-full h-full bg-current rounded-sm"},null,-1)]),6)),64))]),Ee("span",{class:jo(Dt(Fi.rssi).color)},Qi(jt(Fi.rssi)),3)])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(te(Fi.snr)),3),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("div",ast,[Ee("div",{class:jo(["w-2 h-2 rounded-full",Mr(Fi.last_seen).color==="text-green-400"?"bg-green-400":"",Mr(Fi.last_seen).color==="text-yellow-400"?"bg-yellow-400":"",Mr(Fi.last_seen).color==="text-red-400"?"bg-red-400":""])},null,2),Ee("span",{class:jo([Mr(Fi.last_seen).color,"cursor-help"]),title:pt(Fi.last_seen)},Qi(pr(Fi.last_seen)),11,ost)])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("span",{title:pt(Fi.first_seen),class:"cursor-help"},Qi(pr(Fi.first_seen)),9,sst)],2),Ee("td",{class:jo(`${cn()} text-white text-sm text-center`)},Qi(Fi.advert_count),3)],40,Got))),128))])])])]))}}),ust={class:"space-y-6"},cst={key:0,class:"flex items-center justify-center py-12"},hst={key:1,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},fst={class:"flex items-center gap-3"},dst={class:"text-accent-red/80 text-sm"},pst={key:0,class:"text-center py-12"},mst=Dc({name:"NeighborsView",__name:"Neighbors",setup(d){const s=Om(),E={0:"Unknown",1:"Chat Node",2:"Repeater",3:"Room Server",4:"Hybrid Node"},B={0:"#6b7280",1:"#60a5fa",2:"#34d399",3:"#a855f7",4:"#f59e0b"},K=Ga({}),pt=Ga(!0),_t=Ga(null),Ot=Ga(!1),jt=Ga(!1),te=Ga(null),he=$o(()=>{if(!te.value)return null;const Un=te.value;return{id:Un.id,pubkey:Un.pubkey,node_name:Un.node_name,contact_type:Un.contact_type,latitude:Un.latitude,longitude:Un.longitude,rssi:Un.rssi,snr:Un.snr,route_type:Un.route_type,last_seen:Un.last_seen,first_seen:Un.first_seen,advert_count:Un.advert_count,timestamp:Un.timestamp,is_repeater:Un.is_repeater,is_new_neighbor:Un.is_new_neighbor}}),De=$o(()=>s.stats?.config?.repeater?.latitude),er=$o(()=>s.stats?.config?.repeater?.longitude),pr=$o(()=>Object.entries(E).filter(([Un])=>K.value[Un]?.length>0).sort(([Un],[qr])=>parseInt(Un)-parseInt(qr))),Mr=$o(()=>Object.values(K.value).flat().filter(Un=>Un.latitude!==null&&Un.longitude!==null)),Tr=async Un=>{try{const qr=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(Un)}&hours=168`);return qr.success&&Array.isArray(qr.data)?qr.data:[]}catch(qr){return console.error(`Error fetching adverts for contact type ${Un}:`,qr),[]}},Vr=async()=>{pt.value=!0,_t.value=null;try{K.value={};for(const[Un,qr]of Object.entries(E)){const Di=await Tr(qr);Di.length>0&&(K.value[Un]=Di)}}catch(Un){console.error("Error loading adverts:",Un),_t.value=Un instanceof Error?Un.message:"Failed to load neighbor data"}finally{pt.value=!1}},mn=Ga(),Dt=Un=>{mn.value?.highlightNode(Un)},cn=Un=>{mn.value?.unhighlightNode(Un)},Jn=async Un=>{const qr=Un;try{const Di=await Ah.post("/ping_neighbor",{pubkey:qr.pubkey});Di.success?console.log("Ping sent successfully"):console.error("Failed to ping neighbor:",Di.error)}catch(Di){console.error("Error pinging neighbor:",Di)}},Bn=Un=>{te.value=Un,jt.value=!0},ni=()=>{jt.value=!1,te.value=null},Wi=async Un=>{try{await Ah.deleteAdvert(Un),await Vr(),ni()}catch(qr){console.error("Error deleting neighbor:",qr)}};return bp(async()=>{await Vr()}),(Un,qr)=>(_i(),zi("div",ust,[pt.value?(_i(),zi("div",cst,qr[1]||(qr[1]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),Ee("p",{class:"text-dark-text"},"Loading neighbor data...")],-1)]))):_t.value?(_i(),zi("div",hst,[Ee("div",fst,[qr[3]||(qr[3]=Ee("svg",{class:"w-5 h-5 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Ee("div",null,[qr[2]||(qr[2]=Ee("h3",{class:"text-accent-red font-medium"},"Error Loading Neighbors",-1)),Ee("p",dst,Qi(_t.value),1)])])])):(_i(),zi(Pu,{key:2},[Wl(Dot,{ref_key:"networkMapRef",ref:mn,adverts:Mr.value,"base-latitude":De.value,"base-longitude":er.value},null,8,["adverts","base-latitude","base-longitude"]),(_i(!0),zi(Pu,null,Jh(pr.value,([Di,Fi])=>(_i(),zi("div",{key:Di,class:"space-y-6"},[Wl(lst,{"contact-type":Fi,"contact-type-key":Di,adverts:K.value[Di],color:B[parseInt(Di)],"base-latitude":De.value,"base-longitude":er.value,"is-compact-view":Ot.value,"is-first-table":Di===pr.value[0]?.[0],"show-view-toggle":pr.value.length>0,onHighlightNode:Dt,onUnhighlightNode:cn,onMenuPing:Jn,onMenuDelete:Bn,onToggleView:qr[0]||(qr[0]=Pi=>Ot.value=!Ot.value)},null,8,["contact-type","contact-type-key","adverts","color","base-latitude","base-longitude","is-compact-view","is-first-table","show-view-toggle"])]))),128)),pr.value.length===0?(_i(),zi("div",pst,[qr[4]||(qr[4]=$f('

No Neighbors Found

No mesh neighbors have been discovered in your area yet.

',3)),Ee("button",{onClick:Vr,class:"mt-4 px-4 py-2 bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Refresh ")])):is("",!0)],64)),Wl(bot,{show:jt.value,neighbor:he.value,onClose:ni,onDelete:Wi},null,8,["show","neighbor"])]))}});/*! + `);dt.value.set(Ts.pubkey,ma);const io=ma.getElement();io&&(io.style.opacity="0",io.style.transition="opacity 0.5s ease-out"),Hn(Ts,Qn,la,xl,Eo),setTimeout(()=>{io&&(io.style.opacity="1")},Eo+1e3),Eo+=100}})};if(te.value&&E.adverts.length>0)try{const Qn=cn(E.adverts);ti(Qn);const la=Math.min(14,Y.getZoom());Y.setZoom(la),setTimeout(()=>{try{sa()}catch(Eo){console.warn("Error updating clusters:",Eo),Ti(Nn,Wr)}},100),Y.on("moveend",()=>{try{sa()}catch(Eo){console.warn("Error updating clusters on move:",Eo)}}),Y.on("zoomend",()=>{try{sa()}catch(Eo){console.warn("Error updating clusters on zoom:",Eo)}})}catch(Qn){console.warn("Error initializing clustering:",Qn),Ti(Nn,Wr)}else Ti(Nn,Wr);setTimeout(()=>{Y&&Y.invalidateSize()},1e3)}catch(Bi){console.error("Error initializing map:",Bi)}};return s({highlightNode:Nn=>{const Wr=dt.value.get(Nn);if(Wr){const Bi=Wr.getElement();if(Bi){const Ri=Bi.querySelector("div");Ri&&Ri.classList.add("marker-highlight")}}},unhighlightNode:Nn=>{const Wr=dt.value.get(Nn);if(Wr){const Bi=Wr.getElement();if(Bi){const Ri=Bi.querySelector("div");Ri&&Ri.classList.remove("marker-highlight")}}},initializeOpenStreetMap:Dn}),Em(()=>E.adverts,()=>{Y&&Je.value&&setTimeout(()=>{Dn()},100)},{immediate:!1}),op(()=>{Je.value&&E.adverts.length>0&&setTimeout(()=>{Dn()},300)}),Oy(()=>{Dt()}),(Nn,Wr)=>(ci(),wi("div",Kot,[Je.value?(ci(),wi("div",{key:1,ref_key:"mapContainer",ref:R,class:"leaflet-map-container h-96 w-full bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden",style:{"min-height":"384px",position:"relative"}},null,512)):(ci(),wi("div",Xot,Wr[0]||(Wr[0]=[Ff('

No valid coordinates available

Configure base station location to view map

',1)]))),Je.value&&Nn.adverts.length>0?(ci(),wi("div",Jot,[Wr[1]||(Wr[1]=Ff('
Network Map
Node Types
Base Station
Chat Node
Repeater
Room Server
Hybrid Node
Unknown
2+
Cluster
Route Types
Direct
Transport Direct
Flood
Transport Flood
',3)),ye("div",Qot,Fi(Nn.adverts.length)+" node"+Fi(Nn.adverts.length!==1?"s":"")+" visible ",1)])):Uo("",!0),Je.value?(ci(),wi("div",tst," © OpenStreetMap contributors © CARTO ")):Uo("",!0)]))}}),rst=Bf(est,[["__scopeId","data-v-ab4f1a7c"]]),nst={class:"relative","data-menu-container":""},ist=Ec({__name:"NeighborMenu",props:{neighbor:{},canPing:{type:Boolean}},emits:["ping","delete"],setup(d,{emit:s}){const E=window.__neighborMenuManager||{activeMenu:null,setActiveMenu:Ar=>{if(E.activeMenu&&E.activeMenu!==Ar)try{E.activeMenu.closeMenu()}catch(kr){console.warn("Error closing previous menu:",kr)}E.activeMenu=Ar}};window.__neighborMenuManager=E;const R=d,Y=s,dt=Ha(!1),_t=Ha(),zt=Ha({top:0,left:0}),jt=()=>{dt.value=!1,document.removeEventListener("click",Ie,!0),document.removeEventListener("keydown",Je),E.activeMenu===te&&(E.activeMenu=null)},te={closeMenu:jt},ce=()=>{jt(),Y("delete",R.neighbor)},Ie=Ar=>{Ar.target.closest("[data-menu-container]")||jt()},Je=Ar=>{Ar.key==="Escape"&&jt()},fr=async()=>{if(!dt.value&&_t.value){E.setActiveMenu(te);const Ar=_t.value.getBoundingClientRect();zt.value={top:Ar.bottom+4,left:Ar.left},dt.value=!0,await S0(),document.addEventListener("click",Ie,!0),document.addEventListener("keydown",Je)}else jt()};return Oy(()=>{jt()}),(Ar,kr)=>(ci(),wi("div",nst,[ye("button",{ref_key:"buttonRef",ref:_t,onClick:fr,class:Fo(["p-1 rounded hover:bg-white/10 transition-colors text-white/60 hover:text-white/80",{"bg-white/10 text-white/80":dt.value}]),"data-menu-container":""},kr[0]||(kr[0]=[ye("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)]),2),(ci(),G0(QA,{to:"body"},[dt.value?(ci(),wi("div",{key:0,class:"fixed w-36 bg-dark-card/90 backdrop-blur-lg border border-white/20 rounded-[15px] shadow-2xl z-[999999]",style:hm({top:zt.value.top+"px",left:zt.value.left+"px"}),"data-menu-container":""},[ye("div",{class:"py-2"},[ye("button",{onClick:ce,class:"flex items-center gap-3 w-full px-4 py-3 text-sm text-accent-red hover:bg-accent-red/10 transition-colors"},kr[1]||(kr[1]=[ye("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),ye("span",{class:"font-medium"},"Delete",-1)]))])],4)):Uo("",!0)]))]))}}),ast={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},ost={class:"flex items-center justify-between mb-4"},sst={class:"flex items-center gap-3"},lst={class:"text-white text-lg font-semibold"},ust={class:"bg-white/10 text-white text-xs px-2 py-1 rounded-full"},cst={key:0,class:"flex bg-dark-card/30 backdrop-blur rounded-lg border border-white/10 p-1"},hst={class:"overflow-x-auto"},fst={class:"w-full"},dst={class:"bg-dark-bg/50"},pst={class:"bg-dark-bg/30"},mst=["onMouseenter","onMouseleave"],gst=["onClick","title"],vst={key:0,class:"ml-1 text-xs"},yst={key:0,class:"flex items-center gap-3"},xst={class:"text-white/70"},_st={class:"flex gap-1"},bst=["onClick"],wst=["onClick"],kst={key:1,class:"text-dark-text"},Tst={class:"flex items-center gap-2"},Ast={class:"flex items-end gap-0.5"},Mst={class:"flex items-center gap-2"},Sst=["title"],Est=["title"],Cst=Ec({__name:"NeighborTable",props:{contactType:{},contactTypeKey:{},adverts:{},color:{},baseLatitude:{default:null},baseLongitude:{default:null},isCompactView:{type:Boolean,default:!1},isFirstTable:{type:Boolean,default:!1},showViewToggle:{type:Boolean,default:!1}},emits:["highlight-node","unhighlight-node","menu-ping","menu-delete","toggle-view"],setup(d,{emit:s}){const E=Ha(null),R=d,Y=s,dt=Wr=>new Date(Wr*1e3).toLocaleString(),_t=Wr=>`${Wr.slice(0,8)}...${Wr.slice(-8)}`,zt=Wr=>{switch(Wr){case 2:return{text:"Direct",bgColor:"bg-green-500/20",borderColor:"border-green-400/30",textColor:"text-green-400"};case 3:return{text:"Transport Direct",bgColor:"bg-green-600/20",borderColor:"border-green-500/30",textColor:"text-green-500"};case 1:return{text:"Flood",bgColor:"bg-yellow-500/20",borderColor:"border-yellow-400/30",textColor:"text-yellow-400"};case 0:return{text:"Transport Flood",bgColor:"bg-orange-500/20",borderColor:"border-orange-400/30",textColor:"text-orange-400"};default:return{text:"Unknown",bgColor:"bg-gray-500/20",borderColor:"border-gray-400/30",textColor:"text-gray-400"}}},jt=Wr=>Wr?`${Wr} dBm`:"N/A",te=Wr=>Wr?`${Wr} dB`:"N/A",ce=(Wr,Bi,Ri,Li)=>{const Hn=(Ri-Wr)*Math.PI/180,sa=(Li-Bi)*Math.PI/180,Ti=Math.sin(Hn/2)*Math.sin(Hn/2)+Math.cos(Wr*Math.PI/180)*Math.cos(Ri*Math.PI/180)*Math.sin(sa/2)*Math.sin(sa/2);return 6371*(2*Math.atan2(Math.sqrt(Ti),Math.sqrt(1-Ti)))},Ie=Wr=>R.baseLatitude===null||R.baseLongitude===null||Wr.latitude===null||Wr.longitude===null?"N/A":`${ce(R.baseLatitude,R.baseLongitude,Wr.latitude,Wr.longitude).toFixed(1)} km`,Je=async Wr=>{try{return await navigator.clipboard.writeText(Wr),!0}catch{const Bi=document.createElement("textarea");return Bi.value=Wr,document.body.appendChild(Bi),Bi.select(),document.execCommand("copy"),document.body.removeChild(Bi),!0}},fr=Wr=>{const Bi=Date.now(),Ri=Wr*1e3,Li=Bi-Ri,$n=Math.floor(Li/1e3),Hn=Math.floor($n/60),sa=Math.floor(Hn/60),Ti=Math.floor(sa/24);return $n<60?`${$n}s ago`:Hn<60?`${Hn}m ago`:sa<24?`${sa}h ago`:`${Ti}d ago`},Ar=Wr=>{const Bi=Date.now(),Ri=Wr*1e3,Li=Bi-Ri,$n=Math.floor(Li/(1e3*60*60));return $n<1?{color:"text-green-400"}:$n<26?{color:"text-yellow-400"}:{color:"text-red-400"}},kr=async(Wr,Bi)=>{const Ri=`${Wr.toFixed(6)}, ${Bi.toFixed(6)}`;await Je(Ri)},Vr=(Wr,Bi)=>{const Ri=`https://www.google.com/maps?q=${Wr},${Bi}`;window.open(Ri,"_blank")},fn=async Wr=>{await Je(Wr),E.value=Wr,setTimeout(()=>{E.value=null},2e3)},Dt=Wr=>Wr?Wr>=-50?{bars:5,color:"text-green-400"}:Wr>=-60?{bars:4,color:"text-green-300"}:Wr>=-70?{bars:3,color:"text-yellow-400"}:Wr>=-80?{bars:2,color:"text-orange-400"}:Wr>=-90?{bars:1,color:"text-red-400"}:{bars:0,color:"text-red-500"}:{bars:0,color:"text-gray-400"},cn=()=>R.isCompactView?"py-2 px-2":"py-4 px-3",ti=()=>{Y("toggle-view")},Dn=Wr=>{Y("highlight-node",Wr)},ii=Wr=>{Y("unhighlight-node",Wr)},Vi=Wr=>{Y("menu-ping",Wr)},Nn=Wr=>{Y("menu-delete",Wr)};return(Wr,Bi)=>(ci(),wi("div",ast,[ye("div",ost,[ye("div",sst,[ye("div",{class:"w-3 h-3 rounded-full border border-white/20",style:hm({backgroundColor:Wr.color})},null,4),ye("h3",lst,Fi(Wr.contactType),1),ye("span",ust,Fi(Wr.adverts.length),1)]),Wr.isFirstTable&&Wr.showViewToggle?(ci(),wi("div",cst,[ye("button",{onClick:ti,class:Fo(["p-2 rounded-md transition-colors",Wr.isCompactView?"text-white/60 hover:text-primary hover:bg-primary/10":"bg-primary/20 text-primary border border-primary/30"]),title:"Comfortable view"},Bi[0]||(Bi[0]=[ye("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("rect",{x:"3",y:"3",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"}),ye("rect",{x:"3",y:"12",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2),ye("button",{onClick:ti,class:Fo(["p-2 rounded-md transition-colors",Wr.isCompactView?"bg-primary/20 text-primary border border-primary/30":"text-white/60 hover:text-primary hover:bg-primary/10"]),title:"Compact view"},Bi[1]||(Bi[1]=[ye("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("rect",{x:"3",y:"3",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),ye("rect",{x:"3",y:"10",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),ye("rect",{x:"3",y:"17",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2)])):Uo("",!0)]),ye("div",hst,[ye("table",fst,[ye("thead",null,[ye("tr",dst,[ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},null,2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Node Name",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Public Key",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Location",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Distance",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Route Type",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"RSSI",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"SNR",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Last Seen",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"First Seen",2),ye("th",{class:Fo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Advert Count",2)])]),ye("tbody",pst,[(ci(!0),wi(_u,null,Mh(Wr.adverts,Ri=>(ci(),wi("tr",{key:Ri.id,class:"hover:bg-white/5 transition-colors",onMouseenter:Li=>Dn(Ri.pubkey),onMouseleave:Li=>ii(Ri.pubkey)},[ye("td",{class:Fo(cn())},[El(ist,{neighbor:Ri,onPing:Vi,onDelete:Nn},null,8,["neighbor"])],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},Fi(Ri.node_name||"Unknown"),3),ye("td",{class:Fo(`${cn()} text-white text-sm font-mono`)},[ye("button",{onClick:Li=>fn(Ri.pubkey),class:Fo(["text-white hover:text-primary-light transition-colors cursor-pointer underline underline-offset-2 decoration-white/30 hover:decoration-primary-light/60",E.value===Ri.pubkey?"text-green-400 decoration-green-400/60":""]),title:E.value===Ri.pubkey?"Copied!":"Click to copy full public key"},[Qu(Fi(_t(Ri.pubkey))+" ",1),E.value===Ri.pubkey?(ci(),wi("span",vst,"✓")):Uo("",!0)],10,gst)],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},[Ri.latitude!==null&&Ri.longitude!==null?(ci(),wi("div",yst,[ye("span",xst,Fi(Ri.latitude.toFixed(4))+", "+Fi(Ri.longitude.toFixed(4)),1),ye("div",_st,[ye("button",{onClick:Li=>kr(Ri.latitude,Ri.longitude),class:"text-white/60 hover:text-white transition-colors cursor-pointer",title:"Copy coordinates to clipboard"},Bi[2]||(Bi[2]=[ye("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2"}),ye("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1",stroke:"currentColor","stroke-width":"2"})],-1)]),8,bst),ye("button",{onClick:Li=>Vr(Ri.latitude,Ri.longitude),class:"text-white/60 hover:text-blue-400 transition-colors cursor-pointer",title:"Open in Google Maps"},Bi[3]||(Bi[3]=[ye("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ye("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z",stroke:"currentColor","stroke-width":"2"}),ye("circle",{cx:"12",cy:"10",r:"3",stroke:"currentColor","stroke-width":"2"})],-1)]),8,wst)])])):(ci(),wi("span",kst,"Unknown"))],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},Fi(Ie(Ri)),3),ye("td",{class:Fo(`${cn()} text-white text-sm`)},[ye("span",{class:Fo(["inline-block px-2 py-1 rounded-full text-xs border transition-colors",zt(Ri.route_type).bgColor,zt(Ri.route_type).borderColor,zt(Ri.route_type).textColor])},Fi(zt(Ri.route_type).text),3)],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},[ye("div",Tst,[ye("div",Ast,[(ci(),wi(_u,null,Mh(5,Li=>ye("div",{key:Li,class:Fo(["w-1 transition-colors",Li<=Dt(Ri.rssi).bars?Dt(Ri.rssi).color:"text-gray-600"]),style:hm({height:`${4+Li*2}px`})},Bi[4]||(Bi[4]=[ye("div",{class:"w-full h-full bg-current rounded-sm"},null,-1)]),6)),64))]),ye("span",{class:Fo(Dt(Ri.rssi).color)},Fi(jt(Ri.rssi)),3)])],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},Fi(te(Ri.snr)),3),ye("td",{class:Fo(`${cn()} text-white text-sm`)},[ye("div",Mst,[ye("div",{class:Fo(["w-2 h-2 rounded-full",Ar(Ri.last_seen).color==="text-green-400"?"bg-green-400":"",Ar(Ri.last_seen).color==="text-yellow-400"?"bg-yellow-400":"",Ar(Ri.last_seen).color==="text-red-400"?"bg-red-400":""])},null,2),ye("span",{class:Fo([Ar(Ri.last_seen).color,"cursor-help"]),title:dt(Ri.last_seen)},Fi(fr(Ri.last_seen)),11,Sst)])],2),ye("td",{class:Fo(`${cn()} text-white text-sm`)},[ye("span",{title:dt(Ri.first_seen),class:"cursor-help"},Fi(fr(Ri.first_seen)),9,Est)],2),ye("td",{class:Fo(`${cn()} text-white text-sm text-center`)},Fi(Ri.advert_count),3)],40,mst))),128))])])])]))}}),Lst={class:"space-y-6"},Pst={key:0,class:"flex items-center justify-center py-12"},Ist={key:1,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},zst={class:"flex items-center gap-3"},Ost={class:"text-accent-red/80 text-sm"},Dst={key:0,class:"text-center py-12"},Fst=Ec({name:"NeighborsView",__name:"Neighbors",setup(d){const s=Dm(),E={0:"Unknown",1:"Chat Node",2:"Repeater",3:"Room Server",4:"Hybrid Node"},R={0:"#6b7280",1:"#60a5fa",2:"#34d399",3:"#a855f7",4:"#f59e0b"},Y=Ha({}),dt=Ha(!0),_t=Ha(null),zt=Ha(!1),jt=Ha(!1),te=Ha(null),ce=Wo(()=>{if(!te.value)return null;const Nn=te.value;return{id:Nn.id,pubkey:Nn.pubkey,node_name:Nn.node_name,contact_type:Nn.contact_type,latitude:Nn.latitude,longitude:Nn.longitude,rssi:Nn.rssi,snr:Nn.snr,route_type:Nn.route_type,last_seen:Nn.last_seen,first_seen:Nn.first_seen,advert_count:Nn.advert_count,timestamp:Nn.timestamp,is_repeater:Nn.is_repeater,is_new_neighbor:Nn.is_new_neighbor}}),Ie=Wo(()=>s.stats?.config?.repeater?.latitude),Je=Wo(()=>s.stats?.config?.repeater?.longitude),fr=Wo(()=>Object.entries(E).filter(([Nn])=>Y.value[Nn]?.length>0).sort(([Nn],[Wr])=>parseInt(Nn)-parseInt(Wr))),Ar=Wo(()=>Object.values(Y.value).flat().filter(Nn=>Nn.latitude!==null&&Nn.longitude!==null)),kr=async Nn=>{try{const Wr=await ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(Nn)}&hours=168`);return Wr.success&&Array.isArray(Wr.data)?Wr.data:[]}catch(Wr){return console.error(`Error fetching adverts for contact type ${Nn}:`,Wr),[]}},Vr=async()=>{dt.value=!0,_t.value=null;try{Y.value={};for(const[Nn,Wr]of Object.entries(E)){const Bi=await kr(Wr);Bi.length>0&&(Y.value[Nn]=Bi)}}catch(Nn){console.error("Error loading adverts:",Nn),_t.value=Nn instanceof Error?Nn.message:"Failed to load neighbor data"}finally{dt.value=!1}},fn=Ha(),Dt=Nn=>{fn.value?.highlightNode(Nn)},cn=Nn=>{fn.value?.unhighlightNode(Nn)},ti=async Nn=>{const Wr=Nn;try{const Bi=await ah.post("/ping_neighbor",{pubkey:Wr.pubkey});Bi.success?console.log("Ping sent successfully"):console.error("Failed to ping neighbor:",Bi.error)}catch(Bi){console.error("Error pinging neighbor:",Bi)}},Dn=Nn=>{te.value=Nn,jt.value=!0},ii=()=>{jt.value=!1,te.value=null},Vi=async Nn=>{try{await ah.deleteAdvert(Nn),await Vr(),ii()}catch(Wr){console.error("Error deleting neighbor:",Wr)}};return op(async()=>{await Vr()}),(Nn,Wr)=>(ci(),wi("div",Lst,[dt.value?(ci(),wi("div",Pst,Wr[1]||(Wr[1]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),ye("p",{class:"text-dark-text"},"Loading neighbor data...")],-1)]))):_t.value?(ci(),wi("div",Ist,[ye("div",zst,[Wr[3]||(Wr[3]=ye("svg",{class:"w-5 h-5 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),ye("div",null,[Wr[2]||(Wr[2]=ye("h3",{class:"text-accent-red font-medium"},"Error Loading Neighbors",-1)),ye("p",Ost,Fi(_t.value),1)])])])):(ci(),wi(_u,{key:2},[El(rst,{ref_key:"networkMapRef",ref:fn,adverts:Ar.value,"base-latitude":Ie.value,"base-longitude":Je.value},null,8,["adverts","base-latitude","base-longitude"]),(ci(!0),wi(_u,null,Mh(fr.value,([Bi,Ri])=>(ci(),wi("div",{key:Bi,class:"space-y-6"},[El(Cst,{"contact-type":Ri,"contact-type-key":Bi,adverts:Y.value[Bi],color:R[parseInt(Bi)],"base-latitude":Ie.value,"base-longitude":Je.value,"is-compact-view":zt.value,"is-first-table":Bi===fr.value[0]?.[0],"show-view-toggle":fr.value.length>0,onHighlightNode:Dt,onUnhighlightNode:cn,onMenuPing:ti,onMenuDelete:Dn,onToggleView:Wr[0]||(Wr[0]=Li=>zt.value=!zt.value)},null,8,["contact-type","contact-type-key","adverts","color","base-latitude","base-longitude","is-compact-view","is-first-table","show-view-toggle"])]))),128)),fr.value.length===0?(ci(),wi("div",Dst,[Wr[4]||(Wr[4]=Ff('

No Neighbors Found

No mesh neighbors have been discovered in your area yet.

',3)),ye("button",{onClick:Vr,class:"mt-4 px-4 py-2 bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Refresh ")])):Uo("",!0)],64)),El(Vot,{show:jt.value,neighbor:ce.value,onClose:ii,onDelete:Vi},null,8,["show","neighbor"])]))}});/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License - */function lw(d){return d+.5|0}const h1=(d,s,E)=>Math.max(Math.min(d,E),s);function v2(d){return h1(lw(d*2.55),0,255)}function g1(d){return h1(lw(d*255),0,255)}function Qg(d){return h1(lw(d/2.55)/100,0,1)}function iP(d){return h1(lw(d*100),0,100)}const am={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},MA=[..."0123456789ABCDEF"],gst=d=>MA[d&15],vst=d=>MA[(d&240)>>4]+MA[d&15],O5=d=>(d&240)>>4===(d&15),yst=d=>O5(d.r)&&O5(d.g)&&O5(d.b)&&O5(d.a);function xst(d){var s=d.length,E;return d[0]==="#"&&(s===4||s===5?E={r:255&am[d[1]]*17,g:255&am[d[2]]*17,b:255&am[d[3]]*17,a:s===5?am[d[4]]*17:255}:(s===7||s===9)&&(E={r:am[d[1]]<<4|am[d[2]],g:am[d[3]]<<4|am[d[4]],b:am[d[5]]<<4|am[d[6]],a:s===9?am[d[7]]<<4|am[d[8]]:255})),E}const _st=(d,s)=>d<255?s(d):"";function bst(d){var s=yst(d)?gst:vst;return d?"#"+s(d.r)+s(d.g)+s(d.b)+_st(d.a,s):void 0}const wst=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tD(d,s,E){const B=s*Math.min(E,1-E),K=(pt,_t=(pt+d/30)%12)=>E-B*Math.max(Math.min(_t-3,9-_t,1),-1);return[K(0),K(8),K(4)]}function kst(d,s,E){const B=(K,pt=(K+d/60)%6)=>E-E*s*Math.max(Math.min(pt,4-pt,1),0);return[B(5),B(3),B(1)]}function Tst(d,s,E){const B=tD(d,1,.5);let K;for(s+E>1&&(K=1/(s+E),s*=K,E*=K),K=0;K<3;K++)B[K]*=1-s-E,B[K]+=s;return B}function Ast(d,s,E,B,K){return d===K?(s-E)/B+(s.5?he/(2-pt-_t):he/(pt+_t),jt=Ast(E,B,K,he,pt),jt=jt*60+.5),[jt|0,te||0,Ot]}function mM(d,s,E,B){return(Array.isArray(s)?d(s[0],s[1],s[2]):d(s,E,B)).map(g1)}function gM(d,s,E){return mM(tD,d,s,E)}function Mst(d,s,E){return mM(Tst,d,s,E)}function Sst(d,s,E){return mM(kst,d,s,E)}function eD(d){return(d%360+360)%360}function Est(d){const s=wst.exec(d);let E=255,B;if(!s)return;s[5]!==B&&(E=s[6]?v2(+s[5]):g1(+s[5]));const K=eD(+s[2]),pt=+s[3]/100,_t=+s[4]/100;return s[1]==="hwb"?B=Mst(K,pt,_t):s[1]==="hsv"?B=Sst(K,pt,_t):B=gM(K,pt,_t),{r:B[0],g:B[1],b:B[2],a:E}}function Cst(d,s){var E=pM(d);E[0]=eD(E[0]+s),E=gM(E),d.r=E[0],d.g=E[1],d.b=E[2]}function Lst(d){if(!d)return;const s=pM(d),E=s[0],B=iP(s[1]),K=iP(s[2]);return d.a<255?`hsla(${E}, ${B}%, ${K}%, ${Qg(d.a)})`:`hsl(${E}, ${B}%, ${K}%)`}const aP={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},oP={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Pst(){const d={},s=Object.keys(oP),E=Object.keys(aP);let B,K,pt,_t,Ot;for(B=0;B>16&255,pt>>8&255,pt&255]}return d}let D5;function Ist(d){D5||(D5=Pst(),D5.transparent=[0,0,0,0]);const s=D5[d.toLowerCase()];return s&&{r:s[0],g:s[1],b:s[2],a:s.length===4?s[3]:255}}const zst=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ost(d){const s=zst.exec(d);let E=255,B,K,pt;if(s){if(s[7]!==B){const _t=+s[7];E=s[8]?v2(_t):h1(_t*255,0,255)}return B=+s[1],K=+s[3],pt=+s[5],B=255&(s[2]?v2(B):h1(B,0,255)),K=255&(s[4]?v2(K):h1(K,0,255)),pt=255&(s[6]?v2(pt):h1(pt,0,255)),{r:B,g:K,b:pt,a:E}}}function Dst(d){return d&&(d.a<255?`rgba(${d.r}, ${d.g}, ${d.b}, ${Qg(d.a)})`:`rgb(${d.r}, ${d.g}, ${d.b})`)}const j8=d=>d<=.0031308?d*12.92:Math.pow(d,1/2.4)*1.055-.055,e_=d=>d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);function Fst(d,s,E){const B=e_(Qg(d.r)),K=e_(Qg(d.g)),pt=e_(Qg(d.b));return{r:g1(j8(B+E*(e_(Qg(s.r))-B))),g:g1(j8(K+E*(e_(Qg(s.g))-K))),b:g1(j8(pt+E*(e_(Qg(s.b))-pt))),a:d.a+E*(s.a-d.a)}}function F5(d,s,E){if(d){let B=pM(d);B[s]=Math.max(0,Math.min(B[s]+B[s]*E,s===0?360:1)),B=gM(B),d.r=B[0],d.g=B[1],d.b=B[2]}}function rD(d,s){return d&&Object.assign(s||{},d)}function sP(d){var s={r:0,g:0,b:0,a:255};return Array.isArray(d)?d.length>=3&&(s={r:d[0],g:d[1],b:d[2],a:255},d.length>3&&(s.a=g1(d[3]))):(s=rD(d,{r:0,g:0,b:0,a:1}),s.a=g1(s.a)),s}function Rst(d){return d.charAt(0)==="r"?Ost(d):Est(d)}class q2{constructor(s){if(s instanceof q2)return s;const E=typeof s;let B;E==="object"?B=sP(s):E==="string"&&(B=xst(s)||Ist(s)||Rst(s)),this._rgb=B,this._valid=!!B}get valid(){return this._valid}get rgb(){var s=rD(this._rgb);return s&&(s.a=Qg(s.a)),s}set rgb(s){this._rgb=sP(s)}rgbString(){return this._valid?Dst(this._rgb):void 0}hexString(){return this._valid?bst(this._rgb):void 0}hslString(){return this._valid?Lst(this._rgb):void 0}mix(s,E){if(s){const B=this.rgb,K=s.rgb;let pt;const _t=E===pt?.5:E,Ot=2*_t-1,jt=B.a-K.a,te=((Ot*jt===-1?Ot:(Ot+jt)/(1+Ot*jt))+1)/2;pt=1-te,B.r=255&te*B.r+pt*K.r+.5,B.g=255&te*B.g+pt*K.g+.5,B.b=255&te*B.b+pt*K.b+.5,B.a=_t*B.a+(1-_t)*K.a,this.rgb=B}return this}interpolate(s,E){return s&&(this._rgb=Fst(this._rgb,s._rgb,E)),this}clone(){return new q2(this.rgb)}alpha(s){return this._rgb.a=g1(s),this}clearer(s){const E=this._rgb;return E.a*=1-s,this}greyscale(){const s=this._rgb,E=lw(s.r*.3+s.g*.59+s.b*.11);return s.r=s.g=s.b=E,this}opaquer(s){const E=this._rgb;return E.a*=1+s,this}negate(){const s=this._rgb;return s.r=255-s.r,s.g=255-s.g,s.b=255-s.b,this}lighten(s){return F5(this._rgb,2,s),this}darken(s){return F5(this._rgb,2,-s),this}saturate(s){return F5(this._rgb,1,s),this}desaturate(s){return F5(this._rgb,1,-s),this}rotate(s){return Cst(this._rgb,s),this}}/*! + */function lw(d){return d+.5|0}const f1=(d,s,E)=>Math.max(Math.min(d,E),s);function y2(d){return f1(lw(d*2.55),0,255)}function y1(d){return f1(lw(d*255),0,255)}function tv(d){return f1(lw(d/2.55)/100,0,1)}function oP(d){return f1(lw(d*100),0,100)}const om={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},CA=[..."0123456789ABCDEF"],Bst=d=>CA[d&15],Rst=d=>CA[(d&240)>>4]+CA[d&15],D5=d=>(d&240)>>4===(d&15),Nst=d=>D5(d.r)&&D5(d.g)&&D5(d.b)&&D5(d.a);function jst(d){var s=d.length,E;return d[0]==="#"&&(s===4||s===5?E={r:255&om[d[1]]*17,g:255&om[d[2]]*17,b:255&om[d[3]]*17,a:s===5?om[d[4]]*17:255}:(s===7||s===9)&&(E={r:om[d[1]]<<4|om[d[2]],g:om[d[3]]<<4|om[d[4]],b:om[d[5]]<<4|om[d[6]],a:s===9?om[d[7]]<<4|om[d[8]]:255})),E}const Ust=(d,s)=>d<255?s(d):"";function Vst(d){var s=Nst(d)?Bst:Rst;return d?"#"+s(d.r)+s(d.g)+s(d.b)+Ust(d.a,s):void 0}const Hst=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function iD(d,s,E){const R=s*Math.min(E,1-E),Y=(dt,_t=(dt+d/30)%12)=>E-R*Math.max(Math.min(_t-3,9-_t,1),-1);return[Y(0),Y(8),Y(4)]}function Wst(d,s,E){const R=(Y,dt=(Y+d/60)%6)=>E-E*s*Math.max(Math.min(dt,4-dt,1),0);return[R(5),R(3),R(1)]}function qst(d,s,E){const R=iD(d,1,.5);let Y;for(s+E>1&&(Y=1/(s+E),s*=Y,E*=Y),Y=0;Y<3;Y++)R[Y]*=1-s-E,R[Y]+=s;return R}function $st(d,s,E,R,Y){return d===Y?(s-E)/R+(s.5?ce/(2-dt-_t):ce/(dt+_t),jt=$st(E,R,Y,ce,dt),jt=jt*60+.5),[jt|0,te||0,zt]}function vM(d,s,E,R){return(Array.isArray(s)?d(s[0],s[1],s[2]):d(s,E,R)).map(y1)}function yM(d,s,E){return vM(iD,d,s,E)}function Zst(d,s,E){return vM(qst,d,s,E)}function Gst(d,s,E){return vM(Wst,d,s,E)}function aD(d){return(d%360+360)%360}function Yst(d){const s=Hst.exec(d);let E=255,R;if(!s)return;s[5]!==R&&(E=s[6]?y2(+s[5]):y1(+s[5]));const Y=aD(+s[2]),dt=+s[3]/100,_t=+s[4]/100;return s[1]==="hwb"?R=Zst(Y,dt,_t):s[1]==="hsv"?R=Gst(Y,dt,_t):R=yM(Y,dt,_t),{r:R[0],g:R[1],b:R[2],a:E}}function Kst(d,s){var E=gM(d);E[0]=aD(E[0]+s),E=yM(E),d.r=E[0],d.g=E[1],d.b=E[2]}function Xst(d){if(!d)return;const s=gM(d),E=s[0],R=oP(s[1]),Y=oP(s[2]);return d.a<255?`hsla(${E}, ${R}%, ${Y}%, ${tv(d.a)})`:`hsl(${E}, ${R}%, ${Y}%)`}const sP={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lP={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Jst(){const d={},s=Object.keys(lP),E=Object.keys(sP);let R,Y,dt,_t,zt;for(R=0;R>16&255,dt>>8&255,dt&255]}return d}let F5;function Qst(d){F5||(F5=Jst(),F5.transparent=[0,0,0,0]);const s=F5[d.toLowerCase()];return s&&{r:s[0],g:s[1],b:s[2],a:s.length===4?s[3]:255}}const tlt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function elt(d){const s=tlt.exec(d);let E=255,R,Y,dt;if(s){if(s[7]!==R){const _t=+s[7];E=s[8]?y2(_t):f1(_t*255,0,255)}return R=+s[1],Y=+s[3],dt=+s[5],R=255&(s[2]?y2(R):f1(R,0,255)),Y=255&(s[4]?y2(Y):f1(Y,0,255)),dt=255&(s[6]?y2(dt):f1(dt,0,255)),{r:R,g:Y,b:dt,a:E}}}function rlt(d){return d&&(d.a<255?`rgba(${d.r}, ${d.g}, ${d.b}, ${tv(d.a)})`:`rgb(${d.r}, ${d.g}, ${d.b})`)}const U8=d=>d<=.0031308?d*12.92:Math.pow(d,1/2.4)*1.055-.055,n_=d=>d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);function nlt(d,s,E){const R=n_(tv(d.r)),Y=n_(tv(d.g)),dt=n_(tv(d.b));return{r:y1(U8(R+E*(n_(tv(s.r))-R))),g:y1(U8(Y+E*(n_(tv(s.g))-Y))),b:y1(U8(dt+E*(n_(tv(s.b))-dt))),a:d.a+E*(s.a-d.a)}}function B5(d,s,E){if(d){let R=gM(d);R[s]=Math.max(0,Math.min(R[s]+R[s]*E,s===0?360:1)),R=yM(R),d.r=R[0],d.g=R[1],d.b=R[2]}}function oD(d,s){return d&&Object.assign(s||{},d)}function uP(d){var s={r:0,g:0,b:0,a:255};return Array.isArray(d)?d.length>=3&&(s={r:d[0],g:d[1],b:d[2],a:255},d.length>3&&(s.a=y1(d[3]))):(s=oD(d,{r:0,g:0,b:0,a:1}),s.a=y1(s.a)),s}function ilt(d){return d.charAt(0)==="r"?elt(d):Yst(d)}class q2{constructor(s){if(s instanceof q2)return s;const E=typeof s;let R;E==="object"?R=uP(s):E==="string"&&(R=jst(s)||Qst(s)||ilt(s)),this._rgb=R,this._valid=!!R}get valid(){return this._valid}get rgb(){var s=oD(this._rgb);return s&&(s.a=tv(s.a)),s}set rgb(s){this._rgb=uP(s)}rgbString(){return this._valid?rlt(this._rgb):void 0}hexString(){return this._valid?Vst(this._rgb):void 0}hslString(){return this._valid?Xst(this._rgb):void 0}mix(s,E){if(s){const R=this.rgb,Y=s.rgb;let dt;const _t=E===dt?.5:E,zt=2*_t-1,jt=R.a-Y.a,te=((zt*jt===-1?zt:(zt+jt)/(1+zt*jt))+1)/2;dt=1-te,R.r=255&te*R.r+dt*Y.r+.5,R.g=255&te*R.g+dt*Y.g+.5,R.b=255&te*R.b+dt*Y.b+.5,R.a=_t*R.a+(1-_t)*Y.a,this.rgb=R}return this}interpolate(s,E){return s&&(this._rgb=nlt(this._rgb,s._rgb,E)),this}clone(){return new q2(this.rgb)}alpha(s){return this._rgb.a=y1(s),this}clearer(s){const E=this._rgb;return E.a*=1-s,this}greyscale(){const s=this._rgb,E=lw(s.r*.3+s.g*.59+s.b*.11);return s.r=s.g=s.b=E,this}opaquer(s){const E=this._rgb;return E.a*=1+s,this}negate(){const s=this._rgb;return s.r=255-s.r,s.g=255-s.g,s.b=255-s.b,this}lighten(s){return B5(this._rgb,2,s),this}darken(s){return B5(this._rgb,2,-s),this}saturate(s){return B5(this._rgb,1,s),this}desaturate(s){return B5(this._rgb,1,-s),this}rotate(s){return Kst(this._rgb,s),this}}/*! * Chart.js v4.5.1 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License - */function Yg(){}const Bst=(()=>{let d=0;return()=>d++})();function Bh(d){return d==null}function Yd(d){if(Array.isArray&&Array.isArray(d))return!0;const s=Object.prototype.toString.call(d);return s.slice(0,7)==="[object"&&s.slice(-6)==="Array]"}function Sc(d){return d!==null&&Object.prototype.toString.call(d)==="[object Object]"}function t0(d){return(typeof d=="number"||d instanceof Number)&&isFinite(+d)}function ag(d,s){return t0(d)?d:s}function cc(d,s){return typeof d>"u"?s:d}const Nst=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100:+d/s,nD=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100*s:+d;function Df(d,s,E){if(d&&typeof d.call=="function")return d.apply(E,s)}function Xh(d,s,E,B){let K,pt,_t;if(Yd(d))for(pt=d.length,K=0;Kd,x:d=>d.x,y:d=>d.y};function Vst(d){const s=d.split("."),E=[];let B="";for(const K of s)B+=K,B.endsWith("\\")?B=B.slice(0,-1)+".":(E.push(B),B="");return E}function Hst(d){const s=Vst(d);return E=>{for(const B of s){if(B==="")break;E=E&&E[B]}return E}}function Cy(d,s){return(lP[s]||(lP[s]=Hst(s)))(d)}function vM(d){return d.charAt(0).toUpperCase()+d.slice(1)}const Z2=d=>typeof d<"u",x1=d=>typeof d=="function",uP=(d,s)=>{if(d.size!==s.size)return!1;for(const E of d)if(!s.has(E))return!1;return!0};function Wst(d){return d.type==="mouseup"||d.type==="click"||d.type==="contextmenu"}const Qh=Math.PI,od=2*Qh,qst=od+Qh,_4=Number.POSITIVE_INFINITY,$st=Qh/180,ip=Qh/2,cy=Qh/4,cP=Qh*2/3,aD=Math.log10,pg=Math.sign;function P2(d,s,E){return Math.abs(d-s)K-pt).pop(),s}function Gst(d){return typeof d=="symbol"||typeof d=="object"&&d!==null&&!(Symbol.toPrimitive in d||"toString"in d||"valueOf"in d)}function G2(d){return!Gst(d)&&!isNaN(parseFloat(d))&&isFinite(d)}function Yst(d,s){const E=Math.round(d);return E-s<=d&&E+s>=d}function Kst(d,s,E){let B,K,pt;for(B=0,K=d.length;Bjt&&te=Math.min(s,E)-B&&d<=Math.max(s,E)+B}function yM(d,s,E){E=E||(_t=>d[_t]1;)pt=K+B>>1,E(pt)?K=pt:B=pt;return{lo:K,hi:B}}const by=(d,s,E,B)=>yM(d,E,B?K=>{const pt=d[K][s];return ptd[K][s]yM(d,E,B=>d[B][s]>=E);function elt(d,s,E){let B=0,K=d.length;for(;BB&&d[K-1]>E;)K--;return B>0||K{const B="_onData"+vM(E),K=d[E];Object.defineProperty(d,E,{configurable:!0,enumerable:!1,value(...pt){const _t=K.apply(this,pt);return d._chartjs.listeners.forEach(Ot=>{typeof Ot[B]=="function"&&Ot[B](...pt)}),_t}})})}function dP(d,s){const E=d._chartjs;if(!E)return;const B=E.listeners,K=B.indexOf(s);K!==-1&&B.splice(K,1),!(B.length>0)&&(sD.forEach(pt=>{delete d[pt]}),delete d._chartjs)}function lD(d){const s=new Set(d);return s.size===d.length?d:Array.from(s)}const uD=function(){return typeof window>"u"?function(d){return d()}:window.requestAnimationFrame}();function cD(d,s){let E=[],B=!1;return function(...K){E=K,B||(B=!0,uD.call(window,()=>{B=!1,d.apply(s,E)}))}}function nlt(d,s){let E;return function(...B){return s?(clearTimeout(E),E=setTimeout(d,s,B)):d.apply(this,B),s}}const xM=d=>d==="start"?"left":d==="end"?"right":"center",qp=(d,s,E)=>d==="start"?s:d==="end"?E:(s+E)/2,ilt=(d,s,E,B)=>d===(B?"left":"right")?E:d==="center"?(s+E)/2:s;function alt(d,s,E){const B=s.length;let K=0,pt=B;if(d._sorted){const{iScale:_t,vScale:Ot,_parsed:jt}=d,te=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null,he=_t.axis,{min:De,max:er,minDefined:pr,maxDefined:Mr}=_t.getUserBounds();if(pr){if(K=Math.min(by(jt,he,De).lo,E?B:by(s,he,_t.getPixelForValue(De)).lo),te){const Tr=jt.slice(0,K+1).reverse().findIndex(Vr=>!Bh(Vr[Ot.axis]));K-=Math.max(0,Tr)}K=Jp(K,0,B-1)}if(Mr){let Tr=Math.max(by(jt,_t.axis,er,!0).hi+1,E?0:by(s,he,_t.getPixelForValue(er),!0).hi+1);if(te){const Vr=jt.slice(Tr-1).findIndex(mn=>!Bh(mn[Ot.axis]));Tr+=Math.max(0,Vr)}pt=Jp(Tr,K,B)-K}else pt=B-K}return{start:K,count:pt}}function olt(d){const{xScale:s,yScale:E,_scaleRanges:B}=d,K={xmin:s.min,xmax:s.max,ymin:E.min,ymax:E.max};if(!B)return d._scaleRanges=K,!0;const pt=B.xmin!==s.min||B.xmax!==s.max||B.ymin!==E.min||B.ymax!==E.max;return Object.assign(B,K),pt}const R5=d=>d===0||d===1,pP=(d,s,E)=>-(Math.pow(2,10*(d-=1))*Math.sin((d-s)*od/E)),mP=(d,s,E)=>Math.pow(2,-10*d)*Math.sin((d-s)*od/E)+1,I2={linear:d=>d,easeInQuad:d=>d*d,easeOutQuad:d=>-d*(d-2),easeInOutQuad:d=>(d/=.5)<1?.5*d*d:-.5*(--d*(d-2)-1),easeInCubic:d=>d*d*d,easeOutCubic:d=>(d-=1)*d*d+1,easeInOutCubic:d=>(d/=.5)<1?.5*d*d*d:.5*((d-=2)*d*d+2),easeInQuart:d=>d*d*d*d,easeOutQuart:d=>-((d-=1)*d*d*d-1),easeInOutQuart:d=>(d/=.5)<1?.5*d*d*d*d:-.5*((d-=2)*d*d*d-2),easeInQuint:d=>d*d*d*d*d,easeOutQuint:d=>(d-=1)*d*d*d*d+1,easeInOutQuint:d=>(d/=.5)<1?.5*d*d*d*d*d:.5*((d-=2)*d*d*d*d+2),easeInSine:d=>-Math.cos(d*ip)+1,easeOutSine:d=>Math.sin(d*ip),easeInOutSine:d=>-.5*(Math.cos(Qh*d)-1),easeInExpo:d=>d===0?0:Math.pow(2,10*(d-1)),easeOutExpo:d=>d===1?1:-Math.pow(2,-10*d)+1,easeInOutExpo:d=>R5(d)?d:d<.5?.5*Math.pow(2,10*(d*2-1)):.5*(-Math.pow(2,-10*(d*2-1))+2),easeInCirc:d=>d>=1?d:-(Math.sqrt(1-d*d)-1),easeOutCirc:d=>Math.sqrt(1-(d-=1)*d),easeInOutCirc:d=>(d/=.5)<1?-.5*(Math.sqrt(1-d*d)-1):.5*(Math.sqrt(1-(d-=2)*d)+1),easeInElastic:d=>R5(d)?d:pP(d,.075,.3),easeOutElastic:d=>R5(d)?d:mP(d,.075,.3),easeInOutElastic(d){return R5(d)?d:d<.5?.5*pP(d*2,.1125,.45):.5+.5*mP(d*2-1,.1125,.45)},easeInBack(d){return d*d*((1.70158+1)*d-1.70158)},easeOutBack(d){return(d-=1)*d*((1.70158+1)*d+1.70158)+1},easeInOutBack(d){let s=1.70158;return(d/=.5)<1?.5*(d*d*(((s*=1.525)+1)*d-s)):.5*((d-=2)*d*(((s*=1.525)+1)*d+s)+2)},easeInBounce:d=>1-I2.easeOutBounce(1-d),easeOutBounce(d){return d<1/2.75?7.5625*d*d:d<2/2.75?7.5625*(d-=1.5/2.75)*d+.75:d<2.5/2.75?7.5625*(d-=2.25/2.75)*d+.9375:7.5625*(d-=2.625/2.75)*d+.984375},easeInOutBounce:d=>d<.5?I2.easeInBounce(d*2)*.5:I2.easeOutBounce(d*2-1)*.5+.5};function _M(d){if(d&&typeof d=="object"){const s=d.toString();return s==="[object CanvasPattern]"||s==="[object CanvasGradient]"}return!1}function gP(d){return _M(d)?d:new q2(d)}function U8(d){return _M(d)?d:new q2(d).saturate(.5).darken(.1).hexString()}const slt=["x","y","borderWidth","radius","tension"],llt=["color","borderColor","backgroundColor"];function ult(d){d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:s=>s!=="onProgress"&&s!=="onComplete"&&s!=="fn"}),d.set("animations",{colors:{type:"color",properties:llt},numbers:{type:"number",properties:slt}}),d.describe("animations",{_fallback:"animation"}),d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:s=>s|0}}}})}function clt(d){d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vP=new Map;function hlt(d,s){s=s||{};const E=d+JSON.stringify(s);let B=vP.get(E);return B||(B=new Intl.NumberFormat(d,s),vP.set(E,B)),B}function bM(d,s,E){return hlt(s,E).format(d)}const flt={values(d){return Yd(d)?d:""+d},numeric(d,s,E){if(d===0)return"0";const B=this.chart.options.locale;let K,pt=d;if(E.length>1){const te=Math.max(Math.abs(E[0].value),Math.abs(E[E.length-1].value));(te<1e-4||te>1e15)&&(K="scientific"),pt=dlt(d,E)}const _t=aD(Math.abs(pt)),Ot=isNaN(_t)?1:Math.max(Math.min(-1*Math.floor(_t),20),0),jt={notation:K,minimumFractionDigits:Ot,maximumFractionDigits:Ot};return Object.assign(jt,this.options.ticks.format),bM(d,B,jt)}};function dlt(d,s){let E=s.length>3?s[2].value-s[1].value:s[1].value-s[0].value;return Math.abs(E)>=1&&d!==Math.floor(d)&&(E=d-Math.floor(d)),E}var hD={formatters:flt};function plt(d){d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(s,E)=>E.lineWidth,tickColor:(s,E)=>E.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:hD.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.route("scale.ticks","color","","color"),d.route("scale.grid","color","","borderColor"),d.route("scale.border","color","","borderColor"),d.route("scale.title","color","","color"),d.describe("scale",{_fallback:!1,_scriptable:s=>!s.startsWith("before")&&!s.startsWith("after")&&s!=="callback"&&s!=="parser",_indexable:s=>s!=="borderDash"&&s!=="tickBorderDash"&&s!=="dash"}),d.describe("scales",{_fallback:"scale"}),d.describe("scale.ticks",{_scriptable:s=>s!=="backdropPadding"&&s!=="callback",_indexable:s=>s!=="backdropPadding"})}const Ly=Object.create(null),EA=Object.create(null);function z2(d,s){if(!s)return d;const E=s.split(".");for(let B=0,K=E.length;BB.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(B,K)=>U8(K.backgroundColor),this.hoverBorderColor=(B,K)=>U8(K.borderColor),this.hoverColor=(B,K)=>U8(K.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(s),this.apply(E)}set(s,E){return V8(this,s,E)}get(s){return z2(this,s)}describe(s,E){return V8(EA,s,E)}override(s,E){return V8(Ly,s,E)}route(s,E,B,K){const pt=z2(this,s),_t=z2(this,B),Ot="_"+E;Object.defineProperties(pt,{[Ot]:{value:pt[E],writable:!0},[E]:{enumerable:!0,get(){const jt=this[Ot],te=_t[K];return Sc(jt)?Object.assign({},te,jt):cc(jt,te)},set(jt){this[Ot]=jt}}})}apply(s){s.forEach(E=>E(this))}}var Rd=new mlt({_scriptable:d=>!d.startsWith("on"),_indexable:d=>d!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ult,clt,plt]);function glt(d){return!d||Bh(d.size)||Bh(d.family)?null:(d.style?d.style+" ":"")+(d.weight?d.weight+" ":"")+d.size+"px "+d.family}function yP(d,s,E,B,K){let pt=s[K];return pt||(pt=s[K]=d.measureText(K).width,E.push(K)),pt>B&&(B=pt),B}function hy(d,s,E){const B=d.currentDevicePixelRatio,K=E!==0?Math.max(E/2,.5):0;return Math.round((s-K)*B)/B+K}function xP(d,s){!s&&!d||(s=s||d.getContext("2d"),s.save(),s.resetTransform(),s.clearRect(0,0,d.width,d.height),s.restore())}function CA(d,s,E,B){fD(d,s,E,B,null)}function fD(d,s,E,B,K){let pt,_t,Ot,jt,te,he,De,er;const pr=s.pointStyle,Mr=s.rotation,Tr=s.radius;let Vr=(Mr||0)*$st;if(pr&&typeof pr=="object"&&(pt=pr.toString(),pt==="[object HTMLImageElement]"||pt==="[object HTMLCanvasElement]")){d.save(),d.translate(E,B),d.rotate(Vr),d.drawImage(pr,-pr.width/2,-pr.height/2,pr.width,pr.height),d.restore();return}if(!(isNaN(Tr)||Tr<=0)){switch(d.beginPath(),pr){default:K?d.ellipse(E,B,K/2,Tr,0,0,od):d.arc(E,B,Tr,0,od),d.closePath();break;case"triangle":he=K?K/2:Tr,d.moveTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),Vr+=cP,d.lineTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),Vr+=cP,d.lineTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),d.closePath();break;case"rectRounded":te=Tr*.516,jt=Tr-te,_t=Math.cos(Vr+cy)*jt,De=Math.cos(Vr+cy)*(K?K/2-te:jt),Ot=Math.sin(Vr+cy)*jt,er=Math.sin(Vr+cy)*(K?K/2-te:jt),d.arc(E-De,B-Ot,te,Vr-Qh,Vr-ip),d.arc(E+er,B-_t,te,Vr-ip,Vr),d.arc(E+De,B+Ot,te,Vr,Vr+ip),d.arc(E-er,B+_t,te,Vr+ip,Vr+Qh),d.closePath();break;case"rect":if(!Mr){jt=Math.SQRT1_2*Tr,he=K?K/2:jt,d.rect(E-he,B-jt,2*he,2*jt);break}Vr+=cy;case"rectRot":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+er,B-_t),d.lineTo(E+De,B+Ot),d.lineTo(E-er,B+_t),d.closePath();break;case"crossRot":Vr+=cy;case"cross":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t);break;case"star":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t),Vr+=cy,De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t);break;case"line":_t=K?K/2:Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,d.moveTo(E-_t,B-Ot),d.lineTo(E+_t,B+Ot);break;case"dash":d.moveTo(E,B),d.lineTo(E+Math.cos(Vr)*(K?K/2:Tr),B+Math.sin(Vr)*Tr);break;case!1:d.closePath();break}d.fill(),s.borderWidth>0&&d.stroke()}}function K2(d,s,E){return E=E||.5,!s||d&&d.x>s.left-E&&d.xs.top-E&&d.y0&&pt.strokeColor!=="";let jt,te;for(d.save(),d.font=K.string,xlt(d,pt),jt=0;jt<_t.length;++jt)te=_t[jt],pt.backdrop&&blt(d,pt.backdrop),Ot&&(pt.strokeColor&&(d.strokeStyle=pt.strokeColor),Bh(pt.strokeWidth)||(d.lineWidth=pt.strokeWidth),d.strokeText(te,E,B,pt.maxWidth)),d.fillText(te,E,B,pt.maxWidth),_lt(d,E,B,te,pt),B+=Number(K.lineHeight);d.restore()}function b4(d,s){const{x:E,y:B,w:K,h:pt,radius:_t}=s;d.arc(E+_t.topLeft,B+_t.topLeft,_t.topLeft,1.5*Qh,Qh,!0),d.lineTo(E,B+pt-_t.bottomLeft),d.arc(E+_t.bottomLeft,B+pt-_t.bottomLeft,_t.bottomLeft,Qh,ip,!0),d.lineTo(E+K-_t.bottomRight,B+pt),d.arc(E+K-_t.bottomRight,B+pt-_t.bottomRight,_t.bottomRight,ip,0,!0),d.lineTo(E+K,B+_t.topRight),d.arc(E+K-_t.topRight,B+_t.topRight,_t.topRight,0,-ip,!0),d.lineTo(E+_t.topLeft,B)}const wlt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,klt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Tlt(d,s){const E=(""+d).match(wlt);if(!E||E[1]==="normal")return s*1.2;switch(d=+E[2],E[3]){case"px":return d;case"%":d/=100;break}return s*d}const Alt=d=>+d||0;function wM(d,s){const E={},B=Sc(s),K=B?Object.keys(s):s,pt=Sc(d)?B?_t=>cc(d[_t],d[s[_t]]):_t=>d[_t]:()=>d;for(const _t of K)E[_t]=Alt(pt(_t));return E}function dD(d){return wM(d,{top:"y",right:"x",bottom:"y",left:"x"})}function h_(d){return wM(d,["topLeft","topRight","bottomLeft","bottomRight"])}function fm(d){const s=dD(d);return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Qp(d,s){d=d||{},s=s||Rd.font;let E=cc(d.size,s.size);typeof E=="string"&&(E=parseInt(E,10));let B=cc(d.style,s.style);B&&!(""+B).match(klt)&&(console.warn('Invalid font style specified: "'+B+'"'),B=void 0);const K={family:cc(d.family,s.family),lineHeight:Tlt(cc(d.lineHeight,s.lineHeight),E),size:E,style:B,weight:cc(d.weight,s.weight),string:""};return K.string=glt(K),K}function B5(d,s,E,B){let K,pt,_t;for(K=0,pt=d.length;KE&&Ot===0?0:Ot+jt;return{min:_t(B,-Math.abs(pt)),max:_t(K,pt)}}function zy(d,s){return Object.assign(Object.create(d),s)}function kM(d,s=[""],E,B,K=()=>d[0]){const pt=E||d;typeof B>"u"&&(B=vD("_fallback",d));const _t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:d,_rootScopes:pt,_fallback:B,_getTarget:K,override:Ot=>kM([Ot,...d],s,pt,B)};return new Proxy(_t,{deleteProperty(Ot,jt){return delete Ot[jt],delete Ot._keys,delete d[0][jt],!0},get(Ot,jt){return mD(Ot,jt,()=>Olt(jt,s,d,Ot))},getOwnPropertyDescriptor(Ot,jt){return Reflect.getOwnPropertyDescriptor(Ot._scopes[0],jt)},getPrototypeOf(){return Reflect.getPrototypeOf(d[0])},has(Ot,jt){return bP(Ot).includes(jt)},ownKeys(Ot){return bP(Ot)},set(Ot,jt,te){const he=Ot._storage||(Ot._storage=K());return Ot[jt]=he[jt]=te,delete Ot._keys,!0}})}function x_(d,s,E,B){const K={_cacheable:!1,_proxy:d,_context:s,_subProxy:E,_stack:new Set,_descriptors:pD(d,B),setContext:pt=>x_(d,pt,E,B),override:pt=>x_(d.override(pt),s,E,B)};return new Proxy(K,{deleteProperty(pt,_t){return delete pt[_t],delete d[_t],!0},get(pt,_t,Ot){return mD(pt,_t,()=>Elt(pt,_t,Ot))},getOwnPropertyDescriptor(pt,_t){return pt._descriptors.allKeys?Reflect.has(d,_t)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(d,_t)},getPrototypeOf(){return Reflect.getPrototypeOf(d)},has(pt,_t){return Reflect.has(d,_t)},ownKeys(){return Reflect.ownKeys(d)},set(pt,_t,Ot){return d[_t]=Ot,delete pt[_t],!0}})}function pD(d,s={scriptable:!0,indexable:!0}){const{_scriptable:E=s.scriptable,_indexable:B=s.indexable,_allKeys:K=s.allKeys}=d;return{allKeys:K,scriptable:E,indexable:B,isScriptable:x1(E)?E:()=>E,isIndexable:x1(B)?B:()=>B}}const Slt=(d,s)=>d?d+vM(s):s,TM=(d,s)=>Sc(s)&&d!=="adapters"&&(Object.getPrototypeOf(s)===null||s.constructor===Object);function mD(d,s,E){if(Object.prototype.hasOwnProperty.call(d,s)||s==="constructor")return d[s];const B=E();return d[s]=B,B}function Elt(d,s,E){const{_proxy:B,_context:K,_subProxy:pt,_descriptors:_t}=d;let Ot=B[s];return x1(Ot)&&_t.isScriptable(s)&&(Ot=Clt(s,Ot,d,E)),Yd(Ot)&&Ot.length&&(Ot=Llt(s,Ot,d,_t.isIndexable)),TM(s,Ot)&&(Ot=x_(Ot,K,pt&&pt[s],_t)),Ot}function Clt(d,s,E,B){const{_proxy:K,_context:pt,_subProxy:_t,_stack:Ot}=E;if(Ot.has(d))throw new Error("Recursion detected: "+Array.from(Ot).join("->")+"->"+d);Ot.add(d);let jt=s(pt,_t||B);return Ot.delete(d),TM(d,jt)&&(jt=AM(K._scopes,K,d,jt)),jt}function Llt(d,s,E,B){const{_proxy:K,_context:pt,_subProxy:_t,_descriptors:Ot}=E;if(typeof pt.index<"u"&&B(d))return s[pt.index%s.length];if(Sc(s[0])){const jt=s,te=K._scopes.filter(he=>he!==jt);s=[];for(const he of jt){const De=AM(te,K,d,he);s.push(x_(De,pt,_t&&_t[d],Ot))}}return s}function gD(d,s,E){return x1(d)?d(s,E):d}const Plt=(d,s)=>d===!0?s:typeof d=="string"?Cy(s,d):void 0;function Ilt(d,s,E,B,K){for(const pt of s){const _t=Plt(E,pt);if(_t){d.add(_t);const Ot=gD(_t._fallback,E,K);if(typeof Ot<"u"&&Ot!==E&&Ot!==B)return Ot}else if(_t===!1&&typeof B<"u"&&E!==B)return null}return!1}function AM(d,s,E,B){const K=s._rootScopes,pt=gD(s._fallback,E,B),_t=[...d,...K],Ot=new Set;Ot.add(B);let jt=_P(Ot,_t,E,pt||E,B);return jt===null||typeof pt<"u"&&pt!==E&&(jt=_P(Ot,_t,pt,jt,B),jt===null)?!1:kM(Array.from(Ot),[""],K,pt,()=>zlt(s,E,B))}function _P(d,s,E,B,K){for(;E;)E=Ilt(d,s,E,B,K);return E}function zlt(d,s,E){const B=d._getTarget();s in B||(B[s]={});const K=B[s];return Yd(K)&&Sc(E)?E:K||{}}function Olt(d,s,E,B){let K;for(const pt of s)if(K=vD(Slt(pt,d),E),typeof K<"u")return TM(d,K)?AM(E,B,d,K):K}function vD(d,s){for(const E of s){if(!E)continue;const B=E[d];if(typeof B<"u")return B}}function bP(d){let s=d._keys;return s||(s=d._keys=Dlt(d._scopes)),s}function Dlt(d){const s=new Set;for(const E of d)for(const B of Object.keys(E).filter(K=>!K.startsWith("_")))s.add(B);return Array.from(s)}const Flt=Number.EPSILON||1e-14,__=(d,s)=>sd==="x"?"y":"x";function Rlt(d,s,E,B){const K=d.skip?s:d,pt=s,_t=E.skip?s:E,Ot=SA(pt,K),jt=SA(_t,pt);let te=Ot/(Ot+jt),he=jt/(Ot+jt);te=isNaN(te)?0:te,he=isNaN(he)?0:he;const De=B*te,er=B*he;return{previous:{x:pt.x-De*(_t.x-K.x),y:pt.y-De*(_t.y-K.y)},next:{x:pt.x+er*(_t.x-K.x),y:pt.y+er*(_t.y-K.y)}}}function Blt(d,s,E){const B=d.length;let K,pt,_t,Ot,jt,te=__(d,0);for(let he=0;he!te.skip)),s.cubicInterpolationMode==="monotone")jlt(d,K);else{let te=B?d[d.length-1]:d[0];for(pt=0,_t=d.length;pt<_t;++pt)Ot=d[pt],jt=Rlt(te,Ot,d[Math.min(pt+1,_t-(B?0:1))%_t],s.tension),Ot.cp1x=jt.previous.x,Ot.cp1y=jt.previous.y,Ot.cp2x=jt.next.x,Ot.cp2y=jt.next.y,te=Ot}s.capBezierPoints&&Ult(d,E)}function MM(){return typeof window<"u"&&typeof document<"u"}function SM(d){let s=d.parentNode;return s&&s.toString()==="[object ShadowRoot]"&&(s=s.host),s}function w4(d,s,E){let B;return typeof d=="string"?(B=parseInt(d,10),d.indexOf("%")!==-1&&(B=B/100*s.parentNode[E])):B=d,B}const K4=d=>d.ownerDocument.defaultView.getComputedStyle(d,null);function Hlt(d,s){return K4(d).getPropertyValue(s)}const Wlt=["top","right","bottom","left"];function Ay(d,s,E){const B={};E=E?"-"+E:"";for(let K=0;K<4;K++){const pt=Wlt[K];B[pt]=parseFloat(d[s+"-"+pt+E])||0}return B.width=B.left+B.right,B.height=B.top+B.bottom,B}const qlt=(d,s,E)=>(d>0||s>0)&&(!E||!E.shadowRoot);function $lt(d,s){const E=d.touches,B=E&&E.length?E[0]:d,{offsetX:K,offsetY:pt}=B;let _t=!1,Ot,jt;if(qlt(K,pt,d.target))Ot=K,jt=pt;else{const te=s.getBoundingClientRect();Ot=B.clientX-te.left,jt=B.clientY-te.top,_t=!0}return{x:Ot,y:jt,box:_t}}function py(d,s){if("native"in d)return d;const{canvas:E,currentDevicePixelRatio:B}=s,K=K4(E),pt=K.boxSizing==="border-box",_t=Ay(K,"padding"),Ot=Ay(K,"border","width"),{x:jt,y:te,box:he}=$lt(d,E),De=_t.left+(he&&Ot.left),er=_t.top+(he&&Ot.top);let{width:pr,height:Mr}=s;return pt&&(pr-=_t.width+Ot.width,Mr-=_t.height+Ot.height),{x:Math.round((jt-De)/pr*E.width/B),y:Math.round((te-er)/Mr*E.height/B)}}function Zlt(d,s,E){let B,K;if(s===void 0||E===void 0){const pt=d&&SM(d);if(!pt)s=d.clientWidth,E=d.clientHeight;else{const _t=pt.getBoundingClientRect(),Ot=K4(pt),jt=Ay(Ot,"border","width"),te=Ay(Ot,"padding");s=_t.width-te.width-jt.width,E=_t.height-te.height-jt.height,B=w4(Ot.maxWidth,pt,"clientWidth"),K=w4(Ot.maxHeight,pt,"clientHeight")}}return{width:s,height:E,maxWidth:B||_4,maxHeight:K||_4}}const f1=d=>Math.round(d*10)/10;function Glt(d,s,E,B){const K=K4(d),pt=Ay(K,"margin"),_t=w4(K.maxWidth,d,"clientWidth")||_4,Ot=w4(K.maxHeight,d,"clientHeight")||_4,jt=Zlt(d,s,E);let{width:te,height:he}=jt;if(K.boxSizing==="content-box"){const er=Ay(K,"border","width"),pr=Ay(K,"padding");te-=pr.width+er.width,he-=pr.height+er.height}return te=Math.max(0,te-pt.width),he=Math.max(0,B?te/B:he-pt.height),te=f1(Math.min(te,_t,jt.maxWidth)),he=f1(Math.min(he,Ot,jt.maxHeight)),te&&!he&&(he=f1(te/2)),(s!==void 0||E!==void 0)&&B&&jt.height&&he>jt.height&&(he=jt.height,te=f1(Math.floor(he*B))),{width:te,height:he}}function wP(d,s,E){const B=s||1,K=f1(d.height*B),pt=f1(d.width*B);d.height=f1(d.height),d.width=f1(d.width);const _t=d.canvas;return _t.style&&(E||!_t.style.height&&!_t.style.width)&&(_t.style.height=`${d.height}px`,_t.style.width=`${d.width}px`),d.currentDevicePixelRatio!==B||_t.height!==K||_t.width!==pt?(d.currentDevicePixelRatio=B,_t.height=K,_t.width=pt,d.ctx.setTransform(B,0,0,B,0,0),!0):!1}const Ylt=function(){let d=!1;try{const s={get passive(){return d=!0,!1}};MM()&&(window.addEventListener("test",null,s),window.removeEventListener("test",null,s))}catch{}return d}();function kP(d,s){const E=Hlt(d,s),B=E&&E.match(/^(\d+)(\.\d+)?px$/);return B?+B[1]:void 0}function my(d,s,E,B){return{x:d.x+E*(s.x-d.x),y:d.y+E*(s.y-d.y)}}function Klt(d,s,E,B){return{x:d.x+E*(s.x-d.x),y:B==="middle"?E<.5?d.y:s.y:B==="after"?E<1?d.y:s.y:E>0?s.y:d.y}}function Xlt(d,s,E,B){const K={x:d.cp2x,y:d.cp2y},pt={x:s.cp1x,y:s.cp1y},_t=my(d,K,E),Ot=my(K,pt,E),jt=my(pt,s,E),te=my(_t,Ot,E),he=my(Ot,jt,E);return my(te,he,E)}const Jlt=function(d,s){return{x(E){return d+d+s-E},setWidth(E){s=E},textAlign(E){return E==="center"?E:E==="right"?"left":"right"},xPlus(E,B){return E-B},leftForLtr(E,B){return E-B}}},Qlt=function(){return{x(d){return d},setWidth(d){},textAlign(d){return d},xPlus(d,s){return d+s},leftForLtr(d,s){return d}}};function f_(d,s,E){return d?Jlt(s,E):Qlt()}function xD(d,s){let E,B;(s==="ltr"||s==="rtl")&&(E=d.canvas.style,B=[E.getPropertyValue("direction"),E.getPropertyPriority("direction")],E.setProperty("direction",s,"important"),d.prevTextDirection=B)}function _D(d,s){s!==void 0&&(delete d.prevTextDirection,d.canvas.style.setProperty("direction",s[0],s[1]))}function bD(d){return d==="angle"?{between:Y2,compare:Jst,normalize:q0}:{between:nv,compare:(s,E)=>s-E,normalize:s=>s}}function TP({start:d,end:s,count:E,loop:B,style:K}){return{start:d%E,end:s%E,loop:B&&(s-d+1)%E===0,style:K}}function tut(d,s,E){const{property:B,start:K,end:pt}=E,{between:_t,normalize:Ot}=bD(B),jt=s.length;let{start:te,end:he,loop:De}=d,er,pr;if(De){for(te+=jt,he+=jt,er=0,pr=jt;erjt(K,cn,mn)&&Ot(K,cn)!==0,Bn=()=>Ot(pt,mn)===0||jt(pt,cn,mn),ni=()=>Tr||Jn(),Wi=()=>!Tr||Bn();for(let Un=he,qr=he;Un<=De;++Un)Dt=s[Un%_t],!Dt.skip&&(mn=te(Dt[B]),mn!==cn&&(Tr=jt(mn,K,pt),Vr===null&&ni()&&(Vr=Ot(mn,K)===0?Un:qr),Vr!==null&&Wi()&&(Mr.push(TP({start:Vr,end:Un,loop:er,count:_t,style:pr})),Vr=null),qr=Un,cn=mn));return Vr!==null&&Mr.push(TP({start:Vr,end:De,loop:er,count:_t,style:pr})),Mr}function kD(d,s){const E=[],B=d.segments;for(let K=0;KK&&d[pt%s].skip;)pt--;return pt%=s,{start:K,end:pt}}function rut(d,s,E,B){const K=d.length,pt=[];let _t=s,Ot=d[s],jt;for(jt=s+1;jt<=E;++jt){const te=d[jt%K];te.skip||te.stop?Ot.skip||(B=!1,pt.push({start:s%K,end:(jt-1)%K,loop:B}),s=_t=te.stop?jt:null):(_t=jt,Ot.skip&&(s=jt)),Ot=te}return _t!==null&&pt.push({start:s%K,end:_t%K,loop:B}),pt}function nut(d,s){const E=d.points,B=d.options.spanGaps,K=E.length;if(!K)return[];const pt=!!d._loop,{start:_t,end:Ot}=eut(E,K,pt,B);if(B===!0)return AP(d,[{start:_t,end:Ot,loop:pt}],E,s);const jt=Ot<_t?Ot+K:Ot,te=!!d._fullLoop&&_t===0&&Ot===K-1;return AP(d,rut(E,_t,jt,te),E,s)}function AP(d,s,E,B){return!B||!B.setContext||!E?s:iut(d,s,E,B)}function iut(d,s,E,B){const K=d._chart.getContext(),pt=MP(d.options),{_datasetIndex:_t,options:{spanGaps:Ot}}=d,jt=E.length,te=[];let he=pt,De=s[0].start,er=De;function pr(Mr,Tr,Vr,mn){const Dt=Ot?-1:1;if(Mr!==Tr){for(Mr+=jt;E[Mr%jt].skip;)Mr-=Dt;for(;E[Tr%jt].skip;)Tr+=Dt;Mr%jt!==Tr%jt&&(te.push({start:Mr%jt,end:Tr%jt,loop:Vr,style:mn}),he=mn,De=Tr%jt)}}for(const Mr of s){De=Ot?De:Mr.start;let Tr=E[De%jt],Vr;for(er=De+1;er<=Mr.end;er++){const mn=E[er%jt];Vr=MP(B.setContext(zy(K,{type:"segment",p0:Tr,p1:mn,p0DataIndex:(er-1)%jt,p1DataIndex:er%jt,datasetIndex:_t}))),aut(Vr,he)&&pr(De,er-1,Mr.loop,he),Tr=mn,he=Vr}De{let d=0;return()=>d++})();function Nh(d){return d==null}function Yd(d){if(Array.isArray&&Array.isArray(d))return!0;const s=Object.prototype.toString.call(d);return s.slice(0,7)==="[object"&&s.slice(-6)==="Array]"}function Sc(d){return d!==null&&Object.prototype.toString.call(d)==="[object Object]"}function t0(d){return(typeof d=="number"||d instanceof Number)&&isFinite(+d)}function og(d,s){return t0(d)?d:s}function cc(d,s){return typeof d>"u"?s:d}const olt=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100:+d/s,sD=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100*s:+d;function Df(d,s,E){if(d&&typeof d.call=="function")return d.apply(E,s)}function Jh(d,s,E,R){let Y,dt,_t;if(Yd(d))for(dt=d.length,Y=0;Yd,x:d=>d.x,y:d=>d.y};function ult(d){const s=d.split("."),E=[];let R="";for(const Y of s)R+=Y,R.endsWith("\\")?R=R.slice(0,-1)+".":(E.push(R),R="");return E}function clt(d){const s=ult(d);return E=>{for(const R of s){if(R==="")break;E=E&&E[R]}return E}}function Py(d,s){return(cP[s]||(cP[s]=clt(s)))(d)}function xM(d){return d.charAt(0).toUpperCase()+d.slice(1)}const Z2=d=>typeof d<"u",b1=d=>typeof d=="function",hP=(d,s)=>{if(d.size!==s.size)return!1;for(const E of d)if(!s.has(E))return!1;return!0};function hlt(d){return d.type==="mouseup"||d.type==="click"||d.type==="contextmenu"}const Qh=Math.PI,sd=2*Qh,flt=sd+Qh,b4=Number.POSITIVE_INFINITY,dlt=Qh/180,ip=Qh/2,fy=Qh/4,fP=Qh*2/3,uD=Math.log10,gg=Math.sign;function P2(d,s,E){return Math.abs(d-s)Y-dt).pop(),s}function mlt(d){return typeof d=="symbol"||typeof d=="object"&&d!==null&&!(Symbol.toPrimitive in d||"toString"in d||"valueOf"in d)}function G2(d){return!mlt(d)&&!isNaN(parseFloat(d))&&isFinite(d)}function glt(d,s){const E=Math.round(d);return E-s<=d&&E+s>=d}function vlt(d,s,E){let R,Y,dt;for(R=0,Y=d.length;Rjt&&te=Math.min(s,E)-R&&d<=Math.max(s,E)+R}function _M(d,s,E){E=E||(_t=>d[_t]1;)dt=Y+R>>1,E(dt)?Y=dt:R=dt;return{lo:Y,hi:R}}const ky=(d,s,E,R)=>_M(d,E,R?Y=>{const dt=d[Y][s];return dtd[Y][s]_M(d,E,R=>d[R][s]>=E);function wlt(d,s,E){let R=0,Y=d.length;for(;RR&&d[Y-1]>E;)Y--;return R>0||Y{const R="_onData"+xM(E),Y=d[E];Object.defineProperty(d,E,{configurable:!0,enumerable:!1,value(...dt){const _t=Y.apply(this,dt);return d._chartjs.listeners.forEach(zt=>{typeof zt[R]=="function"&&zt[R](...dt)}),_t}})})}function mP(d,s){const E=d._chartjs;if(!E)return;const R=E.listeners,Y=R.indexOf(s);Y!==-1&&R.splice(Y,1),!(R.length>0)&&(hD.forEach(dt=>{delete d[dt]}),delete d._chartjs)}function fD(d){const s=new Set(d);return s.size===d.length?d:Array.from(s)}const dD=function(){return typeof window>"u"?function(d){return d()}:window.requestAnimationFrame}();function pD(d,s){let E=[],R=!1;return function(...Y){E=Y,R||(R=!0,dD.call(window,()=>{R=!1,d.apply(s,E)}))}}function Tlt(d,s){let E;return function(...R){return s?(clearTimeout(E),E=setTimeout(d,s,R)):d.apply(this,R),s}}const bM=d=>d==="start"?"left":d==="end"?"right":"center",qp=(d,s,E)=>d==="start"?s:d==="end"?E:(s+E)/2,Alt=(d,s,E,R)=>d===(R?"left":"right")?E:d==="center"?(s+E)/2:s;function Mlt(d,s,E){const R=s.length;let Y=0,dt=R;if(d._sorted){const{iScale:_t,vScale:zt,_parsed:jt}=d,te=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null,ce=_t.axis,{min:Ie,max:Je,minDefined:fr,maxDefined:Ar}=_t.getUserBounds();if(fr){if(Y=Math.min(ky(jt,ce,Ie).lo,E?R:ky(s,ce,_t.getPixelForValue(Ie)).lo),te){const kr=jt.slice(0,Y+1).reverse().findIndex(Vr=>!Nh(Vr[zt.axis]));Y-=Math.max(0,kr)}Y=Jp(Y,0,R-1)}if(Ar){let kr=Math.max(ky(jt,_t.axis,Je,!0).hi+1,E?0:ky(s,ce,_t.getPixelForValue(Je),!0).hi+1);if(te){const Vr=jt.slice(kr-1).findIndex(fn=>!Nh(fn[zt.axis]));kr+=Math.max(0,Vr)}dt=Jp(kr,Y,R)-Y}else dt=R-Y}return{start:Y,count:dt}}function Slt(d){const{xScale:s,yScale:E,_scaleRanges:R}=d,Y={xmin:s.min,xmax:s.max,ymin:E.min,ymax:E.max};if(!R)return d._scaleRanges=Y,!0;const dt=R.xmin!==s.min||R.xmax!==s.max||R.ymin!==E.min||R.ymax!==E.max;return Object.assign(R,Y),dt}const R5=d=>d===0||d===1,gP=(d,s,E)=>-(Math.pow(2,10*(d-=1))*Math.sin((d-s)*sd/E)),vP=(d,s,E)=>Math.pow(2,-10*d)*Math.sin((d-s)*sd/E)+1,I2={linear:d=>d,easeInQuad:d=>d*d,easeOutQuad:d=>-d*(d-2),easeInOutQuad:d=>(d/=.5)<1?.5*d*d:-.5*(--d*(d-2)-1),easeInCubic:d=>d*d*d,easeOutCubic:d=>(d-=1)*d*d+1,easeInOutCubic:d=>(d/=.5)<1?.5*d*d*d:.5*((d-=2)*d*d+2),easeInQuart:d=>d*d*d*d,easeOutQuart:d=>-((d-=1)*d*d*d-1),easeInOutQuart:d=>(d/=.5)<1?.5*d*d*d*d:-.5*((d-=2)*d*d*d-2),easeInQuint:d=>d*d*d*d*d,easeOutQuint:d=>(d-=1)*d*d*d*d+1,easeInOutQuint:d=>(d/=.5)<1?.5*d*d*d*d*d:.5*((d-=2)*d*d*d*d+2),easeInSine:d=>-Math.cos(d*ip)+1,easeOutSine:d=>Math.sin(d*ip),easeInOutSine:d=>-.5*(Math.cos(Qh*d)-1),easeInExpo:d=>d===0?0:Math.pow(2,10*(d-1)),easeOutExpo:d=>d===1?1:-Math.pow(2,-10*d)+1,easeInOutExpo:d=>R5(d)?d:d<.5?.5*Math.pow(2,10*(d*2-1)):.5*(-Math.pow(2,-10*(d*2-1))+2),easeInCirc:d=>d>=1?d:-(Math.sqrt(1-d*d)-1),easeOutCirc:d=>Math.sqrt(1-(d-=1)*d),easeInOutCirc:d=>(d/=.5)<1?-.5*(Math.sqrt(1-d*d)-1):.5*(Math.sqrt(1-(d-=2)*d)+1),easeInElastic:d=>R5(d)?d:gP(d,.075,.3),easeOutElastic:d=>R5(d)?d:vP(d,.075,.3),easeInOutElastic(d){return R5(d)?d:d<.5?.5*gP(d*2,.1125,.45):.5+.5*vP(d*2-1,.1125,.45)},easeInBack(d){return d*d*((1.70158+1)*d-1.70158)},easeOutBack(d){return(d-=1)*d*((1.70158+1)*d+1.70158)+1},easeInOutBack(d){let s=1.70158;return(d/=.5)<1?.5*(d*d*(((s*=1.525)+1)*d-s)):.5*((d-=2)*d*(((s*=1.525)+1)*d+s)+2)},easeInBounce:d=>1-I2.easeOutBounce(1-d),easeOutBounce(d){return d<1/2.75?7.5625*d*d:d<2/2.75?7.5625*(d-=1.5/2.75)*d+.75:d<2.5/2.75?7.5625*(d-=2.25/2.75)*d+.9375:7.5625*(d-=2.625/2.75)*d+.984375},easeInOutBounce:d=>d<.5?I2.easeInBounce(d*2)*.5:I2.easeOutBounce(d*2-1)*.5+.5};function wM(d){if(d&&typeof d=="object"){const s=d.toString();return s==="[object CanvasPattern]"||s==="[object CanvasGradient]"}return!1}function yP(d){return wM(d)?d:new q2(d)}function V8(d){return wM(d)?d:new q2(d).saturate(.5).darken(.1).hexString()}const Elt=["x","y","borderWidth","radius","tension"],Clt=["color","borderColor","backgroundColor"];function Llt(d){d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:s=>s!=="onProgress"&&s!=="onComplete"&&s!=="fn"}),d.set("animations",{colors:{type:"color",properties:Clt},numbers:{type:"number",properties:Elt}}),d.describe("animations",{_fallback:"animation"}),d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:s=>s|0}}}})}function Plt(d){d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const xP=new Map;function Ilt(d,s){s=s||{};const E=d+JSON.stringify(s);let R=xP.get(E);return R||(R=new Intl.NumberFormat(d,s),xP.set(E,R)),R}function kM(d,s,E){return Ilt(s,E).format(d)}const zlt={values(d){return Yd(d)?d:""+d},numeric(d,s,E){if(d===0)return"0";const R=this.chart.options.locale;let Y,dt=d;if(E.length>1){const te=Math.max(Math.abs(E[0].value),Math.abs(E[E.length-1].value));(te<1e-4||te>1e15)&&(Y="scientific"),dt=Olt(d,E)}const _t=uD(Math.abs(dt)),zt=isNaN(_t)?1:Math.max(Math.min(-1*Math.floor(_t),20),0),jt={notation:Y,minimumFractionDigits:zt,maximumFractionDigits:zt};return Object.assign(jt,this.options.ticks.format),kM(d,R,jt)}};function Olt(d,s){let E=s.length>3?s[2].value-s[1].value:s[1].value-s[0].value;return Math.abs(E)>=1&&d!==Math.floor(d)&&(E=d-Math.floor(d)),E}var mD={formatters:zlt};function Dlt(d){d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(s,E)=>E.lineWidth,tickColor:(s,E)=>E.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mD.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.route("scale.ticks","color","","color"),d.route("scale.grid","color","","borderColor"),d.route("scale.border","color","","borderColor"),d.route("scale.title","color","","color"),d.describe("scale",{_fallback:!1,_scriptable:s=>!s.startsWith("before")&&!s.startsWith("after")&&s!=="callback"&&s!=="parser",_indexable:s=>s!=="borderDash"&&s!=="tickBorderDash"&&s!=="dash"}),d.describe("scales",{_fallback:"scale"}),d.describe("scale.ticks",{_scriptable:s=>s!=="backdropPadding"&&s!=="callback",_indexable:s=>s!=="backdropPadding"})}const Iy=Object.create(null),PA=Object.create(null);function z2(d,s){if(!s)return d;const E=s.split(".");for(let R=0,Y=E.length;RR.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(R,Y)=>V8(Y.backgroundColor),this.hoverBorderColor=(R,Y)=>V8(Y.borderColor),this.hoverColor=(R,Y)=>V8(Y.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(s),this.apply(E)}set(s,E){return H8(this,s,E)}get(s){return z2(this,s)}describe(s,E){return H8(PA,s,E)}override(s,E){return H8(Iy,s,E)}route(s,E,R,Y){const dt=z2(this,s),_t=z2(this,R),zt="_"+E;Object.defineProperties(dt,{[zt]:{value:dt[E],writable:!0},[E]:{enumerable:!0,get(){const jt=this[zt],te=_t[Y];return Sc(jt)?Object.assign({},te,jt):cc(jt,te)},set(jt){this[zt]=jt}}})}apply(s){s.forEach(E=>E(this))}}var Bd=new Flt({_scriptable:d=>!d.startsWith("on"),_indexable:d=>d!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Llt,Plt,Dlt]);function Blt(d){return!d||Nh(d.size)||Nh(d.family)?null:(d.style?d.style+" ":"")+(d.weight?d.weight+" ":"")+d.size+"px "+d.family}function _P(d,s,E,R,Y){let dt=s[Y];return dt||(dt=s[Y]=d.measureText(Y).width,E.push(Y)),dt>R&&(R=dt),R}function dy(d,s,E){const R=d.currentDevicePixelRatio,Y=E!==0?Math.max(E/2,.5):0;return Math.round((s-Y)*R)/R+Y}function bP(d,s){!s&&!d||(s=s||d.getContext("2d"),s.save(),s.resetTransform(),s.clearRect(0,0,d.width,d.height),s.restore())}function IA(d,s,E,R){gD(d,s,E,R,null)}function gD(d,s,E,R,Y){let dt,_t,zt,jt,te,ce,Ie,Je;const fr=s.pointStyle,Ar=s.rotation,kr=s.radius;let Vr=(Ar||0)*dlt;if(fr&&typeof fr=="object"&&(dt=fr.toString(),dt==="[object HTMLImageElement]"||dt==="[object HTMLCanvasElement]")){d.save(),d.translate(E,R),d.rotate(Vr),d.drawImage(fr,-fr.width/2,-fr.height/2,fr.width,fr.height),d.restore();return}if(!(isNaN(kr)||kr<=0)){switch(d.beginPath(),fr){default:Y?d.ellipse(E,R,Y/2,kr,0,0,sd):d.arc(E,R,kr,0,sd),d.closePath();break;case"triangle":ce=Y?Y/2:kr,d.moveTo(E+Math.sin(Vr)*ce,R-Math.cos(Vr)*kr),Vr+=fP,d.lineTo(E+Math.sin(Vr)*ce,R-Math.cos(Vr)*kr),Vr+=fP,d.lineTo(E+Math.sin(Vr)*ce,R-Math.cos(Vr)*kr),d.closePath();break;case"rectRounded":te=kr*.516,jt=kr-te,_t=Math.cos(Vr+fy)*jt,Ie=Math.cos(Vr+fy)*(Y?Y/2-te:jt),zt=Math.sin(Vr+fy)*jt,Je=Math.sin(Vr+fy)*(Y?Y/2-te:jt),d.arc(E-Ie,R-zt,te,Vr-Qh,Vr-ip),d.arc(E+Je,R-_t,te,Vr-ip,Vr),d.arc(E+Ie,R+zt,te,Vr,Vr+ip),d.arc(E-Je,R+_t,te,Vr+ip,Vr+Qh),d.closePath();break;case"rect":if(!Ar){jt=Math.SQRT1_2*kr,ce=Y?Y/2:jt,d.rect(E-ce,R-jt,2*ce,2*jt);break}Vr+=fy;case"rectRot":Ie=Math.cos(Vr)*(Y?Y/2:kr),_t=Math.cos(Vr)*kr,zt=Math.sin(Vr)*kr,Je=Math.sin(Vr)*(Y?Y/2:kr),d.moveTo(E-Ie,R-zt),d.lineTo(E+Je,R-_t),d.lineTo(E+Ie,R+zt),d.lineTo(E-Je,R+_t),d.closePath();break;case"crossRot":Vr+=fy;case"cross":Ie=Math.cos(Vr)*(Y?Y/2:kr),_t=Math.cos(Vr)*kr,zt=Math.sin(Vr)*kr,Je=Math.sin(Vr)*(Y?Y/2:kr),d.moveTo(E-Ie,R-zt),d.lineTo(E+Ie,R+zt),d.moveTo(E+Je,R-_t),d.lineTo(E-Je,R+_t);break;case"star":Ie=Math.cos(Vr)*(Y?Y/2:kr),_t=Math.cos(Vr)*kr,zt=Math.sin(Vr)*kr,Je=Math.sin(Vr)*(Y?Y/2:kr),d.moveTo(E-Ie,R-zt),d.lineTo(E+Ie,R+zt),d.moveTo(E+Je,R-_t),d.lineTo(E-Je,R+_t),Vr+=fy,Ie=Math.cos(Vr)*(Y?Y/2:kr),_t=Math.cos(Vr)*kr,zt=Math.sin(Vr)*kr,Je=Math.sin(Vr)*(Y?Y/2:kr),d.moveTo(E-Ie,R-zt),d.lineTo(E+Ie,R+zt),d.moveTo(E+Je,R-_t),d.lineTo(E-Je,R+_t);break;case"line":_t=Y?Y/2:Math.cos(Vr)*kr,zt=Math.sin(Vr)*kr,d.moveTo(E-_t,R-zt),d.lineTo(E+_t,R+zt);break;case"dash":d.moveTo(E,R),d.lineTo(E+Math.cos(Vr)*(Y?Y/2:kr),R+Math.sin(Vr)*kr);break;case!1:d.closePath();break}d.fill(),s.borderWidth>0&&d.stroke()}}function K2(d,s,E){return E=E||.5,!s||d&&d.x>s.left-E&&d.xs.top-E&&d.y0&&dt.strokeColor!=="";let jt,te;for(d.save(),d.font=Y.string,jlt(d,dt),jt=0;jt<_t.length;++jt)te=_t[jt],dt.backdrop&&Vlt(d,dt.backdrop),zt&&(dt.strokeColor&&(d.strokeStyle=dt.strokeColor),Nh(dt.strokeWidth)||(d.lineWidth=dt.strokeWidth),d.strokeText(te,E,R,dt.maxWidth)),d.fillText(te,E,R,dt.maxWidth),Ult(d,E,R,te,dt),R+=Number(Y.lineHeight);d.restore()}function w4(d,s){const{x:E,y:R,w:Y,h:dt,radius:_t}=s;d.arc(E+_t.topLeft,R+_t.topLeft,_t.topLeft,1.5*Qh,Qh,!0),d.lineTo(E,R+dt-_t.bottomLeft),d.arc(E+_t.bottomLeft,R+dt-_t.bottomLeft,_t.bottomLeft,Qh,ip,!0),d.lineTo(E+Y-_t.bottomRight,R+dt),d.arc(E+Y-_t.bottomRight,R+dt-_t.bottomRight,_t.bottomRight,ip,0,!0),d.lineTo(E+Y,R+_t.topRight),d.arc(E+Y-_t.topRight,R+_t.topRight,_t.topRight,0,-ip,!0),d.lineTo(E+_t.topLeft,R)}const Hlt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wlt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function qlt(d,s){const E=(""+d).match(Hlt);if(!E||E[1]==="normal")return s*1.2;switch(d=+E[2],E[3]){case"px":return d;case"%":d/=100;break}return s*d}const $lt=d=>+d||0;function TM(d,s){const E={},R=Sc(s),Y=R?Object.keys(s):s,dt=Sc(d)?R?_t=>cc(d[_t],d[s[_t]]):_t=>d[_t]:()=>d;for(const _t of Y)E[_t]=$lt(dt(_t));return E}function vD(d){return TM(d,{top:"y",right:"x",bottom:"y",left:"x"})}function f_(d){return TM(d,["topLeft","topRight","bottomLeft","bottomRight"])}function fm(d){const s=vD(d);return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Qp(d,s){d=d||{},s=s||Bd.font;let E=cc(d.size,s.size);typeof E=="string"&&(E=parseInt(E,10));let R=cc(d.style,s.style);R&&!(""+R).match(Wlt)&&(console.warn('Invalid font style specified: "'+R+'"'),R=void 0);const Y={family:cc(d.family,s.family),lineHeight:qlt(cc(d.lineHeight,s.lineHeight),E),size:E,style:R,weight:cc(d.weight,s.weight),string:""};return Y.string=Blt(Y),Y}function N5(d,s,E,R){let Y,dt,_t;for(Y=0,dt=d.length;YE&&zt===0?0:zt+jt;return{min:_t(R,-Math.abs(dt)),max:_t(Y,dt)}}function Dy(d,s){return Object.assign(Object.create(d),s)}function AM(d,s=[""],E,R,Y=()=>d[0]){const dt=E||d;typeof R>"u"&&(R=bD("_fallback",d));const _t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:d,_rootScopes:dt,_fallback:R,_getTarget:Y,override:zt=>AM([zt,...d],s,dt,R)};return new Proxy(_t,{deleteProperty(zt,jt){return delete zt[jt],delete zt._keys,delete d[0][jt],!0},get(zt,jt){return xD(zt,jt,()=>eut(jt,s,d,zt))},getOwnPropertyDescriptor(zt,jt){return Reflect.getOwnPropertyDescriptor(zt._scopes[0],jt)},getPrototypeOf(){return Reflect.getPrototypeOf(d[0])},has(zt,jt){return kP(zt).includes(jt)},ownKeys(zt){return kP(zt)},set(zt,jt,te){const ce=zt._storage||(zt._storage=Y());return zt[jt]=ce[jt]=te,delete zt._keys,!0}})}function __(d,s,E,R){const Y={_cacheable:!1,_proxy:d,_context:s,_subProxy:E,_stack:new Set,_descriptors:yD(d,R),setContext:dt=>__(d,dt,E,R),override:dt=>__(d.override(dt),s,E,R)};return new Proxy(Y,{deleteProperty(dt,_t){return delete dt[_t],delete d[_t],!0},get(dt,_t,zt){return xD(dt,_t,()=>Ylt(dt,_t,zt))},getOwnPropertyDescriptor(dt,_t){return dt._descriptors.allKeys?Reflect.has(d,_t)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(d,_t)},getPrototypeOf(){return Reflect.getPrototypeOf(d)},has(dt,_t){return Reflect.has(d,_t)},ownKeys(){return Reflect.ownKeys(d)},set(dt,_t,zt){return d[_t]=zt,delete dt[_t],!0}})}function yD(d,s={scriptable:!0,indexable:!0}){const{_scriptable:E=s.scriptable,_indexable:R=s.indexable,_allKeys:Y=s.allKeys}=d;return{allKeys:Y,scriptable:E,indexable:R,isScriptable:b1(E)?E:()=>E,isIndexable:b1(R)?R:()=>R}}const Glt=(d,s)=>d?d+xM(s):s,MM=(d,s)=>Sc(s)&&d!=="adapters"&&(Object.getPrototypeOf(s)===null||s.constructor===Object);function xD(d,s,E){if(Object.prototype.hasOwnProperty.call(d,s)||s==="constructor")return d[s];const R=E();return d[s]=R,R}function Ylt(d,s,E){const{_proxy:R,_context:Y,_subProxy:dt,_descriptors:_t}=d;let zt=R[s];return b1(zt)&&_t.isScriptable(s)&&(zt=Klt(s,zt,d,E)),Yd(zt)&&zt.length&&(zt=Xlt(s,zt,d,_t.isIndexable)),MM(s,zt)&&(zt=__(zt,Y,dt&&dt[s],_t)),zt}function Klt(d,s,E,R){const{_proxy:Y,_context:dt,_subProxy:_t,_stack:zt}=E;if(zt.has(d))throw new Error("Recursion detected: "+Array.from(zt).join("->")+"->"+d);zt.add(d);let jt=s(dt,_t||R);return zt.delete(d),MM(d,jt)&&(jt=SM(Y._scopes,Y,d,jt)),jt}function Xlt(d,s,E,R){const{_proxy:Y,_context:dt,_subProxy:_t,_descriptors:zt}=E;if(typeof dt.index<"u"&&R(d))return s[dt.index%s.length];if(Sc(s[0])){const jt=s,te=Y._scopes.filter(ce=>ce!==jt);s=[];for(const ce of jt){const Ie=SM(te,Y,d,ce);s.push(__(Ie,dt,_t&&_t[d],zt))}}return s}function _D(d,s,E){return b1(d)?d(s,E):d}const Jlt=(d,s)=>d===!0?s:typeof d=="string"?Py(s,d):void 0;function Qlt(d,s,E,R,Y){for(const dt of s){const _t=Jlt(E,dt);if(_t){d.add(_t);const zt=_D(_t._fallback,E,Y);if(typeof zt<"u"&&zt!==E&&zt!==R)return zt}else if(_t===!1&&typeof R<"u"&&E!==R)return null}return!1}function SM(d,s,E,R){const Y=s._rootScopes,dt=_D(s._fallback,E,R),_t=[...d,...Y],zt=new Set;zt.add(R);let jt=wP(zt,_t,E,dt||E,R);return jt===null||typeof dt<"u"&&dt!==E&&(jt=wP(zt,_t,dt,jt,R),jt===null)?!1:AM(Array.from(zt),[""],Y,dt,()=>tut(s,E,R))}function wP(d,s,E,R,Y){for(;E;)E=Qlt(d,s,E,R,Y);return E}function tut(d,s,E){const R=d._getTarget();s in R||(R[s]={});const Y=R[s];return Yd(Y)&&Sc(E)?E:Y||{}}function eut(d,s,E,R){let Y;for(const dt of s)if(Y=bD(Glt(dt,d),E),typeof Y<"u")return MM(d,Y)?SM(E,R,d,Y):Y}function bD(d,s){for(const E of s){if(!E)continue;const R=E[d];if(typeof R<"u")return R}}function kP(d){let s=d._keys;return s||(s=d._keys=rut(d._scopes)),s}function rut(d){const s=new Set;for(const E of d)for(const R of Object.keys(E).filter(Y=>!Y.startsWith("_")))s.add(R);return Array.from(s)}const nut=Number.EPSILON||1e-14,b_=(d,s)=>sd==="x"?"y":"x";function iut(d,s,E,R){const Y=d.skip?s:d,dt=s,_t=E.skip?s:E,zt=LA(dt,Y),jt=LA(_t,dt);let te=zt/(zt+jt),ce=jt/(zt+jt);te=isNaN(te)?0:te,ce=isNaN(ce)?0:ce;const Ie=R*te,Je=R*ce;return{previous:{x:dt.x-Ie*(_t.x-Y.x),y:dt.y-Ie*(_t.y-Y.y)},next:{x:dt.x+Je*(_t.x-Y.x),y:dt.y+Je*(_t.y-Y.y)}}}function aut(d,s,E){const R=d.length;let Y,dt,_t,zt,jt,te=b_(d,0);for(let ce=0;ce!te.skip)),s.cubicInterpolationMode==="monotone")sut(d,Y);else{let te=R?d[d.length-1]:d[0];for(dt=0,_t=d.length;dt<_t;++dt)zt=d[dt],jt=iut(te,zt,d[Math.min(dt+1,_t-(R?0:1))%_t],s.tension),zt.cp1x=jt.previous.x,zt.cp1y=jt.previous.y,zt.cp2x=jt.next.x,zt.cp2y=jt.next.y,te=zt}s.capBezierPoints&&lut(d,E)}function EM(){return typeof window<"u"&&typeof document<"u"}function CM(d){let s=d.parentNode;return s&&s.toString()==="[object ShadowRoot]"&&(s=s.host),s}function k4(d,s,E){let R;return typeof d=="string"?(R=parseInt(d,10),d.indexOf("%")!==-1&&(R=R/100*s.parentNode[E])):R=d,R}const J4=d=>d.ownerDocument.defaultView.getComputedStyle(d,null);function cut(d,s){return J4(d).getPropertyValue(s)}const hut=["top","right","bottom","left"];function Sy(d,s,E){const R={};E=E?"-"+E:"";for(let Y=0;Y<4;Y++){const dt=hut[Y];R[dt]=parseFloat(d[s+"-"+dt+E])||0}return R.width=R.left+R.right,R.height=R.top+R.bottom,R}const fut=(d,s,E)=>(d>0||s>0)&&(!E||!E.shadowRoot);function dut(d,s){const E=d.touches,R=E&&E.length?E[0]:d,{offsetX:Y,offsetY:dt}=R;let _t=!1,zt,jt;if(fut(Y,dt,d.target))zt=Y,jt=dt;else{const te=s.getBoundingClientRect();zt=R.clientX-te.left,jt=R.clientY-te.top,_t=!0}return{x:zt,y:jt,box:_t}}function gy(d,s){if("native"in d)return d;const{canvas:E,currentDevicePixelRatio:R}=s,Y=J4(E),dt=Y.boxSizing==="border-box",_t=Sy(Y,"padding"),zt=Sy(Y,"border","width"),{x:jt,y:te,box:ce}=dut(d,E),Ie=_t.left+(ce&&zt.left),Je=_t.top+(ce&&zt.top);let{width:fr,height:Ar}=s;return dt&&(fr-=_t.width+zt.width,Ar-=_t.height+zt.height),{x:Math.round((jt-Ie)/fr*E.width/R),y:Math.round((te-Je)/Ar*E.height/R)}}function put(d,s,E){let R,Y;if(s===void 0||E===void 0){const dt=d&&CM(d);if(!dt)s=d.clientWidth,E=d.clientHeight;else{const _t=dt.getBoundingClientRect(),zt=J4(dt),jt=Sy(zt,"border","width"),te=Sy(zt,"padding");s=_t.width-te.width-jt.width,E=_t.height-te.height-jt.height,R=k4(zt.maxWidth,dt,"clientWidth"),Y=k4(zt.maxHeight,dt,"clientHeight")}}return{width:s,height:E,maxWidth:R||b4,maxHeight:Y||b4}}const d1=d=>Math.round(d*10)/10;function mut(d,s,E,R){const Y=J4(d),dt=Sy(Y,"margin"),_t=k4(Y.maxWidth,d,"clientWidth")||b4,zt=k4(Y.maxHeight,d,"clientHeight")||b4,jt=put(d,s,E);let{width:te,height:ce}=jt;if(Y.boxSizing==="content-box"){const Je=Sy(Y,"border","width"),fr=Sy(Y,"padding");te-=fr.width+Je.width,ce-=fr.height+Je.height}return te=Math.max(0,te-dt.width),ce=Math.max(0,R?te/R:ce-dt.height),te=d1(Math.min(te,_t,jt.maxWidth)),ce=d1(Math.min(ce,zt,jt.maxHeight)),te&&!ce&&(ce=d1(te/2)),(s!==void 0||E!==void 0)&&R&&jt.height&&ce>jt.height&&(ce=jt.height,te=d1(Math.floor(ce*R))),{width:te,height:ce}}function TP(d,s,E){const R=s||1,Y=d1(d.height*R),dt=d1(d.width*R);d.height=d1(d.height),d.width=d1(d.width);const _t=d.canvas;return _t.style&&(E||!_t.style.height&&!_t.style.width)&&(_t.style.height=`${d.height}px`,_t.style.width=`${d.width}px`),d.currentDevicePixelRatio!==R||_t.height!==Y||_t.width!==dt?(d.currentDevicePixelRatio=R,_t.height=Y,_t.width=dt,d.ctx.setTransform(R,0,0,R,0,0),!0):!1}const gut=function(){let d=!1;try{const s={get passive(){return d=!0,!1}};EM()&&(window.addEventListener("test",null,s),window.removeEventListener("test",null,s))}catch{}return d}();function AP(d,s){const E=cut(d,s),R=E&&E.match(/^(\d+)(\.\d+)?px$/);return R?+R[1]:void 0}function vy(d,s,E,R){return{x:d.x+E*(s.x-d.x),y:d.y+E*(s.y-d.y)}}function vut(d,s,E,R){return{x:d.x+E*(s.x-d.x),y:R==="middle"?E<.5?d.y:s.y:R==="after"?E<1?d.y:s.y:E>0?s.y:d.y}}function yut(d,s,E,R){const Y={x:d.cp2x,y:d.cp2y},dt={x:s.cp1x,y:s.cp1y},_t=vy(d,Y,E),zt=vy(Y,dt,E),jt=vy(dt,s,E),te=vy(_t,zt,E),ce=vy(zt,jt,E);return vy(te,ce,E)}const xut=function(d,s){return{x(E){return d+d+s-E},setWidth(E){s=E},textAlign(E){return E==="center"?E:E==="right"?"left":"right"},xPlus(E,R){return E-R},leftForLtr(E,R){return E-R}}},_ut=function(){return{x(d){return d},setWidth(d){},textAlign(d){return d},xPlus(d,s){return d+s},leftForLtr(d,s){return d}}};function d_(d,s,E){return d?xut(s,E):_ut()}function kD(d,s){let E,R;(s==="ltr"||s==="rtl")&&(E=d.canvas.style,R=[E.getPropertyValue("direction"),E.getPropertyPriority("direction")],E.setProperty("direction",s,"important"),d.prevTextDirection=R)}function TD(d,s){s!==void 0&&(delete d.prevTextDirection,d.canvas.style.setProperty("direction",s[0],s[1]))}function AD(d){return d==="angle"?{between:Y2,compare:xlt,normalize:$0}:{between:av,compare:(s,E)=>s-E,normalize:s=>s}}function MP({start:d,end:s,count:E,loop:R,style:Y}){return{start:d%E,end:s%E,loop:R&&(s-d+1)%E===0,style:Y}}function but(d,s,E){const{property:R,start:Y,end:dt}=E,{between:_t,normalize:zt}=AD(R),jt=s.length;let{start:te,end:ce,loop:Ie}=d,Je,fr;if(Ie){for(te+=jt,ce+=jt,Je=0,fr=jt;Jejt(Y,cn,fn)&&zt(Y,cn)!==0,Dn=()=>zt(dt,fn)===0||jt(dt,cn,fn),ii=()=>kr||ti(),Vi=()=>!kr||Dn();for(let Nn=ce,Wr=ce;Nn<=Ie;++Nn)Dt=s[Nn%_t],!Dt.skip&&(fn=te(Dt[R]),fn!==cn&&(kr=jt(fn,Y,dt),Vr===null&&ii()&&(Vr=zt(fn,Y)===0?Nn:Wr),Vr!==null&&Vi()&&(Ar.push(MP({start:Vr,end:Nn,loop:Je,count:_t,style:fr})),Vr=null),Wr=Nn,cn=fn));return Vr!==null&&Ar.push(MP({start:Vr,end:Ie,loop:Je,count:_t,style:fr})),Ar}function SD(d,s){const E=[],R=d.segments;for(let Y=0;YY&&d[dt%s].skip;)dt--;return dt%=s,{start:Y,end:dt}}function kut(d,s,E,R){const Y=d.length,dt=[];let _t=s,zt=d[s],jt;for(jt=s+1;jt<=E;++jt){const te=d[jt%Y];te.skip||te.stop?zt.skip||(R=!1,dt.push({start:s%Y,end:(jt-1)%Y,loop:R}),s=_t=te.stop?jt:null):(_t=jt,zt.skip&&(s=jt)),zt=te}return _t!==null&&dt.push({start:s%Y,end:_t%Y,loop:R}),dt}function Tut(d,s){const E=d.points,R=d.options.spanGaps,Y=E.length;if(!Y)return[];const dt=!!d._loop,{start:_t,end:zt}=wut(E,Y,dt,R);if(R===!0)return SP(d,[{start:_t,end:zt,loop:dt}],E,s);const jt=zt<_t?zt+Y:zt,te=!!d._fullLoop&&_t===0&&zt===Y-1;return SP(d,kut(E,_t,jt,te),E,s)}function SP(d,s,E,R){return!R||!R.setContext||!E?s:Aut(d,s,E,R)}function Aut(d,s,E,R){const Y=d._chart.getContext(),dt=EP(d.options),{_datasetIndex:_t,options:{spanGaps:zt}}=d,jt=E.length,te=[];let ce=dt,Ie=s[0].start,Je=Ie;function fr(Ar,kr,Vr,fn){const Dt=zt?-1:1;if(Ar!==kr){for(Ar+=jt;E[Ar%jt].skip;)Ar-=Dt;for(;E[kr%jt].skip;)kr+=Dt;Ar%jt!==kr%jt&&(te.push({start:Ar%jt,end:kr%jt,loop:Vr,style:fn}),ce=fn,Ie=kr%jt)}}for(const Ar of s){Ie=zt?Ie:Ar.start;let kr=E[Ie%jt],Vr;for(Je=Ie+1;Je<=Ar.end;Je++){const fn=E[Je%jt];Vr=EP(R.setContext(Dy(Y,{type:"segment",p0:kr,p1:fn,p0DataIndex:(Je-1)%jt,p1DataIndex:Je%jt,datasetIndex:_t}))),Mut(Vr,ce)&&fr(Ie,Je-1,Ar.loop,ce),kr=fn,ce=Vr}IeOt({chart:s,initial:E.initial,numSteps:_t,currentStep:Math.min(B-E.start,_t)}))}_refresh(){this._request||(this._running=!0,this._request=uD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(s=Date.now()){let E=0;this._charts.forEach((B,K)=>{if(!B.running||!B.items.length)return;const pt=B.items;let _t=pt.length-1,Ot=!1,jt;for(;_t>=0;--_t)jt=pt[_t],jt._active?(jt._total>B.duration&&(B.duration=jt._total),jt.tick(s),Ot=!0):(pt[_t]=pt[pt.length-1],pt.pop());Ot&&(K.draw(),this._notify(K,B,s,"progress")),pt.length||(B.running=!1,this._notify(K,B,s,"complete"),B.initial=!1),E+=pt.length}),this._lastDate=s,E===0&&(this._running=!1)}_getAnims(s){const E=this._charts;let B=E.get(s);return B||(B={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},E.set(s,B)),B}listen(s,E,B){this._getAnims(s).listeners[E].push(B)}add(s,E){!E||!E.length||this._getAnims(s).items.push(...E)}has(s){return this._getAnims(s).items.length>0}start(s){const E=this._charts.get(s);E&&(E.running=!0,E.start=Date.now(),E.duration=E.items.reduce((B,K)=>Math.max(B,K._duration),0),this._refresh())}running(s){if(!this._running)return!1;const E=this._charts.get(s);return!(!E||!E.running||!E.items.length)}stop(s){const E=this._charts.get(s);if(!E||!E.items.length)return;const B=E.items;let K=B.length-1;for(;K>=0;--K)B[K].cancel();E.items=[],this._notify(s,E,Date.now(),"complete")}remove(s){return this._charts.delete(s)}}var Kg=new sut;const SP="transparent",lut={boolean(d,s,E){return E>.5?s:d},color(d,s,E){const B=gP(d||SP),K=B.valid&&gP(s||SP);return K&&K.valid?K.mix(B,E).hexString():s},number(d,s,E){return d+(s-d)*E}};class uut{constructor(s,E,B,K){const pt=E[B];K=B5([s.to,K,pt,s.from]);const _t=B5([s.from,pt,K]);this._active=!0,this._fn=s.fn||lut[s.type||typeof _t],this._easing=I2[s.easing]||I2.linear,this._start=Math.floor(Date.now()+(s.delay||0)),this._duration=this._total=Math.floor(s.duration),this._loop=!!s.loop,this._target=E,this._prop=B,this._from=_t,this._to=K,this._promises=void 0}active(){return this._active}update(s,E,B){if(this._active){this._notify(!1);const K=this._target[this._prop],pt=B-this._start,_t=this._duration-pt;this._start=B,this._duration=Math.floor(Math.max(_t,s.duration)),this._total+=pt,this._loop=!!s.loop,this._to=B5([s.to,E,K,s.from]),this._from=B5([s.from,K,E])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(s){const E=s-this._start,B=this._duration,K=this._prop,pt=this._from,_t=this._loop,Ot=this._to;let jt;if(this._active=pt!==Ot&&(_t||E1?2-jt:jt,jt=this._easing(Math.min(1,Math.max(0,jt))),this._target[K]=this._fn(pt,Ot,jt)}wait(){const s=this._promises||(this._promises=[]);return new Promise((E,B)=>{s.push({res:E,rej:B})})}_notify(s){const E=s?"res":"rej",B=this._promises||[];for(let K=0;K{const pt=s[K];if(!Sc(pt))return;const _t={};for(const Ot of E)_t[Ot]=pt[Ot];(Yd(pt.properties)&&pt.properties||[K]).forEach(Ot=>{(Ot===K||!B.has(Ot))&&B.set(Ot,_t)})})}_animateOptions(s,E){const B=E.options,K=hut(s,B);if(!K)return[];const pt=this._createAnimations(K,B);return B.$shared&&cut(s.options.$animations,B).then(()=>{s.options=B},()=>{}),pt}_createAnimations(s,E){const B=this._properties,K=[],pt=s.$animations||(s.$animations={}),_t=Object.keys(E),Ot=Date.now();let jt;for(jt=_t.length-1;jt>=0;--jt){const te=_t[jt];if(te.charAt(0)==="$")continue;if(te==="options"){K.push(...this._animateOptions(s,E));continue}const he=E[te];let De=pt[te];const er=B.get(te);if(De)if(er&&De.active()){De.update(er,he,Ot);continue}else De.cancel();if(!er||!er.duration){s[te]=he;continue}pt[te]=De=new uut(er,s,te,he),K.push(De)}return K}update(s,E){if(this._properties.size===0){Object.assign(s,E);return}const B=this._createAnimations(s,E);if(B.length)return Kg.add(this._chart,B),!0}}function cut(d,s){const E=[],B=Object.keys(s);for(let K=0;K0||!E&&pt<0)return K.index}return null}function PP(d,s){const{chart:E,_cachedMeta:B}=d,K=E._stacks||(E._stacks={}),{iScale:pt,vScale:_t,index:Ot}=B,jt=pt.axis,te=_t.axis,he=mut(pt,_t,B),De=s.length;let er;for(let pr=0;prE[B].axis===s).shift()}function yut(d,s){return zy(d,{active:!1,dataset:void 0,datasetIndex:s,index:s,mode:"default",type:"dataset"})}function xut(d,s,E){return zy(d,{active:!1,dataIndex:s,parsed:void 0,raw:void 0,element:E,index:s,mode:"default",type:"data"})}function s2(d,s){const E=d.controller.index,B=d.vScale&&d.vScale.axis;if(B){s=s||d._parsed;for(const K of s){const pt=K._stacks;if(!pt||pt[B]===void 0||pt[B][E]===void 0)return;delete pt[B][E],pt[B]._visualValues!==void 0&&pt[B]._visualValues[E]!==void 0&&delete pt[B]._visualValues[E]}}}const q8=d=>d==="reset"||d==="none",IP=(d,s)=>s?d:Object.assign({},d),_ut=(d,s,E)=>d&&!s.hidden&&s._stacked&&{keys:MD(E,!0),values:null};class X4{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(s,E){this.chart=s,this._ctx=s.ctx,this.index=E,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const s=this._cachedMeta;this.configure(),this.linkScales(),s._stacked=H8(s.vScale,s),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(s){this.index!==s&&s2(this._cachedMeta),this.index=s}linkScales(){const s=this.chart,E=this._cachedMeta,B=this.getDataset(),K=(De,er,pr,Mr)=>De==="x"?er:De==="r"?Mr:pr,pt=E.xAxisID=cc(B.xAxisID,W8(s,"x")),_t=E.yAxisID=cc(B.yAxisID,W8(s,"y")),Ot=E.rAxisID=cc(B.rAxisID,W8(s,"r")),jt=E.indexAxis,te=E.iAxisID=K(jt,pt,_t,Ot),he=E.vAxisID=K(jt,_t,pt,Ot);E.xScale=this.getScaleForId(pt),E.yScale=this.getScaleForId(_t),E.rScale=this.getScaleForId(Ot),E.iScale=this.getScaleForId(te),E.vScale=this.getScaleForId(he)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(s){return this.chart.scales[s]}_getOtherScale(s){const E=this._cachedMeta;return s===E.iScale?E.vScale:E.iScale}reset(){this._update("reset")}_destroy(){const s=this._cachedMeta;this._data&&dP(this._data,this),s._stacked&&s2(s)}_dataCheck(){const s=this.getDataset(),E=s.data||(s.data=[]),B=this._data;if(Sc(E)){const K=this._cachedMeta;this._data=put(E,K)}else if(B!==E){if(B){dP(B,this);const K=this._cachedMeta;s2(K),K._parsed=[]}E&&Object.isExtensible(E)&&rlt(E,this),this._syncList=[],this._data=E}}addElements(){const s=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(s.dataset=new this.datasetElementType)}buildOrUpdateElements(s){const E=this._cachedMeta,B=this.getDataset();let K=!1;this._dataCheck();const pt=E._stacked;E._stacked=H8(E.vScale,E),E.stack!==B.stack&&(K=!0,s2(E),E.stack=B.stack),this._resyncElements(s),(K||pt!==E._stacked)&&(PP(this,E._parsed),E._stacked=H8(E.vScale,E))}configure(){const s=this.chart.config,E=s.datasetScopeKeys(this._type),B=s.getOptionScopes(this.getDataset(),E,!0);this.options=s.createResolver(B,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(s,E){const{_cachedMeta:B,_data:K}=this,{iScale:pt,_stacked:_t}=B,Ot=pt.axis;let jt=s===0&&E===K.length?!0:B._sorted,te=s>0&&B._parsed[s-1],he,De,er;if(this._parsing===!1)B._parsed=K,B._sorted=!0,er=K;else{Yd(K[s])?er=this.parseArrayData(B,K,s,E):Sc(K[s])?er=this.parseObjectData(B,K,s,E):er=this.parsePrimitiveData(B,K,s,E);const pr=()=>De[Ot]===null||te&&De[Ot]Tr||De=0;--er)if(!Mr()){this.updateRangeFromParsed(te,s,pr,jt);break}}return te}getAllParsedValues(s){const E=this._cachedMeta._parsed,B=[];let K,pt,_t;for(K=0,pt=E.length;K=0&&sthis.getContext(B,K,E),Tr=te.resolveNamedOptions(er,pr,Mr,De);return Tr.$shared&&(Tr.$shared=jt,pt[_t]=Object.freeze(IP(Tr,jt))),Tr}_resolveAnimations(s,E,B){const K=this.chart,pt=this._cachedDataOpts,_t=`animation-${E}`,Ot=pt[_t];if(Ot)return Ot;let jt;if(K.options.animation!==!1){const he=this.chart.config,De=he.datasetAnimationScopeKeys(this._type,E),er=he.getOptionScopes(this.getDataset(),De);jt=he.createResolver(er,this.getContext(s,B,E))}const te=new AD(K,jt&&jt.animations);return jt&&jt._cacheable&&(pt[_t]=Object.freeze(te)),te}getSharedOptions(s){if(s.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},s))}includeOptions(s,E){return!E||q8(s)||this.chart._animationsDisabled}_getSharedOptions(s,E){const B=this.resolveDataElementOptions(s,E),K=this._sharedOptions,pt=this.getSharedOptions(B),_t=this.includeOptions(E,pt)||pt!==K;return this.updateSharedOptions(pt,E,B),{sharedOptions:pt,includeOptions:_t}}updateElement(s,E,B,K){q8(K)?Object.assign(s,B):this._resolveAnimations(E,K).update(s,B)}updateSharedOptions(s,E,B){s&&!q8(E)&&this._resolveAnimations(void 0,E).update(s,B)}_setStyle(s,E,B,K){s.active=K;const pt=this.getStyle(E,K);this._resolveAnimations(E,B,K).update(s,{options:!K&&this.getSharedOptions(pt)||pt})}removeHoverStyle(s,E,B){this._setStyle(s,B,"active",!1)}setHoverStyle(s,E,B){this._setStyle(s,B,"active",!0)}_removeDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!1)}_setDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!0)}_resyncElements(s){const E=this._data,B=this._cachedMeta.data;for(const[Ot,jt,te]of this._syncList)this[Ot](jt,te);this._syncList=[];const K=B.length,pt=E.length,_t=Math.min(pt,K);_t&&this.parse(0,_t),pt>K?this._insertElements(K,pt-K,s):pt{for(te.length+=E,Ot=te.length-1;Ot>=_t;Ot--)te[Ot]=te[Ot-E]};for(jt(pt),Ot=s;Ot<_t;++Ot)pt[Ot]=new this.dataElementType;this._parsing&&jt(K._parsed),this.parse(s,E),B&&this.updateElements(pt,s,E,"reset")}updateElements(s,E,B,K){}_removeElements(s,E){const B=this._cachedMeta;if(this._parsing){const K=B._parsed.splice(s,E);B._stacked&&s2(B,K)}B.data.splice(s,E)}_sync(s){if(this._parsing)this._syncList.push(s);else{const[E,B,K]=s;this[E](B,K)}this.chart._dataChanges.push([this.index,...s])}_onDataPush(){const s=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-s,s])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(s,E){E&&this._sync(["_removeElements",s,E]);const B=arguments.length-2;B&&this._sync(["_insertElements",s,B])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function but(d,s){if(!d._cache.$bar){const E=d.getMatchingVisibleMetas(s);let B=[];for(let K=0,pt=E.length;KK-pt))}return d._cache.$bar}function wut(d){const s=d.iScale,E=but(s,d.type);let B=s._length,K,pt,_t,Ot;const jt=()=>{_t===32767||_t===-32768||(Z2(Ot)&&(B=Math.min(B,Math.abs(_t-Ot)||B)),Ot=_t)};for(K=0,pt=E.length;K0?K[d-1]:null,Ot=dMath.abs(Ot)&&(jt=Ot,te=_t),s[E.axis]=te,s._custom={barStart:jt,barEnd:te,start:K,end:pt,min:_t,max:Ot}}function SD(d,s,E,B){return Yd(d)?Aut(d,s,E,B):s[E.axis]=E.parse(d,B),s}function zP(d,s,E,B){const K=d.iScale,pt=d.vScale,_t=K.getLabels(),Ot=K===pt,jt=[];let te,he,De,er;for(te=E,he=E+B;te=E?1:-1)}function Sut(d){let s,E,B,K,pt;return d.horizontal?(s=d.base>d.x,E="left",B="right"):(s=d.basehe.controller.options.grouped),pt=B.options.stacked,_t=[],Ot=this._cachedMeta.controller.getParsed(E),jt=Ot&&Ot[B.axis],te=he=>{const De=he._parsed.find(pr=>pr[B.axis]===jt),er=De&&De[he.vScale.axis];if(Bh(er)||isNaN(er))return!0};for(const he of K)if(!(E!==void 0&&te(he))&&((pt===!1||_t.indexOf(he.stack)===-1||pt===void 0&&he.stack===void 0)&&_t.push(he.stack),he.index===s))break;return _t.length||_t.push(void 0),_t}_getStackCount(s){return this._getStacks(void 0,s).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const s=this.chart.scales,E=this.chart.options.indexAxis;return Object.keys(s).filter(B=>s[B].axis===E).shift()}_getAxis(){const s={},E=this.getFirstScaleIdForIndexAxis();for(const B of this.chart.data.datasets)s[cc(this.chart.options.indexAxis==="x"?B.xAxisID:B.yAxisID,E)]=!0;return Object.keys(s)}_getStackIndex(s,E,B){const K=this._getStacks(s,B),pt=E!==void 0?K.indexOf(E):-1;return pt===-1?K.length-1:pt}_getRuler(){const s=this.options,E=this._cachedMeta,B=E.iScale,K=[];let pt,_t;for(pt=0,_t=E.data.length;pt<_t;++pt)K.push(B.getPixelForValue(this.getParsed(pt)[B.axis],pt));const Ot=s.barThickness;return{min:Ot||wut(E),pixels:K,start:B._startPixel,end:B._endPixel,stackCount:this._getStackCount(),scale:B,grouped:s.grouped,ratio:Ot?1:s.categoryPercentage*s.barPercentage}}_calculateBarValuePixels(s){const{_cachedMeta:{vScale:E,_stacked:B,index:K},options:{base:pt,minBarLength:_t}}=this,Ot=pt||0,jt=this.getParsed(s),te=jt._custom,he=$8(te);let De=jt[E.axis],er=0,pr=B?this.applyStack(E,jt,B):De,Mr,Tr;pr!==De&&(er=pr-De,pr=De),he&&(De=te.barStart,pr=te.barEnd-te.barStart,De!==0&&pg(De)!==pg(te.barEnd)&&(er=0),er+=De);const Vr=!Bh(pt)&&!he?pt:er;let mn=E.getPixelForValue(Vr);if(this.chart.getDataVisibility(s)?Mr=E.getPixelForValue(er+pr):Mr=mn,Tr=Mr-mn,Math.abs(Tr)<_t){Tr=Mut(Tr,E,Ot)*_t,De===Ot&&(mn-=Tr/2);const Dt=E.getPixelForDecimal(0),cn=E.getPixelForDecimal(1),Jn=Math.min(Dt,cn),Bn=Math.max(Dt,cn);mn=Math.max(Math.min(mn,Bn),Jn),Mr=mn+Tr,B&&!he&&(jt._stacks[E.axis]._visualValues[K]=E.getValueForPixel(Mr)-E.getValueForPixel(mn))}if(mn===E.getPixelForValue(Ot)){const Dt=pg(Tr)*E.getLineWidthForValue(Ot)/2;mn+=Dt,Tr-=Dt}return{size:Tr,base:mn,head:Mr,center:Mr+Tr/2}}_calculateBarIndexPixels(s,E){const B=E.scale,K=this.options,pt=K.skipNull,_t=cc(K.maxBarThickness,1/0);let Ot,jt;const te=this._getAxisCount();if(E.grouped){const he=pt?this._getStackCount(s):E.stackCount,De=K.barThickness==="flex"?Tut(s,E,K,he*te):kut(s,E,K,he*te),er=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,pr=this._getAxis().indexOf(cc(er,this.getFirstScaleIdForIndexAxis())),Mr=this._getStackIndex(this.index,this._cachedMeta.stack,pt?s:void 0)+pr;Ot=De.start+De.chunk*Mr+De.chunk/2,jt=Math.min(_t,De.chunk*De.ratio)}else Ot=B.getPixelForValue(this.getParsed(s)[B.axis],s),jt=Math.min(_t,E.min*E.ratio);return{base:Ot-jt/2,head:Ot+jt/2,center:Ot,size:jt}}draw(){const s=this._cachedMeta,E=s.vScale,B=s.data,K=B.length;let pt=0;for(;ptY2(cn,Ot,jt,!0)?1:Math.max(Jn,Jn*E,Bn,Bn*E),Mr=(cn,Jn,Bn)=>Y2(cn,Ot,jt,!0)?-1:Math.min(Jn,Jn*E,Bn,Bn*E),Tr=pr(0,te,De),Vr=pr(ip,he,er),mn=Mr(Qh,te,De),Dt=Mr(Qh+ip,he,er);B=(Tr-mn)/2,K=(Vr-Dt)/2,pt=-(Tr+mn)/2,_t=-(Vr+Dt)/2}return{ratioX:B,ratioY:K,offsetX:pt,offsetY:_t}}class zut extends X4{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:s=>s!=="spacing",_indexable:s=>s!=="spacing"&&!s.startsWith("borderDash")&&!s.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){const E=s.data,{labels:{pointStyle:B,textAlign:K,color:pt,useBorderRadius:_t,borderRadius:Ot}}=s.legend.options;return E.labels.length&&E.datasets.length?E.labels.map((jt,te)=>{const De=s.getDatasetMeta(0).controller.getStyle(te);return{text:jt,fillStyle:De.backgroundColor,fontColor:pt,hidden:!s.getDataVisibility(te),lineDash:De.borderDash,lineDashOffset:De.borderDashOffset,lineJoin:De.borderJoinStyle,lineWidth:De.borderWidth,strokeStyle:De.borderColor,textAlign:K,pointStyle:B,borderRadius:_t&&(Ot||De.borderRadius),index:te}}):[]}},onClick(s,E,B){B.chart.toggleDataVisibility(E.index),B.chart.update()}}}};constructor(s,E){super(s,E),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(s,E){const B=this.getDataset().data,K=this._cachedMeta;if(this._parsing===!1)K._parsed=B;else{let pt=jt=>+B[jt];if(Sc(B[s])){const{key:jt="value"}=this._parsing;pt=te=>+Cy(B[te],jt)}let _t,Ot;for(_t=s,Ot=s+E;_t0&&!isNaN(s)?od*(Math.abs(s)/E):0}getLabelAndValue(s){const E=this._cachedMeta,B=this.chart,K=B.data.labels||[],pt=bM(E._parsed[s],B.options.locale);return{label:K[s]||"",value:pt}}getMaxBorderWidth(s){let E=0;const B=this.chart;let K,pt,_t,Ot,jt;if(!s){for(K=0,pt=B.data.datasets.length;K0&&this.getParsed(E-1);for(let Bn=0;Bn=Dt){Wi.skip=!0;continue}const Un=this.getParsed(Bn),qr=Bh(Un[pr]),Di=Wi[er]=_t.getPixelForValue(Un[er],Bn),Fi=Wi[pr]=pt||qr?Ot.getBasePixel():Ot.getPixelForValue(jt?this.applyStack(Ot,Un,jt):Un[pr],Bn);Wi.skip=isNaN(Di)||isNaN(Fi)||qr,Wi.stop=Bn>0&&Math.abs(Un[er]-Jn[er])>Vr,Tr&&(Wi.parsed=Un,Wi.raw=te.data[Bn]),De&&(Wi.options=he||this.resolveDataElementOptions(Bn,ni.active?"active":K)),mn||this.updateElement(ni,Bn,Wi,K),Jn=Un}}getMaxOverflow(){const s=this._cachedMeta,E=s.dataset,B=E.options&&E.options.borderWidth||0,K=s.data||[];if(!K.length)return B;const pt=K[0].size(this.resolveDataElementOptions(0)),_t=K[K.length-1].size(this.resolveDataElementOptions(K.length-1));return Math.max(B,pt,_t)/2}draw(){const s=this._cachedMeta;s.dataset.updateControlPoints(this.chart.chartArea,s.iScale.axis),super.draw()}}function fy(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class EM{static override(s){Object.assign(EM.prototype,s)}options;constructor(s){this.options=s||{}}init(){}formats(){return fy()}parse(){return fy()}format(){return fy()}add(){return fy()}diff(){return fy()}startOf(){return fy()}endOf(){return fy()}}var ED={_date:EM};function Dut(d,s,E,B){const{controller:K,data:pt,_sorted:_t}=d,Ot=K._cachedMeta.iScale,jt=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null;if(Ot&&s===Ot.axis&&s!=="r"&&_t&&pt.length){const te=Ot._reversePixels?tlt:by;if(B){if(K._sharedOptions){const he=pt[0],De=typeof he.getRange=="function"&&he.getRange(s);if(De){const er=te(pt,s,E-De),pr=te(pt,s,E+De);return{lo:er.lo,hi:pr.hi}}}}else{const he=te(pt,s,E);if(jt){const{vScale:De}=K._cachedMeta,{_parsed:er}=d,pr=er.slice(0,he.lo+1).reverse().findIndex(Tr=>!Bh(Tr[De.axis]));he.lo-=Math.max(0,pr);const Mr=er.slice(he.hi).findIndex(Tr=>!Bh(Tr[De.axis]));he.hi+=Math.max(0,Mr)}return he}}return{lo:0,hi:pt.length-1}}function J4(d,s,E,B,K){const pt=d.getSortedVisibleDatasetMetas(),_t=E[s];for(let Ot=0,jt=pt.length;Ot{jt[_t]&&jt[_t](s[E],K)&&(pt.push({element:jt,datasetIndex:te,index:he}),Ot=Ot||jt.inRange(s.x,s.y,K))}),B&&!Ot?[]:pt}var Nut={modes:{index(d,s,E,B){const K=py(s,d),pt=E.axis||"x",_t=E.includeInvisible||!1,Ot=E.intersect?Z8(d,K,pt,B,_t):G8(d,K,pt,!1,B,_t),jt=[];return Ot.length?(d.getSortedVisibleDatasetMetas().forEach(te=>{const he=Ot[0].index,De=te.data[he];De&&!De.skip&&jt.push({element:De,datasetIndex:te.index,index:he})}),jt):[]},dataset(d,s,E,B){const K=py(s,d),pt=E.axis||"xy",_t=E.includeInvisible||!1;let Ot=E.intersect?Z8(d,K,pt,B,_t):G8(d,K,pt,!1,B,_t);if(Ot.length>0){const jt=Ot[0].datasetIndex,te=d.getDatasetMeta(jt).data;Ot=[];for(let he=0;heE.pos===s)}function RP(d,s){return d.filter(E=>CD.indexOf(E.pos)===-1&&E.box.axis===s)}function u2(d,s){return d.sort((E,B)=>{const K=s?B:E,pt=s?E:B;return K.weight===pt.weight?K.index-pt.index:K.weight-pt.weight})}function jut(d){const s=[];let E,B,K,pt,_t,Ot;for(E=0,B=(d||[]).length;Ete.box.fullSize),!0),B=u2(l2(s,"left"),!0),K=u2(l2(s,"right")),pt=u2(l2(s,"top"),!0),_t=u2(l2(s,"bottom")),Ot=RP(s,"x"),jt=RP(s,"y");return{fullSize:E,leftAndTop:B.concat(pt),rightAndBottom:K.concat(jt).concat(_t).concat(Ot),chartArea:l2(s,"chartArea"),vertical:B.concat(K).concat(jt),horizontal:pt.concat(_t).concat(Ot)}}function BP(d,s,E,B){return Math.max(d[E],s[E])+Math.max(d[B],s[B])}function LD(d,s){d.top=Math.max(d.top,s.top),d.left=Math.max(d.left,s.left),d.bottom=Math.max(d.bottom,s.bottom),d.right=Math.max(d.right,s.right)}function Wut(d,s,E,B){const{pos:K,box:pt}=E,_t=d.maxPadding;if(!Sc(K)){E.size&&(d[K]-=E.size);const De=B[E.stack]||{size:0,count:1};De.size=Math.max(De.size,E.horizontal?pt.height:pt.width),E.size=De.size/De.count,d[K]+=E.size}pt.getPadding&&LD(_t,pt.getPadding());const Ot=Math.max(0,s.outerWidth-BP(_t,d,"left","right")),jt=Math.max(0,s.outerHeight-BP(_t,d,"top","bottom")),te=Ot!==d.w,he=jt!==d.h;return d.w=Ot,d.h=jt,E.horizontal?{same:te,other:he}:{same:he,other:te}}function qut(d){const s=d.maxPadding;function E(B){const K=Math.max(s[B]-d[B],0);return d[B]+=K,K}d.y+=E("top"),d.x+=E("left"),E("right"),E("bottom")}function $ut(d,s){const E=s.maxPadding;function B(K){const pt={left:0,top:0,right:0,bottom:0};return K.forEach(_t=>{pt[_t]=Math.max(s[_t],E[_t])}),pt}return B(d?["left","right"]:["top","bottom"])}function y2(d,s,E,B){const K=[];let pt,_t,Ot,jt,te,he;for(pt=0,_t=d.length,te=0;pt<_t;++pt){Ot=d[pt],jt=Ot.box,jt.update(Ot.width||s.w,Ot.height||s.h,$ut(Ot.horizontal,s));const{same:De,other:er}=Wut(s,E,Ot,B);te|=De&&K.length,he=he||er,jt.fullSize||K.push(Ot)}return te&&y2(K,s,E,B)||he}function U5(d,s,E,B,K){d.top=E,d.left=s,d.right=s+B,d.bottom=E+K,d.width=B,d.height=K}function NP(d,s,E,B){const K=E.padding;let{x:pt,y:_t}=s;for(const Ot of d){const jt=Ot.box,te=B[Ot.stack]||{placed:0,weight:1},he=Ot.stackWeight/te.weight||1;if(Ot.horizontal){const De=s.w*he,er=te.size||jt.height;Z2(te.start)&&(_t=te.start),jt.fullSize?U5(jt,K.left,_t,E.outerWidth-K.right-K.left,er):U5(jt,s.left+te.placed,_t,De,er),te.start=_t,te.placed+=De,_t=jt.bottom}else{const De=s.h*he,er=te.size||jt.width;Z2(te.start)&&(pt=te.start),jt.fullSize?U5(jt,pt,K.top,er,E.outerHeight-K.bottom-K.top):U5(jt,pt,s.top+te.placed,er,De),te.start=pt,te.placed+=De,pt=jt.right}}s.x=pt,s.y=_t}var sm={addBox(d,s){d.boxes||(d.boxes=[]),s.fullSize=s.fullSize||!1,s.position=s.position||"top",s.weight=s.weight||0,s._layers=s._layers||function(){return[{z:0,draw(E){s.draw(E)}}]},d.boxes.push(s)},removeBox(d,s){const E=d.boxes?d.boxes.indexOf(s):-1;E!==-1&&d.boxes.splice(E,1)},configure(d,s,E){s.fullSize=E.fullSize,s.position=E.position,s.weight=E.weight},update(d,s,E,B){if(!d)return;const K=fm(d.options.layout.padding),pt=Math.max(s-K.width,0),_t=Math.max(E-K.height,0),Ot=Hut(d.boxes),jt=Ot.vertical,te=Ot.horizontal;Xh(d.boxes,Tr=>{typeof Tr.beforeLayout=="function"&&Tr.beforeLayout()});const he=jt.reduce((Tr,Vr)=>Vr.box.options&&Vr.box.options.display===!1?Tr:Tr+1,0)||1,De=Object.freeze({outerWidth:s,outerHeight:E,padding:K,availableWidth:pt,availableHeight:_t,vBoxMaxWidth:pt/2/he,hBoxMaxHeight:_t/2}),er=Object.assign({},K);LD(er,fm(B));const pr=Object.assign({maxPadding:er,w:pt,h:_t,x:K.left,y:K.top},K),Mr=Vut(jt.concat(te),De);y2(Ot.fullSize,pr,De,Mr),y2(jt,pr,De,Mr),y2(te,pr,De,Mr)&&y2(jt,pr,De,Mr),qut(pr),NP(Ot.leftAndTop,pr,De,Mr),pr.x+=pr.w,pr.y+=pr.h,NP(Ot.rightAndBottom,pr,De,Mr),d.chartArea={left:pr.left,top:pr.top,right:pr.left+pr.w,bottom:pr.top+pr.h,height:pr.h,width:pr.w},Xh(Ot.chartArea,Tr=>{const Vr=Tr.box;Object.assign(Vr,d.chartArea),Vr.update(pr.w,pr.h,{left:0,top:0,right:0,bottom:0})})}};class PD{acquireContext(s,E){}releaseContext(s){return!1}addEventListener(s,E,B){}removeEventListener(s,E,B){}getDevicePixelRatio(){return 1}getMaximumSize(s,E,B,K){return E=Math.max(0,E||s.width),B=B||s.height,{width:E,height:Math.max(0,K?Math.floor(E/K):B)}}isAttached(s){return!0}updateConfig(s){}}class Zut extends PD{acquireContext(s){return s&&s.getContext&&s.getContext("2d")||null}updateConfig(s){s.options.animation=!1}}const n4="$chartjs",Gut={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jP=d=>d===null||d==="";function Yut(d,s){const E=d.style,B=d.getAttribute("height"),K=d.getAttribute("width");if(d[n4]={initial:{height:B,width:K,style:{display:E.display,height:E.height,width:E.width}}},E.display=E.display||"block",E.boxSizing=E.boxSizing||"border-box",jP(K)){const pt=kP(d,"width");pt!==void 0&&(d.width=pt)}if(jP(B))if(d.style.height==="")d.height=d.width/(s||2);else{const pt=kP(d,"height");pt!==void 0&&(d.height=pt)}return d}const ID=Ylt?{passive:!0}:!1;function Kut(d,s,E){d&&d.addEventListener(s,E,ID)}function Xut(d,s,E){d&&d.canvas&&d.canvas.removeEventListener(s,E,ID)}function Jut(d,s){const E=Gut[d.type]||d.type,{x:B,y:K}=py(d,s);return{type:E,chart:s,native:d,x:B!==void 0?B:null,y:K!==void 0?K:null}}function k4(d,s){for(const E of d)if(E===s||E.contains(s))return!0}function Qut(d,s,E){const B=d.canvas,K=new MutationObserver(pt=>{let _t=!1;for(const Ot of pt)_t=_t||k4(Ot.addedNodes,B),_t=_t&&!k4(Ot.removedNodes,B);_t&&E()});return K.observe(document,{childList:!0,subtree:!0}),K}function tct(d,s,E){const B=d.canvas,K=new MutationObserver(pt=>{let _t=!1;for(const Ot of pt)_t=_t||k4(Ot.removedNodes,B),_t=_t&&!k4(Ot.addedNodes,B);_t&&E()});return K.observe(document,{childList:!0,subtree:!0}),K}const J2=new Map;let UP=0;function zD(){const d=window.devicePixelRatio;d!==UP&&(UP=d,J2.forEach((s,E)=>{E.currentDevicePixelRatio!==d&&s()}))}function ect(d,s){J2.size||window.addEventListener("resize",zD),J2.set(d,s)}function rct(d){J2.delete(d),J2.size||window.removeEventListener("resize",zD)}function nct(d,s,E){const B=d.canvas,K=B&&SM(B);if(!K)return;const pt=cD((Ot,jt)=>{const te=K.clientWidth;E(Ot,jt),te{const jt=Ot[0],te=jt.contentRect.width,he=jt.contentRect.height;te===0&&he===0||pt(te,he)});return _t.observe(K),ect(d,pt),_t}function Y8(d,s,E){E&&E.disconnect(),s==="resize"&&rct(d)}function ict(d,s,E){const B=d.canvas,K=cD(pt=>{d.ctx!==null&&E(Jut(pt,d))},d);return Kut(B,s,K),K}class act extends PD{acquireContext(s,E){const B=s&&s.getContext&&s.getContext("2d");return B&&B.canvas===s?(Yut(s,E),B):null}releaseContext(s){const E=s.canvas;if(!E[n4])return!1;const B=E[n4].initial;["height","width"].forEach(pt=>{const _t=B[pt];Bh(_t)?E.removeAttribute(pt):E.setAttribute(pt,_t)});const K=B.style||{};return Object.keys(K).forEach(pt=>{E.style[pt]=K[pt]}),E.width=E.width,delete E[n4],!0}addEventListener(s,E,B){this.removeEventListener(s,E);const K=s.$proxies||(s.$proxies={}),_t={attach:Qut,detach:tct,resize:nct}[E]||ict;K[E]=_t(s,E,B)}removeEventListener(s,E){const B=s.$proxies||(s.$proxies={}),K=B[E];if(!K)return;({attach:Y8,detach:Y8,resize:Y8}[E]||Xut)(s,E,K),B[E]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(s,E,B,K){return Glt(s,E,B,K)}isAttached(s){const E=s&&SM(s);return!!(E&&E.isConnected)}}function oct(d){return!MM()||typeof OffscreenCanvas<"u"&&d instanceof OffscreenCanvas?Zut:act}let lv=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(s){const{x:E,y:B}=this.getProps(["x","y"],s);return{x:E,y:B}}hasValue(){return G2(this.x)&&G2(this.y)}getProps(s,E){const B=this.$animations;if(!E||!B)return this;const K={};return s.forEach(pt=>{K[pt]=B[pt]&&B[pt].active()?B[pt]._to:this[pt]}),K}};function sct(d,s){const E=d.options.ticks,B=lct(d),K=Math.min(E.maxTicksLimit||B,B),pt=E.major.enabled?cct(s):[],_t=pt.length,Ot=pt[0],jt=pt[_t-1],te=[];if(_t>K)return hct(s,te,pt,_t/K),te;const he=uct(pt,s,K);if(_t>0){let De,er;const pr=_t>1?Math.round((jt-Ot)/(_t-1)):null;for(V5(s,te,he,Bh(pr)?0:Ot-pr,Ot),De=0,er=_t-1;DeK)return jt}return Math.max(K,1)}function cct(d){const s=[];let E,B;for(E=0,B=d.length;Ed==="left"?"right":d==="right"?"left":d,VP=(d,s,E)=>s==="top"||s==="left"?d[s]+E:d[s]-E,HP=(d,s)=>Math.min(s||d,d);function WP(d,s){const E=[],B=d.length/s,K=d.length;let pt=0;for(;pt_t+Ot)))return jt}function mct(d,s){Xh(d,E=>{const B=E.gc,K=B.length/2;let pt;if(K>s){for(pt=0;ptB?B:E,B=K&&E>B?E:B,{min:ag(E,ag(B,E)),max:ag(B,ag(E,B))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const s=this.chart.data;return this.options.labels||(this.isHorizontal()?s.xLabels:s.yLabels)||s.labels||[]}getLabelItems(s=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(s))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Df(this.options.beforeUpdate,[this])}update(s,E,B){const{beginAtZero:K,grace:pt,ticks:_t}=this.options,Ot=_t.sampleSize;this.beforeUpdate(),this.maxWidth=s,this.maxHeight=E,this._margins=B=Object.assign({left:0,right:0,top:0,bottom:0},B),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+B.left+B.right:this.height+B.top+B.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Mlt(this,pt,K),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const jt=Ot=pt||B<=1||!this.isHorizontal()){this.labelRotation=K;return}const he=this._getLabelSizes(),De=he.widest.width,er=he.highest.height,pr=Jp(this.chart.width-De,0,this.maxWidth);Ot=s.offset?this.maxWidth/B:pr/(B-1),De+6>Ot&&(Ot=pr/(B-(s.offset?.5:1)),jt=this.maxHeight-c2(s.grid)-E.padding-qP(s.title,this.chart.options.font),te=Math.sqrt(De*De+er*er),_t=Xst(Math.min(Math.asin(Jp((he.highest.height+6)/Ot,-1,1)),Math.asin(Jp(jt/te,-1,1))-Math.asin(Jp(er/te,-1,1)))),_t=Math.max(K,Math.min(pt,_t))),this.labelRotation=_t}afterCalculateLabelRotation(){Df(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Df(this.options.beforeFit,[this])}fit(){const s={width:0,height:0},{chart:E,options:{ticks:B,title:K,grid:pt}}=this,_t=this._isVisible(),Ot=this.isHorizontal();if(_t){const jt=qP(K,E.options.font);if(Ot?(s.width=this.maxWidth,s.height=c2(pt)+jt):(s.height=this.maxHeight,s.width=c2(pt)+jt),B.display&&this.ticks.length){const{first:te,last:he,widest:De,highest:er}=this._getLabelSizes(),pr=B.padding*2,Mr=rv(this.labelRotation),Tr=Math.cos(Mr),Vr=Math.sin(Mr);if(Ot){const mn=B.mirror?0:Vr*De.width+Tr*er.height;s.height=Math.min(this.maxHeight,s.height+mn+pr)}else{const mn=B.mirror?0:Tr*De.width+Vr*er.height;s.width=Math.min(this.maxWidth,s.width+mn+pr)}this._calculatePadding(te,he,Vr,Tr)}}this._handleMargins(),Ot?(this.width=this._length=E.width-this._margins.left-this._margins.right,this.height=s.height):(this.width=s.width,this.height=this._length=E.height-this._margins.top-this._margins.bottom)}_calculatePadding(s,E,B,K){const{ticks:{align:pt,padding:_t},position:Ot}=this.options,jt=this.labelRotation!==0,te=Ot!=="top"&&this.axis==="x";if(this.isHorizontal()){const he=this.getPixelForTick(0)-this.left,De=this.right-this.getPixelForTick(this.ticks.length-1);let er=0,pr=0;jt?te?(er=K*s.width,pr=B*E.height):(er=B*s.height,pr=K*E.width):pt==="start"?pr=E.width:pt==="end"?er=s.width:pt!=="inner"&&(er=s.width/2,pr=E.width/2),this.paddingLeft=Math.max((er-he+_t)*this.width/(this.width-he),0),this.paddingRight=Math.max((pr-De+_t)*this.width/(this.width-De),0)}else{let he=E.height/2,De=s.height/2;pt==="start"?(he=0,De=s.height):pt==="end"&&(he=E.height,De=0),this.paddingTop=he+_t,this.paddingBottom=De+_t}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Df(this.options.afterFit,[this])}isHorizontal(){const{axis:s,position:E}=this.options;return E==="top"||E==="bottom"||s==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(s){this.beforeTickToLabelConversion(),this.generateTickLabels(s);let E,B;for(E=0,B=s.length;E({width:_t[qr]||0,height:Ot[qr]||0});return{first:Un(0),last:Un(E-1),widest:Un(ni),highest:Un(Wi),widths:_t,heights:Ot}}getLabelForValue(s){return s}getPixelForValue(s,E){return NaN}getValueForPixel(s){}getPixelForTick(s){const E=this.ticks;return s<0||s>E.length-1?null:this.getPixelForValue(E[s].value)}getPixelForDecimal(s){this._reversePixels&&(s=1-s);const E=this._startPixel+s*this._length;return Qst(this._alignToPixels?hy(this.chart,E,0):E)}getDecimalForPixel(s){const E=(s-this._startPixel)/this._length;return this._reversePixels?1-E:E}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:s,max:E}=this;return s<0&&E<0?E:s>0&&E>0?s:0}getContext(s){const E=this.ticks||[];if(s>=0&&sOt*K?Ot/B:jt/K:jt*K0}_computeGridLineItems(s){const E=this.axis,B=this.chart,K=this.options,{grid:pt,position:_t,border:Ot}=K,jt=pt.offset,te=this.isHorizontal(),De=this.ticks.length+(jt?1:0),er=c2(pt),pr=[],Mr=Ot.setContext(this.getContext()),Tr=Mr.display?Mr.width:0,Vr=Tr/2,mn=function(Ni){return hy(B,Ni,Tr)};let Dt,cn,Jn,Bn,ni,Wi,Un,qr,Di,Fi,Pi,bi;if(_t==="top")Dt=mn(this.bottom),Wi=this.bottom-er,qr=Dt-Vr,Fi=mn(s.top)+Vr,bi=s.bottom;else if(_t==="bottom")Dt=mn(this.top),Fi=s.top,bi=mn(s.bottom)-Vr,Wi=Dt+Vr,qr=this.top+er;else if(_t==="left")Dt=mn(this.right),ni=this.right-er,Un=Dt-Vr,Di=mn(s.left)+Vr,Pi=s.right;else if(_t==="right")Dt=mn(this.left),Di=s.left,Pi=mn(s.right)-Vr,ni=Dt+Vr,Un=this.left+er;else if(E==="x"){if(_t==="center")Dt=mn((s.top+s.bottom)/2+.5);else if(Sc(_t)){const Ni=Object.keys(_t)[0],si=_t[Ni];Dt=mn(this.chart.scales[Ni].getPixelForValue(si))}Fi=s.top,bi=s.bottom,Wi=Dt+Vr,qr=Wi+er}else if(E==="y"){if(_t==="center")Dt=mn((s.left+s.right)/2);else if(Sc(_t)){const Ni=Object.keys(_t)[0],si=_t[Ni];Dt=mn(this.chart.scales[Ni].getPixelForValue(si))}ni=Dt-Vr,Un=ni-er,Di=s.left,Pi=s.right}const Yi=cc(K.ticks.maxTicksLimit,De),Ca=Math.max(1,Math.ceil(De/Yi));for(cn=0;cn0&&(Ia-=ko/2);break}mo={left:Ia,top:ro,width:ko+Ts.width,height:xl+Ts.height,color:Ca.backdropColor}}Vr.push({label:Jn,font:qr,textOffset:Pi,options:{rotation:Tr,color:si,strokeColor:Ma,strokeWidth:zo,textAlign:ho,textBaseline:bi,translation:[Bn,ni],backdrop:mo}})}return Vr}_getXAxisLabelAlignment(){const{position:s,ticks:E}=this.options;if(-rv(this.labelRotation))return s==="top"?"left":"right";let K="center";return E.align==="start"?K="left":E.align==="end"?K="right":E.align==="inner"&&(K="inner"),K}_getYAxisLabelAlignment(s){const{position:E,ticks:{crossAlign:B,mirror:K,padding:pt}}=this.options,_t=this._getLabelSizes(),Ot=s+pt,jt=_t.widest.width;let te,he;return E==="left"?K?(he=this.right+pt,B==="near"?te="left":B==="center"?(te="center",he+=jt/2):(te="right",he+=jt)):(he=this.right-Ot,B==="near"?te="right":B==="center"?(te="center",he-=jt/2):(te="left",he=this.left)):E==="right"?K?(he=this.left+pt,B==="near"?te="right":B==="center"?(te="center",he-=jt/2):(te="left",he-=jt)):(he=this.left+Ot,B==="near"?te="left":B==="center"?(te="center",he+=jt/2):(te="right",he=this.right)):te="right",{textAlign:te,x:he}}_computeLabelArea(){if(this.options.ticks.mirror)return;const s=this.chart,E=this.options.position;if(E==="left"||E==="right")return{top:0,left:this.left,bottom:s.height,right:this.right};if(E==="top"||E==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:s.width}}drawBackground(){const{ctx:s,options:{backgroundColor:E},left:B,top:K,width:pt,height:_t}=this;E&&(s.save(),s.fillStyle=E,s.fillRect(B,K,pt,_t),s.restore())}getLineWidthForValue(s){const E=this.options.grid;if(!this._isVisible()||!E.display)return 0;const K=this.ticks.findIndex(pt=>pt.value===s);return K>=0?E.setContext(this.getContext(K)).lineWidth:0}drawGrid(s){const E=this.options.grid,B=this.ctx,K=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(s));let pt,_t;const Ot=(jt,te,he)=>{!he.width||!he.color||(B.save(),B.lineWidth=he.width,B.strokeStyle=he.color,B.setLineDash(he.borderDash||[]),B.lineDashOffset=he.borderDashOffset,B.beginPath(),B.moveTo(jt.x,jt.y),B.lineTo(te.x,te.y),B.stroke(),B.restore())};if(E.display)for(pt=0,_t=K.length;pt<_t;++pt){const jt=K[pt];E.drawOnChartArea&&Ot({x:jt.x1,y:jt.y1},{x:jt.x2,y:jt.y2},jt),E.drawTicks&&Ot({x:jt.tx1,y:jt.ty1},{x:jt.tx2,y:jt.ty2},{color:jt.tickColor,width:jt.tickWidth,borderDash:jt.tickBorderDash,borderDashOffset:jt.tickBorderDashOffset})}}drawBorder(){const{chart:s,ctx:E,options:{border:B,grid:K}}=this,pt=B.setContext(this.getContext()),_t=B.display?pt.width:0;if(!_t)return;const Ot=K.setContext(this.getContext(0)).lineWidth,jt=this._borderValue;let te,he,De,er;this.isHorizontal()?(te=hy(s,this.left,_t)-_t/2,he=hy(s,this.right,Ot)+Ot/2,De=er=jt):(De=hy(s,this.top,_t)-_t/2,er=hy(s,this.bottom,Ot)+Ot/2,te=he=jt),E.save(),E.lineWidth=pt.width,E.strokeStyle=pt.color,E.beginPath(),E.moveTo(te,De),E.lineTo(he,er),E.stroke(),E.restore()}drawLabels(s){if(!this.options.ticks.display)return;const B=this.ctx,K=this._computeLabelArea();K&&G4(B,K);const pt=this.getLabelItems(s);for(const _t of pt){const Ot=_t.options,jt=_t.font,te=_t.label,he=_t.textOffset;X2(B,te,0,he,jt,Ot)}K&&Y4(B)}drawTitle(){const{ctx:s,options:{position:E,title:B,reverse:K}}=this;if(!B.display)return;const pt=Qp(B.font),_t=fm(B.padding),Ot=B.align;let jt=pt.lineHeight/2;E==="bottom"||E==="center"||Sc(E)?(jt+=_t.bottom,Yd(B.text)&&(jt+=pt.lineHeight*(B.text.length-1))):jt+=_t.top;const{titleX:te,titleY:he,maxWidth:De,rotation:er}=xct(this,jt,E,Ot);X2(s,B.text,0,0,pt,{color:B.color,maxWidth:De,rotation:er,textAlign:yct(Ot,E,K),textBaseline:"middle",translation:[te,he]})}draw(s){this._isVisible()&&(this.drawBackground(),this.drawGrid(s),this.drawBorder(),this.drawTitle(),this.drawLabels(s))}_layers(){const s=this.options,E=s.ticks&&s.ticks.z||0,B=cc(s.grid&&s.grid.z,-1),K=cc(s.border&&s.border.z,0);return!this._isVisible()||this.draw!==T_.prototype.draw?[{z:E,draw:pt=>{this.draw(pt)}}]:[{z:B,draw:pt=>{this.drawBackground(),this.drawGrid(pt),this.drawTitle()}},{z:K,draw:()=>{this.drawBorder()}},{z:E,draw:pt=>{this.drawLabels(pt)}}]}getMatchingVisibleMetas(s){const E=this.chart.getSortedVisibleDatasetMetas(),B=this.axis+"AxisID",K=[];let pt,_t;for(pt=0,_t=E.length;pt<_t;++pt){const Ot=E[pt];Ot[B]===this.id&&(!s||Ot.type===s)&&K.push(Ot)}return K}_resolveTickFontOptions(s){const E=this.options.ticks.setContext(this.getContext(s));return Qp(E.font)}_maxDigits(){const s=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/s}}class H5{constructor(s,E,B){this.type=s,this.scope=E,this.override=B,this.items=Object.create(null)}isForType(s){return Object.prototype.isPrototypeOf.call(this.type.prototype,s.prototype)}register(s){const E=Object.getPrototypeOf(s);let B;wct(E)&&(B=this.register(E));const K=this.items,pt=s.id,_t=this.scope+"."+pt;if(!pt)throw new Error("class does not have id: "+s);return pt in K||(K[pt]=s,_ct(s,_t,B),this.override&&Rd.override(s.id,s.overrides)),_t}get(s){return this.items[s]}unregister(s){const E=this.items,B=s.id,K=this.scope;B in E&&delete E[B],K&&B in Rd[K]&&(delete Rd[K][B],this.override&&delete Ly[B])}}function _ct(d,s,E){const B=$2(Object.create(null),[E?Rd.get(E):{},Rd.get(s),d.defaults]);Rd.set(s,B),d.defaultRoutes&&bct(s,d.defaultRoutes),d.descriptors&&Rd.describe(s,d.descriptors)}function bct(d,s){Object.keys(s).forEach(E=>{const B=E.split("."),K=B.pop(),pt=[d].concat(B).join("."),_t=s[E].split("."),Ot=_t.pop(),jt=_t.join(".");Rd.route(pt,K,jt,Ot)})}function wct(d){return"id"in d&&"defaults"in d}class kct{constructor(){this.controllers=new H5(X4,"datasets",!0),this.elements=new H5(lv,"elements"),this.plugins=new H5(Object,"plugins"),this.scales=new H5(T_,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...s){this._each("register",s)}remove(...s){this._each("unregister",s)}addControllers(...s){this._each("register",s,this.controllers)}addElements(...s){this._each("register",s,this.elements)}addPlugins(...s){this._each("register",s,this.plugins)}addScales(...s){this._each("register",s,this.scales)}getController(s){return this._get(s,this.controllers,"controller")}getElement(s){return this._get(s,this.elements,"element")}getPlugin(s){return this._get(s,this.plugins,"plugin")}getScale(s){return this._get(s,this.scales,"scale")}removeControllers(...s){this._each("unregister",s,this.controllers)}removeElements(...s){this._each("unregister",s,this.elements)}removePlugins(...s){this._each("unregister",s,this.plugins)}removeScales(...s){this._each("unregister",s,this.scales)}_each(s,E,B){[...E].forEach(K=>{const pt=B||this._getRegistryForType(K);B||pt.isForType(K)||pt===this.plugins&&K.id?this._exec(s,pt,K):Xh(K,_t=>{const Ot=B||this._getRegistryForType(_t);this._exec(s,Ot,_t)})})}_exec(s,E,B){const K=vM(s);Df(B["before"+K],[],B),E[s](B),Df(B["after"+K],[],B)}_getRegistryForType(s){for(let E=0;Ept.filter(Ot=>!_t.some(jt=>Ot.plugin.id===jt.plugin.id));this._notify(K(E,B),s,"stop"),this._notify(K(B,E),s,"start")}}function Act(d){const s={},E=[],B=Object.keys(ug.plugins.items);for(let pt=0;pt1&&$P(d[0].toLowerCase());if(B)return B}throw new Error(`Cannot determine type of '${d}' axis. Please provide 'axis' or 'position' option.`)}function ZP(d,s,E){if(E[s+"AxisID"]===d)return{axis:s}}function Ict(d,s){if(s.data&&s.data.datasets){const E=s.data.datasets.filter(B=>B.xAxisID===d||B.yAxisID===d);if(E.length)return ZP(d,"x",E[0])||ZP(d,"y",E[0])}return{}}function zct(d,s){const E=Ly[d.type]||{scales:{}},B=s.scales||{},K=LA(d.type,s),pt=Object.create(null);return Object.keys(B).forEach(_t=>{const Ot=B[_t];if(!Sc(Ot))return console.error(`Invalid scale configuration for scale: ${_t}`);if(Ot._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${_t}`);const jt=PA(_t,Ot,Ict(_t,d),Rd.scales[Ot.type]),te=Lct(jt,K),he=E.scales||{};pt[_t]=L2(Object.create(null),[{axis:jt},Ot,he[jt],he[te]])}),d.data.datasets.forEach(_t=>{const Ot=_t.type||d.type,jt=_t.indexAxis||LA(Ot,s),he=(Ly[Ot]||{}).scales||{};Object.keys(he).forEach(De=>{const er=Cct(De,jt),pr=_t[er+"AxisID"]||er;pt[pr]=pt[pr]||Object.create(null),L2(pt[pr],[{axis:er},B[pr],he[De]])})}),Object.keys(pt).forEach(_t=>{const Ot=pt[_t];L2(Ot,[Rd.scales[Ot.type],Rd.scale])}),pt}function OD(d){const s=d.options||(d.options={});s.plugins=cc(s.plugins,{}),s.scales=zct(d,s)}function DD(d){return d=d||{},d.datasets=d.datasets||[],d.labels=d.labels||[],d}function Oct(d){return d=d||{},d.data=DD(d.data),OD(d),d}const GP=new Map,FD=new Set;function W5(d,s){let E=GP.get(d);return E||(E=s(),GP.set(d,E),FD.add(E)),E}const h2=(d,s,E)=>{const B=Cy(s,E);B!==void 0&&d.add(B)};class Dct{constructor(s){this._config=Oct(s),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(s){this._config.type=s}get data(){return this._config.data}set data(s){this._config.data=DD(s)}get options(){return this._config.options}set options(s){this._config.options=s}get plugins(){return this._config.plugins}update(){const s=this._config;this.clearCache(),OD(s)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(s){return W5(s,()=>[[`datasets.${s}`,""]])}datasetAnimationScopeKeys(s,E){return W5(`${s}.transition.${E}`,()=>[[`datasets.${s}.transitions.${E}`,`transitions.${E}`],[`datasets.${s}`,""]])}datasetElementScopeKeys(s,E){return W5(`${s}-${E}`,()=>[[`datasets.${s}.elements.${E}`,`datasets.${s}`,`elements.${E}`,""]])}pluginScopeKeys(s){const E=s.id,B=this.type;return W5(`${B}-plugin-${E}`,()=>[[`plugins.${E}`,...s.additionalOptionScopes||[]]])}_cachedScopes(s,E){const B=this._scopeCache;let K=B.get(s);return(!K||E)&&(K=new Map,B.set(s,K)),K}getOptionScopes(s,E,B){const{options:K,type:pt}=this,_t=this._cachedScopes(s,B),Ot=_t.get(E);if(Ot)return Ot;const jt=new Set;E.forEach(he=>{s&&(jt.add(s),he.forEach(De=>h2(jt,s,De))),he.forEach(De=>h2(jt,K,De)),he.forEach(De=>h2(jt,Ly[pt]||{},De)),he.forEach(De=>h2(jt,Rd,De)),he.forEach(De=>h2(jt,EA,De))});const te=Array.from(jt);return te.length===0&&te.push(Object.create(null)),FD.has(E)&&_t.set(E,te),te}chartOptionScopes(){const{options:s,type:E}=this;return[s,Ly[E]||{},Rd.datasets[E]||{},{type:E},Rd,EA]}resolveNamedOptions(s,E,B,K=[""]){const pt={$shared:!0},{resolver:_t,subPrefixes:Ot}=YP(this._resolverCache,s,K);let jt=_t;if(Rct(_t,E)){pt.$shared=!1,B=x1(B)?B():B;const te=this.createResolver(s,B,Ot);jt=x_(_t,B,te)}for(const te of E)pt[te]=jt[te];return pt}createResolver(s,E,B=[""],K){const{resolver:pt}=YP(this._resolverCache,s,B);return Sc(E)?x_(pt,E,void 0,K):pt}}function YP(d,s,E){let B=d.get(s);B||(B=new Map,d.set(s,B));const K=E.join();let pt=B.get(K);return pt||(pt={resolver:kM(s,E),subPrefixes:E.filter(Ot=>!Ot.toLowerCase().includes("hover"))},B.set(K,pt)),pt}const Fct=d=>Sc(d)&&Object.getOwnPropertyNames(d).some(s=>x1(d[s]));function Rct(d,s){const{isScriptable:E,isIndexable:B}=pD(d);for(const K of s){const pt=E(K),_t=B(K),Ot=(_t||pt)&&d[K];if(pt&&(x1(Ot)||Fct(Ot))||_t&&Yd(Ot))return!0}return!1}var Bct="4.5.1";const Nct=["top","bottom","left","right","chartArea"];function KP(d,s){return d==="top"||d==="bottom"||Nct.indexOf(d)===-1&&s==="x"}function XP(d,s){return function(E,B){return E[d]===B[d]?E[s]-B[s]:E[d]-B[d]}}function JP(d){const s=d.chart,E=s.options.animation;s.notifyPlugins("afterRender"),Df(E&&E.onComplete,[d],s)}function jct(d){const s=d.chart,E=s.options.animation;Df(E&&E.onProgress,[d],s)}function RD(d){return MM()&&typeof d=="string"?d=document.getElementById(d):d&&d.length&&(d=d[0]),d&&d.canvas&&(d=d.canvas),d}const i4={},QP=d=>{const s=RD(d);return Object.values(i4).filter(E=>E.canvas===s).pop()};function Uct(d,s,E){const B=Object.keys(d);for(const K of B){const pt=+K;if(pt>=s){const _t=d[K];delete d[K],(E>0||pt>s)&&(d[pt+E]=_t)}}}function Vct(d,s,E,B){return!E||d.type==="mouseout"?null:B?s:d}class x2{static defaults=Rd;static instances=i4;static overrides=Ly;static registry=ug;static version=Bct;static getChart=QP;static register(...s){ug.add(...s),tI()}static unregister(...s){ug.remove(...s),tI()}constructor(s,E){const B=this.config=new Dct(E),K=RD(s),pt=QP(K);if(pt)throw new Error("Canvas is already in use. Chart with ID '"+pt.id+"' must be destroyed before the canvas with ID '"+pt.canvas.id+"' can be reused.");const _t=B.createResolver(B.chartOptionScopes(),this.getContext());this.platform=new(B.platform||oct(K)),this.platform.updateConfig(B);const Ot=this.platform.acquireContext(K,_t.aspectRatio),jt=Ot&&Ot.canvas,te=jt&&jt.height,he=jt&&jt.width;if(this.id=Bst(),this.ctx=Ot,this.canvas=jt,this.width=he,this.height=te,this._options=_t,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Tct,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=nlt(De=>this.update(De),_t.resizeDelay||0),this._dataChanges=[],i4[this.id]=this,!Ot||!jt){console.error("Failed to create chart: can't acquire context from the given item");return}Kg.listen(this,"complete",JP),Kg.listen(this,"progress",jct),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:s,maintainAspectRatio:E},width:B,height:K,_aspectRatio:pt}=this;return Bh(s)?E&&pt?pt:K?B/K:null:s}get data(){return this.config.data}set data(s){this.config.data=s}get options(){return this._options}set options(s){this.config.options=s}get registry(){return ug}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():wP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return xP(this.canvas,this.ctx),this}stop(){return Kg.stop(this),this}resize(s,E){Kg.running(this)?this._resizeBeforeDraw={width:s,height:E}:this._resize(s,E)}_resize(s,E){const B=this.options,K=this.canvas,pt=B.maintainAspectRatio&&this.aspectRatio,_t=this.platform.getMaximumSize(K,s,E,pt),Ot=B.devicePixelRatio||this.platform.getDevicePixelRatio(),jt=this.width?"resize":"attach";this.width=_t.width,this.height=_t.height,this._aspectRatio=this.aspectRatio,wP(this,Ot,!0)&&(this.notifyPlugins("resize",{size:_t}),Df(B.onResize,[this,_t],this),this.attached&&this._doResize(jt)&&this.render())}ensureScalesHaveIDs(){const E=this.options.scales||{};Xh(E,(B,K)=>{B.id=K})}buildOrUpdateScales(){const s=this.options,E=s.scales,B=this.scales,K=Object.keys(B).reduce((_t,Ot)=>(_t[Ot]=!1,_t),{});let pt=[];E&&(pt=pt.concat(Object.keys(E).map(_t=>{const Ot=E[_t],jt=PA(_t,Ot),te=jt==="r",he=jt==="x";return{options:Ot,dposition:te?"chartArea":he?"bottom":"left",dtype:te?"radialLinear":he?"category":"linear"}}))),Xh(pt,_t=>{const Ot=_t.options,jt=Ot.id,te=PA(jt,Ot),he=cc(Ot.type,_t.dtype);(Ot.position===void 0||KP(Ot.position,te)!==KP(_t.dposition))&&(Ot.position=_t.dposition),K[jt]=!0;let De=null;if(jt in B&&B[jt].type===he)De=B[jt];else{const er=ug.getScale(he);De=new er({id:jt,type:he,ctx:this.ctx,chart:this}),B[De.id]=De}De.init(Ot,s)}),Xh(K,(_t,Ot)=>{_t||delete B[Ot]}),Xh(B,_t=>{sm.configure(this,_t,_t.options),sm.addBox(this,_t)})}_updateMetasets(){const s=this._metasets,E=this.data.datasets.length,B=s.length;if(s.sort((K,pt)=>K.index-pt.index),B>E){for(let K=E;KE.length&&delete this._stacks,s.forEach((B,K)=>{E.filter(pt=>pt===B._dataset).length===0&&this._destroyDatasetMeta(K)})}buildOrUpdateControllers(){const s=[],E=this.data.datasets;let B,K;for(this._removeUnreferencedMetasets(),B=0,K=E.length;B{this.getDatasetMeta(E).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(s){const E=this.config;E.update();const B=this._options=E.createResolver(E.chartOptionScopes(),this.getContext()),K=this._animationsDisabled=!B.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:s,cancelable:!0})===!1)return;const pt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let _t=0;for(let te=0,he=this.data.datasets.length;te{te.reset()}),this._updateDatasets(s),this.notifyPlugins("afterUpdate",{mode:s}),this._layers.sort(XP("z","_idx"));const{_active:Ot,_lastEvent:jt}=this;jt?this._eventHandler(jt,!0):Ot.length&&this._updateHoverStyles(Ot,Ot,!0),this.render()}_updateScales(){Xh(this.scales,s=>{sm.removeBox(this,s)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const s=this.options,E=new Set(Object.keys(this._listeners)),B=new Set(s.events);(!uP(E,B)||!!this._responsiveListeners!==s.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:s}=this,E=this._getUniformDataChanges()||[];for(const{method:B,start:K,count:pt}of E){const _t=B==="_removeElements"?-pt:pt;Uct(s,K,_t)}}_getUniformDataChanges(){const s=this._dataChanges;if(!s||!s.length)return;this._dataChanges=[];const E=this.data.datasets.length,B=pt=>new Set(s.filter(_t=>_t[0]===pt).map((_t,Ot)=>Ot+","+_t.splice(1).join(","))),K=B(0);for(let pt=1;ptpt.split(",")).map(pt=>({method:pt[1],start:+pt[2],count:+pt[3]}))}_updateLayout(s){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;sm.update(this,this.width,this.height,s);const E=this.chartArea,B=E.width<=0||E.height<=0;this._layers=[],Xh(this.boxes,K=>{B&&K.position==="chartArea"||(K.configure&&K.configure(),this._layers.push(...K._layers()))},this),this._layers.forEach((K,pt)=>{K._idx=pt}),this.notifyPlugins("afterLayout")}_updateDatasets(s){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:s,cancelable:!0})!==!1){for(let E=0,B=this.data.datasets.length;E=0;--E)this._drawDataset(s[E]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(s){const E=this.ctx,B={meta:s,index:s.index,cancelable:!0},K=TD(this,s);this.notifyPlugins("beforeDatasetDraw",B)!==!1&&(K&&G4(E,K),s.controller.draw(),K&&Y4(E),B.cancelable=!1,this.notifyPlugins("afterDatasetDraw",B))}isPointInArea(s){return K2(s,this.chartArea,this._minPadding)}getElementsAtEventForMode(s,E,B,K){const pt=Nut.modes[E];return typeof pt=="function"?pt(this,s,B,K):[]}getDatasetMeta(s){const E=this.data.datasets[s],B=this._metasets;let K=B.filter(pt=>pt&&pt._dataset===E).pop();return K||(K={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:E&&E.order||0,index:s,_dataset:E,_parsed:[],_sorted:!1},B.push(K)),K}getContext(){return this.$context||(this.$context=zy(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(s){const E=this.data.datasets[s];if(!E)return!1;const B=this.getDatasetMeta(s);return typeof B.hidden=="boolean"?!B.hidden:!E.hidden}setDatasetVisibility(s,E){const B=this.getDatasetMeta(s);B.hidden=!E}toggleDataVisibility(s){this._hiddenIndices[s]=!this._hiddenIndices[s]}getDataVisibility(s){return!this._hiddenIndices[s]}_updateVisibility(s,E,B){const K=B?"show":"hide",pt=this.getDatasetMeta(s),_t=pt.controller._resolveAnimations(void 0,K);Z2(E)?(pt.data[E].hidden=!B,this.update()):(this.setDatasetVisibility(s,B),_t.update(pt,{visible:B}),this.update(Ot=>Ot.datasetIndex===s?K:void 0))}hide(s,E){this._updateVisibility(s,E,!1)}show(s,E){this._updateVisibility(s,E,!0)}_destroyDatasetMeta(s){const E=this._metasets[s];E&&E.controller&&E.controller._destroy(),delete this._metasets[s]}_stop(){let s,E;for(this.stop(),Kg.remove(this),s=0,E=this.data.datasets.length;s{E.addEventListener(this,pt,_t),s[pt]=_t},K=(pt,_t,Ot)=>{pt.offsetX=_t,pt.offsetY=Ot,this._eventHandler(pt)};Xh(this.options.events,pt=>B(pt,K))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const s=this._responsiveListeners,E=this.platform,B=(jt,te)=>{E.addEventListener(this,jt,te),s[jt]=te},K=(jt,te)=>{s[jt]&&(E.removeEventListener(this,jt,te),delete s[jt])},pt=(jt,te)=>{this.canvas&&this.resize(jt,te)};let _t;const Ot=()=>{K("attach",Ot),this.attached=!0,this.resize(),B("resize",pt),B("detach",_t)};_t=()=>{this.attached=!1,K("resize",pt),this._stop(),this._resize(0,0),B("attach",Ot)},E.isAttached(this.canvas)?Ot():_t()}unbindEvents(){Xh(this._listeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._listeners={},Xh(this._responsiveListeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._responsiveListeners=void 0}updateHoverStyle(s,E,B){const K=B?"set":"remove";let pt,_t,Ot,jt;for(E==="dataset"&&(pt=this.getDatasetMeta(s[0].datasetIndex),pt.controller["_"+K+"DatasetHoverStyle"]()),Ot=0,jt=s.length;Ot{const Ot=this.getDatasetMeta(pt);if(!Ot)throw new Error("No dataset found at index "+pt);return{datasetIndex:pt,element:Ot.data[_t],index:_t}});!y4(B,E)&&(this._active=B,this._lastEvent=null,this._updateHoverStyles(B,E))}notifyPlugins(s,E,B){return this._plugins.notify(this,s,E,B)}isPluginEnabled(s){return this._plugins._cache.filter(E=>E.plugin.id===s).length===1}_updateHoverStyles(s,E,B){const K=this.options.hover,pt=(jt,te)=>jt.filter(he=>!te.some(De=>he.datasetIndex===De.datasetIndex&&he.index===De.index)),_t=pt(E,s),Ot=B?s:pt(s,E);_t.length&&this.updateHoverStyle(_t,K.mode,!1),Ot.length&&K.mode&&this.updateHoverStyle(Ot,K.mode,!0)}_eventHandler(s,E){const B={event:s,replay:E,cancelable:!0,inChartArea:this.isPointInArea(s)},K=_t=>(_t.options.events||this.options.events).includes(s.native.type);if(this.notifyPlugins("beforeEvent",B,K)===!1)return;const pt=this._handleEvent(s,E,B.inChartArea);return B.cancelable=!1,this.notifyPlugins("afterEvent",B,K),(pt||B.changed)&&this.render(),this}_handleEvent(s,E,B){const{_active:K=[],options:pt}=this,_t=E,Ot=this._getActiveElements(s,K,B,_t),jt=Wst(s),te=Vct(s,this._lastEvent,B,jt);B&&(this._lastEvent=null,Df(pt.onHover,[s,Ot,this],this),jt&&Df(pt.onClick,[s,Ot,this],this));const he=!y4(Ot,K);return(he||E)&&(this._active=Ot,this._updateHoverStyles(Ot,K,E)),this._lastEvent=te,he}_getActiveElements(s,E,B,K){if(s.type==="mouseout")return[];if(!B)return E;const pt=this.options.hover;return this.getElementsAtEventForMode(s,pt.mode,pt,K)}}function tI(){return Xh(x2.instances,d=>d._plugins.invalidate())}function Hct(d,s,E){const{startAngle:B,x:K,y:pt,outerRadius:_t,innerRadius:Ot,options:jt}=s,{borderWidth:te,borderJoinStyle:he}=jt,De=Math.min(te/_t,q0(B-E));if(d.beginPath(),d.arc(K,pt,_t-te/2,B+De/2,E-De/2),Ot>0){const er=Math.min(te/Ot,q0(B-E));d.arc(K,pt,Ot+te/2,E-er/2,B+er/2,!0)}else{const er=Math.min(te/2,_t*q0(B-E));if(he==="round")d.arc(K,pt,er,E-Qh/2,B+Qh/2,!0);else if(he==="bevel"){const pr=2*er*er,Mr=-pr*Math.cos(E+Qh/2)+K,Tr=-pr*Math.sin(E+Qh/2)+pt,Vr=pr*Math.cos(B+Qh/2)+K,mn=pr*Math.sin(B+Qh/2)+pt;d.lineTo(Mr,Tr),d.lineTo(Vr,mn)}}d.closePath(),d.moveTo(0,0),d.rect(0,0,d.canvas.width,d.canvas.height),d.clip("evenodd")}function Wct(d,s,E){const{startAngle:B,pixelMargin:K,x:pt,y:_t,outerRadius:Ot,innerRadius:jt}=s;let te=K/Ot;d.beginPath(),d.arc(pt,_t,Ot,B-te,E+te),jt>K?(te=K/jt,d.arc(pt,_t,jt,E+te,B-te,!0)):d.arc(pt,_t,K,E+ip,B-ip),d.closePath(),d.clip()}function qct(d){return wM(d,["outerStart","outerEnd","innerStart","innerEnd"])}function $ct(d,s,E,B){const K=qct(d.options.borderRadius),pt=(E-s)/2,_t=Math.min(pt,B*s/2),Ot=jt=>{const te=(E-Math.min(pt,jt))*B/2;return Jp(jt,0,Math.min(pt,te))};return{outerStart:Ot(K.outerStart),outerEnd:Ot(K.outerEnd),innerStart:Jp(K.innerStart,0,_t),innerEnd:Jp(K.innerEnd,0,_t)}}function r_(d,s,E,B){return{x:E+d*Math.cos(s),y:B+d*Math.sin(s)}}function T4(d,s,E,B,K,pt){const{x:_t,y:Ot,startAngle:jt,pixelMargin:te,innerRadius:he}=s,De=Math.max(s.outerRadius+B+E-te,0),er=he>0?he+B+E+te:0;let pr=0;const Mr=K-jt;if(B){const Ca=he>0?he-B:0,Ni=De>0?De-B:0,si=(Ca+Ni)/2,Ma=si!==0?Mr*si/(si+B):Mr;pr=(Mr-Ma)/2}const Tr=Math.max(.001,Mr*De-E/Qh)/De,Vr=(Mr-Tr)/2,mn=jt+Vr+pr,Dt=K-Vr-pr,{outerStart:cn,outerEnd:Jn,innerStart:Bn,innerEnd:ni}=$ct(s,er,De,Dt-mn),Wi=De-cn,Un=De-Jn,qr=mn+cn/Wi,Di=Dt-Jn/Un,Fi=er+Bn,Pi=er+ni,bi=mn+Bn/Fi,Yi=Dt-ni/Pi;if(d.beginPath(),pt){const Ca=(qr+Di)/2;if(d.arc(_t,Ot,De,qr,Ca),d.arc(_t,Ot,De,Ca,Di),Jn>0){const zo=r_(Un,Di,_t,Ot);d.arc(zo.x,zo.y,Jn,Di,Dt+ip)}const Ni=r_(Pi,Dt,_t,Ot);if(d.lineTo(Ni.x,Ni.y),ni>0){const zo=r_(Pi,Yi,_t,Ot);d.arc(zo.x,zo.y,ni,Dt+ip,Yi+Math.PI)}const si=(Dt-ni/er+(mn+Bn/er))/2;if(d.arc(_t,Ot,er,Dt-ni/er,si,!0),d.arc(_t,Ot,er,si,mn+Bn/er,!0),Bn>0){const zo=r_(Fi,bi,_t,Ot);d.arc(zo.x,zo.y,Bn,bi+Math.PI,mn-ip)}const Ma=r_(Wi,mn,_t,Ot);if(d.lineTo(Ma.x,Ma.y),cn>0){const zo=r_(Wi,qr,_t,Ot);d.arc(zo.x,zo.y,cn,mn-ip,qr)}}else{d.moveTo(_t,Ot);const Ca=Math.cos(qr)*De+_t,Ni=Math.sin(qr)*De+Ot;d.lineTo(Ca,Ni);const si=Math.cos(Di)*De+_t,Ma=Math.sin(Di)*De+Ot;d.lineTo(si,Ma)}d.closePath()}function Zct(d,s,E,B,K){const{fullCircles:pt,startAngle:_t,circumference:Ot}=s;let jt=s.endAngle;if(pt){T4(d,s,E,B,jt,K);for(let te=0;te=Qh&&pr===0&&he!=="miter"&&Hct(d,s,Tr),pt||(T4(d,s,E,B,Tr,K),d.stroke())}class Yct extends lv{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(s){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,s&&Object.assign(this,s)}inRange(s,E,B){const K=this.getProps(["x","y"],B),{angle:pt,distance:_t}=oD(K,{x:s,y:E}),{startAngle:Ot,endAngle:jt,innerRadius:te,outerRadius:he,circumference:De}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],B),er=(this.options.spacing+this.options.borderWidth)/2,pr=cc(De,jt-Ot),Mr=Y2(pt,Ot,jt)&&Ot!==jt,Tr=pr>=od||Mr,Vr=nv(_t,te+er,he+er);return Tr&&Vr}getCenterPoint(s){const{x:E,y:B,startAngle:K,endAngle:pt,innerRadius:_t,outerRadius:Ot}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],s),{offset:jt,spacing:te}=this.options,he=(K+pt)/2,De=(_t+Ot+te+jt)/2;return{x:E+Math.cos(he)*De,y:B+Math.sin(he)*De}}tooltipPosition(s){return this.getCenterPoint(s)}draw(s){const{options:E,circumference:B}=this,K=(E.offset||0)/4,pt=(E.spacing||0)/2,_t=E.circular;if(this.pixelMargin=E.borderAlign==="inner"?.33:0,this.fullCircles=B>od?Math.floor(B/od):0,B===0||this.innerRadius<0||this.outerRadius<0)return;s.save();const Ot=(this.startAngle+this.endAngle)/2;s.translate(Math.cos(Ot)*K,Math.sin(Ot)*K);const jt=1-Math.sin(Math.min(Qh,B||0)),te=K*jt;s.fillStyle=E.backgroundColor,s.strokeStyle=E.borderColor,Zct(s,this,te,pt,_t),Gct(s,this,te,pt,_t),s.restore()}}function BD(d,s,E=s){d.lineCap=cc(E.borderCapStyle,s.borderCapStyle),d.setLineDash(cc(E.borderDash,s.borderDash)),d.lineDashOffset=cc(E.borderDashOffset,s.borderDashOffset),d.lineJoin=cc(E.borderJoinStyle,s.borderJoinStyle),d.lineWidth=cc(E.borderWidth,s.borderWidth),d.strokeStyle=cc(E.borderColor,s.borderColor)}function Kct(d,s,E){d.lineTo(E.x,E.y)}function Xct(d){return d.stepped?vlt:d.tension||d.cubicInterpolationMode==="monotone"?ylt:Kct}function ND(d,s,E={}){const B=d.length,{start:K=0,end:pt=B-1}=E,{start:_t,end:Ot}=s,jt=Math.max(K,_t),te=Math.min(pt,Ot),he=K<_t&&pt<_t||K>Ot&&pt>Ot;return{count:B,start:jt,loop:s.loop,ilen:te(_t+(te?Ot-Jn:Jn))%pt,cn=()=>{Tr!==Vr&&(d.lineTo(he,Vr),d.lineTo(he,Tr),d.lineTo(he,mn))};for(jt&&(pr=K[Dt(0)],d.moveTo(pr.x,pr.y)),er=0;er<=Ot;++er){if(pr=K[Dt(er)],pr.skip)continue;const Jn=pr.x,Bn=pr.y,ni=Jn|0;ni===Mr?(BnVr&&(Vr=Bn),he=(De*he+Jn)/++De):(cn(),d.lineTo(Jn,Bn),Mr=ni,De=0,Tr=Vr=Bn),mn=Bn}cn()}function IA(d){const s=d.options,E=s.borderDash&&s.borderDash.length;return!d._decimated&&!d._loop&&!s.tension&&s.cubicInterpolationMode!=="monotone"&&!s.stepped&&!E?Qct:Jct}function tht(d){return d.stepped?Klt:d.tension||d.cubicInterpolationMode==="monotone"?Xlt:my}function eht(d,s,E,B){let K=s._path;K||(K=s._path=new Path2D,s.path(K,E,B)&&K.closePath()),BD(d,s.options),d.stroke(K)}function rht(d,s,E,B){const{segments:K,options:pt}=s,_t=IA(s);for(const Ot of K)BD(d,pt,Ot.style),d.beginPath(),_t(d,s,Ot,{start:E,end:E+B-1})&&d.closePath(),d.stroke()}const nht=typeof Path2D=="function";function iht(d,s,E,B){nht&&!s.options.segment?eht(d,s,E,B):rht(d,s,E,B)}class Q4 extends lv{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"&&s!=="fill"};constructor(s){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,s&&Object.assign(this,s)}updateControlPoints(s,E){const B=this.options;if((B.tension||B.cubicInterpolationMode==="monotone")&&!B.stepped&&!this._pointsUpdated){const K=B.spanGaps?this._loop:this._fullLoop;Vlt(this._points,B,s,K,E),this._pointsUpdated=!0}}set points(s){this._points=s,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=nut(this,this.options.segment))}first(){const s=this.segments,E=this.points;return s.length&&E[s[0].start]}last(){const s=this.segments,E=this.points,B=s.length;return B&&E[s[B-1].end]}interpolate(s,E){const B=this.options,K=s[E],pt=this.points,_t=kD(this,{property:E,start:K,end:K});if(!_t.length)return;const Ot=[],jt=tht(B);let te,he;for(te=0,he=_t.length;te{Ot=t6(_t,Ot,K);const jt=K[_t],te=K[Ot];B!==null?(pt.push({x:jt.x,y:B}),pt.push({x:te.x,y:B})):E!==null&&(pt.push({x:E,y:jt.y}),pt.push({x:E,y:te.y}))}),pt}function t6(d,s,E){for(;s>d;s--){const B=E[s];if(!isNaN(B.x)&&!isNaN(B.y))break}return s}function rI(d,s,E,B){return d&&s?B(d[E],s[E]):d?d[E]:s?s[E]:0}function UD(d,s){let E=[],B=!1;return Yd(d)?(B=!0,E=d):E=dht(d,s),E.length?new Q4({points:E,options:{tension:0},_loop:B,_fullLoop:B}):null}function nI(d){return d&&d.fill!==!1}function pht(d,s,E){let K=d[s].fill;const pt=[s];let _t;if(!E)return K;for(;K!==!1&&pt.indexOf(K)===-1;){if(!t0(K))return K;if(_t=d[K],!_t)return!1;if(_t.visible)return K;pt.push(K),K=_t.fill}return!1}function mht(d,s,E){const B=xht(d);if(Sc(B))return isNaN(B.value)?!1:B;let K=parseFloat(B);return t0(K)&&Math.floor(K)===K?ght(B[0],s,K,E):["origin","start","end","stack","shape"].indexOf(B)>=0&&B}function ght(d,s,E,B){return(d==="-"||d==="+")&&(E=s+E),E===s||E<0||E>=B?!1:E}function vht(d,s){let E=null;return d==="start"?E=s.bottom:d==="end"?E=s.top:Sc(d)?E=s.getPixelForValue(d.value):s.getBasePixel&&(E=s.getBasePixel()),E}function yht(d,s,E){let B;return d==="start"?B=E:d==="end"?B=s.options.reverse?s.min:s.max:Sc(d)?B=d.value:B=s.getBaseValue(),B}function xht(d){const s=d.options,E=s.fill;let B=cc(E&&E.target,E);return B===void 0&&(B=!!s.backgroundColor),B===!1||B===null?!1:B===!0?"origin":B}function _ht(d){const{scale:s,index:E,line:B}=d,K=[],pt=B.segments,_t=B.points,Ot=bht(s,E);Ot.push(UD({x:null,y:s.bottom},B));for(let jt=0;jt=0;--_t){const Ot=K[_t].$filler;Ot&&(Ot.line.updateControlPoints(pt,Ot.axis),B&&Ot.fill&&J8(d.ctx,Ot,pt))}},beforeDatasetsDraw(d,s,E){if(E.drawTime!=="beforeDatasetsDraw")return;const B=d.getSortedVisibleDatasetMetas();for(let K=B.length-1;K>=0;--K){const pt=B[K].$filler;nI(pt)&&J8(d.ctx,pt,d.chartArea)}},beforeDatasetDraw(d,s,E){const B=s.meta.$filler;!nI(B)||E.drawTime!=="beforeDatasetDraw"||J8(d.ctx,B,d.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const sI=(d,s)=>{let{boxHeight:E=s,boxWidth:B=s}=d;return d.usePointStyle&&(E=Math.min(E,s),B=d.pointStyleWidth||Math.min(B,s)),{boxWidth:B,boxHeight:E,itemHeight:Math.max(s,E)}},Iht=(d,s)=>d!==null&&s!==null&&d.datasetIndex===s.datasetIndex&&d.index===s.index;class lI extends lv{constructor(s){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E,B){this.maxWidth=s,this.maxHeight=E,this._margins=B,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const s=this.options.labels||{};let E=Df(s.generateLabels,[this.chart],this)||[];s.filter&&(E=E.filter(B=>s.filter(B,this.chart.data))),s.sort&&(E=E.sort((B,K)=>s.sort(B,K,this.chart.data))),this.options.reverse&&E.reverse(),this.legendItems=E}fit(){const{options:s,ctx:E}=this;if(!s.display){this.width=this.height=0;return}const B=s.labels,K=Qp(B.font),pt=K.size,_t=this._computeTitleHeight(),{boxWidth:Ot,itemHeight:jt}=sI(B,pt);let te,he;E.font=K.string,this.isHorizontal()?(te=this.maxWidth,he=this._fitRows(_t,pt,Ot,jt)+10):(he=this.maxHeight,te=this._fitCols(_t,K,Ot,jt)+10),this.width=Math.min(te,s.maxWidth||this.maxWidth),this.height=Math.min(he,s.maxHeight||this.maxHeight)}_fitRows(s,E,B,K){const{ctx:pt,maxWidth:_t,options:{labels:{padding:Ot}}}=this,jt=this.legendHitBoxes=[],te=this.lineWidths=[0],he=K+Ot;let De=s;pt.textAlign="left",pt.textBaseline="middle";let er=-1,pr=-he;return this.legendItems.forEach((Mr,Tr)=>{const Vr=B+E/2+pt.measureText(Mr.text).width;(Tr===0||te[te.length-1]+Vr+2*Ot>_t)&&(De+=he,te[te.length-(Tr>0?0:1)]=0,pr+=he,er++),jt[Tr]={left:0,top:pr,row:er,width:Vr,height:K},te[te.length-1]+=Vr+Ot}),De}_fitCols(s,E,B,K){const{ctx:pt,maxHeight:_t,options:{labels:{padding:Ot}}}=this,jt=this.legendHitBoxes=[],te=this.columnSizes=[],he=_t-s;let De=Ot,er=0,pr=0,Mr=0,Tr=0;return this.legendItems.forEach((Vr,mn)=>{const{itemWidth:Dt,itemHeight:cn}=zht(B,E,pt,Vr,K);mn>0&&pr+cn+2*Ot>he&&(De+=er+Ot,te.push({width:er,height:pr}),Mr+=er+Ot,Tr++,er=pr=0),jt[mn]={left:Mr,top:pr,col:Tr,width:Dt,height:cn},er=Math.max(er,Dt),pr+=cn+Ot}),De+=er,te.push({width:er,height:pr}),De}adjustHitBoxes(){if(!this.options.display)return;const s=this._computeTitleHeight(),{legendHitBoxes:E,options:{align:B,labels:{padding:K},rtl:pt}}=this,_t=f_(pt,this.left,this.width);if(this.isHorizontal()){let Ot=0,jt=qp(B,this.left+K,this.right-this.lineWidths[Ot]);for(const te of E)Ot!==te.row&&(Ot=te.row,jt=qp(B,this.left+K,this.right-this.lineWidths[Ot])),te.top+=this.top+s+K,te.left=_t.leftForLtr(_t.x(jt),te.width),jt+=te.width+K}else{let Ot=0,jt=qp(B,this.top+s+K,this.bottom-this.columnSizes[Ot].height);for(const te of E)te.col!==Ot&&(Ot=te.col,jt=qp(B,this.top+s+K,this.bottom-this.columnSizes[Ot].height)),te.top=jt,te.left+=this.left+K,te.left=_t.leftForLtr(_t.x(te.left),te.width),jt+=te.height+K}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const s=this.ctx;G4(s,this),this._draw(),Y4(s)}}_draw(){const{options:s,columnSizes:E,lineWidths:B,ctx:K}=this,{align:pt,labels:_t}=s,Ot=Rd.color,jt=f_(s.rtl,this.left,this.width),te=Qp(_t.font),{padding:he}=_t,De=te.size,er=De/2;let pr;this.drawTitle(),K.textAlign=jt.textAlign("left"),K.textBaseline="middle",K.lineWidth=.5,K.font=te.string;const{boxWidth:Mr,boxHeight:Tr,itemHeight:Vr}=sI(_t,De),mn=function(ni,Wi,Un){if(isNaN(Mr)||Mr<=0||isNaN(Tr)||Tr<0)return;K.save();const qr=cc(Un.lineWidth,1);if(K.fillStyle=cc(Un.fillStyle,Ot),K.lineCap=cc(Un.lineCap,"butt"),K.lineDashOffset=cc(Un.lineDashOffset,0),K.lineJoin=cc(Un.lineJoin,"miter"),K.lineWidth=qr,K.strokeStyle=cc(Un.strokeStyle,Ot),K.setLineDash(cc(Un.lineDash,[])),_t.usePointStyle){const Di={radius:Tr*Math.SQRT2/2,pointStyle:Un.pointStyle,rotation:Un.rotation,borderWidth:qr},Fi=jt.xPlus(ni,Mr/2),Pi=Wi+er;fD(K,Di,Fi,Pi,_t.pointStyleWidth&&Mr)}else{const Di=Wi+Math.max((De-Tr)/2,0),Fi=jt.leftForLtr(ni,Mr),Pi=h_(Un.borderRadius);K.beginPath(),Object.values(Pi).some(bi=>bi!==0)?b4(K,{x:Fi,y:Di,w:Mr,h:Tr,radius:Pi}):K.rect(Fi,Di,Mr,Tr),K.fill(),qr!==0&&K.stroke()}K.restore()},Dt=function(ni,Wi,Un){X2(K,Un.text,ni,Wi+Vr/2,te,{strikethrough:Un.hidden,textAlign:jt.textAlign(Un.textAlign)})},cn=this.isHorizontal(),Jn=this._computeTitleHeight();cn?pr={x:qp(pt,this.left+he,this.right-B[0]),y:this.top+he+Jn,line:0}:pr={x:this.left+he,y:qp(pt,this.top+Jn+he,this.bottom-E[0].height),line:0},xD(this.ctx,s.textDirection);const Bn=Vr+he;this.legendItems.forEach((ni,Wi)=>{K.strokeStyle=ni.fontColor,K.fillStyle=ni.fontColor;const Un=K.measureText(ni.text).width,qr=jt.textAlign(ni.textAlign||(ni.textAlign=_t.textAlign)),Di=Mr+er+Un;let Fi=pr.x,Pi=pr.y;jt.setWidth(this.width),cn?Wi>0&&Fi+Di+he>this.right&&(Pi=pr.y+=Bn,pr.line++,Fi=pr.x=qp(pt,this.left+he,this.right-B[pr.line])):Wi>0&&Pi+Bn>this.bottom&&(Fi=pr.x=Fi+E[pr.line].width+he,pr.line++,Pi=pr.y=qp(pt,this.top+Jn+he,this.bottom-E[pr.line].height));const bi=jt.x(Fi);if(mn(bi,Pi,ni),Fi=ilt(qr,Fi+Mr+er,cn?Fi+Di:this.right,s.rtl),Dt(jt.x(Fi),Pi,ni),cn)pr.x+=Di+he;else if(typeof ni.text!="string"){const Yi=te.lineHeight;pr.y+=HD(ni,Yi)+he}else pr.y+=Bn}),_D(this.ctx,s.textDirection)}drawTitle(){const s=this.options,E=s.title,B=Qp(E.font),K=fm(E.padding);if(!E.display)return;const pt=f_(s.rtl,this.left,this.width),_t=this.ctx,Ot=E.position,jt=B.size/2,te=K.top+jt;let he,De=this.left,er=this.width;if(this.isHorizontal())er=Math.max(...this.lineWidths),he=this.top+te,De=qp(s.align,De,this.right-er);else{const Mr=this.columnSizes.reduce((Tr,Vr)=>Math.max(Tr,Vr.height),0);he=te+qp(s.align,this.top,this.bottom-Mr-s.labels.padding-this._computeTitleHeight())}const pr=qp(Ot,De,De+er);_t.textAlign=pt.textAlign(xM(Ot)),_t.textBaseline="middle",_t.strokeStyle=E.color,_t.fillStyle=E.color,_t.font=B.string,X2(_t,E.text,pr,he,B)}_computeTitleHeight(){const s=this.options.title,E=Qp(s.font),B=fm(s.padding);return s.display?E.lineHeight+B.height:0}_getLegendItemAt(s,E){let B,K,pt;if(nv(s,this.left,this.right)&&nv(E,this.top,this.bottom)){for(pt=this.legendHitBoxes,B=0;Bpt.length>_t.length?pt:_t)),s+E.size/2+B.measureText(K).width}function Dht(d,s,E){let B=d;return typeof s.text!="string"&&(B=HD(s,E)),B}function HD(d,s){const E=d.text?d.text.length:0;return s*E}function Fht(d,s){return!!((d==="mousemove"||d==="mouseout")&&(s.onHover||s.onLeave)||s.onClick&&(d==="click"||d==="mouseup"))}var Rht={id:"legend",_element:lI,start(d,s,E){const B=d.legend=new lI({ctx:d.ctx,options:E,chart:d});sm.configure(d,B,E),sm.addBox(d,B)},stop(d){sm.removeBox(d,d.legend),delete d.legend},beforeUpdate(d,s,E){const B=d.legend;sm.configure(d,B,E),B.options=E},afterUpdate(d){const s=d.legend;s.buildLabels(),s.adjustHitBoxes()},afterEvent(d,s){s.replay||d.legend.handleEvent(s.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(d,s,E){const B=s.datasetIndex,K=E.chart;K.isDatasetVisible(B)?(K.hide(B),s.hidden=!0):(K.show(B),s.hidden=!1)},onHover:null,onLeave:null,labels:{color:d=>d.chart.options.color,boxWidth:40,padding:10,generateLabels(d){const s=d.data.datasets,{labels:{usePointStyle:E,pointStyle:B,textAlign:K,color:pt,useBorderRadius:_t,borderRadius:Ot}}=d.legend.options;return d._getSortedDatasetMetas().map(jt=>{const te=jt.controller.getStyle(E?0:void 0),he=fm(te.borderWidth);return{text:s[jt.index].label,fillStyle:te.backgroundColor,fontColor:pt,hidden:!jt.visible,lineCap:te.borderCapStyle,lineDash:te.borderDash,lineDashOffset:te.borderDashOffset,lineJoin:te.borderJoinStyle,lineWidth:(he.width+he.height)/4,strokeStyle:te.borderColor,pointStyle:B||te.pointStyle,rotation:te.rotation,textAlign:K||te.textAlign,borderRadius:_t&&(Ot||te.borderRadius),datasetIndex:jt.index}},this)}},title:{color:d=>d.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:d=>!d.startsWith("on"),labels:{_scriptable:d=>!["generateLabels","filter","sort"].includes(d)}}};class WD extends lv{constructor(s){super(),this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E){const B=this.options;if(this.left=0,this.top=0,!B.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=s,this.height=this.bottom=E;const K=Yd(B.text)?B.text.length:1;this._padding=fm(B.padding);const pt=K*Qp(B.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=pt:this.width=pt}isHorizontal(){const s=this.options.position;return s==="top"||s==="bottom"}_drawArgs(s){const{top:E,left:B,bottom:K,right:pt,options:_t}=this,Ot=_t.align;let jt=0,te,he,De;return this.isHorizontal()?(he=qp(Ot,B,pt),De=E+s,te=pt-B):(_t.position==="left"?(he=B+s,De=qp(Ot,K,E),jt=Qh*-.5):(he=pt-s,De=qp(Ot,E,K),jt=Qh*.5),te=K-E),{titleX:he,titleY:De,maxWidth:te,rotation:jt}}draw(){const s=this.ctx,E=this.options;if(!E.display)return;const B=Qp(E.font),pt=B.lineHeight/2+this._padding.top,{titleX:_t,titleY:Ot,maxWidth:jt,rotation:te}=this._drawArgs(pt);X2(s,E.text,0,0,B,{color:E.color,maxWidth:jt,rotation:te,textAlign:xM(E.align),textBaseline:"middle",translation:[_t,Ot]})}}function Bht(d,s){const E=new WD({ctx:d.ctx,options:s,chart:d});sm.configure(d,E,s),sm.addBox(d,E),d.titleBlock=E}var Nht={id:"title",_element:WD,start(d,s,E){Bht(d,E)},stop(d){const s=d.titleBlock;sm.removeBox(d,s),delete d.titleBlock},beforeUpdate(d,s,E){const B=d.titleBlock;sm.configure(d,B,E),B.options=E},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _2={average(d){if(!d.length)return!1;let s,E,B=new Set,K=0,pt=0;for(s=0,E=d.length;sOt+jt)/B.size,y:K/pt}},nearest(d,s){if(!d.length)return!1;let E=s.x,B=s.y,K=Number.POSITIVE_INFINITY,pt,_t,Ot;for(pt=0,_t=d.length;pt<_t;++pt){const jt=d[pt].element;if(jt&&jt.hasValue()){const te=jt.getCenterPoint(),he=SA(s,te);hezt({chart:s,initial:E.initial,numSteps:_t,currentStep:Math.min(R-E.start,_t)}))}_refresh(){this._request||(this._running=!0,this._request=dD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(s=Date.now()){let E=0;this._charts.forEach((R,Y)=>{if(!R.running||!R.items.length)return;const dt=R.items;let _t=dt.length-1,zt=!1,jt;for(;_t>=0;--_t)jt=dt[_t],jt._active?(jt._total>R.duration&&(R.duration=jt._total),jt.tick(s),zt=!0):(dt[_t]=dt[dt.length-1],dt.pop());zt&&(Y.draw(),this._notify(Y,R,s,"progress")),dt.length||(R.running=!1,this._notify(Y,R,s,"complete"),R.initial=!1),E+=dt.length}),this._lastDate=s,E===0&&(this._running=!1)}_getAnims(s){const E=this._charts;let R=E.get(s);return R||(R={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},E.set(s,R)),R}listen(s,E,R){this._getAnims(s).listeners[E].push(R)}add(s,E){!E||!E.length||this._getAnims(s).items.push(...E)}has(s){return this._getAnims(s).items.length>0}start(s){const E=this._charts.get(s);E&&(E.running=!0,E.start=Date.now(),E.duration=E.items.reduce((R,Y)=>Math.max(R,Y._duration),0),this._refresh())}running(s){if(!this._running)return!1;const E=this._charts.get(s);return!(!E||!E.running||!E.items.length)}stop(s){const E=this._charts.get(s);if(!E||!E.items.length)return;const R=E.items;let Y=R.length-1;for(;Y>=0;--Y)R[Y].cancel();E.items=[],this._notify(s,E,Date.now(),"complete")}remove(s){return this._charts.delete(s)}}var Xg=new Eut;const CP="transparent",Cut={boolean(d,s,E){return E>.5?s:d},color(d,s,E){const R=yP(d||CP),Y=R.valid&&yP(s||CP);return Y&&Y.valid?Y.mix(R,E).hexString():s},number(d,s,E){return d+(s-d)*E}};class Lut{constructor(s,E,R,Y){const dt=E[R];Y=N5([s.to,Y,dt,s.from]);const _t=N5([s.from,dt,Y]);this._active=!0,this._fn=s.fn||Cut[s.type||typeof _t],this._easing=I2[s.easing]||I2.linear,this._start=Math.floor(Date.now()+(s.delay||0)),this._duration=this._total=Math.floor(s.duration),this._loop=!!s.loop,this._target=E,this._prop=R,this._from=_t,this._to=Y,this._promises=void 0}active(){return this._active}update(s,E,R){if(this._active){this._notify(!1);const Y=this._target[this._prop],dt=R-this._start,_t=this._duration-dt;this._start=R,this._duration=Math.floor(Math.max(_t,s.duration)),this._total+=dt,this._loop=!!s.loop,this._to=N5([s.to,E,Y,s.from]),this._from=N5([s.from,Y,E])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(s){const E=s-this._start,R=this._duration,Y=this._prop,dt=this._from,_t=this._loop,zt=this._to;let jt;if(this._active=dt!==zt&&(_t||E1?2-jt:jt,jt=this._easing(Math.min(1,Math.max(0,jt))),this._target[Y]=this._fn(dt,zt,jt)}wait(){const s=this._promises||(this._promises=[]);return new Promise((E,R)=>{s.push({res:E,rej:R})})}_notify(s){const E=s?"res":"rej",R=this._promises||[];for(let Y=0;Y{const dt=s[Y];if(!Sc(dt))return;const _t={};for(const zt of E)_t[zt]=dt[zt];(Yd(dt.properties)&&dt.properties||[Y]).forEach(zt=>{(zt===Y||!R.has(zt))&&R.set(zt,_t)})})}_animateOptions(s,E){const R=E.options,Y=Iut(s,R);if(!Y)return[];const dt=this._createAnimations(Y,R);return R.$shared&&Put(s.options.$animations,R).then(()=>{s.options=R},()=>{}),dt}_createAnimations(s,E){const R=this._properties,Y=[],dt=s.$animations||(s.$animations={}),_t=Object.keys(E),zt=Date.now();let jt;for(jt=_t.length-1;jt>=0;--jt){const te=_t[jt];if(te.charAt(0)==="$")continue;if(te==="options"){Y.push(...this._animateOptions(s,E));continue}const ce=E[te];let Ie=dt[te];const Je=R.get(te);if(Ie)if(Je&&Ie.active()){Ie.update(Je,ce,zt);continue}else Ie.cancel();if(!Je||!Je.duration){s[te]=ce;continue}dt[te]=Ie=new Lut(Je,s,te,ce),Y.push(Ie)}return Y}update(s,E){if(this._properties.size===0){Object.assign(s,E);return}const R=this._createAnimations(s,E);if(R.length)return Xg.add(this._chart,R),!0}}function Put(d,s){const E=[],R=Object.keys(s);for(let Y=0;Y0||!E&&dt<0)return Y.index}return null}function zP(d,s){const{chart:E,_cachedMeta:R}=d,Y=E._stacks||(E._stacks={}),{iScale:dt,vScale:_t,index:zt}=R,jt=dt.axis,te=_t.axis,ce=Fut(dt,_t,R),Ie=s.length;let Je;for(let fr=0;frE[R].axis===s).shift()}function Nut(d,s){return Dy(d,{active:!1,dataset:void 0,datasetIndex:s,index:s,mode:"default",type:"dataset"})}function jut(d,s,E){return Dy(d,{active:!1,dataIndex:s,parsed:void 0,raw:void 0,element:E,index:s,mode:"default",type:"data"})}function l2(d,s){const E=d.controller.index,R=d.vScale&&d.vScale.axis;if(R){s=s||d._parsed;for(const Y of s){const dt=Y._stacks;if(!dt||dt[R]===void 0||dt[R][E]===void 0)return;delete dt[R][E],dt[R]._visualValues!==void 0&&dt[R]._visualValues[E]!==void 0&&delete dt[R]._visualValues[E]}}}const $8=d=>d==="reset"||d==="none",OP=(d,s)=>s?d:Object.assign({},d),Uut=(d,s,E)=>d&&!s.hidden&&s._stacked&&{keys:LD(E,!0),values:null};class Q4{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(s,E){this.chart=s,this._ctx=s.ctx,this.index=E,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const s=this._cachedMeta;this.configure(),this.linkScales(),s._stacked=W8(s.vScale,s),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(s){this.index!==s&&l2(this._cachedMeta),this.index=s}linkScales(){const s=this.chart,E=this._cachedMeta,R=this.getDataset(),Y=(Ie,Je,fr,Ar)=>Ie==="x"?Je:Ie==="r"?Ar:fr,dt=E.xAxisID=cc(R.xAxisID,q8(s,"x")),_t=E.yAxisID=cc(R.yAxisID,q8(s,"y")),zt=E.rAxisID=cc(R.rAxisID,q8(s,"r")),jt=E.indexAxis,te=E.iAxisID=Y(jt,dt,_t,zt),ce=E.vAxisID=Y(jt,_t,dt,zt);E.xScale=this.getScaleForId(dt),E.yScale=this.getScaleForId(_t),E.rScale=this.getScaleForId(zt),E.iScale=this.getScaleForId(te),E.vScale=this.getScaleForId(ce)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(s){return this.chart.scales[s]}_getOtherScale(s){const E=this._cachedMeta;return s===E.iScale?E.vScale:E.iScale}reset(){this._update("reset")}_destroy(){const s=this._cachedMeta;this._data&&mP(this._data,this),s._stacked&&l2(s)}_dataCheck(){const s=this.getDataset(),E=s.data||(s.data=[]),R=this._data;if(Sc(E)){const Y=this._cachedMeta;this._data=Dut(E,Y)}else if(R!==E){if(R){mP(R,this);const Y=this._cachedMeta;l2(Y),Y._parsed=[]}E&&Object.isExtensible(E)&&klt(E,this),this._syncList=[],this._data=E}}addElements(){const s=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(s.dataset=new this.datasetElementType)}buildOrUpdateElements(s){const E=this._cachedMeta,R=this.getDataset();let Y=!1;this._dataCheck();const dt=E._stacked;E._stacked=W8(E.vScale,E),E.stack!==R.stack&&(Y=!0,l2(E),E.stack=R.stack),this._resyncElements(s),(Y||dt!==E._stacked)&&(zP(this,E._parsed),E._stacked=W8(E.vScale,E))}configure(){const s=this.chart.config,E=s.datasetScopeKeys(this._type),R=s.getOptionScopes(this.getDataset(),E,!0);this.options=s.createResolver(R,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(s,E){const{_cachedMeta:R,_data:Y}=this,{iScale:dt,_stacked:_t}=R,zt=dt.axis;let jt=s===0&&E===Y.length?!0:R._sorted,te=s>0&&R._parsed[s-1],ce,Ie,Je;if(this._parsing===!1)R._parsed=Y,R._sorted=!0,Je=Y;else{Yd(Y[s])?Je=this.parseArrayData(R,Y,s,E):Sc(Y[s])?Je=this.parseObjectData(R,Y,s,E):Je=this.parsePrimitiveData(R,Y,s,E);const fr=()=>Ie[zt]===null||te&&Ie[zt]kr||Ie=0;--Je)if(!Ar()){this.updateRangeFromParsed(te,s,fr,jt);break}}return te}getAllParsedValues(s){const E=this._cachedMeta._parsed,R=[];let Y,dt,_t;for(Y=0,dt=E.length;Y=0&&sthis.getContext(R,Y,E),kr=te.resolveNamedOptions(Je,fr,Ar,Ie);return kr.$shared&&(kr.$shared=jt,dt[_t]=Object.freeze(OP(kr,jt))),kr}_resolveAnimations(s,E,R){const Y=this.chart,dt=this._cachedDataOpts,_t=`animation-${E}`,zt=dt[_t];if(zt)return zt;let jt;if(Y.options.animation!==!1){const ce=this.chart.config,Ie=ce.datasetAnimationScopeKeys(this._type,E),Je=ce.getOptionScopes(this.getDataset(),Ie);jt=ce.createResolver(Je,this.getContext(s,R,E))}const te=new CD(Y,jt&&jt.animations);return jt&&jt._cacheable&&(dt[_t]=Object.freeze(te)),te}getSharedOptions(s){if(s.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},s))}includeOptions(s,E){return!E||$8(s)||this.chart._animationsDisabled}_getSharedOptions(s,E){const R=this.resolveDataElementOptions(s,E),Y=this._sharedOptions,dt=this.getSharedOptions(R),_t=this.includeOptions(E,dt)||dt!==Y;return this.updateSharedOptions(dt,E,R),{sharedOptions:dt,includeOptions:_t}}updateElement(s,E,R,Y){$8(Y)?Object.assign(s,R):this._resolveAnimations(E,Y).update(s,R)}updateSharedOptions(s,E,R){s&&!$8(E)&&this._resolveAnimations(void 0,E).update(s,R)}_setStyle(s,E,R,Y){s.active=Y;const dt=this.getStyle(E,Y);this._resolveAnimations(E,R,Y).update(s,{options:!Y&&this.getSharedOptions(dt)||dt})}removeHoverStyle(s,E,R){this._setStyle(s,R,"active",!1)}setHoverStyle(s,E,R){this._setStyle(s,R,"active",!0)}_removeDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!1)}_setDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!0)}_resyncElements(s){const E=this._data,R=this._cachedMeta.data;for(const[zt,jt,te]of this._syncList)this[zt](jt,te);this._syncList=[];const Y=R.length,dt=E.length,_t=Math.min(dt,Y);_t&&this.parse(0,_t),dt>Y?this._insertElements(Y,dt-Y,s):dt{for(te.length+=E,zt=te.length-1;zt>=_t;zt--)te[zt]=te[zt-E]};for(jt(dt),zt=s;zt<_t;++zt)dt[zt]=new this.dataElementType;this._parsing&&jt(Y._parsed),this.parse(s,E),R&&this.updateElements(dt,s,E,"reset")}updateElements(s,E,R,Y){}_removeElements(s,E){const R=this._cachedMeta;if(this._parsing){const Y=R._parsed.splice(s,E);R._stacked&&l2(R,Y)}R.data.splice(s,E)}_sync(s){if(this._parsing)this._syncList.push(s);else{const[E,R,Y]=s;this[E](R,Y)}this.chart._dataChanges.push([this.index,...s])}_onDataPush(){const s=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-s,s])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(s,E){E&&this._sync(["_removeElements",s,E]);const R=arguments.length-2;R&&this._sync(["_insertElements",s,R])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Vut(d,s){if(!d._cache.$bar){const E=d.getMatchingVisibleMetas(s);let R=[];for(let Y=0,dt=E.length;YY-dt))}return d._cache.$bar}function Hut(d){const s=d.iScale,E=Vut(s,d.type);let R=s._length,Y,dt,_t,zt;const jt=()=>{_t===32767||_t===-32768||(Z2(zt)&&(R=Math.min(R,Math.abs(_t-zt)||R)),zt=_t)};for(Y=0,dt=E.length;Y0?Y[d-1]:null,zt=dMath.abs(zt)&&(jt=zt,te=_t),s[E.axis]=te,s._custom={barStart:jt,barEnd:te,start:Y,end:dt,min:_t,max:zt}}function PD(d,s,E,R){return Yd(d)?$ut(d,s,E,R):s[E.axis]=E.parse(d,R),s}function DP(d,s,E,R){const Y=d.iScale,dt=d.vScale,_t=Y.getLabels(),zt=Y===dt,jt=[];let te,ce,Ie,Je;for(te=E,ce=E+R;te=E?1:-1)}function Gut(d){let s,E,R,Y,dt;return d.horizontal?(s=d.base>d.x,E="left",R="right"):(s=d.basece.controller.options.grouped),dt=R.options.stacked,_t=[],zt=this._cachedMeta.controller.getParsed(E),jt=zt&&zt[R.axis],te=ce=>{const Ie=ce._parsed.find(fr=>fr[R.axis]===jt),Je=Ie&&Ie[ce.vScale.axis];if(Nh(Je)||isNaN(Je))return!0};for(const ce of Y)if(!(E!==void 0&&te(ce))&&((dt===!1||_t.indexOf(ce.stack)===-1||dt===void 0&&ce.stack===void 0)&&_t.push(ce.stack),ce.index===s))break;return _t.length||_t.push(void 0),_t}_getStackCount(s){return this._getStacks(void 0,s).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const s=this.chart.scales,E=this.chart.options.indexAxis;return Object.keys(s).filter(R=>s[R].axis===E).shift()}_getAxis(){const s={},E=this.getFirstScaleIdForIndexAxis();for(const R of this.chart.data.datasets)s[cc(this.chart.options.indexAxis==="x"?R.xAxisID:R.yAxisID,E)]=!0;return Object.keys(s)}_getStackIndex(s,E,R){const Y=this._getStacks(s,R),dt=E!==void 0?Y.indexOf(E):-1;return dt===-1?Y.length-1:dt}_getRuler(){const s=this.options,E=this._cachedMeta,R=E.iScale,Y=[];let dt,_t;for(dt=0,_t=E.data.length;dt<_t;++dt)Y.push(R.getPixelForValue(this.getParsed(dt)[R.axis],dt));const zt=s.barThickness;return{min:zt||Hut(E),pixels:Y,start:R._startPixel,end:R._endPixel,stackCount:this._getStackCount(),scale:R,grouped:s.grouped,ratio:zt?1:s.categoryPercentage*s.barPercentage}}_calculateBarValuePixels(s){const{_cachedMeta:{vScale:E,_stacked:R,index:Y},options:{base:dt,minBarLength:_t}}=this,zt=dt||0,jt=this.getParsed(s),te=jt._custom,ce=Z8(te);let Ie=jt[E.axis],Je=0,fr=R?this.applyStack(E,jt,R):Ie,Ar,kr;fr!==Ie&&(Je=fr-Ie,fr=Ie),ce&&(Ie=te.barStart,fr=te.barEnd-te.barStart,Ie!==0&&gg(Ie)!==gg(te.barEnd)&&(Je=0),Je+=Ie);const Vr=!Nh(dt)&&!ce?dt:Je;let fn=E.getPixelForValue(Vr);if(this.chart.getDataVisibility(s)?Ar=E.getPixelForValue(Je+fr):Ar=fn,kr=Ar-fn,Math.abs(kr)<_t){kr=Zut(kr,E,zt)*_t,Ie===zt&&(fn-=kr/2);const Dt=E.getPixelForDecimal(0),cn=E.getPixelForDecimal(1),ti=Math.min(Dt,cn),Dn=Math.max(Dt,cn);fn=Math.max(Math.min(fn,Dn),ti),Ar=fn+kr,R&&!ce&&(jt._stacks[E.axis]._visualValues[Y]=E.getValueForPixel(Ar)-E.getValueForPixel(fn))}if(fn===E.getPixelForValue(zt)){const Dt=gg(kr)*E.getLineWidthForValue(zt)/2;fn+=Dt,kr-=Dt}return{size:kr,base:fn,head:Ar,center:Ar+kr/2}}_calculateBarIndexPixels(s,E){const R=E.scale,Y=this.options,dt=Y.skipNull,_t=cc(Y.maxBarThickness,1/0);let zt,jt;const te=this._getAxisCount();if(E.grouped){const ce=dt?this._getStackCount(s):E.stackCount,Ie=Y.barThickness==="flex"?qut(s,E,Y,ce*te):Wut(s,E,Y,ce*te),Je=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,fr=this._getAxis().indexOf(cc(Je,this.getFirstScaleIdForIndexAxis())),Ar=this._getStackIndex(this.index,this._cachedMeta.stack,dt?s:void 0)+fr;zt=Ie.start+Ie.chunk*Ar+Ie.chunk/2,jt=Math.min(_t,Ie.chunk*Ie.ratio)}else zt=R.getPixelForValue(this.getParsed(s)[R.axis],s),jt=Math.min(_t,E.min*E.ratio);return{base:zt-jt/2,head:zt+jt/2,center:zt,size:jt}}draw(){const s=this._cachedMeta,E=s.vScale,R=s.data,Y=R.length;let dt=0;for(;dtY2(cn,zt,jt,!0)?1:Math.max(ti,ti*E,Dn,Dn*E),Ar=(cn,ti,Dn)=>Y2(cn,zt,jt,!0)?-1:Math.min(ti,ti*E,Dn,Dn*E),kr=fr(0,te,Ie),Vr=fr(ip,ce,Je),fn=Ar(Qh,te,Ie),Dt=Ar(Qh+ip,ce,Je);R=(kr-fn)/2,Y=(Vr-Dt)/2,dt=-(kr+fn)/2,_t=-(Vr+Dt)/2}return{ratioX:R,ratioY:Y,offsetX:dt,offsetY:_t}}class zD extends Q4{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:s=>s!=="spacing",_indexable:s=>s!=="spacing"&&!s.startsWith("borderDash")&&!s.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){const E=s.data,{labels:{pointStyle:R,textAlign:Y,color:dt,useBorderRadius:_t,borderRadius:zt}}=s.legend.options;return E.labels.length&&E.datasets.length?E.labels.map((jt,te)=>{const Ie=s.getDatasetMeta(0).controller.getStyle(te);return{text:jt,fillStyle:Ie.backgroundColor,fontColor:dt,hidden:!s.getDataVisibility(te),lineDash:Ie.borderDash,lineDashOffset:Ie.borderDashOffset,lineJoin:Ie.borderJoinStyle,lineWidth:Ie.borderWidth,strokeStyle:Ie.borderColor,textAlign:Y,pointStyle:R,borderRadius:_t&&(zt||Ie.borderRadius),index:te}}):[]}},onClick(s,E,R){R.chart.toggleDataVisibility(E.index),R.chart.update()}}}};constructor(s,E){super(s,E),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(s,E){const R=this.getDataset().data,Y=this._cachedMeta;if(this._parsing===!1)Y._parsed=R;else{let dt=jt=>+R[jt];if(Sc(R[s])){const{key:jt="value"}=this._parsing;dt=te=>+Py(R[te],jt)}let _t,zt;for(_t=s,zt=s+E;_t0&&!isNaN(s)?sd*(Math.abs(s)/E):0}getLabelAndValue(s){const E=this._cachedMeta,R=this.chart,Y=R.data.labels||[],dt=kM(E._parsed[s],R.options.locale);return{label:Y[s]||"",value:dt}}getMaxBorderWidth(s){let E=0;const R=this.chart;let Y,dt,_t,zt,jt;if(!s){for(Y=0,dt=R.data.datasets.length;Y0&&this.getParsed(E-1);for(let Dn=0;Dn=Dt){Vi.skip=!0;continue}const Nn=this.getParsed(Dn),Wr=Nh(Nn[fr]),Bi=Vi[Je]=_t.getPixelForValue(Nn[Je],Dn),Ri=Vi[fr]=dt||Wr?zt.getBasePixel():zt.getPixelForValue(jt?this.applyStack(zt,Nn,jt):Nn[fr],Dn);Vi.skip=isNaN(Bi)||isNaN(Ri)||Wr,Vi.stop=Dn>0&&Math.abs(Nn[Je]-ti[Je])>Vr,kr&&(Vi.parsed=Nn,Vi.raw=te.data[Dn]),Ie&&(Vi.options=ce||this.resolveDataElementOptions(Dn,ii.active?"active":Y)),fn||this.updateElement(ii,Dn,Vi,Y),ti=Nn}}getMaxOverflow(){const s=this._cachedMeta,E=s.dataset,R=E.options&&E.options.borderWidth||0,Y=s.data||[];if(!Y.length)return R;const dt=Y[0].size(this.resolveDataElementOptions(0)),_t=Y[Y.length-1].size(this.resolveDataElementOptions(Y.length-1));return Math.max(R,dt,_t)/2}draw(){const s=this._cachedMeta;s.dataset.updateControlPoints(this.chart.chartArea,s.iScale.axis),super.draw()}}function py(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class LM{static override(s){Object.assign(LM.prototype,s)}options;constructor(s){this.options=s||{}}init(){}formats(){return py()}parse(){return py()}format(){return py()}add(){return py()}diff(){return py()}startOf(){return py()}endOf(){return py()}}var DD={_date:LM};function Qut(d,s,E,R){const{controller:Y,data:dt,_sorted:_t}=d,zt=Y._cachedMeta.iScale,jt=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null;if(zt&&s===zt.axis&&s!=="r"&&_t&&dt.length){const te=zt._reversePixels?blt:ky;if(R){if(Y._sharedOptions){const ce=dt[0],Ie=typeof ce.getRange=="function"&&ce.getRange(s);if(Ie){const Je=te(dt,s,E-Ie),fr=te(dt,s,E+Ie);return{lo:Je.lo,hi:fr.hi}}}}else{const ce=te(dt,s,E);if(jt){const{vScale:Ie}=Y._cachedMeta,{_parsed:Je}=d,fr=Je.slice(0,ce.lo+1).reverse().findIndex(kr=>!Nh(kr[Ie.axis]));ce.lo-=Math.max(0,fr);const Ar=Je.slice(ce.hi).findIndex(kr=>!Nh(kr[Ie.axis]));ce.hi+=Math.max(0,Ar)}return ce}}return{lo:0,hi:dt.length-1}}function t6(d,s,E,R,Y){const dt=d.getSortedVisibleDatasetMetas(),_t=E[s];for(let zt=0,jt=dt.length;zt{jt[_t]&&jt[_t](s[E],Y)&&(dt.push({element:jt,datasetIndex:te,index:ce}),zt=zt||jt.inRange(s.x,s.y,Y))}),R&&!zt?[]:dt}var nct={modes:{index(d,s,E,R){const Y=gy(s,d),dt=E.axis||"x",_t=E.includeInvisible||!1,zt=E.intersect?G8(d,Y,dt,R,_t):Y8(d,Y,dt,!1,R,_t),jt=[];return zt.length?(d.getSortedVisibleDatasetMetas().forEach(te=>{const ce=zt[0].index,Ie=te.data[ce];Ie&&!Ie.skip&&jt.push({element:Ie,datasetIndex:te.index,index:ce})}),jt):[]},dataset(d,s,E,R){const Y=gy(s,d),dt=E.axis||"xy",_t=E.includeInvisible||!1;let zt=E.intersect?G8(d,Y,dt,R,_t):Y8(d,Y,dt,!1,R,_t);if(zt.length>0){const jt=zt[0].datasetIndex,te=d.getDatasetMeta(jt).data;zt=[];for(let ce=0;ceE.pos===s)}function NP(d,s){return d.filter(E=>FD.indexOf(E.pos)===-1&&E.box.axis===s)}function c2(d,s){return d.sort((E,R)=>{const Y=s?R:E,dt=s?E:R;return Y.weight===dt.weight?Y.index-dt.index:Y.weight-dt.weight})}function ict(d){const s=[];let E,R,Y,dt,_t,zt;for(E=0,R=(d||[]).length;Ete.box.fullSize),!0),R=c2(u2(s,"left"),!0),Y=c2(u2(s,"right")),dt=c2(u2(s,"top"),!0),_t=c2(u2(s,"bottom")),zt=NP(s,"x"),jt=NP(s,"y");return{fullSize:E,leftAndTop:R.concat(dt),rightAndBottom:Y.concat(jt).concat(_t).concat(zt),chartArea:u2(s,"chartArea"),vertical:R.concat(Y).concat(jt),horizontal:dt.concat(_t).concat(zt)}}function jP(d,s,E,R){return Math.max(d[E],s[E])+Math.max(d[R],s[R])}function BD(d,s){d.top=Math.max(d.top,s.top),d.left=Math.max(d.left,s.left),d.bottom=Math.max(d.bottom,s.bottom),d.right=Math.max(d.right,s.right)}function lct(d,s,E,R){const{pos:Y,box:dt}=E,_t=d.maxPadding;if(!Sc(Y)){E.size&&(d[Y]-=E.size);const Ie=R[E.stack]||{size:0,count:1};Ie.size=Math.max(Ie.size,E.horizontal?dt.height:dt.width),E.size=Ie.size/Ie.count,d[Y]+=E.size}dt.getPadding&&BD(_t,dt.getPadding());const zt=Math.max(0,s.outerWidth-jP(_t,d,"left","right")),jt=Math.max(0,s.outerHeight-jP(_t,d,"top","bottom")),te=zt!==d.w,ce=jt!==d.h;return d.w=zt,d.h=jt,E.horizontal?{same:te,other:ce}:{same:ce,other:te}}function uct(d){const s=d.maxPadding;function E(R){const Y=Math.max(s[R]-d[R],0);return d[R]+=Y,Y}d.y+=E("top"),d.x+=E("left"),E("right"),E("bottom")}function cct(d,s){const E=s.maxPadding;function R(Y){const dt={left:0,top:0,right:0,bottom:0};return Y.forEach(_t=>{dt[_t]=Math.max(s[_t],E[_t])}),dt}return R(d?["left","right"]:["top","bottom"])}function x2(d,s,E,R){const Y=[];let dt,_t,zt,jt,te,ce;for(dt=0,_t=d.length,te=0;dt<_t;++dt){zt=d[dt],jt=zt.box,jt.update(zt.width||s.w,zt.height||s.h,cct(zt.horizontal,s));const{same:Ie,other:Je}=lct(s,E,zt,R);te|=Ie&&Y.length,ce=ce||Je,jt.fullSize||Y.push(zt)}return te&&x2(Y,s,E,R)||ce}function V5(d,s,E,R,Y){d.top=E,d.left=s,d.right=s+R,d.bottom=E+Y,d.width=R,d.height=Y}function UP(d,s,E,R){const Y=E.padding;let{x:dt,y:_t}=s;for(const zt of d){const jt=zt.box,te=R[zt.stack]||{placed:0,weight:1},ce=zt.stackWeight/te.weight||1;if(zt.horizontal){const Ie=s.w*ce,Je=te.size||jt.height;Z2(te.start)&&(_t=te.start),jt.fullSize?V5(jt,Y.left,_t,E.outerWidth-Y.right-Y.left,Je):V5(jt,s.left+te.placed,_t,Ie,Je),te.start=_t,te.placed+=Ie,_t=jt.bottom}else{const Ie=s.h*ce,Je=te.size||jt.width;Z2(te.start)&&(dt=te.start),jt.fullSize?V5(jt,dt,Y.top,Je,E.outerHeight-Y.bottom-Y.top):V5(jt,dt,s.top+te.placed,Je,Ie),te.start=dt,te.placed+=Ie,dt=jt.right}}s.x=dt,s.y=_t}var sm={addBox(d,s){d.boxes||(d.boxes=[]),s.fullSize=s.fullSize||!1,s.position=s.position||"top",s.weight=s.weight||0,s._layers=s._layers||function(){return[{z:0,draw(E){s.draw(E)}}]},d.boxes.push(s)},removeBox(d,s){const E=d.boxes?d.boxes.indexOf(s):-1;E!==-1&&d.boxes.splice(E,1)},configure(d,s,E){s.fullSize=E.fullSize,s.position=E.position,s.weight=E.weight},update(d,s,E,R){if(!d)return;const Y=fm(d.options.layout.padding),dt=Math.max(s-Y.width,0),_t=Math.max(E-Y.height,0),zt=sct(d.boxes),jt=zt.vertical,te=zt.horizontal;Jh(d.boxes,kr=>{typeof kr.beforeLayout=="function"&&kr.beforeLayout()});const ce=jt.reduce((kr,Vr)=>Vr.box.options&&Vr.box.options.display===!1?kr:kr+1,0)||1,Ie=Object.freeze({outerWidth:s,outerHeight:E,padding:Y,availableWidth:dt,availableHeight:_t,vBoxMaxWidth:dt/2/ce,hBoxMaxHeight:_t/2}),Je=Object.assign({},Y);BD(Je,fm(R));const fr=Object.assign({maxPadding:Je,w:dt,h:_t,x:Y.left,y:Y.top},Y),Ar=oct(jt.concat(te),Ie);x2(zt.fullSize,fr,Ie,Ar),x2(jt,fr,Ie,Ar),x2(te,fr,Ie,Ar)&&x2(jt,fr,Ie,Ar),uct(fr),UP(zt.leftAndTop,fr,Ie,Ar),fr.x+=fr.w,fr.y+=fr.h,UP(zt.rightAndBottom,fr,Ie,Ar),d.chartArea={left:fr.left,top:fr.top,right:fr.left+fr.w,bottom:fr.top+fr.h,height:fr.h,width:fr.w},Jh(zt.chartArea,kr=>{const Vr=kr.box;Object.assign(Vr,d.chartArea),Vr.update(fr.w,fr.h,{left:0,top:0,right:0,bottom:0})})}};class RD{acquireContext(s,E){}releaseContext(s){return!1}addEventListener(s,E,R){}removeEventListener(s,E,R){}getDevicePixelRatio(){return 1}getMaximumSize(s,E,R,Y){return E=Math.max(0,E||s.width),R=R||s.height,{width:E,height:Math.max(0,Y?Math.floor(E/Y):R)}}isAttached(s){return!0}updateConfig(s){}}class hct extends RD{acquireContext(s){return s&&s.getContext&&s.getContext("2d")||null}updateConfig(s){s.options.animation=!1}}const i4="$chartjs",fct={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},VP=d=>d===null||d==="";function dct(d,s){const E=d.style,R=d.getAttribute("height"),Y=d.getAttribute("width");if(d[i4]={initial:{height:R,width:Y,style:{display:E.display,height:E.height,width:E.width}}},E.display=E.display||"block",E.boxSizing=E.boxSizing||"border-box",VP(Y)){const dt=AP(d,"width");dt!==void 0&&(d.width=dt)}if(VP(R))if(d.style.height==="")d.height=d.width/(s||2);else{const dt=AP(d,"height");dt!==void 0&&(d.height=dt)}return d}const ND=gut?{passive:!0}:!1;function pct(d,s,E){d&&d.addEventListener(s,E,ND)}function mct(d,s,E){d&&d.canvas&&d.canvas.removeEventListener(s,E,ND)}function gct(d,s){const E=fct[d.type]||d.type,{x:R,y:Y}=gy(d,s);return{type:E,chart:s,native:d,x:R!==void 0?R:null,y:Y!==void 0?Y:null}}function T4(d,s){for(const E of d)if(E===s||E.contains(s))return!0}function vct(d,s,E){const R=d.canvas,Y=new MutationObserver(dt=>{let _t=!1;for(const zt of dt)_t=_t||T4(zt.addedNodes,R),_t=_t&&!T4(zt.removedNodes,R);_t&&E()});return Y.observe(document,{childList:!0,subtree:!0}),Y}function yct(d,s,E){const R=d.canvas,Y=new MutationObserver(dt=>{let _t=!1;for(const zt of dt)_t=_t||T4(zt.removedNodes,R),_t=_t&&!T4(zt.addedNodes,R);_t&&E()});return Y.observe(document,{childList:!0,subtree:!0}),Y}const J2=new Map;let HP=0;function jD(){const d=window.devicePixelRatio;d!==HP&&(HP=d,J2.forEach((s,E)=>{E.currentDevicePixelRatio!==d&&s()}))}function xct(d,s){J2.size||window.addEventListener("resize",jD),J2.set(d,s)}function _ct(d){J2.delete(d),J2.size||window.removeEventListener("resize",jD)}function bct(d,s,E){const R=d.canvas,Y=R&&CM(R);if(!Y)return;const dt=pD((zt,jt)=>{const te=Y.clientWidth;E(zt,jt),te{const jt=zt[0],te=jt.contentRect.width,ce=jt.contentRect.height;te===0&&ce===0||dt(te,ce)});return _t.observe(Y),xct(d,dt),_t}function K8(d,s,E){E&&E.disconnect(),s==="resize"&&_ct(d)}function wct(d,s,E){const R=d.canvas,Y=pD(dt=>{d.ctx!==null&&E(gct(dt,d))},d);return pct(R,s,Y),Y}class kct extends RD{acquireContext(s,E){const R=s&&s.getContext&&s.getContext("2d");return R&&R.canvas===s?(dct(s,E),R):null}releaseContext(s){const E=s.canvas;if(!E[i4])return!1;const R=E[i4].initial;["height","width"].forEach(dt=>{const _t=R[dt];Nh(_t)?E.removeAttribute(dt):E.setAttribute(dt,_t)});const Y=R.style||{};return Object.keys(Y).forEach(dt=>{E.style[dt]=Y[dt]}),E.width=E.width,delete E[i4],!0}addEventListener(s,E,R){this.removeEventListener(s,E);const Y=s.$proxies||(s.$proxies={}),_t={attach:vct,detach:yct,resize:bct}[E]||wct;Y[E]=_t(s,E,R)}removeEventListener(s,E){const R=s.$proxies||(s.$proxies={}),Y=R[E];if(!Y)return;({attach:K8,detach:K8,resize:K8}[E]||mct)(s,E,Y),R[E]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(s,E,R,Y){return mut(s,E,R,Y)}isAttached(s){const E=s&&CM(s);return!!(E&&E.isConnected)}}function Tct(d){return!EM()||typeof OffscreenCanvas<"u"&&d instanceof OffscreenCanvas?hct:kct}let cv=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(s){const{x:E,y:R}=this.getProps(["x","y"],s);return{x:E,y:R}}hasValue(){return G2(this.x)&&G2(this.y)}getProps(s,E){const R=this.$animations;if(!E||!R)return this;const Y={};return s.forEach(dt=>{Y[dt]=R[dt]&&R[dt].active()?R[dt]._to:this[dt]}),Y}};function Act(d,s){const E=d.options.ticks,R=Mct(d),Y=Math.min(E.maxTicksLimit||R,R),dt=E.major.enabled?Ect(s):[],_t=dt.length,zt=dt[0],jt=dt[_t-1],te=[];if(_t>Y)return Cct(s,te,dt,_t/Y),te;const ce=Sct(dt,s,Y);if(_t>0){let Ie,Je;const fr=_t>1?Math.round((jt-zt)/(_t-1)):null;for(H5(s,te,ce,Nh(fr)?0:zt-fr,zt),Ie=0,Je=_t-1;IeY)return jt}return Math.max(Y,1)}function Ect(d){const s=[];let E,R;for(E=0,R=d.length;Ed==="left"?"right":d==="right"?"left":d,WP=(d,s,E)=>s==="top"||s==="left"?d[s]+E:d[s]-E,qP=(d,s)=>Math.min(s||d,d);function $P(d,s){const E=[],R=d.length/s,Y=d.length;let dt=0;for(;dt_t+zt)))return jt}function zct(d,s){Jh(d,E=>{const R=E.gc,Y=R.length/2;let dt;if(Y>s){for(dt=0;dtR?R:E,R=Y&&E>R?E:R,{min:og(E,og(R,E)),max:og(R,og(E,R))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const s=this.chart.data;return this.options.labels||(this.isHorizontal()?s.xLabels:s.yLabels)||s.labels||[]}getLabelItems(s=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(s))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Df(this.options.beforeUpdate,[this])}update(s,E,R){const{beginAtZero:Y,grace:dt,ticks:_t}=this.options,zt=_t.sampleSize;this.beforeUpdate(),this.maxWidth=s,this.maxHeight=E,this._margins=R=Object.assign({left:0,right:0,top:0,bottom:0},R),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+R.left+R.right:this.height+R.top+R.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Zlt(this,dt,Y),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const jt=zt=dt||R<=1||!this.isHorizontal()){this.labelRotation=Y;return}const ce=this._getLabelSizes(),Ie=ce.widest.width,Je=ce.highest.height,fr=Jp(this.chart.width-Ie,0,this.maxWidth);zt=s.offset?this.maxWidth/R:fr/(R-1),Ie+6>zt&&(zt=fr/(R-(s.offset?.5:1)),jt=this.maxHeight-h2(s.grid)-E.padding-ZP(s.title,this.chart.options.font),te=Math.sqrt(Ie*Ie+Je*Je),_t=ylt(Math.min(Math.asin(Jp((ce.highest.height+6)/zt,-1,1)),Math.asin(Jp(jt/te,-1,1))-Math.asin(Jp(Je/te,-1,1)))),_t=Math.max(Y,Math.min(dt,_t))),this.labelRotation=_t}afterCalculateLabelRotation(){Df(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Df(this.options.beforeFit,[this])}fit(){const s={width:0,height:0},{chart:E,options:{ticks:R,title:Y,grid:dt}}=this,_t=this._isVisible(),zt=this.isHorizontal();if(_t){const jt=ZP(Y,E.options.font);if(zt?(s.width=this.maxWidth,s.height=h2(dt)+jt):(s.height=this.maxHeight,s.width=h2(dt)+jt),R.display&&this.ticks.length){const{first:te,last:ce,widest:Ie,highest:Je}=this._getLabelSizes(),fr=R.padding*2,Ar=iv(this.labelRotation),kr=Math.cos(Ar),Vr=Math.sin(Ar);if(zt){const fn=R.mirror?0:Vr*Ie.width+kr*Je.height;s.height=Math.min(this.maxHeight,s.height+fn+fr)}else{const fn=R.mirror?0:kr*Ie.width+Vr*Je.height;s.width=Math.min(this.maxWidth,s.width+fn+fr)}this._calculatePadding(te,ce,Vr,kr)}}this._handleMargins(),zt?(this.width=this._length=E.width-this._margins.left-this._margins.right,this.height=s.height):(this.width=s.width,this.height=this._length=E.height-this._margins.top-this._margins.bottom)}_calculatePadding(s,E,R,Y){const{ticks:{align:dt,padding:_t},position:zt}=this.options,jt=this.labelRotation!==0,te=zt!=="top"&&this.axis==="x";if(this.isHorizontal()){const ce=this.getPixelForTick(0)-this.left,Ie=this.right-this.getPixelForTick(this.ticks.length-1);let Je=0,fr=0;jt?te?(Je=Y*s.width,fr=R*E.height):(Je=R*s.height,fr=Y*E.width):dt==="start"?fr=E.width:dt==="end"?Je=s.width:dt!=="inner"&&(Je=s.width/2,fr=E.width/2),this.paddingLeft=Math.max((Je-ce+_t)*this.width/(this.width-ce),0),this.paddingRight=Math.max((fr-Ie+_t)*this.width/(this.width-Ie),0)}else{let ce=E.height/2,Ie=s.height/2;dt==="start"?(ce=0,Ie=s.height):dt==="end"&&(ce=E.height,Ie=0),this.paddingTop=ce+_t,this.paddingBottom=Ie+_t}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Df(this.options.afterFit,[this])}isHorizontal(){const{axis:s,position:E}=this.options;return E==="top"||E==="bottom"||s==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(s){this.beforeTickToLabelConversion(),this.generateTickLabels(s);let E,R;for(E=0,R=s.length;E({width:_t[Wr]||0,height:zt[Wr]||0});return{first:Nn(0),last:Nn(E-1),widest:Nn(ii),highest:Nn(Vi),widths:_t,heights:zt}}getLabelForValue(s){return s}getPixelForValue(s,E){return NaN}getValueForPixel(s){}getPixelForTick(s){const E=this.ticks;return s<0||s>E.length-1?null:this.getPixelForValue(E[s].value)}getPixelForDecimal(s){this._reversePixels&&(s=1-s);const E=this._startPixel+s*this._length;return _lt(this._alignToPixels?dy(this.chart,E,0):E)}getDecimalForPixel(s){const E=(s-this._startPixel)/this._length;return this._reversePixels?1-E:E}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:s,max:E}=this;return s<0&&E<0?E:s>0&&E>0?s:0}getContext(s){const E=this.ticks||[];if(s>=0&&szt*Y?zt/R:jt/Y:jt*Y0}_computeGridLineItems(s){const E=this.axis,R=this.chart,Y=this.options,{grid:dt,position:_t,border:zt}=Y,jt=dt.offset,te=this.isHorizontal(),Ie=this.ticks.length+(jt?1:0),Je=h2(dt),fr=[],Ar=zt.setContext(this.getContext()),kr=Ar.display?Ar.width:0,Vr=kr/2,fn=function(Ti){return dy(R,Ti,kr)};let Dt,cn,ti,Dn,ii,Vi,Nn,Wr,Bi,Ri,Li,$n;if(_t==="top")Dt=fn(this.bottom),Vi=this.bottom-Je,Wr=Dt-Vr,Ri=fn(s.top)+Vr,$n=s.bottom;else if(_t==="bottom")Dt=fn(this.top),Ri=s.top,$n=fn(s.bottom)-Vr,Vi=Dt+Vr,Wr=this.top+Je;else if(_t==="left")Dt=fn(this.right),ii=this.right-Je,Nn=Dt-Vr,Bi=fn(s.left)+Vr,Li=s.right;else if(_t==="right")Dt=fn(this.left),Bi=s.left,Li=fn(s.right)-Vr,ii=Dt+Vr,Nn=this.left+Je;else if(E==="x"){if(_t==="center")Dt=fn((s.top+s.bottom)/2+.5);else if(Sc(_t)){const Ti=Object.keys(_t)[0],Qn=_t[Ti];Dt=fn(this.chart.scales[Ti].getPixelForValue(Qn))}Ri=s.top,$n=s.bottom,Vi=Dt+Vr,Wr=Vi+Je}else if(E==="y"){if(_t==="center")Dt=fn((s.left+s.right)/2);else if(Sc(_t)){const Ti=Object.keys(_t)[0],Qn=_t[Ti];Dt=fn(this.chart.scales[Ti].getPixelForValue(Qn))}ii=Dt-Vr,Nn=ii-Je,Bi=s.left,Li=s.right}const Hn=cc(Y.ticks.maxTicksLimit,Ie),sa=Math.max(1,Math.ceil(Ie/Hn));for(cn=0;cn0&&(Ia-=ko/2);break}mo={left:Ia,top:ro,width:ko+Ts.width,height:xl+Ts.height,color:sa.backdropColor}}Vr.push({label:ti,font:Wr,textOffset:Li,options:{rotation:kr,color:Qn,strokeColor:la,strokeWidth:Eo,textAlign:no,textBaseline:$n,translation:[Dn,ii],backdrop:mo}})}return Vr}_getXAxisLabelAlignment(){const{position:s,ticks:E}=this.options;if(-iv(this.labelRotation))return s==="top"?"left":"right";let Y="center";return E.align==="start"?Y="left":E.align==="end"?Y="right":E.align==="inner"&&(Y="inner"),Y}_getYAxisLabelAlignment(s){const{position:E,ticks:{crossAlign:R,mirror:Y,padding:dt}}=this.options,_t=this._getLabelSizes(),zt=s+dt,jt=_t.widest.width;let te,ce;return E==="left"?Y?(ce=this.right+dt,R==="near"?te="left":R==="center"?(te="center",ce+=jt/2):(te="right",ce+=jt)):(ce=this.right-zt,R==="near"?te="right":R==="center"?(te="center",ce-=jt/2):(te="left",ce=this.left)):E==="right"?Y?(ce=this.left+dt,R==="near"?te="right":R==="center"?(te="center",ce-=jt/2):(te="left",ce-=jt)):(ce=this.left+zt,R==="near"?te="left":R==="center"?(te="center",ce+=jt/2):(te="right",ce=this.right)):te="right",{textAlign:te,x:ce}}_computeLabelArea(){if(this.options.ticks.mirror)return;const s=this.chart,E=this.options.position;if(E==="left"||E==="right")return{top:0,left:this.left,bottom:s.height,right:this.right};if(E==="top"||E==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:s.width}}drawBackground(){const{ctx:s,options:{backgroundColor:E},left:R,top:Y,width:dt,height:_t}=this;E&&(s.save(),s.fillStyle=E,s.fillRect(R,Y,dt,_t),s.restore())}getLineWidthForValue(s){const E=this.options.grid;if(!this._isVisible()||!E.display)return 0;const Y=this.ticks.findIndex(dt=>dt.value===s);return Y>=0?E.setContext(this.getContext(Y)).lineWidth:0}drawGrid(s){const E=this.options.grid,R=this.ctx,Y=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(s));let dt,_t;const zt=(jt,te,ce)=>{!ce.width||!ce.color||(R.save(),R.lineWidth=ce.width,R.strokeStyle=ce.color,R.setLineDash(ce.borderDash||[]),R.lineDashOffset=ce.borderDashOffset,R.beginPath(),R.moveTo(jt.x,jt.y),R.lineTo(te.x,te.y),R.stroke(),R.restore())};if(E.display)for(dt=0,_t=Y.length;dt<_t;++dt){const jt=Y[dt];E.drawOnChartArea&&zt({x:jt.x1,y:jt.y1},{x:jt.x2,y:jt.y2},jt),E.drawTicks&&zt({x:jt.tx1,y:jt.ty1},{x:jt.tx2,y:jt.ty2},{color:jt.tickColor,width:jt.tickWidth,borderDash:jt.tickBorderDash,borderDashOffset:jt.tickBorderDashOffset})}}drawBorder(){const{chart:s,ctx:E,options:{border:R,grid:Y}}=this,dt=R.setContext(this.getContext()),_t=R.display?dt.width:0;if(!_t)return;const zt=Y.setContext(this.getContext(0)).lineWidth,jt=this._borderValue;let te,ce,Ie,Je;this.isHorizontal()?(te=dy(s,this.left,_t)-_t/2,ce=dy(s,this.right,zt)+zt/2,Ie=Je=jt):(Ie=dy(s,this.top,_t)-_t/2,Je=dy(s,this.bottom,zt)+zt/2,te=ce=jt),E.save(),E.lineWidth=dt.width,E.strokeStyle=dt.color,E.beginPath(),E.moveTo(te,Ie),E.lineTo(ce,Je),E.stroke(),E.restore()}drawLabels(s){if(!this.options.ticks.display)return;const R=this.ctx,Y=this._computeLabelArea();Y&&K4(R,Y);const dt=this.getLabelItems(s);for(const _t of dt){const zt=_t.options,jt=_t.font,te=_t.label,ce=_t.textOffset;X2(R,te,0,ce,jt,zt)}Y&&X4(R)}drawTitle(){const{ctx:s,options:{position:E,title:R,reverse:Y}}=this;if(!R.display)return;const dt=Qp(R.font),_t=fm(R.padding),zt=R.align;let jt=dt.lineHeight/2;E==="bottom"||E==="center"||Sc(E)?(jt+=_t.bottom,Yd(R.text)&&(jt+=dt.lineHeight*(R.text.length-1))):jt+=_t.top;const{titleX:te,titleY:ce,maxWidth:Ie,rotation:Je}=Bct(this,jt,E,zt);X2(s,R.text,0,0,dt,{color:R.color,maxWidth:Ie,rotation:Je,textAlign:Fct(zt,E,Y),textBaseline:"middle",translation:[te,ce]})}draw(s){this._isVisible()&&(this.drawBackground(),this.drawGrid(s),this.drawBorder(),this.drawTitle(),this.drawLabels(s))}_layers(){const s=this.options,E=s.ticks&&s.ticks.z||0,R=cc(s.grid&&s.grid.z,-1),Y=cc(s.border&&s.border.z,0);return!this._isVisible()||this.draw!==A_.prototype.draw?[{z:E,draw:dt=>{this.draw(dt)}}]:[{z:R,draw:dt=>{this.drawBackground(),this.drawGrid(dt),this.drawTitle()}},{z:Y,draw:()=>{this.drawBorder()}},{z:E,draw:dt=>{this.drawLabels(dt)}}]}getMatchingVisibleMetas(s){const E=this.chart.getSortedVisibleDatasetMetas(),R=this.axis+"AxisID",Y=[];let dt,_t;for(dt=0,_t=E.length;dt<_t;++dt){const zt=E[dt];zt[R]===this.id&&(!s||zt.type===s)&&Y.push(zt)}return Y}_resolveTickFontOptions(s){const E=this.options.ticks.setContext(this.getContext(s));return Qp(E.font)}_maxDigits(){const s=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/s}}class W5{constructor(s,E,R){this.type=s,this.scope=E,this.override=R,this.items=Object.create(null)}isForType(s){return Object.prototype.isPrototypeOf.call(this.type.prototype,s.prototype)}register(s){const E=Object.getPrototypeOf(s);let R;jct(E)&&(R=this.register(E));const Y=this.items,dt=s.id,_t=this.scope+"."+dt;if(!dt)throw new Error("class does not have id: "+s);return dt in Y||(Y[dt]=s,Rct(s,_t,R),this.override&&Bd.override(s.id,s.overrides)),_t}get(s){return this.items[s]}unregister(s){const E=this.items,R=s.id,Y=this.scope;R in E&&delete E[R],Y&&R in Bd[Y]&&(delete Bd[Y][R],this.override&&delete Iy[R])}}function Rct(d,s,E){const R=$2(Object.create(null),[E?Bd.get(E):{},Bd.get(s),d.defaults]);Bd.set(s,R),d.defaultRoutes&&Nct(s,d.defaultRoutes),d.descriptors&&Bd.describe(s,d.descriptors)}function Nct(d,s){Object.keys(s).forEach(E=>{const R=E.split("."),Y=R.pop(),dt=[d].concat(R).join("."),_t=s[E].split("."),zt=_t.pop(),jt=_t.join(".");Bd.route(dt,Y,jt,zt)})}function jct(d){return"id"in d&&"defaults"in d}class Uct{constructor(){this.controllers=new W5(Q4,"datasets",!0),this.elements=new W5(cv,"elements"),this.plugins=new W5(Object,"plugins"),this.scales=new W5(A_,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...s){this._each("register",s)}remove(...s){this._each("unregister",s)}addControllers(...s){this._each("register",s,this.controllers)}addElements(...s){this._each("register",s,this.elements)}addPlugins(...s){this._each("register",s,this.plugins)}addScales(...s){this._each("register",s,this.scales)}getController(s){return this._get(s,this.controllers,"controller")}getElement(s){return this._get(s,this.elements,"element")}getPlugin(s){return this._get(s,this.plugins,"plugin")}getScale(s){return this._get(s,this.scales,"scale")}removeControllers(...s){this._each("unregister",s,this.controllers)}removeElements(...s){this._each("unregister",s,this.elements)}removePlugins(...s){this._each("unregister",s,this.plugins)}removeScales(...s){this._each("unregister",s,this.scales)}_each(s,E,R){[...E].forEach(Y=>{const dt=R||this._getRegistryForType(Y);R||dt.isForType(Y)||dt===this.plugins&&Y.id?this._exec(s,dt,Y):Jh(Y,_t=>{const zt=R||this._getRegistryForType(_t);this._exec(s,zt,_t)})})}_exec(s,E,R){const Y=xM(s);Df(R["before"+Y],[],R),E[s](R),Df(R["after"+Y],[],R)}_getRegistryForType(s){for(let E=0;Edt.filter(zt=>!_t.some(jt=>zt.plugin.id===jt.plugin.id));this._notify(Y(E,R),s,"stop"),this._notify(Y(R,E),s,"start")}}function Hct(d){const s={},E=[],R=Object.keys(cg.plugins.items);for(let dt=0;dt1&&GP(d[0].toLowerCase());if(R)return R}throw new Error(`Cannot determine type of '${d}' axis. Please provide 'axis' or 'position' option.`)}function YP(d,s,E){if(E[s+"AxisID"]===d)return{axis:s}}function Kct(d,s){if(s.data&&s.data.datasets){const E=s.data.datasets.filter(R=>R.xAxisID===d||R.yAxisID===d);if(E.length)return YP(d,"x",E[0])||YP(d,"y",E[0])}return{}}function Xct(d,s){const E=Iy[d.type]||{scales:{}},R=s.scales||{},Y=zA(d.type,s),dt=Object.create(null);return Object.keys(R).forEach(_t=>{const zt=R[_t];if(!Sc(zt))return console.error(`Invalid scale configuration for scale: ${_t}`);if(zt._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${_t}`);const jt=OA(_t,zt,Kct(_t,d),Bd.scales[zt.type]),te=Gct(jt,Y),ce=E.scales||{};dt[_t]=L2(Object.create(null),[{axis:jt},zt,ce[jt],ce[te]])}),d.data.datasets.forEach(_t=>{const zt=_t.type||d.type,jt=_t.indexAxis||zA(zt,s),ce=(Iy[zt]||{}).scales||{};Object.keys(ce).forEach(Ie=>{const Je=Zct(Ie,jt),fr=_t[Je+"AxisID"]||Je;dt[fr]=dt[fr]||Object.create(null),L2(dt[fr],[{axis:Je},R[fr],ce[Ie]])})}),Object.keys(dt).forEach(_t=>{const zt=dt[_t];L2(zt,[Bd.scales[zt.type],Bd.scale])}),dt}function UD(d){const s=d.options||(d.options={});s.plugins=cc(s.plugins,{}),s.scales=Xct(d,s)}function VD(d){return d=d||{},d.datasets=d.datasets||[],d.labels=d.labels||[],d}function Jct(d){return d=d||{},d.data=VD(d.data),UD(d),d}const KP=new Map,HD=new Set;function q5(d,s){let E=KP.get(d);return E||(E=s(),KP.set(d,E),HD.add(E)),E}const f2=(d,s,E)=>{const R=Py(s,E);R!==void 0&&d.add(R)};class Qct{constructor(s){this._config=Jct(s),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(s){this._config.type=s}get data(){return this._config.data}set data(s){this._config.data=VD(s)}get options(){return this._config.options}set options(s){this._config.options=s}get plugins(){return this._config.plugins}update(){const s=this._config;this.clearCache(),UD(s)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(s){return q5(s,()=>[[`datasets.${s}`,""]])}datasetAnimationScopeKeys(s,E){return q5(`${s}.transition.${E}`,()=>[[`datasets.${s}.transitions.${E}`,`transitions.${E}`],[`datasets.${s}`,""]])}datasetElementScopeKeys(s,E){return q5(`${s}-${E}`,()=>[[`datasets.${s}.elements.${E}`,`datasets.${s}`,`elements.${E}`,""]])}pluginScopeKeys(s){const E=s.id,R=this.type;return q5(`${R}-plugin-${E}`,()=>[[`plugins.${E}`,...s.additionalOptionScopes||[]]])}_cachedScopes(s,E){const R=this._scopeCache;let Y=R.get(s);return(!Y||E)&&(Y=new Map,R.set(s,Y)),Y}getOptionScopes(s,E,R){const{options:Y,type:dt}=this,_t=this._cachedScopes(s,R),zt=_t.get(E);if(zt)return zt;const jt=new Set;E.forEach(ce=>{s&&(jt.add(s),ce.forEach(Ie=>f2(jt,s,Ie))),ce.forEach(Ie=>f2(jt,Y,Ie)),ce.forEach(Ie=>f2(jt,Iy[dt]||{},Ie)),ce.forEach(Ie=>f2(jt,Bd,Ie)),ce.forEach(Ie=>f2(jt,PA,Ie))});const te=Array.from(jt);return te.length===0&&te.push(Object.create(null)),HD.has(E)&&_t.set(E,te),te}chartOptionScopes(){const{options:s,type:E}=this;return[s,Iy[E]||{},Bd.datasets[E]||{},{type:E},Bd,PA]}resolveNamedOptions(s,E,R,Y=[""]){const dt={$shared:!0},{resolver:_t,subPrefixes:zt}=XP(this._resolverCache,s,Y);let jt=_t;if(eht(_t,E)){dt.$shared=!1,R=b1(R)?R():R;const te=this.createResolver(s,R,zt);jt=__(_t,R,te)}for(const te of E)dt[te]=jt[te];return dt}createResolver(s,E,R=[""],Y){const{resolver:dt}=XP(this._resolverCache,s,R);return Sc(E)?__(dt,E,void 0,Y):dt}}function XP(d,s,E){let R=d.get(s);R||(R=new Map,d.set(s,R));const Y=E.join();let dt=R.get(Y);return dt||(dt={resolver:AM(s,E),subPrefixes:E.filter(zt=>!zt.toLowerCase().includes("hover"))},R.set(Y,dt)),dt}const tht=d=>Sc(d)&&Object.getOwnPropertyNames(d).some(s=>b1(d[s]));function eht(d,s){const{isScriptable:E,isIndexable:R}=yD(d);for(const Y of s){const dt=E(Y),_t=R(Y),zt=(_t||dt)&&d[Y];if(dt&&(b1(zt)||tht(zt))||_t&&Yd(zt))return!0}return!1}var rht="4.5.1";const nht=["top","bottom","left","right","chartArea"];function JP(d,s){return d==="top"||d==="bottom"||nht.indexOf(d)===-1&&s==="x"}function QP(d,s){return function(E,R){return E[d]===R[d]?E[s]-R[s]:E[d]-R[d]}}function tI(d){const s=d.chart,E=s.options.animation;s.notifyPlugins("afterRender"),Df(E&&E.onComplete,[d],s)}function iht(d){const s=d.chart,E=s.options.animation;Df(E&&E.onProgress,[d],s)}function WD(d){return EM()&&typeof d=="string"?d=document.getElementById(d):d&&d.length&&(d=d[0]),d&&d.canvas&&(d=d.canvas),d}const a4={},eI=d=>{const s=WD(d);return Object.values(a4).filter(E=>E.canvas===s).pop()};function aht(d,s,E){const R=Object.keys(d);for(const Y of R){const dt=+Y;if(dt>=s){const _t=d[Y];delete d[Y],(E>0||dt>s)&&(d[dt+E]=_t)}}}function oht(d,s,E,R){return!E||d.type==="mouseout"?null:R?s:d}class p1{static defaults=Bd;static instances=a4;static overrides=Iy;static registry=cg;static version=rht;static getChart=eI;static register(...s){cg.add(...s),rI()}static unregister(...s){cg.remove(...s),rI()}constructor(s,E){const R=this.config=new Qct(E),Y=WD(s),dt=eI(Y);if(dt)throw new Error("Canvas is already in use. Chart with ID '"+dt.id+"' must be destroyed before the canvas with ID '"+dt.canvas.id+"' can be reused.");const _t=R.createResolver(R.chartOptionScopes(),this.getContext());this.platform=new(R.platform||Tct(Y)),this.platform.updateConfig(R);const zt=this.platform.acquireContext(Y,_t.aspectRatio),jt=zt&&zt.canvas,te=jt&&jt.height,ce=jt&&jt.width;if(this.id=alt(),this.ctx=zt,this.canvas=jt,this.width=ce,this.height=te,this._options=_t,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Vct,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Tlt(Ie=>this.update(Ie),_t.resizeDelay||0),this._dataChanges=[],a4[this.id]=this,!zt||!jt){console.error("Failed to create chart: can't acquire context from the given item");return}Xg.listen(this,"complete",tI),Xg.listen(this,"progress",iht),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:s,maintainAspectRatio:E},width:R,height:Y,_aspectRatio:dt}=this;return Nh(s)?E&&dt?dt:Y?R/Y:null:s}get data(){return this.config.data}set data(s){this.config.data=s}get options(){return this._options}set options(s){this.config.options=s}get registry(){return cg}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():TP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bP(this.canvas,this.ctx),this}stop(){return Xg.stop(this),this}resize(s,E){Xg.running(this)?this._resizeBeforeDraw={width:s,height:E}:this._resize(s,E)}_resize(s,E){const R=this.options,Y=this.canvas,dt=R.maintainAspectRatio&&this.aspectRatio,_t=this.platform.getMaximumSize(Y,s,E,dt),zt=R.devicePixelRatio||this.platform.getDevicePixelRatio(),jt=this.width?"resize":"attach";this.width=_t.width,this.height=_t.height,this._aspectRatio=this.aspectRatio,TP(this,zt,!0)&&(this.notifyPlugins("resize",{size:_t}),Df(R.onResize,[this,_t],this),this.attached&&this._doResize(jt)&&this.render())}ensureScalesHaveIDs(){const E=this.options.scales||{};Jh(E,(R,Y)=>{R.id=Y})}buildOrUpdateScales(){const s=this.options,E=s.scales,R=this.scales,Y=Object.keys(R).reduce((_t,zt)=>(_t[zt]=!1,_t),{});let dt=[];E&&(dt=dt.concat(Object.keys(E).map(_t=>{const zt=E[_t],jt=OA(_t,zt),te=jt==="r",ce=jt==="x";return{options:zt,dposition:te?"chartArea":ce?"bottom":"left",dtype:te?"radialLinear":ce?"category":"linear"}}))),Jh(dt,_t=>{const zt=_t.options,jt=zt.id,te=OA(jt,zt),ce=cc(zt.type,_t.dtype);(zt.position===void 0||JP(zt.position,te)!==JP(_t.dposition))&&(zt.position=_t.dposition),Y[jt]=!0;let Ie=null;if(jt in R&&R[jt].type===ce)Ie=R[jt];else{const Je=cg.getScale(ce);Ie=new Je({id:jt,type:ce,ctx:this.ctx,chart:this}),R[Ie.id]=Ie}Ie.init(zt,s)}),Jh(Y,(_t,zt)=>{_t||delete R[zt]}),Jh(R,_t=>{sm.configure(this,_t,_t.options),sm.addBox(this,_t)})}_updateMetasets(){const s=this._metasets,E=this.data.datasets.length,R=s.length;if(s.sort((Y,dt)=>Y.index-dt.index),R>E){for(let Y=E;YE.length&&delete this._stacks,s.forEach((R,Y)=>{E.filter(dt=>dt===R._dataset).length===0&&this._destroyDatasetMeta(Y)})}buildOrUpdateControllers(){const s=[],E=this.data.datasets;let R,Y;for(this._removeUnreferencedMetasets(),R=0,Y=E.length;R{this.getDatasetMeta(E).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(s){const E=this.config;E.update();const R=this._options=E.createResolver(E.chartOptionScopes(),this.getContext()),Y=this._animationsDisabled=!R.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:s,cancelable:!0})===!1)return;const dt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let _t=0;for(let te=0,ce=this.data.datasets.length;te{te.reset()}),this._updateDatasets(s),this.notifyPlugins("afterUpdate",{mode:s}),this._layers.sort(QP("z","_idx"));const{_active:zt,_lastEvent:jt}=this;jt?this._eventHandler(jt,!0):zt.length&&this._updateHoverStyles(zt,zt,!0),this.render()}_updateScales(){Jh(this.scales,s=>{sm.removeBox(this,s)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const s=this.options,E=new Set(Object.keys(this._listeners)),R=new Set(s.events);(!hP(E,R)||!!this._responsiveListeners!==s.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:s}=this,E=this._getUniformDataChanges()||[];for(const{method:R,start:Y,count:dt}of E){const _t=R==="_removeElements"?-dt:dt;aht(s,Y,_t)}}_getUniformDataChanges(){const s=this._dataChanges;if(!s||!s.length)return;this._dataChanges=[];const E=this.data.datasets.length,R=dt=>new Set(s.filter(_t=>_t[0]===dt).map((_t,zt)=>zt+","+_t.splice(1).join(","))),Y=R(0);for(let dt=1;dtdt.split(",")).map(dt=>({method:dt[1],start:+dt[2],count:+dt[3]}))}_updateLayout(s){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;sm.update(this,this.width,this.height,s);const E=this.chartArea,R=E.width<=0||E.height<=0;this._layers=[],Jh(this.boxes,Y=>{R&&Y.position==="chartArea"||(Y.configure&&Y.configure(),this._layers.push(...Y._layers()))},this),this._layers.forEach((Y,dt)=>{Y._idx=dt}),this.notifyPlugins("afterLayout")}_updateDatasets(s){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:s,cancelable:!0})!==!1){for(let E=0,R=this.data.datasets.length;E=0;--E)this._drawDataset(s[E]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(s){const E=this.ctx,R={meta:s,index:s.index,cancelable:!0},Y=ED(this,s);this.notifyPlugins("beforeDatasetDraw",R)!==!1&&(Y&&K4(E,Y),s.controller.draw(),Y&&X4(E),R.cancelable=!1,this.notifyPlugins("afterDatasetDraw",R))}isPointInArea(s){return K2(s,this.chartArea,this._minPadding)}getElementsAtEventForMode(s,E,R,Y){const dt=nct.modes[E];return typeof dt=="function"?dt(this,s,R,Y):[]}getDatasetMeta(s){const E=this.data.datasets[s],R=this._metasets;let Y=R.filter(dt=>dt&&dt._dataset===E).pop();return Y||(Y={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:E&&E.order||0,index:s,_dataset:E,_parsed:[],_sorted:!1},R.push(Y)),Y}getContext(){return this.$context||(this.$context=Dy(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(s){const E=this.data.datasets[s];if(!E)return!1;const R=this.getDatasetMeta(s);return typeof R.hidden=="boolean"?!R.hidden:!E.hidden}setDatasetVisibility(s,E){const R=this.getDatasetMeta(s);R.hidden=!E}toggleDataVisibility(s){this._hiddenIndices[s]=!this._hiddenIndices[s]}getDataVisibility(s){return!this._hiddenIndices[s]}_updateVisibility(s,E,R){const Y=R?"show":"hide",dt=this.getDatasetMeta(s),_t=dt.controller._resolveAnimations(void 0,Y);Z2(E)?(dt.data[E].hidden=!R,this.update()):(this.setDatasetVisibility(s,R),_t.update(dt,{visible:R}),this.update(zt=>zt.datasetIndex===s?Y:void 0))}hide(s,E){this._updateVisibility(s,E,!1)}show(s,E){this._updateVisibility(s,E,!0)}_destroyDatasetMeta(s){const E=this._metasets[s];E&&E.controller&&E.controller._destroy(),delete this._metasets[s]}_stop(){let s,E;for(this.stop(),Xg.remove(this),s=0,E=this.data.datasets.length;s{E.addEventListener(this,dt,_t),s[dt]=_t},Y=(dt,_t,zt)=>{dt.offsetX=_t,dt.offsetY=zt,this._eventHandler(dt)};Jh(this.options.events,dt=>R(dt,Y))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const s=this._responsiveListeners,E=this.platform,R=(jt,te)=>{E.addEventListener(this,jt,te),s[jt]=te},Y=(jt,te)=>{s[jt]&&(E.removeEventListener(this,jt,te),delete s[jt])},dt=(jt,te)=>{this.canvas&&this.resize(jt,te)};let _t;const zt=()=>{Y("attach",zt),this.attached=!0,this.resize(),R("resize",dt),R("detach",_t)};_t=()=>{this.attached=!1,Y("resize",dt),this._stop(),this._resize(0,0),R("attach",zt)},E.isAttached(this.canvas)?zt():_t()}unbindEvents(){Jh(this._listeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._listeners={},Jh(this._responsiveListeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._responsiveListeners=void 0}updateHoverStyle(s,E,R){const Y=R?"set":"remove";let dt,_t,zt,jt;for(E==="dataset"&&(dt=this.getDatasetMeta(s[0].datasetIndex),dt.controller["_"+Y+"DatasetHoverStyle"]()),zt=0,jt=s.length;zt{const zt=this.getDatasetMeta(dt);if(!zt)throw new Error("No dataset found at index "+dt);return{datasetIndex:dt,element:zt.data[_t],index:_t}});!x4(R,E)&&(this._active=R,this._lastEvent=null,this._updateHoverStyles(R,E))}notifyPlugins(s,E,R){return this._plugins.notify(this,s,E,R)}isPluginEnabled(s){return this._plugins._cache.filter(E=>E.plugin.id===s).length===1}_updateHoverStyles(s,E,R){const Y=this.options.hover,dt=(jt,te)=>jt.filter(ce=>!te.some(Ie=>ce.datasetIndex===Ie.datasetIndex&&ce.index===Ie.index)),_t=dt(E,s),zt=R?s:dt(s,E);_t.length&&this.updateHoverStyle(_t,Y.mode,!1),zt.length&&Y.mode&&this.updateHoverStyle(zt,Y.mode,!0)}_eventHandler(s,E){const R={event:s,replay:E,cancelable:!0,inChartArea:this.isPointInArea(s)},Y=_t=>(_t.options.events||this.options.events).includes(s.native.type);if(this.notifyPlugins("beforeEvent",R,Y)===!1)return;const dt=this._handleEvent(s,E,R.inChartArea);return R.cancelable=!1,this.notifyPlugins("afterEvent",R,Y),(dt||R.changed)&&this.render(),this}_handleEvent(s,E,R){const{_active:Y=[],options:dt}=this,_t=E,zt=this._getActiveElements(s,Y,R,_t),jt=hlt(s),te=oht(s,this._lastEvent,R,jt);R&&(this._lastEvent=null,Df(dt.onHover,[s,zt,this],this),jt&&Df(dt.onClick,[s,zt,this],this));const ce=!x4(zt,Y);return(ce||E)&&(this._active=zt,this._updateHoverStyles(zt,Y,E)),this._lastEvent=te,ce}_getActiveElements(s,E,R,Y){if(s.type==="mouseout")return[];if(!R)return E;const dt=this.options.hover;return this.getElementsAtEventForMode(s,dt.mode,dt,Y)}}function rI(){return Jh(p1.instances,d=>d._plugins.invalidate())}function sht(d,s,E){const{startAngle:R,x:Y,y:dt,outerRadius:_t,innerRadius:zt,options:jt}=s,{borderWidth:te,borderJoinStyle:ce}=jt,Ie=Math.min(te/_t,$0(R-E));if(d.beginPath(),d.arc(Y,dt,_t-te/2,R+Ie/2,E-Ie/2),zt>0){const Je=Math.min(te/zt,$0(R-E));d.arc(Y,dt,zt+te/2,E-Je/2,R+Je/2,!0)}else{const Je=Math.min(te/2,_t*$0(R-E));if(ce==="round")d.arc(Y,dt,Je,E-Qh/2,R+Qh/2,!0);else if(ce==="bevel"){const fr=2*Je*Je,Ar=-fr*Math.cos(E+Qh/2)+Y,kr=-fr*Math.sin(E+Qh/2)+dt,Vr=fr*Math.cos(R+Qh/2)+Y,fn=fr*Math.sin(R+Qh/2)+dt;d.lineTo(Ar,kr),d.lineTo(Vr,fn)}}d.closePath(),d.moveTo(0,0),d.rect(0,0,d.canvas.width,d.canvas.height),d.clip("evenodd")}function lht(d,s,E){const{startAngle:R,pixelMargin:Y,x:dt,y:_t,outerRadius:zt,innerRadius:jt}=s;let te=Y/zt;d.beginPath(),d.arc(dt,_t,zt,R-te,E+te),jt>Y?(te=Y/jt,d.arc(dt,_t,jt,E+te,R-te,!0)):d.arc(dt,_t,Y,E+ip,R-ip),d.closePath(),d.clip()}function uht(d){return TM(d,["outerStart","outerEnd","innerStart","innerEnd"])}function cht(d,s,E,R){const Y=uht(d.options.borderRadius),dt=(E-s)/2,_t=Math.min(dt,R*s/2),zt=jt=>{const te=(E-Math.min(dt,jt))*R/2;return Jp(jt,0,Math.min(dt,te))};return{outerStart:zt(Y.outerStart),outerEnd:zt(Y.outerEnd),innerStart:Jp(Y.innerStart,0,_t),innerEnd:Jp(Y.innerEnd,0,_t)}}function i_(d,s,E,R){return{x:E+d*Math.cos(s),y:R+d*Math.sin(s)}}function A4(d,s,E,R,Y,dt){const{x:_t,y:zt,startAngle:jt,pixelMargin:te,innerRadius:ce}=s,Ie=Math.max(s.outerRadius+R+E-te,0),Je=ce>0?ce+R+E+te:0;let fr=0;const Ar=Y-jt;if(R){const sa=ce>0?ce-R:0,Ti=Ie>0?Ie-R:0,Qn=(sa+Ti)/2,la=Qn!==0?Ar*Qn/(Qn+R):Ar;fr=(Ar-la)/2}const kr=Math.max(.001,Ar*Ie-E/Qh)/Ie,Vr=(Ar-kr)/2,fn=jt+Vr+fr,Dt=Y-Vr-fr,{outerStart:cn,outerEnd:ti,innerStart:Dn,innerEnd:ii}=cht(s,Je,Ie,Dt-fn),Vi=Ie-cn,Nn=Ie-ti,Wr=fn+cn/Vi,Bi=Dt-ti/Nn,Ri=Je+Dn,Li=Je+ii,$n=fn+Dn/Ri,Hn=Dt-ii/Li;if(d.beginPath(),dt){const sa=(Wr+Bi)/2;if(d.arc(_t,zt,Ie,Wr,sa),d.arc(_t,zt,Ie,sa,Bi),ti>0){const Eo=i_(Nn,Bi,_t,zt);d.arc(Eo.x,Eo.y,ti,Bi,Dt+ip)}const Ti=i_(Li,Dt,_t,zt);if(d.lineTo(Ti.x,Ti.y),ii>0){const Eo=i_(Li,Hn,_t,zt);d.arc(Eo.x,Eo.y,ii,Dt+ip,Hn+Math.PI)}const Qn=(Dt-ii/Je+(fn+Dn/Je))/2;if(d.arc(_t,zt,Je,Dt-ii/Je,Qn,!0),d.arc(_t,zt,Je,Qn,fn+Dn/Je,!0),Dn>0){const Eo=i_(Ri,$n,_t,zt);d.arc(Eo.x,Eo.y,Dn,$n+Math.PI,fn-ip)}const la=i_(Vi,fn,_t,zt);if(d.lineTo(la.x,la.y),cn>0){const Eo=i_(Vi,Wr,_t,zt);d.arc(Eo.x,Eo.y,cn,fn-ip,Wr)}}else{d.moveTo(_t,zt);const sa=Math.cos(Wr)*Ie+_t,Ti=Math.sin(Wr)*Ie+zt;d.lineTo(sa,Ti);const Qn=Math.cos(Bi)*Ie+_t,la=Math.sin(Bi)*Ie+zt;d.lineTo(Qn,la)}d.closePath()}function hht(d,s,E,R,Y){const{fullCircles:dt,startAngle:_t,circumference:zt}=s;let jt=s.endAngle;if(dt){A4(d,s,E,R,jt,Y);for(let te=0;te=Qh&&fr===0&&ce!=="miter"&&sht(d,s,kr),dt||(A4(d,s,E,R,kr,Y),d.stroke())}class qD extends cv{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(s){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,s&&Object.assign(this,s)}inRange(s,E,R){const Y=this.getProps(["x","y"],R),{angle:dt,distance:_t}=cD(Y,{x:s,y:E}),{startAngle:zt,endAngle:jt,innerRadius:te,outerRadius:ce,circumference:Ie}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],R),Je=(this.options.spacing+this.options.borderWidth)/2,fr=cc(Ie,jt-zt),Ar=Y2(dt,zt,jt)&&zt!==jt,kr=fr>=sd||Ar,Vr=av(_t,te+Je,ce+Je);return kr&&Vr}getCenterPoint(s){const{x:E,y:R,startAngle:Y,endAngle:dt,innerRadius:_t,outerRadius:zt}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],s),{offset:jt,spacing:te}=this.options,ce=(Y+dt)/2,Ie=(_t+zt+te+jt)/2;return{x:E+Math.cos(ce)*Ie,y:R+Math.sin(ce)*Ie}}tooltipPosition(s){return this.getCenterPoint(s)}draw(s){const{options:E,circumference:R}=this,Y=(E.offset||0)/4,dt=(E.spacing||0)/2,_t=E.circular;if(this.pixelMargin=E.borderAlign==="inner"?.33:0,this.fullCircles=R>sd?Math.floor(R/sd):0,R===0||this.innerRadius<0||this.outerRadius<0)return;s.save();const zt=(this.startAngle+this.endAngle)/2;s.translate(Math.cos(zt)*Y,Math.sin(zt)*Y);const jt=1-Math.sin(Math.min(Qh,R||0)),te=Y*jt;s.fillStyle=E.backgroundColor,s.strokeStyle=E.borderColor,hht(s,this,te,dt,_t),fht(s,this,te,dt,_t),s.restore()}}function $D(d,s,E=s){d.lineCap=cc(E.borderCapStyle,s.borderCapStyle),d.setLineDash(cc(E.borderDash,s.borderDash)),d.lineDashOffset=cc(E.borderDashOffset,s.borderDashOffset),d.lineJoin=cc(E.borderJoinStyle,s.borderJoinStyle),d.lineWidth=cc(E.borderWidth,s.borderWidth),d.strokeStyle=cc(E.borderColor,s.borderColor)}function dht(d,s,E){d.lineTo(E.x,E.y)}function pht(d){return d.stepped?Rlt:d.tension||d.cubicInterpolationMode==="monotone"?Nlt:dht}function ZD(d,s,E={}){const R=d.length,{start:Y=0,end:dt=R-1}=E,{start:_t,end:zt}=s,jt=Math.max(Y,_t),te=Math.min(dt,zt),ce=Y<_t&&dt<_t||Y>zt&&dt>zt;return{count:R,start:jt,loop:s.loop,ilen:te(_t+(te?zt-ti:ti))%dt,cn=()=>{kr!==Vr&&(d.lineTo(ce,Vr),d.lineTo(ce,kr),d.lineTo(ce,fn))};for(jt&&(fr=Y[Dt(0)],d.moveTo(fr.x,fr.y)),Je=0;Je<=zt;++Je){if(fr=Y[Dt(Je)],fr.skip)continue;const ti=fr.x,Dn=fr.y,ii=ti|0;ii===Ar?(DnVr&&(Vr=Dn),ce=(Ie*ce+ti)/++Ie):(cn(),d.lineTo(ti,Dn),Ar=ii,Ie=0,kr=Vr=Dn),fn=Dn}cn()}function DA(d){const s=d.options,E=s.borderDash&&s.borderDash.length;return!d._decimated&&!d._loop&&!s.tension&&s.cubicInterpolationMode!=="monotone"&&!s.stepped&&!E?ght:mht}function vht(d){return d.stepped?vut:d.tension||d.cubicInterpolationMode==="monotone"?yut:vy}function yht(d,s,E,R){let Y=s._path;Y||(Y=s._path=new Path2D,s.path(Y,E,R)&&Y.closePath()),$D(d,s.options),d.stroke(Y)}function xht(d,s,E,R){const{segments:Y,options:dt}=s,_t=DA(s);for(const zt of Y)$D(d,dt,zt.style),d.beginPath(),_t(d,s,zt,{start:E,end:E+R-1})&&d.closePath(),d.stroke()}const _ht=typeof Path2D=="function";function bht(d,s,E,R){_ht&&!s.options.segment?yht(d,s,E,R):xht(d,s,E,R)}class uw extends cv{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"&&s!=="fill"};constructor(s){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,s&&Object.assign(this,s)}updateControlPoints(s,E){const R=this.options;if((R.tension||R.cubicInterpolationMode==="monotone")&&!R.stepped&&!this._pointsUpdated){const Y=R.spanGaps?this._loop:this._fullLoop;uut(this._points,R,s,Y,E),this._pointsUpdated=!0}}set points(s){this._points=s,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Tut(this,this.options.segment))}first(){const s=this.segments,E=this.points;return s.length&&E[s[0].start]}last(){const s=this.segments,E=this.points,R=s.length;return R&&E[s[R-1].end]}interpolate(s,E){const R=this.options,Y=s[E],dt=this.points,_t=SD(this,{property:E,start:Y,end:Y});if(!_t.length)return;const zt=[],jt=vht(R);let te,ce;for(te=0,ce=_t.length;te{zt=e6(_t,zt,Y);const jt=Y[_t],te=Y[zt];R!==null?(dt.push({x:jt.x,y:R}),dt.push({x:te.x,y:R})):E!==null&&(dt.push({x:E,y:jt.y}),dt.push({x:E,y:te.y}))}),dt}function e6(d,s,E){for(;s>d;s--){const R=E[s];if(!isNaN(R.x)&&!isNaN(R.y))break}return s}function iI(d,s,E,R){return d&&s?R(d[E],s[E]):d?d[E]:s?s[E]:0}function XD(d,s){let E=[],R=!1;return Yd(d)?(R=!0,E=d):E=Eht(d,s),E.length?new uw({points:E,options:{tension:0},_loop:R,_fullLoop:R}):null}function aI(d){return d&&d.fill!==!1}function Cht(d,s,E){let Y=d[s].fill;const dt=[s];let _t;if(!E)return Y;for(;Y!==!1&&dt.indexOf(Y)===-1;){if(!t0(Y))return Y;if(_t=d[Y],!_t)return!1;if(_t.visible)return Y;dt.push(Y),Y=_t.fill}return!1}function Lht(d,s,E){const R=Oht(d);if(Sc(R))return isNaN(R.value)?!1:R;let Y=parseFloat(R);return t0(Y)&&Math.floor(Y)===Y?Pht(R[0],s,Y,E):["origin","start","end","stack","shape"].indexOf(R)>=0&&R}function Pht(d,s,E,R){return(d==="-"||d==="+")&&(E=s+E),E===s||E<0||E>=R?!1:E}function Iht(d,s){let E=null;return d==="start"?E=s.bottom:d==="end"?E=s.top:Sc(d)?E=s.getPixelForValue(d.value):s.getBasePixel&&(E=s.getBasePixel()),E}function zht(d,s,E){let R;return d==="start"?R=E:d==="end"?R=s.options.reverse?s.min:s.max:Sc(d)?R=d.value:R=s.getBaseValue(),R}function Oht(d){const s=d.options,E=s.fill;let R=cc(E&&E.target,E);return R===void 0&&(R=!!s.backgroundColor),R===!1||R===null?!1:R===!0?"origin":R}function Dht(d){const{scale:s,index:E,line:R}=d,Y=[],dt=R.segments,_t=R.points,zt=Fht(s,E);zt.push(XD({x:null,y:s.bottom},R));for(let jt=0;jt=0;--_t){const zt=Y[_t].$filler;zt&&(zt.line.updateControlPoints(dt,zt.axis),R&&zt.fill&&Q8(d.ctx,zt,dt))}},beforeDatasetsDraw(d,s,E){if(E.drawTime!=="beforeDatasetsDraw")return;const R=d.getSortedVisibleDatasetMetas();for(let Y=R.length-1;Y>=0;--Y){const dt=R[Y].$filler;aI(dt)&&Q8(d.ctx,dt,d.chartArea)}},beforeDatasetDraw(d,s,E){const R=s.meta.$filler;!aI(R)||E.drawTime!=="beforeDatasetDraw"||Q8(d.ctx,R,d.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const uI=(d,s)=>{let{boxHeight:E=s,boxWidth:R=s}=d;return d.usePointStyle&&(E=Math.min(E,s),R=d.pointStyleWidth||Math.min(R,s)),{boxWidth:R,boxHeight:E,itemHeight:Math.max(s,E)}},$ht=(d,s)=>d!==null&&s!==null&&d.datasetIndex===s.datasetIndex&&d.index===s.index;class cI extends cv{constructor(s){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E,R){this.maxWidth=s,this.maxHeight=E,this._margins=R,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const s=this.options.labels||{};let E=Df(s.generateLabels,[this.chart],this)||[];s.filter&&(E=E.filter(R=>s.filter(R,this.chart.data))),s.sort&&(E=E.sort((R,Y)=>s.sort(R,Y,this.chart.data))),this.options.reverse&&E.reverse(),this.legendItems=E}fit(){const{options:s,ctx:E}=this;if(!s.display){this.width=this.height=0;return}const R=s.labels,Y=Qp(R.font),dt=Y.size,_t=this._computeTitleHeight(),{boxWidth:zt,itemHeight:jt}=uI(R,dt);let te,ce;E.font=Y.string,this.isHorizontal()?(te=this.maxWidth,ce=this._fitRows(_t,dt,zt,jt)+10):(ce=this.maxHeight,te=this._fitCols(_t,Y,zt,jt)+10),this.width=Math.min(te,s.maxWidth||this.maxWidth),this.height=Math.min(ce,s.maxHeight||this.maxHeight)}_fitRows(s,E,R,Y){const{ctx:dt,maxWidth:_t,options:{labels:{padding:zt}}}=this,jt=this.legendHitBoxes=[],te=this.lineWidths=[0],ce=Y+zt;let Ie=s;dt.textAlign="left",dt.textBaseline="middle";let Je=-1,fr=-ce;return this.legendItems.forEach((Ar,kr)=>{const Vr=R+E/2+dt.measureText(Ar.text).width;(kr===0||te[te.length-1]+Vr+2*zt>_t)&&(Ie+=ce,te[te.length-(kr>0?0:1)]=0,fr+=ce,Je++),jt[kr]={left:0,top:fr,row:Je,width:Vr,height:Y},te[te.length-1]+=Vr+zt}),Ie}_fitCols(s,E,R,Y){const{ctx:dt,maxHeight:_t,options:{labels:{padding:zt}}}=this,jt=this.legendHitBoxes=[],te=this.columnSizes=[],ce=_t-s;let Ie=zt,Je=0,fr=0,Ar=0,kr=0;return this.legendItems.forEach((Vr,fn)=>{const{itemWidth:Dt,itemHeight:cn}=Zht(R,E,dt,Vr,Y);fn>0&&fr+cn+2*zt>ce&&(Ie+=Je+zt,te.push({width:Je,height:fr}),Ar+=Je+zt,kr++,Je=fr=0),jt[fn]={left:Ar,top:fr,col:kr,width:Dt,height:cn},Je=Math.max(Je,Dt),fr+=cn+zt}),Ie+=Je,te.push({width:Je,height:fr}),Ie}adjustHitBoxes(){if(!this.options.display)return;const s=this._computeTitleHeight(),{legendHitBoxes:E,options:{align:R,labels:{padding:Y},rtl:dt}}=this,_t=d_(dt,this.left,this.width);if(this.isHorizontal()){let zt=0,jt=qp(R,this.left+Y,this.right-this.lineWidths[zt]);for(const te of E)zt!==te.row&&(zt=te.row,jt=qp(R,this.left+Y,this.right-this.lineWidths[zt])),te.top+=this.top+s+Y,te.left=_t.leftForLtr(_t.x(jt),te.width),jt+=te.width+Y}else{let zt=0,jt=qp(R,this.top+s+Y,this.bottom-this.columnSizes[zt].height);for(const te of E)te.col!==zt&&(zt=te.col,jt=qp(R,this.top+s+Y,this.bottom-this.columnSizes[zt].height)),te.top=jt,te.left+=this.left+Y,te.left=_t.leftForLtr(_t.x(te.left),te.width),jt+=te.height+Y}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const s=this.ctx;K4(s,this),this._draw(),X4(s)}}_draw(){const{options:s,columnSizes:E,lineWidths:R,ctx:Y}=this,{align:dt,labels:_t}=s,zt=Bd.color,jt=d_(s.rtl,this.left,this.width),te=Qp(_t.font),{padding:ce}=_t,Ie=te.size,Je=Ie/2;let fr;this.drawTitle(),Y.textAlign=jt.textAlign("left"),Y.textBaseline="middle",Y.lineWidth=.5,Y.font=te.string;const{boxWidth:Ar,boxHeight:kr,itemHeight:Vr}=uI(_t,Ie),fn=function(ii,Vi,Nn){if(isNaN(Ar)||Ar<=0||isNaN(kr)||kr<0)return;Y.save();const Wr=cc(Nn.lineWidth,1);if(Y.fillStyle=cc(Nn.fillStyle,zt),Y.lineCap=cc(Nn.lineCap,"butt"),Y.lineDashOffset=cc(Nn.lineDashOffset,0),Y.lineJoin=cc(Nn.lineJoin,"miter"),Y.lineWidth=Wr,Y.strokeStyle=cc(Nn.strokeStyle,zt),Y.setLineDash(cc(Nn.lineDash,[])),_t.usePointStyle){const Bi={radius:kr*Math.SQRT2/2,pointStyle:Nn.pointStyle,rotation:Nn.rotation,borderWidth:Wr},Ri=jt.xPlus(ii,Ar/2),Li=Vi+Je;gD(Y,Bi,Ri,Li,_t.pointStyleWidth&&Ar)}else{const Bi=Vi+Math.max((Ie-kr)/2,0),Ri=jt.leftForLtr(ii,Ar),Li=f_(Nn.borderRadius);Y.beginPath(),Object.values(Li).some($n=>$n!==0)?w4(Y,{x:Ri,y:Bi,w:Ar,h:kr,radius:Li}):Y.rect(Ri,Bi,Ar,kr),Y.fill(),Wr!==0&&Y.stroke()}Y.restore()},Dt=function(ii,Vi,Nn){X2(Y,Nn.text,ii,Vi+Vr/2,te,{strikethrough:Nn.hidden,textAlign:jt.textAlign(Nn.textAlign)})},cn=this.isHorizontal(),ti=this._computeTitleHeight();cn?fr={x:qp(dt,this.left+ce,this.right-R[0]),y:this.top+ce+ti,line:0}:fr={x:this.left+ce,y:qp(dt,this.top+ti+ce,this.bottom-E[0].height),line:0},kD(this.ctx,s.textDirection);const Dn=Vr+ce;this.legendItems.forEach((ii,Vi)=>{Y.strokeStyle=ii.fontColor,Y.fillStyle=ii.fontColor;const Nn=Y.measureText(ii.text).width,Wr=jt.textAlign(ii.textAlign||(ii.textAlign=_t.textAlign)),Bi=Ar+Je+Nn;let Ri=fr.x,Li=fr.y;jt.setWidth(this.width),cn?Vi>0&&Ri+Bi+ce>this.right&&(Li=fr.y+=Dn,fr.line++,Ri=fr.x=qp(dt,this.left+ce,this.right-R[fr.line])):Vi>0&&Li+Dn>this.bottom&&(Ri=fr.x=Ri+E[fr.line].width+ce,fr.line++,Li=fr.y=qp(dt,this.top+ti+ce,this.bottom-E[fr.line].height));const $n=jt.x(Ri);if(fn($n,Li,ii),Ri=Alt(Wr,Ri+Ar+Je,cn?Ri+Bi:this.right,s.rtl),Dt(jt.x(Ri),Li,ii),cn)fr.x+=Bi+ce;else if(typeof ii.text!="string"){const Hn=te.lineHeight;fr.y+=tF(ii,Hn)+ce}else fr.y+=Dn}),TD(this.ctx,s.textDirection)}drawTitle(){const s=this.options,E=s.title,R=Qp(E.font),Y=fm(E.padding);if(!E.display)return;const dt=d_(s.rtl,this.left,this.width),_t=this.ctx,zt=E.position,jt=R.size/2,te=Y.top+jt;let ce,Ie=this.left,Je=this.width;if(this.isHorizontal())Je=Math.max(...this.lineWidths),ce=this.top+te,Ie=qp(s.align,Ie,this.right-Je);else{const Ar=this.columnSizes.reduce((kr,Vr)=>Math.max(kr,Vr.height),0);ce=te+qp(s.align,this.top,this.bottom-Ar-s.labels.padding-this._computeTitleHeight())}const fr=qp(zt,Ie,Ie+Je);_t.textAlign=dt.textAlign(bM(zt)),_t.textBaseline="middle",_t.strokeStyle=E.color,_t.fillStyle=E.color,_t.font=R.string,X2(_t,E.text,fr,ce,R)}_computeTitleHeight(){const s=this.options.title,E=Qp(s.font),R=fm(s.padding);return s.display?E.lineHeight+R.height:0}_getLegendItemAt(s,E){let R,Y,dt;if(av(s,this.left,this.right)&&av(E,this.top,this.bottom)){for(dt=this.legendHitBoxes,R=0;Rdt.length>_t.length?dt:_t)),s+E.size/2+R.measureText(Y).width}function Yht(d,s,E){let R=d;return typeof s.text!="string"&&(R=tF(s,E)),R}function tF(d,s){const E=d.text?d.text.length:0;return s*E}function Kht(d,s){return!!((d==="mousemove"||d==="mouseout")&&(s.onHover||s.onLeave)||s.onClick&&(d==="click"||d==="mouseup"))}var eF={id:"legend",_element:cI,start(d,s,E){const R=d.legend=new cI({ctx:d.ctx,options:E,chart:d});sm.configure(d,R,E),sm.addBox(d,R)},stop(d){sm.removeBox(d,d.legend),delete d.legend},beforeUpdate(d,s,E){const R=d.legend;sm.configure(d,R,E),R.options=E},afterUpdate(d){const s=d.legend;s.buildLabels(),s.adjustHitBoxes()},afterEvent(d,s){s.replay||d.legend.handleEvent(s.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(d,s,E){const R=s.datasetIndex,Y=E.chart;Y.isDatasetVisible(R)?(Y.hide(R),s.hidden=!0):(Y.show(R),s.hidden=!1)},onHover:null,onLeave:null,labels:{color:d=>d.chart.options.color,boxWidth:40,padding:10,generateLabels(d){const s=d.data.datasets,{labels:{usePointStyle:E,pointStyle:R,textAlign:Y,color:dt,useBorderRadius:_t,borderRadius:zt}}=d.legend.options;return d._getSortedDatasetMetas().map(jt=>{const te=jt.controller.getStyle(E?0:void 0),ce=fm(te.borderWidth);return{text:s[jt.index].label,fillStyle:te.backgroundColor,fontColor:dt,hidden:!jt.visible,lineCap:te.borderCapStyle,lineDash:te.borderDash,lineDashOffset:te.borderDashOffset,lineJoin:te.borderJoinStyle,lineWidth:(ce.width+ce.height)/4,strokeStyle:te.borderColor,pointStyle:R||te.pointStyle,rotation:te.rotation,textAlign:Y||te.textAlign,borderRadius:_t&&(zt||te.borderRadius),datasetIndex:jt.index}},this)}},title:{color:d=>d.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:d=>!d.startsWith("on"),labels:{_scriptable:d=>!["generateLabels","filter","sort"].includes(d)}}};class rF extends cv{constructor(s){super(),this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E){const R=this.options;if(this.left=0,this.top=0,!R.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=s,this.height=this.bottom=E;const Y=Yd(R.text)?R.text.length:1;this._padding=fm(R.padding);const dt=Y*Qp(R.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=dt:this.width=dt}isHorizontal(){const s=this.options.position;return s==="top"||s==="bottom"}_drawArgs(s){const{top:E,left:R,bottom:Y,right:dt,options:_t}=this,zt=_t.align;let jt=0,te,ce,Ie;return this.isHorizontal()?(ce=qp(zt,R,dt),Ie=E+s,te=dt-R):(_t.position==="left"?(ce=R+s,Ie=qp(zt,Y,E),jt=Qh*-.5):(ce=dt-s,Ie=qp(zt,E,Y),jt=Qh*.5),te=Y-E),{titleX:ce,titleY:Ie,maxWidth:te,rotation:jt}}draw(){const s=this.ctx,E=this.options;if(!E.display)return;const R=Qp(E.font),dt=R.lineHeight/2+this._padding.top,{titleX:_t,titleY:zt,maxWidth:jt,rotation:te}=this._drawArgs(dt);X2(s,E.text,0,0,R,{color:E.color,maxWidth:jt,rotation:te,textAlign:bM(E.align),textBaseline:"middle",translation:[_t,zt]})}}function Xht(d,s){const E=new rF({ctx:d.ctx,options:s,chart:d});sm.configure(d,E,s),sm.addBox(d,E),d.titleBlock=E}var nF={id:"title",_element:rF,start(d,s,E){Xht(d,E)},stop(d){const s=d.titleBlock;sm.removeBox(d,s),delete d.titleBlock},beforeUpdate(d,s,E){const R=d.titleBlock;sm.configure(d,R,E),R.options=E},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _2={average(d){if(!d.length)return!1;let s,E,R=new Set,Y=0,dt=0;for(s=0,E=d.length;szt+jt)/R.size,y:Y/dt}},nearest(d,s){if(!d.length)return!1;let E=s.x,R=s.y,Y=Number.POSITIVE_INFINITY,dt,_t,zt;for(dt=0,_t=d.length;dt<_t;++dt){const jt=d[dt].element;if(jt&&jt.hasValue()){const te=jt.getCenterPoint(),ce=LA(s,te);ce-1?d.split(` -`):d}function jht(d,s){const{element:E,datasetIndex:B,index:K}=s,pt=d.getDatasetMeta(B).controller,{label:_t,value:Ot}=pt.getLabelAndValue(K);return{chart:d,label:_t,parsed:pt.getParsed(K),raw:d.data.datasets[B].data[K],formattedValue:Ot,dataset:pt.getDataset(),dataIndex:K,datasetIndex:B,element:E}}function uI(d,s){const E=d.chart.ctx,{body:B,footer:K,title:pt}=d,{boxWidth:_t,boxHeight:Ot}=s,jt=Qp(s.bodyFont),te=Qp(s.titleFont),he=Qp(s.footerFont),De=pt.length,er=K.length,pr=B.length,Mr=fm(s.padding);let Tr=Mr.height,Vr=0,mn=B.reduce((Jn,Bn)=>Jn+Bn.before.length+Bn.lines.length+Bn.after.length,0);if(mn+=d.beforeBody.length+d.afterBody.length,De&&(Tr+=De*te.lineHeight+(De-1)*s.titleSpacing+s.titleMarginBottom),mn){const Jn=s.displayColors?Math.max(Ot,jt.lineHeight):jt.lineHeight;Tr+=pr*Jn+(mn-pr)*jt.lineHeight+(mn-1)*s.bodySpacing}er&&(Tr+=s.footerMarginTop+er*he.lineHeight+(er-1)*s.footerSpacing);let Dt=0;const cn=function(Jn){Vr=Math.max(Vr,E.measureText(Jn).width+Dt)};return E.save(),E.font=te.string,Xh(d.title,cn),E.font=jt.string,Xh(d.beforeBody.concat(d.afterBody),cn),Dt=s.displayColors?_t+2+s.boxPadding:0,Xh(B,Jn=>{Xh(Jn.before,cn),Xh(Jn.lines,cn),Xh(Jn.after,cn)}),Dt=0,E.font=he.string,Xh(d.footer,cn),E.restore(),Vr+=Mr.width,{width:Vr,height:Tr}}function Uht(d,s){const{y:E,height:B}=s;return Ed.height-B/2?"bottom":"center"}function Vht(d,s,E,B){const{x:K,width:pt}=B,_t=E.caretSize+E.caretPadding;if(d==="left"&&K+pt+_t>s.width||d==="right"&&K-pt-_t<0)return!0}function Hht(d,s,E,B){const{x:K,width:pt}=E,{width:_t,chartArea:{left:Ot,right:jt}}=d;let te="center";return B==="center"?te=K<=(Ot+jt)/2?"left":"right":K<=pt/2?te="left":K>=_t-pt/2&&(te="right"),Vht(te,d,s,E)&&(te="center"),te}function cI(d,s,E){const B=E.yAlign||s.yAlign||Uht(d,E);return{xAlign:E.xAlign||s.xAlign||Hht(d,s,E,B),yAlign:B}}function Wht(d,s){let{x:E,width:B}=d;return s==="right"?E-=B:s==="center"&&(E-=B/2),E}function qht(d,s,E){let{y:B,height:K}=d;return s==="top"?B+=E:s==="bottom"?B-=K+E:B-=K/2,B}function hI(d,s,E,B){const{caretSize:K,caretPadding:pt,cornerRadius:_t}=d,{xAlign:Ot,yAlign:jt}=E,te=K+pt,{topLeft:he,topRight:De,bottomLeft:er,bottomRight:pr}=h_(_t);let Mr=Wht(s,Ot);const Tr=qht(s,jt,te);return jt==="center"?Ot==="left"?Mr+=te:Ot==="right"&&(Mr-=te):Ot==="left"?Mr-=Math.max(he,er)+K:Ot==="right"&&(Mr+=Math.max(De,pr)+K),{x:Jp(Mr,0,B.width-s.width),y:Jp(Tr,0,B.height-s.height)}}function q5(d,s,E){const B=fm(E.padding);return s==="center"?d.x+d.width/2:s==="right"?d.x+d.width-B.right:d.x+B.left}function fI(d){return sg([],Xg(d))}function $ht(d,s,E){return zy(d,{tooltip:s,tooltipItems:E,type:"tooltip"})}function dI(d,s){const E=s&&s.dataset&&s.dataset.tooltip&&s.dataset.tooltip.callbacks;return E?d.override(E):d}const qD={beforeTitle:Yg,title(d){if(d.length>0){const s=d[0],E=s.chart.data.labels,B=E?E.length:0;if(this&&this.options&&this.options.mode==="dataset")return s.dataset.label||"";if(s.label)return s.label;if(B>0&&s.dataIndex"u"?qD[s].call(E,B):K}class pI extends lv{static positioners=_2;constructor(s){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=s.chart,this.options=s.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(s){this.options=s,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const s=this._cachedAnimations;if(s)return s;const E=this.chart,B=this.options.setContext(this.getContext()),K=B.enabled&&E.options.animation&&B.animations,pt=new AD(this.chart,K);return K._cacheable&&(this._cachedAnimations=Object.freeze(pt)),pt}getContext(){return this.$context||(this.$context=$ht(this.chart.getContext(),this,this._tooltipItems))}getTitle(s,E){const{callbacks:B}=E,K=A0(B,"beforeTitle",this,s),pt=A0(B,"title",this,s),_t=A0(B,"afterTitle",this,s);let Ot=[];return Ot=sg(Ot,Xg(K)),Ot=sg(Ot,Xg(pt)),Ot=sg(Ot,Xg(_t)),Ot}getBeforeBody(s,E){return fI(A0(E.callbacks,"beforeBody",this,s))}getBody(s,E){const{callbacks:B}=E,K=[];return Xh(s,pt=>{const _t={before:[],lines:[],after:[]},Ot=dI(B,pt);sg(_t.before,Xg(A0(Ot,"beforeLabel",this,pt))),sg(_t.lines,A0(Ot,"label",this,pt)),sg(_t.after,Xg(A0(Ot,"afterLabel",this,pt))),K.push(_t)}),K}getAfterBody(s,E){return fI(A0(E.callbacks,"afterBody",this,s))}getFooter(s,E){const{callbacks:B}=E,K=A0(B,"beforeFooter",this,s),pt=A0(B,"footer",this,s),_t=A0(B,"afterFooter",this,s);let Ot=[];return Ot=sg(Ot,Xg(K)),Ot=sg(Ot,Xg(pt)),Ot=sg(Ot,Xg(_t)),Ot}_createItems(s){const E=this._active,B=this.chart.data,K=[],pt=[],_t=[];let Ot=[],jt,te;for(jt=0,te=E.length;jts.filter(he,De,er,B))),s.itemSort&&(Ot=Ot.sort((he,De)=>s.itemSort(he,De,B))),Xh(Ot,he=>{const De=dI(s.callbacks,he);K.push(A0(De,"labelColor",this,he)),pt.push(A0(De,"labelPointStyle",this,he)),_t.push(A0(De,"labelTextColor",this,he))}),this.labelColors=K,this.labelPointStyles=pt,this.labelTextColors=_t,this.dataPoints=Ot,Ot}update(s,E){const B=this.options.setContext(this.getContext()),K=this._active;let pt,_t=[];if(!K.length)this.opacity!==0&&(pt={opacity:0});else{const Ot=_2[B.position].call(this,K,this._eventPosition);_t=this._createItems(B),this.title=this.getTitle(_t,B),this.beforeBody=this.getBeforeBody(_t,B),this.body=this.getBody(_t,B),this.afterBody=this.getAfterBody(_t,B),this.footer=this.getFooter(_t,B);const jt=this._size=uI(this,B),te=Object.assign({},Ot,jt),he=cI(this.chart,B,te),De=hI(B,te,he,this.chart);this.xAlign=he.xAlign,this.yAlign=he.yAlign,pt={opacity:1,x:De.x,y:De.y,width:jt.width,height:jt.height,caretX:Ot.x,caretY:Ot.y}}this._tooltipItems=_t,this.$context=void 0,pt&&this._resolveAnimations().update(this,pt),s&&B.external&&B.external.call(this,{chart:this.chart,tooltip:this,replay:E})}drawCaret(s,E,B,K){const pt=this.getCaretPosition(s,B,K);E.lineTo(pt.x1,pt.y1),E.lineTo(pt.x2,pt.y2),E.lineTo(pt.x3,pt.y3)}getCaretPosition(s,E,B){const{xAlign:K,yAlign:pt}=this,{caretSize:_t,cornerRadius:Ot}=B,{topLeft:jt,topRight:te,bottomLeft:he,bottomRight:De}=h_(Ot),{x:er,y:pr}=s,{width:Mr,height:Tr}=E;let Vr,mn,Dt,cn,Jn,Bn;return pt==="center"?(Jn=pr+Tr/2,K==="left"?(Vr=er,mn=Vr-_t,cn=Jn+_t,Bn=Jn-_t):(Vr=er+Mr,mn=Vr+_t,cn=Jn-_t,Bn=Jn+_t),Dt=Vr):(K==="left"?mn=er+Math.max(jt,he)+_t:K==="right"?mn=er+Mr-Math.max(te,De)-_t:mn=this.caretX,pt==="top"?(cn=pr,Jn=cn-_t,Vr=mn-_t,Dt=mn+_t):(cn=pr+Tr,Jn=cn+_t,Vr=mn+_t,Dt=mn-_t),Bn=cn),{x1:Vr,x2:mn,x3:Dt,y1:cn,y2:Jn,y3:Bn}}drawTitle(s,E,B){const K=this.title,pt=K.length;let _t,Ot,jt;if(pt){const te=f_(B.rtl,this.x,this.width);for(s.x=q5(this,B.titleAlign,B),E.textAlign=te.textAlign(B.titleAlign),E.textBaseline="middle",_t=Qp(B.titleFont),Ot=B.titleSpacing,E.fillStyle=B.titleColor,E.font=_t.string,jt=0;jtDt!==0)?(s.beginPath(),s.fillStyle=pt.multiKeyBackground,b4(s,{x:Tr,y:Mr,w:te,h:jt,radius:mn}),s.fill(),s.stroke(),s.fillStyle=_t.backgroundColor,s.beginPath(),b4(s,{x:Vr,y:Mr+1,w:te-2,h:jt-2,radius:mn}),s.fill()):(s.fillStyle=pt.multiKeyBackground,s.fillRect(Tr,Mr,te,jt),s.strokeRect(Tr,Mr,te,jt),s.fillStyle=_t.backgroundColor,s.fillRect(Vr,Mr+1,te-2,jt-2))}s.fillStyle=this.labelTextColors[B]}drawBody(s,E,B){const{body:K}=this,{bodySpacing:pt,bodyAlign:_t,displayColors:Ot,boxHeight:jt,boxWidth:te,boxPadding:he}=B,De=Qp(B.bodyFont);let er=De.lineHeight,pr=0;const Mr=f_(B.rtl,this.x,this.width),Tr=function(Un){E.fillText(Un,Mr.x(s.x+pr),s.y+er/2),s.y+=er+pt},Vr=Mr.textAlign(_t);let mn,Dt,cn,Jn,Bn,ni,Wi;for(E.textAlign=_t,E.textBaseline="middle",E.font=De.string,s.x=q5(this,Vr,B),E.fillStyle=B.bodyColor,Xh(this.beforeBody,Tr),pr=Ot&&Vr!=="right"?_t==="center"?te/2+he:te+2+he:0,Jn=0,ni=K.length;Jn0&&E.stroke()}_updateAnimationTarget(s){const E=this.chart,B=this.$animations,K=B&&B.x,pt=B&&B.y;if(K||pt){const _t=_2[s.position].call(this,this._active,this._eventPosition);if(!_t)return;const Ot=this._size=uI(this,s),jt=Object.assign({},_t,this._size),te=cI(E,s,jt),he=hI(s,jt,te,E);(K._to!==he.x||pt._to!==he.y)&&(this.xAlign=te.xAlign,this.yAlign=te.yAlign,this.width=Ot.width,this.height=Ot.height,this.caretX=_t.x,this.caretY=_t.y,this._resolveAnimations().update(this,he))}}_willRender(){return!!this.opacity}draw(s){const E=this.options.setContext(this.getContext());let B=this.opacity;if(!B)return;this._updateAnimationTarget(E);const K={width:this.width,height:this.height},pt={x:this.x,y:this.y};B=Math.abs(B)<.001?0:B;const _t=fm(E.padding),Ot=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;E.enabled&&Ot&&(s.save(),s.globalAlpha=B,this.drawBackground(pt,s,K,E),xD(s,E.textDirection),pt.y+=_t.top,this.drawTitle(pt,s,E),this.drawBody(pt,s,E),this.drawFooter(pt,s,E),_D(s,E.textDirection),s.restore())}getActiveElements(){return this._active||[]}setActiveElements(s,E){const B=this._active,K=s.map(({datasetIndex:Ot,index:jt})=>{const te=this.chart.getDatasetMeta(Ot);if(!te)throw new Error("Cannot find a dataset at index "+Ot);return{datasetIndex:Ot,element:te.data[jt],index:jt}}),pt=!y4(B,K),_t=this._positionChanged(K,E);(pt||_t)&&(this._active=K,this._eventPosition=E,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(s,E,B=!0){if(E&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const K=this.options,pt=this._active||[],_t=this._getActiveElements(s,pt,E,B),Ot=this._positionChanged(_t,s),jt=E||!y4(_t,pt)||Ot;return jt&&(this._active=_t,(K.enabled||K.external)&&(this._eventPosition={x:s.x,y:s.y},this.update(!0,E))),jt}_getActiveElements(s,E,B,K){const pt=this.options;if(s.type==="mouseout")return[];if(!K)return E.filter(Ot=>this.chart.data.datasets[Ot.datasetIndex]&&this.chart.getDatasetMeta(Ot.datasetIndex).controller.getParsed(Ot.index)!==void 0);const _t=this.chart.getElementsAtEventForMode(s,pt.mode,pt,B);return pt.reverse&&_t.reverse(),_t}_positionChanged(s,E){const{caretX:B,caretY:K,options:pt}=this,_t=_2[pt.position].call(this,s,E);return _t!==!1&&(B!==_t.x||K!==_t.y)}}var Zht={id:"tooltip",_element:pI,positioners:_2,afterInit(d,s,E){E&&(d.tooltip=new pI({chart:d,options:E}))},beforeUpdate(d,s,E){d.tooltip&&d.tooltip.initialize(E)},reset(d,s,E){d.tooltip&&d.tooltip.initialize(E)},afterDraw(d){const s=d.tooltip;if(s&&s._willRender()){const E={tooltip:s};if(d.notifyPlugins("beforeTooltipDraw",{...E,cancelable:!0})===!1)return;s.draw(d.ctx),d.notifyPlugins("afterTooltipDraw",E)}},afterEvent(d,s){if(d.tooltip){const E=s.replay;d.tooltip.handleEvent(s.event,E,s.inChartArea)&&(s.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(d,s)=>s.bodyFont.size,boxWidth:(d,s)=>s.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:d=>d!=="filter"&&d!=="itemSort"&&d!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ght=(d,s,E,B)=>(typeof s=="string"?(E=d.push(s)-1,B.unshift({index:E,label:s})):isNaN(s)&&(E=null),E);function Yht(d,s,E,B){const K=d.indexOf(s);if(K===-1)return Ght(d,s,E,B);const pt=d.lastIndexOf(s);return K!==pt?E:K}const Kht=(d,s)=>d===null?null:Jp(Math.round(d),0,s);function mI(d){const s=this.getLabels();return d>=0&&dE.length-1?null:this.getPixelForValue(E[s].value)}getValueForPixel(s){return Math.round(this._startValue+this.getDecimalForPixel(s)*this._valueRange)}getBasePixel(){return this.bottom}}function Jht(d,s){const E=[],{bounds:K,step:pt,min:_t,max:Ot,precision:jt,count:te,maxTicks:he,maxDigits:De,includeBounds:er}=d,pr=pt||1,Mr=he-1,{min:Tr,max:Vr}=s,mn=!Bh(_t),Dt=!Bh(Ot),cn=!Bh(te),Jn=(Vr-Tr)/(De+1);let Bn=hP((Vr-Tr)/Mr/pr)*pr,ni,Wi,Un,qr;if(Bn<1e-14&&!mn&&!Dt)return[{value:Tr},{value:Vr}];qr=Math.ceil(Vr/Bn)-Math.floor(Tr/Bn),qr>Mr&&(Bn=hP(qr*Bn/Mr/pr)*pr),Bh(jt)||(ni=Math.pow(10,jt),Bn=Math.ceil(Bn*ni)/ni),K==="ticks"?(Wi=Math.floor(Tr/Bn)*Bn,Un=Math.ceil(Vr/Bn)*Bn):(Wi=Tr,Un=Vr),mn&&Dt&&pt&&Yst((Ot-_t)/pt,Bn/1e3)?(qr=Math.round(Math.min((Ot-_t)/Bn,he)),Bn=(Ot-_t)/qr,Wi=_t,Un=Ot):cn?(Wi=mn?_t:Wi,Un=Dt?Ot:Un,qr=te-1,Bn=(Un-Wi)/qr):(qr=(Un-Wi)/Bn,P2(qr,Math.round(qr),Bn/1e3)?qr=Math.round(qr):qr=Math.ceil(qr));const Di=Math.max(fP(Bn),fP(Wi));ni=Math.pow(10,Bh(jt)?Di:jt),Wi=Math.round(Wi*ni)/ni,Un=Math.round(Un*ni)/ni;let Fi=0;for(mn&&(er&&Wi!==_t?(E.push({value:_t}),Wi<_t&&Fi++,P2(Math.round((Wi+Fi*Bn)*ni)/ni,_t,gI(_t,Jn,d))&&Fi++):Wi<_t&&Fi++);FiOt)break;E.push({value:Pi})}return Dt&&er&&Un!==Ot?E.length&&P2(E[E.length-1].value,Ot,gI(Ot,Jn,d))?E[E.length-1].value=Ot:E.push({value:Ot}):(!Dt||Un===Ot)&&E.push({value:Un}),E}function gI(d,s,{horizontal:E,minRotation:B}){const K=rv(B),pt=(E?Math.sin(K):Math.cos(K))||.001,_t=.75*s*(""+d).length;return Math.min(s/pt,_t)}class Qht extends T_{constructor(s){super(s),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(s,E){return Bh(s)||(typeof s=="number"||s instanceof Number)&&!isFinite(+s)?null:+s}handleTickRangeOptions(){const{beginAtZero:s}=this.options,{minDefined:E,maxDefined:B}=this.getUserBounds();let{min:K,max:pt}=this;const _t=jt=>K=E?K:jt,Ot=jt=>pt=B?pt:jt;if(s){const jt=pg(K),te=pg(pt);jt<0&&te<0?Ot(0):jt>0&&te>0&&_t(0)}if(K===pt){let jt=pt===0?1:Math.abs(pt*.05);Ot(pt+jt),s||_t(K-jt)}this.min=K,this.max=pt}getTickLimit(){const s=this.options.ticks;let{maxTicksLimit:E,stepSize:B}=s,K;return B?(K=Math.ceil(this.max/B)-Math.floor(this.min/B)+1,K>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${B} would result generating up to ${K} ticks. Limiting to 1000.`),K=1e3)):(K=this.computeTickLimit(),E=E||11),E&&(K=Math.min(E,K)),K}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const s=this.options,E=s.ticks;let B=this.getTickLimit();B=Math.max(2,B);const K={maxTicks:B,bounds:s.bounds,min:s.min,max:s.max,precision:E.precision,step:E.stepSize,count:E.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:E.minRotation||0,includeBounds:E.includeBounds!==!1},pt=this._range||this,_t=Jht(K,pt);return s.bounds==="ticks"&&Kst(_t,this,"value"),s.reverse?(_t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),_t}configure(){const s=this.ticks;let E=this.min,B=this.max;if(super.configure(),this.options.offset&&s.length){const K=(B-E)/Math.max(s.length-1,1)/2;E-=K,B+=K}this._startValue=E,this._endValue=B,this._valueRange=B-E}getLabelForValue(s){return bM(s,this.chart.options.locale,this.options.ticks.format)}}class tft extends Qht{static id="linear";static defaults={ticks:{callback:hD.formatters.numeric}};determineDataLimits(){const{min:s,max:E}=this.getMinMax(!0);this.min=t0(s)?s:0,this.max=t0(E)?E:1,this.handleTickRangeOptions()}computeTickLimit(){const s=this.isHorizontal(),E=s?this.width:this.height,B=rv(this.options.ticks.minRotation),K=(s?Math.sin(B):Math.cos(B))||.001,pt=this._resolveTickFontOptions(0);return Math.ceil(E/Math.min(40,pt.lineHeight/K))}getPixelForValue(s){return s===null?NaN:this.getPixelForDecimal((s-this._startValue)/this._valueRange)}getValueForPixel(s){return this._startValue+this.getDecimalForPixel(s)*this._valueRange}}const e6={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},M0=Object.keys(e6);function vI(d,s){return d-s}function yI(d,s){if(Bh(s))return null;const E=d._adapter,{parser:B,round:K,isoWeekday:pt}=d._parseOpts;let _t=s;return typeof B=="function"&&(_t=B(_t)),t0(_t)||(_t=typeof B=="string"?E.parse(_t,B):E.parse(_t)),_t===null?null:(K&&(_t=K==="week"&&(G2(pt)||pt===!0)?E.startOf(_t,"isoWeek",pt):E.startOf(_t,K)),+_t)}function xI(d,s,E,B){const K=M0.length;for(let pt=M0.indexOf(d);pt=M0.indexOf(E);pt--){const _t=M0[pt];if(e6[_t].common&&d._adapter.diff(K,B,_t)>=s-1)return _t}return M0[E?M0.indexOf(E):0]}function rft(d){for(let s=M0.indexOf(d)+1,E=M0.length;s=s?E[B]:E[K];d[pt]=!0}}function nft(d,s,E,B){const K=d._adapter,pt=+K.startOf(s[0].value,B),_t=s[s.length-1].value;let Ot,jt;for(Ot=pt;Ot<=_t;Ot=+K.add(Ot,1,B))jt=E[Ot],jt>=0&&(s[jt].major=!0);return s}function bI(d,s,E){const B=[],K={},pt=s.length;let _t,Ot;for(_t=0;_t+s.value))}initOffsets(s=[]){let E=0,B=0,K,pt;this.options.offset&&s.length&&(K=this.getDecimalForValue(s[0]),s.length===1?E=1-K:E=(this.getDecimalForValue(s[1])-K)/2,pt=this.getDecimalForValue(s[s.length-1]),s.length===1?B=pt:B=(pt-this.getDecimalForValue(s[s.length-2]))/2);const _t=s.length<3?.5:.25;E=Jp(E,0,_t),B=Jp(B,0,_t),this._offsets={start:E,end:B,factor:1/(E+1+B)}}_generate(){const s=this._adapter,E=this.min,B=this.max,K=this.options,pt=K.time,_t=pt.unit||xI(pt.minUnit,E,B,this._getLabelCapacity(E)),Ot=cc(K.ticks.stepSize,1),jt=_t==="week"?pt.isoWeekday:!1,te=G2(jt)||jt===!0,he={};let De=E,er,pr;if(te&&(De=+s.startOf(De,"isoWeek",jt)),De=+s.startOf(De,te?"day":_t),s.diff(B,E,_t)>1e5*Ot)throw new Error(E+" and "+B+" are too far apart with stepSize of "+Ot+" "+_t);const Mr=K.ticks.source==="data"&&this.getDataTimestamps();for(er=De,pr=0;er+Tr)}getLabelForValue(s){const E=this._adapter,B=this.options.time;return B.tooltipFormat?E.format(s,B.tooltipFormat):E.format(s,B.displayFormats.datetime)}format(s,E){const K=this.options.time.displayFormats,pt=this._unit,_t=E||K[pt];return this._adapter.format(s,_t)}_tickFormatFunction(s,E,B,K){const pt=this.options,_t=pt.ticks.callback;if(_t)return Df(_t,[s,E,B],this);const Ot=pt.time.displayFormats,jt=this._unit,te=this._majorUnit,he=jt&&Ot[jt],De=te&&Ot[te],er=B[E],pr=te&&De&&er&&er.major;return this._adapter.format(s,K||(pr?De:he))}generateTickLabels(s){let E,B,K;for(E=0,B=s.length;E0?Ot:1}getDataTimestamps(){let s=this._cache.data||[],E,B;if(s.length)return s;const K=this.getMatchingVisibleMetas();if(this._normalized&&K.length)return this._cache.data=K[0].controller.getAllParsedValues(this);for(E=0,B=K.length;E=d[B].pos&&s<=d[K].pos&&({lo:B,hi:K}=by(d,"pos",s)),{pos:pt,time:Ot}=d[B],{pos:_t,time:jt}=d[K]):(s>=d[B].time&&s<=d[K].time&&({lo:B,hi:K}=by(d,"time",s)),{time:pt,pos:Ot}=d[B],{time:_t,pos:jt}=d[K]);const te=_t-pt;return te?Ot+(jt-Ot)*(s-pt)/te:Ot}class q1t extends OA{static id="timeseries";static defaults=OA.defaults;constructor(s){super(s),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const s=this._getTimestampsForTable(),E=this._table=this.buildLookupTable(s);this._minPos=$5(E,this.min),this._tableRange=$5(E,this.max)-this._minPos,super.initOffsets(s)}buildLookupTable(s){const{min:E,max:B}=this,K=[],pt=[];let _t,Ot,jt,te,he;for(_t=0,Ot=s.length;_t=E&&te<=B&&K.push(te);if(K.length<2)return[{time:E,pos:0},{time:B,pos:1}];for(_t=0,Ot=K.length;_tK-pt)}_getTimestampsForTable(){let s=this._cache.all||[];if(s.length)return s;const E=this.getDataTimestamps(),B=this.getLabelTimestamps();return E.length&&B.length?s=this.normalize(E.concat(B)):s=E.length?E:B,s=this._cache.all=s,s}getDecimalForValue(s){return($5(this._table,s)-this._minPos)/this._tableRange}getValueForPixel(s){const E=this._offsets,B=this.getDecimalForPixel(s)/E.factor-E.end;return $5(this._table,B*this._tableRange+this._minPos,!0)}}const $D=6048e5,ift=864e5,uw=6e4,cw=36e5,aft=1e3,wI=Symbol.for("constructDateFrom");function bd(d,s){return typeof d=="function"?d(s):d&&typeof d=="object"&&wI in d?d[wI](s):d instanceof Date?new d.constructor(s):new Date(s)}function Hu(d,s){return bd(s||d,d)}function r6(d,s,E){const B=Hu(d,E?.in);return isNaN(s)?bd(E?.in||d,NaN):(s&&B.setDate(B.getDate()+s),B)}function CM(d,s,E){const B=Hu(d,E?.in);if(isNaN(s))return bd(d,NaN);if(!s)return B;const K=B.getDate(),pt=bd(d,B.getTime());pt.setMonth(B.getMonth()+s+1,0);const _t=pt.getDate();return K>=_t?pt:(B.setFullYear(pt.getFullYear(),pt.getMonth(),K),B)}function LM(d,s,E){return bd(d,+Hu(d)+s)}function oft(d,s,E){return LM(d,s*cw)}let sft={};function Oy(){return sft}function mg(d,s){const E=Oy(),B=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??E.weekStartsOn??E.locale?.options?.weekStartsOn??0,K=Hu(d,s?.in),pt=K.getDay(),_t=(pt=pt.getTime()?B+1:E.getTime()>=Ot.getTime()?B:B-1}function A4(d){const s=Hu(d),E=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return E.setUTCFullYear(s.getFullYear()),+d-+E}function Dy(d,...s){const E=bd.bind(null,s.find(B=>typeof B=="object"));return s.map(E)}function DA(d,s){const E=Hu(d,s?.in);return E.setHours(0,0,0,0),E}function GD(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=DA(B),_t=DA(K),Ot=+pt-A4(pt),jt=+_t-A4(_t);return Math.round((Ot-jt)/ift)}function lft(d,s){const E=ZD(d,s),B=bd(d,0);return B.setFullYear(E,0,4),B.setHours(0,0,0,0),b_(B)}function uft(d,s,E){const B=Hu(d,E?.in);return B.setTime(B.getTime()+s*uw),B}function cft(d,s,E){return CM(d,s*3,E)}function hft(d,s,E){return LM(d,s*1e3)}function fft(d,s,E){return r6(d,s*7,E)}function dft(d,s,E){return CM(d,s*12,E)}function O2(d,s){const E=+Hu(d)-+Hu(s);return E<0?-1:E>0?1:E}function pft(d){return d instanceof Date||typeof d=="object"&&Object.prototype.toString.call(d)==="[object Date]"}function YD(d){return!(!pft(d)&&typeof d!="number"||isNaN(+Hu(d)))}function mft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=B.getFullYear()-K.getFullYear(),_t=B.getMonth()-K.getMonth();return pt*12+_t}function gft(d,s,E){const[B,K]=Dy(E?.in,d,s);return B.getFullYear()-K.getFullYear()}function KD(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=kI(B,K),_t=Math.abs(GD(B,K));B.setDate(B.getDate()-pt*_t);const Ot=+(kI(B,K)===-pt),jt=pt*(_t-Ot);return jt===0?0:jt}function kI(d,s){const E=d.getFullYear()-s.getFullYear()||d.getMonth()-s.getMonth()||d.getDate()-s.getDate()||d.getHours()-s.getHours()||d.getMinutes()-s.getMinutes()||d.getSeconds()-s.getSeconds()||d.getMilliseconds()-s.getMilliseconds();return E<0?-1:E>0?1:E}function hw(d){return s=>{const B=(d?Math[d]:Math.trunc)(s);return B===0?0:B}}function vft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=(+B-+K)/cw;return hw(E?.roundingMethod)(pt)}function PM(d,s){return+Hu(d)-+Hu(s)}function yft(d,s,E){const B=PM(d,s)/uw;return hw(E?.roundingMethod)(B)}function XD(d,s){const E=Hu(d,s?.in);return E.setHours(23,59,59,999),E}function JD(d,s){const E=Hu(d,s?.in),B=E.getMonth();return E.setFullYear(E.getFullYear(),B+1,0),E.setHours(23,59,59,999),E}function xft(d,s){const E=Hu(d,s?.in);return+XD(E,s)==+JD(E,s)}function QD(d,s,E){const[B,K,pt]=Dy(E?.in,d,d,s),_t=O2(K,pt),Ot=Math.abs(mft(K,pt));if(Ot<1)return 0;K.getMonth()===1&&K.getDate()>27&&K.setDate(30),K.setMonth(K.getMonth()-_t*Ot);let jt=O2(K,pt)===-_t;xft(B)&&Ot===1&&O2(B,pt)===1&&(jt=!1);const te=_t*(Ot-+jt);return te===0?0:te}function _ft(d,s,E){const B=QD(d,s,E)/3;return hw(E?.roundingMethod)(B)}function bft(d,s,E){const B=PM(d,s)/1e3;return hw(E?.roundingMethod)(B)}function wft(d,s,E){const B=KD(d,s,E)/7;return hw(E?.roundingMethod)(B)}function kft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=O2(B,K),_t=Math.abs(gft(B,K));B.setFullYear(1584),K.setFullYear(1584);const Ot=O2(B,K)===-pt,jt=pt*(_t-+Ot);return jt===0?0:jt}function Tft(d,s){const E=Hu(d,s?.in),B=E.getMonth(),K=B-B%3;return E.setMonth(K,1),E.setHours(0,0,0,0),E}function Aft(d,s){const E=Hu(d,s?.in);return E.setDate(1),E.setHours(0,0,0,0),E}function Mft(d,s){const E=Hu(d,s?.in),B=E.getFullYear();return E.setFullYear(B+1,0,0),E.setHours(23,59,59,999),E}function tF(d,s){const E=Hu(d,s?.in);return E.setFullYear(E.getFullYear(),0,1),E.setHours(0,0,0,0),E}function Sft(d,s){const E=Hu(d,s?.in);return E.setMinutes(59,59,999),E}function Eft(d,s){const E=Oy(),B=E.weekStartsOn??E.locale?.options?.weekStartsOn??0,K=Hu(d,s?.in),pt=K.getDay(),_t=(pt{let B;const K=Ift[d];return typeof K=="string"?B=K:s===1?B=K.one:B=K.other.replace("{{count}}",s.toString()),E?.addSuffix?E.comparison&&E.comparison>0?"in "+B:B+" ago":B};function tA(d){return(s={})=>{const E=s.width?String(s.width):d.defaultWidth;return d.formats[E]||d.formats[d.defaultWidth]}}const Oft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dft={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fft={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rft={date:tA({formats:Oft,defaultWidth:"full"}),time:tA({formats:Dft,defaultWidth:"full"}),dateTime:tA({formats:Fft,defaultWidth:"full"})},Bft={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nft=(d,s,E,B)=>Bft[d];function f2(d){return(s,E)=>{const B=E?.context?String(E.context):"standalone";let K;if(B==="formatting"&&d.formattingValues){const _t=d.defaultFormattingWidth||d.defaultWidth,Ot=E?.width?String(E.width):_t;K=d.formattingValues[Ot]||d.formattingValues[_t]}else{const _t=d.defaultWidth,Ot=E?.width?String(E.width):d.defaultWidth;K=d.values[Ot]||d.values[_t]}const pt=d.argumentCallback?d.argumentCallback(s):s;return K[pt]}}const jft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Uft={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$ft=(d,s)=>{const E=Number(d),B=E%100;if(B>20||B<10)switch(B%10){case 1:return E+"st";case 2:return E+"nd";case 3:return E+"rd"}return E+"th"},Zft={ordinalNumber:$ft,era:f2({values:jft,defaultWidth:"wide"}),quarter:f2({values:Uft,defaultWidth:"wide",argumentCallback:d=>d-1}),month:f2({values:Vft,defaultWidth:"wide"}),day:f2({values:Hft,defaultWidth:"wide"}),dayPeriod:f2({values:Wft,defaultWidth:"wide",formattingValues:qft,defaultFormattingWidth:"wide"})};function d2(d){return(s,E={})=>{const B=E.width,K=B&&d.matchPatterns[B]||d.matchPatterns[d.defaultMatchWidth],pt=s.match(K);if(!pt)return null;const _t=pt[0],Ot=B&&d.parsePatterns[B]||d.parsePatterns[d.defaultParseWidth],jt=Array.isArray(Ot)?Yft(Ot,De=>De.test(_t)):Gft(Ot,De=>De.test(_t));let te;te=d.valueCallback?d.valueCallback(jt):jt,te=E.valueCallback?E.valueCallback(te):te;const he=s.slice(_t.length);return{value:te,rest:he}}}function Gft(d,s){for(const E in d)if(Object.prototype.hasOwnProperty.call(d,E)&&s(d[E]))return E}function Yft(d,s){for(let E=0;E{const B=s.match(d.matchPattern);if(!B)return null;const K=B[0],pt=s.match(d.parsePattern);if(!pt)return null;let _t=d.valueCallback?d.valueCallback(pt[0]):pt[0];_t=E.valueCallback?E.valueCallback(_t):_t;const Ot=s.slice(K.length);return{value:_t,rest:Ot}}}const Xft=/^(\d+)(th|st|nd|rd)?/i,Jft=/\d+/i,Qft={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tdt={any:[/^b/i,/^(a|c)/i]},edt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rdt={any:[/1/i,/2/i,/3/i,/4/i]},ndt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},idt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},adt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},odt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sdt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ldt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},udt={ordinalNumber:Kft({matchPattern:Xft,parsePattern:Jft,valueCallback:d=>parseInt(d,10)}),era:d2({matchPatterns:Qft,defaultMatchWidth:"wide",parsePatterns:tdt,defaultParseWidth:"any"}),quarter:d2({matchPatterns:edt,defaultMatchWidth:"wide",parsePatterns:rdt,defaultParseWidth:"any",valueCallback:d=>d+1}),month:d2({matchPatterns:ndt,defaultMatchWidth:"wide",parsePatterns:idt,defaultParseWidth:"any"}),day:d2({matchPatterns:adt,defaultMatchWidth:"wide",parsePatterns:odt,defaultParseWidth:"any"}),dayPeriod:d2({matchPatterns:sdt,defaultMatchWidth:"any",parsePatterns:ldt,defaultParseWidth:"any"})},eF={code:"en-US",formatDistance:zft,formatLong:Rft,formatRelative:Nft,localize:Zft,match:udt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cdt(d,s){const E=Hu(d,s?.in);return GD(E,tF(E))+1}function rF(d,s){const E=Hu(d,s?.in),B=+b_(E)-+lft(E);return Math.round(B/$D)+1}function IM(d,s){const E=Hu(d,s?.in),B=E.getFullYear(),K=Oy(),pt=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??K.firstWeekContainsDate??K.locale?.options?.firstWeekContainsDate??1,_t=bd(s?.in||d,0);_t.setFullYear(B+1,0,pt),_t.setHours(0,0,0,0);const Ot=mg(_t,s),jt=bd(s?.in||d,0);jt.setFullYear(B,0,pt),jt.setHours(0,0,0,0);const te=mg(jt,s);return+E>=+Ot?B+1:+E>=+te?B:B-1}function hdt(d,s){const E=Oy(),B=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??E.firstWeekContainsDate??E.locale?.options?.firstWeekContainsDate??1,K=IM(d,s),pt=bd(s?.in||d,0);return pt.setFullYear(K,0,B),pt.setHours(0,0,0,0),mg(pt,s)}function nF(d,s){const E=Hu(d,s?.in),B=+mg(E,s)-+hdt(E,s);return Math.round(B/$D)+1}function Kh(d,s){const E=d<0?"-":"",B=Math.abs(d).toString().padStart(s,"0");return E+B}const t1={y(d,s){const E=d.getFullYear(),B=E>0?E:1-E;return Kh(s==="yy"?B%100:B,s.length)},M(d,s){const E=d.getMonth();return s==="M"?String(E+1):Kh(E+1,2)},d(d,s){return Kh(d.getDate(),s.length)},a(d,s){const E=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.toUpperCase();case"aaa":return E;case"aaaaa":return E[0];case"aaaa":default:return E==="am"?"a.m.":"p.m."}},h(d,s){return Kh(d.getHours()%12||12,s.length)},H(d,s){return Kh(d.getHours(),s.length)},m(d,s){return Kh(d.getMinutes(),s.length)},s(d,s){return Kh(d.getSeconds(),s.length)},S(d,s){const E=s.length,B=d.getMilliseconds(),K=Math.trunc(B*Math.pow(10,E-3));return Kh(K,s.length)}},n_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},TI={G:function(d,s,E){const B=d.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return E.era(B,{width:"abbreviated"});case"GGGGG":return E.era(B,{width:"narrow"});case"GGGG":default:return E.era(B,{width:"wide"})}},y:function(d,s,E){if(s==="yo"){const B=d.getFullYear(),K=B>0?B:1-B;return E.ordinalNumber(K,{unit:"year"})}return t1.y(d,s)},Y:function(d,s,E,B){const K=IM(d,B),pt=K>0?K:1-K;if(s==="YY"){const _t=pt%100;return Kh(_t,2)}return s==="Yo"?E.ordinalNumber(pt,{unit:"year"}):Kh(pt,s.length)},R:function(d,s){const E=ZD(d);return Kh(E,s.length)},u:function(d,s){const E=d.getFullYear();return Kh(E,s.length)},Q:function(d,s,E){const B=Math.ceil((d.getMonth()+1)/3);switch(s){case"Q":return String(B);case"QQ":return Kh(B,2);case"Qo":return E.ordinalNumber(B,{unit:"quarter"});case"QQQ":return E.quarter(B,{width:"abbreviated",context:"formatting"});case"QQQQQ":return E.quarter(B,{width:"narrow",context:"formatting"});case"QQQQ":default:return E.quarter(B,{width:"wide",context:"formatting"})}},q:function(d,s,E){const B=Math.ceil((d.getMonth()+1)/3);switch(s){case"q":return String(B);case"qq":return Kh(B,2);case"qo":return E.ordinalNumber(B,{unit:"quarter"});case"qqq":return E.quarter(B,{width:"abbreviated",context:"standalone"});case"qqqqq":return E.quarter(B,{width:"narrow",context:"standalone"});case"qqqq":default:return E.quarter(B,{width:"wide",context:"standalone"})}},M:function(d,s,E){const B=d.getMonth();switch(s){case"M":case"MM":return t1.M(d,s);case"Mo":return E.ordinalNumber(B+1,{unit:"month"});case"MMM":return E.month(B,{width:"abbreviated",context:"formatting"});case"MMMMM":return E.month(B,{width:"narrow",context:"formatting"});case"MMMM":default:return E.month(B,{width:"wide",context:"formatting"})}},L:function(d,s,E){const B=d.getMonth();switch(s){case"L":return String(B+1);case"LL":return Kh(B+1,2);case"Lo":return E.ordinalNumber(B+1,{unit:"month"});case"LLL":return E.month(B,{width:"abbreviated",context:"standalone"});case"LLLLL":return E.month(B,{width:"narrow",context:"standalone"});case"LLLL":default:return E.month(B,{width:"wide",context:"standalone"})}},w:function(d,s,E,B){const K=nF(d,B);return s==="wo"?E.ordinalNumber(K,{unit:"week"}):Kh(K,s.length)},I:function(d,s,E){const B=rF(d);return s==="Io"?E.ordinalNumber(B,{unit:"week"}):Kh(B,s.length)},d:function(d,s,E){return s==="do"?E.ordinalNumber(d.getDate(),{unit:"date"}):t1.d(d,s)},D:function(d,s,E){const B=cdt(d);return s==="Do"?E.ordinalNumber(B,{unit:"dayOfYear"}):Kh(B,s.length)},E:function(d,s,E){const B=d.getDay();switch(s){case"E":case"EE":case"EEE":return E.day(B,{width:"abbreviated",context:"formatting"});case"EEEEE":return E.day(B,{width:"narrow",context:"formatting"});case"EEEEEE":return E.day(B,{width:"short",context:"formatting"});case"EEEE":default:return E.day(B,{width:"wide",context:"formatting"})}},e:function(d,s,E,B){const K=d.getDay(),pt=(K-B.weekStartsOn+8)%7||7;switch(s){case"e":return String(pt);case"ee":return Kh(pt,2);case"eo":return E.ordinalNumber(pt,{unit:"day"});case"eee":return E.day(K,{width:"abbreviated",context:"formatting"});case"eeeee":return E.day(K,{width:"narrow",context:"formatting"});case"eeeeee":return E.day(K,{width:"short",context:"formatting"});case"eeee":default:return E.day(K,{width:"wide",context:"formatting"})}},c:function(d,s,E,B){const K=d.getDay(),pt=(K-B.weekStartsOn+8)%7||7;switch(s){case"c":return String(pt);case"cc":return Kh(pt,s.length);case"co":return E.ordinalNumber(pt,{unit:"day"});case"ccc":return E.day(K,{width:"abbreviated",context:"standalone"});case"ccccc":return E.day(K,{width:"narrow",context:"standalone"});case"cccccc":return E.day(K,{width:"short",context:"standalone"});case"cccc":default:return E.day(K,{width:"wide",context:"standalone"})}},i:function(d,s,E){const B=d.getDay(),K=B===0?7:B;switch(s){case"i":return String(K);case"ii":return Kh(K,s.length);case"io":return E.ordinalNumber(K,{unit:"day"});case"iii":return E.day(B,{width:"abbreviated",context:"formatting"});case"iiiii":return E.day(B,{width:"narrow",context:"formatting"});case"iiiiii":return E.day(B,{width:"short",context:"formatting"});case"iiii":default:return E.day(B,{width:"wide",context:"formatting"})}},a:function(d,s,E){const K=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"aaa":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"aaaa":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},b:function(d,s,E){const B=d.getHours();let K;switch(B===12?K=n_.noon:B===0?K=n_.midnight:K=B/12>=1?"pm":"am",s){case"b":case"bb":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"bbb":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"bbbb":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},B:function(d,s,E){const B=d.getHours();let K;switch(B>=17?K=n_.evening:B>=12?K=n_.afternoon:B>=4?K=n_.morning:K=n_.night,s){case"B":case"BB":case"BBB":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"BBBBB":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"BBBB":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},h:function(d,s,E){if(s==="ho"){let B=d.getHours()%12;return B===0&&(B=12),E.ordinalNumber(B,{unit:"hour"})}return t1.h(d,s)},H:function(d,s,E){return s==="Ho"?E.ordinalNumber(d.getHours(),{unit:"hour"}):t1.H(d,s)},K:function(d,s,E){const B=d.getHours()%12;return s==="Ko"?E.ordinalNumber(B,{unit:"hour"}):Kh(B,s.length)},k:function(d,s,E){let B=d.getHours();return B===0&&(B=24),s==="ko"?E.ordinalNumber(B,{unit:"hour"}):Kh(B,s.length)},m:function(d,s,E){return s==="mo"?E.ordinalNumber(d.getMinutes(),{unit:"minute"}):t1.m(d,s)},s:function(d,s,E){return s==="so"?E.ordinalNumber(d.getSeconds(),{unit:"second"}):t1.s(d,s)},S:function(d,s){return t1.S(d,s)},X:function(d,s,E){const B=d.getTimezoneOffset();if(B===0)return"Z";switch(s){case"X":return MI(B);case"XXXX":case"XX":return gy(B);case"XXXXX":case"XXX":default:return gy(B,":")}},x:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"x":return MI(B);case"xxxx":case"xx":return gy(B);case"xxxxx":case"xxx":default:return gy(B,":")}},O:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+AI(B,":");case"OOOO":default:return"GMT"+gy(B,":")}},z:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+AI(B,":");case"zzzz":default:return"GMT"+gy(B,":")}},t:function(d,s,E){const B=Math.trunc(+d/1e3);return Kh(B,s.length)},T:function(d,s,E){return Kh(+d,s.length)}};function AI(d,s=""){const E=d>0?"-":"+",B=Math.abs(d),K=Math.trunc(B/60),pt=B%60;return pt===0?E+String(K):E+String(K)+s+Kh(pt,2)}function MI(d,s){return d%60===0?(d>0?"-":"+")+Kh(Math.abs(d)/60,2):gy(d,s)}function gy(d,s=""){const E=d>0?"-":"+",B=Math.abs(d),K=Kh(Math.trunc(B/60),2),pt=Kh(B%60,2);return E+K+s+pt}const SI=(d,s)=>{switch(d){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},iF=(d,s)=>{switch(d){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},fdt=(d,s)=>{const E=d.match(/(P+)(p+)?/)||[],B=E[1],K=E[2];if(!K)return SI(d,s);let pt;switch(B){case"P":pt=s.dateTime({width:"short"});break;case"PP":pt=s.dateTime({width:"medium"});break;case"PPP":pt=s.dateTime({width:"long"});break;case"PPPP":default:pt=s.dateTime({width:"full"});break}return pt.replace("{{date}}",SI(B,s)).replace("{{time}}",iF(K,s))},FA={p:iF,P:fdt},ddt=/^D+$/,pdt=/^Y+$/,mdt=["D","DD","YY","YYYY"];function aF(d){return ddt.test(d)}function oF(d){return pdt.test(d)}function RA(d,s,E){const B=gdt(d,s,E);if(console.warn(B),mdt.includes(d))throw new RangeError(B)}function gdt(d,s,E){const B=d[0]==="Y"?"years":"days of the month";return`Use \`${d.toLowerCase()}\` instead of \`${d}\` (in \`${s}\`) for formatting ${B} to the input \`${E}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vdt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ydt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xdt=/^'([^]*?)'?$/,_dt=/''/g,bdt=/[a-zA-Z]/;function wdt(d,s,E){const B=Oy(),K=E?.locale??B.locale??eF,pt=E?.firstWeekContainsDate??E?.locale?.options?.firstWeekContainsDate??B.firstWeekContainsDate??B.locale?.options?.firstWeekContainsDate??1,_t=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??B.weekStartsOn??B.locale?.options?.weekStartsOn??0,Ot=Hu(d,E?.in);if(!YD(Ot))throw new RangeError("Invalid time value");let jt=s.match(ydt).map(he=>{const De=he[0];if(De==="p"||De==="P"){const er=FA[De];return er(he,K.formatLong)}return he}).join("").match(vdt).map(he=>{if(he==="''")return{isToken:!1,value:"'"};const De=he[0];if(De==="'")return{isToken:!1,value:kdt(he)};if(TI[De])return{isToken:!0,value:he};if(De.match(bdt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+De+"`");return{isToken:!1,value:he}});K.localize.preprocessor&&(jt=K.localize.preprocessor(Ot,jt));const te={firstWeekContainsDate:pt,weekStartsOn:_t,locale:K};return jt.map(he=>{if(!he.isToken)return he.value;const De=he.value;(!E?.useAdditionalWeekYearTokens&&oF(De)||!E?.useAdditionalDayOfYearTokens&&aF(De))&&RA(De,s,String(d));const er=TI[De[0]];return er(Ot,De,K.localize,te)}).join("")}function kdt(d){const s=d.match(xdt);return s?s[1].replace(_dt,"'"):d}function Tdt(){return Object.assign({},Oy())}function Adt(d,s){const E=Hu(d,s?.in).getDay();return E===0?7:E}function Mdt(d,s){const E=Sdt(s)?new s(0):bd(s,0);return E.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),E.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),E}function Sdt(d){return typeof d=="function"&&d.prototype?.constructor===d}const Edt=10;class sF{subPriority=0;validate(s,E){return!0}}class Cdt extends sF{constructor(s,E,B,K,pt){super(),this.value=s,this.validateValue=E,this.setValue=B,this.priority=K,pt&&(this.subPriority=pt)}validate(s,E){return this.validateValue(s,this.value,E)}set(s,E,B){return this.setValue(s,E,this.value,B)}}class Ldt extends sF{priority=Edt;subPriority=-1;constructor(s,E){super(),this.context=s||(B=>bd(E,B))}set(s,E){return E.timestampIsSet?s:bd(s,Mdt(s,this.context))}}class Mh{run(s,E,B,K){const pt=this.parse(s,E,B,K);return pt?{setter:new Cdt(pt.value,this.validate,this.set,this.priority,this.subPriority),rest:pt.rest}:null}validate(s,E,B){return!0}}class Pdt extends Mh{priority=140;parse(s,E,B){switch(E){case"G":case"GG":case"GGG":return B.era(s,{width:"abbreviated"})||B.era(s,{width:"narrow"});case"GGGGG":return B.era(s,{width:"narrow"});case"GGGG":default:return B.era(s,{width:"wide"})||B.era(s,{width:"abbreviated"})||B.era(s,{width:"narrow"})}}set(s,E,B){return E.era=B,s.setFullYear(B,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["R","u","t","T"]}const Bd={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},hg={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nd(d,s){return d&&{value:s(d.value),rest:d.rest}}function ad(d,s){const E=s.match(d);return E?{value:parseInt(E[0],10),rest:s.slice(E[0].length)}:null}function fg(d,s){const E=s.match(d);if(!E)return null;if(E[0]==="Z")return{value:0,rest:s.slice(1)};const B=E[1]==="+"?1:-1,K=E[2]?parseInt(E[2],10):0,pt=E[3]?parseInt(E[3],10):0,_t=E[5]?parseInt(E[5],10):0;return{value:B*(K*cw+pt*uw+_t*aft),rest:s.slice(E[0].length)}}function lF(d){return ad(Bd.anyDigitsSigned,d)}function wd(d,s){switch(d){case 1:return ad(Bd.singleDigit,s);case 2:return ad(Bd.twoDigits,s);case 3:return ad(Bd.threeDigits,s);case 4:return ad(Bd.fourDigits,s);default:return ad(new RegExp("^\\d{1,"+d+"}"),s)}}function M4(d,s){switch(d){case 1:return ad(Bd.singleDigitSigned,s);case 2:return ad(Bd.twoDigitsSigned,s);case 3:return ad(Bd.threeDigitsSigned,s);case 4:return ad(Bd.fourDigitsSigned,s);default:return ad(new RegExp("^-?\\d{1,"+d+"}"),s)}}function zM(d){switch(d){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function uF(d,s){const E=s>0,B=E?s:1-s;let K;if(B<=50)K=d||100;else{const pt=B+50,_t=Math.trunc(pt/100)*100,Ot=d>=pt%100;K=d+_t-(Ot?100:0)}return E?K:1-K}function cF(d){return d%400===0||d%4===0&&d%100!==0}class Idt extends Mh{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(s,E,B){const K=pt=>({year:pt,isTwoDigitYear:E==="yy"});switch(E){case"y":return Nd(wd(4,s),K);case"yo":return Nd(B.ordinalNumber(s,{unit:"year"}),K);default:return Nd(wd(E.length,s),K)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,B){const K=s.getFullYear();if(B.isTwoDigitYear){const _t=uF(B.year,K);return s.setFullYear(_t,0,1),s.setHours(0,0,0,0),s}const pt=!("era"in E)||E.era===1?B.year:1-B.year;return s.setFullYear(pt,0,1),s.setHours(0,0,0,0),s}}class zdt extends Mh{priority=130;parse(s,E,B){const K=pt=>({year:pt,isTwoDigitYear:E==="YY"});switch(E){case"Y":return Nd(wd(4,s),K);case"Yo":return Nd(B.ordinalNumber(s,{unit:"year"}),K);default:return Nd(wd(E.length,s),K)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,B,K){const pt=IM(s,K);if(B.isTwoDigitYear){const Ot=uF(B.year,pt);return s.setFullYear(Ot,0,K.firstWeekContainsDate),s.setHours(0,0,0,0),mg(s,K)}const _t=!("era"in E)||E.era===1?B.year:1-B.year;return s.setFullYear(_t,0,K.firstWeekContainsDate),s.setHours(0,0,0,0),mg(s,K)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Odt extends Mh{priority=130;parse(s,E){return M4(E==="R"?4:E.length,s)}set(s,E,B){const K=bd(s,0);return K.setFullYear(B,0,4),K.setHours(0,0,0,0),b_(K)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Ddt extends Mh{priority=130;parse(s,E){return M4(E==="u"?4:E.length,s)}set(s,E,B){return s.setFullYear(B,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Fdt extends Mh{priority=120;parse(s,E,B){switch(E){case"Q":case"QQ":return wd(E.length,s);case"Qo":return B.ordinalNumber(s,{unit:"quarter"});case"QQQ":return B.quarter(s,{width:"abbreviated",context:"formatting"})||B.quarter(s,{width:"narrow",context:"formatting"});case"QQQQQ":return B.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return B.quarter(s,{width:"wide",context:"formatting"})||B.quarter(s,{width:"abbreviated",context:"formatting"})||B.quarter(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=1&&E<=4}set(s,E,B){return s.setMonth((B-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Rdt extends Mh{priority=120;parse(s,E,B){switch(E){case"q":case"qq":return wd(E.length,s);case"qo":return B.ordinalNumber(s,{unit:"quarter"});case"qqq":return B.quarter(s,{width:"abbreviated",context:"standalone"})||B.quarter(s,{width:"narrow",context:"standalone"});case"qqqqq":return B.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return B.quarter(s,{width:"wide",context:"standalone"})||B.quarter(s,{width:"abbreviated",context:"standalone"})||B.quarter(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=1&&E<=4}set(s,E,B){return s.setMonth((B-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Bdt extends Mh{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(s,E,B){const K=pt=>pt-1;switch(E){case"M":return Nd(ad(Bd.month,s),K);case"MM":return Nd(wd(2,s),K);case"Mo":return Nd(B.ordinalNumber(s,{unit:"month"}),K);case"MMM":return B.month(s,{width:"abbreviated",context:"formatting"})||B.month(s,{width:"narrow",context:"formatting"});case"MMMMM":return B.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return B.month(s,{width:"wide",context:"formatting"})||B.month(s,{width:"abbreviated",context:"formatting"})||B.month(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.setMonth(B,1),s.setHours(0,0,0,0),s}}class Ndt extends Mh{priority=110;parse(s,E,B){const K=pt=>pt-1;switch(E){case"L":return Nd(ad(Bd.month,s),K);case"LL":return Nd(wd(2,s),K);case"Lo":return Nd(B.ordinalNumber(s,{unit:"month"}),K);case"LLL":return B.month(s,{width:"abbreviated",context:"standalone"})||B.month(s,{width:"narrow",context:"standalone"});case"LLLLL":return B.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return B.month(s,{width:"wide",context:"standalone"})||B.month(s,{width:"abbreviated",context:"standalone"})||B.month(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.setMonth(B,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function jdt(d,s,E){const B=Hu(d,E?.in),K=nF(B,E)-s;return B.setDate(B.getDate()-K*7),Hu(B,E?.in)}class Udt extends Mh{priority=100;parse(s,E,B){switch(E){case"w":return ad(Bd.week,s);case"wo":return B.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,B,K){return mg(jdt(s,B,K),K)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Vdt(d,s,E){const B=Hu(d,E?.in),K=rF(B,E)-s;return B.setDate(B.getDate()-K*7),B}class Hdt extends Mh{priority=100;parse(s,E,B){switch(E){case"I":return ad(Bd.week,s);case"Io":return B.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,B){return b_(Vdt(s,B))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Wdt=[31,28,31,30,31,30,31,31,30,31,30,31],qdt=[31,29,31,30,31,30,31,31,30,31,30,31];class $dt extends Mh{priority=90;subPriority=1;parse(s,E,B){switch(E){case"d":return ad(Bd.date,s);case"do":return B.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const B=s.getFullYear(),K=cF(B),pt=s.getMonth();return K?E>=1&&E<=qdt[pt]:E>=1&&E<=Wdt[pt]}set(s,E,B){return s.setDate(B),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Zdt extends Mh{priority=90;subpriority=1;parse(s,E,B){switch(E){case"D":case"DD":return ad(Bd.dayOfYear,s);case"Do":return B.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const B=s.getFullYear();return cF(B)?E>=1&&E<=366:E>=1&&E<=365}set(s,E,B){return s.setMonth(0,B),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function OM(d,s,E){const B=Oy(),K=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??B.weekStartsOn??B.locale?.options?.weekStartsOn??0,pt=Hu(d,E?.in),_t=pt.getDay(),jt=(s%7+7)%7,te=7-K,he=s<0||s>6?s-(_t+te)%7:(jt+te)%7-(_t+te)%7;return r6(pt,he,E)}class Gdt extends Mh{priority=90;parse(s,E,B){switch(E){case"E":case"EE":case"EEE":return B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"EEEEE":return B.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"EEEE":default:return B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["D","i","e","c","t","T"]}class Ydt extends Mh{priority=90;parse(s,E,B,K){const pt=_t=>{const Ot=Math.floor((_t-1)/7)*7;return(_t+K.weekStartsOn+6)%7+Ot};switch(E){case"e":case"ee":return Nd(wd(E.length,s),pt);case"eo":return Nd(B.ordinalNumber(s,{unit:"day"}),pt);case"eee":return B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"eeeee":return B.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"eeee":default:return B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Kdt extends Mh{priority=90;parse(s,E,B,K){const pt=_t=>{const Ot=Math.floor((_t-1)/7)*7;return(_t+K.weekStartsOn+6)%7+Ot};switch(E){case"c":case"cc":return Nd(wd(E.length,s),pt);case"co":return Nd(B.ordinalNumber(s,{unit:"day"}),pt);case"ccc":return B.day(s,{width:"abbreviated",context:"standalone"})||B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"});case"ccccc":return B.day(s,{width:"narrow",context:"standalone"});case"cccccc":return B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"});case"cccc":default:return B.day(s,{width:"wide",context:"standalone"})||B.day(s,{width:"abbreviated",context:"standalone"})||B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Xdt(d,s,E){const B=Hu(d,E?.in),K=Adt(B,E),pt=s-K;return r6(B,pt,E)}class Jdt extends Mh{priority=90;parse(s,E,B){const K=pt=>pt===0?7:pt;switch(E){case"i":case"ii":return wd(E.length,s);case"io":return B.ordinalNumber(s,{unit:"day"});case"iii":return Nd(B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K);case"iiiii":return Nd(B.day(s,{width:"narrow",context:"formatting"}),K);case"iiiiii":return Nd(B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K);case"iiii":default:return Nd(B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K)}}validate(s,E){return E>=1&&E<=7}set(s,E,B){return s=Xdt(s,B),s.setHours(0,0,0,0),s}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Qdt extends Mh{priority=80;parse(s,E,B){switch(E){case"a":case"aa":case"aaa":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaaa":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["b","B","H","k","t","T"]}class tpt extends Mh{priority=80;parse(s,E,B){switch(E){case"b":case"bb":case"bbb":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbbb":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["a","B","H","k","t","T"]}class ept extends Mh{priority=80;parse(s,E,B){switch(E){case"B":case"BB":case"BBB":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBBB":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["a","b","t","T"]}class rpt extends Mh{priority=70;parse(s,E,B){switch(E){case"h":return ad(Bd.hour12h,s);case"ho":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=12}set(s,E,B){const K=s.getHours()>=12;return K&&B<12?s.setHours(B+12,0,0,0):!K&&B===12?s.setHours(0,0,0,0):s.setHours(B,0,0,0),s}incompatibleTokens=["H","K","k","t","T"]}class npt extends Mh{priority=70;parse(s,E,B){switch(E){case"H":return ad(Bd.hour23h,s);case"Ho":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=23}set(s,E,B){return s.setHours(B,0,0,0),s}incompatibleTokens=["a","b","h","K","k","t","T"]}class ipt extends Mh{priority=70;parse(s,E,B){switch(E){case"K":return ad(Bd.hour11h,s);case"Ko":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.getHours()>=12&&B<12?s.setHours(B+12,0,0,0):s.setHours(B,0,0,0),s}incompatibleTokens=["h","H","k","t","T"]}class apt extends Mh{priority=70;parse(s,E,B){switch(E){case"k":return ad(Bd.hour24h,s);case"ko":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=24}set(s,E,B){const K=B<=24?B%24:B;return s.setHours(K,0,0,0),s}incompatibleTokens=["a","b","h","H","K","t","T"]}class opt extends Mh{priority=60;parse(s,E,B){switch(E){case"m":return ad(Bd.minute,s);case"mo":return B.ordinalNumber(s,{unit:"minute"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,B){return s.setMinutes(B,0,0),s}incompatibleTokens=["t","T"]}class spt extends Mh{priority=50;parse(s,E,B){switch(E){case"s":return ad(Bd.second,s);case"so":return B.ordinalNumber(s,{unit:"second"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,B){return s.setSeconds(B,0),s}incompatibleTokens=["t","T"]}class lpt extends Mh{priority=30;parse(s,E){const B=K=>Math.trunc(K*Math.pow(10,-E.length+3));return Nd(wd(E.length,s),B)}set(s,E,B){return s.setMilliseconds(B),s}incompatibleTokens=["t","T"]}class upt extends Mh{priority=10;parse(s,E){switch(E){case"X":return fg(hg.basicOptionalMinutes,s);case"XX":return fg(hg.basic,s);case"XXXX":return fg(hg.basicOptionalSeconds,s);case"XXXXX":return fg(hg.extendedOptionalSeconds,s);case"XXX":default:return fg(hg.extended,s)}}set(s,E,B){return E.timestampIsSet?s:bd(s,s.getTime()-A4(s)-B)}incompatibleTokens=["t","T","x"]}class cpt extends Mh{priority=10;parse(s,E){switch(E){case"x":return fg(hg.basicOptionalMinutes,s);case"xx":return fg(hg.basic,s);case"xxxx":return fg(hg.basicOptionalSeconds,s);case"xxxxx":return fg(hg.extendedOptionalSeconds,s);case"xxx":default:return fg(hg.extended,s)}}set(s,E,B){return E.timestampIsSet?s:bd(s,s.getTime()-A4(s)-B)}incompatibleTokens=["t","T","X"]}class hpt extends Mh{priority=40;parse(s){return lF(s)}set(s,E,B){return[bd(s,B*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class fpt extends Mh{priority=20;parse(s){return lF(s)}set(s,E,B){return[bd(s,B),{timestampIsSet:!0}]}incompatibleTokens="*"}const dpt={G:new Pdt,y:new Idt,Y:new zdt,R:new Odt,u:new Ddt,Q:new Fdt,q:new Rdt,M:new Bdt,L:new Ndt,w:new Udt,I:new Hdt,d:new $dt,D:new Zdt,E:new Gdt,e:new Ydt,c:new Kdt,i:new Jdt,a:new Qdt,b:new tpt,B:new ept,h:new rpt,H:new npt,K:new ipt,k:new apt,m:new opt,s:new spt,S:new lpt,X:new upt,x:new cpt,t:new hpt,T:new fpt},ppt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mpt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gpt=/^'([^]*?)'?$/,vpt=/''/g,ypt=/\S/,xpt=/[a-zA-Z]/;function _pt(d,s,E,B){const K=()=>bd(B?.in||E,NaN),pt=Tdt(),_t=B?.locale??pt.locale??eF,Ot=B?.firstWeekContainsDate??B?.locale?.options?.firstWeekContainsDate??pt.firstWeekContainsDate??pt.locale?.options?.firstWeekContainsDate??1,jt=B?.weekStartsOn??B?.locale?.options?.weekStartsOn??pt.weekStartsOn??pt.locale?.options?.weekStartsOn??0;if(!s)return d?K():Hu(E,B?.in);const te={firstWeekContainsDate:Ot,weekStartsOn:jt,locale:_t},he=[new Ldt(B?.in,E)],De=s.match(mpt).map(Vr=>{const mn=Vr[0];if(mn in FA){const Dt=FA[mn];return Dt(Vr,_t.formatLong)}return Vr}).join("").match(ppt),er=[];for(let Vr of De){!B?.useAdditionalWeekYearTokens&&oF(Vr)&&RA(Vr,s,d),!B?.useAdditionalDayOfYearTokens&&aF(Vr)&&RA(Vr,s,d);const mn=Vr[0],Dt=dpt[mn];if(Dt){const{incompatibleTokens:cn}=Dt;if(Array.isArray(cn)){const Bn=er.find(ni=>cn.includes(ni.token)||ni.token===mn);if(Bn)throw new RangeError(`The format string mustn't contain \`${Bn.fullToken}\` and \`${Vr}\` at the same time`)}else if(Dt.incompatibleTokens==="*"&&er.length>0)throw new RangeError(`The format string mustn't contain \`${Vr}\` and any other token at the same time`);er.push({token:mn,fullToken:Vr});const Jn=Dt.run(d,Vr,_t.match,te);if(!Jn)return K();he.push(Jn.setter),d=Jn.rest}else{if(mn.match(xpt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mn+"`");if(Vr==="''"?Vr="'":mn==="'"&&(Vr=bpt(Vr)),d.indexOf(Vr)===0)d=d.slice(Vr.length);else return K()}}if(d.length>0&&ypt.test(d))return K();const pr=he.map(Vr=>Vr.priority).sort((Vr,mn)=>mn-Vr).filter((Vr,mn,Dt)=>Dt.indexOf(Vr)===mn).map(Vr=>he.filter(mn=>mn.priority===Vr).sort((mn,Dt)=>Dt.subPriority-mn.subPriority)).map(Vr=>Vr[0]);let Mr=Hu(E,B?.in);if(isNaN(+Mr))return K();const Tr={};for(const Vr of pr){if(!Vr.validate(Mr,te))return K();const mn=Vr.set(Mr,Tr,te);Array.isArray(mn)?(Mr=mn[0],Object.assign(Tr,mn[1])):Mr=mn}return Mr}function bpt(d){return d.match(gpt)[1].replace(vpt,"'")}function wpt(d,s){const E=Hu(d,s?.in);return E.setMinutes(0,0,0),E}function kpt(d,s){const E=Hu(d,s?.in);return E.setSeconds(0,0),E}function Tpt(d,s){const E=Hu(d,s?.in);return E.setMilliseconds(0),E}function Apt(d,s){const E=()=>bd(s?.in,NaN),B=s?.additionalDigits??2,K=Cpt(d);let pt;if(K.date){const te=Lpt(K.date,B);pt=Ppt(te.restDateString,te.year)}if(!pt||isNaN(+pt))return E();const _t=+pt;let Ot=0,jt;if(K.time&&(Ot=Ipt(K.time),isNaN(Ot)))return E();if(K.timezone){if(jt=zpt(K.timezone),isNaN(jt))return E()}else{const te=new Date(_t+Ot),he=Hu(0,s?.in);return he.setFullYear(te.getUTCFullYear(),te.getUTCMonth(),te.getUTCDate()),he.setHours(te.getUTCHours(),te.getUTCMinutes(),te.getUTCSeconds(),te.getUTCMilliseconds()),he}return Hu(_t+Ot+jt,s?.in)}const Z5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Mpt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Spt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ept=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Cpt(d){const s={},E=d.split(Z5.dateTimeDelimiter);let B;if(E.length>2)return s;if(/:/.test(E[0])?B=E[0]:(s.date=E[0],B=E[1],Z5.timeZoneDelimiter.test(s.date)&&(s.date=d.split(Z5.timeZoneDelimiter)[0],B=d.substr(s.date.length,d.length))),B){const K=Z5.timezone.exec(B);K?(s.time=B.replace(K[1],""),s.timezone=K[1]):s.time=B}return s}function Lpt(d,s){const E=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+s)+"})|(\\d{2}|[+-]\\d{"+(2+s)+"})$)"),B=d.match(E);if(!B)return{year:NaN,restDateString:""};const K=B[1]?parseInt(B[1]):null,pt=B[2]?parseInt(B[2]):null;return{year:pt===null?K:pt*100,restDateString:d.slice((B[1]||B[2]).length)}}function Ppt(d,s){if(s===null)return new Date(NaN);const E=d.match(Mpt);if(!E)return new Date(NaN);const B=!!E[4],K=p2(E[1]),pt=p2(E[2])-1,_t=p2(E[3]),Ot=p2(E[4]),jt=p2(E[5])-1;if(B)return Bpt(s,Ot,jt)?Opt(s,Ot,jt):new Date(NaN);{const te=new Date(0);return!Fpt(s,pt,_t)||!Rpt(s,K)?new Date(NaN):(te.setUTCFullYear(s,pt,Math.max(K,_t)),te)}}function p2(d){return d?parseInt(d):1}function Ipt(d){const s=d.match(Spt);if(!s)return NaN;const E=eA(s[1]),B=eA(s[2]),K=eA(s[3]);return Npt(E,B,K)?E*cw+B*uw+K*1e3:NaN}function eA(d){return d&&parseFloat(d.replace(",","."))||0}function zpt(d){if(d==="Z")return 0;const s=d.match(Ept);if(!s)return 0;const E=s[1]==="+"?-1:1,B=parseInt(s[2]),K=s[3]&&parseInt(s[3])||0;return jpt(B,K)?E*(B*cw+K*uw):NaN}function Opt(d,s,E){const B=new Date(0);B.setUTCFullYear(d,0,4);const K=B.getUTCDay()||7,pt=(s-1)*7+E+1-K;return B.setUTCDate(B.getUTCDate()+pt),B}const Dpt=[31,null,31,30,31,30,31,31,30,31,30,31];function hF(d){return d%400===0||d%4===0&&d%100!==0}function Fpt(d,s,E){return s>=0&&s<=11&&E>=1&&E<=(Dpt[s]||(hF(d)?29:28))}function Rpt(d,s){return s>=1&&s<=(hF(d)?366:365)}function Bpt(d,s,E){return s>=1&&s<=53&&E>=0&&E<=6}function Npt(d,s,E){return d===24?s===0&&E===0:E>=0&&E<60&&s>=0&&s<60&&d>=0&&d<25}function jpt(d,s){return s>=0&&s<=59}/*! +`):d}function Jht(d,s){const{element:E,datasetIndex:R,index:Y}=s,dt=d.getDatasetMeta(R).controller,{label:_t,value:zt}=dt.getLabelAndValue(Y);return{chart:d,label:_t,parsed:dt.getParsed(Y),raw:d.data.datasets[R].data[Y],formattedValue:zt,dataset:dt.getDataset(),dataIndex:Y,datasetIndex:R,element:E}}function hI(d,s){const E=d.chart.ctx,{body:R,footer:Y,title:dt}=d,{boxWidth:_t,boxHeight:zt}=s,jt=Qp(s.bodyFont),te=Qp(s.titleFont),ce=Qp(s.footerFont),Ie=dt.length,Je=Y.length,fr=R.length,Ar=fm(s.padding);let kr=Ar.height,Vr=0,fn=R.reduce((ti,Dn)=>ti+Dn.before.length+Dn.lines.length+Dn.after.length,0);if(fn+=d.beforeBody.length+d.afterBody.length,Ie&&(kr+=Ie*te.lineHeight+(Ie-1)*s.titleSpacing+s.titleMarginBottom),fn){const ti=s.displayColors?Math.max(zt,jt.lineHeight):jt.lineHeight;kr+=fr*ti+(fn-fr)*jt.lineHeight+(fn-1)*s.bodySpacing}Je&&(kr+=s.footerMarginTop+Je*ce.lineHeight+(Je-1)*s.footerSpacing);let Dt=0;const cn=function(ti){Vr=Math.max(Vr,E.measureText(ti).width+Dt)};return E.save(),E.font=te.string,Jh(d.title,cn),E.font=jt.string,Jh(d.beforeBody.concat(d.afterBody),cn),Dt=s.displayColors?_t+2+s.boxPadding:0,Jh(R,ti=>{Jh(ti.before,cn),Jh(ti.lines,cn),Jh(ti.after,cn)}),Dt=0,E.font=ce.string,Jh(d.footer,cn),E.restore(),Vr+=Ar.width,{width:Vr,height:kr}}function Qht(d,s){const{y:E,height:R}=s;return Ed.height-R/2?"bottom":"center"}function tft(d,s,E,R){const{x:Y,width:dt}=R,_t=E.caretSize+E.caretPadding;if(d==="left"&&Y+dt+_t>s.width||d==="right"&&Y-dt-_t<0)return!0}function eft(d,s,E,R){const{x:Y,width:dt}=E,{width:_t,chartArea:{left:zt,right:jt}}=d;let te="center";return R==="center"?te=Y<=(zt+jt)/2?"left":"right":Y<=dt/2?te="left":Y>=_t-dt/2&&(te="right"),tft(te,d,s,E)&&(te="center"),te}function fI(d,s,E){const R=E.yAlign||s.yAlign||Qht(d,E);return{xAlign:E.xAlign||s.xAlign||eft(d,s,E,R),yAlign:R}}function rft(d,s){let{x:E,width:R}=d;return s==="right"?E-=R:s==="center"&&(E-=R/2),E}function nft(d,s,E){let{y:R,height:Y}=d;return s==="top"?R+=E:s==="bottom"?R-=Y+E:R-=Y/2,R}function dI(d,s,E,R){const{caretSize:Y,caretPadding:dt,cornerRadius:_t}=d,{xAlign:zt,yAlign:jt}=E,te=Y+dt,{topLeft:ce,topRight:Ie,bottomLeft:Je,bottomRight:fr}=f_(_t);let Ar=rft(s,zt);const kr=nft(s,jt,te);return jt==="center"?zt==="left"?Ar+=te:zt==="right"&&(Ar-=te):zt==="left"?Ar-=Math.max(ce,Je)+Y:zt==="right"&&(Ar+=Math.max(Ie,fr)+Y),{x:Jp(Ar,0,R.width-s.width),y:Jp(kr,0,R.height-s.height)}}function $5(d,s,E){const R=fm(E.padding);return s==="center"?d.x+d.width/2:s==="right"?d.x+d.width-R.right:d.x+R.left}function pI(d){return lg([],Jg(d))}function ift(d,s,E){return Dy(d,{tooltip:s,tooltipItems:E,type:"tooltip"})}function mI(d,s){const E=s&&s.dataset&&s.dataset.tooltip&&s.dataset.tooltip.callbacks;return E?d.override(E):d}const iF={beforeTitle:Kg,title(d){if(d.length>0){const s=d[0],E=s.chart.data.labels,R=E?E.length:0;if(this&&this.options&&this.options.mode==="dataset")return s.dataset.label||"";if(s.label)return s.label;if(R>0&&s.dataIndex"u"?iF[s].call(E,R):Y}class gI extends cv{static positioners=_2;constructor(s){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=s.chart,this.options=s.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(s){this.options=s,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const s=this._cachedAnimations;if(s)return s;const E=this.chart,R=this.options.setContext(this.getContext()),Y=R.enabled&&E.options.animation&&R.animations,dt=new CD(this.chart,Y);return Y._cacheable&&(this._cachedAnimations=Object.freeze(dt)),dt}getContext(){return this.$context||(this.$context=ift(this.chart.getContext(),this,this._tooltipItems))}getTitle(s,E){const{callbacks:R}=E,Y=A0(R,"beforeTitle",this,s),dt=A0(R,"title",this,s),_t=A0(R,"afterTitle",this,s);let zt=[];return zt=lg(zt,Jg(Y)),zt=lg(zt,Jg(dt)),zt=lg(zt,Jg(_t)),zt}getBeforeBody(s,E){return pI(A0(E.callbacks,"beforeBody",this,s))}getBody(s,E){const{callbacks:R}=E,Y=[];return Jh(s,dt=>{const _t={before:[],lines:[],after:[]},zt=mI(R,dt);lg(_t.before,Jg(A0(zt,"beforeLabel",this,dt))),lg(_t.lines,A0(zt,"label",this,dt)),lg(_t.after,Jg(A0(zt,"afterLabel",this,dt))),Y.push(_t)}),Y}getAfterBody(s,E){return pI(A0(E.callbacks,"afterBody",this,s))}getFooter(s,E){const{callbacks:R}=E,Y=A0(R,"beforeFooter",this,s),dt=A0(R,"footer",this,s),_t=A0(R,"afterFooter",this,s);let zt=[];return zt=lg(zt,Jg(Y)),zt=lg(zt,Jg(dt)),zt=lg(zt,Jg(_t)),zt}_createItems(s){const E=this._active,R=this.chart.data,Y=[],dt=[],_t=[];let zt=[],jt,te;for(jt=0,te=E.length;jts.filter(ce,Ie,Je,R))),s.itemSort&&(zt=zt.sort((ce,Ie)=>s.itemSort(ce,Ie,R))),Jh(zt,ce=>{const Ie=mI(s.callbacks,ce);Y.push(A0(Ie,"labelColor",this,ce)),dt.push(A0(Ie,"labelPointStyle",this,ce)),_t.push(A0(Ie,"labelTextColor",this,ce))}),this.labelColors=Y,this.labelPointStyles=dt,this.labelTextColors=_t,this.dataPoints=zt,zt}update(s,E){const R=this.options.setContext(this.getContext()),Y=this._active;let dt,_t=[];if(!Y.length)this.opacity!==0&&(dt={opacity:0});else{const zt=_2[R.position].call(this,Y,this._eventPosition);_t=this._createItems(R),this.title=this.getTitle(_t,R),this.beforeBody=this.getBeforeBody(_t,R),this.body=this.getBody(_t,R),this.afterBody=this.getAfterBody(_t,R),this.footer=this.getFooter(_t,R);const jt=this._size=hI(this,R),te=Object.assign({},zt,jt),ce=fI(this.chart,R,te),Ie=dI(R,te,ce,this.chart);this.xAlign=ce.xAlign,this.yAlign=ce.yAlign,dt={opacity:1,x:Ie.x,y:Ie.y,width:jt.width,height:jt.height,caretX:zt.x,caretY:zt.y}}this._tooltipItems=_t,this.$context=void 0,dt&&this._resolveAnimations().update(this,dt),s&&R.external&&R.external.call(this,{chart:this.chart,tooltip:this,replay:E})}drawCaret(s,E,R,Y){const dt=this.getCaretPosition(s,R,Y);E.lineTo(dt.x1,dt.y1),E.lineTo(dt.x2,dt.y2),E.lineTo(dt.x3,dt.y3)}getCaretPosition(s,E,R){const{xAlign:Y,yAlign:dt}=this,{caretSize:_t,cornerRadius:zt}=R,{topLeft:jt,topRight:te,bottomLeft:ce,bottomRight:Ie}=f_(zt),{x:Je,y:fr}=s,{width:Ar,height:kr}=E;let Vr,fn,Dt,cn,ti,Dn;return dt==="center"?(ti=fr+kr/2,Y==="left"?(Vr=Je,fn=Vr-_t,cn=ti+_t,Dn=ti-_t):(Vr=Je+Ar,fn=Vr+_t,cn=ti-_t,Dn=ti+_t),Dt=Vr):(Y==="left"?fn=Je+Math.max(jt,ce)+_t:Y==="right"?fn=Je+Ar-Math.max(te,Ie)-_t:fn=this.caretX,dt==="top"?(cn=fr,ti=cn-_t,Vr=fn-_t,Dt=fn+_t):(cn=fr+kr,ti=cn+_t,Vr=fn+_t,Dt=fn-_t),Dn=cn),{x1:Vr,x2:fn,x3:Dt,y1:cn,y2:ti,y3:Dn}}drawTitle(s,E,R){const Y=this.title,dt=Y.length;let _t,zt,jt;if(dt){const te=d_(R.rtl,this.x,this.width);for(s.x=$5(this,R.titleAlign,R),E.textAlign=te.textAlign(R.titleAlign),E.textBaseline="middle",_t=Qp(R.titleFont),zt=R.titleSpacing,E.fillStyle=R.titleColor,E.font=_t.string,jt=0;jtDt!==0)?(s.beginPath(),s.fillStyle=dt.multiKeyBackground,w4(s,{x:kr,y:Ar,w:te,h:jt,radius:fn}),s.fill(),s.stroke(),s.fillStyle=_t.backgroundColor,s.beginPath(),w4(s,{x:Vr,y:Ar+1,w:te-2,h:jt-2,radius:fn}),s.fill()):(s.fillStyle=dt.multiKeyBackground,s.fillRect(kr,Ar,te,jt),s.strokeRect(kr,Ar,te,jt),s.fillStyle=_t.backgroundColor,s.fillRect(Vr,Ar+1,te-2,jt-2))}s.fillStyle=this.labelTextColors[R]}drawBody(s,E,R){const{body:Y}=this,{bodySpacing:dt,bodyAlign:_t,displayColors:zt,boxHeight:jt,boxWidth:te,boxPadding:ce}=R,Ie=Qp(R.bodyFont);let Je=Ie.lineHeight,fr=0;const Ar=d_(R.rtl,this.x,this.width),kr=function(Nn){E.fillText(Nn,Ar.x(s.x+fr),s.y+Je/2),s.y+=Je+dt},Vr=Ar.textAlign(_t);let fn,Dt,cn,ti,Dn,ii,Vi;for(E.textAlign=_t,E.textBaseline="middle",E.font=Ie.string,s.x=$5(this,Vr,R),E.fillStyle=R.bodyColor,Jh(this.beforeBody,kr),fr=zt&&Vr!=="right"?_t==="center"?te/2+ce:te+2+ce:0,ti=0,ii=Y.length;ti0&&E.stroke()}_updateAnimationTarget(s){const E=this.chart,R=this.$animations,Y=R&&R.x,dt=R&&R.y;if(Y||dt){const _t=_2[s.position].call(this,this._active,this._eventPosition);if(!_t)return;const zt=this._size=hI(this,s),jt=Object.assign({},_t,this._size),te=fI(E,s,jt),ce=dI(s,jt,te,E);(Y._to!==ce.x||dt._to!==ce.y)&&(this.xAlign=te.xAlign,this.yAlign=te.yAlign,this.width=zt.width,this.height=zt.height,this.caretX=_t.x,this.caretY=_t.y,this._resolveAnimations().update(this,ce))}}_willRender(){return!!this.opacity}draw(s){const E=this.options.setContext(this.getContext());let R=this.opacity;if(!R)return;this._updateAnimationTarget(E);const Y={width:this.width,height:this.height},dt={x:this.x,y:this.y};R=Math.abs(R)<.001?0:R;const _t=fm(E.padding),zt=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;E.enabled&&zt&&(s.save(),s.globalAlpha=R,this.drawBackground(dt,s,Y,E),kD(s,E.textDirection),dt.y+=_t.top,this.drawTitle(dt,s,E),this.drawBody(dt,s,E),this.drawFooter(dt,s,E),TD(s,E.textDirection),s.restore())}getActiveElements(){return this._active||[]}setActiveElements(s,E){const R=this._active,Y=s.map(({datasetIndex:zt,index:jt})=>{const te=this.chart.getDatasetMeta(zt);if(!te)throw new Error("Cannot find a dataset at index "+zt);return{datasetIndex:zt,element:te.data[jt],index:jt}}),dt=!x4(R,Y),_t=this._positionChanged(Y,E);(dt||_t)&&(this._active=Y,this._eventPosition=E,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(s,E,R=!0){if(E&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const Y=this.options,dt=this._active||[],_t=this._getActiveElements(s,dt,E,R),zt=this._positionChanged(_t,s),jt=E||!x4(_t,dt)||zt;return jt&&(this._active=_t,(Y.enabled||Y.external)&&(this._eventPosition={x:s.x,y:s.y},this.update(!0,E))),jt}_getActiveElements(s,E,R,Y){const dt=this.options;if(s.type==="mouseout")return[];if(!Y)return E.filter(zt=>this.chart.data.datasets[zt.datasetIndex]&&this.chart.getDatasetMeta(zt.datasetIndex).controller.getParsed(zt.index)!==void 0);const _t=this.chart.getElementsAtEventForMode(s,dt.mode,dt,R);return dt.reverse&&_t.reverse(),_t}_positionChanged(s,E){const{caretX:R,caretY:Y,options:dt}=this,_t=_2[dt.position].call(this,s,E);return _t!==!1&&(R!==_t.x||Y!==_t.y)}}var aF={id:"tooltip",_element:gI,positioners:_2,afterInit(d,s,E){E&&(d.tooltip=new gI({chart:d,options:E}))},beforeUpdate(d,s,E){d.tooltip&&d.tooltip.initialize(E)},reset(d,s,E){d.tooltip&&d.tooltip.initialize(E)},afterDraw(d){const s=d.tooltip;if(s&&s._willRender()){const E={tooltip:s};if(d.notifyPlugins("beforeTooltipDraw",{...E,cancelable:!0})===!1)return;s.draw(d.ctx),d.notifyPlugins("afterTooltipDraw",E)}},afterEvent(d,s){if(d.tooltip){const E=s.replay;d.tooltip.handleEvent(s.event,E,s.inChartArea)&&(s.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(d,s)=>s.bodyFont.size,boxWidth:(d,s)=>s.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:iF},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:d=>d!=="filter"&&d!=="itemSort"&&d!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const aft=(d,s,E,R)=>(typeof s=="string"?(E=d.push(s)-1,R.unshift({index:E,label:s})):isNaN(s)&&(E=null),E);function oft(d,s,E,R){const Y=d.indexOf(s);if(Y===-1)return aft(d,s,E,R);const dt=d.lastIndexOf(s);return Y!==dt?E:Y}const sft=(d,s)=>d===null?null:Jp(Math.round(d),0,s);function vI(d){const s=this.getLabels();return d>=0&&dE.length-1?null:this.getPixelForValue(E[s].value)}getValueForPixel(s){return Math.round(this._startValue+this.getDecimalForPixel(s)*this._valueRange)}getBasePixel(){return this.bottom}}function lft(d,s){const E=[],{bounds:Y,step:dt,min:_t,max:zt,precision:jt,count:te,maxTicks:ce,maxDigits:Ie,includeBounds:Je}=d,fr=dt||1,Ar=ce-1,{min:kr,max:Vr}=s,fn=!Nh(_t),Dt=!Nh(zt),cn=!Nh(te),ti=(Vr-kr)/(Ie+1);let Dn=dP((Vr-kr)/Ar/fr)*fr,ii,Vi,Nn,Wr;if(Dn<1e-14&&!fn&&!Dt)return[{value:kr},{value:Vr}];Wr=Math.ceil(Vr/Dn)-Math.floor(kr/Dn),Wr>Ar&&(Dn=dP(Wr*Dn/Ar/fr)*fr),Nh(jt)||(ii=Math.pow(10,jt),Dn=Math.ceil(Dn*ii)/ii),Y==="ticks"?(Vi=Math.floor(kr/Dn)*Dn,Nn=Math.ceil(Vr/Dn)*Dn):(Vi=kr,Nn=Vr),fn&&Dt&&dt&&glt((zt-_t)/dt,Dn/1e3)?(Wr=Math.round(Math.min((zt-_t)/Dn,ce)),Dn=(zt-_t)/Wr,Vi=_t,Nn=zt):cn?(Vi=fn?_t:Vi,Nn=Dt?zt:Nn,Wr=te-1,Dn=(Nn-Vi)/Wr):(Wr=(Nn-Vi)/Dn,P2(Wr,Math.round(Wr),Dn/1e3)?Wr=Math.round(Wr):Wr=Math.ceil(Wr));const Bi=Math.max(pP(Dn),pP(Vi));ii=Math.pow(10,Nh(jt)?Bi:jt),Vi=Math.round(Vi*ii)/ii,Nn=Math.round(Nn*ii)/ii;let Ri=0;for(fn&&(Je&&Vi!==_t?(E.push({value:_t}),Vi<_t&&Ri++,P2(Math.round((Vi+Ri*Dn)*ii)/ii,_t,yI(_t,ti,d))&&Ri++):Vi<_t&&Ri++);Rizt)break;E.push({value:Li})}return Dt&&Je&&Nn!==zt?E.length&&P2(E[E.length-1].value,zt,yI(zt,ti,d))?E[E.length-1].value=zt:E.push({value:zt}):(!Dt||Nn===zt)&&E.push({value:Nn}),E}function yI(d,s,{horizontal:E,minRotation:R}){const Y=iv(R),dt=(E?Math.sin(Y):Math.cos(Y))||.001,_t=.75*s*(""+d).length;return Math.min(s/dt,_t)}class uft extends A_{constructor(s){super(s),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(s,E){return Nh(s)||(typeof s=="number"||s instanceof Number)&&!isFinite(+s)?null:+s}handleTickRangeOptions(){const{beginAtZero:s}=this.options,{minDefined:E,maxDefined:R}=this.getUserBounds();let{min:Y,max:dt}=this;const _t=jt=>Y=E?Y:jt,zt=jt=>dt=R?dt:jt;if(s){const jt=gg(Y),te=gg(dt);jt<0&&te<0?zt(0):jt>0&&te>0&&_t(0)}if(Y===dt){let jt=dt===0?1:Math.abs(dt*.05);zt(dt+jt),s||_t(Y-jt)}this.min=Y,this.max=dt}getTickLimit(){const s=this.options.ticks;let{maxTicksLimit:E,stepSize:R}=s,Y;return R?(Y=Math.ceil(this.max/R)-Math.floor(this.min/R)+1,Y>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${R} would result generating up to ${Y} ticks. Limiting to 1000.`),Y=1e3)):(Y=this.computeTickLimit(),E=E||11),E&&(Y=Math.min(E,Y)),Y}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const s=this.options,E=s.ticks;let R=this.getTickLimit();R=Math.max(2,R);const Y={maxTicks:R,bounds:s.bounds,min:s.min,max:s.max,precision:E.precision,step:E.stepSize,count:E.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:E.minRotation||0,includeBounds:E.includeBounds!==!1},dt=this._range||this,_t=lft(Y,dt);return s.bounds==="ticks"&&vlt(_t,this,"value"),s.reverse?(_t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),_t}configure(){const s=this.ticks;let E=this.min,R=this.max;if(super.configure(),this.options.offset&&s.length){const Y=(R-E)/Math.max(s.length-1,1)/2;E-=Y,R+=Y}this._startValue=E,this._endValue=R,this._valueRange=R-E}getLabelForValue(s){return kM(s,this.chart.options.locale,this.options.ticks.format)}}class sF extends uft{static id="linear";static defaults={ticks:{callback:mD.formatters.numeric}};determineDataLimits(){const{min:s,max:E}=this.getMinMax(!0);this.min=t0(s)?s:0,this.max=t0(E)?E:1,this.handleTickRangeOptions()}computeTickLimit(){const s=this.isHorizontal(),E=s?this.width:this.height,R=iv(this.options.ticks.minRotation),Y=(s?Math.sin(R):Math.cos(R))||.001,dt=this._resolveTickFontOptions(0);return Math.ceil(E/Math.min(40,dt.lineHeight/Y))}getPixelForValue(s){return s===null?NaN:this.getPixelForDecimal((s-this._startValue)/this._valueRange)}getValueForPixel(s){return this._startValue+this.getDecimalForPixel(s)*this._valueRange}}const r6={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},M0=Object.keys(r6);function xI(d,s){return d-s}function _I(d,s){if(Nh(s))return null;const E=d._adapter,{parser:R,round:Y,isoWeekday:dt}=d._parseOpts;let _t=s;return typeof R=="function"&&(_t=R(_t)),t0(_t)||(_t=typeof R=="string"?E.parse(_t,R):E.parse(_t)),_t===null?null:(Y&&(_t=Y==="week"&&(G2(dt)||dt===!0)?E.startOf(_t,"isoWeek",dt):E.startOf(_t,Y)),+_t)}function bI(d,s,E,R){const Y=M0.length;for(let dt=M0.indexOf(d);dt=M0.indexOf(E);dt--){const _t=M0[dt];if(r6[_t].common&&d._adapter.diff(Y,R,_t)>=s-1)return _t}return M0[E?M0.indexOf(E):0]}function hft(d){for(let s=M0.indexOf(d)+1,E=M0.length;s=s?E[R]:E[Y];d[dt]=!0}}function fft(d,s,E,R){const Y=d._adapter,dt=+Y.startOf(s[0].value,R),_t=s[s.length-1].value;let zt,jt;for(zt=dt;zt<=_t;zt=+Y.add(zt,1,R))jt=E[zt],jt>=0&&(s[jt].major=!0);return s}function kI(d,s,E){const R=[],Y={},dt=s.length;let _t,zt;for(_t=0;_t+s.value))}initOffsets(s=[]){let E=0,R=0,Y,dt;this.options.offset&&s.length&&(Y=this.getDecimalForValue(s[0]),s.length===1?E=1-Y:E=(this.getDecimalForValue(s[1])-Y)/2,dt=this.getDecimalForValue(s[s.length-1]),s.length===1?R=dt:R=(dt-this.getDecimalForValue(s[s.length-2]))/2);const _t=s.length<3?.5:.25;E=Jp(E,0,_t),R=Jp(R,0,_t),this._offsets={start:E,end:R,factor:1/(E+1+R)}}_generate(){const s=this._adapter,E=this.min,R=this.max,Y=this.options,dt=Y.time,_t=dt.unit||bI(dt.minUnit,E,R,this._getLabelCapacity(E)),zt=cc(Y.ticks.stepSize,1),jt=_t==="week"?dt.isoWeekday:!1,te=G2(jt)||jt===!0,ce={};let Ie=E,Je,fr;if(te&&(Ie=+s.startOf(Ie,"isoWeek",jt)),Ie=+s.startOf(Ie,te?"day":_t),s.diff(R,E,_t)>1e5*zt)throw new Error(E+" and "+R+" are too far apart with stepSize of "+zt+" "+_t);const Ar=Y.ticks.source==="data"&&this.getDataTimestamps();for(Je=Ie,fr=0;Je+kr)}getLabelForValue(s){const E=this._adapter,R=this.options.time;return R.tooltipFormat?E.format(s,R.tooltipFormat):E.format(s,R.displayFormats.datetime)}format(s,E){const Y=this.options.time.displayFormats,dt=this._unit,_t=E||Y[dt];return this._adapter.format(s,_t)}_tickFormatFunction(s,E,R,Y){const dt=this.options,_t=dt.ticks.callback;if(_t)return Df(_t,[s,E,R],this);const zt=dt.time.displayFormats,jt=this._unit,te=this._majorUnit,ce=jt&&zt[jt],Ie=te&&zt[te],Je=R[E],fr=te&&Ie&&Je&&Je.major;return this._adapter.format(s,Y||(fr?Ie:ce))}generateTickLabels(s){let E,R,Y;for(E=0,R=s.length;E0?zt:1}getDataTimestamps(){let s=this._cache.data||[],E,R;if(s.length)return s;const Y=this.getMatchingVisibleMetas();if(this._normalized&&Y.length)return this._cache.data=Y[0].controller.getAllParsedValues(this);for(E=0,R=Y.length;E=d[R].pos&&s<=d[Y].pos&&({lo:R,hi:Y}=ky(d,"pos",s)),{pos:dt,time:zt}=d[R],{pos:_t,time:jt}=d[Y]):(s>=d[R].time&&s<=d[Y].time&&({lo:R,hi:Y}=ky(d,"time",s)),{time:dt,pos:zt}=d[R],{time:_t,pos:jt}=d[Y]);const te=_t-dt;return te?zt+(jt-zt)*(s-dt)/te:zt}class ixt extends M4{static id="timeseries";static defaults=M4.defaults;constructor(s){super(s),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const s=this._getTimestampsForTable(),E=this._table=this.buildLookupTable(s);this._minPos=Z5(E,this.min),this._tableRange=Z5(E,this.max)-this._minPos,super.initOffsets(s)}buildLookupTable(s){const{min:E,max:R}=this,Y=[],dt=[];let _t,zt,jt,te,ce;for(_t=0,zt=s.length;_t=E&&te<=R&&Y.push(te);if(Y.length<2)return[{time:E,pos:0},{time:R,pos:1}];for(_t=0,zt=Y.length;_tY-dt)}_getTimestampsForTable(){let s=this._cache.all||[];if(s.length)return s;const E=this.getDataTimestamps(),R=this.getLabelTimestamps();return E.length&&R.length?s=this.normalize(E.concat(R)):s=E.length?E:R,s=this._cache.all=s,s}getDecimalForValue(s){return(Z5(this._table,s)-this._minPos)/this._tableRange}getValueForPixel(s){const E=this._offsets,R=this.getDecimalForPixel(s)/E.factor-E.end;return Z5(this._table,R*this._tableRange+this._minPos,!0)}}const lF=6048e5,dft=864e5,cw=6e4,hw=36e5,pft=1e3,TI=Symbol.for("constructDateFrom");function bd(d,s){return typeof d=="function"?d(s):d&&typeof d=="object"&&TI in d?d[TI](s):d instanceof Date?new d.constructor(s):new Date(s)}function Hu(d,s){return bd(s||d,d)}function n6(d,s,E){const R=Hu(d,E?.in);return isNaN(s)?bd(E?.in||d,NaN):(s&&R.setDate(R.getDate()+s),R)}function PM(d,s,E){const R=Hu(d,E?.in);if(isNaN(s))return bd(d,NaN);if(!s)return R;const Y=R.getDate(),dt=bd(d,R.getTime());dt.setMonth(R.getMonth()+s+1,0);const _t=dt.getDate();return Y>=_t?dt:(R.setFullYear(dt.getFullYear(),dt.getMonth(),Y),R)}function IM(d,s,E){return bd(d,+Hu(d)+s)}function mft(d,s,E){return IM(d,s*hw)}let gft={};function Fy(){return gft}function vg(d,s){const E=Fy(),R=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??E.weekStartsOn??E.locale?.options?.weekStartsOn??0,Y=Hu(d,s?.in),dt=Y.getDay(),_t=(dt=dt.getTime()?R+1:E.getTime()>=zt.getTime()?R:R-1}function S4(d){const s=Hu(d),E=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return E.setUTCFullYear(s.getFullYear()),+d-+E}function By(d,...s){const E=bd.bind(null,s.find(R=>typeof R=="object"));return s.map(E)}function BA(d,s){const E=Hu(d,s?.in);return E.setHours(0,0,0,0),E}function cF(d,s,E){const[R,Y]=By(E?.in,d,s),dt=BA(R),_t=BA(Y),zt=+dt-S4(dt),jt=+_t-S4(_t);return Math.round((zt-jt)/dft)}function vft(d,s){const E=uF(d,s),R=bd(d,0);return R.setFullYear(E,0,4),R.setHours(0,0,0,0),w_(R)}function yft(d,s,E){const R=Hu(d,E?.in);return R.setTime(R.getTime()+s*cw),R}function xft(d,s,E){return PM(d,s*3,E)}function _ft(d,s,E){return IM(d,s*1e3)}function bft(d,s,E){return n6(d,s*7,E)}function wft(d,s,E){return PM(d,s*12,E)}function O2(d,s){const E=+Hu(d)-+Hu(s);return E<0?-1:E>0?1:E}function kft(d){return d instanceof Date||typeof d=="object"&&Object.prototype.toString.call(d)==="[object Date]"}function hF(d){return!(!kft(d)&&typeof d!="number"||isNaN(+Hu(d)))}function Tft(d,s,E){const[R,Y]=By(E?.in,d,s),dt=R.getFullYear()-Y.getFullYear(),_t=R.getMonth()-Y.getMonth();return dt*12+_t}function Aft(d,s,E){const[R,Y]=By(E?.in,d,s);return R.getFullYear()-Y.getFullYear()}function fF(d,s,E){const[R,Y]=By(E?.in,d,s),dt=AI(R,Y),_t=Math.abs(cF(R,Y));R.setDate(R.getDate()-dt*_t);const zt=+(AI(R,Y)===-dt),jt=dt*(_t-zt);return jt===0?0:jt}function AI(d,s){const E=d.getFullYear()-s.getFullYear()||d.getMonth()-s.getMonth()||d.getDate()-s.getDate()||d.getHours()-s.getHours()||d.getMinutes()-s.getMinutes()||d.getSeconds()-s.getSeconds()||d.getMilliseconds()-s.getMilliseconds();return E<0?-1:E>0?1:E}function fw(d){return s=>{const R=(d?Math[d]:Math.trunc)(s);return R===0?0:R}}function Mft(d,s,E){const[R,Y]=By(E?.in,d,s),dt=(+R-+Y)/hw;return fw(E?.roundingMethod)(dt)}function zM(d,s){return+Hu(d)-+Hu(s)}function Sft(d,s,E){const R=zM(d,s)/cw;return fw(E?.roundingMethod)(R)}function dF(d,s){const E=Hu(d,s?.in);return E.setHours(23,59,59,999),E}function pF(d,s){const E=Hu(d,s?.in),R=E.getMonth();return E.setFullYear(E.getFullYear(),R+1,0),E.setHours(23,59,59,999),E}function Eft(d,s){const E=Hu(d,s?.in);return+dF(E,s)==+pF(E,s)}function mF(d,s,E){const[R,Y,dt]=By(E?.in,d,d,s),_t=O2(Y,dt),zt=Math.abs(Tft(Y,dt));if(zt<1)return 0;Y.getMonth()===1&&Y.getDate()>27&&Y.setDate(30),Y.setMonth(Y.getMonth()-_t*zt);let jt=O2(Y,dt)===-_t;Eft(R)&&zt===1&&O2(R,dt)===1&&(jt=!1);const te=_t*(zt-+jt);return te===0?0:te}function Cft(d,s,E){const R=mF(d,s,E)/3;return fw(E?.roundingMethod)(R)}function Lft(d,s,E){const R=zM(d,s)/1e3;return fw(E?.roundingMethod)(R)}function Pft(d,s,E){const R=fF(d,s,E)/7;return fw(E?.roundingMethod)(R)}function Ift(d,s,E){const[R,Y]=By(E?.in,d,s),dt=O2(R,Y),_t=Math.abs(Aft(R,Y));R.setFullYear(1584),Y.setFullYear(1584);const zt=O2(R,Y)===-dt,jt=dt*(_t-+zt);return jt===0?0:jt}function zft(d,s){const E=Hu(d,s?.in),R=E.getMonth(),Y=R-R%3;return E.setMonth(Y,1),E.setHours(0,0,0,0),E}function Oft(d,s){const E=Hu(d,s?.in);return E.setDate(1),E.setHours(0,0,0,0),E}function Dft(d,s){const E=Hu(d,s?.in),R=E.getFullYear();return E.setFullYear(R+1,0,0),E.setHours(23,59,59,999),E}function gF(d,s){const E=Hu(d,s?.in);return E.setFullYear(E.getFullYear(),0,1),E.setHours(0,0,0,0),E}function Fft(d,s){const E=Hu(d,s?.in);return E.setMinutes(59,59,999),E}function Bft(d,s){const E=Fy(),R=E.weekStartsOn??E.locale?.options?.weekStartsOn??0,Y=Hu(d,s?.in),dt=Y.getDay(),_t=(dt{let R;const Y=Uft[d];return typeof Y=="string"?R=Y:s===1?R=Y.one:R=Y.other.replace("{{count}}",s.toString()),E?.addSuffix?E.comparison&&E.comparison>0?"in "+R:R+" ago":R};function eA(d){return(s={})=>{const E=s.width?String(s.width):d.defaultWidth;return d.formats[E]||d.formats[d.defaultWidth]}}const Hft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wft={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qft={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$ft={date:eA({formats:Hft,defaultWidth:"full"}),time:eA({formats:Wft,defaultWidth:"full"}),dateTime:eA({formats:qft,defaultWidth:"full"})},Zft={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gft=(d,s,E,R)=>Zft[d];function d2(d){return(s,E)=>{const R=E?.context?String(E.context):"standalone";let Y;if(R==="formatting"&&d.formattingValues){const _t=d.defaultFormattingWidth||d.defaultWidth,zt=E?.width?String(E.width):_t;Y=d.formattingValues[zt]||d.formattingValues[_t]}else{const _t=d.defaultWidth,zt=E?.width?String(E.width):d.defaultWidth;Y=d.values[zt]||d.values[_t]}const dt=d.argumentCallback?d.argumentCallback(s):s;return Y[dt]}}const Yft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kft={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},tdt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},edt=(d,s)=>{const E=Number(d),R=E%100;if(R>20||R<10)switch(R%10){case 1:return E+"st";case 2:return E+"nd";case 3:return E+"rd"}return E+"th"},rdt={ordinalNumber:edt,era:d2({values:Yft,defaultWidth:"wide"}),quarter:d2({values:Kft,defaultWidth:"wide",argumentCallback:d=>d-1}),month:d2({values:Xft,defaultWidth:"wide"}),day:d2({values:Jft,defaultWidth:"wide"}),dayPeriod:d2({values:Qft,defaultWidth:"wide",formattingValues:tdt,defaultFormattingWidth:"wide"})};function p2(d){return(s,E={})=>{const R=E.width,Y=R&&d.matchPatterns[R]||d.matchPatterns[d.defaultMatchWidth],dt=s.match(Y);if(!dt)return null;const _t=dt[0],zt=R&&d.parsePatterns[R]||d.parsePatterns[d.defaultParseWidth],jt=Array.isArray(zt)?idt(zt,Ie=>Ie.test(_t)):ndt(zt,Ie=>Ie.test(_t));let te;te=d.valueCallback?d.valueCallback(jt):jt,te=E.valueCallback?E.valueCallback(te):te;const ce=s.slice(_t.length);return{value:te,rest:ce}}}function ndt(d,s){for(const E in d)if(Object.prototype.hasOwnProperty.call(d,E)&&s(d[E]))return E}function idt(d,s){for(let E=0;E{const R=s.match(d.matchPattern);if(!R)return null;const Y=R[0],dt=s.match(d.parsePattern);if(!dt)return null;let _t=d.valueCallback?d.valueCallback(dt[0]):dt[0];_t=E.valueCallback?E.valueCallback(_t):_t;const zt=s.slice(Y.length);return{value:_t,rest:zt}}}const odt=/^(\d+)(th|st|nd|rd)?/i,sdt=/\d+/i,ldt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},udt={any:[/^b/i,/^(a|c)/i]},cdt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hdt={any:[/1/i,/2/i,/3/i,/4/i]},fdt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ddt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pdt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mdt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gdt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vdt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ydt={ordinalNumber:adt({matchPattern:odt,parsePattern:sdt,valueCallback:d=>parseInt(d,10)}),era:p2({matchPatterns:ldt,defaultMatchWidth:"wide",parsePatterns:udt,defaultParseWidth:"any"}),quarter:p2({matchPatterns:cdt,defaultMatchWidth:"wide",parsePatterns:hdt,defaultParseWidth:"any",valueCallback:d=>d+1}),month:p2({matchPatterns:fdt,defaultMatchWidth:"wide",parsePatterns:ddt,defaultParseWidth:"any"}),day:p2({matchPatterns:pdt,defaultMatchWidth:"wide",parsePatterns:mdt,defaultParseWidth:"any"}),dayPeriod:p2({matchPatterns:gdt,defaultMatchWidth:"any",parsePatterns:vdt,defaultParseWidth:"any"})},vF={code:"en-US",formatDistance:Vft,formatLong:$ft,formatRelative:Gft,localize:rdt,match:ydt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xdt(d,s){const E=Hu(d,s?.in);return cF(E,gF(E))+1}function yF(d,s){const E=Hu(d,s?.in),R=+w_(E)-+vft(E);return Math.round(R/lF)+1}function OM(d,s){const E=Hu(d,s?.in),R=E.getFullYear(),Y=Fy(),dt=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??Y.firstWeekContainsDate??Y.locale?.options?.firstWeekContainsDate??1,_t=bd(s?.in||d,0);_t.setFullYear(R+1,0,dt),_t.setHours(0,0,0,0);const zt=vg(_t,s),jt=bd(s?.in||d,0);jt.setFullYear(R,0,dt),jt.setHours(0,0,0,0);const te=vg(jt,s);return+E>=+zt?R+1:+E>=+te?R:R-1}function _dt(d,s){const E=Fy(),R=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??E.firstWeekContainsDate??E.locale?.options?.firstWeekContainsDate??1,Y=OM(d,s),dt=bd(s?.in||d,0);return dt.setFullYear(Y,0,R),dt.setHours(0,0,0,0),vg(dt,s)}function xF(d,s){const E=Hu(d,s?.in),R=+vg(E,s)-+_dt(E,s);return Math.round(R/lF)+1}function Xh(d,s){const E=d<0?"-":"",R=Math.abs(d).toString().padStart(s,"0");return E+R}const r1={y(d,s){const E=d.getFullYear(),R=E>0?E:1-E;return Xh(s==="yy"?R%100:R,s.length)},M(d,s){const E=d.getMonth();return s==="M"?String(E+1):Xh(E+1,2)},d(d,s){return Xh(d.getDate(),s.length)},a(d,s){const E=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.toUpperCase();case"aaa":return E;case"aaaaa":return E[0];case"aaaa":default:return E==="am"?"a.m.":"p.m."}},h(d,s){return Xh(d.getHours()%12||12,s.length)},H(d,s){return Xh(d.getHours(),s.length)},m(d,s){return Xh(d.getMinutes(),s.length)},s(d,s){return Xh(d.getSeconds(),s.length)},S(d,s){const E=s.length,R=d.getMilliseconds(),Y=Math.trunc(R*Math.pow(10,E-3));return Xh(Y,s.length)}},a_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MI={G:function(d,s,E){const R=d.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return E.era(R,{width:"abbreviated"});case"GGGGG":return E.era(R,{width:"narrow"});case"GGGG":default:return E.era(R,{width:"wide"})}},y:function(d,s,E){if(s==="yo"){const R=d.getFullYear(),Y=R>0?R:1-R;return E.ordinalNumber(Y,{unit:"year"})}return r1.y(d,s)},Y:function(d,s,E,R){const Y=OM(d,R),dt=Y>0?Y:1-Y;if(s==="YY"){const _t=dt%100;return Xh(_t,2)}return s==="Yo"?E.ordinalNumber(dt,{unit:"year"}):Xh(dt,s.length)},R:function(d,s){const E=uF(d);return Xh(E,s.length)},u:function(d,s){const E=d.getFullYear();return Xh(E,s.length)},Q:function(d,s,E){const R=Math.ceil((d.getMonth()+1)/3);switch(s){case"Q":return String(R);case"QQ":return Xh(R,2);case"Qo":return E.ordinalNumber(R,{unit:"quarter"});case"QQQ":return E.quarter(R,{width:"abbreviated",context:"formatting"});case"QQQQQ":return E.quarter(R,{width:"narrow",context:"formatting"});case"QQQQ":default:return E.quarter(R,{width:"wide",context:"formatting"})}},q:function(d,s,E){const R=Math.ceil((d.getMonth()+1)/3);switch(s){case"q":return String(R);case"qq":return Xh(R,2);case"qo":return E.ordinalNumber(R,{unit:"quarter"});case"qqq":return E.quarter(R,{width:"abbreviated",context:"standalone"});case"qqqqq":return E.quarter(R,{width:"narrow",context:"standalone"});case"qqqq":default:return E.quarter(R,{width:"wide",context:"standalone"})}},M:function(d,s,E){const R=d.getMonth();switch(s){case"M":case"MM":return r1.M(d,s);case"Mo":return E.ordinalNumber(R+1,{unit:"month"});case"MMM":return E.month(R,{width:"abbreviated",context:"formatting"});case"MMMMM":return E.month(R,{width:"narrow",context:"formatting"});case"MMMM":default:return E.month(R,{width:"wide",context:"formatting"})}},L:function(d,s,E){const R=d.getMonth();switch(s){case"L":return String(R+1);case"LL":return Xh(R+1,2);case"Lo":return E.ordinalNumber(R+1,{unit:"month"});case"LLL":return E.month(R,{width:"abbreviated",context:"standalone"});case"LLLLL":return E.month(R,{width:"narrow",context:"standalone"});case"LLLL":default:return E.month(R,{width:"wide",context:"standalone"})}},w:function(d,s,E,R){const Y=xF(d,R);return s==="wo"?E.ordinalNumber(Y,{unit:"week"}):Xh(Y,s.length)},I:function(d,s,E){const R=yF(d);return s==="Io"?E.ordinalNumber(R,{unit:"week"}):Xh(R,s.length)},d:function(d,s,E){return s==="do"?E.ordinalNumber(d.getDate(),{unit:"date"}):r1.d(d,s)},D:function(d,s,E){const R=xdt(d);return s==="Do"?E.ordinalNumber(R,{unit:"dayOfYear"}):Xh(R,s.length)},E:function(d,s,E){const R=d.getDay();switch(s){case"E":case"EE":case"EEE":return E.day(R,{width:"abbreviated",context:"formatting"});case"EEEEE":return E.day(R,{width:"narrow",context:"formatting"});case"EEEEEE":return E.day(R,{width:"short",context:"formatting"});case"EEEE":default:return E.day(R,{width:"wide",context:"formatting"})}},e:function(d,s,E,R){const Y=d.getDay(),dt=(Y-R.weekStartsOn+8)%7||7;switch(s){case"e":return String(dt);case"ee":return Xh(dt,2);case"eo":return E.ordinalNumber(dt,{unit:"day"});case"eee":return E.day(Y,{width:"abbreviated",context:"formatting"});case"eeeee":return E.day(Y,{width:"narrow",context:"formatting"});case"eeeeee":return E.day(Y,{width:"short",context:"formatting"});case"eeee":default:return E.day(Y,{width:"wide",context:"formatting"})}},c:function(d,s,E,R){const Y=d.getDay(),dt=(Y-R.weekStartsOn+8)%7||7;switch(s){case"c":return String(dt);case"cc":return Xh(dt,s.length);case"co":return E.ordinalNumber(dt,{unit:"day"});case"ccc":return E.day(Y,{width:"abbreviated",context:"standalone"});case"ccccc":return E.day(Y,{width:"narrow",context:"standalone"});case"cccccc":return E.day(Y,{width:"short",context:"standalone"});case"cccc":default:return E.day(Y,{width:"wide",context:"standalone"})}},i:function(d,s,E){const R=d.getDay(),Y=R===0?7:R;switch(s){case"i":return String(Y);case"ii":return Xh(Y,s.length);case"io":return E.ordinalNumber(Y,{unit:"day"});case"iii":return E.day(R,{width:"abbreviated",context:"formatting"});case"iiiii":return E.day(R,{width:"narrow",context:"formatting"});case"iiiiii":return E.day(R,{width:"short",context:"formatting"});case"iiii":default:return E.day(R,{width:"wide",context:"formatting"})}},a:function(d,s,E){const Y=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.dayPeriod(Y,{width:"abbreviated",context:"formatting"});case"aaa":return E.dayPeriod(Y,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return E.dayPeriod(Y,{width:"narrow",context:"formatting"});case"aaaa":default:return E.dayPeriod(Y,{width:"wide",context:"formatting"})}},b:function(d,s,E){const R=d.getHours();let Y;switch(R===12?Y=a_.noon:R===0?Y=a_.midnight:Y=R/12>=1?"pm":"am",s){case"b":case"bb":return E.dayPeriod(Y,{width:"abbreviated",context:"formatting"});case"bbb":return E.dayPeriod(Y,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return E.dayPeriod(Y,{width:"narrow",context:"formatting"});case"bbbb":default:return E.dayPeriod(Y,{width:"wide",context:"formatting"})}},B:function(d,s,E){const R=d.getHours();let Y;switch(R>=17?Y=a_.evening:R>=12?Y=a_.afternoon:R>=4?Y=a_.morning:Y=a_.night,s){case"B":case"BB":case"BBB":return E.dayPeriod(Y,{width:"abbreviated",context:"formatting"});case"BBBBB":return E.dayPeriod(Y,{width:"narrow",context:"formatting"});case"BBBB":default:return E.dayPeriod(Y,{width:"wide",context:"formatting"})}},h:function(d,s,E){if(s==="ho"){let R=d.getHours()%12;return R===0&&(R=12),E.ordinalNumber(R,{unit:"hour"})}return r1.h(d,s)},H:function(d,s,E){return s==="Ho"?E.ordinalNumber(d.getHours(),{unit:"hour"}):r1.H(d,s)},K:function(d,s,E){const R=d.getHours()%12;return s==="Ko"?E.ordinalNumber(R,{unit:"hour"}):Xh(R,s.length)},k:function(d,s,E){let R=d.getHours();return R===0&&(R=24),s==="ko"?E.ordinalNumber(R,{unit:"hour"}):Xh(R,s.length)},m:function(d,s,E){return s==="mo"?E.ordinalNumber(d.getMinutes(),{unit:"minute"}):r1.m(d,s)},s:function(d,s,E){return s==="so"?E.ordinalNumber(d.getSeconds(),{unit:"second"}):r1.s(d,s)},S:function(d,s){return r1.S(d,s)},X:function(d,s,E){const R=d.getTimezoneOffset();if(R===0)return"Z";switch(s){case"X":return EI(R);case"XXXX":case"XX":return yy(R);case"XXXXX":case"XXX":default:return yy(R,":")}},x:function(d,s,E){const R=d.getTimezoneOffset();switch(s){case"x":return EI(R);case"xxxx":case"xx":return yy(R);case"xxxxx":case"xxx":default:return yy(R,":")}},O:function(d,s,E){const R=d.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+SI(R,":");case"OOOO":default:return"GMT"+yy(R,":")}},z:function(d,s,E){const R=d.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+SI(R,":");case"zzzz":default:return"GMT"+yy(R,":")}},t:function(d,s,E){const R=Math.trunc(+d/1e3);return Xh(R,s.length)},T:function(d,s,E){return Xh(+d,s.length)}};function SI(d,s=""){const E=d>0?"-":"+",R=Math.abs(d),Y=Math.trunc(R/60),dt=R%60;return dt===0?E+String(Y):E+String(Y)+s+Xh(dt,2)}function EI(d,s){return d%60===0?(d>0?"-":"+")+Xh(Math.abs(d)/60,2):yy(d,s)}function yy(d,s=""){const E=d>0?"-":"+",R=Math.abs(d),Y=Xh(Math.trunc(R/60),2),dt=Xh(R%60,2);return E+Y+s+dt}const CI=(d,s)=>{switch(d){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},_F=(d,s)=>{switch(d){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},bdt=(d,s)=>{const E=d.match(/(P+)(p+)?/)||[],R=E[1],Y=E[2];if(!Y)return CI(d,s);let dt;switch(R){case"P":dt=s.dateTime({width:"short"});break;case"PP":dt=s.dateTime({width:"medium"});break;case"PPP":dt=s.dateTime({width:"long"});break;case"PPPP":default:dt=s.dateTime({width:"full"});break}return dt.replace("{{date}}",CI(R,s)).replace("{{time}}",_F(Y,s))},RA={p:_F,P:bdt},wdt=/^D+$/,kdt=/^Y+$/,Tdt=["D","DD","YY","YYYY"];function bF(d){return wdt.test(d)}function wF(d){return kdt.test(d)}function NA(d,s,E){const R=Adt(d,s,E);if(console.warn(R),Tdt.includes(d))throw new RangeError(R)}function Adt(d,s,E){const R=d[0]==="Y"?"years":"days of the month";return`Use \`${d.toLowerCase()}\` instead of \`${d}\` (in \`${s}\`) for formatting ${R} to the input \`${E}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Mdt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sdt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Edt=/^'([^]*?)'?$/,Cdt=/''/g,Ldt=/[a-zA-Z]/;function Pdt(d,s,E){const R=Fy(),Y=E?.locale??R.locale??vF,dt=E?.firstWeekContainsDate??E?.locale?.options?.firstWeekContainsDate??R.firstWeekContainsDate??R.locale?.options?.firstWeekContainsDate??1,_t=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??R.weekStartsOn??R.locale?.options?.weekStartsOn??0,zt=Hu(d,E?.in);if(!hF(zt))throw new RangeError("Invalid time value");let jt=s.match(Sdt).map(ce=>{const Ie=ce[0];if(Ie==="p"||Ie==="P"){const Je=RA[Ie];return Je(ce,Y.formatLong)}return ce}).join("").match(Mdt).map(ce=>{if(ce==="''")return{isToken:!1,value:"'"};const Ie=ce[0];if(Ie==="'")return{isToken:!1,value:Idt(ce)};if(MI[Ie])return{isToken:!0,value:ce};if(Ie.match(Ldt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ie+"`");return{isToken:!1,value:ce}});Y.localize.preprocessor&&(jt=Y.localize.preprocessor(zt,jt));const te={firstWeekContainsDate:dt,weekStartsOn:_t,locale:Y};return jt.map(ce=>{if(!ce.isToken)return ce.value;const Ie=ce.value;(!E?.useAdditionalWeekYearTokens&&wF(Ie)||!E?.useAdditionalDayOfYearTokens&&bF(Ie))&&NA(Ie,s,String(d));const Je=MI[Ie[0]];return Je(zt,Ie,Y.localize,te)}).join("")}function Idt(d){const s=d.match(Edt);return s?s[1].replace(Cdt,"'"):d}function zdt(){return Object.assign({},Fy())}function Odt(d,s){const E=Hu(d,s?.in).getDay();return E===0?7:E}function Ddt(d,s){const E=Fdt(s)?new s(0):bd(s,0);return E.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),E.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),E}function Fdt(d){return typeof d=="function"&&d.prototype?.constructor===d}const Bdt=10;class kF{subPriority=0;validate(s,E){return!0}}class Rdt extends kF{constructor(s,E,R,Y,dt){super(),this.value=s,this.validateValue=E,this.setValue=R,this.priority=Y,dt&&(this.subPriority=dt)}validate(s,E){return this.validateValue(s,this.value,E)}set(s,E,R){return this.setValue(s,E,this.value,R)}}class Ndt extends kF{priority=Bdt;subPriority=-1;constructor(s,E){super(),this.context=s||(R=>bd(E,R))}set(s,E){return E.timestampIsSet?s:bd(s,Ddt(s,this.context))}}class Sh{run(s,E,R,Y){const dt=this.parse(s,E,R,Y);return dt?{setter:new Rdt(dt.value,this.validate,this.set,this.priority,this.subPriority),rest:dt.rest}:null}validate(s,E,R){return!0}}class jdt extends Sh{priority=140;parse(s,E,R){switch(E){case"G":case"GG":case"GGG":return R.era(s,{width:"abbreviated"})||R.era(s,{width:"narrow"});case"GGGGG":return R.era(s,{width:"narrow"});case"GGGG":default:return R.era(s,{width:"wide"})||R.era(s,{width:"abbreviated"})||R.era(s,{width:"narrow"})}}set(s,E,R){return E.era=R,s.setFullYear(R,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["R","u","t","T"]}const Rd={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},fg={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nd(d,s){return d&&{value:s(d.value),rest:d.rest}}function od(d,s){const E=s.match(d);return E?{value:parseInt(E[0],10),rest:s.slice(E[0].length)}:null}function dg(d,s){const E=s.match(d);if(!E)return null;if(E[0]==="Z")return{value:0,rest:s.slice(1)};const R=E[1]==="+"?1:-1,Y=E[2]?parseInt(E[2],10):0,dt=E[3]?parseInt(E[3],10):0,_t=E[5]?parseInt(E[5],10):0;return{value:R*(Y*hw+dt*cw+_t*pft),rest:s.slice(E[0].length)}}function TF(d){return od(Rd.anyDigitsSigned,d)}function wd(d,s){switch(d){case 1:return od(Rd.singleDigit,s);case 2:return od(Rd.twoDigits,s);case 3:return od(Rd.threeDigits,s);case 4:return od(Rd.fourDigits,s);default:return od(new RegExp("^\\d{1,"+d+"}"),s)}}function E4(d,s){switch(d){case 1:return od(Rd.singleDigitSigned,s);case 2:return od(Rd.twoDigitsSigned,s);case 3:return od(Rd.threeDigitsSigned,s);case 4:return od(Rd.fourDigitsSigned,s);default:return od(new RegExp("^-?\\d{1,"+d+"}"),s)}}function DM(d){switch(d){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function AF(d,s){const E=s>0,R=E?s:1-s;let Y;if(R<=50)Y=d||100;else{const dt=R+50,_t=Math.trunc(dt/100)*100,zt=d>=dt%100;Y=d+_t-(zt?100:0)}return E?Y:1-Y}function MF(d){return d%400===0||d%4===0&&d%100!==0}class Udt extends Sh{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(s,E,R){const Y=dt=>({year:dt,isTwoDigitYear:E==="yy"});switch(E){case"y":return Nd(wd(4,s),Y);case"yo":return Nd(R.ordinalNumber(s,{unit:"year"}),Y);default:return Nd(wd(E.length,s),Y)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,R){const Y=s.getFullYear();if(R.isTwoDigitYear){const _t=AF(R.year,Y);return s.setFullYear(_t,0,1),s.setHours(0,0,0,0),s}const dt=!("era"in E)||E.era===1?R.year:1-R.year;return s.setFullYear(dt,0,1),s.setHours(0,0,0,0),s}}class Vdt extends Sh{priority=130;parse(s,E,R){const Y=dt=>({year:dt,isTwoDigitYear:E==="YY"});switch(E){case"Y":return Nd(wd(4,s),Y);case"Yo":return Nd(R.ordinalNumber(s,{unit:"year"}),Y);default:return Nd(wd(E.length,s),Y)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,R,Y){const dt=OM(s,Y);if(R.isTwoDigitYear){const zt=AF(R.year,dt);return s.setFullYear(zt,0,Y.firstWeekContainsDate),s.setHours(0,0,0,0),vg(s,Y)}const _t=!("era"in E)||E.era===1?R.year:1-R.year;return s.setFullYear(_t,0,Y.firstWeekContainsDate),s.setHours(0,0,0,0),vg(s,Y)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Hdt extends Sh{priority=130;parse(s,E){return E4(E==="R"?4:E.length,s)}set(s,E,R){const Y=bd(s,0);return Y.setFullYear(R,0,4),Y.setHours(0,0,0,0),w_(Y)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Wdt extends Sh{priority=130;parse(s,E){return E4(E==="u"?4:E.length,s)}set(s,E,R){return s.setFullYear(R,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class qdt extends Sh{priority=120;parse(s,E,R){switch(E){case"Q":case"QQ":return wd(E.length,s);case"Qo":return R.ordinalNumber(s,{unit:"quarter"});case"QQQ":return R.quarter(s,{width:"abbreviated",context:"formatting"})||R.quarter(s,{width:"narrow",context:"formatting"});case"QQQQQ":return R.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return R.quarter(s,{width:"wide",context:"formatting"})||R.quarter(s,{width:"abbreviated",context:"formatting"})||R.quarter(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=1&&E<=4}set(s,E,R){return s.setMonth((R-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class $dt extends Sh{priority=120;parse(s,E,R){switch(E){case"q":case"qq":return wd(E.length,s);case"qo":return R.ordinalNumber(s,{unit:"quarter"});case"qqq":return R.quarter(s,{width:"abbreviated",context:"standalone"})||R.quarter(s,{width:"narrow",context:"standalone"});case"qqqqq":return R.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return R.quarter(s,{width:"wide",context:"standalone"})||R.quarter(s,{width:"abbreviated",context:"standalone"})||R.quarter(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=1&&E<=4}set(s,E,R){return s.setMonth((R-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Zdt extends Sh{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(s,E,R){const Y=dt=>dt-1;switch(E){case"M":return Nd(od(Rd.month,s),Y);case"MM":return Nd(wd(2,s),Y);case"Mo":return Nd(R.ordinalNumber(s,{unit:"month"}),Y);case"MMM":return R.month(s,{width:"abbreviated",context:"formatting"})||R.month(s,{width:"narrow",context:"formatting"});case"MMMMM":return R.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return R.month(s,{width:"wide",context:"formatting"})||R.month(s,{width:"abbreviated",context:"formatting"})||R.month(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=11}set(s,E,R){return s.setMonth(R,1),s.setHours(0,0,0,0),s}}class Gdt extends Sh{priority=110;parse(s,E,R){const Y=dt=>dt-1;switch(E){case"L":return Nd(od(Rd.month,s),Y);case"LL":return Nd(wd(2,s),Y);case"Lo":return Nd(R.ordinalNumber(s,{unit:"month"}),Y);case"LLL":return R.month(s,{width:"abbreviated",context:"standalone"})||R.month(s,{width:"narrow",context:"standalone"});case"LLLLL":return R.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return R.month(s,{width:"wide",context:"standalone"})||R.month(s,{width:"abbreviated",context:"standalone"})||R.month(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=11}set(s,E,R){return s.setMonth(R,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Ydt(d,s,E){const R=Hu(d,E?.in),Y=xF(R,E)-s;return R.setDate(R.getDate()-Y*7),Hu(R,E?.in)}class Kdt extends Sh{priority=100;parse(s,E,R){switch(E){case"w":return od(Rd.week,s);case"wo":return R.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,R,Y){return vg(Ydt(s,R,Y),Y)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Xdt(d,s,E){const R=Hu(d,E?.in),Y=yF(R,E)-s;return R.setDate(R.getDate()-Y*7),R}class Jdt extends Sh{priority=100;parse(s,E,R){switch(E){case"I":return od(Rd.week,s);case"Io":return R.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,R){return w_(Xdt(s,R))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Qdt=[31,28,31,30,31,30,31,31,30,31,30,31],tpt=[31,29,31,30,31,30,31,31,30,31,30,31];class ept extends Sh{priority=90;subPriority=1;parse(s,E,R){switch(E){case"d":return od(Rd.date,s);case"do":return R.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const R=s.getFullYear(),Y=MF(R),dt=s.getMonth();return Y?E>=1&&E<=tpt[dt]:E>=1&&E<=Qdt[dt]}set(s,E,R){return s.setDate(R),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class rpt extends Sh{priority=90;subpriority=1;parse(s,E,R){switch(E){case"D":case"DD":return od(Rd.dayOfYear,s);case"Do":return R.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const R=s.getFullYear();return MF(R)?E>=1&&E<=366:E>=1&&E<=365}set(s,E,R){return s.setMonth(0,R),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function FM(d,s,E){const R=Fy(),Y=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??R.weekStartsOn??R.locale?.options?.weekStartsOn??0,dt=Hu(d,E?.in),_t=dt.getDay(),jt=(s%7+7)%7,te=7-Y,ce=s<0||s>6?s-(_t+te)%7:(jt+te)%7-(_t+te)%7;return n6(dt,ce,E)}class npt extends Sh{priority=90;parse(s,E,R){switch(E){case"E":case"EE":case"EEE":return R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"});case"EEEEE":return R.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"});case"EEEE":default:return R.day(s,{width:"wide",context:"formatting"})||R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,R,Y){return s=FM(s,R,Y),s.setHours(0,0,0,0),s}incompatibleTokens=["D","i","e","c","t","T"]}class ipt extends Sh{priority=90;parse(s,E,R,Y){const dt=_t=>{const zt=Math.floor((_t-1)/7)*7;return(_t+Y.weekStartsOn+6)%7+zt};switch(E){case"e":case"ee":return Nd(wd(E.length,s),dt);case"eo":return Nd(R.ordinalNumber(s,{unit:"day"}),dt);case"eee":return R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"});case"eeeee":return R.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"});case"eeee":default:return R.day(s,{width:"wide",context:"formatting"})||R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,R,Y){return s=FM(s,R,Y),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class apt extends Sh{priority=90;parse(s,E,R,Y){const dt=_t=>{const zt=Math.floor((_t-1)/7)*7;return(_t+Y.weekStartsOn+6)%7+zt};switch(E){case"c":case"cc":return Nd(wd(E.length,s),dt);case"co":return Nd(R.ordinalNumber(s,{unit:"day"}),dt);case"ccc":return R.day(s,{width:"abbreviated",context:"standalone"})||R.day(s,{width:"short",context:"standalone"})||R.day(s,{width:"narrow",context:"standalone"});case"ccccc":return R.day(s,{width:"narrow",context:"standalone"});case"cccccc":return R.day(s,{width:"short",context:"standalone"})||R.day(s,{width:"narrow",context:"standalone"});case"cccc":default:return R.day(s,{width:"wide",context:"standalone"})||R.day(s,{width:"abbreviated",context:"standalone"})||R.day(s,{width:"short",context:"standalone"})||R.day(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=6}set(s,E,R,Y){return s=FM(s,R,Y),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function opt(d,s,E){const R=Hu(d,E?.in),Y=Odt(R,E),dt=s-Y;return n6(R,dt,E)}class spt extends Sh{priority=90;parse(s,E,R){const Y=dt=>dt===0?7:dt;switch(E){case"i":case"ii":return wd(E.length,s);case"io":return R.ordinalNumber(s,{unit:"day"});case"iii":return Nd(R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"}),Y);case"iiiii":return Nd(R.day(s,{width:"narrow",context:"formatting"}),Y);case"iiiiii":return Nd(R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"}),Y);case"iiii":default:return Nd(R.day(s,{width:"wide",context:"formatting"})||R.day(s,{width:"abbreviated",context:"formatting"})||R.day(s,{width:"short",context:"formatting"})||R.day(s,{width:"narrow",context:"formatting"}),Y)}}validate(s,E){return E>=1&&E<=7}set(s,E,R){return s=opt(s,R),s.setHours(0,0,0,0),s}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class lpt extends Sh{priority=80;parse(s,E,R){switch(E){case"a":case"aa":case"aaa":return R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaaa":return R.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return R.dayPeriod(s,{width:"wide",context:"formatting"})||R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,R){return s.setHours(DM(R),0,0,0),s}incompatibleTokens=["b","B","H","k","t","T"]}class upt extends Sh{priority=80;parse(s,E,R){switch(E){case"b":case"bb":case"bbb":return R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbbb":return R.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return R.dayPeriod(s,{width:"wide",context:"formatting"})||R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,R){return s.setHours(DM(R),0,0,0),s}incompatibleTokens=["a","B","H","k","t","T"]}class cpt extends Sh{priority=80;parse(s,E,R){switch(E){case"B":case"BB":case"BBB":return R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBBB":return R.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return R.dayPeriod(s,{width:"wide",context:"formatting"})||R.dayPeriod(s,{width:"abbreviated",context:"formatting"})||R.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,R){return s.setHours(DM(R),0,0,0),s}incompatibleTokens=["a","b","t","T"]}class hpt extends Sh{priority=70;parse(s,E,R){switch(E){case"h":return od(Rd.hour12h,s);case"ho":return R.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=12}set(s,E,R){const Y=s.getHours()>=12;return Y&&R<12?s.setHours(R+12,0,0,0):!Y&&R===12?s.setHours(0,0,0,0):s.setHours(R,0,0,0),s}incompatibleTokens=["H","K","k","t","T"]}class fpt extends Sh{priority=70;parse(s,E,R){switch(E){case"H":return od(Rd.hour23h,s);case"Ho":return R.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=23}set(s,E,R){return s.setHours(R,0,0,0),s}incompatibleTokens=["a","b","h","K","k","t","T"]}class dpt extends Sh{priority=70;parse(s,E,R){switch(E){case"K":return od(Rd.hour11h,s);case"Ko":return R.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=11}set(s,E,R){return s.getHours()>=12&&R<12?s.setHours(R+12,0,0,0):s.setHours(R,0,0,0),s}incompatibleTokens=["h","H","k","t","T"]}class ppt extends Sh{priority=70;parse(s,E,R){switch(E){case"k":return od(Rd.hour24h,s);case"ko":return R.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=24}set(s,E,R){const Y=R<=24?R%24:R;return s.setHours(Y,0,0,0),s}incompatibleTokens=["a","b","h","H","K","t","T"]}class mpt extends Sh{priority=60;parse(s,E,R){switch(E){case"m":return od(Rd.minute,s);case"mo":return R.ordinalNumber(s,{unit:"minute"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,R){return s.setMinutes(R,0,0),s}incompatibleTokens=["t","T"]}class gpt extends Sh{priority=50;parse(s,E,R){switch(E){case"s":return od(Rd.second,s);case"so":return R.ordinalNumber(s,{unit:"second"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,R){return s.setSeconds(R,0),s}incompatibleTokens=["t","T"]}class vpt extends Sh{priority=30;parse(s,E){const R=Y=>Math.trunc(Y*Math.pow(10,-E.length+3));return Nd(wd(E.length,s),R)}set(s,E,R){return s.setMilliseconds(R),s}incompatibleTokens=["t","T"]}class ypt extends Sh{priority=10;parse(s,E){switch(E){case"X":return dg(fg.basicOptionalMinutes,s);case"XX":return dg(fg.basic,s);case"XXXX":return dg(fg.basicOptionalSeconds,s);case"XXXXX":return dg(fg.extendedOptionalSeconds,s);case"XXX":default:return dg(fg.extended,s)}}set(s,E,R){return E.timestampIsSet?s:bd(s,s.getTime()-S4(s)-R)}incompatibleTokens=["t","T","x"]}class xpt extends Sh{priority=10;parse(s,E){switch(E){case"x":return dg(fg.basicOptionalMinutes,s);case"xx":return dg(fg.basic,s);case"xxxx":return dg(fg.basicOptionalSeconds,s);case"xxxxx":return dg(fg.extendedOptionalSeconds,s);case"xxx":default:return dg(fg.extended,s)}}set(s,E,R){return E.timestampIsSet?s:bd(s,s.getTime()-S4(s)-R)}incompatibleTokens=["t","T","X"]}class _pt extends Sh{priority=40;parse(s){return TF(s)}set(s,E,R){return[bd(s,R*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class bpt extends Sh{priority=20;parse(s){return TF(s)}set(s,E,R){return[bd(s,R),{timestampIsSet:!0}]}incompatibleTokens="*"}const wpt={G:new jdt,y:new Udt,Y:new Vdt,R:new Hdt,u:new Wdt,Q:new qdt,q:new $dt,M:new Zdt,L:new Gdt,w:new Kdt,I:new Jdt,d:new ept,D:new rpt,E:new npt,e:new ipt,c:new apt,i:new spt,a:new lpt,b:new upt,B:new cpt,h:new hpt,H:new fpt,K:new dpt,k:new ppt,m:new mpt,s:new gpt,S:new vpt,X:new ypt,x:new xpt,t:new _pt,T:new bpt},kpt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tpt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Apt=/^'([^]*?)'?$/,Mpt=/''/g,Spt=/\S/,Ept=/[a-zA-Z]/;function Cpt(d,s,E,R){const Y=()=>bd(R?.in||E,NaN),dt=zdt(),_t=R?.locale??dt.locale??vF,zt=R?.firstWeekContainsDate??R?.locale?.options?.firstWeekContainsDate??dt.firstWeekContainsDate??dt.locale?.options?.firstWeekContainsDate??1,jt=R?.weekStartsOn??R?.locale?.options?.weekStartsOn??dt.weekStartsOn??dt.locale?.options?.weekStartsOn??0;if(!s)return d?Y():Hu(E,R?.in);const te={firstWeekContainsDate:zt,weekStartsOn:jt,locale:_t},ce=[new Ndt(R?.in,E)],Ie=s.match(Tpt).map(Vr=>{const fn=Vr[0];if(fn in RA){const Dt=RA[fn];return Dt(Vr,_t.formatLong)}return Vr}).join("").match(kpt),Je=[];for(let Vr of Ie){!R?.useAdditionalWeekYearTokens&&wF(Vr)&&NA(Vr,s,d),!R?.useAdditionalDayOfYearTokens&&bF(Vr)&&NA(Vr,s,d);const fn=Vr[0],Dt=wpt[fn];if(Dt){const{incompatibleTokens:cn}=Dt;if(Array.isArray(cn)){const Dn=Je.find(ii=>cn.includes(ii.token)||ii.token===fn);if(Dn)throw new RangeError(`The format string mustn't contain \`${Dn.fullToken}\` and \`${Vr}\` at the same time`)}else if(Dt.incompatibleTokens==="*"&&Je.length>0)throw new RangeError(`The format string mustn't contain \`${Vr}\` and any other token at the same time`);Je.push({token:fn,fullToken:Vr});const ti=Dt.run(d,Vr,_t.match,te);if(!ti)return Y();ce.push(ti.setter),d=ti.rest}else{if(fn.match(Ept))throw new RangeError("Format string contains an unescaped latin alphabet character `"+fn+"`");if(Vr==="''"?Vr="'":fn==="'"&&(Vr=Lpt(Vr)),d.indexOf(Vr)===0)d=d.slice(Vr.length);else return Y()}}if(d.length>0&&Spt.test(d))return Y();const fr=ce.map(Vr=>Vr.priority).sort((Vr,fn)=>fn-Vr).filter((Vr,fn,Dt)=>Dt.indexOf(Vr)===fn).map(Vr=>ce.filter(fn=>fn.priority===Vr).sort((fn,Dt)=>Dt.subPriority-fn.subPriority)).map(Vr=>Vr[0]);let Ar=Hu(E,R?.in);if(isNaN(+Ar))return Y();const kr={};for(const Vr of fr){if(!Vr.validate(Ar,te))return Y();const fn=Vr.set(Ar,kr,te);Array.isArray(fn)?(Ar=fn[0],Object.assign(kr,fn[1])):Ar=fn}return Ar}function Lpt(d){return d.match(Apt)[1].replace(Mpt,"'")}function Ppt(d,s){const E=Hu(d,s?.in);return E.setMinutes(0,0,0),E}function Ipt(d,s){const E=Hu(d,s?.in);return E.setSeconds(0,0),E}function zpt(d,s){const E=Hu(d,s?.in);return E.setMilliseconds(0),E}function Opt(d,s){const E=()=>bd(s?.in,NaN),R=s?.additionalDigits??2,Y=Rpt(d);let dt;if(Y.date){const te=Npt(Y.date,R);dt=jpt(te.restDateString,te.year)}if(!dt||isNaN(+dt))return E();const _t=+dt;let zt=0,jt;if(Y.time&&(zt=Upt(Y.time),isNaN(zt)))return E();if(Y.timezone){if(jt=Vpt(Y.timezone),isNaN(jt))return E()}else{const te=new Date(_t+zt),ce=Hu(0,s?.in);return ce.setFullYear(te.getUTCFullYear(),te.getUTCMonth(),te.getUTCDate()),ce.setHours(te.getUTCHours(),te.getUTCMinutes(),te.getUTCSeconds(),te.getUTCMilliseconds()),ce}return Hu(_t+zt+jt,s?.in)}const G5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Dpt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Fpt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Bpt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Rpt(d){const s={},E=d.split(G5.dateTimeDelimiter);let R;if(E.length>2)return s;if(/:/.test(E[0])?R=E[0]:(s.date=E[0],R=E[1],G5.timeZoneDelimiter.test(s.date)&&(s.date=d.split(G5.timeZoneDelimiter)[0],R=d.substr(s.date.length,d.length))),R){const Y=G5.timezone.exec(R);Y?(s.time=R.replace(Y[1],""),s.timezone=Y[1]):s.time=R}return s}function Npt(d,s){const E=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+s)+"})|(\\d{2}|[+-]\\d{"+(2+s)+"})$)"),R=d.match(E);if(!R)return{year:NaN,restDateString:""};const Y=R[1]?parseInt(R[1]):null,dt=R[2]?parseInt(R[2]):null;return{year:dt===null?Y:dt*100,restDateString:d.slice((R[1]||R[2]).length)}}function jpt(d,s){if(s===null)return new Date(NaN);const E=d.match(Dpt);if(!E)return new Date(NaN);const R=!!E[4],Y=m2(E[1]),dt=m2(E[2])-1,_t=m2(E[3]),zt=m2(E[4]),jt=m2(E[5])-1;if(R)return Zpt(s,zt,jt)?Hpt(s,zt,jt):new Date(NaN);{const te=new Date(0);return!qpt(s,dt,_t)||!$pt(s,Y)?new Date(NaN):(te.setUTCFullYear(s,dt,Math.max(Y,_t)),te)}}function m2(d){return d?parseInt(d):1}function Upt(d){const s=d.match(Fpt);if(!s)return NaN;const E=rA(s[1]),R=rA(s[2]),Y=rA(s[3]);return Gpt(E,R,Y)?E*hw+R*cw+Y*1e3:NaN}function rA(d){return d&&parseFloat(d.replace(",","."))||0}function Vpt(d){if(d==="Z")return 0;const s=d.match(Bpt);if(!s)return 0;const E=s[1]==="+"?-1:1,R=parseInt(s[2]),Y=s[3]&&parseInt(s[3])||0;return Ypt(R,Y)?E*(R*hw+Y*cw):NaN}function Hpt(d,s,E){const R=new Date(0);R.setUTCFullYear(d,0,4);const Y=R.getUTCDay()||7,dt=(s-1)*7+E+1-Y;return R.setUTCDate(R.getUTCDate()+dt),R}const Wpt=[31,null,31,30,31,30,31,31,30,31,30,31];function SF(d){return d%400===0||d%4===0&&d%100!==0}function qpt(d,s,E){return s>=0&&s<=11&&E>=1&&E<=(Wpt[s]||(SF(d)?29:28))}function $pt(d,s){return s>=1&&s<=(SF(d)?366:365)}function Zpt(d,s,E){return s>=1&&s<=53&&E>=0&&E<=6}function Gpt(d,s,E){return d===24?s===0&&E===0:E>=0&&E<60&&s>=0&&s<60&&d>=0&&d<25}function Ypt(d,s){return s>=0&&s<=59}/*! * chartjs-adapter-date-fns v3.0.0 * https://www.chartjs.org * (c) 2022 chartjs-adapter-date-fns Contributors * Released under the MIT license - */const Upt={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};ED._date.override({_id:"date-fns",formats:function(){return Upt},parse:function(d,s){if(d===null||typeof d>"u")return null;const E=typeof d;return E==="number"||d instanceof Date?d=Hu(d):E==="string"&&(typeof s=="string"?d=_pt(d,s,new Date,this.options):d=Apt(d,this.options)),YD(d)?d.getTime():null},format:function(d,s){return wdt(d,s,this.options)},add:function(d,s,E){switch(E){case"millisecond":return LM(d,s);case"second":return hft(d,s);case"minute":return uft(d,s);case"hour":return oft(d,s);case"day":return r6(d,s);case"week":return fft(d,s);case"month":return CM(d,s);case"quarter":return cft(d,s);case"year":return dft(d,s);default:return d}},diff:function(d,s,E){switch(E){case"millisecond":return PM(d,s);case"second":return bft(d,s);case"minute":return yft(d,s);case"hour":return vft(d,s);case"day":return KD(d,s);case"week":return wft(d,s);case"month":return QD(d,s);case"quarter":return _ft(d,s);case"year":return kft(d,s);default:return 0}},startOf:function(d,s,E){switch(s){case"second":return Tpt(d);case"minute":return kpt(d);case"hour":return wpt(d);case"day":return DA(d);case"week":return mg(d);case"isoWeek":return mg(d,{weekStartsOn:+E});case"month":return Aft(d);case"quarter":return Tft(d);case"year":return tF(d);default:return d}},endOf:function(d,s){switch(s){case"second":return Pft(d);case"minute":return Cft(d);case"hour":return Sft(d);case"day":return XD(d);case"week":return Eft(d);case"month":return JD(d);case"quarter":return Lft(d);case"year":return Mft(d);default:return d}}});var a4={exports:{}},Vpt=a4.exports,EI;function Hpt(){return EI||(EI=1,function(d){var s={};(function(E,B){d.exports?d.exports=B():E.moduleName=B()})(typeof self<"u"?self:Vpt,()=>{var E=(()=>{var B=Object.create,K=Object.defineProperty,pt=Object.defineProperties,_t=Object.getOwnPropertyDescriptor,Ot=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,he=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,pr=(Q,Z,c)=>Z in Q?K(Q,Z,{enumerable:!0,configurable:!0,writable:!0,value:c}):Q[Z]=c,Mr=(Q,Z)=>{for(var c in Z||(Z={}))De.call(Z,c)&&pr(Q,c,Z[c]);if(te)for(var c of te(Z))er.call(Z,c)&&pr(Q,c,Z[c]);return Q},Tr=(Q,Z)=>pt(Q,Ot(Z)),Vr=(Q,Z)=>{var c={};for(var g in Q)De.call(Q,g)&&Z.indexOf(g)<0&&(c[g]=Q[g]);if(Q!=null&&te)for(var g of te(Q))Z.indexOf(g)<0&&er.call(Q,g)&&(c[g]=Q[g]);return c},mn=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z),Dt=(Q,Z)=>()=>(Z||Q((Z={exports:{}}).exports,Z),Z.exports),cn=(Q,Z)=>{for(var c in Z)K(Q,c,{get:Z[c],enumerable:!0})},Jn=(Q,Z,c,g)=>{if(Z&&typeof Z=="object"||typeof Z=="function")for(let I of jt(Z))!De.call(Q,I)&&I!==c&&K(Q,I,{get:()=>Z[I],enumerable:!(g=_t(Z,I))||g.enumerable});return Q},Bn=(Q,Z,c)=>(c=Q!=null?B(he(Q)):{},Jn(K(c,"default",{value:Q,enumerable:!0}),Q)),ni=Q=>Jn(K({},"__esModule",{value:!0}),Q),Wi=Dt(Q=>{Q.version="3.2.0"}),Un=Dt((Q,Z)=>{(function(c,g,I){g[c]=g[c]||I(),typeof Z<"u"&&Z.exports&&(Z.exports=g[c])})("Promise",typeof window<"u"?window:Q,function(){var c,g,I,S=Object.prototype.toString,t=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(T,u,b,_){return Object.defineProperty(T,u,{value:b,writable:!0,configurable:_!==!1})}}catch{c=function(u,b,_){return u[b]=_,u}}I=function(){var T,u,b;function _(P,M){this.fn=P,this.self=M,this.next=void 0}return{add:function(P,M){b=new _(P,M),u?u.next=b:T=b,u=b,b=void 0},drain:function(){var P=T;for(T=u=g=void 0;P;)P.fn.call(P.self),P=P.next}}}();function e(T,u){I.add(T,u),g||(g=t(I.drain))}function r(T){var u,b=typeof T;return T!=null&&(b=="object"||b=="function")&&(u=T.then),typeof u=="function"?u:!1}function a(){for(var T=0;T0&&e(a,b))}catch(_){i.call(new f(b),_)}}}function i(T){var u=this;u.triggered||(u.triggered=!0,u.def&&(u=u.def),u.msg=T,u.state=2,u.chain.length>0&&e(a,u))}function l(T,u,b,_){for(var P=0;P{(function(){var c={version:"3.8.2"},g=[].slice,I=function(At){return g.call(At)},S=self.document;function t(At){return At&&(At.ownerDocument||At.document||At).documentElement}function e(At){return At&&(At.ownerDocument&&At.ownerDocument.defaultView||At.document&&At||At.defaultView)}if(S)try{I(S.documentElement.childNodes)[0].nodeType}catch{I=function(Ut){for(var ue=Ut.length,Me=new Array(ue);ue--;)Me[ue]=Ut[ue];return Me}}if(Date.now||(Date.now=function(){return+new Date}),S)try{S.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(Ut,ue){a.call(this,Ut,ue+"")},r.setAttributeNS=function(Ut,ue,Me){n.call(this,Ut,ue,Me+"")},o.setProperty=function(Ut,ue,Me){i.call(this,Ut,ue+"",Me)}}c.ascending=l;function l(At,Ut){return AtUt?1:At>=Ut?0:NaN}c.descending=function(At,Ut){return UtAt?1:Ut>=At?0:NaN},c.min=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}return Pe},c.max=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}return Pe},c.extent=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne,sr;if(arguments.length===1){for(;++ue=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr1)return sr/(Er-1)},c.deviation=function(){var At=c.variance.apply(this,arguments);return At&&Math.sqrt(At)};function y(At){return{left:function(Ut,ue,Me,Pe){for(arguments.length<3&&(Me=0),arguments.length<4&&(Pe=Ut.length);Me>>1;At(Ut[Ne],ue)<0?Me=Ne+1:Pe=Ne}return Me},right:function(Ut,ue,Me,Pe){for(arguments.length<3&&(Me=0),arguments.length<4&&(Pe=Ut.length);Me>>1;At(Ut[Ne],ue)>0?Pe=Ne:Me=Ne+1}return Me}}}var v=y(l);c.bisectLeft=v.left,c.bisect=c.bisectRight=v.right,c.bisector=function(At){return y(At.length===1?function(Ut,ue){return l(At(Ut),ue)}:At)},c.shuffle=function(At,Ut,ue){(Me=arguments.length)<3&&(ue=At.length,Me<2&&(Ut=0));for(var Me=ue-Ut,Pe,Ne;Me;)Ne=Math.random()*Me--|0,Pe=At[Me+Ut],At[Me+Ut]=At[Ne+Ut],At[Ne+Ut]=Pe;return At},c.permute=function(At,Ut){for(var ue=Ut.length,Me=new Array(ue);ue--;)Me[ue]=At[Ut[ue]];return Me},c.pairs=function(At){for(var Ut=0,ue=At.length-1,Me,Pe=At[0],Ne=new Array(ue<0?0:ue);Ut=0;)for(sr=At[Ut],ue=sr.length;--ue>=0;)Ne[--Pe]=sr[ue];return Ne};var u=Math.abs;c.range=function(At,Ut,ue){if(arguments.length<3&&(ue=1,arguments.length<2&&(Ut=At,At=0)),(Ut-At)/ue===1/0)throw new Error("infinite range");var Me=[],Pe=b(u(ue)),Ne=-1,sr;if(At*=Pe,Ut*=Pe,ue*=Pe,ue<0)for(;(sr=At+ue*++Ne)>Ut;)Me.push(sr/Pe);else for(;(sr=At+ue*++Ne)=Ut.length)return Pe?Pe.call(At,Er):Me?Er.sort(Me):Er;for(var Jr=-1,xn=Er.length,zn=Ut[rn++],On,Hi,Vn,yi=new P,Si;++Jr=Ut.length)return ar;var rn=[],Jr=ue[Er++];return ar.forEach(function(xn,zn){rn.push({key:xn,values:sr(zn,Er)})}),Jr?rn.sort(function(xn,zn){return Jr(xn.key,zn.key)}):rn}return At.map=function(ar,Er){return Ne(Er,ar,0)},At.entries=function(ar){return sr(Ne(c.map,ar,0),0)},At.key=function(ar){return Ut.push(ar),At},At.sortKeys=function(ar){return ue[Ut.length-1]=ar,At},At.sortValues=function(ar){return Me=ar,At},At.rollup=function(ar){return Pe=ar,At},At},c.set=function(At){var Ut=new j;if(At)for(var ue=0,Me=At.length;ue=0&&(Me=At.slice(ue+1),At=At.slice(0,ue)),At)return arguments.length<2?this[At].on(Me):this[At].on(Me,Ut);if(arguments.length===2){if(Ut==null)for(At in this)this.hasOwnProperty(At)&&this[At].on(Me,null);return this}};function J(At){var Ut=[],ue=new P;function Me(){for(var Pe=Ut,Ne=-1,sr=Pe.length,ar;++Ne=0&&(ue=At.slice(0,Ut))!=="xmlns"&&(At=At.slice(Ut+1)),kt.hasOwnProperty(ue)?{space:kt[ue],local:At}:At}},it.attr=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node();return At=c.ns.qualify(At),At.local?ue.getAttributeNS(At.space,At.local):ue.getAttribute(At)}for(Ut in At)this.each(It(Ut,At[Ut]));return this}return this.each(It(At,Ut))};function It(At,Ut){At=c.ns.qualify(At);function ue(){this.removeAttribute(At)}function Me(){this.removeAttributeNS(At.space,At.local)}function Pe(){this.setAttribute(At,Ut)}function Ne(){this.setAttributeNS(At.space,At.local,Ut)}function sr(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttribute(At):this.setAttribute(At,Er)}function ar(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttributeNS(At.space,At.local):this.setAttributeNS(At.space,At.local,Er)}return Ut==null?At.local?Me:ue:typeof Ut=="function"?At.local?ar:sr:At.local?Ne:Pe}function Pt(At){return At.trim().replace(/\s+/g," ")}it.classed=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node(),Me=(At=Wt(At)).length,Pe=-1;if(Ut=ue.classList){for(;++Pe=0;)(Ne=ue[Me])&&(Pe&&Pe!==Ne.nextSibling&&Pe.parentNode.insertBefore(Ne,Pe),Pe=Ne);return this},it.sort=function(At){At=ee.apply(this,arguments);for(var Ut=-1,ue=this.length;++Ut=Ut&&(Ut=Pe+1);!(Er=sr[Ut])&&++Ut0&&(At=At.slice(0,Pe));var sr=cr.get(At);sr&&(At=sr,Ne=jr);function ar(){var Jr=this[Me];Jr&&(this.removeEventListener(At,Jr,Jr.$),delete this[Me])}function Er(){var Jr=Ne(Ut,I(arguments));ar.call(this),this.addEventListener(At,this[Me]=Jr,Jr.$=ue),Jr._=Ut}function rn(){var Jr=new RegExp("^__on([^.]+)"+c.requote(At)+"$"),xn;for(var zn in this)if(xn=zn.match(Jr)){var On=this[zn];this.removeEventListener(xn[1],On,On.$),delete this[zn]}}return Pe?Ut?Er:ar:Ut?W:rn}var cr=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&cr.forEach(function(At){"on"+At in S&&cr.remove(At)});function ur(At,Ut){return function(ue){var Me=c.event;c.event=ue,Ut[0]=this.__data__;try{At.apply(this,Ut)}finally{c.event=Me}}}function jr(At,Ut){var ue=ur(At,Ut);return function(Me){var Pe=this,Ne=Me.relatedTarget;(!Ne||Ne!==Pe&&!(Ne.compareDocumentPosition(Pe)&8))&&ue.call(Pe,Me)}}var Wr,br=0;function Xr(At){var Ut=".dragsuppress-"+ ++br,ue="click"+Ut,Me=c.select(e(At)).on("touchmove"+Ut,lt).on("dragstart"+Ut,lt).on("selectstart"+Ut,lt);if(Wr==null&&(Wr="onselectstart"in At?!1:F(At.style,"userSelect")),Wr){var Pe=t(At).style,Ne=Pe[Wr];Pe[Wr]="none"}return function(sr){if(Me.on(Ut,null),Wr&&(Pe[Wr]=Ne),sr){var ar=function(){Me.on(ue,null)};Me.on(ue,function(){lt(),ar()},!0),setTimeout(ar,0)}}}c.mouse=function(At){return Le(At,yt())};var nn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Le(At,Ut){Ut.changedTouches&&(Ut=Ut.changedTouches[0]);var ue=At.ownerSVGElement||At;if(ue.createSVGPoint){var Me=ue.createSVGPoint();if(nn<0){var Pe=e(At);if(Pe.scrollX||Pe.scrollY){ue=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=ue[0][0].getScreenCTM();nn=!(Ne.f||Ne.e),ue.remove()}}return nn?(Me.x=Ut.pageX,Me.y=Ut.pageY):(Me.x=Ut.clientX,Me.y=Ut.clientY),Me=Me.matrixTransform(At.getScreenCTM().inverse()),[Me.x,Me.y]}var sr=At.getBoundingClientRect();return[Ut.clientX-sr.left-At.clientLeft,Ut.clientY-sr.top-At.clientTop]}c.touch=function(At,Ut,ue){if(arguments.length<3&&(ue=Ut,Ut=yt().changedTouches),Ut){for(var Me=0,Pe=Ut.length,Ne;Me1?re:At<-1?-re:Math.asin(At)}function or(At){return((At=Math.exp(At))-1/At)/2}function Sr(At){return((At=Math.exp(At))+1/At)/2}function Ar(At){return((At=Math.exp(2*At))-1)/(At+1)}var mr=Math.SQRT2,Qr=2,Hn=4;c.interpolateZoom=function(At,Ut){var ue=At[0],Me=At[1],Pe=At[2],Ne=Ut[0],sr=Ut[1],ar=Ut[2],Er=Ne-ue,rn=sr-Me,Jr=Er*Er+rn*rn,xn,zn;if(Jr0&&(_o=_o.transition().duration(sr)),_o.call(Gi.event)}function Ro(){yi&&yi.domain(Vn.range().map(function(_o){return(_o-At.x)/At.k}).map(Vn.invert)),Ri&&Ri.domain(Si.range().map(function(_o){return(_o-At.y)/At.k}).map(Si.invert))}function Wo(_o){ar++||_o({type:"zoomstart"})}function ol(_o){Ro(),_o({type:"zoom",scale:At.k,translate:[At.x,At.y]})}function Go(_o){--ar||(_o({type:"zoomend"}),ue=null)}function vs(){var _o=this,Gs=Hi.of(_o,arguments),nl=0,uu=c.select(e(_o)).on(rn,jl).on(Jr,ru),Xl=Kn(c.mouse(_o)),rh=Xr(_o);Ui.call(_o),Wo(Gs);function jl(){nl=1,ao(c.mouse(_o),Xl),ol(Gs)}function ru(){uu.on(rn,null).on(Jr,null),rh(nl),Go(Gs)}}function Tl(){var _o=this,Gs=Hi.of(_o,arguments),nl={},uu=0,Xl,rh=".zoom-"+c.event.changedTouches[0].identifier,jl="touchmove"+rh,ru="touchend"+rh,wh=[],_e=c.select(_o),kr=Xr(_o);Dn(),Wo(Gs),_e.on(Er,null).on(zn,Dn);function Ir(){var yn=c.touches(_o);return Xl=At.k,yn.forEach(function(ai){ai.identifier in nl&&(nl[ai.identifier]=Kn(ai))}),yn}function Dn(){var yn=c.event.target;c.select(yn).on(jl,li).on(ru,ti),wh.push(yn);for(var ai=c.event.changedTouches,ta=0,$i=ai.length;ta<$i;++ta)nl[ai[ta].identifier]=null;var ya=Ir(),$a=Date.now();if(ya.length===1){if($a-On<500){var Na=ya[0];Po(_o,Na,nl[Na.identifier],Math.floor(Math.log(At.k)/Math.LN2)+1),lt()}On=$a}else if(ya.length>1){var Na=ya[0],ia=ya[1],Ai=Na[0]-ia[0],fn=Na[1]-ia[1];uu=Ai*Ai+fn*fn}}function li(){var yn=c.touches(_o),ai,ta,$i,ya;Ui.call(_o);for(var $a=0,Na=yn.length;$a1?1:Ut,ue=ue<0?0:ue>1?1:ue,Pe=ue<=.5?ue*(1+Ut):ue+Ut-ue*Ut,Me=2*ue-Pe;function Ne(ar){return ar>360?ar-=360:ar<0&&(ar+=360),ar<60?Me+(Pe-Me)*ar/60:ar<180?Pe:ar<240?Me+(Pe-Me)*(240-ar)/60:Me}function sr(ar){return Math.round(Ne(ar)*255)}return new za(sr(At+120),sr(At),sr(At-120))}c.hcl=We;function We(At,Ut,ue){return this instanceof We?(this.h=+At,this.c=+Ut,void(this.l=+ue)):arguments.length<2?At instanceof We?new We(At.h,At.c,At.l):At instanceof _r?Oi(At.l,At.a,At.b):Oi((At=Br((At=c.rgb(At)).r,At.g,At.b)).l,At.a,At.b):new We(At,Ut,ue)}var nr=We.prototype=new oi;nr.brighter=function(At){return new We(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?At:1)))},nr.darker=function(At){return new We(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?At:1)))},nr.rgb=function(){return fr(this.h,this.c,this.l).rgb()};function fr(At,Ut,ue){return isNaN(At)&&(At=0),isNaN(Ut)&&(Ut=0),new _r(ue,Math.cos(At*=le)*Ut,Math.sin(At)*Ut)}c.lab=_r;function _r(At,Ut,ue){return this instanceof _r?(this.l=+At,this.a=+Ut,void(this.b=+ue)):arguments.length<2?At instanceof _r?new _r(At.l,At.a,At.b):At instanceof We?fr(At.h,At.c,At.l):Br((At=za(At)).r,At.g,At.b):new _r(At,Ut,ue)}var tn=18,Cn=.95047,Tn=1,Mn=1.08883,fi=_r.prototype=new oi;fi.brighter=function(At){return new _r(Math.min(100,this.l+tn*(arguments.length?At:1)),this.a,this.b)},fi.darker=function(At){return new _r(Math.max(0,this.l-tn*(arguments.length?At:1)),this.a,this.b)},fi.rgb=function(){return ki(this.l,this.a,this.b)};function ki(At,Ut,ue){var Me=(At+16)/116,Pe=Me+Ut/500,Ne=Me-ue/200;return Pe=ji(Pe)*Cn,Me=ji(Me)*Tn,Ne=ji(Ne)*Mn,new za(ci(3.2404542*Pe-1.5371385*Me-.4985314*Ne),ci(-.969266*Pe+1.8760108*Me+.041556*Ne),ci(.0556434*Pe-.2040259*Me+1.0572252*Ne))}function Oi(At,Ut,ue){return At>0?new We(Math.atan2(ue,Ut)*we,Math.sqrt(Ut*Ut+ue*ue),At):new We(NaN,NaN,At)}function ji(At){return At>.206893034?At*At*At:(At-4/29)/7.787037}function Xi(At){return At>.008856?Math.pow(At,1/3):7.787037*At+4/29}function ci(At){return Math.round(255*(At<=.00304?12.92*At:1.055*Math.pow(At,1/2.4)-.055))}c.rgb=za;function za(At,Ut,ue){return this instanceof za?(this.r=~~At,this.g=~~Ut,void(this.b=~~ue)):arguments.length<2?At instanceof za?new za(At.r,At.g,At.b):$r(""+At,za,Zi):new za(At,Ut,ue)}function Wa(At){return new za(At>>16,At>>8&255,At&255)}function ze(At){return Wa(At)+""}var Ie=za.prototype=new oi;Ie.brighter=function(At){At=Math.pow(.7,arguments.length?At:1);var Ut=this.r,ue=this.g,Me=this.b,Pe=30;return!Ut&&!ue&&!Me?new za(Pe,Pe,Pe):(Ut&&Ut>4,Me=Me>>4|Me,Pe=Er&240,Pe=Pe>>4|Pe,Ne=Er&15,Ne=Ne<<4|Ne):At.length===7&&(Me=(Er&16711680)>>16,Pe=(Er&65280)>>8,Ne=Er&255)),Ut(Me,Pe,Ne))}function Gr(At,Ut,ue){var Me=Math.min(At/=255,Ut/=255,ue/=255),Pe=Math.max(At,Ut,ue),Ne=Pe-Me,sr,ar,Er=(Pe+Me)/2;return Ne?(ar=Er<.5?Ne/(Pe+Me):Ne/(2-Pe-Me),At==Pe?sr=(Ut-ue)/Ne+(Ut0&&Er<1?0:sr),new $n(sr,ar,Er)}function Br(At,Ut,ue){At=Yr(At),Ut=Yr(Ut),ue=Yr(ue);var Me=Xi((.4124564*At+.3575761*Ut+.1804375*ue)/Cn),Pe=Xi((.2126729*At+.7151522*Ut+.072175*ue)/Tn),Ne=Xi((.0193339*At+.119192*Ut+.9503041*ue)/Mn);return _r(116*Pe-16,500*(Me-Pe),200*(Pe-Ne))}function Yr(At){return(At/=255)<=.04045?At/12.92:Math.pow((At+.055)/1.055,2.4)}function pn(At){var Ut=parseFloat(At);return At.charAt(At.length-1)==="%"?Math.round(Ut*2.55):Ut}var on=c.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});on.forEach(function(At,Ut){on.set(At,Wa(Ut))});function Ce(At){return typeof At=="function"?At:function(){return At}}c.functor=Ce,c.xhr=dr(V);function dr(At){return function(Ut,ue,Me){return arguments.length===2&&typeof ue=="function"&&(Me=ue,ue=null),Hr(Ut,ue,At,Me)}}function Hr(At,Ut,ue,Me){var Pe={},Ne=c.dispatch("beforesend","progress","load","error"),sr={},ar=new XMLHttpRequest,Er=null;self.XDomainRequest&&!("withCredentials"in ar)&&/^(http(s)?:)?\/\//.test(At)&&(ar=new XDomainRequest),"onload"in ar?ar.onload=ar.onerror=rn:ar.onreadystatechange=function(){ar.readyState>3&&rn()};function rn(){var Jr=ar.status,xn;if(!Jr&&Fn(ar)||Jr>=200&&Jr<300||Jr===304){try{xn=ue.call(Pe,ar)}catch(zn){Ne.error.call(Pe,zn);return}Ne.load.call(Pe,xn)}else Ne.error.call(Pe,ar)}return ar.onprogress=function(Jr){var xn=c.event;c.event=Jr;try{Ne.progress.call(Pe,ar)}finally{c.event=xn}},Pe.header=function(Jr,xn){return Jr=(Jr+"").toLowerCase(),arguments.length<2?sr[Jr]:(xn==null?delete sr[Jr]:sr[Jr]=xn+"",Pe)},Pe.mimeType=function(Jr){return arguments.length?(Ut=Jr==null?null:Jr+"",Pe):Ut},Pe.responseType=function(Jr){return arguments.length?(Er=Jr,Pe):Er},Pe.response=function(Jr){return ue=Jr,Pe},["get","post"].forEach(function(Jr){Pe[Jr]=function(){return Pe.send.apply(Pe,[Jr].concat(I(arguments)))}}),Pe.send=function(Jr,xn,zn){if(arguments.length===2&&typeof xn=="function"&&(zn=xn,xn=null),ar.open(Jr,At,!0),Ut!=null&&!("accept"in sr)&&(sr.accept=Ut+",*/*"),ar.setRequestHeader)for(var On in sr)ar.setRequestHeader(On,sr[On]);return Ut!=null&&ar.overrideMimeType&&ar.overrideMimeType(Ut),Er!=null&&(ar.responseType=Er),zn!=null&&Pe.on("error",zn).on("load",function(Hi){zn(null,Hi)}),Ne.beforesend.call(Pe,ar),ar.send(xn??null),Pe},Pe.abort=function(){return ar.abort(),Pe},c.rebind(Pe,Ne,"on"),Me==null?Pe:Pe.get(_n(Me))}function _n(At){return At.length===1?function(Ut,ue){At(Ut==null?ue:null)}:At}function Fn(At){var Ut=At.responseType;return Ut&&Ut!=="text"?At.response:At.responseText}c.dsv=function(At,Ut){var ue=new RegExp('["'+At+` -]`),Me=At.charCodeAt(0);function Pe(rn,Jr,xn){arguments.length<3&&(xn=Jr,Jr=null);var zn=Hr(rn,Ut,Jr==null?Ne:sr(Jr),xn);return zn.row=function(On){return arguments.length?zn.response((Jr=On)==null?Ne:sr(On)):Jr},zn}function Ne(rn){return Pe.parse(rn.responseText)}function sr(rn){return function(Jr){return Pe.parse(Jr.responseText,rn)}}Pe.parse=function(rn,Jr){var xn;return Pe.parseRows(rn,function(zn,On){if(xn)return xn(zn,On-1);var Hi=function(Vn){for(var yi={},Si=zn.length,Ri=0;Ri=Hi)return zn;if(Ri)return Ri=!1,xn;var Ua=Vn;if(rn.charCodeAt(Ua)===34){for(var Ha=Ua;Ha++"u")return null;const E=typeof d;return E==="number"||d instanceof Date?d=Hu(d):E==="string"&&(typeof s=="string"?d=Cpt(d,s,new Date,this.options):d=Opt(d,this.options)),hF(d)?d.getTime():null},format:function(d,s){return Pdt(d,s,this.options)},add:function(d,s,E){switch(E){case"millisecond":return IM(d,s);case"second":return _ft(d,s);case"minute":return yft(d,s);case"hour":return mft(d,s);case"day":return n6(d,s);case"week":return bft(d,s);case"month":return PM(d,s);case"quarter":return xft(d,s);case"year":return wft(d,s);default:return d}},diff:function(d,s,E){switch(E){case"millisecond":return zM(d,s);case"second":return Lft(d,s);case"minute":return Sft(d,s);case"hour":return Mft(d,s);case"day":return fF(d,s);case"week":return Pft(d,s);case"month":return mF(d,s);case"quarter":return Cft(d,s);case"year":return Ift(d,s);default:return 0}},startOf:function(d,s,E){switch(s){case"second":return zpt(d);case"minute":return Ipt(d);case"hour":return Ppt(d);case"day":return BA(d);case"week":return vg(d);case"isoWeek":return vg(d,{weekStartsOn:+E});case"month":return Oft(d);case"quarter":return zft(d);case"year":return gF(d);default:return d}},endOf:function(d,s){switch(s){case"second":return jft(d);case"minute":return Rft(d);case"hour":return Fft(d);case"day":return dF(d);case"week":return Bft(d);case"month":return pF(d);case"quarter":return Nft(d);case"year":return Dft(d);default:return d}}});var o4={exports:{}},Xpt=o4.exports,LI;function Jpt(){return LI||(LI=1,function(d){var s={};(function(E,R){d.exports?d.exports=R():E.moduleName=R()})(typeof self<"u"?self:Xpt,()=>{var E=(()=>{var R=Object.create,Y=Object.defineProperty,dt=Object.defineProperties,_t=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,ce=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,fr=(Q,Z,c)=>Z in Q?Y(Q,Z,{enumerable:!0,configurable:!0,writable:!0,value:c}):Q[Z]=c,Ar=(Q,Z)=>{for(var c in Z||(Z={}))Ie.call(Z,c)&&fr(Q,c,Z[c]);if(te)for(var c of te(Z))Je.call(Z,c)&&fr(Q,c,Z[c]);return Q},kr=(Q,Z)=>dt(Q,zt(Z)),Vr=(Q,Z)=>{var c={};for(var g in Q)Ie.call(Q,g)&&Z.indexOf(g)<0&&(c[g]=Q[g]);if(Q!=null&&te)for(var g of te(Q))Z.indexOf(g)<0&&Je.call(Q,g)&&(c[g]=Q[g]);return c},fn=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z),Dt=(Q,Z)=>()=>(Z||Q((Z={exports:{}}).exports,Z),Z.exports),cn=(Q,Z)=>{for(var c in Z)Y(Q,c,{get:Z[c],enumerable:!0})},ti=(Q,Z,c,g)=>{if(Z&&typeof Z=="object"||typeof Z=="function")for(let I of jt(Z))!Ie.call(Q,I)&&I!==c&&Y(Q,I,{get:()=>Z[I],enumerable:!(g=_t(Z,I))||g.enumerable});return Q},Dn=(Q,Z,c)=>(c=Q!=null?R(ce(Q)):{},ti(Y(c,"default",{value:Q,enumerable:!0}),Q)),ii=Q=>ti(Y({},"__esModule",{value:!0}),Q),Vi=Dt(Q=>{Q.version="3.2.0"}),Nn=Dt((Q,Z)=>{(function(c,g,I){g[c]=g[c]||I(),typeof Z<"u"&&Z.exports&&(Z.exports=g[c])})("Promise",typeof window<"u"?window:Q,function(){var c,g,I,S=Object.prototype.toString,t=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(T,u,b,_){return Object.defineProperty(T,u,{value:b,writable:!0,configurable:_!==!1})}}catch{c=function(u,b,_){return u[b]=_,u}}I=function(){var T,u,b;function _(P,M){this.fn=P,this.self=M,this.next=void 0}return{add:function(P,M){b=new _(P,M),u?u.next=b:T=b,u=b,b=void 0},drain:function(){var P=T;for(T=u=g=void 0;P;)P.fn.call(P.self),P=P.next}}}();function e(T,u){I.add(T,u),g||(g=t(I.drain))}function r(T){var u,b=typeof T;return T!=null&&(b=="object"||b=="function")&&(u=T.then),typeof u=="function"?u:!1}function a(){for(var T=0;T0&&e(a,b))}catch(_){i.call(new f(b),_)}}}function i(T){var u=this;u.triggered||(u.triggered=!0,u.def&&(u=u.def),u.msg=T,u.state=2,u.chain.length>0&&e(a,u))}function l(T,u,b,_){for(var P=0;P{(function(){var c={version:"3.8.2"},g=[].slice,I=function(At){return g.call(At)},S=self.document;function t(At){return At&&(At.ownerDocument||At.document||At).documentElement}function e(At){return At&&(At.ownerDocument&&At.ownerDocument.defaultView||At.document&&At||At.defaultView)}if(S)try{I(S.documentElement.childNodes)[0].nodeType}catch{I=function(Ut){for(var ue=Ut.length,Se=new Array(ue);ue--;)Se[ue]=Ut[ue];return Se}}if(Date.now||(Date.now=function(){return+new Date}),S)try{S.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(Ut,ue){a.call(this,Ut,ue+"")},r.setAttributeNS=function(Ut,ue,Se){n.call(this,Ut,ue,Se+"")},o.setProperty=function(Ut,ue,Se){i.call(this,Ut,ue+"",Se)}}c.ascending=l;function l(At,Ut){return AtUt?1:At>=Ut?0:NaN}c.descending=function(At,Ut){return UtAt?1:Ut>=At?0:NaN},c.min=function(At,Ut){var ue=-1,Se=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}return Pe},c.max=function(At,Ut){var ue=-1,Se=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}return Pe},c.extent=function(At,Ut){var ue=-1,Se=At.length,Pe,Ne,sr;if(arguments.length===1){for(;++ue=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr1)return sr/(Er-1)},c.deviation=function(){var At=c.variance.apply(this,arguments);return At&&Math.sqrt(At)};function y(At){return{left:function(Ut,ue,Se,Pe){for(arguments.length<3&&(Se=0),arguments.length<4&&(Pe=Ut.length);Se>>1;At(Ut[Ne],ue)<0?Se=Ne+1:Pe=Ne}return Se},right:function(Ut,ue,Se,Pe){for(arguments.length<3&&(Se=0),arguments.length<4&&(Pe=Ut.length);Se>>1;At(Ut[Ne],ue)>0?Pe=Ne:Se=Ne+1}return Se}}}var v=y(l);c.bisectLeft=v.left,c.bisect=c.bisectRight=v.right,c.bisector=function(At){return y(At.length===1?function(Ut,ue){return l(At(Ut),ue)}:At)},c.shuffle=function(At,Ut,ue){(Se=arguments.length)<3&&(ue=At.length,Se<2&&(Ut=0));for(var Se=ue-Ut,Pe,Ne;Se;)Ne=Math.random()*Se--|0,Pe=At[Se+Ut],At[Se+Ut]=At[Ne+Ut],At[Ne+Ut]=Pe;return At},c.permute=function(At,Ut){for(var ue=Ut.length,Se=new Array(ue);ue--;)Se[ue]=At[Ut[ue]];return Se},c.pairs=function(At){for(var Ut=0,ue=At.length-1,Se,Pe=At[0],Ne=new Array(ue<0?0:ue);Ut=0;)for(sr=At[Ut],ue=sr.length;--ue>=0;)Ne[--Pe]=sr[ue];return Ne};var u=Math.abs;c.range=function(At,Ut,ue){if(arguments.length<3&&(ue=1,arguments.length<2&&(Ut=At,At=0)),(Ut-At)/ue===1/0)throw new Error("infinite range");var Se=[],Pe=b(u(ue)),Ne=-1,sr;if(At*=Pe,Ut*=Pe,ue*=Pe,ue<0)for(;(sr=At+ue*++Ne)>Ut;)Se.push(sr/Pe);else for(;(sr=At+ue*++Ne)=Ut.length)return Pe?Pe.call(At,Er):Se?Er.sort(Se):Er;for(var Jr=-1,xn=Er.length,zn=Ut[rn++],On,$i,Vn,bi=new P,Pi;++Jr=Ut.length)return ar;var rn=[],Jr=ue[Er++];return ar.forEach(function(xn,zn){rn.push({key:xn,values:sr(zn,Er)})}),Jr?rn.sort(function(xn,zn){return Jr(xn.key,zn.key)}):rn}return At.map=function(ar,Er){return Ne(Er,ar,0)},At.entries=function(ar){return sr(Ne(c.map,ar,0),0)},At.key=function(ar){return Ut.push(ar),At},At.sortKeys=function(ar){return ue[Ut.length-1]=ar,At},At.sortValues=function(ar){return Se=ar,At},At.rollup=function(ar){return Pe=ar,At},At},c.set=function(At){var Ut=new j;if(At)for(var ue=0,Se=At.length;ue=0&&(Se=At.slice(ue+1),At=At.slice(0,ue)),At)return arguments.length<2?this[At].on(Se):this[At].on(Se,Ut);if(arguments.length===2){if(Ut==null)for(At in this)this.hasOwnProperty(At)&&this[At].on(Se,null);return this}};function J(At){var Ut=[],ue=new P;function Se(){for(var Pe=Ut,Ne=-1,sr=Pe.length,ar;++Ne=0&&(ue=At.slice(0,Ut))!=="xmlns"&&(At=At.slice(Ut+1)),kt.hasOwnProperty(ue)?{space:kt[ue],local:At}:At}},it.attr=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node();return At=c.ns.qualify(At),At.local?ue.getAttributeNS(At.space,At.local):ue.getAttribute(At)}for(Ut in At)this.each(It(Ut,At[Ut]));return this}return this.each(It(At,Ut))};function It(At,Ut){At=c.ns.qualify(At);function ue(){this.removeAttribute(At)}function Se(){this.removeAttributeNS(At.space,At.local)}function Pe(){this.setAttribute(At,Ut)}function Ne(){this.setAttributeNS(At.space,At.local,Ut)}function sr(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttribute(At):this.setAttribute(At,Er)}function ar(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttributeNS(At.space,At.local):this.setAttributeNS(At.space,At.local,Er)}return Ut==null?At.local?Se:ue:typeof Ut=="function"?At.local?ar:sr:At.local?Ne:Pe}function Pt(At){return At.trim().replace(/\s+/g," ")}it.classed=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node(),Se=(At=Wt(At)).length,Pe=-1;if(Ut=ue.classList){for(;++Pe=0;)(Ne=ue[Se])&&(Pe&&Pe!==Ne.nextSibling&&Pe.parentNode.insertBefore(Ne,Pe),Pe=Ne);return this},it.sort=function(At){At=ee.apply(this,arguments);for(var Ut=-1,ue=this.length;++Ut=Ut&&(Ut=Pe+1);!(Er=sr[Ut])&&++Ut0&&(At=At.slice(0,Pe));var sr=cr.get(At);sr&&(At=sr,Ne=jr);function ar(){var Jr=this[Se];Jr&&(this.removeEventListener(At,Jr,Jr.$),delete this[Se])}function Er(){var Jr=Ne(Ut,I(arguments));ar.call(this),this.addEventListener(At,this[Se]=Jr,Jr.$=ue),Jr._=Ut}function rn(){var Jr=new RegExp("^__on([^.]+)"+c.requote(At)+"$"),xn;for(var zn in this)if(xn=zn.match(Jr)){var On=this[zn];this.removeEventListener(xn[1],On,On.$),delete this[zn]}}return Pe?Ut?Er:ar:Ut?W:rn}var cr=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&cr.forEach(function(At){"on"+At in S&&cr.remove(At)});function ur(At,Ut){return function(ue){var Se=c.event;c.event=ue,Ut[0]=this.__data__;try{At.apply(this,Ut)}finally{c.event=Se}}}function jr(At,Ut){var ue=ur(At,Ut);return function(Se){var Pe=this,Ne=Se.relatedTarget;(!Ne||Ne!==Pe&&!(Ne.compareDocumentPosition(Pe)&8))&&ue.call(Pe,Se)}}var qr,br=0;function Xr(At){var Ut=".dragsuppress-"+ ++br,ue="click"+Ut,Se=c.select(e(At)).on("touchmove"+Ut,lt).on("dragstart"+Ut,lt).on("selectstart"+Ut,lt);if(qr==null&&(qr="onselectstart"in At?!1:F(At.style,"userSelect")),qr){var Pe=t(At).style,Ne=Pe[qr];Pe[qr]="none"}return function(sr){if(Se.on(Ut,null),qr&&(Pe[qr]=Ne),sr){var ar=function(){Se.on(ue,null)};Se.on(ue,function(){lt(),ar()},!0),setTimeout(ar,0)}}}c.mouse=function(At){return Le(At,yt())};var nn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Le(At,Ut){Ut.changedTouches&&(Ut=Ut.changedTouches[0]);var ue=At.ownerSVGElement||At;if(ue.createSVGPoint){var Se=ue.createSVGPoint();if(nn<0){var Pe=e(At);if(Pe.scrollX||Pe.scrollY){ue=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=ue[0][0].getScreenCTM();nn=!(Ne.f||Ne.e),ue.remove()}}return nn?(Se.x=Ut.pageX,Se.y=Ut.pageY):(Se.x=Ut.clientX,Se.y=Ut.clientY),Se=Se.matrixTransform(At.getScreenCTM().inverse()),[Se.x,Se.y]}var sr=At.getBoundingClientRect();return[Ut.clientX-sr.left-At.clientLeft,Ut.clientY-sr.top-At.clientTop]}c.touch=function(At,Ut,ue){if(arguments.length<3&&(ue=Ut,Ut=yt().changedTouches),Ut){for(var Se=0,Pe=Ut.length,Ne;Se1?re:At<-1?-re:Math.asin(At)}function or(At){return((At=Math.exp(At))-1/At)/2}function Sr(At){return((At=Math.exp(At))+1/At)/2}function Mr(At){return((At=Math.exp(2*At))-1)/(At+1)}var mr=Math.SQRT2,Qr=2,Wn=4;c.interpolateZoom=function(At,Ut){var ue=At[0],Se=At[1],Pe=At[2],Ne=Ut[0],sr=Ut[1],ar=Ut[2],Er=Ne-ue,rn=sr-Se,Jr=Er*Er+rn*rn,xn,zn;if(Jr0&&(_o=_o.transition().duration(sr)),_o.call(Ki.event)}function Ro(){bi&&bi.domain(Vn.range().map(function(_o){return(_o-At.x)/At.k}).map(Vn.invert)),ji&&ji.domain(Pi.range().map(function(_o){return(_o-At.y)/At.k}).map(Pi.invert))}function $o(_o){ar++||_o({type:"zoomstart"})}function ol(_o){Ro(),_o({type:"zoom",scale:At.k,translate:[At.x,At.y]})}function Yo(_o){--ar||(_o({type:"zoomend"}),ue=null)}function vs(){var _o=this,Gs=$i.of(_o,arguments),nl=0,uu=c.select(e(_o)).on(rn,Ul).on(Jr,ru),Xl=Jn(c.mouse(_o)),rh=Xr(_o);Wi.call(_o),$o(Gs);function Ul(){nl=1,oo(c.mouse(_o),Xl),ol(Gs)}function ru(){uu.on(rn,null).on(Jr,null),rh(nl),Yo(Gs)}}function Tl(){var _o=this,Gs=$i.of(_o,arguments),nl={},uu=0,Xl,rh=".zoom-"+c.event.changedTouches[0].identifier,Ul="touchmove"+rh,ru="touchend"+rh,kh=[],be=c.select(_o),Tr=Xr(_o);Fn(),$o(Gs),be.on(Er,null).on(zn,Fn);function Ir(){var yn=c.touches(_o);return Xl=At.k,yn.forEach(function(li){li.identifier in nl&&(nl[li.identifier]=Jn(li))}),yn}function Fn(){var yn=c.event.target;c.select(yn).on(Ul,hi).on(ru,ni),kh.push(yn);for(var li=c.event.changedTouches,ta=0,Gi=li.length;ta1){var Na=_a[0],ia=_a[1],Ei=Na[0]-ia[0],dn=Na[1]-ia[1];uu=Ei*Ei+dn*dn}}function hi(){var yn=c.touches(_o),li,ta,Gi,_a;Wi.call(_o);for(var Za=0,Na=yn.length;Za1?1:Ut,ue=ue<0?0:ue>1?1:ue,Pe=ue<=.5?ue*(1+Ut):ue+Ut-ue*Ut,Se=2*ue-Pe;function Ne(ar){return ar>360?ar-=360:ar<0&&(ar+=360),ar<60?Se+(Pe-Se)*ar/60:ar<180?Pe:ar<240?Se+(Pe-Se)*(240-ar)/60:Se}function sr(ar){return Math.round(Ne(ar)*255)}return new za(sr(At+120),sr(At),sr(At-120))}c.hcl=We;function We(At,Ut,ue){return this instanceof We?(this.h=+At,this.c=+Ut,void(this.l=+ue)):arguments.length<2?At instanceof We?new We(At.h,At.c,At.l):At instanceof _r?Ni(At.l,At.a,At.b):Ni((At=Rr((At=c.rgb(At)).r,At.g,At.b)).l,At.a,At.b):new We(At,Ut,ue)}var nr=We.prototype=new ui;nr.brighter=function(At){return new We(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?At:1)))},nr.darker=function(At){return new We(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?At:1)))},nr.rgb=function(){return dr(this.h,this.c,this.l).rgb()};function dr(At,Ut,ue){return isNaN(At)&&(At=0),isNaN(Ut)&&(Ut=0),new _r(ue,Math.cos(At*=le)*Ut,Math.sin(At)*Ut)}c.lab=_r;function _r(At,Ut,ue){return this instanceof _r?(this.l=+At,this.a=+Ut,void(this.b=+ue)):arguments.length<2?At instanceof _r?new _r(At.l,At.a,At.b):At instanceof We?dr(At.h,At.c,At.l):Rr((At=za(At)).r,At.g,At.b):new _r(At,Ut,ue)}var tn=18,Cn=.95047,Tn=1,Mn=1.08883,mi=_r.prototype=new ui;mi.brighter=function(At){return new _r(Math.min(100,this.l+tn*(arguments.length?At:1)),this.a,this.b)},mi.darker=function(At){return new _r(Math.max(0,this.l-tn*(arguments.length?At:1)),this.a,this.b)},mi.rgb=function(){return Mi(this.l,this.a,this.b)};function Mi(At,Ut,ue){var Se=(At+16)/116,Pe=Se+Ut/500,Ne=Se-ue/200;return Pe=Hi(Pe)*Cn,Se=Hi(Se)*Tn,Ne=Hi(Ne)*Mn,new za(di(3.2404542*Pe-1.5371385*Se-.4985314*Ne),di(-.969266*Pe+1.8760108*Se+.041556*Ne),di(.0556434*Pe-.2040259*Se+1.0572252*Ne))}function Ni(At,Ut,ue){return At>0?new We(Math.atan2(ue,Ut)*ke,Math.sqrt(Ut*Ut+ue*ue),At):new We(NaN,NaN,At)}function Hi(At){return At>.206893034?At*At*At:(At-4/29)/7.787037}function Ji(At){return At>.008856?Math.pow(At,1/3):7.787037*At+4/29}function di(At){return Math.round(255*(At<=.00304?12.92*At:1.055*Math.pow(At,1/2.4)-.055))}c.rgb=za;function za(At,Ut,ue){return this instanceof za?(this.r=~~At,this.g=~~Ut,void(this.b=~~ue)):arguments.length<2?At instanceof za?new za(At.r,At.g,At.b):$r(""+At,za,Yi):new za(At,Ut,ue)}function qa(At){return new za(At>>16,At>>8&255,At&255)}function Oe(At){return qa(At)+""}var ze=za.prototype=new ui;ze.brighter=function(At){At=Math.pow(.7,arguments.length?At:1);var Ut=this.r,ue=this.g,Se=this.b,Pe=30;return!Ut&&!ue&&!Se?new za(Pe,Pe,Pe):(Ut&&Ut>4,Se=Se>>4|Se,Pe=Er&240,Pe=Pe>>4|Pe,Ne=Er&15,Ne=Ne<<4|Ne):At.length===7&&(Se=(Er&16711680)>>16,Pe=(Er&65280)>>8,Ne=Er&255)),Ut(Se,Pe,Ne))}function Gr(At,Ut,ue){var Se=Math.min(At/=255,Ut/=255,ue/=255),Pe=Math.max(At,Ut,ue),Ne=Pe-Se,sr,ar,Er=(Pe+Se)/2;return Ne?(ar=Er<.5?Ne/(Pe+Se):Ne/(2-Pe-Se),At==Pe?sr=(Ut-ue)/Ne+(Ut0&&Er<1?0:sr),new Gn(sr,ar,Er)}function Rr(At,Ut,ue){At=Yr(At),Ut=Yr(Ut),ue=Yr(ue);var Se=Ji((.4124564*At+.3575761*Ut+.1804375*ue)/Cn),Pe=Ji((.2126729*At+.7151522*Ut+.072175*ue)/Tn),Ne=Ji((.0193339*At+.119192*Ut+.9503041*ue)/Mn);return _r(116*Pe-16,500*(Se-Pe),200*(Pe-Ne))}function Yr(At){return(At/=255)<=.04045?At/12.92:Math.pow((At+.055)/1.055,2.4)}function mn(At){var Ut=parseFloat(At);return At.charAt(At.length-1)==="%"?Math.round(Ut*2.55):Ut}var on=c.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});on.forEach(function(At,Ut){on.set(At,qa(Ut))});function Ce(At){return typeof At=="function"?At:function(){return At}}c.functor=Ce,c.xhr=pr(V);function pr(At){return function(Ut,ue,Se){return arguments.length===2&&typeof ue=="function"&&(Se=ue,ue=null),Hr(Ut,ue,At,Se)}}function Hr(At,Ut,ue,Se){var Pe={},Ne=c.dispatch("beforesend","progress","load","error"),sr={},ar=new XMLHttpRequest,Er=null;self.XDomainRequest&&!("withCredentials"in ar)&&/^(http(s)?:)?\/\//.test(At)&&(ar=new XDomainRequest),"onload"in ar?ar.onload=ar.onerror=rn:ar.onreadystatechange=function(){ar.readyState>3&&rn()};function rn(){var Jr=ar.status,xn;if(!Jr&&Bn(ar)||Jr>=200&&Jr<300||Jr===304){try{xn=ue.call(Pe,ar)}catch(zn){Ne.error.call(Pe,zn);return}Ne.load.call(Pe,xn)}else Ne.error.call(Pe,ar)}return ar.onprogress=function(Jr){var xn=c.event;c.event=Jr;try{Ne.progress.call(Pe,ar)}finally{c.event=xn}},Pe.header=function(Jr,xn){return Jr=(Jr+"").toLowerCase(),arguments.length<2?sr[Jr]:(xn==null?delete sr[Jr]:sr[Jr]=xn+"",Pe)},Pe.mimeType=function(Jr){return arguments.length?(Ut=Jr==null?null:Jr+"",Pe):Ut},Pe.responseType=function(Jr){return arguments.length?(Er=Jr,Pe):Er},Pe.response=function(Jr){return ue=Jr,Pe},["get","post"].forEach(function(Jr){Pe[Jr]=function(){return Pe.send.apply(Pe,[Jr].concat(I(arguments)))}}),Pe.send=function(Jr,xn,zn){if(arguments.length===2&&typeof xn=="function"&&(zn=xn,xn=null),ar.open(Jr,At,!0),Ut!=null&&!("accept"in sr)&&(sr.accept=Ut+",*/*"),ar.setRequestHeader)for(var On in sr)ar.setRequestHeader(On,sr[On]);return Ut!=null&&ar.overrideMimeType&&ar.overrideMimeType(Ut),Er!=null&&(ar.responseType=Er),zn!=null&&Pe.on("error",zn).on("load",function($i){zn(null,$i)}),Ne.beforesend.call(Pe,ar),ar.send(xn??null),Pe},Pe.abort=function(){return ar.abort(),Pe},c.rebind(Pe,Ne,"on"),Se==null?Pe:Pe.get(_n(Se))}function _n(At){return At.length===1?function(Ut,ue){At(Ut==null?ue:null)}:At}function Bn(At){var Ut=At.responseType;return Ut&&Ut!=="text"?At.response:At.responseText}c.dsv=function(At,Ut){var ue=new RegExp('["'+At+` +]`),Se=At.charCodeAt(0);function Pe(rn,Jr,xn){arguments.length<3&&(xn=Jr,Jr=null);var zn=Hr(rn,Ut,Jr==null?Ne:sr(Jr),xn);return zn.row=function(On){return arguments.length?zn.response((Jr=On)==null?Ne:sr(On)):Jr},zn}function Ne(rn){return Pe.parse(rn.responseText)}function sr(rn){return function(Jr){return Pe.parse(Jr.responseText,rn)}}Pe.parse=function(rn,Jr){var xn;return Pe.parseRows(rn,function(zn,On){if(xn)return xn(zn,On-1);var $i=function(Vn){for(var bi={},Pi=zn.length,ji=0;ji=$i)return zn;if(ji)return ji=!1,xn;var Ua=Vn;if(rn.charCodeAt(Ua)===34){for(var Wa=Ua;Wa++<$i;)if(rn.charCodeAt(Wa)===34){if(rn.charCodeAt(Wa+1)!==34)break;++Wa}Vn=Wa+2;var oo=rn.charCodeAt(Wa+1);return oo===13?(ji=!0,rn.charCodeAt(Wa+2)===10&&++Vn):oo===10&&(ji=!0),rn.slice(Ua+1,Wa).replace(/""/g,'"')}for(;Vn<$i;){var oo=rn.charCodeAt(Vn++),Io=1;if(oo===10)ji=!0;else if(oo===13)ji=!0,rn.charCodeAt(Vn)===10&&(++Vn,++Io);else if(oo!==Se)continue;return rn.slice(Ua,Vn-Io)}return rn.slice(Ua)}for(;(Pi=Ki())!==zn;){for(var Jn=[];Pi!==xn&&Pi!==zn;)Jn.push(Pi),Pi=Ki();Jr&&(Jn=Jr(Jn,bi++))==null||On.push(Jn)}return On},Pe.format=function(rn){if(Array.isArray(rn[0]))return Pe.formatRows(rn);var Jr=new j,xn=[];return rn.forEach(function(zn){for(var On in zn)Jr.has(On)||xn.push(Jr.add(On))}),[xn.map(Er).join(At)].concat(rn.map(function(zn){return xn.map(function(On){return Er(zn[On])}).join(At)})).join(` `)},Pe.formatRows=function(rn){return rn.map(ar).join(` -`)};function ar(rn){return rn.map(Er).join(At)}function Er(rn){return ue.test(rn)?'"'+rn.replace(/\"/g,'""')+'"':rn}return Pe},c.csv=c.dsv(",","text/csv"),c.tsv=c.dsv(" ","text/tab-separated-values");var Qn,Pn,En,Zn,La=this[F(this,"requestAnimationFrame")]||function(At){setTimeout(At,17)};c.timer=function(){Vi.apply(this,arguments)};function Vi(At,Ut,ue){var Me=arguments.length;Me<2&&(Ut=0),Me<3&&(ue=Date.now());var Pe=ue+Ut,Ne={c:At,t:Pe,n:null};return Pn?Pn.n=Ne:Qn=Ne,Pn=Ne,En||(Zn=clearTimeout(Zn),En=1,La(Qa)),Ne}function Qa(){var At=Ja(),Ut=Do()-At;Ut>24?(isFinite(Ut)&&(clearTimeout(Zn),Zn=setTimeout(Qa,Ut)),En=0):(En=1,La(Qa))}c.timer.flush=function(){Ja(),Do()};function Ja(){for(var At=Date.now(),Ut=Qn;Ut;)At>=Ut.t&&Ut.c(At-Ut.t)&&(Ut.c=null),Ut=Ut.n;return At}function Do(){for(var At,Ut=Qn,ue=1/0;Ut;)Ut.c?(Ut.t=0;--ar)Vn.push(Pe[rn[xn[ar]][2]]);for(ar=+On;ar1&&Ue(At[ue[Me-2]],At[ue[Me-1]],At[Pe])<=0;)--Me;ue[Me++]=Pe}return ue.slice(0,Me)}function ys(At,Ut){return At[0]-Ut[0]||At[1]-Ut[1]}c.geom.polygon=function(At){return tt(At,os),At};var os=c.geom.polygon.prototype=[];os.area=function(){for(var At=-1,Ut=this.length,ue,Me=this[Ut-1],Pe=0;++Atne)ar=ar.L;else if(sr=Ut-fo(ar,ue),sr>ne){if(!ar.R){Me=ar;break}ar=ar.R}else{Ne>-ne?(Me=ar.P,Pe=ar):sr>-ne?(Me=ar,Pe=ar.N):Me=Pe=ar;break}var Er=kl(At);if(Qs.insert(Me,Er),!(!Me&&!Pe)){if(Me===Pe){Cl(Me),Pe=kl(Me.site),Qs.insert(Er,Pe),Er.edge=Pe.edge=ou(Me.site,Er.site),al(Me),al(Pe);return}if(!Pe){Er.edge=ou(Me.site,Er.site);return}Cl(Me),Cl(Pe);var rn=Me.site,Jr=rn.x,xn=rn.y,zn=At.x-Jr,On=At.y-xn,Hi=Pe.site,Vn=Hi.x-Jr,yi=Hi.y-xn,Si=2*(zn*yi-On*Vn),Ri=zn*zn+On*On,Gi=Vn*Vn+yi*yi,Kn={x:(yi*Ri-On*Gi)/Si+Jr,y:(zn*Gi-Vn*Ri)/Si+xn};ts(Pe.edge,rn,Hi,Kn),Er.edge=ou(rn,At,null,Kn),Pe.edge=ou(At,Hi,null,Kn),al(Me),al(Pe)}}function Pa(At,Ut){var ue=At.site,Me=ue.x,Pe=ue.y,Ne=Pe-Ut;if(!Ne)return Me;var sr=At.P;if(!sr)return-1/0;ue=sr.site;var ar=ue.x,Er=ue.y,rn=Er-Ut;if(!rn)return ar;var Jr=ar-Me,xn=1/Ne-1/rn,zn=Jr/rn;return xn?(-zn+Math.sqrt(zn*zn-2*xn*(Jr*Jr/(-2*rn)-Er+rn/2+Pe-Ne/2)))/xn+Me:(Me+ar)/2}function fo(At,Ut){var ue=At.N;if(ue)return Pa(ue,Ut);var Me=At.site;return Me.y===Ut?Me.x:1/0}function qs(At){this.site=At,this.edges=[]}qs.prototype.prepare=function(){for(var At=this.edges,Ut=At.length,ue;Ut--;)ue=At[Ut].edge,(!ue.b||!ue.a)&&At.splice(Ut,1);return At.sort(Xo),At.length};function Ql(At){for(var Ut=At[0][0],ue=At[1][0],Me=At[0][1],Pe=At[1][1],Ne,sr,ar,Er,rn=cl,Jr=rn.length,xn,zn,On,Hi,Vn,yi;Jr--;)if(xn=rn[Jr],!(!xn||!xn.prepare()))for(On=xn.edges,Hi=On.length,zn=0;znne||u(Er-sr)>ne)&&(On.splice(zn,0,new Su(hl(xn.site,yi,u(ar-Ut)ne?{x:Ut,y:u(Ne-Ut)ne?{x:u(sr-Pe)ne?{x:ue,y:u(Ne-ue)ne?{x:u(sr-Me)=-Ct)){var On=Er*Er+rn*rn,Hi=Jr*Jr+xn*xn,Vn=(xn*On-rn*Hi)/zn,yi=(Er*Hi-Jr*On)/zn,xn=yi+ar,Si=Lo.pop()||new Gl;Si.arc=At,Si.site=Pe,Si.x=Vn+sr,Si.y=xn+Math.sqrt(Vn*Vn+yi*yi),Si.cy=xn,At.circle=Si;for(var Ri=null,Gi=Ps._;Gi;)if(Si.y0)){if(Vn/=On,On<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=ue-ar,!(!On&&Vn<0)){if(Vn/=On,On<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if(On>0){if(Vn0)){if(Vn/=Hi,Hi<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=Me-Er,!(!Hi&&Vn<0)){if(Vn/=Hi,Hi<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if(Hi>0){if(Vn0&&(Pe.a={x:ar+xn*On,y:Er+xn*Hi}),zn<1&&(Pe.b={x:ar+zn*On,y:Er+zn*Hi}),Pe}}}}}}function lo(At){for(var Ut=ss,ue=Ru(At[0][0],At[0][1],At[1][0],At[1][1]),Me=Ut.length,Pe;Me--;)Pe=Ut[Me],(!Ms(Pe,At)||!ue(Pe)||u(Pe.a.x-Pe.b.x)=Ne)return;if(Jr>zn){if(!Me)Me={x:Hi,y:sr};else if(Me.y>=ar)return;ue={x:Hi,y:ar}}else{if(!Me)Me={x:Hi,y:ar};else if(Me.y1)if(Jr>zn){if(!Me)Me={x:(sr-Si)/yi,y:sr};else if(Me.y>=ar)return;ue={x:(ar-Si)/yi,y:ar}}else{if(!Me)Me={x:(ar-Si)/yi,y:ar};else if(Me.y=Ne)return;ue={x:Ne,y:yi*Ne+Si}}else{if(!Me)Me={x:Ne,y:yi*Ne+Si};else if(Me.x=Jr&&Si.x<=zn&&Si.y>=xn&&Si.y<=On?[[Jr,On],[zn,On],[zn,xn],[Jr,xn]]:[];Ri.point=Er[Vn]}),rn}function ar(Er){return Er.map(function(rn,Jr){return{x:Math.round(Me(rn,Jr)/ne)*ne,y:Math.round(Pe(rn,Jr)/ne)*ne,i:Jr}})}return sr.links=function(Er){return ac(ar(Er)).edges.filter(function(rn){return rn.l&&rn.r}).map(function(rn){return{source:Er[rn.l.i],target:Er[rn.r.i]}})},sr.triangles=function(Er){var rn=[];return ac(ar(Er)).cells.forEach(function(Jr,xn){for(var zn=Jr.site,On=Jr.edges.sort(Xo),Hi=-1,Vn=On.length,yi,Si,Ri=On[Vn-1].edge,Gi=Ri.l===zn?Ri.r:Ri.l;++HiGi&&(Gi=Jr.x),Jr.y>Kn&&(Kn=Jr.y),On.push(Jr.x),Hi.push(Jr.y);else for(Vn=0;VnGi&&(Gi=Ua),Ha>Kn&&(Kn=Ha),On.push(Ua),Hi.push(Ha)}var ao=Gi-Si,Po=Kn-Ri;ao>Po?Kn=Ri+ao:Gi=Si+Po;function Ro(Go,vs,Tl,Ku,du,_o,Gs,nl){if(!(isNaN(Tl)||isNaN(Ku)))if(Go.leaf){var uu=Go.x,Xl=Go.y;if(uu!=null)if(u(uu-Tl)+u(Xl-Ku)<.01)Wo(Go,vs,Tl,Ku,du,_o,Gs,nl);else{var rh=Go.point;Go.x=Go.y=Go.point=null,Wo(Go,rh,uu,Xl,du,_o,Gs,nl),Wo(Go,vs,Tl,Ku,du,_o,Gs,nl)}else Go.x=Tl,Go.y=Ku,Go.point=vs}else Wo(Go,vs,Tl,Ku,du,_o,Gs,nl)}function Wo(Go,vs,Tl,Ku,du,_o,Gs,nl){var uu=(du+Gs)*.5,Xl=(_o+nl)*.5,rh=Tl>=uu,jl=Ku>=Xl,ru=jl<<1|rh;Go.leaf=!1,Go=Go.nodes[ru]||(Go.nodes[ru]=Fl()),rh?du=uu:Gs=uu,jl?_o=Xl:nl=Xl,Ro(Go,vs,Tl,Ku,du,_o,Gs,nl)}var ol=Fl();if(ol.add=function(Go){Ro(ol,Go,+xn(Go,++Vn),+zn(Go,Vn),Si,Ri,Gi,Kn)},ol.visit=function(Go){Bc(Go,ol,Si,Ri,Gi,Kn)},ol.find=function(Go){return Nf(ol,Go[0],Go[1],Si,Ri,Gi,Kn)},Vn=-1,Ut==null){for(;++VnNe||zn>sr||On=Ua,Po=ue>=Ha,Ro=Po<<1|ao,Wo=Ro+4;Roue&&(Ne=Ut.slice(ue,Ne),ar[sr]?ar[sr]+=Ne:ar[++sr]=Ne),(Me=Me[0])===(Pe=Pe[0])?ar[sr]?ar[sr]+=Pe:ar[++sr]=Pe:(ar[++sr]=null,Er.push({i:sr,x:fc(Me,Pe)})),ue=sc.lastIndex;return ue=0&&!(Me=c.interpolators[ue](At,Ut)););return Me}c.interpolators=[function(At,Ut){var ue=typeof Ut;return(ue==="string"?on.has(Ut.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ut)?hc:oh:Ut instanceof oi?hc:Array.isArray(Ut)?Yl:ue==="object"&&isNaN(Ut)?oc:fc)(At,Ut)}],c.interpolateArray=Yl;function Yl(At,Ut){var ue=[],Me=[],Pe=At.length,Ne=Ut.length,sr=Math.min(At.length,Ut.length),ar;for(ar=0;ar=0?At.slice(0,Ut):At,Me=Ut>=0?At.slice(Ut+1):"in";return ue=Cc.get(ue)||Sh,Me=Uh.get(Me)||V,_u(Me(ue.apply(null,g.call(arguments,1))))};function _u(At){return function(Ut){return Ut<=0?0:Ut>=1?1:At(Ut)}}function Ed(At){return function(Ut){return 1-At(1-Ut)}}function tl(At){return function(Ut){return .5*(Ut<.5?At(2*Ut):2-At(2-2*Ut))}}function Vd(At){return At*At}function Ll(At){return At*At*At}function Qo(At){if(At<=0)return 0;if(At>=1)return 1;var Ut=At*At,ue=Ut*At;return 4*(At<.5?ue:3*(At-Ut)+ue-.75)}function lf(At){return function(Ut){return Math.pow(Ut,At)}}function sh(At){return 1-Math.cos(At*re)}function rc(At){return Math.pow(2,10*(At-1))}function jf(At){return 1-Math.sqrt(1-At*At)}function Vh(At,Ut){var ue;return arguments.length<2&&(Ut=.45),arguments.length?ue=Ut/St*Math.asin(1/At):(At=1,ue=Ut/4),function(Me){return 1+At*Math.pow(2,-10*Me)*Math.sin((Me-ue)*St/Ut)}}function yf(At){return At||(At=1.70158),function(Ut){return Ut*Ut*((At+1)*Ut-At)}}function lc(At){return At<1/2.75?7.5625*At*At:At<2/2.75?7.5625*(At-=1.5/2.75)*At+.75:At<2.5/2.75?7.5625*(At-=2.25/2.75)*At+.9375:7.5625*(At-=2.625/2.75)*At+.984375}c.interpolateHcl=hd;function hd(At,Ut){At=c.hcl(At),Ut=c.hcl(Ut);var ue=At.h,Me=At.c,Pe=At.l,Ne=Ut.h-ue,sr=Ut.c-Me,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?Ut.c:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return fr(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateHsl=Zf;function Zf(At,Ut){At=c.hsl(At),Ut=c.hsl(Ut);var ue=At.h,Me=At.s,Pe=At.l,Ne=Ut.h-ue,sr=Ut.s-Me,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?Ut.s:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return Zi(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateLab=xf;function xf(At,Ut){At=c.lab(At),Ut=c.lab(Ut);var ue=At.l,Me=At.a,Pe=At.b,Ne=Ut.l-ue,sr=Ut.a-Me,ar=Ut.b-Pe;return function(Er){return ki(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateRound=Hh;function Hh(At,Ut){return Ut-=At,function(ue){return Math.round(At+Ut*ue)}}c.transform=function(At){var Ut=S.createElementNS(c.ns.prefix.svg,"g");return(c.transform=function(ue){if(ue!=null){Ut.setAttribute("transform",ue);var Me=Ut.transform.baseVal.consolidate()}return new Uf(Me?Me.matrix:Eh)})(At)};function Uf(At){var Ut=[At.a,At.b],ue=[At.c,At.d],Me=lh(Ut),Pe=Vf(Ut,ue),Ne=lh(Gf(ue,Ut,-Pe))||0;Ut[0]*ue[1]180?Ut+=360:Ut-At>180&&(At+=360),Me.push({i:ue.push(gh(ue)+"rotate(",null,")")-2,x:fc(At,Ut)})):Ut&&ue.push(gh(ue)+"rotate("+Ut+")")}function Hf(At,Ut,ue,Me){At!==Ut?Me.push({i:ue.push(gh(ue)+"skewX(",null,")")-2,x:fc(At,Ut)}):Ut&&ue.push(gh(ue)+"skewX("+Ut+")")}function eu(At,Ut,ue,Me){if(At[0]!==Ut[0]||At[1]!==Ut[1]){var Pe=ue.push(gh(ue)+"scale(",null,",",null,")");Me.push({i:Pe-4,x:fc(At[0],Ut[0])},{i:Pe-2,x:fc(At[1],Ut[1])})}else(Ut[0]!==1||Ut[1]!==1)&&ue.push(gh(ue)+"scale("+Ut+")")}function Ef(At,Ut){var ue=[],Me=[];return At=c.transform(At),Ut=c.transform(Ut),uc(At.translate,Ut.translate,ue,Me),rf(At.rotate,Ut.rotate,ue,Me),Hf(At.skew,Ut.skew,ue,Me),eu(At.scale,Ut.scale,ue,Me),At=Ut=null,function(Pe){for(var Ne=-1,sr=Me.length,ar;++Ne0?Ne=Kn:(ue.c=null,ue.t=NaN,ue=null,Ut.end({type:"end",alpha:Ne=0})):Kn>0&&(Ut.start({type:"start",alpha:Ne=Kn}),ue=Vi(At.tick)),At):Ne},At.start=function(){var Kn,Ua=On.length,Ha=Hi.length,ao=Me[0],Po=Me[1],Ro,Wo;for(Kn=0;Kn=0;)Ne.push(Jr=rn[Er]),Jr.parent=ar,Jr.depth=ar.depth+1;ue&&(ar.value=0),ar.children=rn}else ue&&(ar.value=+ue.call(Me,ar,ar.depth)||0),delete ar.children;return vh(Pe,function(xn){var zn,On;At&&(zn=xn.children)&&zn.sort(At),ue&&(On=xn.parent)&&(On.value+=xn.value)}),sr}return Me.sort=function(Pe){return arguments.length?(At=Pe,Me):At},Me.children=function(Pe){return arguments.length?(Ut=Pe,Me):Ut},Me.value=function(Pe){return arguments.length?(ue=Pe,Me):ue},Me.revalue=function(Pe){return ue&&(uf(Pe,function(Ne){Ne.children&&(Ne.value=0)}),vh(Pe,function(Ne){var sr;Ne.children||(Ne.value=+ue.call(Me,Ne,Ne.depth)||0),(sr=Ne.parent)&&(sr.value+=Ne.value)})),Pe},Me};function bu(At,Ut){return c.rebind(At,Ut,"sort","children","value"),At.nodes=At,At.links=Jd,At}function uf(At,Ut){for(var ue=[At];(At=ue.pop())!=null;)if(Ut(At),(Pe=At.children)&&(Me=Pe.length))for(var Me,Pe;--Me>=0;)ue.push(Pe[Me])}function vh(At,Ut){for(var ue=[At],Me=[];(At=ue.pop())!=null;)if(Me.push(At),(sr=At.children)&&(Ne=sr.length))for(var Pe=-1,Ne,sr;++PePe&&(Pe=ar),Me.push(ar)}for(sr=0;srMe&&(ue=Ut,Me=Pe);return ue}function Lh(At){return At.reduce(Vc,0)}function Vc(At,Ut){return At+Ut[1]}c.layout.histogram=function(){var At=!0,Ut=Number,ue=bf,Me=fd;function Pe(Ne,sr){for(var ar=[],Er=Ne.map(Ut,this),rn=ue.call(this,Er,sr),Jr=Me.call(this,rn,Er,sr),xn,sr=-1,zn=Er.length,On=Jr.length-1,Hi=At?1:1/zn,Vn;++sr0)for(sr=-1;++sr=rn[0]&&Vn<=rn[1]&&(xn=ar[c.bisect(Jr,Vn,1,On)-1],xn.y+=Hi,xn.push(Ne[sr]));return ar}return Pe.value=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.range=function(Ne){return arguments.length?(ue=Ce(Ne),Pe):ue},Pe.bins=function(Ne){return arguments.length?(Me=typeof Ne=="number"?function(sr){return yu(sr,Ne)}:Ce(Ne),Pe):Me},Pe.frequency=function(Ne){return arguments.length?(At=!!Ne,Pe):At},Pe};function fd(At,Ut){return yu(At,Math.ceil(Math.log(Ut.length)/Math.LN2+1))}function yu(At,Ut){for(var ue=-1,Me=+At[0],Pe=(At[1]-Me)/Ut,Ne=[];++ue<=Ut;)Ne[ue]=Pe*ue+Me;return Ne}function bf(At){return[c.min(At),c.max(At)]}c.layout.pack=function(){var At=c.layout.hierarchy().sort($h),Ut=0,ue=[1,1],Me;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn=ue[0],Jr=ue[1],xn=Me==null?Math.sqrt:typeof Me=="function"?Me:function(){return Me};if(Er.x=Er.y=0,vh(Er,function(On){On.r=+xn(On.value)}),vh(Er,wf),Ut){var zn=Ut*(Me?1:Math.max(2*Er.r/rn,2*Er.r/Jr))/2;vh(Er,function(On){On.r+=zn}),vh(Er,wf),vh(Er,function(On){On.r-=zn})}return Jf(Er,rn/2,Jr/2,Me?1:1/Math.max(2*Er.r/rn,2*Er.r/Jr)),ar}return Pe.size=function(Ne){return arguments.length?(ue=Ne,Pe):ue},Pe.radius=function(Ne){return arguments.length?(Me=Ne==null||typeof Ne=="function"?Ne:+Ne,Pe):Me},Pe.padding=function(Ne){return arguments.length?(Ut=+Ne,Pe):Ut},bu(Pe,At)};function $h(At,Ut){return At.value-Ut.value}function th(At,Ut){var ue=At._pack_next;At._pack_next=Ut,Ut._pack_prev=At,Ut._pack_next=ue,ue._pack_prev=Ut}function nf(At,Ut){At._pack_next=Ut,Ut._pack_prev=At}function Zh(At,Ut){var ue=Ut.x-At.x,Me=Ut.y-At.y,Pe=At.r+Ut.r;return .999*Pe*Pe>ue*ue+Me*Me}function wf(At){if(!(Ut=At.children)||!(zn=Ut.length))return;var Ut,ue=1/0,Me=-1/0,Pe=1/0,Ne=-1/0,sr,ar,Er,rn,Jr,xn,zn;function On(Kn){ue=Math.min(Kn.x-Kn.r,ue),Me=Math.max(Kn.x+Kn.r,Me),Pe=Math.min(Kn.y-Kn.r,Pe),Ne=Math.max(Kn.y+Kn.r,Ne)}if(Ut.forEach(Pd),sr=Ut[0],sr.x=-sr.r,sr.y=0,On(sr),zn>1&&(ar=Ut[1],ar.x=ar.r,ar.y=0,On(ar),zn>2))for(Er=Ut[2],eh(sr,ar,Er),On(Er),th(sr,Er),sr._pack_prev=Er,th(Er,ar),ar=sr._pack_next,rn=3;rnyi.x&&(yi=Ua),Ua.depth>Si.depth&&(Si=Ua)});var Ri=Ut(Vn,yi)/2-Vn.x,Gi=ue[0]/(yi.x+Ut(yi,Vn)/2+Ri),Kn=ue[1]/(Si.depth||1);uf(On,function(Ua){Ua.x=(Ua.x+Ri)*Gi,Ua.y=Ua.depth*Kn})}return zn}function Ne(Jr){for(var xn={A:null,children:[Jr]},zn=[xn],On;(On=zn.pop())!=null;)for(var Hi=On.children,Vn,yi=0,Si=Hi.length;yi0&&(iu(df(Vn,Jr,zn),Jr,Ua),Si+=Ua,Ri+=Ua),Gi+=Vn.m,Si+=On.m,Kn+=yi.m,Ri+=Hi.m;Vn&&!Bu(Hi)&&(Hi.t=Vn,Hi.m+=Gi-Ri),On&&!xh(yi)&&(yi.t=On,yi.m+=Si-Kn,zn=Jr)}return zn}function rn(Jr){Jr.x*=ue[0],Jr.y=Jr.depth*ue[1]}return Pe.separation=function(Jr){return arguments.length?(Ut=Jr,Pe):Ut},Pe.size=function(Jr){return arguments.length?(Me=(ue=Jr)==null?rn:null,Pe):Me?null:ue},Pe.nodeSize=function(Jr){return arguments.length?(Me=(ue=Jr)==null?null:rn,Pe):Me?ue:null},bu(Pe,At)};function Ph(At,Ut){return At.parent==Ut.parent?1:2}function xh(At){var Ut=At.children;return Ut.length?Ut[0]:At.t}function Bu(At){var Ut=At.children,ue;return(ue=Ut.length)?Ut[ue-1]:At.t}function iu(At,Ut,ue){var Me=ue/(Ut.i-At.i);Ut.c-=Me,Ut.s+=ue,At.c+=Me,Ut.z+=ue,Ut.m+=ue}function _h(At){for(var Ut=0,ue=0,Me=At.children,Pe=Me.length,Ne;--Pe>=0;)Ne=Me[Pe],Ne.z+=Ut,Ne.m+=Ut,Ut+=Ne.s+(ue+=Ne.c)}function df(At,Ut,ue){return At.a.parent===Ut.parent?At.a:ue}c.layout.cluster=function(){var At=c.layout.hierarchy().sort(null).value(null),Ut=Ph,ue=[1,1],Me=!1;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn,Jr=0;vh(Er,function(Vn){var yi=Vn.children;yi&&yi.length?(Vn.x=Wf(yi),Vn.y=bh(yi)):(Vn.x=rn?Jr+=Ut(Vn,rn):0,Vn.y=0,rn=Vn)});var xn=gr(Er),zn=Ur(Er),On=xn.x-Ut(xn,zn)/2,Hi=zn.x+Ut(zn,xn)/2;return vh(Er,Me?function(Vn){Vn.x=(Vn.x-Er.x)*ue[0],Vn.y=(Er.y-Vn.y)*ue[1]}:function(Vn){Vn.x=(Vn.x-On)/(Hi-On)*ue[0],Vn.y=(1-(Er.y?Vn.y/Er.y:1))*ue[1]}),ar}return Pe.separation=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.size=function(Ne){return arguments.length?(Me=(ue=Ne)==null,Pe):Me?null:ue},Pe.nodeSize=function(Ne){return arguments.length?(Me=(ue=Ne)!=null,Pe):Me?ue:null},bu(Pe,At)};function bh(At){return 1+c.max(At,function(Ut){return Ut.y})}function Wf(At){return At.reduce(function(Ut,ue){return Ut+ue.x},0)/At.length}function gr(At){var Ut=At.children;return Ut&&Ut.length?gr(Ut[0]):At}function Ur(At){var Ut=At.children,ue;return Ut&&(ue=Ut.length)?Ur(Ut[ue-1]):At}c.layout.treemap=function(){var At=c.layout.hierarchy(),Ut=Math.round,ue=[1,1],Me=null,Pe=wn,Ne=!1,sr,ar="squarify",Er=.5*(1+Math.sqrt(5));function rn(Vn,yi){for(var Si=-1,Ri=Vn.length,Gi,Kn;++Si0;)Ri.push(Kn=Gi[Po-1]),Ri.area+=Kn.area,ar!=="squarify"||(Ha=zn(Ri,ao))<=Ua?(Gi.pop(),Ua=Ha):(Ri.area-=Ri.pop().area,On(Ri,ao,Si,!1),ao=Math.min(Si.dx,Si.dy),Ri.length=Ri.area=0,Ua=1/0);Ri.length&&(On(Ri,ao,Si,!0),Ri.length=Ri.area=0),yi.forEach(Jr)}}function xn(Vn){var yi=Vn.children;if(yi&&yi.length){var Si=Pe(Vn),Ri=yi.slice(),Gi,Kn=[];for(rn(Ri,Si.dx*Si.dy/Vn.value),Kn.area=0;Gi=Ri.pop();)Kn.push(Gi),Kn.area+=Gi.area,Gi.z!=null&&(On(Kn,Gi.z?Si.dx:Si.dy,Si,!Ri.length),Kn.length=Kn.area=0);yi.forEach(xn)}}function zn(Vn,yi){for(var Si=Vn.area,Ri,Gi=0,Kn=1/0,Ua=-1,Ha=Vn.length;++UaGi&&(Gi=Ri));return Si*=Si,yi*=yi,Si?Math.max(yi*Gi*Er/Si,Si/(yi*Kn*Er)):1/0}function On(Vn,yi,Si,Ri){var Gi=-1,Kn=Vn.length,Ua=Si.x,Ha=Si.y,ao=yi?Ut(Vn.area/yi):0,Po;if(yi==Si.dx){for((Ri||ao>Si.dy)&&(ao=Si.dy);++GiSi.dx)&&(ao=Si.dx);++Gi1);return At+Ut*Me*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var At=c.random.normal.apply(c,arguments);return function(){return Math.exp(At())}},bates:function(At){var Ut=c.random.irwinHall(At);return function(){return Ut()/At}},irwinHall:function(At){return function(){for(var Ut=0,ue=0;ue2?ca:aa,rn=Me?Yf:Cd;return Pe=Er(At,Ut,rn,ue),Ne=Er(Ut,At,rn,rl),ar}function ar(Er){return Pe(Er)}return ar.invert=function(Er){return Ne(Er)},ar.domain=function(Er){return arguments.length?(At=Er.map(Number),sr()):At},ar.range=function(Er){return arguments.length?(Ut=Er,sr()):Ut},ar.rangeRound=function(Er){return ar.range(Er).interpolate(Hh)},ar.clamp=function(Er){return arguments.length?(Me=Er,sr()):Me},ar.interpolate=function(Er){return arguments.length?(ue=Er,sr()):ue},ar.ticks=function(Er){return ns(At,Er)},ar.tickFormat=function(Er,rn){return d3_scale_linearTickFormat(At,Er,rn)},ar.nice=function(Er){return na(At,Er),sr()},ar.copy=function(){return Oa(At,Ut,ue,Me)},sr()}function ka(At,Ut){return c.rebind(At,Ut,"range","rangeRound","interpolate","clamp")}function na(At,Ut){return va(At,Ba(io(At,Ut)[2])),va(At,Ba(io(At,Ut)[2])),At}function io(At,Ut){Ut==null&&(Ut=10);var ue=qn(At),Me=ue[1]-ue[0],Pe=Math.pow(10,Math.floor(Math.log(Me/Ut)/Math.LN10)),Ne=Ut/Me*Pe;return Ne<=.15?Pe*=10:Ne<=.35?Pe*=5:Ne<=.75&&(Pe*=2),ue[0]=Math.ceil(ue[0]/Pe)*Pe,ue[1]=Math.floor(ue[1]/Pe)*Pe+Pe*.5,ue[2]=Pe,ue}function ns(At,Ut){return c.range.apply(c,io(At,Ut))}c.scale.log=function(){return Ko(c.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(At,Ut,ue,Me){function Pe(ar){return(ue?Math.log(ar<0?0:ar):-Math.log(ar>0?0:-ar))/Math.log(Ut)}function Ne(ar){return ue?Math.pow(Ut,ar):-Math.pow(Ut,-ar)}function sr(ar){return At(Pe(ar))}return sr.invert=function(ar){return Ne(At.invert(ar))},sr.domain=function(ar){return arguments.length?(ue=ar[0]>=0,At.domain((Me=ar.map(Number)).map(Pe)),sr):Me},sr.base=function(ar){return arguments.length?(Ut=+ar,At.domain(Me.map(Pe)),sr):Ut},sr.nice=function(){var ar=va(Me.map(Pe),ue?Math:ls);return At.domain(ar),Me=ar.map(Ne),sr},sr.ticks=function(){var ar=qn(Me),Er=[],rn=ar[0],Jr=ar[1],xn=Math.floor(Pe(rn)),zn=Math.ceil(Pe(Jr)),On=Ut%1?2:Ut;if(isFinite(zn-xn)){if(ue){for(;xn0;Hi--)Er.push(Ne(xn)*Hi);for(xn=0;Er[xn]Jr;zn--);Er=Er.slice(xn,zn)}return Er},sr.copy=function(){return Ko(At.copy(),Ut,ue,Me)},ka(sr,At)}var ls={floor:function(At){return-Math.ceil(-At)},ceil:function(At){return-Math.floor(-At)}};c.scale.pow=function(){return ps(c.scale.linear(),1,[0,1])};function ps(At,Ut,ue){var Me=oo(Ut),Pe=oo(1/Ut);function Ne(sr){return At(Me(sr))}return Ne.invert=function(sr){return Pe(At.invert(sr))},Ne.domain=function(sr){return arguments.length?(At.domain((ue=sr.map(Number)).map(Me)),Ne):ue},Ne.ticks=function(sr){return ns(ue,sr)},Ne.tickFormat=function(sr,ar){return d3_scale_linearTickFormat(ue,sr,ar)},Ne.nice=function(sr){return Ne.domain(na(ue,sr))},Ne.exponent=function(sr){return arguments.length?(Me=oo(Ut=sr),Pe=oo(1/Ut),At.domain(ue.map(Me)),Ne):Ut},Ne.copy=function(){return ps(At.copy(),Ut,ue)},ka(Ne,At)}function oo(At){return function(Ut){return Ut<0?-Math.pow(-Ut,At):Math.pow(Ut,At)}}c.scale.sqrt=function(){return c.scale.pow().exponent(.5)},c.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})};function qa(At,Ut){var ue,Me,Pe;function Ne(ar){return Me[((ue.get(ar)||(Ut.t==="range"?ue.set(ar,At.push(ar)):NaN))-1)%Me.length]}function sr(ar,Er){return c.range(At.length).map(function(rn){return ar+Er*rn})}return Ne.domain=function(ar){if(!arguments.length)return At;At=[],ue=new P;for(var Er=-1,rn=ar.length,Jr;++Er0?ue[Ne-1]:At[0],Nezn?0:1;if(Jr=Nt)return Er(Jr,Hi)+(rn?Er(rn,1-Hi):"")+"Z";var Vn,yi,Si,Ri,Gi=0,Kn=0,Ua,Ha,ao,Po,Ro,Wo,ol,Go,vs=[];if((Ri=(+sr.apply(this,arguments)||0)/2)&&(Si=Me===fu?Math.sqrt(rn*rn+Jr*Jr):+Me.apply(this,arguments),Hi||(Kn*=-1),Jr&&(Kn=qe(Si/Jr*Math.sin(Ri))),rn&&(Gi=qe(Si/rn*Math.sin(Ri)))),Jr){Ua=Jr*Math.cos(xn+Kn),Ha=Jr*Math.sin(xn+Kn),ao=Jr*Math.cos(zn-Kn),Po=Jr*Math.sin(zn-Kn);var Tl=Math.abs(zn-xn-2*Kn)<=gt?0:1;if(Kn&&Hc(Ua,Ha,ao,Po)===Hi^Tl){var Ku=(xn+zn)/2;Ua=Jr*Math.cos(Ku),Ha=Jr*Math.sin(Ku),ao=Po=null}}else Ua=Ha=0;if(rn){Ro=rn*Math.cos(zn-Gi),Wo=rn*Math.sin(zn-Gi),ol=rn*Math.cos(xn+Gi),Go=rn*Math.sin(xn+Gi);var du=Math.abs(xn-zn+2*Gi)<=gt?0:1;if(Gi&&Hc(Ro,Wo,ol,Go)===1-Hi^du){var _o=(xn+zn)/2;Ro=rn*Math.cos(_o),Wo=rn*Math.sin(_o),ol=Go=null}}else Ro=Wo=0;if(On>ne&&(Vn=Math.min(Math.abs(Jr-rn)/2,+ue.apply(this,arguments)))>.001){yi=rn0?0:1}function Lc(At,Ut,ue,Me,Pe){var Ne=At[0]-Ut[0],sr=At[1]-Ut[1],ar=(Pe?Me:-Me)/Math.sqrt(Ne*Ne+sr*sr),Er=ar*sr,rn=-ar*Ne,Jr=At[0]+Er,xn=At[1]+rn,zn=Ut[0]+Er,On=Ut[1]+rn,Hi=(Jr+zn)/2,Vn=(xn+On)/2,yi=zn-Jr,Si=On-xn,Ri=yi*yi+Si*Si,Gi=ue-Me,Kn=Jr*On-zn*xn,Ua=(Si<0?-1:1)*Math.sqrt(Math.max(0,Gi*Gi*Ri-Kn*Kn)),Ha=(Kn*Si-yi*Ua)/Ri,ao=(-Kn*yi-Si*Ua)/Ri,Po=(Kn*Si+yi*Ua)/Ri,Ro=(-Kn*yi+Si*Ua)/Ri,Wo=Ha-Hi,ol=ao-Vn,Go=Po-Hi,vs=Ro-Vn;return Wo*Wo+ol*ol>Go*Go+vs*vs&&(Ha=Po,ao=Ro),[[Ha-Er,ao-rn],[Ha*ue/Gi,ao*ue/Gi]]}function Ih(){return!0}function Wc(At){var Ut=yo,ue=Fo,Me=Ih,Pe=Du,Ne=Pe.key,sr=.7;function ar(Er){var rn=[],Jr=[],xn=-1,zn=Er.length,On,Hi=Ce(Ut),Vn=Ce(ue);function yi(){rn.push("M",Pe(At(Jr),sr))}for(;++xn1?At.join("L"):At+"Z"}function Oh(At){return At.join("L")+"Z"}function rs(At){for(var Ut=0,ue=At.length,Me=At[0],Pe=[Me[0],",",Me[1]];++Ut1&&Pe.push("H",Me[0]),Pe.join("")}function zs(At){for(var Ut=0,ue=At.length,Me=At[0],Pe=[Me[0],",",Me[1]];++Ut1){ar=Ut[1],Ne=At[Er],Er++,Me+="C"+(Pe[0]+sr[0])+","+(Pe[1]+sr[1])+","+(Ne[0]-ar[0])+","+(Ne[1]-ar[1])+","+Ne[0]+","+Ne[1];for(var rn=2;rn9&&(Ne=ue*3/Math.sqrt(Ne),sr[ar]=Ne*Me,sr[ar+1]=Ne*Pe));for(ar=-1;++ar<=Er;)Ne=(At[Math.min(Er,ar+1)][0]-At[Math.max(0,ar-1)][0])/(6*(1+sr[ar]*sr[ar])),Ut.push([Ne||0,sr[ar]*Ne||0]);return Ut}function ae(At){return At.length<3?Du(At):At[0]+z(At,Xt(At))}c.svg.line.radial=function(){var At=Wc(xe);return At.radius=At.x,delete At.x,At.angle=At.y,delete At.y,At};function xe(At){for(var Ut,ue=-1,Me=At.length,Pe,Ne;++uegt)+",1 "+xn}function rn(Jr,xn,zn,On){return"Q 0,0 "+On}return Ne.radius=function(Jr){return arguments.length?(ue=Ce(Jr),Ne):ue},Ne.source=function(Jr){return arguments.length?(At=Ce(Jr),Ne):At},Ne.target=function(Jr){return arguments.length?(Ut=Ce(Jr),Ne):Ut},Ne.startAngle=function(Jr){return arguments.length?(Me=Ce(Jr),Ne):Me},Ne.endAngle=function(Jr){return arguments.length?(Pe=Ce(Jr),Ne):Pe},Ne};function $e(At){return At.radius}c.svg.diagonal=function(){var At=je,Ut=Oe,ue=wr;function Me(Pe,Ne){var sr=At.call(this,Pe,Ne),ar=Ut.call(this,Pe,Ne),Er=(sr.y+ar.y)/2,rn=[sr,{x:sr.x,y:Er},{x:ar.x,y:Er},ar];return rn=rn.map(ue),"M"+rn[0]+"C"+rn[1]+" "+rn[2]+" "+rn[3]}return Me.source=function(Pe){return arguments.length?(At=Ce(Pe),Me):At},Me.target=function(Pe){return arguments.length?(Ut=Ce(Pe),Me):Ut},Me.projection=function(Pe){return arguments.length?(ue=Pe,Me):ue},Me};function wr(At){return[At.x,At.y]}c.svg.diagonal.radial=function(){var At=c.svg.diagonal(),Ut=wr,ue=At.projection;return At.projection=function(Me){return arguments.length?ue(Or(Ut=Me)):Ut},At};function Or(At){return function(){var Ut=At.apply(this,arguments),ue=Ut[0],Me=Ut[1]-re;return[ue*Math.cos(Me),ue*Math.sin(Me)]}}c.svg.symbol=function(){var At=en,Ut=Nr;function ue(Me,Pe){return(In.get(At.call(this,Me,Pe))||vn)(Ut.call(this,Me,Pe))}return ue.type=function(Me){return arguments.length?(At=Ce(Me),ue):At},ue.size=function(Me){return arguments.length?(Ut=Ce(Me),ue):Ut},ue};function Nr(){return 64}function en(){return"circle"}function vn(At){var Ut=Math.sqrt(At/gt);return"M0,"+Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+-Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+Ut+"Z"}var In=c.map({circle:vn,cross:function(At){var Ut=Math.sqrt(At/5)/2;return"M"+-3*Ut+","+-Ut+"H"+-Ut+"V"+-3*Ut+"H"+Ut+"V"+-Ut+"H"+3*Ut+"V"+Ut+"H"+Ut+"V"+3*Ut+"H"+-Ut+"V"+Ut+"H"+-3*Ut+"Z"},diamond:function(At){var Ut=Math.sqrt(At/(2*ii)),ue=Ut*ii;return"M0,"+-Ut+"L"+ue+",0 0,"+Ut+" "+-ue+",0Z"},square:function(At){var Ut=Math.sqrt(At)/2;return"M"+-Ut+","+-Ut+"L"+Ut+","+-Ut+" "+Ut+","+Ut+" "+-Ut+","+Ut+"Z"},"triangle-down":function(At){var Ut=Math.sqrt(At/Nn),ue=Ut*Nn/2;return"M0,"+ue+"L"+Ut+","+-ue+" "+-Ut+","+-ue+"Z"},"triangle-up":function(At){var Ut=Math.sqrt(At/Nn),ue=Ut*Nn/2;return"M0,"+-ue+"L"+Ut+","+ue+" "+-Ut+","+ue+"Z"}});c.svg.symbolTypes=In.keys();var Nn=Math.sqrt(3),ii=Math.tan(30*le);it.transition=function(At){for(var Ut=Bo||++so,ue=vl(At),Me=[],Pe,Ne,sr=So||{time:Date.now(),ease:Qo,delay:0,duration:250},ar=-1,Er=this.length;++ar0;)xn[--Ri].call(At,Si);if(yi>=1)return sr.event&&sr.event.end.call(At,At.__data__,Ut),--Ne.count?delete Ne[Me]:delete At[ue],1}sr||(ar=Pe.time,Er=Vi(zn,0,ar),sr=Ne[Me]={tween:new P,time:ar,timer:Er,delay:Pe.delay,duration:Pe.duration,ease:Pe.ease,index:Ut},Pe=null,++Ne.count)}c.svg.axis=function(){var At=c.scale.linear(),Ut=wl,ue=6,Me=6,Pe=3,Ne=[10],sr=null,ar;function Er(rn){rn.each(function(){var Jr=c.select(this),xn=this.__chart__||At,zn=this.__chart__=At.copy(),On=sr??(zn.ticks?zn.ticks.apply(zn,Ne):zn.domain()),Hi=ar??(zn.tickFormat?zn.tickFormat.apply(zn,Ne):V),Vn=Jr.selectAll(".tick").data(On,zn),yi=Vn.enter().insert("g",".domain").attr("class","tick").style("opacity",ne),Si=c.transition(Vn.exit()).style("opacity",ne).remove(),Ri=c.transition(Vn.order()).style("opacity",1),Gi=Math.max(ue,0)+Pe,Kn,Ua=di(zn),Ha=Jr.selectAll(".domain").data([0]),ao=(Ha.enter().append("path").attr("class","domain"),c.transition(Ha));yi.append("line"),yi.append("text");var Po=yi.select("line"),Ro=Ri.select("line"),Wo=Vn.select("text").text(Hi),ol=yi.select("text"),Go=Ri.select("text"),vs=Ut==="top"||Ut==="left"?-1:1,Tl,Ku,du,_o;if(Ut==="bottom"||Ut==="top"?(Kn=gu,Tl="x",du="y",Ku="x2",_o="y2",Wo.attr("dy",vs<0?"0em":".71em").style("text-anchor","middle"),ao.attr("d","M"+Ua[0]+","+vs*Me+"V0H"+Ua[1]+"V"+vs*Me)):(Kn=$s,Tl="y",du="x",Ku="y2",_o="x2",Wo.attr("dy",".32em").style("text-anchor",vs<0?"end":"start"),ao.attr("d","M"+vs*Me+","+Ua[0]+"H0V"+Ua[1]+"H"+vs*Me)),Po.attr(_o,vs*ue),ol.attr(du,vs*Gi),Ro.attr(Ku,0).attr(_o,vs*ue),Go.attr(Tl,0).attr(du,vs*Gi),zn.rangeBand){var Gs=zn,nl=Gs.rangeBand()/2;xn=zn=function(uu){return Gs(uu)+nl}}else xn.rangeBand?xn=zn:Si.call(Kn,zn,xn);yi.call(Kn,xn,zn),Ri.call(Kn,zn,zn)})}return Er.scale=function(rn){return arguments.length?(At=rn,Er):At},Er.orient=function(rn){return arguments.length?(Ut=rn in Eu?rn+"":wl,Er):Ut},Er.ticks=function(){return arguments.length?(Ne=I(arguments),Er):Ne},Er.tickValues=function(rn){return arguments.length?(sr=rn,Er):sr},Er.tickFormat=function(rn){return arguments.length?(ar=rn,Er):ar},Er.tickSize=function(rn){var Jr=arguments.length;return Jr?(ue=+rn,Me=+arguments[Jr-1],Er):ue},Er.innerTickSize=function(rn){return arguments.length?(ue=+rn,Er):ue},Er.outerTickSize=function(rn){return arguments.length?(Me=+rn,Er):Me},Er.tickPadding=function(rn){return arguments.length?(Pe=+rn,Er):Pe},Er.tickSubdivide=function(){return arguments.length&&Er},Er};var wl="bottom",Eu={top:1,right:1,bottom:1,left:1};function gu(At,Ut,ue){At.attr("transform",function(Me){var Pe=Ut(Me);return"translate("+(isFinite(Pe)?Pe:ue(Me))+",0)"})}function $s(At,Ut,ue){At.attr("transform",function(Me){var Pe=Ut(Me);return"translate(0,"+(isFinite(Pe)?Pe:ue(Me))+")"})}c.svg.brush=function(){var At=mt(Jr,"brushstart","brush","brushend"),Ut=null,ue=null,Me=[0,0],Pe=[0,0],Ne,sr,ar=!0,Er=!0,rn=Yu[0];function Jr(Vn){Vn.each(function(){var yi=c.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Hi).on("touchstart.brush",Hi),Si=yi.selectAll(".background").data([0]);Si.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),yi.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ri=yi.selectAll(".resize").data(rn,V);Ri.exit().remove(),Ri.enter().append("g").attr("class",function(Ha){return"resize "+Ha}).style("cursor",function(Ha){return Zs[Ha]}).append("rect").attr("x",function(Ha){return/[ew]$/.test(Ha)?-3:null}).attr("y",function(Ha){return/^[ns]/.test(Ha)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ri.style("display",Jr.empty()?"none":null);var Gi=c.transition(yi),Kn=c.transition(Si),Ua;Ut&&(Ua=di(Ut),Kn.attr("x",Ua[0]).attr("width",Ua[1]-Ua[0]),zn(Gi)),ue&&(Ua=di(ue),Kn.attr("y",Ua[0]).attr("height",Ua[1]-Ua[0]),On(Gi)),xn(Gi)})}Jr.event=function(Vn){Vn.each(function(){var yi=At.of(this,arguments),Si={x:Me,y:Pe,i:Ne,j:sr},Ri=this.__chart__||Si;this.__chart__=Si,Bo?c.select(this).transition().each("start.brush",function(){Ne=Ri.i,sr=Ri.j,Me=Ri.x,Pe=Ri.y,yi({type:"brushstart"})}).tween("brush:brush",function(){var Gi=Yl(Me,Si.x),Kn=Yl(Pe,Si.y);return Ne=sr=null,function(Ua){Me=Si.x=Gi(Ua),Pe=Si.y=Kn(Ua),yi({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=Si.i,sr=Si.j,yi({type:"brush",mode:"resize"}),yi({type:"brushend"})}):(yi({type:"brushstart"}),yi({type:"brush",mode:"resize"}),yi({type:"brushend"}))})};function xn(Vn){Vn.selectAll(".resize").attr("transform",function(yi){return"translate("+Me[+/e$/.test(yi)]+","+Pe[+/^s/.test(yi)]+")"})}function zn(Vn){Vn.select(".extent").attr("x",Me[0]),Vn.selectAll(".extent,.n>rect,.s>rect").attr("width",Me[1]-Me[0])}function On(Vn){Vn.select(".extent").attr("y",Pe[0]),Vn.selectAll(".extent,.e>rect,.w>rect").attr("height",Pe[1]-Pe[0])}function Hi(){var Vn=this,yi=c.select(c.event.target),Si=At.of(Vn,arguments),Ri=c.select(Vn),Gi=yi.datum(),Kn=!/^(n|s)$/.test(Gi)&&Ut,Ua=!/^(e|w)$/.test(Gi)&&ue,Ha=yi.classed("extent"),ao=Xr(Vn),Po,Ro=c.mouse(Vn),Wo,ol=c.select(e(Vn)).on("keydown.brush",Tl).on("keyup.brush",Ku);if(c.event.changedTouches?ol.on("touchmove.brush",du).on("touchend.brush",Gs):ol.on("mousemove.brush",du).on("mouseup.brush",Gs),Ri.interrupt().selectAll("*").interrupt(),Ha)Ro[0]=Me[0]-Ro[0],Ro[1]=Pe[0]-Ro[1];else if(Gi){var Go=+/w$/.test(Gi),vs=+/^n/.test(Gi);Wo=[Me[1-Go]-Ro[0],Pe[1-vs]-Ro[1]],Ro[0]=Me[Go],Ro[1]=Pe[vs]}else c.event.altKey&&(Po=Ro.slice());Ri.style("pointer-events","none").selectAll(".resize").style("display",null),c.select("body").style("cursor",yi.style("cursor")),Si({type:"brushstart"}),du();function Tl(){c.event.keyCode==32&&(Ha||(Po=null,Ro[0]-=Me[1],Ro[1]-=Pe[1],Ha=2),lt())}function Ku(){c.event.keyCode==32&&Ha==2&&(Ro[0]+=Me[1],Ro[1]+=Pe[1],Ha=0,lt())}function du(){var nl=c.mouse(Vn),uu=!1;Wo&&(nl[0]+=Wo[0],nl[1]+=Wo[1]),Ha||(c.event.altKey?(Po||(Po=[(Me[0]+Me[1])/2,(Pe[0]+Pe[1])/2]),Ro[0]=Me[+(nl[0]{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=new Date,I=new Date;function S(Mt,ee,ve,oe){function Te(He){return Mt(He=arguments.length===0?new Date:new Date(+He)),He}return Te.floor=function(He){return Mt(He=new Date(+He)),He},Te.ceil=function(He){return Mt(He=new Date(He-1)),ee(He,1),Mt(He),He},Te.round=function(He){var Ge=Te(He),cr=Te.ceil(He);return He-Ge0))return ur;do ur.push(jr=new Date(+He)),ee(He,cr),Mt(He);while(jr=Ge)for(;Mt(Ge),!He(Ge);)Ge.setTime(Ge-1)},function(Ge,cr){if(Ge>=Ge)if(cr<0)for(;++cr<=0;)for(;ee(Ge,-1),!He(Ge););else for(;--cr>=0;)for(;ee(Ge,1),!He(Ge););})},ve&&(Te.count=function(He,Ge){return g.setTime(+He),I.setTime(+Ge),Mt(g),Mt(I),Math.floor(ve(g,I))},Te.every=function(He){return He=Math.floor(He),!isFinite(He)||!(He>0)?null:He>1?Te.filter(oe?function(Ge){return oe(Ge)%He===0}:function(Ge){return Te.count(0,Ge)%He===0}):Te}),Te}var t=S(function(){},function(Mt,ee){Mt.setTime(+Mt+ee)},function(Mt,ee){return ee-Mt});t.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?S(function(ee){ee.setTime(Math.floor(ee/Mt)*Mt)},function(ee,ve){ee.setTime(+ee+ve*Mt)},function(ee,ve){return(ve-ee)/Mt}):t};var e=t.range,r=1e3,a=6e4,n=36e5,o=864e5,i=6048e5,l=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds())},function(Mt,ee){Mt.setTime(+Mt+ee*r)},function(Mt,ee){return(ee-Mt)/r},function(Mt){return Mt.getUTCSeconds()}),f=l.range,x=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getMinutes()}),y=x.range,v=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r-Mt.getMinutes()*a)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getHours()}),T=v.range,u=S(function(Mt){Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setDate(Mt.getDate()+ee)},function(Mt,ee){return(ee-Mt-(ee.getTimezoneOffset()-Mt.getTimezoneOffset())*a)/o},function(Mt){return Mt.getDate()-1}),b=u.range;function _(Mt){return S(function(ee){ee.setDate(ee.getDate()-(ee.getDay()+7-Mt)%7),ee.setHours(0,0,0,0)},function(ee,ve){ee.setDate(ee.getDate()+ve*7)},function(ee,ve){return(ve-ee-(ve.getTimezoneOffset()-ee.getTimezoneOffset())*a)/i})}var P=_(0),M=_(1),C=_(2),A=_(3),h=_(4),p=_(5),k=_(6),w=P.range,R=M.range,O=C.range,j=A.range,V=h.range,H=p.range,F=k.range,U=S(function(Mt){Mt.setDate(1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setMonth(Mt.getMonth()+ee)},function(Mt,ee){return ee.getMonth()-Mt.getMonth()+(ee.getFullYear()-Mt.getFullYear())*12},function(Mt){return Mt.getMonth()}),W=U.range,q=S(function(Mt){Mt.setMonth(0,1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setFullYear(Mt.getFullYear()+ee)},function(Mt,ee){return ee.getFullYear()-Mt.getFullYear()},function(Mt){return Mt.getFullYear()});q.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setFullYear(Math.floor(ee.getFullYear()/Mt)*Mt),ee.setMonth(0,1),ee.setHours(0,0,0,0)},function(ee,ve){ee.setFullYear(ee.getFullYear()+ve*Mt)})};var J=q.range,lt=S(function(Mt){Mt.setUTCSeconds(0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getUTCMinutes()}),yt=lt.range,mt=S(function(Mt){Mt.setUTCMinutes(0,0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getUTCHours()}),st=mt.range,tt=S(function(Mt){Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCDate(Mt.getUTCDate()+ee)},function(Mt,ee){return(ee-Mt)/o},function(Mt){return Mt.getUTCDate()-1}),dt=tt.range;function rt(Mt){return S(function(ee){ee.setUTCDate(ee.getUTCDate()-(ee.getUTCDay()+7-Mt)%7),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCDate(ee.getUTCDate()+ve*7)},function(ee,ve){return(ve-ee)/i})}var at=rt(0),vt=rt(1),it=rt(2),Y=rt(3),ft=rt(4),ut=rt(5),kt=rt(6),It=at.range,Pt=vt.range,qt=it.range,Wt=Y.range,Jt=ft.range,ge=ut.range,fe=kt.range,pe=S(function(Mt){Mt.setUTCDate(1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCMonth(Mt.getUTCMonth()+ee)},function(Mt,ee){return ee.getUTCMonth()-Mt.getUTCMonth()+(ee.getUTCFullYear()-Mt.getUTCFullYear())*12},function(Mt){return Mt.getUTCMonth()}),se=pe.range,Tt=S(function(Mt){Mt.setUTCMonth(0,1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCFullYear(Mt.getUTCFullYear()+ee)},function(Mt,ee){return ee.getUTCFullYear()-Mt.getUTCFullYear()},function(Mt){return Mt.getUTCFullYear()});Tt.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setUTCFullYear(Math.floor(ee.getUTCFullYear()/Mt)*Mt),ee.setUTCMonth(0,1),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCFullYear(ee.getUTCFullYear()+ve*Mt)})};var Lt=Tt.range;c.timeDay=u,c.timeDays=b,c.timeFriday=p,c.timeFridays=H,c.timeHour=v,c.timeHours=T,c.timeInterval=S,c.timeMillisecond=t,c.timeMilliseconds=e,c.timeMinute=x,c.timeMinutes=y,c.timeMonday=M,c.timeMondays=R,c.timeMonth=U,c.timeMonths=W,c.timeSaturday=k,c.timeSaturdays=F,c.timeSecond=l,c.timeSeconds=f,c.timeSunday=P,c.timeSundays=w,c.timeThursday=h,c.timeThursdays=V,c.timeTuesday=C,c.timeTuesdays=O,c.timeWednesday=A,c.timeWednesdays=j,c.timeWeek=P,c.timeWeeks=w,c.timeYear=q,c.timeYears=J,c.utcDay=tt,c.utcDays=dt,c.utcFriday=ut,c.utcFridays=ge,c.utcHour=mt,c.utcHours=st,c.utcMillisecond=t,c.utcMilliseconds=e,c.utcMinute=lt,c.utcMinutes=yt,c.utcMonday=vt,c.utcMondays=Pt,c.utcMonth=pe,c.utcMonths=se,c.utcSaturday=kt,c.utcSaturdays=fe,c.utcSecond=l,c.utcSeconds=f,c.utcSunday=at,c.utcSundays=It,c.utcThursday=ft,c.utcThursdays=Jt,c.utcTuesday=it,c.utcTuesdays=qt,c.utcWednesday=Y,c.utcWednesdays=Wt,c.utcWeek=at,c.utcWeeks=It,c.utcYear=Tt,c.utcYears=Lt,Object.defineProperty(c,"__esModule",{value:!0})})}),Fi=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,Di()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L);return ne.setFullYear(Gt.y),ne}return new Date(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L)}function S(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(Date.UTC(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L));return ne.setUTCFullYear(Gt.y),ne}return new Date(Date.UTC(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L))}function t(Gt,ne,Ct){return{y:Gt,m:ne,d:Ct,H:0,M:0,S:0,L:0}}function e(Gt){var ne=Gt.dateTime,Ct=Gt.date,gt=Gt.time,St=Gt.periods,Nt=Gt.days,re=Gt.shortDays,le=Gt.months,we=Gt.shortMonths,Ue=f(St),qe=x(St),or=f(Nt),Sr=x(Nt),Ar=f(re),mr=x(re),Qr=f(le),Hn=x(le),Wn=f(we),Xn=x(we),Ii={a:ki,A:Oi,b:ji,B:Xi,c:null,d:U,e:U,f:yt,H:W,I:q,j:J,L:lt,m:mt,M:st,p:ci,q:za,Q:Ge,s:cr,S:tt,u:dt,U:rt,V:at,w:vt,W:it,x:null,X:null,y:Y,Y:ft,Z:ut,"%":He},oi={a:Wa,A:ze,b:Ie,B:Rr,c:null,d:kt,e:kt,f:Jt,H:It,I:Pt,j:qt,L:Wt,m:ge,M:fe,p:$r,q:Gr,Q:Ge,s:cr,S:pe,u:se,U:Tt,V:Lt,w:Mt,W:ee,x:null,X:null,y:ve,Y:oe,Z:Te,"%":He},$n={a:fr,A:_r,b:tn,B:Cn,c:Tn,d:h,e:h,f:j,H:k,I:k,j:p,L:O,m:A,M:w,p:nr,q:C,Q:H,s:F,S:R,u:v,U:T,V:u,w:y,W:b,x:Mn,X:fi,y:P,Y:_,Z:M,"%":V};Ii.x=sa(Ct,Ii),Ii.X=sa(gt,Ii),Ii.c=sa(ne,Ii),oi.x=sa(Ct,oi),oi.X=sa(gt,oi),oi.c=sa(ne,oi);function sa(Br,Yr){return function(pn){var on=[],Ce=-1,dr=0,Hr=Br.length,_n,Fn,Qn;for(pn instanceof Date||(pn=new Date(+pn));++Ce53)return null;"w"in on||(on.w=1),"Z"in on?(dr=S(t(on.y,0,1)),Hr=dr.getUTCDay(),dr=Hr>4||Hr===0?g.utcMonday.ceil(dr):g.utcMonday(dr),dr=g.utcDay.offset(dr,(on.V-1)*7),on.y=dr.getUTCFullYear(),on.m=dr.getUTCMonth(),on.d=dr.getUTCDate()+(on.w+6)%7):(dr=I(t(on.y,0,1)),Hr=dr.getDay(),dr=Hr>4||Hr===0?g.timeMonday.ceil(dr):g.timeMonday(dr),dr=g.timeDay.offset(dr,(on.V-1)*7),on.y=dr.getFullYear(),on.m=dr.getMonth(),on.d=dr.getDate()+(on.w+6)%7)}else("W"in on||"U"in on)&&("w"in on||(on.w="u"in on?on.u%7:"W"in on?1:0),Hr="Z"in on?S(t(on.y,0,1)).getUTCDay():I(t(on.y,0,1)).getDay(),on.m=0,on.d="W"in on?(on.w+6)%7+on.W*7-(Hr+5)%7:on.w+on.U*7-(Hr+6)%7);return"Z"in on?(on.H+=on.Z/100|0,on.M+=on.Z%100,S(on)):I(on)}}function We(Br,Yr,pn,on){for(var Ce=0,dr=Yr.length,Hr=pn.length,_n,Fn;Ce=Hr)return-1;if(_n=Yr.charCodeAt(Ce++),_n===37){if(_n=Yr.charAt(Ce++),Fn=$n[_n in r?Yr.charAt(Ce++):_n],!Fn||(on=Fn(Br,pn,on))<0)return-1}else if(_n!=pn.charCodeAt(on++))return-1}return on}function nr(Br,Yr,pn){var on=Ue.exec(Yr.slice(pn));return on?(Br.p=qe[on[0].toLowerCase()],pn+on[0].length):-1}function fr(Br,Yr,pn){var on=Ar.exec(Yr.slice(pn));return on?(Br.w=mr[on[0].toLowerCase()],pn+on[0].length):-1}function _r(Br,Yr,pn){var on=or.exec(Yr.slice(pn));return on?(Br.w=Sr[on[0].toLowerCase()],pn+on[0].length):-1}function tn(Br,Yr,pn){var on=Wn.exec(Yr.slice(pn));return on?(Br.m=Xn[on[0].toLowerCase()],pn+on[0].length):-1}function Cn(Br,Yr,pn){var on=Qr.exec(Yr.slice(pn));return on?(Br.m=Hn[on[0].toLowerCase()],pn+on[0].length):-1}function Tn(Br,Yr,pn){return We(Br,ne,Yr,pn)}function Mn(Br,Yr,pn){return We(Br,Ct,Yr,pn)}function fi(Br,Yr,pn){return We(Br,gt,Yr,pn)}function ki(Br){return re[Br.getDay()]}function Oi(Br){return Nt[Br.getDay()]}function ji(Br){return we[Br.getMonth()]}function Xi(Br){return le[Br.getMonth()]}function ci(Br){return St[+(Br.getHours()>=12)]}function za(Br){return 1+~~(Br.getMonth()/3)}function Wa(Br){return re[Br.getUTCDay()]}function ze(Br){return Nt[Br.getUTCDay()]}function Ie(Br){return we[Br.getUTCMonth()]}function Rr(Br){return le[Br.getUTCMonth()]}function $r(Br){return St[+(Br.getUTCHours()>=12)]}function Gr(Br){return 1+~~(Br.getUTCMonth()/3)}return{format:function(Br){var Yr=sa(Br+="",Ii);return Yr.toString=function(){return Br},Yr},parse:function(Br){var Yr=Zi(Br+="",!1);return Yr.toString=function(){return Br},Yr},utcFormat:function(Br){var Yr=sa(Br+="",oi);return Yr.toString=function(){return Br},Yr},utcParse:function(Br){var Yr=Zi(Br+="",!0);return Yr.toString=function(){return Br},Yr}}}var r={"-":"",_:" ",0:"0"},a=/^\s*\d+/,n=/^%/,o=/[\\^$*+?|[\]().{}]/g;function i(Gt,ne,Ct){var gt=Gt<0?"-":"",St=(gt?-Gt:Gt)+"",Nt=St.length;return gt+(Nt68?1900:2e3),Ct+gt[0].length):-1}function M(Gt,ne,Ct){var gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ne.slice(Ct,Ct+6));return gt?(Gt.Z=gt[1]?0:-(gt[2]+(gt[3]||"00")),Ct+gt[0].length):-1}function C(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+1));return gt?(Gt.q=gt[0]*3-3,Ct+gt[0].length):-1}function A(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.m=gt[0]-1,Ct+gt[0].length):-1}function h(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.d=+gt[0],Ct+gt[0].length):-1}function p(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.m=0,Gt.d=+gt[0],Ct+gt[0].length):-1}function k(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.H=+gt[0],Ct+gt[0].length):-1}function w(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.M=+gt[0],Ct+gt[0].length):-1}function R(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.S=+gt[0],Ct+gt[0].length):-1}function O(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.L=+gt[0],Ct+gt[0].length):-1}function j(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+6));return gt?(Gt.L=Math.floor(gt[0]/1e3),Ct+gt[0].length):-1}function V(Gt,ne,Ct){var gt=n.exec(ne.slice(Ct,Ct+1));return gt?Ct+gt[0].length:-1}function H(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.Q=+gt[0],Ct+gt[0].length):-1}function F(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.s=+gt[0],Ct+gt[0].length):-1}function U(Gt,ne){return i(Gt.getDate(),ne,2)}function W(Gt,ne){return i(Gt.getHours(),ne,2)}function q(Gt,ne){return i(Gt.getHours()%12||12,ne,2)}function J(Gt,ne){return i(1+g.timeDay.count(g.timeYear(Gt),Gt),ne,3)}function lt(Gt,ne){return i(Gt.getMilliseconds(),ne,3)}function yt(Gt,ne){return lt(Gt,ne)+"000"}function mt(Gt,ne){return i(Gt.getMonth()+1,ne,2)}function st(Gt,ne){return i(Gt.getMinutes(),ne,2)}function tt(Gt,ne){return i(Gt.getSeconds(),ne,2)}function dt(Gt){var ne=Gt.getDay();return ne===0?7:ne}function rt(Gt,ne){return i(g.timeSunday.count(g.timeYear(Gt)-1,Gt),ne,2)}function at(Gt,ne){var Ct=Gt.getDay();return Gt=Ct>=4||Ct===0?g.timeThursday(Gt):g.timeThursday.ceil(Gt),i(g.timeThursday.count(g.timeYear(Gt),Gt)+(g.timeYear(Gt).getDay()===4),ne,2)}function vt(Gt){return Gt.getDay()}function it(Gt,ne){return i(g.timeMonday.count(g.timeYear(Gt)-1,Gt),ne,2)}function Y(Gt,ne){return i(Gt.getFullYear()%100,ne,2)}function ft(Gt,ne){return i(Gt.getFullYear()%1e4,ne,4)}function ut(Gt){var ne=Gt.getTimezoneOffset();return(ne>0?"-":(ne*=-1,"+"))+i(ne/60|0,"0",2)+i(ne%60,"0",2)}function kt(Gt,ne){return i(Gt.getUTCDate(),ne,2)}function It(Gt,ne){return i(Gt.getUTCHours(),ne,2)}function Pt(Gt,ne){return i(Gt.getUTCHours()%12||12,ne,2)}function qt(Gt,ne){return i(1+g.utcDay.count(g.utcYear(Gt),Gt),ne,3)}function Wt(Gt,ne){return i(Gt.getUTCMilliseconds(),ne,3)}function Jt(Gt,ne){return Wt(Gt,ne)+"000"}function ge(Gt,ne){return i(Gt.getUTCMonth()+1,ne,2)}function fe(Gt,ne){return i(Gt.getUTCMinutes(),ne,2)}function pe(Gt,ne){return i(Gt.getUTCSeconds(),ne,2)}function se(Gt){var ne=Gt.getUTCDay();return ne===0?7:ne}function Tt(Gt,ne){return i(g.utcSunday.count(g.utcYear(Gt)-1,Gt),ne,2)}function Lt(Gt,ne){var Ct=Gt.getUTCDay();return Gt=Ct>=4||Ct===0?g.utcThursday(Gt):g.utcThursday.ceil(Gt),i(g.utcThursday.count(g.utcYear(Gt),Gt)+(g.utcYear(Gt).getUTCDay()===4),ne,2)}function Mt(Gt){return Gt.getUTCDay()}function ee(Gt,ne){return i(g.utcMonday.count(g.utcYear(Gt)-1,Gt),ne,2)}function ve(Gt,ne){return i(Gt.getUTCFullYear()%100,ne,2)}function oe(Gt,ne){return i(Gt.getUTCFullYear()%1e4,ne,4)}function Te(){return"+0000"}function He(){return"%"}function Ge(Gt){return+Gt}function cr(Gt){return Math.floor(+Gt/1e3)}var ur;jr({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 jr(Gt){return ur=e(Gt),c.timeFormat=ur.format,c.timeParse=ur.parse,c.utcFormat=ur.utcFormat,c.utcParse=ur.utcParse,ur}var Wr="%Y-%m-%dT%H:%M:%S.%LZ";function br(Gt){return Gt.toISOString()}var Xr=Date.prototype.toISOString?br:c.utcFormat(Wr);function nn(Gt){var ne=new Date(Gt);return isNaN(ne)?null:ne}var Le=+new Date("2000-01-01T00:00:00.000Z")?nn:c.utcParse(Wr);c.isoFormat=Xr,c.isoParse=Le,c.timeFormatDefaultLocale=jr,c.timeFormatLocale=e,Object.defineProperty(c,"__esModule",{value:!0})})}),Pi=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function I(A,h){if((p=(A=h?A.toExponential(h-1):A.toExponential()).indexOf("e"))<0)return null;var p,k=A.slice(0,p);return[k.length>1?k[0]+k.slice(2):k,+A.slice(p+1)]}function S(A){return A=I(Math.abs(A)),A?A[1]:NaN}function t(A,h){return function(p,k){for(var w=p.length,R=[],O=0,j=A[0],V=0;w>0&&j>0&&(V+j+1>k&&(j=Math.max(1,k-V)),R.push(p.substring(w-=j,w+j)),!((V+=j+1)>k));)j=A[O=(O+1)%A.length];return R.reverse().join(h)}}function e(A){return function(h){return h.replace(/[0-9]/g,function(p){return A[+p]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(h=r.exec(A)))throw new Error("invalid format: "+A);var h;return new n({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}a.prototype=n.prototype;function n(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}n.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 o(A){t:for(var h=A.length,p=1,k=-1,w;p0&&(k=0);break}return k>0?A.slice(0,k)+A.slice(w+1):A}var i;function l(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1],R=w-(i=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,O=k.length;return R===O?k:R>O?k+new Array(R-O+1).join("0"):R>0?k.slice(0,R)+"."+k.slice(R):"0."+new Array(1-R).join("0")+I(A,Math.max(0,h+R-1))[0]}function f(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1];return w<0?"0."+new Array(-w).join("0")+k:k.length>w+1?k.slice(0,w+1)+"."+k.slice(w+1):k+new Array(w-k.length+2).join("0")}var x={"%":function(A,h){return(A*100).toFixed(h)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:g,e:function(A,h){return A.toExponential(h)},f:function(A,h){return A.toFixed(h)},g:function(A,h){return A.toPrecision(h)},o:function(A){return Math.round(A).toString(8)},p:function(A,h){return f(A*100,h)},r:f,s:l,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var v=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u(A){var h=A.grouping===void 0||A.thousands===void 0?y:t(v.call(A.grouping,Number),A.thousands+""),p=A.currency===void 0?"":A.currency[0]+"",k=A.currency===void 0?"":A.currency[1]+"",w=A.decimal===void 0?".":A.decimal+"",R=A.numerals===void 0?y:e(v.call(A.numerals,String)),O=A.percent===void 0?"%":A.percent+"",j=A.minus===void 0?"-":A.minus+"",V=A.nan===void 0?"NaN":A.nan+"";function H(U){U=a(U);var W=U.fill,q=U.align,J=U.sign,lt=U.symbol,yt=U.zero,mt=U.width,st=U.comma,tt=U.precision,dt=U.trim,rt=U.type;rt==="n"?(st=!0,rt="g"):x[rt]||(tt===void 0&&(tt=12),dt=!0,rt="g"),(yt||W==="0"&&q==="=")&&(yt=!0,W="0",q="=");var at=lt==="$"?p:lt==="#"&&/[boxX]/.test(rt)?"0"+rt.toLowerCase():"",vt=lt==="$"?k:/[%p]/.test(rt)?O:"",it=x[rt],Y=/[defgprs%]/.test(rt);tt=tt===void 0?6:/[gprs]/.test(rt)?Math.max(1,Math.min(21,tt)):Math.max(0,Math.min(20,tt));function ft(ut){var kt=at,It=vt,Pt,qt,Wt;if(rt==="c")It=it(ut)+It,ut="";else{ut=+ut;var Jt=ut<0||1/ut<0;if(ut=isNaN(ut)?V:it(Math.abs(ut),tt),dt&&(ut=o(ut)),Jt&&+ut==0&&J!=="+"&&(Jt=!1),kt=(Jt?J==="("?J:j:J==="-"||J==="("?"":J)+kt,It=(rt==="s"?T[8+i/3]:"")+It+(Jt&&J==="("?")":""),Y){for(Pt=-1,qt=ut.length;++PtWt||Wt>57){It=(Wt===46?w+ut.slice(Pt+1):ut.slice(Pt))+It,ut=ut.slice(0,Pt);break}}}st&&!yt&&(ut=h(ut,1/0));var ge=kt.length+ut.length+It.length,fe=ge>1)+kt+ut+It+fe.slice(ge);break;default:ut=fe+kt+ut+It;break}return R(ut)}return ft.toString=function(){return U+""},ft}function F(U,W){var q=H((U=a(U),U.type="f",U)),J=Math.max(-8,Math.min(8,Math.floor(S(W)/3)))*3,lt=Math.pow(10,-J),yt=T[8+J/3];return function(mt){return q(lt*mt)+yt}}return{format:H,formatPrefix:F}}var b;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return b=u(A),c.format=b.format,c.formatPrefix=b.formatPrefix,b}function P(A){return Math.max(0,-S(Math.abs(A)))}function M(A,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(h)/3)))*3-S(Math.abs(A)))}function C(A,h){return A=Math.abs(A),h=Math.abs(h)-A,Math.max(0,S(h)-S(A))+1}c.FormatSpecifier=n,c.formatDefaultLocale=_,c.formatLocale=u,c.formatSpecifier=a,c.precisionFixed=P,c.precisionPrefix=M,c.precisionRound=C,Object.defineProperty(c,"__esModule",{value:!0})})}),bi=Dt((Q,Z)=>{Z.exports=function(c){for(var g=c.length,I,S=0;S13)&&I!==32&&I!==133&&I!==160&&I!==5760&&I!==6158&&(I<8192||I>8205)&&I!==8232&&I!==8233&&I!==8239&&I!==8287&&I!==8288&&I!==12288&&I!==65279)return!1;return!0}}),Yi=Dt((Q,Z)=>{var c=bi();Z.exports=function(g){var I=typeof g;if(I==="string"){var S=g;if(g=+g,g===0&&c(S))return!1}else if(I!=="number")return!1;return g-g<1}}),Ca=Dt((Q,Z)=>{Z.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:"−"}}),Ni=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c["base64-arraybuffer"]={}))})(Q,function(c){for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=g[(a[n]&3)<<4|a[n+1]>>4],i+=g[(a[n+1]&15)<<2|a[n+2]>>6],i+=g[a[n+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(r){var a=r.length*.75,n=r.length,o,i=0,l,f,x,y;r[r.length-1]==="="&&(a--,r[r.length-2]==="="&&a--);var v=new ArrayBuffer(a),T=new Uint8Array(v);for(o=0;o>4,T[i++]=(f&15)<<4|x>>2,T[i++]=(x&3)<<6|y&63;return v};c.decode=e,c.encode=t,Object.defineProperty(c,"__esModule",{value:!0})})}),si=Dt((Q,Z)=>{Z.exports=function(c){return window&&window.process&&window.process.versions?Object.prototype.toString.call(c)==="[object Object]":Object.prototype.toString.call(c)==="[object Object]"&&Object.getPrototypeOf(c).hasOwnProperty("hasOwnProperty")}}),Ma=Dt(Q=>{var Z=Ni().decode,c=si(),g=Array.isArray,I=ArrayBuffer,S=DataView;function t(l){return I.isView(l)&&!(l instanceof S)}Q.isTypedArray=t;function e(l){return g(l)||t(l)}Q.isArrayOrTypedArray=e;function r(l){return!e(l[0])}Q.isArray1D=r,Q.ensureArray=function(l,f){return g(l)||(l=[]),l.length=f,l};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function n(l){return l.constructor===ArrayBuffer}Q.isArrayBuffer=n,Q.decodeTypedArraySpec=function(l){var f=[],x=o(l),y=x.dtype,v=a[y];if(!v)throw new Error('Error in dtype: "'+y+'"');var T=v.BYTES_PER_ELEMENT,u=x.bdata;n(u)||(u=Z(u));var b=x.shape===void 0?[u.byteLength/T]:(""+x.shape).split(",");b.reverse();var _=b.length,P,M,C=+b[0],A=T*C,h=0;if(_===1)f=new v(u);else if(_===2)for(P=+b[1],M=0;M{var c=Yi(),g=Ma().isArrayOrTypedArray;Z.exports=function(i,l){if(c(l))l=String(l);else if(typeof l!="string"||l.substr(l.length-4)==="[-1]")throw"bad property string";var f=l.split("."),x,y,v,T;for(T=0;T{var c=zo(),g=/^\w*$/,I=0,S=1,t=2,e=3,r=4;Z.exports=function(a,n,o,i){o=o||"name",i=i||"value";var l,f,x,y={};n&&n.length?(x=c(a,n),f=x.get()):f=a,n=n||"";var v={};if(f)for(l=0;l2)return y[_]=y[_]|t,u.set(b,null);if(T){for(l=_;l{var c=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;Z.exports=function(I,S){for(;S;){var t=I.match(c);if(t)I=t[1];else if(I.match(g))I="";else throw new Error("bad relativeAttr call:"+[I,S]);if(S.charAt(0)==="^")S=S.slice(1);else break}return I&&S.charAt(0)!=="["?I+"."+S:I+S}}),Ts=Dt((Q,Z)=>{var c=Yi();Z.exports=function(g,I){if(g>0)return Math.log(g)/Math.LN10;var S=Math.log(Math.min(I[0],I[1]))/Math.LN10;return c(S)||(S=Math.log(Math.max(I[0],I[1]))/Math.LN10-6),S}}),xl=Dt((Q,Z)=>{var c=Ma().isArrayOrTypedArray,g=si();Z.exports=function I(S,t){for(var e in t){var r=t[e],a=S[e];if(a!==r)if(e.charAt(0)==="_"||typeof r=="function"){if(e in S)continue;S[e]=r}else if(c(r)&&c(a)&&g(r[0])){if(e==="customdata"||e==="ids")continue;for(var n=Math.min(r.length,a.length),o=0;o{function c(I,S){var t=I%S;return t<0?t+S:t}function g(I,S){return Math.abs(I)>S/2?I-Math.round(I/S)*S:I}Z.exports={mod:c,modHalf:g}}),ro=Dt((Q,Z)=>{(function(c){var g=/^\s+/,I=/\s+$/,S=0,t=c.round,e=c.min,r=c.max,a=c.random;function n(Y,ft){if(Y=Y||"",ft=ft||{},Y instanceof n)return Y;if(!(this instanceof n))return new n(Y,ft);var ut=o(Y);this._originalInput=Y,this._r=ut.r,this._g=ut.g,this._b=ut.b,this._a=ut.a,this._roundA=t(100*this._a)/100,this._format=ft.format||ut.format,this._gradientType=ft.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ut.ok,this._tc_id=S++}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ft,ut,kt,It,Pt,qt;return ft=Y.r/255,ut=Y.g/255,kt=Y.b/255,ft<=.03928?It=ft/12.92:It=c.pow((ft+.055)/1.055,2.4),ut<=.03928?Pt=ut/12.92:Pt=c.pow((ut+.055)/1.055,2.4),kt<=.03928?qt=kt/12.92:qt=c.pow((kt+.055)/1.055,2.4),.2126*It+.7152*Pt+.0722*qt},setAlpha:function(Y){return this._a=U(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=x(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=x(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),kt=t(Y.v*100);return this._a==1?"hsv("+ft+", "+ut+"%, "+kt+"%)":"hsva("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHsl:function(){var Y=l(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=l(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),kt=t(Y.l*100);return this._a==1?"hsl("+ft+", "+ut+"%, "+kt+"%)":"hsla("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHex:function(Y){return v(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return T(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(W(this._r,255)*100)+"%",g:t(W(this._g,255)*100)+"%",b:t(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%)":"rgba("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ft="#"+u(this._r,this._g,this._b,this._a),ut=ft,kt=this._gradientType?"GradientType = 1, ":"";if(Y){var It=n(Y);ut="#"+u(It._r,It._g,It._b,It._a)}return"progid:DXImageTransform.Microsoft.gradient("+kt+"startColorstr="+ft+",endColorstr="+ut+")"},toString:function(Y){var ft=!!Y;Y=Y||this._format;var ut=!1,kt=this._a<1&&this._a>=0,It=!ft&&kt&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return It?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ut=this.toRgbString()),Y==="prgb"&&(ut=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ut=this.toHexString()),Y==="hex3"&&(ut=this.toHexString(!0)),Y==="hex4"&&(ut=this.toHex8String(!0)),Y==="hex8"&&(ut=this.toHex8String()),Y==="name"&&(ut=this.toName()),Y==="hsl"&&(ut=this.toHslString()),Y==="hsv"&&(ut=this.toHsvString()),ut||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(Y,ft){var ut=Y.apply(null,[this].concat([].slice.call(ft)));return this._r=ut._r,this._g=ut._g,this._b=ut._b,this.setAlpha(ut._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(P,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(Y,ft){return Y.apply(null,[this].concat([].slice.call(ft)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(Y,ft){if(typeof Y=="object"){var ut={};for(var kt in Y)Y.hasOwnProperty(kt)&&(kt==="a"?ut[kt]=Y[kt]:ut[kt]=st(Y[kt]));Y=ut}return n(Y,ft)};function o(Y){var ft={r:0,g:0,b:0},ut=1,kt=null,It=null,Pt=null,qt=!1,Wt=!1;return typeof Y=="string"&&(Y=vt(Y)),typeof Y=="object"&&(at(Y.r)&&at(Y.g)&&at(Y.b)?(ft=i(Y.r,Y.g,Y.b),qt=!0,Wt=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):at(Y.h)&&at(Y.s)&&at(Y.v)?(kt=st(Y.s),It=st(Y.v),ft=y(Y.h,kt,It),qt=!0,Wt="hsv"):at(Y.h)&&at(Y.s)&&at(Y.l)&&(kt=st(Y.s),Pt=st(Y.l),ft=f(Y.h,kt,Pt),qt=!0,Wt="hsl"),Y.hasOwnProperty("a")&&(ut=Y.a)),ut=U(ut),{ok:qt,format:Y.format||Wt,r:e(255,r(ft.r,0)),g:e(255,r(ft.g,0)),b:e(255,r(ft.b,0)),a:ut}}function i(Y,ft,ut){return{r:W(Y,255)*255,g:W(ft,255)*255,b:W(ut,255)*255}}function l(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var kt=r(Y,ft,ut),It=e(Y,ft,ut),Pt,qt,Wt=(kt+It)/2;if(kt==It)Pt=qt=0;else{var Jt=kt-It;switch(qt=Wt>.5?Jt/(2-kt-It):Jt/(kt+It),kt){case Y:Pt=(ft-ut)/Jt+(ft1&&(pe-=1),pe<1/6?ge+(fe-ge)*6*pe:pe<1/2?fe:pe<2/3?ge+(fe-ge)*(2/3-pe)*6:ge}if(ft===0)kt=It=Pt=ut;else{var Wt=ut<.5?ut*(1+ft):ut+ft-ut*ft,Jt=2*ut-Wt;kt=qt(Jt,Wt,Y+1/3),It=qt(Jt,Wt,Y),Pt=qt(Jt,Wt,Y-1/3)}return{r:kt*255,g:It*255,b:Pt*255}}function x(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var kt=r(Y,ft,ut),It=e(Y,ft,ut),Pt,qt,Wt=kt,Jt=kt-It;if(qt=kt===0?0:Jt/kt,kt==It)Pt=0;else{switch(kt){case Y:Pt=(ft-ut)/Jt+(ft>1)+720)%360;--ft;)kt.h=(kt.h+It)%360,Pt.push(n(kt));return Pt}function j(Y,ft){ft=ft||6;for(var ut=n(Y).toHsv(),kt=ut.h,It=ut.s,Pt=ut.v,qt=[],Wt=1/ft;ft--;)qt.push(n({h:kt,s:It,v:Pt})),Pt=(Pt+Wt)%1;return qt}n.mix=function(Y,ft,ut){ut=ut===0?0:ut||50;var kt=n(Y).toRgb(),It=n(ft).toRgb(),Pt=ut/100,qt={r:(It.r-kt.r)*Pt+kt.r,g:(It.g-kt.g)*Pt+kt.g,b:(It.b-kt.b)*Pt+kt.b,a:(It.a-kt.a)*Pt+kt.a};return n(qt)},n.readability=function(Y,ft){var ut=n(Y),kt=n(ft);return(c.max(ut.getLuminance(),kt.getLuminance())+.05)/(c.min(ut.getLuminance(),kt.getLuminance())+.05)},n.isReadable=function(Y,ft,ut){var kt=n.readability(Y,ft),It,Pt;switch(Pt=!1,It=it(ut),It.level+It.size){case"AAsmall":case"AAAlarge":Pt=kt>=4.5;break;case"AAlarge":Pt=kt>=3;break;case"AAAsmall":Pt=kt>=7;break}return Pt},n.mostReadable=function(Y,ft,ut){var kt=null,It=0,Pt,qt,Wt,Jt;ut=ut||{},qt=ut.includeFallbackColors,Wt=ut.level,Jt=ut.size;for(var ge=0;geIt&&(It=Pt,kt=n(ft[ge]));return n.isReadable(Y,kt,{level:Wt,size:Jt})||!qt?kt:(ut.includeFallbackColors=!1,n.mostReadable(Y,["#fff","#000"],ut))};var V=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=n.hexNames=F(V);function F(Y){var ft={};for(var ut in Y)Y.hasOwnProperty(ut)&&(ft[Y[ut]]=ut);return ft}function U(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function W(Y,ft){lt(Y)&&(Y="100%");var ut=yt(Y);return Y=e(ft,r(0,parseFloat(Y))),ut&&(Y=parseInt(Y*ft,10)/100),c.abs(Y-ft)<1e-6?1:Y%ft/parseFloat(ft)}function q(Y){return e(1,r(0,Y))}function J(Y){return parseInt(Y,16)}function lt(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function yt(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function mt(Y){return Y.length==1?"0"+Y:""+Y}function st(Y){return Y<=1&&(Y=Y*100+"%"),Y}function tt(Y){return c.round(parseFloat(Y)*255).toString(16)}function dt(Y){return J(Y)/255}var rt=function(){var Y="[-\\+]?\\d+%?",ft="[-\\+]?\\d*\\.\\d+%?",ut="(?:"+ft+")|(?:"+Y+")",kt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?",It="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?";return{CSS_UNIT:new RegExp(ut),rgb:new RegExp("rgb"+kt),rgba:new RegExp("rgba"+It),hsl:new RegExp("hsl"+kt),hsla:new RegExp("hsla"+It),hsv:new RegExp("hsv"+kt),hsva:new RegExp("hsva"+It),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function at(Y){return!!rt.CSS_UNIT.exec(Y)}function vt(Y){Y=Y.replace(g,"").replace(I,"").toLowerCase();var ft=!1;if(V[Y])Y=V[Y],ft=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ut;return(ut=rt.rgb.exec(Y))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=rt.rgba.exec(Y))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=rt.hsl.exec(Y))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=rt.hsla.exec(Y))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=rt.hsv.exec(Y))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=rt.hsva.exec(Y))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=rt.hex8.exec(Y))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),a:dt(ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex6.exec(Y))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),format:ft?"name":"hex"}:(ut=rt.hex4.exec(Y))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),a:dt(ut[4]+""+ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex3.exec(Y))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),format:ft?"name":"hex"}:!1}function it(Y){var ft,ut;return Y=Y||{level:"AA",size:"small"},ft=(Y.level||"AA").toUpperCase(),ut=(Y.size||"small").toLowerCase(),ft!=="AA"&&ft!=="AAA"&&(ft="AA"),ut!=="small"&&ut!=="large"&&(ut="small"),{level:ft,size:ut}}typeof Z<"u"&&Z.exports?Z.exports=n:window.tinycolor=n})(Math)}),Ia=Dt(Q=>{var Z=si(),c=Array.isArray;function g(S,t){var e,r;for(e=0;e{Z.exports=function(c){var g=c.variantValues,I=c.editType,S=c.colorEditType;S===void 0&&(S=I);var t={editType:I,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};c.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var e={family:{valType:"string",noBlank:!0,strict:!0,editType:I},size:{valType:"number",min:1,editType:I},color:{valType:"color",editType:S},weight:t,style:{editType:I,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:c.noFontVariant?void 0:{editType:I,valType:"enumerated",values:g||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:c.noFontTextcase?void 0:{editType:I,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:c.noFontLineposition?void 0:{editType:I,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:c.noFontShadow?void 0:{editType:I,valType:"string",dflt:c.autoShadowDflt?"auto":"none"},editType:I};return c.autoSize&&(e.size.dflt="auto"),c.autoColor&&(e.color.dflt="auto"),c.arrayOk&&(e.family.arrayOk=!0,e.weight.arrayOk=!0,e.style.arrayOk=!0,c.noFontVariant||(e.variant.arrayOk=!0),c.noFontTextcase||(e.textcase.arrayOk=!0),c.noFontLineposition||(e.lineposition.arrayOk=!0),c.noFontShadow||(e.shadow.arrayOk=!0),e.size.arrayOk=!0,e.color.arrayOk=!0),e}}),no=Dt((Q,Z)=>{Z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),po=Dt((Q,Z)=>{var c=no(),g=da(),I=g({editType:"none"});I.family.dflt=c.HOVERFONT,I.size.dflt=c.HOVERFONTSIZE,Z.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:I,grouptitlefont:g({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"}}}),us=Dt((Q,Z)=>{var c=da(),g=po().hoverlabel,I=Ia().extendFlat;Z.exports={hoverlabel:{bgcolor:I({},g.bgcolor,{arrayOk:!0}),bordercolor:I({},g.bordercolor,{arrayOk:!0}),font:c({arrayOk:!0,editType:"none"}),align:I({},g.align,{arrayOk:!0}),namelength:I({},g.namelength,{arrayOk:!0}),showarrow:I({},g.showarrow),editType:"none"}}}),Ho=Dt((Q,Z)=>{var c=da(),g=us();Z.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:c({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:g.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),vi=Dt((Q,Z)=>{var c=ro(),g={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)"]]},I=g.RdBu;function S(r,a){if(a||(a=I),!r)return a;function n(){try{r=g[r]||JSON.parse(r)}catch{r=a}}return typeof r=="string"&&(n(),typeof r=="string"&&n()),t(r)?r:a}function t(r){var a=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var n=0;n{Q.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Q.defaultLine="#444",Q.lightLine="#eee",Q.background="#fff",Q.borderLine="#BEC8D9",Q.lightFraction=1e3/11}),hi=Dt((Q,Z)=>{var c=ro(),g=Yi(),I=Ma().isTypedArray,S=Z.exports={},t=wi();S.defaults=t.defaults;var e=S.defaultLine=t.defaultLine;S.lightLine=t.lightLine;var r=S.background=t.background;S.tinyRGB=function(n){var o=n.toRgb();return"rgb("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+")"},S.rgb=function(n){return S.tinyRGB(c(n))},S.opacity=function(n){return n?c(n).getAlpha():0},S.addOpacity=function(n,o){var i=c(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+o+")"},S.combine=function(n,o){var i=c(n).toRgb();if(i.a===1)return c(n).toRgbString();var l=c(o||r).toRgb(),f=l.a===1?l:{r:255*(1-l.a)+l.r*l.a,g:255*(1-l.a)+l.g*l.a,b:255*(1-l.a)+l.b*l.a},x={r:f.r*(1-i.a)+i.r*i.a,g:f.g*(1-i.a)+i.g*i.a,b:f.b*(1-i.a)+i.b*i.a};return c(x).toRgbString()},S.interpolate=function(n,o,i){var l=c(n).toRgb(),f=c(o).toRgb(),x={r:i*l.r+(1-i)*f.r,g:i*l.g+(1-i)*f.g,b:i*l.b+(1-i)*f.b};return c(x).toRgbString()},S.contrast=function(n,o,i){var l=c(n);l.getAlpha()!==1&&(l=c(S.combine(n,r)));var f=l.isDark()?o?l.lighten(o):r:i?l.darken(i):e;return f.toString()},S.stroke=function(n,o){var i=c(o);n.style({stroke:S.tinyRGB(i),"stroke-opacity":i.getAlpha()})},S.fill=function(n,o){var i=c(o);n.style({fill:S.tinyRGB(i),"fill-opacity":i.getAlpha()})},S.clean=function(n){if(!(!n||typeof n!="object")){var o=Object.keys(n),i,l,f,x;for(i=0;i=0)))return n;if(x===3)l[x]>1&&(l[x]=1);else if(l[x]>=1)return n}var y=Math.round(l[0]*255)+", "+Math.round(l[1]*255)+", "+Math.round(l[2]*255);return f?"rgba("+y+", "+l[3]+")":"rgb("+y+")"}}),go=Dt((Q,Z)=>{Z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),Mo=Dt(Q=>{Q.counter=function(Z,c,g,I){var S=(c||"")+(g?"":"$"),t=I===!1?"":"^";return Z==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+S):new RegExp(t+Z+"([2-9]|[1-9][0-9]+)?"+S)}}),To=Dt(Q=>{var Z=Yi(),c=ro(),g=Ia().extendFlat,I=Ho(),S=vi(),t=hi(),e=go().DESELECTDIM,r=zo(),a=Mo().counter,n=ko().modHalf,o=Ma().isArrayOrTypedArray,i=Ma().isTypedArraySpec,l=Ma().decodeTypedArraySpec;Q.valObjectMeta={data_array:{coerceFunction:function(x,y,v){y.set(o(x)?x:i(x)?l(x):v)}},enumerated:{coerceFunction:function(x,y,v,T){T.coerceNumber&&(x=+x),T.values.indexOf(x)===-1?y.set(v):y.set(x)},validateFunction:function(x,y){y.coerceNumber&&(x=+x);for(var v=y.values,T=0;TT.max?y.set(v):y.set(+x)}},integer:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}i(x)&&(x=l(x)),x%1||!Z(x)||T.min!==void 0&&xT.max?y.set(v):y.set(+x)}},string:{coerceFunction:function(x,y,v,T){if(typeof x!="string"){var u=typeof x=="number";T.strict===!0||!u?y.set(v):y.set(String(x))}else T.noBlank&&!x?y.set(v):y.set(x)}},color:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),c(x).isValid()?y.set(x):y.set(v)}},colorlist:{coerceFunction:function(x,y,v){function T(u){return c(u).isValid()}!Array.isArray(x)||!x.length?y.set(v):x.every(T)?y.set(x):y.set(v)}},colorscale:{coerceFunction:function(x,y,v){y.set(S.get(x,v))}},angle:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),x==="auto"?y.set("auto"):Z(x)?y.set(n(+x,360)):y.set(v)}},subplotid:{coerceFunction:function(x,y,v,T){var u=T.regex||a(v);if(typeof x=="string"&&u.test(x)){y.set(x);return}y.set(v)},validateFunction:function(x,y){var v=y.dflt;return x===v?!0:typeof x!="string"?!1:!!a(v).test(x)}},flaglist:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}if(typeof x!="string"){y.set(v);return}for(var u=x.split("+"),b=0;b{var c={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},g={};function I(S,t){for(var e in S){var r=S[e];r.valType?t[e]=r.dflt:(t[e]||(t[e]={}),I(r,t[e]))}}I(c,g),Z.exports={configAttributes:c,dfltConfig:g}}),bs=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=[];Z.exports=function(S,t){if(I.indexOf(S)!==-1)return;I.push(S);var e=1e3;g(t)?e=t:t==="long"&&(e=3e3);var r=c.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(I);function n(o){o.duration(700).style("opacity",0).each("end",function(i){var l=I.indexOf(i);l!==-1&&I.splice(l,1),c.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var i=c.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(n)});for(var l=i.append("p"),f=o.split(//g),x=0;x{var c=ms().dfltConfig,g=bs(),I=Z.exports={};I.log=function(){var S;if(c.logging>1){var t=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},I.warn=function(){var S;if(c.logging>0){var t=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},I.error=function(){var S;if(c.logging>0){var t=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}),Yo=Dt((Q,Z)=>{Z.exports=function(){}}),Ol=Dt((Q,Z)=>{Z.exports=function(c,g){if(g instanceof RegExp){for(var I=g.toString(),S=0;S{Z.exports=c;function c(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Bl=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=new Float32Array(16);return I[0]=g[0],I[1]=g[1],I[2]=g[2],I[3]=g[3],I[4]=g[4],I[5]=g[5],I[6]=g[6],I[7]=g[7],I[8]=g[8],I[9]=g[9],I[10]=g[10],I[11]=g[11],I[12]=g[12],I[13]=g[13],I[14]=g[14],I[15]=g[15],I}}),vu=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),tc=Dt((Q,Z)=>{Z.exports=c;function c(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),fh=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(g===I){var S=I[1],t=I[2],e=I[3],r=I[6],a=I[7],n=I[11];g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=S,g[6]=I[9],g[7]=I[13],g[8]=t,g[9]=r,g[11]=I[14],g[12]=e,g[13]=a,g[14]=n}else g[0]=I[0],g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=I[1],g[5]=I[5],g[6]=I[9],g[7]=I[13],g[8]=I[2],g[9]=I[6],g[10]=I[10],g[11]=I[14],g[12]=I[3],g[13]=I[7],g[14]=I[11],g[15]=I[15];return g}}),Fc=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15],_=S*n-t*a,P=S*o-e*a,M=S*i-r*a,C=t*o-e*n,A=t*i-r*n,h=e*i-r*o,p=l*T-f*v,k=l*u-x*v,w=l*b-y*v,R=f*u-x*T,O=f*b-y*T,j=x*b-y*u,V=_*j-P*O+M*R+C*w-A*k+h*p;return V?(V=1/V,g[0]=(n*j-o*O+i*R)*V,g[1]=(e*O-t*j-r*R)*V,g[2]=(T*h-u*A+b*C)*V,g[3]=(x*A-f*h-y*C)*V,g[4]=(o*w-a*j-i*k)*V,g[5]=(S*j-e*w+r*k)*V,g[6]=(u*M-v*h-b*P)*V,g[7]=(l*h-x*M+y*P)*V,g[8]=(a*O-n*w+i*p)*V,g[9]=(t*w-S*O-r*p)*V,g[10]=(v*A-T*M+b*_)*V,g[11]=(f*M-l*A-y*_)*V,g[12]=(n*k-a*R-o*p)*V,g[13]=(S*R-t*k+e*p)*V,g[14]=(T*P-v*C-u*_)*V,g[15]=(l*C-f*P+x*_)*V,g):null}}),op=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15];return g[0]=n*(x*b-y*u)-f*(o*b-i*u)+T*(o*y-i*x),g[1]=-(t*(x*b-y*u)-f*(e*b-r*u)+T*(e*y-r*x)),g[2]=t*(o*b-i*u)-n*(e*b-r*u)+T*(e*i-r*o),g[3]=-(t*(o*y-i*x)-n*(e*y-r*x)+f*(e*i-r*o)),g[4]=-(a*(x*b-y*u)-l*(o*b-i*u)+v*(o*y-i*x)),g[5]=S*(x*b-y*u)-l*(e*b-r*u)+v*(e*y-r*x),g[6]=-(S*(o*b-i*u)-a*(e*b-r*u)+v*(e*i-r*o)),g[7]=S*(o*y-i*x)-a*(e*y-r*x)+l*(e*i-r*o),g[8]=a*(f*b-y*T)-l*(n*b-i*T)+v*(n*y-i*f),g[9]=-(S*(f*b-y*T)-l*(t*b-r*T)+v*(t*y-r*f)),g[10]=S*(n*b-i*T)-a*(t*b-r*T)+v*(t*i-r*n),g[11]=-(S*(n*y-i*f)-a*(t*y-r*f)+l*(t*i-r*n)),g[12]=-(a*(f*u-x*T)-l*(n*u-o*T)+v*(n*x-o*f)),g[13]=S*(f*u-x*T)-l*(t*u-e*T)+v*(t*x-e*f),g[14]=-(S*(n*u-o*T)-a*(t*u-e*T)+v*(t*o-e*n)),g[15]=S*(n*x-o*f)-a*(t*x-e*f)+l*(t*o-e*n),g}}),Kd=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=g[0],S=g[1],t=g[2],e=g[3],r=g[4],a=g[5],n=g[6],o=g[7],i=g[8],l=g[9],f=g[10],x=g[11],y=g[12],v=g[13],T=g[14],u=g[15],b=I*a-S*r,_=I*n-t*r,P=I*o-e*r,M=S*n-t*a,C=S*o-e*a,A=t*o-e*n,h=i*v-l*y,p=i*T-f*y,k=i*u-x*y,w=l*T-f*v,R=l*u-x*v,O=f*u-x*T;return b*O-_*R+P*w+M*k-C*p+A*h}}),e0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=I[4],o=I[5],i=I[6],l=I[7],f=I[8],x=I[9],y=I[10],v=I[11],T=I[12],u=I[13],b=I[14],_=I[15],P=S[0],M=S[1],C=S[2],A=S[3];return g[0]=P*t+M*n+C*f+A*T,g[1]=P*e+M*o+C*x+A*u,g[2]=P*r+M*i+C*y+A*b,g[3]=P*a+M*l+C*v+A*_,P=S[4],M=S[5],C=S[6],A=S[7],g[4]=P*t+M*n+C*f+A*T,g[5]=P*e+M*o+C*x+A*u,g[6]=P*r+M*i+C*y+A*b,g[7]=P*a+M*l+C*v+A*_,P=S[8],M=S[9],C=S[10],A=S[11],g[8]=P*t+M*n+C*f+A*T,g[9]=P*e+M*o+C*x+A*u,g[10]=P*r+M*i+C*y+A*b,g[11]=P*a+M*l+C*v+A*_,P=S[12],M=S[13],C=S[14],A=S[15],g[12]=P*t+M*n+C*f+A*T,g[13]=P*e+M*o+C*x+A*u,g[14]=P*r+M*i+C*y+A*b,g[15]=P*a+M*l+C*v+A*_,g}}),d0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2],a,n,o,i,l,f,x,y,v,T,u,b;return I===g?(g[12]=I[0]*t+I[4]*e+I[8]*r+I[12],g[13]=I[1]*t+I[5]*e+I[9]*r+I[13],g[14]=I[2]*t+I[6]*e+I[10]*r+I[14],g[15]=I[3]*t+I[7]*e+I[11]*r+I[15]):(a=I[0],n=I[1],o=I[2],i=I[3],l=I[4],f=I[5],x=I[6],y=I[7],v=I[8],T=I[9],u=I[10],b=I[11],g[0]=a,g[1]=n,g[2]=o,g[3]=i,g[4]=l,g[5]=f,g[6]=x,g[7]=y,g[8]=v,g[9]=T,g[10]=u,g[11]=b,g[12]=a*t+l*e+v*r+I[12],g[13]=n*t+f*e+T*r+I[13],g[14]=o*t+x*e+u*r+I[14],g[15]=i*t+y*e+b*r+I[15]),g}}),Dm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2];return g[0]=I[0]*t,g[1]=I[1]*t,g[2]=I[2]*t,g[3]=I[3]*t,g[4]=I[4]*e,g[5]=I[5]*e,g[6]=I[6]*e,g[7]=I[7]*e,g[8]=I[8]*r,g[9]=I[9]*r,g[10]=I[10]*r,g[11]=I[11]*r,g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),uv=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=t[0],r=t[1],a=t[2],n=Math.sqrt(e*e+r*r+a*a),o,i,l,f,x,y,v,T,u,b,_,P,M,C,A,h,p,k,w,R,O,j,V,H;return Math.abs(n)<1e-6?null:(n=1/n,e*=n,r*=n,a*=n,o=Math.sin(S),i=Math.cos(S),l=1-i,f=I[0],x=I[1],y=I[2],v=I[3],T=I[4],u=I[5],b=I[6],_=I[7],P=I[8],M=I[9],C=I[10],A=I[11],h=e*e*l+i,p=r*e*l+a*o,k=a*e*l-r*o,w=e*r*l-a*o,R=r*r*l+i,O=a*r*l+e*o,j=e*a*l+r*o,V=r*a*l-e*o,H=a*a*l+i,g[0]=f*h+T*p+P*k,g[1]=x*h+u*p+M*k,g[2]=y*h+b*p+C*k,g[3]=v*h+_*p+A*k,g[4]=f*w+T*R+P*O,g[5]=x*w+u*R+M*O,g[6]=y*w+b*R+C*O,g[7]=v*w+_*R+A*O,g[8]=f*j+T*V+P*H,g[9]=x*j+u*V+M*H,g[10]=y*j+b*V+C*H,g[11]=v*j+_*V+A*H,I!==g&&(g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g)}}),sp=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[4],a=I[5],n=I[6],o=I[7],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[4]=r*e+i*t,g[5]=a*e+l*t,g[6]=n*e+f*t,g[7]=o*e+x*t,g[8]=i*e-r*t,g[9]=l*e-a*t,g[10]=f*e-n*t,g[11]=x*e-o*t,g}}),p0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e-i*t,g[1]=a*e-l*t,g[2]=n*e-f*t,g[3]=o*e-x*t,g[8]=r*t+i*e,g[9]=a*t+l*e,g[10]=n*t+f*e,g[11]=o*t+x*e,g}}),Fm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[4],l=I[5],f=I[6],x=I[7];return I!==g&&(g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e+i*t,g[1]=a*e+l*t,g[2]=n*e+f*t,g[3]=o*e+x*t,g[4]=i*e-r*t,g[5]=l*e-a*t,g[6]=f*e-n*t,g[7]=x*e-o*t,g}}),Fy=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t,e,r,a=S[0],n=S[1],o=S[2],i=Math.sqrt(a*a+n*n+o*o);return Math.abs(i)<1e-6?null:(i=1/i,a*=i,n*=i,o*=i,t=Math.sin(I),e=Math.cos(I),r=1-e,g[0]=a*a*r+e,g[1]=n*a*r+o*t,g[2]=o*a*r-n*t,g[3]=0,g[4]=a*n*r-o*t,g[5]=n*n*r+e,g[6]=o*n*r+a*t,g[7]=0,g[8]=a*o*r+n*t,g[9]=n*o*r-a*t,g[10]=o*o*r+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}}),n6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=t+t,o=e+e,i=r+r,l=t*n,f=t*o,x=t*i,y=e*o,v=e*i,T=r*i,u=a*n,b=a*o,_=a*i;return g[0]=1-(y+T),g[1]=f+_,g[2]=x-b,g[3]=0,g[4]=f-_,g[5]=1-(l+T),g[6]=v+u,g[7]=0,g[8]=x+b,g[9]=v-u,g[10]=1-(l+y),g[11]=0,g[12]=S[0],g[13]=S[1],g[14]=S[2],g[15]=1,g}}),fw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=I[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=I[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),dw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=I[0],g[13]=I[1],g[14]=I[2],g[15]=1,g}}),pw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=t,g[6]=S,g[7]=0,g[8]=0,g[9]=-S,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),i6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=0,g[2]=-S,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=S,g[9]=0,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),a6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=S,g[2]=0,g[3]=0,g[4]=-S,g[5]=t,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),o6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=S+S,n=t+t,o=e+e,i=S*a,l=t*a,f=t*n,x=e*a,y=e*n,v=e*o,T=r*a,u=r*n,b=r*o;return g[0]=1-f-v,g[1]=l+b,g[2]=x-u,g[3]=0,g[4]=l-b,g[5]=1-i-v,g[6]=y+T,g[7]=0,g[8]=x+u,g[9]=y-T,g[10]=1-i-f,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),s6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(S-I),o=1/(e-t),i=1/(r-a);return g[0]=r*2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r*2*o,g[6]=0,g[7]=0,g[8]=(S+I)*n,g[9]=(e+t)*o,g[10]=(a+r)*i,g[11]=-1,g[12]=0,g[13]=0,g[14]=a*r*2*i,g[15]=0,g}}),l6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e){var r=1/Math.tan(I/2),a=1/(t-e);return g[0]=r/S,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+t)*a,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*t*a,g[15]=0,g}}),u6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=Math.tan(I.upDegrees*Math.PI/180),r=Math.tan(I.downDegrees*Math.PI/180),a=Math.tan(I.leftDegrees*Math.PI/180),n=Math.tan(I.rightDegrees*Math.PI/180),o=2/(a+n),i=2/(e+r);return g[0]=o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=-((a-n)*o*.5),g[9]=(e-r)*i*.5,g[10]=t/(S-t),g[11]=-1,g[12]=0,g[13]=0,g[14]=t*S/(S-t),g[15]=0,g}}),A_=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(I-S),o=1/(t-e),i=1/(r-a);return g[0]=-2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*o,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*i,g[11]=0,g[12]=(I+S)*n,g[13]=(e+t)*o,g[14]=(a+r)*i,g[15]=1,g}}),c6=Dt((Q,Z)=>{var c=tc();Z.exports=g;function g(I,S,t,e){var r,a,n,o,i,l,f,x,y,v,T=S[0],u=S[1],b=S[2],_=e[0],P=e[1],M=e[2],C=t[0],A=t[1],h=t[2];return Math.abs(T-C)<1e-6&&Math.abs(u-A)<1e-6&&Math.abs(b-h)<1e-6?c(I):(f=T-C,x=u-A,y=b-h,v=1/Math.sqrt(f*f+x*x+y*y),f*=v,x*=v,y*=v,r=P*y-M*x,a=M*f-_*y,n=_*x-P*f,v=Math.sqrt(r*r+a*a+n*n),v?(v=1/v,r*=v,a*=v,n*=v):(r=0,a=0,n=0),o=x*n-y*a,i=y*r-f*n,l=f*a-x*r,v=Math.sqrt(o*o+i*i+l*l),v?(v=1/v,o*=v,i*=v,l*=v):(o=0,i=0,l=0),I[0]=r,I[1]=o,I[2]=f,I[3]=0,I[4]=a,I[5]=i,I[6]=x,I[7]=0,I[8]=n,I[9]=l,I[10]=y,I[11]=0,I[12]=-(r*T+a*u+n*b),I[13]=-(o*T+i*u+l*b),I[14]=-(f*T+x*u+y*b),I[15]=1,I)}}),h6=Dt((Q,Z)=>{Z.exports=c;function c(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}}),mw=Dt((Q,Z)=>{Z.exports={create:Ns(),clone:Bl(),copy:vu(),identity:tc(),transpose:fh(),invert:Fc(),adjoint:op(),determinant:Kd(),multiply:e0(),translate:d0(),scale:Dm(),rotate:uv(),rotateX:sp(),rotateY:p0(),rotateZ:Fm(),fromRotation:Fy(),fromRotationTranslation:n6(),fromScaling:fw(),fromTranslation:dw(),fromXRotation:pw(),fromYRotation:i6(),fromZRotation:a6(),fromQuat:o6(),frustum:s6(),perspective:l6(),perspectiveFromFieldOfView:u6(),ortho:A_(),lookAt:c6(),str:h6()}}),M_=Dt(Q=>{var Z=mw();Q.init2dArray=function(c,g){for(var I=new Array(c),S=0;S{var c=qr(),g=as(),I=M_(),S=mw();function t(T){var u;if(typeof T=="string"){if(u=document.getElementById(T),u===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return u}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function e(T){var u=c.select(T);return u.node()instanceof HTMLElement&&u.size()&&u.classed("js-plotly-plot")}function r(T){var u=T&&T.parentNode;u&&u.removeChild(T)}function a(T,u){n("global",T,u)}function n(T,u,b){var _="plotly.js-style-"+T,P=document.getElementById(_);if(!(P&&P.matches(".no-inline-styles"))){P||(P=document.createElement("style"),P.setAttribute("id",_),P.appendChild(document.createTextNode("")),document.head.appendChild(P));var M=P.sheet;M?M.insertRule?M.insertRule(u+"{"+b+"}",0):M.addRule?M.addRule(u,b,0):g.warn("addStyleRule failed"):g.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function o(T){var u="plotly.js-style-"+T,b=document.getElementById(u);b&&r(b)}function i(T,u,b,_,P,M){var C=_.split(":"),A=P.split(":"),h="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(p){p.getAttribute(h)||(p.addEventListener("mouseenter",function(){var k=this.querySelector(b);k&&(k.style[C[0]]=C[1])}),p.addEventListener("mouseleave",function(){var k=this.querySelector(b);k&&(u&&this.matches(u)?k.style[C[0]]=C[1]:k.style[A[0]]=A[1])}),p.setAttribute(h,!0))})}function l(T){var u=x(T),b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return u.forEach(function(_){var P=f(_);if(P){var M=I.convertCssMatrix(P);b=S.multiply(b,b,M)}}),b}function f(T){var u=window.getComputedStyle(T,null),b=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("-moz-transform")||u.getPropertyValue("-ms-transform")||u.getPropertyValue("-o-transform")||u.getPropertyValue("transform");return b==="none"?null:b.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(_){return+_})}function x(T){for(var u=[];y(T);)u.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return u}function y(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,u){return T&&u&&T.top===u.top&&T.left===u.left&&T.right===u.right&&T.bottom===u.bottom}Z.exports={getGraphDiv:t,isPlotDiv:e,removeElement:r,addStyleRule:a,addRelatedStyleRule:n,deleteRelatedStyleRule:o,setStyleOnHover:i,getFullTransformMatrix:l,getElementTransformMatrix:f,getElementAndAncestors:x,equalDomRects:v}}),El=Dt((Q,Z)=>{Z.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"}}}}),Yc=Dt((Q,Z)=>{var c=Ia().extendFlat,g=si(),I={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},S={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=I.flags.slice().concat(["fullReplot"]),e=S.flags.slice().concat("layoutReplot");Z.exports={traces:I,layout:S,traceFlags:function(){return r(t)},layoutFlags:function(){return r(e)},update:function(o,i){var l=i.editType;if(l&&l!=="none")for(var f=l.split("+"),x=0;x{Q.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Q.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"}}),S_=Dt((Q,Z)=>{Z.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"}}),Zu=Dt(Q=>{var{DATE_FORMAT_LINK:Z,FORMAT_LINK:c}=S_(),g=["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 I({supportOther:S}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(S?" 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}".`,c,"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}".`,Z,"for details on the date formatting syntax.",g].join(" ")}Q.templateFormatStringDescription=I,Q.hovertemplateAttrs=({editType:S="none",arrayOk:t}={},e={})=>Mr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.texttemplateAttrs=({editType:S="calc",arrayOk:t}={},e={})=>Mr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:t}={},e={})=>({valType:"string",dflt:"",editType:S}),Q.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}),_1=Dt((Q,Z)=>{function c(b,_){return _?_.d2l(b):b}function g(b,_){return _?_.l2d(b):b}function I(b){return b.x0}function S(b){return b.x1}function t(b){return b.y0}function e(b){return b.y1}function r(b){return b.x0shift||0}function a(b){return b.x1shift||0}function n(b){return b.y0shift||0}function o(b){return b.y1shift||0}function i(b,_){return c(b.x1,_)+a(b)-c(b.x0,_)-r(b)}function l(b,_,P){return c(b.y1,P)+o(b)-c(b.y0,P)-n(b)}function f(b,_){return Math.abs(i(b,_))}function x(b,_,P){return Math.abs(l(b,_,P))}function y(b,_,P){return b.type!=="line"?void 0:Math.sqrt(Math.pow(i(b,_),2)+Math.pow(l(b,_,P),2))}function v(b,_){return g((c(b.x1,_)+a(b)+c(b.x0,_)+r(b))/2,_)}function T(b,_,P){return g((c(b.y1,P)+o(b)+c(b.y0,P)+n(b))/2,P)}function u(b,_,P){return b.type!=="line"?void 0:l(b,_,P)/i(b,_)}Z.exports={x0:I,x1:S,y0:t,y1:e,slope:u,dx:i,dy:l,width:f,height:x,length:y,xcenter:v,ycenter:T}}),gw=Dt((Q,Z)=>{var c=Yc().overrideAll,g=Ho(),I=da(),S=kd().dash,t=Ia().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=_1();Z.exports=c({newshape:{visible:t({},g.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},g.legend,{}),legendgroup:t({},g.legendgroup,{}),legendgrouptitle:{text:t({},g.legendgrouptitle.text,{}),font:I({})},legendrank:t({},g.legendrank,{}),legendwidth:t({},g.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},S,{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:t({},g.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:r({editType:"arraydraw"}),font:I({}),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")}),cv=Dt((Q,Z)=>{var c=kd().dash,g=Ia().extendFlat;Z.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:g({},c,{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"}}}),Ry=Dt((Q,Z)=>{Z.exports=function(c){var g=c.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}}),b1=Dt((Q,Z)=>{var c=da(),g=El(),I=wi(),S=gw(),t=cv(),e=Ry(),r=Ia().extendFlat,a=c({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=I.defaultLine,Z.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(e({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:I.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:I.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:I.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:S.newshape,activeshape:S.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},g.transition,{editType:"none"})}}),f6=Dt(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Q=document.createElement("style");Q.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Q.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Q)}})()}),Jo=Dt(Q=>{var Z=as(),c=Yo(),g=Ol(),I=si(),S=r0().addStyleRule,t=Ia(),e=Ho(),r=b1(),a=t.extendFlat,n=t.extendDeepAll;Q.modules={},Q.allCategories={},Q.allTypes=[],Q.subplotsRegistry={},Q.componentsRegistry={},Q.layoutArrayContainers=[],Q.layoutArrayRegexes=[],Q.traceLayoutAttributes={},Q.localeRegistry={},Q.apiMethodRegistry={},Q.collectableSubplotTypes=null,Q.register=function(b){if(Q.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_{var Z=Fi().timeFormat,c=Yi(),g=as(),I=ko().mod,S=Ca(),t=S.BADNUM,e=S.ONEDAY,r=S.ONEHOUR,a=S.ONEMIN,n=S.ONESEC,o=S.EPOCHJD,i=Jo(),l=Fi().utcFormat,f=/^\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,x=/^\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,y=new Date().getFullYear()-70;function v(V){return V&&i.componentsRegistry.calendars&&typeof V=="string"&&V!=="gregorian"}Q.dateTick0=function(V,H){var F=T(V,!!H);if(H<2)return F;var U=Q.dateTime2ms(F,V);return U+=e*(H-1),Q.ms2DateTime(U,0,V)};function T(V,H){return v(V)?H?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[V]:i.getComponentMethod("calendars","CANONICAL_TICK")[V]:H?"2000-01-02":"2000-01-01"}Q.dfltRange=function(V){return v(V)?i.getComponentMethod("calendars","DFLTRANGE")[V]:["2000-01-01","2001-01-01"]},Q.isJSDate=function(V){return typeof V=="object"&&V!==null&&typeof V.getTime=="function"};var u,b;Q.dateTime2ms=function(V,H){if(Q.isJSDate(V)){var F=V.getTimezoneOffset()*a,U=(V.getUTCMinutes()-V.getMinutes())*a+(V.getUTCSeconds()-V.getSeconds())*n+(V.getUTCMilliseconds()-V.getMilliseconds());if(U){var W=3*a;F=F-W/2+I(U-F+W/2,W)}return V=Number(V)-F,V>=u&&V<=b?V:t}if(typeof V!="string"&&typeof V!="number")return t;V=String(V);var q=v(H),J=V.charAt(0);q&&(J==="G"||J==="g")&&(V=V.substr(1),H="");var lt=q&&H.substr(0,7)==="chinese",yt=V.match(lt?x:f);if(!yt)return t;var mt=yt[1],st=yt[3]||"1",tt=Number(yt[5]||1),dt=Number(yt[7]||0),rt=Number(yt[9]||0),at=Number(yt[11]||0);if(q){if(mt.length===2)return t;mt=Number(mt);var vt;try{var it=i.getComponentMethod("calendars","getCal")(H);if(lt){var Y=st.charAt(st.length-1)==="i";st=parseInt(st,10),vt=it.newDate(mt,it.toMonthIndex(mt,st,Y),tt)}else vt=it.newDate(mt,Number(st),tt)}catch{return t}return vt?(vt.toJD()-o)*e+dt*r+rt*a+at*n:t}mt.length===2?mt=(Number(mt)+2e3-y)%100+y:mt=Number(mt),st-=1;var ft=new Date(Date.UTC(2e3,st,tt,dt,rt));return ft.setUTCFullYear(mt),ft.getUTCMonth()!==st||ft.getUTCDate()!==tt?t:ft.getTime()+at*n},u=Q.MIN_MS=Q.dateTime2ms("-9999"),b=Q.MAX_MS=Q.dateTime2ms("9999-12-31 23:59:59.9999"),Q.isDateTime=function(V,H){return Q.dateTime2ms(V,H)!==t};function _(V,H){return String(V+Math.pow(10,H)).substr(1)}var P=90*e,M=3*r,C=5*a;Q.ms2DateTime=function(V,H,F){if(typeof V!="number"||!(V>=u&&V<=b))return t;H||(H=0);var U=Math.floor(I(V+.05,1)*10),W=Math.round(V-U/10),q,J,lt,yt,mt,st;if(v(F)){var tt=Math.floor(W/e)+o,dt=Math.floor(I(V,e));try{q=i.getComponentMethod("calendars","getCal")(F).fromJD(tt).formatDate("yyyy-mm-dd")}catch{q=l("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;J=H=u+e&&V<=b-e))return t;var H=Math.floor(I(V+.05,1)*10),F=new Date(Math.round(V-H/10)),U=Z("%Y-%m-%d")(F),W=F.getHours(),q=F.getMinutes(),J=F.getSeconds(),lt=F.getUTCMilliseconds()*10+H;return A(U,W,q,J,lt)};function A(V,H,F,U,W){if((H||F||U||W)&&(V+=" "+_(H,2)+":"+_(F,2),(U||W)&&(V+=":"+_(U,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;V+="."+_(W,q)}return V}Q.cleanDate=function(V,H,F){if(V===t)return H;if(Q.isJSDate(V)||typeof V=="number"&&isFinite(V)){if(v(F))return g.error("JS Dates and milliseconds are incompatible with world calendars",V),H;if(V=Q.ms2DateTimeLocal(+V),!V&&H!==void 0)return H}else if(!Q.isDateTime(V,F))return g.error("unrecognized date",V),H;return V};var h=/%\d?f/g,p=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function w(V,H,F,U){V=V.replace(h,function(q){var J=Math.min(+q.charAt(1)||6,6),lt=(H/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return lt});var W=new Date(Math.floor(H+.05));if(V=V.replace(p,function(){return k[F("%q")(W)]}),v(U))try{V=i.getComponentMethod("calendars","worldCalFmt")(V,H,U)}catch{return"Invalid"}return F(V)(W)}var R=[59,59.9,59.99,59.999,59.9999];function O(V,H){var F=I(V+.05,e),U=_(Math.floor(F/r),2)+":"+_(I(Math.floor(F/a),60),2);if(H!=="M"){c(H)||(H=0);var W=Math.min(I(V/n,60),R[H]),q=(100+W).toFixed(H).substr(1);H>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}Q.formatDate=function(V,H,F,U,W,q){if(W=v(W)&&W,!H)if(F==="y")H=q.year;else if(F==="m")H=q.month;else if(F==="d")H=q.dayMonth+` +`)};function ar(rn){return rn.map(Er).join(At)}function Er(rn){return ue.test(rn)?'"'+rn.replace(/\"/g,'""')+'"':rn}return Pe},c.csv=c.dsv(",","text/csv"),c.tsv=c.dsv(" ","text/tab-separated-values");var ri,Pn,En,Yn,La=this[F(this,"requestAnimationFrame")]||function(At){setTimeout(At,17)};c.timer=function(){qi.apply(this,arguments)};function qi(At,Ut,ue){var Se=arguments.length;Se<2&&(Ut=0),Se<3&&(ue=Date.now());var Pe=ue+Ut,Ne={c:At,t:Pe,n:null};return Pn?Pn.n=Ne:ri=Ne,Pn=Ne,En||(Yn=clearTimeout(Yn),En=1,La(Qa)),Ne}function Qa(){var At=Ja(),Ut=Do()-At;Ut>24?(isFinite(Ut)&&(clearTimeout(Yn),Yn=setTimeout(Qa,Ut)),En=0):(En=1,La(Qa))}c.timer.flush=function(){Ja(),Do()};function Ja(){for(var At=Date.now(),Ut=ri;Ut;)At>=Ut.t&&Ut.c(At-Ut.t)&&(Ut.c=null),Ut=Ut.n;return At}function Do(){for(var At,Ut=ri,ue=1/0;Ut;)Ut.c?(Ut.t=0;--ar)Vn.push(Pe[rn[xn[ar]][2]]);for(ar=+On;ar1&&Ue(At[ue[Se-2]],At[ue[Se-1]],At[Pe])<=0;)--Se;ue[Se++]=Pe}return ue.slice(0,Se)}function ys(At,Ut){return At[0]-Ut[0]||At[1]-Ut[1]}c.geom.polygon=function(At){return tt(At,os),At};var os=c.geom.polygon.prototype=[];os.area=function(){for(var At=-1,Ut=this.length,ue,Se=this[Ut-1],Pe=0;++Atne)ar=ar.L;else if(sr=Ut-fo(ar,ue),sr>ne){if(!ar.R){Se=ar;break}ar=ar.R}else{Ne>-ne?(Se=ar.P,Pe=ar):sr>-ne?(Se=ar,Pe=ar.N):Se=Pe=ar;break}var Er=kl(At);if(Qs.insert(Se,Er),!(!Se&&!Pe)){if(Se===Pe){Ll(Se),Pe=kl(Se.site),Qs.insert(Er,Pe),Er.edge=Pe.edge=ou(Se.site,Er.site),al(Se),al(Pe);return}if(!Pe){Er.edge=ou(Se.site,Er.site);return}Ll(Se),Ll(Pe);var rn=Se.site,Jr=rn.x,xn=rn.y,zn=At.x-Jr,On=At.y-xn,$i=Pe.site,Vn=$i.x-Jr,bi=$i.y-xn,Pi=2*(zn*bi-On*Vn),ji=zn*zn+On*On,Ki=Vn*Vn+bi*bi,Jn={x:(bi*ji-On*Ki)/Pi+Jr,y:(zn*Ki-Vn*ji)/Pi+xn};es(Pe.edge,rn,$i,Jn),Er.edge=ou(rn,At,null,Jn),Pe.edge=ou(At,$i,null,Jn),al(Se),al(Pe)}}function Pa(At,Ut){var ue=At.site,Se=ue.x,Pe=ue.y,Ne=Pe-Ut;if(!Ne)return Se;var sr=At.P;if(!sr)return-1/0;ue=sr.site;var ar=ue.x,Er=ue.y,rn=Er-Ut;if(!rn)return ar;var Jr=ar-Se,xn=1/Ne-1/rn,zn=Jr/rn;return xn?(-zn+Math.sqrt(zn*zn-2*xn*(Jr*Jr/(-2*rn)-Er+rn/2+Pe-Ne/2)))/xn+Se:(Se+ar)/2}function fo(At,Ut){var ue=At.N;if(ue)return Pa(ue,Ut);var Se=At.site;return Se.y===Ut?Se.x:1/0}function qs(At){this.site=At,this.edges=[]}qs.prototype.prepare=function(){for(var At=this.edges,Ut=At.length,ue;Ut--;)ue=At[Ut].edge,(!ue.b||!ue.a)&&At.splice(Ut,1);return At.sort(Jo),At.length};function Ql(At){for(var Ut=At[0][0],ue=At[1][0],Se=At[0][1],Pe=At[1][1],Ne,sr,ar,Er,rn=cl,Jr=rn.length,xn,zn,On,$i,Vn,bi;Jr--;)if(xn=rn[Jr],!(!xn||!xn.prepare()))for(On=xn.edges,$i=On.length,zn=0;zn<$i;)bi=On[zn].end(),ar=bi.x,Er=bi.y,Vn=On[++zn%$i].start(),Ne=Vn.x,sr=Vn.y,(u(ar-Ne)>ne||u(Er-sr)>ne)&&(On.splice(zn,0,new Cu(hl(xn.site,bi,u(ar-Ut)ne?{x:Ut,y:u(Ne-Ut)ne?{x:u(sr-Pe)ne?{x:ue,y:u(Ne-ue)ne?{x:u(sr-Se)=-Ct)){var On=Er*Er+rn*rn,$i=Jr*Jr+xn*xn,Vn=(xn*On-rn*$i)/zn,bi=(Er*$i-Jr*On)/zn,xn=bi+ar,Pi=Po.pop()||new Gl;Pi.arc=At,Pi.site=Pe,Pi.x=Vn+sr,Pi.y=xn+Math.sqrt(Vn*Vn+bi*bi),Pi.cy=xn,At.circle=Pi;for(var ji=null,Ki=Ps._;Ki;)if(Pi.y0)){if(Vn/=On,On<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=ue-ar,!(!On&&Vn<0)){if(Vn/=On,On<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if(On>0){if(Vn0)){if(Vn/=$i,$i<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=Se-Er,!(!$i&&Vn<0)){if(Vn/=$i,$i<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if($i>0){if(Vn0&&(Pe.a={x:ar+xn*On,y:Er+xn*$i}),zn<1&&(Pe.b={x:ar+zn*On,y:Er+zn*$i}),Pe}}}}}}function uo(At){for(var Ut=ss,ue=Ru(At[0][0],At[0][1],At[1][0],At[1][1]),Se=Ut.length,Pe;Se--;)Pe=Ut[Se],(!Ms(Pe,At)||!ue(Pe)||u(Pe.a.x-Pe.b.x)=Ne)return;if(Jr>zn){if(!Se)Se={x:$i,y:sr};else if(Se.y>=ar)return;ue={x:$i,y:ar}}else{if(!Se)Se={x:$i,y:ar};else if(Se.y1)if(Jr>zn){if(!Se)Se={x:(sr-Pi)/bi,y:sr};else if(Se.y>=ar)return;ue={x:(ar-Pi)/bi,y:ar}}else{if(!Se)Se={x:(ar-Pi)/bi,y:ar};else if(Se.y=Ne)return;ue={x:Ne,y:bi*Ne+Pi}}else{if(!Se)Se={x:Ne,y:bi*Ne+Pi};else if(Se.x=Jr&&Pi.x<=zn&&Pi.y>=xn&&Pi.y<=On?[[Jr,On],[zn,On],[zn,xn],[Jr,xn]]:[];ji.point=Er[Vn]}),rn}function ar(Er){return Er.map(function(rn,Jr){return{x:Math.round(Se(rn,Jr)/ne)*ne,y:Math.round(Pe(rn,Jr)/ne)*ne,i:Jr}})}return sr.links=function(Er){return ac(ar(Er)).edges.filter(function(rn){return rn.l&&rn.r}).map(function(rn){return{source:Er[rn.l.i],target:Er[rn.r.i]}})},sr.triangles=function(Er){var rn=[];return ac(ar(Er)).cells.forEach(function(Jr,xn){for(var zn=Jr.site,On=Jr.edges.sort(Jo),$i=-1,Vn=On.length,bi,Pi,ji=On[Vn-1].edge,Ki=ji.l===zn?ji.r:ji.l;++$iKi&&(Ki=Jr.x),Jr.y>Jn&&(Jn=Jr.y),On.push(Jr.x),$i.push(Jr.y);else for(Vn=0;VnKi&&(Ki=Ua),Wa>Jn&&(Jn=Wa),On.push(Ua),$i.push(Wa)}var oo=Ki-Pi,Io=Jn-ji;oo>Io?Jn=ji+oo:Ki=Pi+Io;function Ro(Yo,vs,Tl,Ku,du,_o,Gs,nl){if(!(isNaN(Tl)||isNaN(Ku)))if(Yo.leaf){var uu=Yo.x,Xl=Yo.y;if(uu!=null)if(u(uu-Tl)+u(Xl-Ku)<.01)$o(Yo,vs,Tl,Ku,du,_o,Gs,nl);else{var rh=Yo.point;Yo.x=Yo.y=Yo.point=null,$o(Yo,rh,uu,Xl,du,_o,Gs,nl),$o(Yo,vs,Tl,Ku,du,_o,Gs,nl)}else Yo.x=Tl,Yo.y=Ku,Yo.point=vs}else $o(Yo,vs,Tl,Ku,du,_o,Gs,nl)}function $o(Yo,vs,Tl,Ku,du,_o,Gs,nl){var uu=(du+Gs)*.5,Xl=(_o+nl)*.5,rh=Tl>=uu,Ul=Ku>=Xl,ru=Ul<<1|rh;Yo.leaf=!1,Yo=Yo.nodes[ru]||(Yo.nodes[ru]=Bl()),rh?du=uu:Gs=uu,Ul?_o=Xl:nl=Xl,Ro(Yo,vs,Tl,Ku,du,_o,Gs,nl)}var ol=Bl();if(ol.add=function(Yo){Ro(ol,Yo,+xn(Yo,++Vn),+zn(Yo,Vn),Pi,ji,Ki,Jn)},ol.visit=function(Yo){Rc(Yo,ol,Pi,ji,Ki,Jn)},ol.find=function(Yo){return Uf(ol,Yo[0],Yo[1],Pi,ji,Ki,Jn)},Vn=-1,Ut==null){for(;++VnNe||zn>sr||On=Ua,Io=ue>=Wa,Ro=Io<<1|oo,$o=Ro+4;Ro<$o;++Ro)if(Jr=Jn[Ro&3])switch(Ro&3){case 0:rn(Jr,xn,zn,Ua,Wa);break;case 1:rn(Jr,Ua,zn,On,Wa);break;case 2:rn(Jr,xn,Wa,Ua,$i);break;case 3:rn(Jr,Ua,Wa,On,$i);break}}}(At,Se,Pe,Ne,sr),Er}c.interpolateRgb=hc;function hc(At,Ut){At=c.rgb(At),Ut=c.rgb(Ut);var ue=At.r,Se=At.g,Pe=At.b,Ne=Ut.r-ue,sr=Ut.g-Se,ar=Ut.b-Pe;return function(Er){return"#"+Br(Math.round(ue+Ne*Er))+Br(Math.round(Se+sr*Er))+Br(Math.round(Pe+ar*Er))}}c.interpolateObject=oc;function oc(At,Ut){var ue={},Se={},Pe;for(Pe in At)Pe in Ut?ue[Pe]=rl(At[Pe],Ut[Pe]):Se[Pe]=At[Pe];for(Pe in Ut)Pe in At||(Se[Pe]=Ut[Pe]);return function(Ne){for(Pe in ue)Se[Pe]=ue[Pe](Ne);return Se}}c.interpolateNumber=fc;function fc(At,Ut){return At=+At,Ut=+Ut,function(ue){return At*(1-ue)+Ut*ue}}c.interpolateString=sh;function sh(At,Ut){var ue=cu.lastIndex=sc.lastIndex=0,Se,Pe,Ne,sr=-1,ar=[],Er=[];for(At=At+"",Ut=Ut+"";(Se=cu.exec(At))&&(Pe=sc.exec(Ut));)(Ne=Pe.index)>ue&&(Ne=Ut.slice(ue,Ne),ar[sr]?ar[sr]+=Ne:ar[++sr]=Ne),(Se=Se[0])===(Pe=Pe[0])?ar[sr]?ar[sr]+=Pe:ar[++sr]=Pe:(ar[++sr]=null,Er.push({i:sr,x:fc(Se,Pe)})),ue=sc.lastIndex;return ue=0&&!(Se=c.interpolators[ue](At,Ut)););return Se}c.interpolators=[function(At,Ut){var ue=typeof Ut;return(ue==="string"?on.has(Ut.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ut)?hc:sh:Ut instanceof ui?hc:Array.isArray(Ut)?Yl:ue==="object"&&isNaN(Ut)?oc:fc)(At,Ut)}],c.interpolateArray=Yl;function Yl(At,Ut){var ue=[],Se=[],Pe=At.length,Ne=Ut.length,sr=Math.min(At.length,Ut.length),ar;for(ar=0;ar=0?At.slice(0,Ut):At,Se=Ut>=0?At.slice(Ut+1):"in";return ue=Lc.get(ue)||Eh,Se=Vh.get(Se)||V,bu(Se(ue.apply(null,g.call(arguments,1))))};function bu(At){return function(Ut){return Ut<=0?0:Ut>=1?1:At(Ut)}}function Ed(At){return function(Ut){return 1-At(1-Ut)}}function tl(At){return function(Ut){return .5*(Ut<.5?At(2*Ut):2-At(2-2*Ut))}}function Vd(At){return At*At}function Pl(At){return At*At*At}function ts(At){if(At<=0)return 0;if(At>=1)return 1;var Ut=At*At,ue=Ut*At;return 4*(At<.5?ue:3*(At-Ut)+ue-.75)}function lf(At){return function(Ut){return Math.pow(Ut,At)}}function lh(At){return 1-Math.cos(At*re)}function rc(At){return Math.pow(2,10*(At-1))}function Vf(At){return 1-Math.sqrt(1-At*At)}function Hh(At,Ut){var ue;return arguments.length<2&&(Ut=.45),arguments.length?ue=Ut/St*Math.asin(1/At):(At=1,ue=Ut/4),function(Se){return 1+At*Math.pow(2,-10*Se)*Math.sin((Se-ue)*St/Ut)}}function yf(At){return At||(At=1.70158),function(Ut){return Ut*Ut*((At+1)*Ut-At)}}function lc(At){return At<1/2.75?7.5625*At*At:At<2/2.75?7.5625*(At-=1.5/2.75)*At+.75:At<2.5/2.75?7.5625*(At-=2.25/2.75)*At+.9375:7.5625*(At-=2.625/2.75)*At+.984375}c.interpolateHcl=hd;function hd(At,Ut){At=c.hcl(At),Ut=c.hcl(Ut);var ue=At.h,Se=At.c,Pe=At.l,Ne=Ut.h-ue,sr=Ut.c-Se,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Se=isNaN(Se)?Ut.c:Se),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return dr(ue+Ne*Er,Se+sr*Er,Pe+ar*Er)+""}}c.interpolateHsl=Gf;function Gf(At,Ut){At=c.hsl(At),Ut=c.hsl(Ut);var ue=At.h,Se=At.s,Pe=At.l,Ne=Ut.h-ue,sr=Ut.s-Se,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Se=isNaN(Se)?Ut.s:Se),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return Yi(ue+Ne*Er,Se+sr*Er,Pe+ar*Er)+""}}c.interpolateLab=xf;function xf(At,Ut){At=c.lab(At),Ut=c.lab(Ut);var ue=At.l,Se=At.a,Pe=At.b,Ne=Ut.l-ue,sr=Ut.a-Se,ar=Ut.b-Pe;return function(Er){return Mi(ue+Ne*Er,Se+sr*Er,Pe+ar*Er)+""}}c.interpolateRound=Wh;function Wh(At,Ut){return Ut-=At,function(ue){return Math.round(At+Ut*ue)}}c.transform=function(At){var Ut=S.createElementNS(c.ns.prefix.svg,"g");return(c.transform=function(ue){if(ue!=null){Ut.setAttribute("transform",ue);var Se=Ut.transform.baseVal.consolidate()}return new Hf(Se?Se.matrix:Ch)})(At)};function Hf(At){var Ut=[At.a,At.b],ue=[At.c,At.d],Se=uh(Ut),Pe=Wf(Ut,ue),Ne=uh(Yf(ue,Ut,-Pe))||0;Ut[0]*ue[1]180?Ut+=360:Ut-At>180&&(At+=360),Se.push({i:ue.push(vh(ue)+"rotate(",null,")")-2,x:fc(At,Ut)})):Ut&&ue.push(vh(ue)+"rotate("+Ut+")")}function qf(At,Ut,ue,Se){At!==Ut?Se.push({i:ue.push(vh(ue)+"skewX(",null,")")-2,x:fc(At,Ut)}):Ut&&ue.push(vh(ue)+"skewX("+Ut+")")}function eu(At,Ut,ue,Se){if(At[0]!==Ut[0]||At[1]!==Ut[1]){var Pe=ue.push(vh(ue)+"scale(",null,",",null,")");Se.push({i:Pe-4,x:fc(At[0],Ut[0])},{i:Pe-2,x:fc(At[1],Ut[1])})}else(Ut[0]!==1||Ut[1]!==1)&&ue.push(vh(ue)+"scale("+Ut+")")}function Ef(At,Ut){var ue=[],Se=[];return At=c.transform(At),Ut=c.transform(Ut),uc(At.translate,Ut.translate,ue,Se),rf(At.rotate,Ut.rotate,ue,Se),qf(At.skew,Ut.skew,ue,Se),eu(At.scale,Ut.scale,ue,Se),At=Ut=null,function(Pe){for(var Ne=-1,sr=Se.length,ar;++Ne0?Ne=Jn:(ue.c=null,ue.t=NaN,ue=null,Ut.end({type:"end",alpha:Ne=0})):Jn>0&&(Ut.start({type:"start",alpha:Ne=Jn}),ue=qi(At.tick)),At):Ne},At.start=function(){var Jn,Ua=On.length,Wa=$i.length,oo=Se[0],Io=Se[1],Ro,$o;for(Jn=0;Jn=0;)Ne.push(Jr=rn[Er]),Jr.parent=ar,Jr.depth=ar.depth+1;ue&&(ar.value=0),ar.children=rn}else ue&&(ar.value=+ue.call(Se,ar,ar.depth)||0),delete ar.children;return yh(Pe,function(xn){var zn,On;At&&(zn=xn.children)&&zn.sort(At),ue&&(On=xn.parent)&&(On.value+=xn.value)}),sr}return Se.sort=function(Pe){return arguments.length?(At=Pe,Se):At},Se.children=function(Pe){return arguments.length?(Ut=Pe,Se):Ut},Se.value=function(Pe){return arguments.length?(ue=Pe,Se):ue},Se.revalue=function(Pe){return ue&&(uf(Pe,function(Ne){Ne.children&&(Ne.value=0)}),yh(Pe,function(Ne){var sr;Ne.children||(Ne.value=+ue.call(Se,Ne,Ne.depth)||0),(sr=Ne.parent)&&(sr.value+=Ne.value)})),Pe},Se};function wu(At,Ut){return c.rebind(At,Ut,"sort","children","value"),At.nodes=At,At.links=Jd,At}function uf(At,Ut){for(var ue=[At];(At=ue.pop())!=null;)if(Ut(At),(Pe=At.children)&&(Se=Pe.length))for(var Se,Pe;--Se>=0;)ue.push(Pe[Se])}function yh(At,Ut){for(var ue=[At],Se=[];(At=ue.pop())!=null;)if(Se.push(At),(sr=At.children)&&(Ne=sr.length))for(var Pe=-1,Ne,sr;++PePe&&(Pe=ar),Se.push(ar)}for(sr=0;srSe&&(ue=Ut,Se=Pe);return ue}function Ph(At){return At.reduce(Vc,0)}function Vc(At,Ut){return At+Ut[1]}c.layout.histogram=function(){var At=!0,Ut=Number,ue=bf,Se=fd;function Pe(Ne,sr){for(var ar=[],Er=Ne.map(Ut,this),rn=ue.call(this,Er,sr),Jr=Se.call(this,rn,Er,sr),xn,sr=-1,zn=Er.length,On=Jr.length-1,$i=At?1:1/zn,Vn;++sr0)for(sr=-1;++sr=rn[0]&&Vn<=rn[1]&&(xn=ar[c.bisect(Jr,Vn,1,On)-1],xn.y+=$i,xn.push(Ne[sr]));return ar}return Pe.value=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.range=function(Ne){return arguments.length?(ue=Ce(Ne),Pe):ue},Pe.bins=function(Ne){return arguments.length?(Se=typeof Ne=="number"?function(sr){return yu(sr,Ne)}:Ce(Ne),Pe):Se},Pe.frequency=function(Ne){return arguments.length?(At=!!Ne,Pe):At},Pe};function fd(At,Ut){return yu(At,Math.ceil(Math.log(Ut.length)/Math.LN2+1))}function yu(At,Ut){for(var ue=-1,Se=+At[0],Pe=(At[1]-Se)/Ut,Ne=[];++ue<=Ut;)Ne[ue]=Pe*ue+Se;return Ne}function bf(At){return[c.min(At),c.max(At)]}c.layout.pack=function(){var At=c.layout.hierarchy().sort(Zh),Ut=0,ue=[1,1],Se;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn=ue[0],Jr=ue[1],xn=Se==null?Math.sqrt:typeof Se=="function"?Se:function(){return Se};if(Er.x=Er.y=0,yh(Er,function(On){On.r=+xn(On.value)}),yh(Er,wf),Ut){var zn=Ut*(Se?1:Math.max(2*Er.r/rn,2*Er.r/Jr))/2;yh(Er,function(On){On.r+=zn}),yh(Er,wf),yh(Er,function(On){On.r-=zn})}return Qf(Er,rn/2,Jr/2,Se?1:1/Math.max(2*Er.r/rn,2*Er.r/Jr)),ar}return Pe.size=function(Ne){return arguments.length?(ue=Ne,Pe):ue},Pe.radius=function(Ne){return arguments.length?(Se=Ne==null||typeof Ne=="function"?Ne:+Ne,Pe):Se},Pe.padding=function(Ne){return arguments.length?(Ut=+Ne,Pe):Ut},wu(Pe,At)};function Zh(At,Ut){return At.value-Ut.value}function th(At,Ut){var ue=At._pack_next;At._pack_next=Ut,Ut._pack_prev=At,Ut._pack_next=ue,ue._pack_prev=Ut}function nf(At,Ut){At._pack_next=Ut,Ut._pack_prev=At}function Gh(At,Ut){var ue=Ut.x-At.x,Se=Ut.y-At.y,Pe=At.r+Ut.r;return .999*Pe*Pe>ue*ue+Se*Se}function wf(At){if(!(Ut=At.children)||!(zn=Ut.length))return;var Ut,ue=1/0,Se=-1/0,Pe=1/0,Ne=-1/0,sr,ar,Er,rn,Jr,xn,zn;function On(Jn){ue=Math.min(Jn.x-Jn.r,ue),Se=Math.max(Jn.x+Jn.r,Se),Pe=Math.min(Jn.y-Jn.r,Pe),Ne=Math.max(Jn.y+Jn.r,Ne)}if(Ut.forEach(Pd),sr=Ut[0],sr.x=-sr.r,sr.y=0,On(sr),zn>1&&(ar=Ut[1],ar.x=ar.r,ar.y=0,On(ar),zn>2))for(Er=Ut[2],eh(sr,ar,Er),On(Er),th(sr,Er),sr._pack_prev=Er,th(Er,ar),ar=sr._pack_next,rn=3;rnbi.x&&(bi=Ua),Ua.depth>Pi.depth&&(Pi=Ua)});var ji=Ut(Vn,bi)/2-Vn.x,Ki=ue[0]/(bi.x+Ut(bi,Vn)/2+ji),Jn=ue[1]/(Pi.depth||1);uf(On,function(Ua){Ua.x=(Ua.x+ji)*Ki,Ua.y=Ua.depth*Jn})}return zn}function Ne(Jr){for(var xn={A:null,children:[Jr]},zn=[xn],On;(On=zn.pop())!=null;)for(var $i=On.children,Vn,bi=0,Pi=$i.length;bi0&&(iu(df(Vn,Jr,zn),Jr,Ua),Pi+=Ua,ji+=Ua),Ki+=Vn.m,Pi+=On.m,Jn+=bi.m,ji+=$i.m;Vn&&!Nu($i)&&($i.t=Vn,$i.m+=Ki-ji),On&&!_h(bi)&&(bi.t=On,bi.m+=Pi-Jn,zn=Jr)}return zn}function rn(Jr){Jr.x*=ue[0],Jr.y=Jr.depth*ue[1]}return Pe.separation=function(Jr){return arguments.length?(Ut=Jr,Pe):Ut},Pe.size=function(Jr){return arguments.length?(Se=(ue=Jr)==null?rn:null,Pe):Se?null:ue},Pe.nodeSize=function(Jr){return arguments.length?(Se=(ue=Jr)==null?null:rn,Pe):Se?ue:null},wu(Pe,At)};function Ih(At,Ut){return At.parent==Ut.parent?1:2}function _h(At){var Ut=At.children;return Ut.length?Ut[0]:At.t}function Nu(At){var Ut=At.children,ue;return(ue=Ut.length)?Ut[ue-1]:At.t}function iu(At,Ut,ue){var Se=ue/(Ut.i-At.i);Ut.c-=Se,Ut.s+=ue,At.c+=Se,Ut.z+=ue,Ut.m+=ue}function bh(At){for(var Ut=0,ue=0,Se=At.children,Pe=Se.length,Ne;--Pe>=0;)Ne=Se[Pe],Ne.z+=Ut,Ne.m+=Ut,Ut+=Ne.s+(ue+=Ne.c)}function df(At,Ut,ue){return At.a.parent===Ut.parent?At.a:ue}c.layout.cluster=function(){var At=c.layout.hierarchy().sort(null).value(null),Ut=Ih,ue=[1,1],Se=!1;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn,Jr=0;yh(Er,function(Vn){var bi=Vn.children;bi&&bi.length?(Vn.x=$f(bi),Vn.y=wh(bi)):(Vn.x=rn?Jr+=Ut(Vn,rn):0,Vn.y=0,rn=Vn)});var xn=gr(Er),zn=Ur(Er),On=xn.x-Ut(xn,zn)/2,$i=zn.x+Ut(zn,xn)/2;return yh(Er,Se?function(Vn){Vn.x=(Vn.x-Er.x)*ue[0],Vn.y=(Er.y-Vn.y)*ue[1]}:function(Vn){Vn.x=(Vn.x-On)/($i-On)*ue[0],Vn.y=(1-(Er.y?Vn.y/Er.y:1))*ue[1]}),ar}return Pe.separation=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.size=function(Ne){return arguments.length?(Se=(ue=Ne)==null,Pe):Se?null:ue},Pe.nodeSize=function(Ne){return arguments.length?(Se=(ue=Ne)!=null,Pe):Se?ue:null},wu(Pe,At)};function wh(At){return 1+c.max(At,function(Ut){return Ut.y})}function $f(At){return At.reduce(function(Ut,ue){return Ut+ue.x},0)/At.length}function gr(At){var Ut=At.children;return Ut&&Ut.length?gr(Ut[0]):At}function Ur(At){var Ut=At.children,ue;return Ut&&(ue=Ut.length)?Ur(Ut[ue-1]):At}c.layout.treemap=function(){var At=c.layout.hierarchy(),Ut=Math.round,ue=[1,1],Se=null,Pe=wn,Ne=!1,sr,ar="squarify",Er=.5*(1+Math.sqrt(5));function rn(Vn,bi){for(var Pi=-1,ji=Vn.length,Ki,Jn;++Pi0;)ji.push(Jn=Ki[Io-1]),ji.area+=Jn.area,ar!=="squarify"||(Wa=zn(ji,oo))<=Ua?(Ki.pop(),Ua=Wa):(ji.area-=ji.pop().area,On(ji,oo,Pi,!1),oo=Math.min(Pi.dx,Pi.dy),ji.length=ji.area=0,Ua=1/0);ji.length&&(On(ji,oo,Pi,!0),ji.length=ji.area=0),bi.forEach(Jr)}}function xn(Vn){var bi=Vn.children;if(bi&&bi.length){var Pi=Pe(Vn),ji=bi.slice(),Ki,Jn=[];for(rn(ji,Pi.dx*Pi.dy/Vn.value),Jn.area=0;Ki=ji.pop();)Jn.push(Ki),Jn.area+=Ki.area,Ki.z!=null&&(On(Jn,Ki.z?Pi.dx:Pi.dy,Pi,!ji.length),Jn.length=Jn.area=0);bi.forEach(xn)}}function zn(Vn,bi){for(var Pi=Vn.area,ji,Ki=0,Jn=1/0,Ua=-1,Wa=Vn.length;++UaKi&&(Ki=ji));return Pi*=Pi,bi*=bi,Pi?Math.max(bi*Ki*Er/Pi,Pi/(bi*Jn*Er)):1/0}function On(Vn,bi,Pi,ji){var Ki=-1,Jn=Vn.length,Ua=Pi.x,Wa=Pi.y,oo=bi?Ut(Vn.area/bi):0,Io;if(bi==Pi.dx){for((ji||oo>Pi.dy)&&(oo=Pi.dy);++KiPi.dx)&&(oo=Pi.dx);++Ki1);return At+Ut*Se*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var At=c.random.normal.apply(c,arguments);return function(){return Math.exp(At())}},bates:function(At){var Ut=c.random.irwinHall(At);return function(){return Ut()/At}},irwinHall:function(At){return function(){for(var Ut=0,ue=0;ue2?fa:aa,rn=Se?Kf:Cd;return Pe=Er(At,Ut,rn,ue),Ne=Er(Ut,At,rn,rl),ar}function ar(Er){return Pe(Er)}return ar.invert=function(Er){return Ne(Er)},ar.domain=function(Er){return arguments.length?(At=Er.map(Number),sr()):At},ar.range=function(Er){return arguments.length?(Ut=Er,sr()):Ut},ar.rangeRound=function(Er){return ar.range(Er).interpolate(Wh)},ar.clamp=function(Er){return arguments.length?(Se=Er,sr()):Se},ar.interpolate=function(Er){return arguments.length?(ue=Er,sr()):ue},ar.ticks=function(Er){return is(At,Er)},ar.tickFormat=function(Er,rn){return d3_scale_linearTickFormat(At,Er,rn)},ar.nice=function(Er){return na(At,Er),sr()},ar.copy=function(){return Oa(At,Ut,ue,Se)},sr()}function Aa(At,Ut){return c.rebind(At,Ut,"range","rangeRound","interpolate","clamp")}function na(At,Ut){return xa(At,Ra(ao(At,Ut)[2])),xa(At,Ra(ao(At,Ut)[2])),At}function ao(At,Ut){Ut==null&&(Ut=10);var ue=Zn(At),Se=ue[1]-ue[0],Pe=Math.pow(10,Math.floor(Math.log(Se/Ut)/Math.LN10)),Ne=Ut/Se*Pe;return Ne<=.15?Pe*=10:Ne<=.35?Pe*=5:Ne<=.75&&(Pe*=2),ue[0]=Math.ceil(ue[0]/Pe)*Pe,ue[1]=Math.floor(ue[1]/Pe)*Pe+Pe*.5,ue[2]=Pe,ue}function is(At,Ut){return c.range.apply(c,ao(At,Ut))}c.scale.log=function(){return Xo(c.scale.linear().domain([0,1]),10,!0,[1,10])};function Xo(At,Ut,ue,Se){function Pe(ar){return(ue?Math.log(ar<0?0:ar):-Math.log(ar>0?0:-ar))/Math.log(Ut)}function Ne(ar){return ue?Math.pow(Ut,ar):-Math.pow(Ut,-ar)}function sr(ar){return At(Pe(ar))}return sr.invert=function(ar){return Ne(At.invert(ar))},sr.domain=function(ar){return arguments.length?(ue=ar[0]>=0,At.domain((Se=ar.map(Number)).map(Pe)),sr):Se},sr.base=function(ar){return arguments.length?(Ut=+ar,At.domain(Se.map(Pe)),sr):Ut},sr.nice=function(){var ar=xa(Se.map(Pe),ue?Math:ls);return At.domain(ar),Se=ar.map(Ne),sr},sr.ticks=function(){var ar=Zn(Se),Er=[],rn=ar[0],Jr=ar[1],xn=Math.floor(Pe(rn)),zn=Math.ceil(Pe(Jr)),On=Ut%1?2:Ut;if(isFinite(zn-xn)){if(ue){for(;xn0;$i--)Er.push(Ne(xn)*$i);for(xn=0;Er[xn]Jr;zn--);Er=Er.slice(xn,zn)}return Er},sr.copy=function(){return Xo(At.copy(),Ut,ue,Se)},Aa(sr,At)}var ls={floor:function(At){return-Math.ceil(-At)},ceil:function(At){return-Math.floor(-At)}};c.scale.pow=function(){return ps(c.scale.linear(),1,[0,1])};function ps(At,Ut,ue){var Se=so(Ut),Pe=so(1/Ut);function Ne(sr){return At(Se(sr))}return Ne.invert=function(sr){return Pe(At.invert(sr))},Ne.domain=function(sr){return arguments.length?(At.domain((ue=sr.map(Number)).map(Se)),Ne):ue},Ne.ticks=function(sr){return is(ue,sr)},Ne.tickFormat=function(sr,ar){return d3_scale_linearTickFormat(ue,sr,ar)},Ne.nice=function(sr){return Ne.domain(na(ue,sr))},Ne.exponent=function(sr){return arguments.length?(Se=so(Ut=sr),Pe=so(1/Ut),At.domain(ue.map(Se)),Ne):Ut},Ne.copy=function(){return ps(At.copy(),Ut,ue)},Aa(Ne,At)}function so(At){return function(Ut){return Ut<0?-Math.pow(-Ut,At):Math.pow(Ut,At)}}c.scale.sqrt=function(){return c.scale.pow().exponent(.5)},c.scale.ordinal=function(){return $a([],{t:"range",a:[[]]})};function $a(At,Ut){var ue,Se,Pe;function Ne(ar){return Se[((ue.get(ar)||(Ut.t==="range"?ue.set(ar,At.push(ar)):NaN))-1)%Se.length]}function sr(ar,Er){return c.range(At.length).map(function(rn){return ar+Er*rn})}return Ne.domain=function(ar){if(!arguments.length)return At;At=[],ue=new P;for(var Er=-1,rn=ar.length,Jr;++Er0?ue[Ne-1]:At[0],Nezn?0:1;if(Jr=Nt)return Er(Jr,$i)+(rn?Er(rn,1-$i):"")+"Z";var Vn,bi,Pi,ji,Ki=0,Jn=0,Ua,Wa,oo,Io,Ro,$o,ol,Yo,vs=[];if((ji=(+sr.apply(this,arguments)||0)/2)&&(Pi=Se===fu?Math.sqrt(rn*rn+Jr*Jr):+Se.apply(this,arguments),$i||(Jn*=-1),Jr&&(Jn=qe(Pi/Jr*Math.sin(ji))),rn&&(Ki=qe(Pi/rn*Math.sin(ji)))),Jr){Ua=Jr*Math.cos(xn+Jn),Wa=Jr*Math.sin(xn+Jn),oo=Jr*Math.cos(zn-Jn),Io=Jr*Math.sin(zn-Jn);var Tl=Math.abs(zn-xn-2*Jn)<=gt?0:1;if(Jn&&Hc(Ua,Wa,oo,Io)===$i^Tl){var Ku=(xn+zn)/2;Ua=Jr*Math.cos(Ku),Wa=Jr*Math.sin(Ku),oo=Io=null}}else Ua=Wa=0;if(rn){Ro=rn*Math.cos(zn-Ki),$o=rn*Math.sin(zn-Ki),ol=rn*Math.cos(xn+Ki),Yo=rn*Math.sin(xn+Ki);var du=Math.abs(xn-zn+2*Ki)<=gt?0:1;if(Ki&&Hc(Ro,$o,ol,Yo)===1-$i^du){var _o=(xn+zn)/2;Ro=rn*Math.cos(_o),$o=rn*Math.sin(_o),ol=Yo=null}}else Ro=$o=0;if(On>ne&&(Vn=Math.min(Math.abs(Jr-rn)/2,+ue.apply(this,arguments)))>.001){bi=rn0?0:1}function Pc(At,Ut,ue,Se,Pe){var Ne=At[0]-Ut[0],sr=At[1]-Ut[1],ar=(Pe?Se:-Se)/Math.sqrt(Ne*Ne+sr*sr),Er=ar*sr,rn=-ar*Ne,Jr=At[0]+Er,xn=At[1]+rn,zn=Ut[0]+Er,On=Ut[1]+rn,$i=(Jr+zn)/2,Vn=(xn+On)/2,bi=zn-Jr,Pi=On-xn,ji=bi*bi+Pi*Pi,Ki=ue-Se,Jn=Jr*On-zn*xn,Ua=(Pi<0?-1:1)*Math.sqrt(Math.max(0,Ki*Ki*ji-Jn*Jn)),Wa=(Jn*Pi-bi*Ua)/ji,oo=(-Jn*bi-Pi*Ua)/ji,Io=(Jn*Pi+bi*Ua)/ji,Ro=(-Jn*bi+Pi*Ua)/ji,$o=Wa-$i,ol=oo-Vn,Yo=Io-$i,vs=Ro-Vn;return $o*$o+ol*ol>Yo*Yo+vs*vs&&(Wa=Io,oo=Ro),[[Wa-Er,oo-rn],[Wa*ue/Ki,oo*ue/Ki]]}function zh(){return!0}function Wc(At){var Ut=yo,ue=Bo,Se=zh,Pe=Fu,Ne=Pe.key,sr=.7;function ar(Er){var rn=[],Jr=[],xn=-1,zn=Er.length,On,$i=Ce(Ut),Vn=Ce(ue);function bi(){rn.push("M",Pe(At(Jr),sr))}for(;++xn1?At.join("L"):At+"Z"}function Dh(At){return At.join("L")+"Z"}function ns(At){for(var Ut=0,ue=At.length,Se=At[0],Pe=[Se[0],",",Se[1]];++Ut1&&Pe.push("H",Se[0]),Pe.join("")}function zs(At){for(var Ut=0,ue=At.length,Se=At[0],Pe=[Se[0],",",Se[1]];++Ut1){ar=Ut[1],Ne=At[Er],Er++,Se+="C"+(Pe[0]+sr[0])+","+(Pe[1]+sr[1])+","+(Ne[0]-ar[0])+","+(Ne[1]-ar[1])+","+Ne[0]+","+Ne[1];for(var rn=2;rn9&&(Ne=ue*3/Math.sqrt(Ne),sr[ar]=Ne*Se,sr[ar+1]=Ne*Pe));for(ar=-1;++ar<=Er;)Ne=(At[Math.min(Er,ar+1)][0]-At[Math.max(0,ar-1)][0])/(6*(1+sr[ar]*sr[ar])),Ut.push([Ne||0,sr[ar]*Ne||0]);return Ut}function ae(At){return At.length<3?Fu(At):At[0]+z(At,Xt(At))}c.svg.line.radial=function(){var At=Wc(_e);return At.radius=At.x,delete At.x,At.angle=At.y,delete At.y,At};function _e(At){for(var Ut,ue=-1,Se=At.length,Pe,Ne;++uegt)+",1 "+xn}function rn(Jr,xn,zn,On){return"Q 0,0 "+On}return Ne.radius=function(Jr){return arguments.length?(ue=Ce(Jr),Ne):ue},Ne.source=function(Jr){return arguments.length?(At=Ce(Jr),Ne):At},Ne.target=function(Jr){return arguments.length?(Ut=Ce(Jr),Ne):Ut},Ne.startAngle=function(Jr){return arguments.length?(Se=Ce(Jr),Ne):Se},Ne.endAngle=function(Jr){return arguments.length?(Pe=Ce(Jr),Ne):Pe},Ne};function $e(At){return At.radius}c.svg.diagonal=function(){var At=je,Ut=De,ue=wr;function Se(Pe,Ne){var sr=At.call(this,Pe,Ne),ar=Ut.call(this,Pe,Ne),Er=(sr.y+ar.y)/2,rn=[sr,{x:sr.x,y:Er},{x:ar.x,y:Er},ar];return rn=rn.map(ue),"M"+rn[0]+"C"+rn[1]+" "+rn[2]+" "+rn[3]}return Se.source=function(Pe){return arguments.length?(At=Ce(Pe),Se):At},Se.target=function(Pe){return arguments.length?(Ut=Ce(Pe),Se):Ut},Se.projection=function(Pe){return arguments.length?(ue=Pe,Se):ue},Se};function wr(At){return[At.x,At.y]}c.svg.diagonal.radial=function(){var At=c.svg.diagonal(),Ut=wr,ue=At.projection;return At.projection=function(Se){return arguments.length?ue(Or(Ut=Se)):Ut},At};function Or(At){return function(){var Ut=At.apply(this,arguments),ue=Ut[0],Se=Ut[1]-re;return[ue*Math.cos(Se),ue*Math.sin(Se)]}}c.svg.symbol=function(){var At=en,Ut=Nr;function ue(Se,Pe){return(In.get(At.call(this,Se,Pe))||vn)(Ut.call(this,Se,Pe))}return ue.type=function(Se){return arguments.length?(At=Ce(Se),ue):At},ue.size=function(Se){return arguments.length?(Ut=Ce(Se),ue):Ut},ue};function Nr(){return 64}function en(){return"circle"}function vn(At){var Ut=Math.sqrt(At/gt);return"M0,"+Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+-Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+Ut+"Z"}var In=c.map({circle:vn,cross:function(At){var Ut=Math.sqrt(At/5)/2;return"M"+-3*Ut+","+-Ut+"H"+-Ut+"V"+-3*Ut+"H"+Ut+"V"+-Ut+"H"+3*Ut+"V"+Ut+"H"+Ut+"V"+3*Ut+"H"+-Ut+"V"+Ut+"H"+-3*Ut+"Z"},diamond:function(At){var Ut=Math.sqrt(At/(2*si)),ue=Ut*si;return"M0,"+-Ut+"L"+ue+",0 0,"+Ut+" "+-ue+",0Z"},square:function(At){var Ut=Math.sqrt(At)/2;return"M"+-Ut+","+-Ut+"L"+Ut+","+-Ut+" "+Ut+","+Ut+" "+-Ut+","+Ut+"Z"},"triangle-down":function(At){var Ut=Math.sqrt(At/jn),ue=Ut*jn/2;return"M0,"+ue+"L"+Ut+","+-ue+" "+-Ut+","+-ue+"Z"},"triangle-up":function(At){var Ut=Math.sqrt(At/jn),ue=Ut*jn/2;return"M0,"+-ue+"L"+Ut+","+ue+" "+-Ut+","+ue+"Z"}});c.svg.symbolTypes=In.keys();var jn=Math.sqrt(3),si=Math.tan(30*le);it.transition=function(At){for(var Ut=No||++lo,ue=vl(At),Se=[],Pe,Ne,sr=So||{time:Date.now(),ease:ts,delay:0,duration:250},ar=-1,Er=this.length;++ar0;)xn[--ji].call(At,Pi);if(bi>=1)return sr.event&&sr.event.end.call(At,At.__data__,Ut),--Ne.count?delete Ne[Se]:delete At[ue],1}sr||(ar=Pe.time,Er=qi(zn,0,ar),sr=Ne[Se]={tween:new P,time:ar,timer:Er,delay:Pe.delay,duration:Pe.duration,ease:Pe.ease,index:Ut},Pe=null,++Ne.count)}c.svg.axis=function(){var At=c.scale.linear(),Ut=wl,ue=6,Se=6,Pe=3,Ne=[10],sr=null,ar;function Er(rn){rn.each(function(){var Jr=c.select(this),xn=this.__chart__||At,zn=this.__chart__=At.copy(),On=sr??(zn.ticks?zn.ticks.apply(zn,Ne):zn.domain()),$i=ar??(zn.tickFormat?zn.tickFormat.apply(zn,Ne):V),Vn=Jr.selectAll(".tick").data(On,zn),bi=Vn.enter().insert("g",".domain").attr("class","tick").style("opacity",ne),Pi=c.transition(Vn.exit()).style("opacity",ne).remove(),ji=c.transition(Vn.order()).style("opacity",1),Ki=Math.max(ue,0)+Pe,Jn,Ua=gi(zn),Wa=Jr.selectAll(".domain").data([0]),oo=(Wa.enter().append("path").attr("class","domain"),c.transition(Wa));bi.append("line"),bi.append("text");var Io=bi.select("line"),Ro=ji.select("line"),$o=Vn.select("text").text($i),ol=bi.select("text"),Yo=ji.select("text"),vs=Ut==="top"||Ut==="left"?-1:1,Tl,Ku,du,_o;if(Ut==="bottom"||Ut==="top"?(Jn=gu,Tl="x",du="y",Ku="x2",_o="y2",$o.attr("dy",vs<0?"0em":".71em").style("text-anchor","middle"),oo.attr("d","M"+Ua[0]+","+vs*Se+"V0H"+Ua[1]+"V"+vs*Se)):(Jn=$s,Tl="y",du="x",Ku="y2",_o="x2",$o.attr("dy",".32em").style("text-anchor",vs<0?"end":"start"),oo.attr("d","M"+vs*Se+","+Ua[0]+"H0V"+Ua[1]+"H"+vs*Se)),Io.attr(_o,vs*ue),ol.attr(du,vs*Ki),Ro.attr(Ku,0).attr(_o,vs*ue),Yo.attr(Tl,0).attr(du,vs*Ki),zn.rangeBand){var Gs=zn,nl=Gs.rangeBand()/2;xn=zn=function(uu){return Gs(uu)+nl}}else xn.rangeBand?xn=zn:Pi.call(Jn,zn,xn);bi.call(Jn,xn,zn),ji.call(Jn,zn,zn)})}return Er.scale=function(rn){return arguments.length?(At=rn,Er):At},Er.orient=function(rn){return arguments.length?(Ut=rn in Lu?rn+"":wl,Er):Ut},Er.ticks=function(){return arguments.length?(Ne=I(arguments),Er):Ne},Er.tickValues=function(rn){return arguments.length?(sr=rn,Er):sr},Er.tickFormat=function(rn){return arguments.length?(ar=rn,Er):ar},Er.tickSize=function(rn){var Jr=arguments.length;return Jr?(ue=+rn,Se=+arguments[Jr-1],Er):ue},Er.innerTickSize=function(rn){return arguments.length?(ue=+rn,Er):ue},Er.outerTickSize=function(rn){return arguments.length?(Se=+rn,Er):Se},Er.tickPadding=function(rn){return arguments.length?(Pe=+rn,Er):Pe},Er.tickSubdivide=function(){return arguments.length&&Er},Er};var wl="bottom",Lu={top:1,right:1,bottom:1,left:1};function gu(At,Ut,ue){At.attr("transform",function(Se){var Pe=Ut(Se);return"translate("+(isFinite(Pe)?Pe:ue(Se))+",0)"})}function $s(At,Ut,ue){At.attr("transform",function(Se){var Pe=Ut(Se);return"translate(0,"+(isFinite(Pe)?Pe:ue(Se))+")"})}c.svg.brush=function(){var At=mt(Jr,"brushstart","brush","brushend"),Ut=null,ue=null,Se=[0,0],Pe=[0,0],Ne,sr,ar=!0,Er=!0,rn=Yu[0];function Jr(Vn){Vn.each(function(){var bi=c.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",$i).on("touchstart.brush",$i),Pi=bi.selectAll(".background").data([0]);Pi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),bi.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var ji=bi.selectAll(".resize").data(rn,V);ji.exit().remove(),ji.enter().append("g").attr("class",function(Wa){return"resize "+Wa}).style("cursor",function(Wa){return Zs[Wa]}).append("rect").attr("x",function(Wa){return/[ew]$/.test(Wa)?-3:null}).attr("y",function(Wa){return/^[ns]/.test(Wa)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),ji.style("display",Jr.empty()?"none":null);var Ki=c.transition(bi),Jn=c.transition(Pi),Ua;Ut&&(Ua=gi(Ut),Jn.attr("x",Ua[0]).attr("width",Ua[1]-Ua[0]),zn(Ki)),ue&&(Ua=gi(ue),Jn.attr("y",Ua[0]).attr("height",Ua[1]-Ua[0]),On(Ki)),xn(Ki)})}Jr.event=function(Vn){Vn.each(function(){var bi=At.of(this,arguments),Pi={x:Se,y:Pe,i:Ne,j:sr},ji=this.__chart__||Pi;this.__chart__=Pi,No?c.select(this).transition().each("start.brush",function(){Ne=ji.i,sr=ji.j,Se=ji.x,Pe=ji.y,bi({type:"brushstart"})}).tween("brush:brush",function(){var Ki=Yl(Se,Pi.x),Jn=Yl(Pe,Pi.y);return Ne=sr=null,function(Ua){Se=Pi.x=Ki(Ua),Pe=Pi.y=Jn(Ua),bi({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=Pi.i,sr=Pi.j,bi({type:"brush",mode:"resize"}),bi({type:"brushend"})}):(bi({type:"brushstart"}),bi({type:"brush",mode:"resize"}),bi({type:"brushend"}))})};function xn(Vn){Vn.selectAll(".resize").attr("transform",function(bi){return"translate("+Se[+/e$/.test(bi)]+","+Pe[+/^s/.test(bi)]+")"})}function zn(Vn){Vn.select(".extent").attr("x",Se[0]),Vn.selectAll(".extent,.n>rect,.s>rect").attr("width",Se[1]-Se[0])}function On(Vn){Vn.select(".extent").attr("y",Pe[0]),Vn.selectAll(".extent,.e>rect,.w>rect").attr("height",Pe[1]-Pe[0])}function $i(){var Vn=this,bi=c.select(c.event.target),Pi=At.of(Vn,arguments),ji=c.select(Vn),Ki=bi.datum(),Jn=!/^(n|s)$/.test(Ki)&&Ut,Ua=!/^(e|w)$/.test(Ki)&&ue,Wa=bi.classed("extent"),oo=Xr(Vn),Io,Ro=c.mouse(Vn),$o,ol=c.select(e(Vn)).on("keydown.brush",Tl).on("keyup.brush",Ku);if(c.event.changedTouches?ol.on("touchmove.brush",du).on("touchend.brush",Gs):ol.on("mousemove.brush",du).on("mouseup.brush",Gs),ji.interrupt().selectAll("*").interrupt(),Wa)Ro[0]=Se[0]-Ro[0],Ro[1]=Pe[0]-Ro[1];else if(Ki){var Yo=+/w$/.test(Ki),vs=+/^n/.test(Ki);$o=[Se[1-Yo]-Ro[0],Pe[1-vs]-Ro[1]],Ro[0]=Se[Yo],Ro[1]=Pe[vs]}else c.event.altKey&&(Io=Ro.slice());ji.style("pointer-events","none").selectAll(".resize").style("display",null),c.select("body").style("cursor",bi.style("cursor")),Pi({type:"brushstart"}),du();function Tl(){c.event.keyCode==32&&(Wa||(Io=null,Ro[0]-=Se[1],Ro[1]-=Pe[1],Wa=2),lt())}function Ku(){c.event.keyCode==32&&Wa==2&&(Ro[0]+=Se[1],Ro[1]+=Pe[1],Wa=0,lt())}function du(){var nl=c.mouse(Vn),uu=!1;$o&&(nl[0]+=$o[0],nl[1]+=$o[1]),Wa||(c.event.altKey?(Io||(Io=[(Se[0]+Se[1])/2,(Pe[0]+Pe[1])/2]),Ro[0]=Se[+(nl[0]{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=new Date,I=new Date;function S(Mt,ee,ve,oe){function Ae(He){return Mt(He=arguments.length===0?new Date:new Date(+He)),He}return Ae.floor=function(He){return Mt(He=new Date(+He)),He},Ae.ceil=function(He){return Mt(He=new Date(He-1)),ee(He,1),Mt(He),He},Ae.round=function(He){var Ge=Ae(He),cr=Ae.ceil(He);return He-Ge0))return ur;do ur.push(jr=new Date(+He)),ee(He,cr),Mt(He);while(jr=Ge)for(;Mt(Ge),!He(Ge);)Ge.setTime(Ge-1)},function(Ge,cr){if(Ge>=Ge)if(cr<0)for(;++cr<=0;)for(;ee(Ge,-1),!He(Ge););else for(;--cr>=0;)for(;ee(Ge,1),!He(Ge););})},ve&&(Ae.count=function(He,Ge){return g.setTime(+He),I.setTime(+Ge),Mt(g),Mt(I),Math.floor(ve(g,I))},Ae.every=function(He){return He=Math.floor(He),!isFinite(He)||!(He>0)?null:He>1?Ae.filter(oe?function(Ge){return oe(Ge)%He===0}:function(Ge){return Ae.count(0,Ge)%He===0}):Ae}),Ae}var t=S(function(){},function(Mt,ee){Mt.setTime(+Mt+ee)},function(Mt,ee){return ee-Mt});t.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?S(function(ee){ee.setTime(Math.floor(ee/Mt)*Mt)},function(ee,ve){ee.setTime(+ee+ve*Mt)},function(ee,ve){return(ve-ee)/Mt}):t};var e=t.range,r=1e3,a=6e4,n=36e5,o=864e5,i=6048e5,l=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds())},function(Mt,ee){Mt.setTime(+Mt+ee*r)},function(Mt,ee){return(ee-Mt)/r},function(Mt){return Mt.getUTCSeconds()}),f=l.range,x=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getMinutes()}),y=x.range,v=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r-Mt.getMinutes()*a)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getHours()}),T=v.range,u=S(function(Mt){Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setDate(Mt.getDate()+ee)},function(Mt,ee){return(ee-Mt-(ee.getTimezoneOffset()-Mt.getTimezoneOffset())*a)/o},function(Mt){return Mt.getDate()-1}),b=u.range;function _(Mt){return S(function(ee){ee.setDate(ee.getDate()-(ee.getDay()+7-Mt)%7),ee.setHours(0,0,0,0)},function(ee,ve){ee.setDate(ee.getDate()+ve*7)},function(ee,ve){return(ve-ee-(ve.getTimezoneOffset()-ee.getTimezoneOffset())*a)/i})}var P=_(0),M=_(1),C=_(2),A=_(3),h=_(4),p=_(5),k=_(6),w=P.range,B=M.range,O=C.range,j=A.range,V=h.range,H=p.range,F=k.range,U=S(function(Mt){Mt.setDate(1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setMonth(Mt.getMonth()+ee)},function(Mt,ee){return ee.getMonth()-Mt.getMonth()+(ee.getFullYear()-Mt.getFullYear())*12},function(Mt){return Mt.getMonth()}),W=U.range,q=S(function(Mt){Mt.setMonth(0,1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setFullYear(Mt.getFullYear()+ee)},function(Mt,ee){return ee.getFullYear()-Mt.getFullYear()},function(Mt){return Mt.getFullYear()});q.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setFullYear(Math.floor(ee.getFullYear()/Mt)*Mt),ee.setMonth(0,1),ee.setHours(0,0,0,0)},function(ee,ve){ee.setFullYear(ee.getFullYear()+ve*Mt)})};var J=q.range,lt=S(function(Mt){Mt.setUTCSeconds(0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getUTCMinutes()}),yt=lt.range,mt=S(function(Mt){Mt.setUTCMinutes(0,0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getUTCHours()}),st=mt.range,tt=S(function(Mt){Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCDate(Mt.getUTCDate()+ee)},function(Mt,ee){return(ee-Mt)/o},function(Mt){return Mt.getUTCDate()-1}),pt=tt.range;function rt(Mt){return S(function(ee){ee.setUTCDate(ee.getUTCDate()-(ee.getUTCDay()+7-Mt)%7),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCDate(ee.getUTCDate()+ve*7)},function(ee,ve){return(ve-ee)/i})}var at=rt(0),vt=rt(1),it=rt(2),K=rt(3),ft=rt(4),ut=rt(5),kt=rt(6),It=at.range,Pt=vt.range,qt=it.range,Wt=K.range,Jt=ft.range,ge=ut.range,fe=kt.range,pe=S(function(Mt){Mt.setUTCDate(1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCMonth(Mt.getUTCMonth()+ee)},function(Mt,ee){return ee.getUTCMonth()-Mt.getUTCMonth()+(ee.getUTCFullYear()-Mt.getUTCFullYear())*12},function(Mt){return Mt.getUTCMonth()}),se=pe.range,Tt=S(function(Mt){Mt.setUTCMonth(0,1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCFullYear(Mt.getUTCFullYear()+ee)},function(Mt,ee){return ee.getUTCFullYear()-Mt.getUTCFullYear()},function(Mt){return Mt.getUTCFullYear()});Tt.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setUTCFullYear(Math.floor(ee.getUTCFullYear()/Mt)*Mt),ee.setUTCMonth(0,1),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCFullYear(ee.getUTCFullYear()+ve*Mt)})};var Lt=Tt.range;c.timeDay=u,c.timeDays=b,c.timeFriday=p,c.timeFridays=H,c.timeHour=v,c.timeHours=T,c.timeInterval=S,c.timeMillisecond=t,c.timeMilliseconds=e,c.timeMinute=x,c.timeMinutes=y,c.timeMonday=M,c.timeMondays=B,c.timeMonth=U,c.timeMonths=W,c.timeSaturday=k,c.timeSaturdays=F,c.timeSecond=l,c.timeSeconds=f,c.timeSunday=P,c.timeSundays=w,c.timeThursday=h,c.timeThursdays=V,c.timeTuesday=C,c.timeTuesdays=O,c.timeWednesday=A,c.timeWednesdays=j,c.timeWeek=P,c.timeWeeks=w,c.timeYear=q,c.timeYears=J,c.utcDay=tt,c.utcDays=pt,c.utcFriday=ut,c.utcFridays=ge,c.utcHour=mt,c.utcHours=st,c.utcMillisecond=t,c.utcMilliseconds=e,c.utcMinute=lt,c.utcMinutes=yt,c.utcMonday=vt,c.utcMondays=Pt,c.utcMonth=pe,c.utcMonths=se,c.utcSaturday=kt,c.utcSaturdays=fe,c.utcSecond=l,c.utcSeconds=f,c.utcSunday=at,c.utcSundays=It,c.utcThursday=ft,c.utcThursdays=Jt,c.utcTuesday=it,c.utcTuesdays=qt,c.utcWednesday=K,c.utcWednesdays=Wt,c.utcWeek=at,c.utcWeeks=It,c.utcYear=Tt,c.utcYears=Lt,Object.defineProperty(c,"__esModule",{value:!0})})}),Ri=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,Bi()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L);return ne.setFullYear(Gt.y),ne}return new Date(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L)}function S(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(Date.UTC(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L));return ne.setUTCFullYear(Gt.y),ne}return new Date(Date.UTC(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L))}function t(Gt,ne,Ct){return{y:Gt,m:ne,d:Ct,H:0,M:0,S:0,L:0}}function e(Gt){var ne=Gt.dateTime,Ct=Gt.date,gt=Gt.time,St=Gt.periods,Nt=Gt.days,re=Gt.shortDays,le=Gt.months,ke=Gt.shortMonths,Ue=f(St),qe=x(St),or=f(Nt),Sr=x(Nt),Mr=f(re),mr=x(re),Qr=f(le),Wn=x(le),qn=f(ke),ei=x(ke),Di={a:Mi,A:Ni,b:Hi,B:Ji,c:null,d:U,e:U,f:yt,H:W,I:q,j:J,L:lt,m:mt,M:st,p:di,q:za,Q:Ge,s:cr,S:tt,u:pt,U:rt,V:at,w:vt,W:it,x:null,X:null,y:K,Y:ft,Z:ut,"%":He},ui={a:qa,A:Oe,b:ze,B:Br,c:null,d:kt,e:kt,f:Jt,H:It,I:Pt,j:qt,L:Wt,m:ge,M:fe,p:$r,q:Gr,Q:Ge,s:cr,S:pe,u:se,U:Tt,V:Lt,w:Mt,W:ee,x:null,X:null,y:ve,Y:oe,Z:Ae,"%":He},Gn={a:dr,A:_r,b:tn,B:Cn,c:Tn,d:h,e:h,f:j,H:k,I:k,j:p,L:O,m:A,M:w,p:nr,q:C,Q:H,s:F,S:B,u:v,U:T,V:u,w:y,W:b,x:Mn,X:mi,y:P,Y:_,Z:M,"%":V};Di.x=ua(Ct,Di),Di.X=ua(gt,Di),Di.c=ua(ne,Di),ui.x=ua(Ct,ui),ui.X=ua(gt,ui),ui.c=ua(ne,ui);function ua(Rr,Yr){return function(mn){var on=[],Ce=-1,pr=0,Hr=Rr.length,_n,Bn,ri;for(mn instanceof Date||(mn=new Date(+mn));++Ce53)return null;"w"in on||(on.w=1),"Z"in on?(pr=S(t(on.y,0,1)),Hr=pr.getUTCDay(),pr=Hr>4||Hr===0?g.utcMonday.ceil(pr):g.utcMonday(pr),pr=g.utcDay.offset(pr,(on.V-1)*7),on.y=pr.getUTCFullYear(),on.m=pr.getUTCMonth(),on.d=pr.getUTCDate()+(on.w+6)%7):(pr=I(t(on.y,0,1)),Hr=pr.getDay(),pr=Hr>4||Hr===0?g.timeMonday.ceil(pr):g.timeMonday(pr),pr=g.timeDay.offset(pr,(on.V-1)*7),on.y=pr.getFullYear(),on.m=pr.getMonth(),on.d=pr.getDate()+(on.w+6)%7)}else("W"in on||"U"in on)&&("w"in on||(on.w="u"in on?on.u%7:"W"in on?1:0),Hr="Z"in on?S(t(on.y,0,1)).getUTCDay():I(t(on.y,0,1)).getDay(),on.m=0,on.d="W"in on?(on.w+6)%7+on.W*7-(Hr+5)%7:on.w+on.U*7-(Hr+6)%7);return"Z"in on?(on.H+=on.Z/100|0,on.M+=on.Z%100,S(on)):I(on)}}function We(Rr,Yr,mn,on){for(var Ce=0,pr=Yr.length,Hr=mn.length,_n,Bn;Ce=Hr)return-1;if(_n=Yr.charCodeAt(Ce++),_n===37){if(_n=Yr.charAt(Ce++),Bn=Gn[_n in r?Yr.charAt(Ce++):_n],!Bn||(on=Bn(Rr,mn,on))<0)return-1}else if(_n!=mn.charCodeAt(on++))return-1}return on}function nr(Rr,Yr,mn){var on=Ue.exec(Yr.slice(mn));return on?(Rr.p=qe[on[0].toLowerCase()],mn+on[0].length):-1}function dr(Rr,Yr,mn){var on=Mr.exec(Yr.slice(mn));return on?(Rr.w=mr[on[0].toLowerCase()],mn+on[0].length):-1}function _r(Rr,Yr,mn){var on=or.exec(Yr.slice(mn));return on?(Rr.w=Sr[on[0].toLowerCase()],mn+on[0].length):-1}function tn(Rr,Yr,mn){var on=qn.exec(Yr.slice(mn));return on?(Rr.m=ei[on[0].toLowerCase()],mn+on[0].length):-1}function Cn(Rr,Yr,mn){var on=Qr.exec(Yr.slice(mn));return on?(Rr.m=Wn[on[0].toLowerCase()],mn+on[0].length):-1}function Tn(Rr,Yr,mn){return We(Rr,ne,Yr,mn)}function Mn(Rr,Yr,mn){return We(Rr,Ct,Yr,mn)}function mi(Rr,Yr,mn){return We(Rr,gt,Yr,mn)}function Mi(Rr){return re[Rr.getDay()]}function Ni(Rr){return Nt[Rr.getDay()]}function Hi(Rr){return ke[Rr.getMonth()]}function Ji(Rr){return le[Rr.getMonth()]}function di(Rr){return St[+(Rr.getHours()>=12)]}function za(Rr){return 1+~~(Rr.getMonth()/3)}function qa(Rr){return re[Rr.getUTCDay()]}function Oe(Rr){return Nt[Rr.getUTCDay()]}function ze(Rr){return ke[Rr.getUTCMonth()]}function Br(Rr){return le[Rr.getUTCMonth()]}function $r(Rr){return St[+(Rr.getUTCHours()>=12)]}function Gr(Rr){return 1+~~(Rr.getUTCMonth()/3)}return{format:function(Rr){var Yr=ua(Rr+="",Di);return Yr.toString=function(){return Rr},Yr},parse:function(Rr){var Yr=Yi(Rr+="",!1);return Yr.toString=function(){return Rr},Yr},utcFormat:function(Rr){var Yr=ua(Rr+="",ui);return Yr.toString=function(){return Rr},Yr},utcParse:function(Rr){var Yr=Yi(Rr+="",!0);return Yr.toString=function(){return Rr},Yr}}}var r={"-":"",_:" ",0:"0"},a=/^\s*\d+/,n=/^%/,o=/[\\^$*+?|[\]().{}]/g;function i(Gt,ne,Ct){var gt=Gt<0?"-":"",St=(gt?-Gt:Gt)+"",Nt=St.length;return gt+(Nt68?1900:2e3),Ct+gt[0].length):-1}function M(Gt,ne,Ct){var gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ne.slice(Ct,Ct+6));return gt?(Gt.Z=gt[1]?0:-(gt[2]+(gt[3]||"00")),Ct+gt[0].length):-1}function C(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+1));return gt?(Gt.q=gt[0]*3-3,Ct+gt[0].length):-1}function A(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.m=gt[0]-1,Ct+gt[0].length):-1}function h(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.d=+gt[0],Ct+gt[0].length):-1}function p(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.m=0,Gt.d=+gt[0],Ct+gt[0].length):-1}function k(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.H=+gt[0],Ct+gt[0].length):-1}function w(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.M=+gt[0],Ct+gt[0].length):-1}function B(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.S=+gt[0],Ct+gt[0].length):-1}function O(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.L=+gt[0],Ct+gt[0].length):-1}function j(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+6));return gt?(Gt.L=Math.floor(gt[0]/1e3),Ct+gt[0].length):-1}function V(Gt,ne,Ct){var gt=n.exec(ne.slice(Ct,Ct+1));return gt?Ct+gt[0].length:-1}function H(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.Q=+gt[0],Ct+gt[0].length):-1}function F(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.s=+gt[0],Ct+gt[0].length):-1}function U(Gt,ne){return i(Gt.getDate(),ne,2)}function W(Gt,ne){return i(Gt.getHours(),ne,2)}function q(Gt,ne){return i(Gt.getHours()%12||12,ne,2)}function J(Gt,ne){return i(1+g.timeDay.count(g.timeYear(Gt),Gt),ne,3)}function lt(Gt,ne){return i(Gt.getMilliseconds(),ne,3)}function yt(Gt,ne){return lt(Gt,ne)+"000"}function mt(Gt,ne){return i(Gt.getMonth()+1,ne,2)}function st(Gt,ne){return i(Gt.getMinutes(),ne,2)}function tt(Gt,ne){return i(Gt.getSeconds(),ne,2)}function pt(Gt){var ne=Gt.getDay();return ne===0?7:ne}function rt(Gt,ne){return i(g.timeSunday.count(g.timeYear(Gt)-1,Gt),ne,2)}function at(Gt,ne){var Ct=Gt.getDay();return Gt=Ct>=4||Ct===0?g.timeThursday(Gt):g.timeThursday.ceil(Gt),i(g.timeThursday.count(g.timeYear(Gt),Gt)+(g.timeYear(Gt).getDay()===4),ne,2)}function vt(Gt){return Gt.getDay()}function it(Gt,ne){return i(g.timeMonday.count(g.timeYear(Gt)-1,Gt),ne,2)}function K(Gt,ne){return i(Gt.getFullYear()%100,ne,2)}function ft(Gt,ne){return i(Gt.getFullYear()%1e4,ne,4)}function ut(Gt){var ne=Gt.getTimezoneOffset();return(ne>0?"-":(ne*=-1,"+"))+i(ne/60|0,"0",2)+i(ne%60,"0",2)}function kt(Gt,ne){return i(Gt.getUTCDate(),ne,2)}function It(Gt,ne){return i(Gt.getUTCHours(),ne,2)}function Pt(Gt,ne){return i(Gt.getUTCHours()%12||12,ne,2)}function qt(Gt,ne){return i(1+g.utcDay.count(g.utcYear(Gt),Gt),ne,3)}function Wt(Gt,ne){return i(Gt.getUTCMilliseconds(),ne,3)}function Jt(Gt,ne){return Wt(Gt,ne)+"000"}function ge(Gt,ne){return i(Gt.getUTCMonth()+1,ne,2)}function fe(Gt,ne){return i(Gt.getUTCMinutes(),ne,2)}function pe(Gt,ne){return i(Gt.getUTCSeconds(),ne,2)}function se(Gt){var ne=Gt.getUTCDay();return ne===0?7:ne}function Tt(Gt,ne){return i(g.utcSunday.count(g.utcYear(Gt)-1,Gt),ne,2)}function Lt(Gt,ne){var Ct=Gt.getUTCDay();return Gt=Ct>=4||Ct===0?g.utcThursday(Gt):g.utcThursday.ceil(Gt),i(g.utcThursday.count(g.utcYear(Gt),Gt)+(g.utcYear(Gt).getUTCDay()===4),ne,2)}function Mt(Gt){return Gt.getUTCDay()}function ee(Gt,ne){return i(g.utcMonday.count(g.utcYear(Gt)-1,Gt),ne,2)}function ve(Gt,ne){return i(Gt.getUTCFullYear()%100,ne,2)}function oe(Gt,ne){return i(Gt.getUTCFullYear()%1e4,ne,4)}function Ae(){return"+0000"}function He(){return"%"}function Ge(Gt){return+Gt}function cr(Gt){return Math.floor(+Gt/1e3)}var ur;jr({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 jr(Gt){return ur=e(Gt),c.timeFormat=ur.format,c.timeParse=ur.parse,c.utcFormat=ur.utcFormat,c.utcParse=ur.utcParse,ur}var qr="%Y-%m-%dT%H:%M:%S.%LZ";function br(Gt){return Gt.toISOString()}var Xr=Date.prototype.toISOString?br:c.utcFormat(qr);function nn(Gt){var ne=new Date(Gt);return isNaN(ne)?null:ne}var Le=+new Date("2000-01-01T00:00:00.000Z")?nn:c.utcParse(qr);c.isoFormat=Xr,c.isoParse=Le,c.timeFormatDefaultLocale=jr,c.timeFormatLocale=e,Object.defineProperty(c,"__esModule",{value:!0})})}),Li=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function I(A,h){if((p=(A=h?A.toExponential(h-1):A.toExponential()).indexOf("e"))<0)return null;var p,k=A.slice(0,p);return[k.length>1?k[0]+k.slice(2):k,+A.slice(p+1)]}function S(A){return A=I(Math.abs(A)),A?A[1]:NaN}function t(A,h){return function(p,k){for(var w=p.length,B=[],O=0,j=A[0],V=0;w>0&&j>0&&(V+j+1>k&&(j=Math.max(1,k-V)),B.push(p.substring(w-=j,w+j)),!((V+=j+1)>k));)j=A[O=(O+1)%A.length];return B.reverse().join(h)}}function e(A){return function(h){return h.replace(/[0-9]/g,function(p){return A[+p]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(h=r.exec(A)))throw new Error("invalid format: "+A);var h;return new n({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}a.prototype=n.prototype;function n(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}n.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 o(A){t:for(var h=A.length,p=1,k=-1,w;p0&&(k=0);break}return k>0?A.slice(0,k)+A.slice(w+1):A}var i;function l(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1],B=w-(i=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,O=k.length;return B===O?k:B>O?k+new Array(B-O+1).join("0"):B>0?k.slice(0,B)+"."+k.slice(B):"0."+new Array(1-B).join("0")+I(A,Math.max(0,h+B-1))[0]}function f(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1];return w<0?"0."+new Array(-w).join("0")+k:k.length>w+1?k.slice(0,w+1)+"."+k.slice(w+1):k+new Array(w-k.length+2).join("0")}var x={"%":function(A,h){return(A*100).toFixed(h)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:g,e:function(A,h){return A.toExponential(h)},f:function(A,h){return A.toFixed(h)},g:function(A,h){return A.toPrecision(h)},o:function(A){return Math.round(A).toString(8)},p:function(A,h){return f(A*100,h)},r:f,s:l,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var v=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u(A){var h=A.grouping===void 0||A.thousands===void 0?y:t(v.call(A.grouping,Number),A.thousands+""),p=A.currency===void 0?"":A.currency[0]+"",k=A.currency===void 0?"":A.currency[1]+"",w=A.decimal===void 0?".":A.decimal+"",B=A.numerals===void 0?y:e(v.call(A.numerals,String)),O=A.percent===void 0?"%":A.percent+"",j=A.minus===void 0?"-":A.minus+"",V=A.nan===void 0?"NaN":A.nan+"";function H(U){U=a(U);var W=U.fill,q=U.align,J=U.sign,lt=U.symbol,yt=U.zero,mt=U.width,st=U.comma,tt=U.precision,pt=U.trim,rt=U.type;rt==="n"?(st=!0,rt="g"):x[rt]||(tt===void 0&&(tt=12),pt=!0,rt="g"),(yt||W==="0"&&q==="=")&&(yt=!0,W="0",q="=");var at=lt==="$"?p:lt==="#"&&/[boxX]/.test(rt)?"0"+rt.toLowerCase():"",vt=lt==="$"?k:/[%p]/.test(rt)?O:"",it=x[rt],K=/[defgprs%]/.test(rt);tt=tt===void 0?6:/[gprs]/.test(rt)?Math.max(1,Math.min(21,tt)):Math.max(0,Math.min(20,tt));function ft(ut){var kt=at,It=vt,Pt,qt,Wt;if(rt==="c")It=it(ut)+It,ut="";else{ut=+ut;var Jt=ut<0||1/ut<0;if(ut=isNaN(ut)?V:it(Math.abs(ut),tt),pt&&(ut=o(ut)),Jt&&+ut==0&&J!=="+"&&(Jt=!1),kt=(Jt?J==="("?J:j:J==="-"||J==="("?"":J)+kt,It=(rt==="s"?T[8+i/3]:"")+It+(Jt&&J==="("?")":""),K){for(Pt=-1,qt=ut.length;++PtWt||Wt>57){It=(Wt===46?w+ut.slice(Pt+1):ut.slice(Pt))+It,ut=ut.slice(0,Pt);break}}}st&&!yt&&(ut=h(ut,1/0));var ge=kt.length+ut.length+It.length,fe=ge>1)+kt+ut+It+fe.slice(ge);break;default:ut=fe+kt+ut+It;break}return B(ut)}return ft.toString=function(){return U+""},ft}function F(U,W){var q=H((U=a(U),U.type="f",U)),J=Math.max(-8,Math.min(8,Math.floor(S(W)/3)))*3,lt=Math.pow(10,-J),yt=T[8+J/3];return function(mt){return q(lt*mt)+yt}}return{format:H,formatPrefix:F}}var b;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return b=u(A),c.format=b.format,c.formatPrefix=b.formatPrefix,b}function P(A){return Math.max(0,-S(Math.abs(A)))}function M(A,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(h)/3)))*3-S(Math.abs(A)))}function C(A,h){return A=Math.abs(A),h=Math.abs(h)-A,Math.max(0,S(h)-S(A))+1}c.FormatSpecifier=n,c.formatDefaultLocale=_,c.formatLocale=u,c.formatSpecifier=a,c.precisionFixed=P,c.precisionPrefix=M,c.precisionRound=C,Object.defineProperty(c,"__esModule",{value:!0})})}),$n=Dt((Q,Z)=>{Z.exports=function(c){for(var g=c.length,I,S=0;S13)&&I!==32&&I!==133&&I!==160&&I!==5760&&I!==6158&&(I<8192||I>8205)&&I!==8232&&I!==8233&&I!==8239&&I!==8287&&I!==8288&&I!==12288&&I!==65279)return!1;return!0}}),Hn=Dt((Q,Z)=>{var c=$n();Z.exports=function(g){var I=typeof g;if(I==="string"){var S=g;if(g=+g,g===0&&c(S))return!1}else if(I!=="number")return!1;return g-g<1}}),sa=Dt((Q,Z)=>{Z.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:"−"}}),Ti=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c["base64-arraybuffer"]={}))})(Q,function(c){for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=g[(a[n]&3)<<4|a[n+1]>>4],i+=g[(a[n+1]&15)<<2|a[n+2]>>6],i+=g[a[n+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(r){var a=r.length*.75,n=r.length,o,i=0,l,f,x,y;r[r.length-1]==="="&&(a--,r[r.length-2]==="="&&a--);var v=new ArrayBuffer(a),T=new Uint8Array(v);for(o=0;o>4,T[i++]=(f&15)<<4|x>>2,T[i++]=(x&3)<<6|y&63;return v};c.decode=e,c.encode=t,Object.defineProperty(c,"__esModule",{value:!0})})}),Qn=Dt((Q,Z)=>{Z.exports=function(c){return window&&window.process&&window.process.versions?Object.prototype.toString.call(c)==="[object Object]":Object.prototype.toString.call(c)==="[object Object]"&&Object.getPrototypeOf(c).hasOwnProperty("hasOwnProperty")}}),la=Dt(Q=>{var Z=Ti().decode,c=Qn(),g=Array.isArray,I=ArrayBuffer,S=DataView;function t(l){return I.isView(l)&&!(l instanceof S)}Q.isTypedArray=t;function e(l){return g(l)||t(l)}Q.isArrayOrTypedArray=e;function r(l){return!e(l[0])}Q.isArray1D=r,Q.ensureArray=function(l,f){return g(l)||(l=[]),l.length=f,l};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function n(l){return l.constructor===ArrayBuffer}Q.isArrayBuffer=n,Q.decodeTypedArraySpec=function(l){var f=[],x=o(l),y=x.dtype,v=a[y];if(!v)throw new Error('Error in dtype: "'+y+'"');var T=v.BYTES_PER_ELEMENT,u=x.bdata;n(u)||(u=Z(u));var b=x.shape===void 0?[u.byteLength/T]:(""+x.shape).split(",");b.reverse();var _=b.length,P,M,C=+b[0],A=T*C,h=0;if(_===1)f=new v(u);else if(_===2)for(P=+b[1],M=0;M{var c=Hn(),g=la().isArrayOrTypedArray;Z.exports=function(i,l){if(c(l))l=String(l);else if(typeof l!="string"||l.substr(l.length-4)==="[-1]")throw"bad property string";var f=l.split("."),x,y,v,T;for(T=0;T{var c=Eo(),g=/^\w*$/,I=0,S=1,t=2,e=3,r=4;Z.exports=function(a,n,o,i){o=o||"name",i=i||"value";var l,f,x,y={};n&&n.length?(x=c(a,n),f=x.get()):f=a,n=n||"";var v={};if(f)for(l=0;l2)return y[_]=y[_]|t,u.set(b,null);if(T){for(l=_;l{var c=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;Z.exports=function(I,S){for(;S;){var t=I.match(c);if(t)I=t[1];else if(I.match(g))I="";else throw new Error("bad relativeAttr call:"+[I,S]);if(S.charAt(0)==="^")S=S.slice(1);else break}return I&&S.charAt(0)!=="["?I+"."+S:I+S}}),Ts=Dt((Q,Z)=>{var c=Hn();Z.exports=function(g,I){if(g>0)return Math.log(g)/Math.LN10;var S=Math.log(Math.min(I[0],I[1]))/Math.LN10;return c(S)||(S=Math.log(Math.max(I[0],I[1]))/Math.LN10-6),S}}),xl=Dt((Q,Z)=>{var c=la().isArrayOrTypedArray,g=Qn();Z.exports=function I(S,t){for(var e in t){var r=t[e],a=S[e];if(a!==r)if(e.charAt(0)==="_"||typeof r=="function"){if(e in S)continue;S[e]=r}else if(c(r)&&c(a)&&g(r[0])){if(e==="customdata"||e==="ids")continue;for(var n=Math.min(r.length,a.length),o=0;o{function c(I,S){var t=I%S;return t<0?t+S:t}function g(I,S){return Math.abs(I)>S/2?I-Math.round(I/S)*S:I}Z.exports={mod:c,modHalf:g}}),ro=Dt((Q,Z)=>{(function(c){var g=/^\s+/,I=/\s+$/,S=0,t=c.round,e=c.min,r=c.max,a=c.random;function n(K,ft){if(K=K||"",ft=ft||{},K instanceof n)return K;if(!(this instanceof n))return new n(K,ft);var ut=o(K);this._originalInput=K,this._r=ut.r,this._g=ut.g,this._b=ut.b,this._a=ut.a,this._roundA=t(100*this._a)/100,this._format=ft.format||ut.format,this._gradientType=ft.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ut.ok,this._tc_id=S++}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var K=this.toRgb();return(K.r*299+K.g*587+K.b*114)/1e3},getLuminance:function(){var K=this.toRgb(),ft,ut,kt,It,Pt,qt;return ft=K.r/255,ut=K.g/255,kt=K.b/255,ft<=.03928?It=ft/12.92:It=c.pow((ft+.055)/1.055,2.4),ut<=.03928?Pt=ut/12.92:Pt=c.pow((ut+.055)/1.055,2.4),kt<=.03928?qt=kt/12.92:qt=c.pow((kt+.055)/1.055,2.4),.2126*It+.7152*Pt+.0722*qt},setAlpha:function(K){return this._a=U(K),this._roundA=t(100*this._a)/100,this},toHsv:function(){var K=x(this._r,this._g,this._b);return{h:K.h*360,s:K.s,v:K.v,a:this._a}},toHsvString:function(){var K=x(this._r,this._g,this._b),ft=t(K.h*360),ut=t(K.s*100),kt=t(K.v*100);return this._a==1?"hsv("+ft+", "+ut+"%, "+kt+"%)":"hsva("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHsl:function(){var K=l(this._r,this._g,this._b);return{h:K.h*360,s:K.s,l:K.l,a:this._a}},toHslString:function(){var K=l(this._r,this._g,this._b),ft=t(K.h*360),ut=t(K.s*100),kt=t(K.l*100);return this._a==1?"hsl("+ft+", "+ut+"%, "+kt+"%)":"hsla("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHex:function(K){return v(this._r,this._g,this._b,K)},toHexString:function(K){return"#"+this.toHex(K)},toHex8:function(K){return T(this._r,this._g,this._b,this._a,K)},toHex8String:function(K){return"#"+this.toHex8(K)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(W(this._r,255)*100)+"%",g:t(W(this._g,255)*100)+"%",b:t(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%)":"rgba("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(K){var ft="#"+u(this._r,this._g,this._b,this._a),ut=ft,kt=this._gradientType?"GradientType = 1, ":"";if(K){var It=n(K);ut="#"+u(It._r,It._g,It._b,It._a)}return"progid:DXImageTransform.Microsoft.gradient("+kt+"startColorstr="+ft+",endColorstr="+ut+")"},toString:function(K){var ft=!!K;K=K||this._format;var ut=!1,kt=this._a<1&&this._a>=0,It=!ft&&kt&&(K==="hex"||K==="hex6"||K==="hex3"||K==="hex4"||K==="hex8"||K==="name");return It?K==="name"&&this._a===0?this.toName():this.toRgbString():(K==="rgb"&&(ut=this.toRgbString()),K==="prgb"&&(ut=this.toPercentageRgbString()),(K==="hex"||K==="hex6")&&(ut=this.toHexString()),K==="hex3"&&(ut=this.toHexString(!0)),K==="hex4"&&(ut=this.toHex8String(!0)),K==="hex8"&&(ut=this.toHex8String()),K==="name"&&(ut=this.toName()),K==="hsl"&&(ut=this.toHslString()),K==="hsv"&&(ut=this.toHsvString()),ut||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(K,ft){var ut=K.apply(null,[this].concat([].slice.call(ft)));return this._r=ut._r,this._g=ut._g,this._b=ut._b,this.setAlpha(ut._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(P,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(K,ft){return K.apply(null,[this].concat([].slice.call(ft)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(B,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(K,ft){if(typeof K=="object"){var ut={};for(var kt in K)K.hasOwnProperty(kt)&&(kt==="a"?ut[kt]=K[kt]:ut[kt]=st(K[kt]));K=ut}return n(K,ft)};function o(K){var ft={r:0,g:0,b:0},ut=1,kt=null,It=null,Pt=null,qt=!1,Wt=!1;return typeof K=="string"&&(K=vt(K)),typeof K=="object"&&(at(K.r)&&at(K.g)&&at(K.b)?(ft=i(K.r,K.g,K.b),qt=!0,Wt=String(K.r).substr(-1)==="%"?"prgb":"rgb"):at(K.h)&&at(K.s)&&at(K.v)?(kt=st(K.s),It=st(K.v),ft=y(K.h,kt,It),qt=!0,Wt="hsv"):at(K.h)&&at(K.s)&&at(K.l)&&(kt=st(K.s),Pt=st(K.l),ft=f(K.h,kt,Pt),qt=!0,Wt="hsl"),K.hasOwnProperty("a")&&(ut=K.a)),ut=U(ut),{ok:qt,format:K.format||Wt,r:e(255,r(ft.r,0)),g:e(255,r(ft.g,0)),b:e(255,r(ft.b,0)),a:ut}}function i(K,ft,ut){return{r:W(K,255)*255,g:W(ft,255)*255,b:W(ut,255)*255}}function l(K,ft,ut){K=W(K,255),ft=W(ft,255),ut=W(ut,255);var kt=r(K,ft,ut),It=e(K,ft,ut),Pt,qt,Wt=(kt+It)/2;if(kt==It)Pt=qt=0;else{var Jt=kt-It;switch(qt=Wt>.5?Jt/(2-kt-It):Jt/(kt+It),kt){case K:Pt=(ft-ut)/Jt+(ft1&&(pe-=1),pe<1/6?ge+(fe-ge)*6*pe:pe<1/2?fe:pe<2/3?ge+(fe-ge)*(2/3-pe)*6:ge}if(ft===0)kt=It=Pt=ut;else{var Wt=ut<.5?ut*(1+ft):ut+ft-ut*ft,Jt=2*ut-Wt;kt=qt(Jt,Wt,K+1/3),It=qt(Jt,Wt,K),Pt=qt(Jt,Wt,K-1/3)}return{r:kt*255,g:It*255,b:Pt*255}}function x(K,ft,ut){K=W(K,255),ft=W(ft,255),ut=W(ut,255);var kt=r(K,ft,ut),It=e(K,ft,ut),Pt,qt,Wt=kt,Jt=kt-It;if(qt=kt===0?0:Jt/kt,kt==It)Pt=0;else{switch(kt){case K:Pt=(ft-ut)/Jt+(ft>1)+720)%360;--ft;)kt.h=(kt.h+It)%360,Pt.push(n(kt));return Pt}function j(K,ft){ft=ft||6;for(var ut=n(K).toHsv(),kt=ut.h,It=ut.s,Pt=ut.v,qt=[],Wt=1/ft;ft--;)qt.push(n({h:kt,s:It,v:Pt})),Pt=(Pt+Wt)%1;return qt}n.mix=function(K,ft,ut){ut=ut===0?0:ut||50;var kt=n(K).toRgb(),It=n(ft).toRgb(),Pt=ut/100,qt={r:(It.r-kt.r)*Pt+kt.r,g:(It.g-kt.g)*Pt+kt.g,b:(It.b-kt.b)*Pt+kt.b,a:(It.a-kt.a)*Pt+kt.a};return n(qt)},n.readability=function(K,ft){var ut=n(K),kt=n(ft);return(c.max(ut.getLuminance(),kt.getLuminance())+.05)/(c.min(ut.getLuminance(),kt.getLuminance())+.05)},n.isReadable=function(K,ft,ut){var kt=n.readability(K,ft),It,Pt;switch(Pt=!1,It=it(ut),It.level+It.size){case"AAsmall":case"AAAlarge":Pt=kt>=4.5;break;case"AAlarge":Pt=kt>=3;break;case"AAAsmall":Pt=kt>=7;break}return Pt},n.mostReadable=function(K,ft,ut){var kt=null,It=0,Pt,qt,Wt,Jt;ut=ut||{},qt=ut.includeFallbackColors,Wt=ut.level,Jt=ut.size;for(var ge=0;geIt&&(It=Pt,kt=n(ft[ge]));return n.isReadable(K,kt,{level:Wt,size:Jt})||!qt?kt:(ut.includeFallbackColors=!1,n.mostReadable(K,["#fff","#000"],ut))};var V=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=n.hexNames=F(V);function F(K){var ft={};for(var ut in K)K.hasOwnProperty(ut)&&(ft[K[ut]]=ut);return ft}function U(K){return K=parseFloat(K),(isNaN(K)||K<0||K>1)&&(K=1),K}function W(K,ft){lt(K)&&(K="100%");var ut=yt(K);return K=e(ft,r(0,parseFloat(K))),ut&&(K=parseInt(K*ft,10)/100),c.abs(K-ft)<1e-6?1:K%ft/parseFloat(ft)}function q(K){return e(1,r(0,K))}function J(K){return parseInt(K,16)}function lt(K){return typeof K=="string"&&K.indexOf(".")!=-1&&parseFloat(K)===1}function yt(K){return typeof K=="string"&&K.indexOf("%")!=-1}function mt(K){return K.length==1?"0"+K:""+K}function st(K){return K<=1&&(K=K*100+"%"),K}function tt(K){return c.round(parseFloat(K)*255).toString(16)}function pt(K){return J(K)/255}var rt=function(){var K="[-\\+]?\\d+%?",ft="[-\\+]?\\d*\\.\\d+%?",ut="(?:"+ft+")|(?:"+K+")",kt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?",It="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?";return{CSS_UNIT:new RegExp(ut),rgb:new RegExp("rgb"+kt),rgba:new RegExp("rgba"+It),hsl:new RegExp("hsl"+kt),hsla:new RegExp("hsla"+It),hsv:new RegExp("hsv"+kt),hsva:new RegExp("hsva"+It),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function at(K){return!!rt.CSS_UNIT.exec(K)}function vt(K){K=K.replace(g,"").replace(I,"").toLowerCase();var ft=!1;if(V[K])K=V[K],ft=!0;else if(K=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ut;return(ut=rt.rgb.exec(K))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=rt.rgba.exec(K))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=rt.hsl.exec(K))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=rt.hsla.exec(K))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=rt.hsv.exec(K))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=rt.hsva.exec(K))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=rt.hex8.exec(K))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),a:pt(ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex6.exec(K))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),format:ft?"name":"hex"}:(ut=rt.hex4.exec(K))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),a:pt(ut[4]+""+ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex3.exec(K))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),format:ft?"name":"hex"}:!1}function it(K){var ft,ut;return K=K||{level:"AA",size:"small"},ft=(K.level||"AA").toUpperCase(),ut=(K.size||"small").toLowerCase(),ft!=="AA"&&ft!=="AAA"&&(ft="AA"),ut!=="small"&&ut!=="large"&&(ut="small"),{level:ft,size:ut}}typeof Z<"u"&&Z.exports?Z.exports=n:window.tinycolor=n})(Math)}),Ia=Dt(Q=>{var Z=Qn(),c=Array.isArray;function g(S,t){var e,r;for(e=0;e{Z.exports=function(c){var g=c.variantValues,I=c.editType,S=c.colorEditType;S===void 0&&(S=I);var t={editType:I,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};c.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var e={family:{valType:"string",noBlank:!0,strict:!0,editType:I},size:{valType:"number",min:1,editType:I},color:{valType:"color",editType:S},weight:t,style:{editType:I,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:c.noFontVariant?void 0:{editType:I,valType:"enumerated",values:g||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:c.noFontTextcase?void 0:{editType:I,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:c.noFontLineposition?void 0:{editType:I,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:c.noFontShadow?void 0:{editType:I,valType:"string",dflt:c.autoShadowDflt?"auto":"none"},editType:I};return c.autoSize&&(e.size.dflt="auto"),c.autoColor&&(e.color.dflt="auto"),c.arrayOk&&(e.family.arrayOk=!0,e.weight.arrayOk=!0,e.style.arrayOk=!0,c.noFontVariant||(e.variant.arrayOk=!0),c.noFontTextcase||(e.textcase.arrayOk=!0),c.noFontLineposition||(e.lineposition.arrayOk=!0),c.noFontShadow||(e.shadow.arrayOk=!0),e.size.arrayOk=!0,e.color.arrayOk=!0),e}}),io=Dt((Q,Z)=>{Z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),po=Dt((Q,Z)=>{var c=io(),g=ma(),I=g({editType:"none"});I.family.dflt=c.HOVERFONT,I.size.dflt=c.HOVERFONTSIZE,Z.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:I,grouptitlefont:g({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"}}}),us=Dt((Q,Z)=>{var c=ma(),g=po().hoverlabel,I=Ia().extendFlat;Z.exports={hoverlabel:{bgcolor:I({},g.bgcolor,{arrayOk:!0}),bordercolor:I({},g.bordercolor,{arrayOk:!0}),font:c({arrayOk:!0,editType:"none"}),align:I({},g.align,{arrayOk:!0}),namelength:I({},g.namelength,{arrayOk:!0}),showarrow:I({},g.showarrow),editType:"none"}}}),qo=Dt((Q,Z)=>{var c=ma(),g=us();Z.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:c({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:g.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),_i=Dt((Q,Z)=>{var c=ro(),g={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)"]]},I=g.RdBu;function S(r,a){if(a||(a=I),!r)return a;function n(){try{r=g[r]||JSON.parse(r)}catch{r=a}}return typeof r=="string"&&(n(),typeof r=="string"&&n()),t(r)?r:a}function t(r){var a=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var n=0;n{Q.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Q.defaultLine="#444",Q.lightLine="#eee",Q.background="#fff",Q.borderLine="#BEC8D9",Q.lightFraction=1e3/11}),pi=Dt((Q,Z)=>{var c=ro(),g=Hn(),I=la().isTypedArray,S=Z.exports={},t=Ai();S.defaults=t.defaults;var e=S.defaultLine=t.defaultLine;S.lightLine=t.lightLine;var r=S.background=t.background;S.tinyRGB=function(n){var o=n.toRgb();return"rgb("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+")"},S.rgb=function(n){return S.tinyRGB(c(n))},S.opacity=function(n){return n?c(n).getAlpha():0},S.addOpacity=function(n,o){var i=c(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+o+")"},S.combine=function(n,o){var i=c(n).toRgb();if(i.a===1)return c(n).toRgbString();var l=c(o||r).toRgb(),f=l.a===1?l:{r:255*(1-l.a)+l.r*l.a,g:255*(1-l.a)+l.g*l.a,b:255*(1-l.a)+l.b*l.a},x={r:f.r*(1-i.a)+i.r*i.a,g:f.g*(1-i.a)+i.g*i.a,b:f.b*(1-i.a)+i.b*i.a};return c(x).toRgbString()},S.interpolate=function(n,o,i){var l=c(n).toRgb(),f=c(o).toRgb(),x={r:i*l.r+(1-i)*f.r,g:i*l.g+(1-i)*f.g,b:i*l.b+(1-i)*f.b};return c(x).toRgbString()},S.contrast=function(n,o,i){var l=c(n);l.getAlpha()!==1&&(l=c(S.combine(n,r)));var f=l.isDark()?o?l.lighten(o):r:i?l.darken(i):e;return f.toString()},S.stroke=function(n,o){var i=c(o);n.style({stroke:S.tinyRGB(i),"stroke-opacity":i.getAlpha()})},S.fill=function(n,o){var i=c(o);n.style({fill:S.tinyRGB(i),"fill-opacity":i.getAlpha()})},S.clean=function(n){if(!(!n||typeof n!="object")){var o=Object.keys(n),i,l,f,x;for(i=0;i=0)))return n;if(x===3)l[x]>1&&(l[x]=1);else if(l[x]>=1)return n}var y=Math.round(l[0]*255)+", "+Math.round(l[1]*255)+", "+Math.round(l[2]*255);return f?"rgba("+y+", "+l[3]+")":"rgb("+y+")"}}),go=Dt((Q,Z)=>{Z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),Mo=Dt(Q=>{Q.counter=function(Z,c,g,I){var S=(c||"")+(g?"":"$"),t=I===!1?"":"^";return Z==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+S):new RegExp(t+Z+"([2-9]|[1-9][0-9]+)?"+S)}}),To=Dt(Q=>{var Z=Hn(),c=ro(),g=Ia().extendFlat,I=qo(),S=_i(),t=pi(),e=go().DESELECTDIM,r=Eo(),a=Mo().counter,n=ko().modHalf,o=la().isArrayOrTypedArray,i=la().isTypedArraySpec,l=la().decodeTypedArraySpec;Q.valObjectMeta={data_array:{coerceFunction:function(x,y,v){y.set(o(x)?x:i(x)?l(x):v)}},enumerated:{coerceFunction:function(x,y,v,T){T.coerceNumber&&(x=+x),T.values.indexOf(x)===-1?y.set(v):y.set(x)},validateFunction:function(x,y){y.coerceNumber&&(x=+x);for(var v=y.values,T=0;TT.max?y.set(v):y.set(+x)}},integer:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}i(x)&&(x=l(x)),x%1||!Z(x)||T.min!==void 0&&xT.max?y.set(v):y.set(+x)}},string:{coerceFunction:function(x,y,v,T){if(typeof x!="string"){var u=typeof x=="number";T.strict===!0||!u?y.set(v):y.set(String(x))}else T.noBlank&&!x?y.set(v):y.set(x)}},color:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),c(x).isValid()?y.set(x):y.set(v)}},colorlist:{coerceFunction:function(x,y,v){function T(u){return c(u).isValid()}!Array.isArray(x)||!x.length?y.set(v):x.every(T)?y.set(x):y.set(v)}},colorscale:{coerceFunction:function(x,y,v){y.set(S.get(x,v))}},angle:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),x==="auto"?y.set("auto"):Z(x)?y.set(n(+x,360)):y.set(v)}},subplotid:{coerceFunction:function(x,y,v,T){var u=T.regex||a(v);if(typeof x=="string"&&u.test(x)){y.set(x);return}y.set(v)},validateFunction:function(x,y){var v=y.dflt;return x===v?!0:typeof x!="string"?!1:!!a(v).test(x)}},flaglist:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}if(typeof x!="string"){y.set(v);return}for(var u=x.split("+"),b=0;b{var c={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},g={};function I(S,t){for(var e in S){var r=S[e];r.valType?t[e]=r.dflt:(t[e]||(t[e]={}),I(r,t[e]))}}I(c,g),Z.exports={configAttributes:c,dfltConfig:g}}),bs=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=[];Z.exports=function(S,t){if(I.indexOf(S)!==-1)return;I.push(S);var e=1e3;g(t)?e=t:t==="long"&&(e=3e3);var r=c.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(I);function n(o){o.duration(700).style("opacity",0).each("end",function(i){var l=I.indexOf(i);l!==-1&&I.splice(l,1),c.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var i=c.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(n)});for(var l=i.append("p"),f=o.split(//g),x=0;x{var c=ms().dfltConfig,g=bs(),I=Z.exports={};I.log=function(){var S;if(c.logging>1){var t=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},I.warn=function(){var S;if(c.logging>0){var t=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},I.error=function(){var S;if(c.logging>0){var t=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}),Ko=Dt((Q,Z)=>{Z.exports=function(){}}),Dl=Dt((Q,Z)=>{Z.exports=function(c,g){if(g instanceof RegExp){for(var I=g.toString(),S=0;S{Z.exports=c;function c(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Nl=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=new Float32Array(16);return I[0]=g[0],I[1]=g[1],I[2]=g[2],I[3]=g[3],I[4]=g[4],I[5]=g[5],I[6]=g[6],I[7]=g[7],I[8]=g[8],I[9]=g[9],I[10]=g[10],I[11]=g[11],I[12]=g[12],I[13]=g[13],I[14]=g[14],I[15]=g[15],I}}),vu=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),tc=Dt((Q,Z)=>{Z.exports=c;function c(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),dh=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(g===I){var S=I[1],t=I[2],e=I[3],r=I[6],a=I[7],n=I[11];g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=S,g[6]=I[9],g[7]=I[13],g[8]=t,g[9]=r,g[11]=I[14],g[12]=e,g[13]=a,g[14]=n}else g[0]=I[0],g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=I[1],g[5]=I[5],g[6]=I[9],g[7]=I[13],g[8]=I[2],g[9]=I[6],g[10]=I[10],g[11]=I[14],g[12]=I[3],g[13]=I[7],g[14]=I[11],g[15]=I[15];return g}}),Fc=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15],_=S*n-t*a,P=S*o-e*a,M=S*i-r*a,C=t*o-e*n,A=t*i-r*n,h=e*i-r*o,p=l*T-f*v,k=l*u-x*v,w=l*b-y*v,B=f*u-x*T,O=f*b-y*T,j=x*b-y*u,V=_*j-P*O+M*B+C*w-A*k+h*p;return V?(V=1/V,g[0]=(n*j-o*O+i*B)*V,g[1]=(e*O-t*j-r*B)*V,g[2]=(T*h-u*A+b*C)*V,g[3]=(x*A-f*h-y*C)*V,g[4]=(o*w-a*j-i*k)*V,g[5]=(S*j-e*w+r*k)*V,g[6]=(u*M-v*h-b*P)*V,g[7]=(l*h-x*M+y*P)*V,g[8]=(a*O-n*w+i*p)*V,g[9]=(t*w-S*O-r*p)*V,g[10]=(v*A-T*M+b*_)*V,g[11]=(f*M-l*A-y*_)*V,g[12]=(n*k-a*B-o*p)*V,g[13]=(S*B-t*k+e*p)*V,g[14]=(T*P-v*C-u*_)*V,g[15]=(l*C-f*P+x*_)*V,g):null}}),sp=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15];return g[0]=n*(x*b-y*u)-f*(o*b-i*u)+T*(o*y-i*x),g[1]=-(t*(x*b-y*u)-f*(e*b-r*u)+T*(e*y-r*x)),g[2]=t*(o*b-i*u)-n*(e*b-r*u)+T*(e*i-r*o),g[3]=-(t*(o*y-i*x)-n*(e*y-r*x)+f*(e*i-r*o)),g[4]=-(a*(x*b-y*u)-l*(o*b-i*u)+v*(o*y-i*x)),g[5]=S*(x*b-y*u)-l*(e*b-r*u)+v*(e*y-r*x),g[6]=-(S*(o*b-i*u)-a*(e*b-r*u)+v*(e*i-r*o)),g[7]=S*(o*y-i*x)-a*(e*y-r*x)+l*(e*i-r*o),g[8]=a*(f*b-y*T)-l*(n*b-i*T)+v*(n*y-i*f),g[9]=-(S*(f*b-y*T)-l*(t*b-r*T)+v*(t*y-r*f)),g[10]=S*(n*b-i*T)-a*(t*b-r*T)+v*(t*i-r*n),g[11]=-(S*(n*y-i*f)-a*(t*y-r*f)+l*(t*i-r*n)),g[12]=-(a*(f*u-x*T)-l*(n*u-o*T)+v*(n*x-o*f)),g[13]=S*(f*u-x*T)-l*(t*u-e*T)+v*(t*x-e*f),g[14]=-(S*(n*u-o*T)-a*(t*u-e*T)+v*(t*o-e*n)),g[15]=S*(n*x-o*f)-a*(t*x-e*f)+l*(t*o-e*n),g}}),Kd=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=g[0],S=g[1],t=g[2],e=g[3],r=g[4],a=g[5],n=g[6],o=g[7],i=g[8],l=g[9],f=g[10],x=g[11],y=g[12],v=g[13],T=g[14],u=g[15],b=I*a-S*r,_=I*n-t*r,P=I*o-e*r,M=S*n-t*a,C=S*o-e*a,A=t*o-e*n,h=i*v-l*y,p=i*T-f*y,k=i*u-x*y,w=l*T-f*v,B=l*u-x*v,O=f*u-x*T;return b*O-_*B+P*w+M*k-C*p+A*h}}),e0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=I[4],o=I[5],i=I[6],l=I[7],f=I[8],x=I[9],y=I[10],v=I[11],T=I[12],u=I[13],b=I[14],_=I[15],P=S[0],M=S[1],C=S[2],A=S[3];return g[0]=P*t+M*n+C*f+A*T,g[1]=P*e+M*o+C*x+A*u,g[2]=P*r+M*i+C*y+A*b,g[3]=P*a+M*l+C*v+A*_,P=S[4],M=S[5],C=S[6],A=S[7],g[4]=P*t+M*n+C*f+A*T,g[5]=P*e+M*o+C*x+A*u,g[6]=P*r+M*i+C*y+A*b,g[7]=P*a+M*l+C*v+A*_,P=S[8],M=S[9],C=S[10],A=S[11],g[8]=P*t+M*n+C*f+A*T,g[9]=P*e+M*o+C*x+A*u,g[10]=P*r+M*i+C*y+A*b,g[11]=P*a+M*l+C*v+A*_,P=S[12],M=S[13],C=S[14],A=S[15],g[12]=P*t+M*n+C*f+A*T,g[13]=P*e+M*o+C*x+A*u,g[14]=P*r+M*i+C*y+A*b,g[15]=P*a+M*l+C*v+A*_,g}}),d0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2],a,n,o,i,l,f,x,y,v,T,u,b;return I===g?(g[12]=I[0]*t+I[4]*e+I[8]*r+I[12],g[13]=I[1]*t+I[5]*e+I[9]*r+I[13],g[14]=I[2]*t+I[6]*e+I[10]*r+I[14],g[15]=I[3]*t+I[7]*e+I[11]*r+I[15]):(a=I[0],n=I[1],o=I[2],i=I[3],l=I[4],f=I[5],x=I[6],y=I[7],v=I[8],T=I[9],u=I[10],b=I[11],g[0]=a,g[1]=n,g[2]=o,g[3]=i,g[4]=l,g[5]=f,g[6]=x,g[7]=y,g[8]=v,g[9]=T,g[10]=u,g[11]=b,g[12]=a*t+l*e+v*r+I[12],g[13]=n*t+f*e+T*r+I[13],g[14]=o*t+x*e+u*r+I[14],g[15]=i*t+y*e+b*r+I[15]),g}}),Fm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2];return g[0]=I[0]*t,g[1]=I[1]*t,g[2]=I[2]*t,g[3]=I[3]*t,g[4]=I[4]*e,g[5]=I[5]*e,g[6]=I[6]*e,g[7]=I[7]*e,g[8]=I[8]*r,g[9]=I[9]*r,g[10]=I[10]*r,g[11]=I[11]*r,g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),hv=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=t[0],r=t[1],a=t[2],n=Math.sqrt(e*e+r*r+a*a),o,i,l,f,x,y,v,T,u,b,_,P,M,C,A,h,p,k,w,B,O,j,V,H;return Math.abs(n)<1e-6?null:(n=1/n,e*=n,r*=n,a*=n,o=Math.sin(S),i=Math.cos(S),l=1-i,f=I[0],x=I[1],y=I[2],v=I[3],T=I[4],u=I[5],b=I[6],_=I[7],P=I[8],M=I[9],C=I[10],A=I[11],h=e*e*l+i,p=r*e*l+a*o,k=a*e*l-r*o,w=e*r*l-a*o,B=r*r*l+i,O=a*r*l+e*o,j=e*a*l+r*o,V=r*a*l-e*o,H=a*a*l+i,g[0]=f*h+T*p+P*k,g[1]=x*h+u*p+M*k,g[2]=y*h+b*p+C*k,g[3]=v*h+_*p+A*k,g[4]=f*w+T*B+P*O,g[5]=x*w+u*B+M*O,g[6]=y*w+b*B+C*O,g[7]=v*w+_*B+A*O,g[8]=f*j+T*V+P*H,g[9]=x*j+u*V+M*H,g[10]=y*j+b*V+C*H,g[11]=v*j+_*V+A*H,I!==g&&(g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g)}}),lp=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[4],a=I[5],n=I[6],o=I[7],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[4]=r*e+i*t,g[5]=a*e+l*t,g[6]=n*e+f*t,g[7]=o*e+x*t,g[8]=i*e-r*t,g[9]=l*e-a*t,g[10]=f*e-n*t,g[11]=x*e-o*t,g}}),p0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e-i*t,g[1]=a*e-l*t,g[2]=n*e-f*t,g[3]=o*e-x*t,g[8]=r*t+i*e,g[9]=a*t+l*e,g[10]=n*t+f*e,g[11]=o*t+x*e,g}}),Bm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[4],l=I[5],f=I[6],x=I[7];return I!==g&&(g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e+i*t,g[1]=a*e+l*t,g[2]=n*e+f*t,g[3]=o*e+x*t,g[4]=i*e-r*t,g[5]=l*e-a*t,g[6]=f*e-n*t,g[7]=x*e-o*t,g}}),Ry=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t,e,r,a=S[0],n=S[1],o=S[2],i=Math.sqrt(a*a+n*n+o*o);return Math.abs(i)<1e-6?null:(i=1/i,a*=i,n*=i,o*=i,t=Math.sin(I),e=Math.cos(I),r=1-e,g[0]=a*a*r+e,g[1]=n*a*r+o*t,g[2]=o*a*r-n*t,g[3]=0,g[4]=a*n*r-o*t,g[5]=n*n*r+e,g[6]=o*n*r+a*t,g[7]=0,g[8]=a*o*r+n*t,g[9]=n*o*r-a*t,g[10]=o*o*r+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}}),i6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=t+t,o=e+e,i=r+r,l=t*n,f=t*o,x=t*i,y=e*o,v=e*i,T=r*i,u=a*n,b=a*o,_=a*i;return g[0]=1-(y+T),g[1]=f+_,g[2]=x-b,g[3]=0,g[4]=f-_,g[5]=1-(l+T),g[6]=v+u,g[7]=0,g[8]=x+b,g[9]=v-u,g[10]=1-(l+y),g[11]=0,g[12]=S[0],g[13]=S[1],g[14]=S[2],g[15]=1,g}}),dw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=I[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=I[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),pw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=I[0],g[13]=I[1],g[14]=I[2],g[15]=1,g}}),mw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=t,g[6]=S,g[7]=0,g[8]=0,g[9]=-S,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),a6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=0,g[2]=-S,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=S,g[9]=0,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),o6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=S,g[2]=0,g[3]=0,g[4]=-S,g[5]=t,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),s6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=S+S,n=t+t,o=e+e,i=S*a,l=t*a,f=t*n,x=e*a,y=e*n,v=e*o,T=r*a,u=r*n,b=r*o;return g[0]=1-f-v,g[1]=l+b,g[2]=x-u,g[3]=0,g[4]=l-b,g[5]=1-i-v,g[6]=y+T,g[7]=0,g[8]=x+u,g[9]=y-T,g[10]=1-i-f,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),l6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(S-I),o=1/(e-t),i=1/(r-a);return g[0]=r*2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r*2*o,g[6]=0,g[7]=0,g[8]=(S+I)*n,g[9]=(e+t)*o,g[10]=(a+r)*i,g[11]=-1,g[12]=0,g[13]=0,g[14]=a*r*2*i,g[15]=0,g}}),u6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e){var r=1/Math.tan(I/2),a=1/(t-e);return g[0]=r/S,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+t)*a,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*t*a,g[15]=0,g}}),c6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=Math.tan(I.upDegrees*Math.PI/180),r=Math.tan(I.downDegrees*Math.PI/180),a=Math.tan(I.leftDegrees*Math.PI/180),n=Math.tan(I.rightDegrees*Math.PI/180),o=2/(a+n),i=2/(e+r);return g[0]=o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=-((a-n)*o*.5),g[9]=(e-r)*i*.5,g[10]=t/(S-t),g[11]=-1,g[12]=0,g[13]=0,g[14]=t*S/(S-t),g[15]=0,g}}),M_=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(I-S),o=1/(t-e),i=1/(r-a);return g[0]=-2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*o,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*i,g[11]=0,g[12]=(I+S)*n,g[13]=(e+t)*o,g[14]=(a+r)*i,g[15]=1,g}}),h6=Dt((Q,Z)=>{var c=tc();Z.exports=g;function g(I,S,t,e){var r,a,n,o,i,l,f,x,y,v,T=S[0],u=S[1],b=S[2],_=e[0],P=e[1],M=e[2],C=t[0],A=t[1],h=t[2];return Math.abs(T-C)<1e-6&&Math.abs(u-A)<1e-6&&Math.abs(b-h)<1e-6?c(I):(f=T-C,x=u-A,y=b-h,v=1/Math.sqrt(f*f+x*x+y*y),f*=v,x*=v,y*=v,r=P*y-M*x,a=M*f-_*y,n=_*x-P*f,v=Math.sqrt(r*r+a*a+n*n),v?(v=1/v,r*=v,a*=v,n*=v):(r=0,a=0,n=0),o=x*n-y*a,i=y*r-f*n,l=f*a-x*r,v=Math.sqrt(o*o+i*i+l*l),v?(v=1/v,o*=v,i*=v,l*=v):(o=0,i=0,l=0),I[0]=r,I[1]=o,I[2]=f,I[3]=0,I[4]=a,I[5]=i,I[6]=x,I[7]=0,I[8]=n,I[9]=l,I[10]=y,I[11]=0,I[12]=-(r*T+a*u+n*b),I[13]=-(o*T+i*u+l*b),I[14]=-(f*T+x*u+y*b),I[15]=1,I)}}),f6=Dt((Q,Z)=>{Z.exports=c;function c(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}}),gw=Dt((Q,Z)=>{Z.exports={create:Ns(),clone:Nl(),copy:vu(),identity:tc(),transpose:dh(),invert:Fc(),adjoint:sp(),determinant:Kd(),multiply:e0(),translate:d0(),scale:Fm(),rotate:hv(),rotateX:lp(),rotateY:p0(),rotateZ:Bm(),fromRotation:Ry(),fromRotationTranslation:i6(),fromScaling:dw(),fromTranslation:pw(),fromXRotation:mw(),fromYRotation:a6(),fromZRotation:o6(),fromQuat:s6(),frustum:l6(),perspective:u6(),perspectiveFromFieldOfView:c6(),ortho:M_(),lookAt:h6(),str:f6()}}),S_=Dt(Q=>{var Z=gw();Q.init2dArray=function(c,g){for(var I=new Array(c),S=0;S{var c=Wr(),g=as(),I=S_(),S=gw();function t(T){var u;if(typeof T=="string"){if(u=document.getElementById(T),u===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return u}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function e(T){var u=c.select(T);return u.node()instanceof HTMLElement&&u.size()&&u.classed("js-plotly-plot")}function r(T){var u=T&&T.parentNode;u&&u.removeChild(T)}function a(T,u){n("global",T,u)}function n(T,u,b){var _="plotly.js-style-"+T,P=document.getElementById(_);if(!(P&&P.matches(".no-inline-styles"))){P||(P=document.createElement("style"),P.setAttribute("id",_),P.appendChild(document.createTextNode("")),document.head.appendChild(P));var M=P.sheet;M?M.insertRule?M.insertRule(u+"{"+b+"}",0):M.addRule?M.addRule(u,b,0):g.warn("addStyleRule failed"):g.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function o(T){var u="plotly.js-style-"+T,b=document.getElementById(u);b&&r(b)}function i(T,u,b,_,P,M){var C=_.split(":"),A=P.split(":"),h="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(p){p.getAttribute(h)||(p.addEventListener("mouseenter",function(){var k=this.querySelector(b);k&&(k.style[C[0]]=C[1])}),p.addEventListener("mouseleave",function(){var k=this.querySelector(b);k&&(u&&this.matches(u)?k.style[C[0]]=C[1]:k.style[A[0]]=A[1])}),p.setAttribute(h,!0))})}function l(T){var u=x(T),b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return u.forEach(function(_){var P=f(_);if(P){var M=I.convertCssMatrix(P);b=S.multiply(b,b,M)}}),b}function f(T){var u=window.getComputedStyle(T,null),b=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("-moz-transform")||u.getPropertyValue("-ms-transform")||u.getPropertyValue("-o-transform")||u.getPropertyValue("transform");return b==="none"?null:b.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(_){return+_})}function x(T){for(var u=[];y(T);)u.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return u}function y(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,u){return T&&u&&T.top===u.top&&T.left===u.left&&T.right===u.right&&T.bottom===u.bottom}Z.exports={getGraphDiv:t,isPlotDiv:e,removeElement:r,addStyleRule:a,addRelatedStyleRule:n,deleteRelatedStyleRule:o,setStyleOnHover:i,getFullTransformMatrix:l,getElementTransformMatrix:f,getElementAndAncestors:x,equalDomRects:v}}),Cl=Dt((Q,Z)=>{Z.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"}}}}),Yc=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Qn(),I={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},S={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=I.flags.slice().concat(["fullReplot"]),e=S.flags.slice().concat("layoutReplot");Z.exports={traces:I,layout:S,traceFlags:function(){return r(t)},layoutFlags:function(){return r(e)},update:function(o,i){var l=i.editType;if(l&&l!=="none")for(var f=l.split("+"),x=0;x{Q.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Q.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"}}),E_=Dt((Q,Z)=>{Z.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"}}),Zu=Dt(Q=>{var{DATE_FORMAT_LINK:Z,FORMAT_LINK:c}=E_(),g=["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 I({supportOther:S}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(S?" 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}".`,c,"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}".`,Z,"for details on the date formatting syntax.",g].join(" ")}Q.templateFormatStringDescription=I,Q.hovertemplateAttrs=({editType:S="none",arrayOk:t}={},e={})=>Ar({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.texttemplateAttrs=({editType:S="calc",arrayOk:t}={},e={})=>Ar({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:t}={},e={})=>({valType:"string",dflt:"",editType:S}),Q.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}),w1=Dt((Q,Z)=>{function c(b,_){return _?_.d2l(b):b}function g(b,_){return _?_.l2d(b):b}function I(b){return b.x0}function S(b){return b.x1}function t(b){return b.y0}function e(b){return b.y1}function r(b){return b.x0shift||0}function a(b){return b.x1shift||0}function n(b){return b.y0shift||0}function o(b){return b.y1shift||0}function i(b,_){return c(b.x1,_)+a(b)-c(b.x0,_)-r(b)}function l(b,_,P){return c(b.y1,P)+o(b)-c(b.y0,P)-n(b)}function f(b,_){return Math.abs(i(b,_))}function x(b,_,P){return Math.abs(l(b,_,P))}function y(b,_,P){return b.type!=="line"?void 0:Math.sqrt(Math.pow(i(b,_),2)+Math.pow(l(b,_,P),2))}function v(b,_){return g((c(b.x1,_)+a(b)+c(b.x0,_)+r(b))/2,_)}function T(b,_,P){return g((c(b.y1,P)+o(b)+c(b.y0,P)+n(b))/2,P)}function u(b,_,P){return b.type!=="line"?void 0:l(b,_,P)/i(b,_)}Z.exports={x0:I,x1:S,y0:t,y1:e,slope:u,dx:i,dy:l,width:f,height:x,length:y,xcenter:v,ycenter:T}}),vw=Dt((Q,Z)=>{var c=Yc().overrideAll,g=qo(),I=ma(),S=kd().dash,t=Ia().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=w1();Z.exports=c({newshape:{visible:t({},g.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},g.legend,{}),legendgroup:t({},g.legendgroup,{}),legendgrouptitle:{text:t({},g.legendgrouptitle.text,{}),font:I({})},legendrank:t({},g.legendrank,{}),legendwidth:t({},g.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},S,{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:t({},g.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:r({editType:"arraydraw"}),font:I({}),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")}),fv=Dt((Q,Z)=>{var c=kd().dash,g=Ia().extendFlat;Z.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:g({},c,{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"}}}),Ny=Dt((Q,Z)=>{Z.exports=function(c){var g=c.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}}),k1=Dt((Q,Z)=>{var c=ma(),g=Cl(),I=Ai(),S=vw(),t=fv(),e=Ny(),r=Ia().extendFlat,a=c({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=I.defaultLine,Z.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(e({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:I.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:I.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:I.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:S.newshape,activeshape:S.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},g.transition,{editType:"none"})}}),d6=Dt(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Q=document.createElement("style");Q.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Q.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Q)}})()}),Qo=Dt(Q=>{var Z=as(),c=Ko(),g=Dl(),I=Qn(),S=r0().addStyleRule,t=Ia(),e=qo(),r=k1(),a=t.extendFlat,n=t.extendDeepAll;Q.modules={},Q.allCategories={},Q.allTypes=[],Q.subplotsRegistry={},Q.componentsRegistry={},Q.layoutArrayContainers=[],Q.layoutArrayRegexes=[],Q.traceLayoutAttributes={},Q.localeRegistry={},Q.apiMethodRegistry={},Q.collectableSubplotTypes=null,Q.register=function(b){if(Q.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_{var Z=Ri().timeFormat,c=Hn(),g=as(),I=ko().mod,S=sa(),t=S.BADNUM,e=S.ONEDAY,r=S.ONEHOUR,a=S.ONEMIN,n=S.ONESEC,o=S.EPOCHJD,i=Qo(),l=Ri().utcFormat,f=/^\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,x=/^\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,y=new Date().getFullYear()-70;function v(V){return V&&i.componentsRegistry.calendars&&typeof V=="string"&&V!=="gregorian"}Q.dateTick0=function(V,H){var F=T(V,!!H);if(H<2)return F;var U=Q.dateTime2ms(F,V);return U+=e*(H-1),Q.ms2DateTime(U,0,V)};function T(V,H){return v(V)?H?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[V]:i.getComponentMethod("calendars","CANONICAL_TICK")[V]:H?"2000-01-02":"2000-01-01"}Q.dfltRange=function(V){return v(V)?i.getComponentMethod("calendars","DFLTRANGE")[V]:["2000-01-01","2001-01-01"]},Q.isJSDate=function(V){return typeof V=="object"&&V!==null&&typeof V.getTime=="function"};var u,b;Q.dateTime2ms=function(V,H){if(Q.isJSDate(V)){var F=V.getTimezoneOffset()*a,U=(V.getUTCMinutes()-V.getMinutes())*a+(V.getUTCSeconds()-V.getSeconds())*n+(V.getUTCMilliseconds()-V.getMilliseconds());if(U){var W=3*a;F=F-W/2+I(U-F+W/2,W)}return V=Number(V)-F,V>=u&&V<=b?V:t}if(typeof V!="string"&&typeof V!="number")return t;V=String(V);var q=v(H),J=V.charAt(0);q&&(J==="G"||J==="g")&&(V=V.substr(1),H="");var lt=q&&H.substr(0,7)==="chinese",yt=V.match(lt?x:f);if(!yt)return t;var mt=yt[1],st=yt[3]||"1",tt=Number(yt[5]||1),pt=Number(yt[7]||0),rt=Number(yt[9]||0),at=Number(yt[11]||0);if(q){if(mt.length===2)return t;mt=Number(mt);var vt;try{var it=i.getComponentMethod("calendars","getCal")(H);if(lt){var K=st.charAt(st.length-1)==="i";st=parseInt(st,10),vt=it.newDate(mt,it.toMonthIndex(mt,st,K),tt)}else vt=it.newDate(mt,Number(st),tt)}catch{return t}return vt?(vt.toJD()-o)*e+pt*r+rt*a+at*n:t}mt.length===2?mt=(Number(mt)+2e3-y)%100+y:mt=Number(mt),st-=1;var ft=new Date(Date.UTC(2e3,st,tt,pt,rt));return ft.setUTCFullYear(mt),ft.getUTCMonth()!==st||ft.getUTCDate()!==tt?t:ft.getTime()+at*n},u=Q.MIN_MS=Q.dateTime2ms("-9999"),b=Q.MAX_MS=Q.dateTime2ms("9999-12-31 23:59:59.9999"),Q.isDateTime=function(V,H){return Q.dateTime2ms(V,H)!==t};function _(V,H){return String(V+Math.pow(10,H)).substr(1)}var P=90*e,M=3*r,C=5*a;Q.ms2DateTime=function(V,H,F){if(typeof V!="number"||!(V>=u&&V<=b))return t;H||(H=0);var U=Math.floor(I(V+.05,1)*10),W=Math.round(V-U/10),q,J,lt,yt,mt,st;if(v(F)){var tt=Math.floor(W/e)+o,pt=Math.floor(I(V,e));try{q=i.getComponentMethod("calendars","getCal")(F).fromJD(tt).formatDate("yyyy-mm-dd")}catch{q=l("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;J=H=u+e&&V<=b-e))return t;var H=Math.floor(I(V+.05,1)*10),F=new Date(Math.round(V-H/10)),U=Z("%Y-%m-%d")(F),W=F.getHours(),q=F.getMinutes(),J=F.getSeconds(),lt=F.getUTCMilliseconds()*10+H;return A(U,W,q,J,lt)};function A(V,H,F,U,W){if((H||F||U||W)&&(V+=" "+_(H,2)+":"+_(F,2),(U||W)&&(V+=":"+_(U,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;V+="."+_(W,q)}return V}Q.cleanDate=function(V,H,F){if(V===t)return H;if(Q.isJSDate(V)||typeof V=="number"&&isFinite(V)){if(v(F))return g.error("JS Dates and milliseconds are incompatible with world calendars",V),H;if(V=Q.ms2DateTimeLocal(+V),!V&&H!==void 0)return H}else if(!Q.isDateTime(V,F))return g.error("unrecognized date",V),H;return V};var h=/%\d?f/g,p=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function w(V,H,F,U){V=V.replace(h,function(q){var J=Math.min(+q.charAt(1)||6,6),lt=(H/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return lt});var W=new Date(Math.floor(H+.05));if(V=V.replace(p,function(){return k[F("%q")(W)]}),v(U))try{V=i.getComponentMethod("calendars","worldCalFmt")(V,H,U)}catch{return"Invalid"}return F(V)(W)}var B=[59,59.9,59.99,59.999,59.9999];function O(V,H){var F=I(V+.05,e),U=_(Math.floor(F/r),2)+":"+_(I(Math.floor(F/a),60),2);if(H!=="M"){c(H)||(H=0);var W=Math.min(I(V/n,60),B[H]),q=(100+W).toFixed(H).substr(1);H>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}Q.formatDate=function(V,H,F,U,W,q){if(W=v(W)&&W,!H)if(F==="y")H=q.year;else if(F==="m")H=q.month;else if(F==="d")H=q.dayMonth+` `+q.year;else return O(V,F)+` -`+w(q.dayMonthYear,V,U,W);return w(H,V,U,W)};var j=3*e;Q.incrementMonth=function(V,H,F){F=v(F)&&F;var U=I(V,e);if(V=Math.round(V-U),F)try{var W=Math.round(V/e)+o,q=i.getComponentMethod("calendars","getCal")(F),J=q.fromJD(W);return H%12?q.add(J,H,"m"):q.add(J,H/12,"y"),(J.toJD()-o)*e+U}catch{g.error("invalid ms "+V+" in calendar "+F)}var lt=new Date(V+j);return lt.setUTCMonth(lt.getUTCMonth()+H)+U-j},Q.findExactDates=function(V,H){for(var F=0,U=0,W=0,q=0,J,lt,yt=v(H)&&i.getComponentMethod("calendars","getCal")(H),mt=0;mt{Z.exports=function(c){return c}}),E_=Dt(Q=>{var Z=Yi(),c=as(),g=w1(),I=Ca().BADNUM,S=1e-9;Q.findBin=function(n,o,i){if(Z(o.start))return i?Math.ceil((n-o.start)/o.size-S)-1:Math.floor((n-o.start)/o.size+S);var l=0,f=o.length,x=0,y=f>1?(o[f-1]-o[0])/(f-1):1,v,T;for(y>=0?T=i?t:e:T=i?a:r,n+=y*S*(i?-1:1)*(y>=0?1:-1);l90&&c.log("Long binary search..."),l-1};function t(n,o){return no}function a(n,o){return n>=o}Q.sorterAsc=function(n,o){return n-o},Q.sorterDes=function(n,o){return o-n},Q.distinctVals=function(n){var o=n.slice();o.sort(Q.sorterAsc);var i;for(i=o.length-1;i>-1&&o[i]===I;i--);for(var l=o[i]-o[0]||1,f=l/(i||1)/1e4,x=[],y,v=0;v<=i;v++){var T=o[v],u=T-y;y===void 0?(x.push(T),y=T):u>f&&(l=Math.min(l,u),x.push(T),y=T)}return{vals:x,minDiff:l}},Q.roundUp=function(n,o,i){for(var l=0,f=o.length-1,x,y=0,v=i?0:1,T=i?1:0,u=i?Math.ceil:Math.floor;l0&&(l=1),i&&l)return n.sort(o)}return l?n:n.reverse()},Q.findIndexOfMin=function(n,o){o=o||g;for(var i=1/0,l,f=0;f{Z.exports=function(c){return Object.keys(c).sort()}}),p6=Dt(Q=>{var Z=Yi(),c=Ma().isArrayOrTypedArray;Q.aggNums=function(g,I,S,t){var e,r;if((!t||t>S.length)&&(t=S.length),Z(I)||(I=!1),c(S[0])){for(r=new Array(t),e=0;eg.length-1)return g[g.length-1];var S=I%1;return S*g[Math.ceil(I)]+(1-S)*g[Math.floor(I)]}}),m6=Dt((Q,Z)=>{var c=ko(),g=c.mod,I=c.modHalf,S=Math.PI,t=2*S;function e(T){return T/180*S}function r(T){return T/S*180}function a(T){return Math.abs(T[1]-T[0])>t-1e-14}function n(T,u){return I(u-T,t)}function o(T,u){return Math.abs(n(T,u))}function i(T,u){if(a(u))return!0;var b,_;u[0]_&&(_+=t);var P=g(T,t),M=P+t;return P>=b&&P<=_||M>=b&&M<=_}function l(T,u,b,_){if(!i(u,_))return!1;var P,M;return b[0]=P&&T<=M}function f(T,u,b,_,P,M,C){P=P||0,M=M||0;var A=a([b,_]),h,p,k,w,R;A?(h=0,p=S,k=t):b<_?(h=b,k=_):(h=_,k=b),T{Q.isLeftAnchor=function(Z){return Z.xanchor==="left"||Z.xanchor==="auto"&&Z.x<=1/3},Q.isCenterAnchor=function(Z){return Z.xanchor==="center"||Z.xanchor==="auto"&&Z.x>1/3&&Z.x<2/3},Q.isRightAnchor=function(Z){return Z.xanchor==="right"||Z.xanchor==="auto"&&Z.x>=2/3},Q.isTopAnchor=function(Z){return Z.yanchor==="top"||Z.yanchor==="auto"&&Z.y>=2/3},Q.isMiddleAnchor=function(Z){return Z.yanchor==="middle"||Z.yanchor==="auto"&&Z.y>1/3&&Z.y<2/3},Q.isBottomAnchor=function(Z){return Z.yanchor==="bottom"||Z.yanchor==="auto"&&Z.y<=1/3}}),v6=Dt(Q=>{var Z=ko().mod;Q.segmentsIntersect=c;function c(e,r,a,n,o,i,l,f){var x=a-e,y=o-e,v=l-o,T=n-r,u=i-r,b=f-i,_=x*b-v*T;if(_===0)return null;var P=(y*b-v*u)/_,M=(y*T-x*u)/_;return M<0||M>1||P<0||P>1?null:{x:e+x*P,y:r+T*P}}Q.segmentDistance=function(e,r,a,n,o,i,l,f){if(c(e,r,a,n,o,i,l,f))return 0;var x=a-e,y=n-r,v=l-o,T=f-i,u=x*x+y*y,b=v*v+T*T,_=Math.min(g(x,y,u,o-e,i-r),g(x,y,u,l-e,f-r),g(v,T,b,e-o,r-i),g(v,T,b,a-o,n-i));return Math.sqrt(_)};function g(e,r,a,n,o){var i=n*e+o*r;if(i<0)return n*n+o*o;if(i>a){var l=n-e,f=o-r;return l*l+f*f}else{var x=n*r-o*e;return x*x/a}}var I,S,t;Q.getTextLocation=function(e,r,a,n){if((e!==S||n!==t)&&(I={},S=e,t=n),I[a])return I[a];var o=e.getPointAtLength(Z(a-n/2,r)),i=e.getPointAtLength(Z(a+n/2,r)),l=Math.atan((i.y-o.y)/(i.x-o.x)),f=e.getPointAtLength(Z(a,r)),x=(f.x*4+o.x+i.x)/6,y=(f.y*4+o.y+i.y)/6,v={x,y,theta:l};return I[a]=v,v},Q.clearLocationCache=function(){S=null},Q.getVisibleSegment=function(e,r,a){var n=r.left,o=r.right,i=r.top,l=r.bottom,f=0,x=e.getTotalLength(),y=x,v,T;function u(_){var P=e.getPointAtLength(_);_===0?v=P:_===x&&(T=P);var M=P.xo?P.x-o:0,C=P.yl?P.y-l:0;return Math.sqrt(M*M+C*C)}for(var b=u(f);b;){if(f+=b+a,f>y)return;b=u(f)}for(b=u(y);b;){if(y-=b+a,f>y)return;b=u(y)}return{min:f,max:y,len:y-f,total:x,isClosed:f===0&&y===x&&Math.abs(v.x-T.x)<.1&&Math.abs(v.y-T.y)<.1}},Q.findPointOnPath=function(e,r,a,n){n=n||{};for(var o=n.pathLength||e.getTotalLength(),i=n.tolerance||.001,l=n.iterationLimit||30,f=e.getPointAtLength(0)[a]>e.getPointAtLength(o)[a]?-1:1,x=0,y=0,v=o,T,u,b;x0?v=T:y=T,x++}return u}}),C_=Dt(Q=>{var Z={};Q.throttle=function(g,I,S){var t=Z[g],e=Date.now();if(!t){for(var r in Z)Z[r].tst.ts+I){a();return}t.timer=setTimeout(function(){a(),t.timer=null},I)},Q.done=function(g){var I=Z[g];return!I||!I.timer?Promise.resolve():new Promise(function(S){var t=I.onDone;I.onDone=function(){t&&t(),S(),I.onDone=null}})},Q.clear=function(g){if(g)c(Z[g]),delete Z[g];else for(var I in Z)Q.clear(I)};function c(g){g&&g.timer!==null&&(clearTimeout(g.timer),g.timer=null)}}),L_=Dt((Q,Z)=>{Z.exports=function(c){c._responsiveChartHandler&&(window.removeEventListener("resize",c._responsiveChartHandler),delete c._responsiveChartHandler)}}),k1=Dt((Q,Z)=>{Z.exports=S,Z.exports.isMobile=S,Z.exports.default=S;var c=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,I=/android|ipad|playbook|silk/i;function S(t){t||(t={});let e=t.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let r=c.test(e)&&!g.test(e)||!!t.tablet&&I.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(r=!0),r}}),vw=Dt((Q,Z)=>{var c=Yi(),g=k1();Z.exports=function(S){var t;if(S&&S.hasOwnProperty("userAgent")?t=S.userAgent:t=I(),typeof t!="string")return!0;var e=g({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!e)for(var r=t.split(" "),a=1;a-1;o--){var i=r[o];if(i.substr(0,8)==="Version/"){var l=i.substr(8).split(".")[0];if(c(l)&&(l=+l),l>=13)return!0}}}return e};function I(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}),yw=Dt((Q,Z)=>{var c=qr();Z.exports=function(g,I,S){var t=g.selectAll("g."+S.replace(/\s/g,".")).data(I,function(r){return r[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",S),t.order();var e=g.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(r){r[0][e]=c.select(this)}),t}}),T1=Dt((Q,Z)=>{var c=Jo();Z.exports=function(g,I){for(var S=g._context.locale,t=0;t<2;t++){for(var e=g._context.locales,r=0;r<2;r++){var a=(e[S]||{}).dictionary;if(a){var n=a[I];if(n)return n}e=c.localeRegistry}var o=S.split("-")[0];if(o===S)break;S=o}return I}}),Ec=Dt((Q,Z)=>{Z.exports=function(c){for(var g={},I=[],S=0,t=0;t{Z.exports=function(S){for(var t=I(S)?g:c,e=[],r=0;r{Z.exports=function(c,g){if(!g)return c;var I=1/Math.abs(g),S=I>1?(I*c+I*g)/I:c+g,t=String(S).length;if(t>16){var e=String(g).length,r=String(c).length;if(t>=r+e){var a=parseFloat(S).toPrecision(12);a.indexOf("e+")===-1&&(S=+a)}}return S}}),hv=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Z.exports=function(S){return typeof S=="string"&&(S=S.replace(I,"")),c(S)?Number(S):g}}),kn=Dt((Q,Z)=>{var c=qr(),g=Fi().utcFormat,I=Pi().format,S=Yi(),t=Ca(),e=t.FP_SAFE,r=-e,a=t.BADNUM,n=Z.exports={};n.adjustFormat=function(it){return!it||/^\d[.]\df/.test(it)||/[.]\d%/.test(it)?it:it==="0.f"?"~f":/^\d%/.test(it)?"~%":/^\ds/.test(it)?"~s":!/^[~,.0$]/.test(it)&&/[&fps]/.test(it)?"~"+it:it};var o={};n.warnBadFormat=function(it){var Y=String(it);o[Y]||(o[Y]=1,n.warn('encountered bad format: "'+Y+'"'))},n.noFormat=function(it){return String(it)},n.numberFormat=function(it){var Y;try{Y=I(n.adjustFormat(it))}catch{return n.warnBadFormat(it),n.noFormat}return Y},n.nestedProperty=zo(),n.keyedContainer=ho(),n.relativeAttr=mo(),n.isPlainObject=si(),n.toLogRange=Ts(),n.relinkPrivateKeys=xl();var i=Ma();n.isArrayBuffer=i.isArrayBuffer,n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var l=ko();n.mod=l.mod,n.modHalf=l.modHalf;var f=To();n.valObjectMeta=f.valObjectMeta,n.coerce=f.coerce,n.coerce2=f.coerce2,n.coerceFont=f.coerceFont,n.coercePattern=f.coercePattern,n.coerceHoverinfo=f.coerceHoverinfo,n.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,n.validate=f.validate;var x=d6();n.dateTime2ms=x.dateTime2ms,n.isDateTime=x.isDateTime,n.ms2DateTime=x.ms2DateTime,n.ms2DateTimeLocal=x.ms2DateTimeLocal,n.cleanDate=x.cleanDate,n.isJSDate=x.isJSDate,n.formatDate=x.formatDate,n.incrementMonth=x.incrementMonth,n.dateTick0=x.dateTick0,n.dfltRange=x.dfltRange,n.findExactDates=x.findExactDates,n.MIN_MS=x.MIN_MS,n.MAX_MS=x.MAX_MS;var y=E_();n.findBin=y.findBin,n.sorterAsc=y.sorterAsc,n.sorterDes=y.sorterDes,n.distinctVals=y.distinctVals,n.roundUp=y.roundUp,n.sort=y.sort,n.findIndexOfMin=y.findIndexOfMin,n.sortObjectKeys=G0();var v=p6();n.aggNums=v.aggNums,n.len=v.len,n.mean=v.mean,n.geometricMean=v.geometricMean,n.median=v.median,n.midRange=v.midRange,n.variance=v.variance,n.stdev=v.stdev,n.interp=v.interp;var T=M_();n.init2dArray=T.init2dArray,n.transposeRagged=T.transposeRagged,n.dot=T.dot,n.translationMatrix=T.translationMatrix,n.rotationMatrix=T.rotationMatrix,n.rotationXYMatrix=T.rotationXYMatrix,n.apply3DTransform=T.apply3DTransform,n.apply2DTransform=T.apply2DTransform,n.apply2DTransform2=T.apply2DTransform2,n.convertCssMatrix=T.convertCssMatrix,n.inverseTransformMatrix=T.inverseTransformMatrix;var u=m6();n.deg2rad=u.deg2rad,n.rad2deg=u.rad2deg,n.angleDelta=u.angleDelta,n.angleDist=u.angleDist,n.isFullCircle=u.isFullCircle,n.isAngleInsideSector=u.isAngleInsideSector,n.isPtInsideSector=u.isPtInsideSector,n.pathArc=u.pathArc,n.pathSector=u.pathSector,n.pathAnnulus=u.pathAnnulus;var b=g6();n.isLeftAnchor=b.isLeftAnchor,n.isCenterAnchor=b.isCenterAnchor,n.isRightAnchor=b.isRightAnchor,n.isTopAnchor=b.isTopAnchor,n.isMiddleAnchor=b.isMiddleAnchor,n.isBottomAnchor=b.isBottomAnchor;var _=v6();n.segmentsIntersect=_.segmentsIntersect,n.segmentDistance=_.segmentDistance,n.getTextLocation=_.getTextLocation,n.clearLocationCache=_.clearLocationCache,n.getVisibleSegment=_.getVisibleSegment,n.findPointOnPath=_.findPointOnPath;var P=Ia();n.extendFlat=P.extendFlat,n.extendDeep=P.extendDeep,n.extendDeepAll=P.extendDeepAll,n.extendDeepNoArrays=P.extendDeepNoArrays;var M=as();n.log=M.log,n.warn=M.warn,n.error=M.error;var C=Mo();n.counterRegex=C.counter;var A=C_();n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var h=r0();n.getGraphDiv=h.getGraphDiv,n.isPlotDiv=h.isPlotDiv,n.removeElement=h.removeElement,n.addStyleRule=h.addStyleRule,n.addRelatedStyleRule=h.addRelatedStyleRule,n.deleteRelatedStyleRule=h.deleteRelatedStyleRule,n.setStyleOnHover=h.setStyleOnHover,n.getFullTransformMatrix=h.getFullTransformMatrix,n.getElementTransformMatrix=h.getElementTransformMatrix,n.getElementAndAncestors=h.getElementAndAncestors,n.equalDomRects=h.equalDomRects,n.clearResponsive=L_(),n.preserveDrawingBuffer=vw(),n.makeTraceGroups=yw(),n._=T1(),n.notifier=bs(),n.filterUnique=Ec(),n.filterVisible=Tf(),n.pushUnique=Ol(),n.increment=By(),n.cleanNumber=hv(),n.ensureNumber=function(it){return S(it)?(it=Number(it),it>e||it=Y?!1:S(it)&&it>=0&&it%1===0},n.noop=Yo(),n.identity=w1(),n.repeat=function(it,Y){for(var ft=new Array(Y),ut=0;utft?Math.max(ft,Math.min(Y,it)):Math.max(Y,Math.min(ft,it))},n.bBoxIntersect=function(it,Y,ft){return ft=ft||0,it.left<=Y.right+ft&&Y.left<=it.right+ft&&it.top<=Y.bottom+ft&&Y.top<=it.bottom+ft},n.simpleMap=function(it,Y,ft,ut,kt){for(var It=it.length,Pt=new Array(It),qt=0;qt=Math.pow(2,ft)?kt>10?(n.warn("randstr failed uniqueness"),Pt):it(Y,ft,ut,(kt||0)+1):Pt},n.OptionControl=function(it,Y){it||(it={}),Y||(Y="opt");var ft={};return ft.optionList=[],ft._newoption=function(ut){ut[Y]=it,ft[ut.name]=ut,ft.optionList.push(ut)},ft["_"+Y]=it,ft},n.smooth=function(it,Y){if(Y=Math.round(Y)||0,Y<2)return it;var ft=it.length,ut=2*ft,kt=2*Y-1,It=new Array(kt),Pt=new Array(ft),qt,Wt,Jt,ge;for(qt=0;qt=ut&&(Jt-=ut*Math.floor(Jt/ut)),Jt<0?Jt=-1-Jt:Jt>=ft&&(Jt=ut-1-Jt),ge+=it[Jt]*It[Wt];Pt[qt]=ge}return Pt},n.syncOrAsync=function(it,Y,ft){var ut,kt;function It(){return n.syncOrAsync(it,Y,ft)}for(;it.length;)if(kt=it.splice(0,1)[0],ut=kt(Y),ut&&ut.then)return ut.then(It);return ft&&ft(Y)},n.stripTrailingSlash=function(it){return it.substr(-1)==="/"?it.substr(0,it.length-1):it},n.noneOrAll=function(it,Y,ft){if(it){var ut=!1,kt=!0,It,Pt;for(It=0;It0?kt:0})},n.fillArray=function(it,Y,ft,ut){if(ut=ut||n.identity,n.isArrayOrTypedArray(it))for(var kt=0;ktO.test(window.navigator.userAgent);var j=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var it=j.exec(window.navigator.userAgent);if(it&&it.length===2){var Y=parseInt(it[1]);if(!isNaN(Y))return Y}return null},n.isD3Selection=function(it){return it instanceof c.selection},n.ensureSingle=function(it,Y,ft,ut){var kt=it.select(Y+(ft?"."+ft:""));if(kt.size())return kt;var It=it.append(Y);return ft&&It.classed(ft,!0),ut&&It.call(ut),It},n.ensureSingleById=function(it,Y,ft,ut){var kt=it.select(Y+"#"+ft);if(kt.size())return kt;var It=it.append(Y).attr("id",ft);return ut&&It.call(ut),It},n.objectFromPath=function(it,Y){for(var ft=it.split("."),ut,kt=ut={},It=0;It1?kt+Pt[1]:"";if(It&&(Pt.length>1||qt.length>4||ft))for(;ut.test(qt);)qt=qt.replace(ut,"$1"+It+"$2");return qt+Wt},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;n.templateString=function(it,Y){var ft={};return it.replace(n.TEMPLATE_STRING_REGEX,function(ut,kt){var It;return U.test(kt)?It=Y[kt]:(ft[kt]=ft[kt]||n.nestedProperty(Y,kt).get,It=ft[kt](!0)),It!==void 0?It:""})};var W={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=it=>st(Tr(Mr({},it),{opts:W}));var q={max:10,count:0,name:"texttemplate"};n.texttemplateString=it=>st(Tr(Mr({},it),{opts:q}));var J=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function lt(it){var Y=it.match(J);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:it,op:null,number:null}}var yt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};n.texttemplateStringForShapes=it=>st(Tr(Mr({},it),{opts:yt}));var mt=/^[:|\|]/;function st({data:it=[],locale:Y,fallback:ft,labels:ut={},opts:kt,template:It}){return It.replace(n.TEMPLATE_STRING_REGEX,(Pt,qt,Wt)=>{let Jt=["xother","yother"].includes(qt),ge=["_xother","_yother"].includes(qt),fe=["_xother_","_yother_"].includes(qt),pe=["xother_","yother_"].includes(qt),se=Jt||ge||pe||fe;(ge||fe)&&(qt=qt.substring(1)),(pe||fe)&&(qt=qt.substring(0,qt.length-1));let Tt=null,Lt=null;if(kt.parseMultDiv){var Mt=lt(qt);qt=Mt.key,Tt=Mt.op,Lt=Mt.number}let ee;if(se){if(ut[qt]===void 0)return"";ee=ut[qt]}else for(let He of it)if(He){if(He.hasOwnProperty(qt)){ee=He[qt];break}if(U.test(qt)||(ee=n.nestedProperty(He,qt).get(!0)),ee!==void 0)break}if(ee===void 0){let{count:He,max:Ge,name:cr}=kt,ur=ft===!1?Pt:ft;return He=tt&&Pt<=dt,Jt=qt>=tt&&qt<=dt;if(Wt&&(ut=10*ut+Pt-tt),Jt&&(kt=10*kt+qt-tt),!Wt||!Jt){if(ut!==kt)return ut-kt;if(Pt!==qt)return Pt-qt}}return kt-ut};var rt=2e9;n.seedPseudoRandom=function(){rt=2e9},n.pseudoRandom=function(){var it=rt;return rt=(69069*rt+1)%4294967296,Math.abs(rt-it)<429496729?n.pseudoRandom():rt/4294967296},n.fillText=function(it,Y,ft){var ut=Array.isArray(ft)?function(Pt){ft.push(Pt)}:function(Pt){ft.text=Pt},kt=n.extractOption(it,Y,"htx","hovertext");if(n.isValidTextValue(kt))return ut(kt);var It=n.extractOption(it,Y,"tx","text");if(n.isValidTextValue(It))return ut(It)},n.isValidTextValue=function(it){return it||it===0},n.formatPercent=function(it,Y){Y=Y||0;for(var ft=(Math.round(100*it*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ut=0;ut1&&(Jt=1):Jt=0,n.strTranslate(kt-Jt*(ft+Pt),It-Jt*(ut+qt))+n.strScale(Jt)+(Wt?"rotate("+Wt+(Y?"":" "+ft+" "+ut)+")":"")},n.setTransormAndDisplay=function(it,Y){it.attr("transform",n.getTextTransform(Y)),it.style("display",Y.scale?null:"none")},n.ensureUniformFontSize=function(it,Y){var ft=n.extendFlat({},Y);return ft.size=Math.max(Y.size,it._fullLayout.uniformtext.minsize||0),ft},n.join2=function(it,Y,ft){var ut=it.length;return ut>1?it.slice(0,-1).join(Y)+ft+it[ut-1]:it.join(Y)},n.bigFont=function(it){return Math.round(1.2*it)};var at=n.getFirefoxVersion(),vt=at!==null&&at<86;n.getPositionFromD3Event=function(){return vt?[c.event.layerX,c.event.layerY]:[c.event.offsetX,c.event.offsetY]}}),P_=Dt(()=>{var Q=kn(),Z={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(g in Z)c=g.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Q.addStyleRule(c,Z[g]);var c,g}),Wu=Dt((Q,Z)=>{Z.exports=!0}),Ff=Dt((Q,Z)=>{var c=Wu(),g;typeof window.matchMedia=="function"?g=!window.matchMedia("(hover: none)").matches:g=c,Z.exports=g}),Rm=Dt((Q,Z)=>{var c=typeof Reflect=="object"?Reflect:null,g=c&&typeof c.apply=="function"?c.apply:function(P,M,C){return Function.prototype.apply.call(P,M,C)},I;c&&typeof c.ownKeys=="function"?I=c.ownKeys:Object.getOwnPropertySymbols?I=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:I=function(P){return Object.getOwnPropertyNames(P)};function S(P){console&&console.warn&&console.warn(P)}var t=Number.isNaN||function(P){return P!==P};function e(){e.init.call(this)}Z.exports=e,Z.exports.once=u,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var r=10;function a(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");r=P}}),e.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},e.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function n(P){return P._maxListeners===void 0?e.defaultMaxListeners:P._maxListeners}e.prototype.getMaxListeners=function(){return n(this)},e.prototype.emit=function(P){for(var M=[],C=1;C0&&(p=M[0]),p instanceof Error)throw p;var k=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw k.context=p,k}var w=h[P];if(w===void 0)return!1;if(typeof w=="function")g(w,this,M);else for(var R=w.length,O=y(w,R),C=0;C0&&k.length>h&&!k.warned){k.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=P,w.type=M,w.count=k.length,S(w)}return P}e.prototype.addListener=function(P,M){return o(this,P,M,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(P,M){return o(this,P,M,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(P,M,C){var A={fired:!1,wrapFn:void 0,target:P,type:M,listener:C},h=i.bind(A);return h.listener=C,A.wrapFn=h,h}e.prototype.once=function(P,M){return a(M),this.on(P,l(this,P,M)),this},e.prototype.prependOnceListener=function(P,M){return a(M),this.prependListener(P,l(this,P,M)),this},e.prototype.removeListener=function(P,M){var C,A,h,p,k;if(a(M),A=this._events,A===void 0)return this;if(C=A[P],C===void 0)return this;if(C===M||C.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete A[P],A.removeListener&&this.emit("removeListener",P,C.listener||M));else if(typeof C!="function"){for(h=-1,p=C.length-1;p>=0;p--)if(C[p]===M||C[p].listener===M){k=C[p].listener,h=p;break}if(h<0)return this;h===0?C.shift():v(C,h),C.length===1&&(A[P]=C[0]),A.removeListener!==void 0&&this.emit("removeListener",P,k||M)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(P){var M,C,A;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[P]),this;if(arguments.length===0){var h=Object.keys(C),p;for(A=0;A=0;A--)this.removeListener(P,M[A]);return this};function f(P,M,C){var A=P._events;if(A===void 0)return[];var h=A[M];return h===void 0?[]:typeof h=="function"?C?[h.listener||h]:[h]:C?T(h):y(h,h.length)}e.prototype.listeners=function(P){return f(this,P,!0)},e.prototype.rawListeners=function(P){return f(this,P,!1)},e.listenerCount=function(P,M){return typeof P.listenerCount=="function"?P.listenerCount(M):x.call(P,M)},e.prototype.listenerCount=x;function x(P){var M=this._events;if(M!==void 0){var C=M[P];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function y(P,M){for(var C=new Array(M),A=0;A{var c=Rm().EventEmitter,g={init:function(I){if(I._ev instanceof c)return I;var S=new c,t=new c;return I._ev=S,I._internalEv=t,I.on=S.on.bind(S),I.once=S.once.bind(S),I.removeListener=S.removeListener.bind(S),I.removeAllListeners=S.removeAllListeners.bind(S),I._internalOn=t.on.bind(t),I._internalOnce=t.once.bind(t),I._removeInternalListener=t.removeListener.bind(t),I._removeAllInternalListeners=t.removeAllListeners.bind(t),I.emit=function(e,r){S.emit(e,r),t.emit(e,r)},typeof I.addEventListener=="function"&&I.addEventListener("wheel",()=>{},{passive:!0}),I},triggerHandler:function(I,S,t){var e,r=I._ev;if(!r)return;var a=r._events[S];if(!a)return;function n(i){if(i.listener){if(r.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[t])}else return i.apply(r,[t])}a=Array.isArray(a)?a:[a];var o;for(o=0;o{var c=kn(),g=ms().dfltConfig;function I(t,e){for(var r=[],a,n=0;ng.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},S.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},S.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},S.undo=function(t){var e,r;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{Z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),Nm=Dt(Q=>{var Z=Jo(),c=kn(),g=Ho(),I=b1(),S=xw(),t=El(),e=ms().configAttributes,r=Yc(),a=c.extendDeepAll,n=c.isPlainObject,o=c.isArrayOrTypedArray,i=c.nestedProperty,l=c.valObjectMeta,f="_isSubplotObj",x="_isLinkedToArray",y="_arrayAttrRegexps",v="_deprecated",T=[f,x,y,v];Q.IS_SUBPLOT_OBJ=f,Q.IS_LINKED_TO_ARRAY=x,Q.DEPRECATED=v,Q.UNDERSCORE_ATTRS=T,Q.get=function(){var O={};return Z.allTypes.forEach(function(j){O[j]=P(j)}),{defs:{valObjects:l,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:O,layout:M(),frames:C(),animation:A(t),config:A(e)}},Q.crawl=function(O,j,V,H){var F=V||0;H=H||"",Object.keys(O).forEach(function(U){var W=O[U];if(T.indexOf(U)===-1){var q=(H?H+".":"")+U;j(W,U,O,F,q),!Q.isValObject(W)&&n(W)&&U!=="impliedEdits"&&Q.crawl(W,j,F+1,q)}})},Q.isValObject=function(O){return O&&O.valType!==void 0},Q.findArrayAttributes=function(O){var j=[],V=[],H=[],F,U;function W(J,lt,yt,mt){V=V.slice(0,mt).concat([lt]),H=H.slice(0,mt).concat([J&&J._isLinkedToArray]);var st=J&&(J.valType==="data_array"||J.arrayOk===!0)&&!(V[mt-1]==="colorbar"&&(lt==="ticktext"||lt==="tickvals"));st&&q(F,0,"")}function q(J,lt,yt){var mt=J[V[lt]],st=yt+V[lt];if(lt===V.length-1)o(mt)&&j.push(U+st);else if(H[lt]){if(Array.isArray(mt))for(var tt=0;tt=U.length)return!1;if(O.dimensions===2){if(V++,j.length===V)return O;var W=j[V];if(!_(W))return!1;O=U[F][W]}else O=U[F]}else O=U}}return O}function _(O){return O===Math.round(O)&&O>=0}function P(O){var j,V;j=Z.modules[O]._module,V=j.basePlotModule;var H={};H.type=null;var F=a({},g),U=a({},j.attributes);Q.crawl(U,function(J,lt,yt,mt,st){i(F,st).set(void 0),J===void 0&&i(U,st).set(void 0)}),a(H,F),Z.traceIs(O,"noOpacity")&&delete H.opacity,Z.traceIs(O,"showLegend")||(delete H.showlegend,delete H.legendgroup),Z.traceIs(O,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),j.selectPoints||delete H.selectedpoints,a(H,U),V.attributes&&a(H,V.attributes),H.type=O;var W={meta:j.meta||{},categories:j.categories||{},animatable:!!j.animatable,type:O,attributes:A(H)};if(j.layoutAttributes){var q={};a(q,j.layoutAttributes),W.layoutAttributes=A(q)}return j.animatable||Q.crawl(W,function(J){Q.isValObject(J)&&"anim"in J&&delete J.anim}),W}function M(){var O={},j,V;a(O,I);for(j in Z.subplotsRegistry)if(V=Z.subplotsRegistry[j],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var H=0;H{var Z=kn(),c=Ho(),g="templateitemname",I={name:{valType:"string",editType:"none"}};I[g]={valType:"string",editType:"calc"},Q.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=I.name,r[g]=I[g],r},Q.traceTemplater=function(e){var r={},a,n;for(a in e)n=e[a],Array.isArray(n)&&n.length&&(r[a]=0);function o(i){a=Z.coerce(i,{},c,"type");var l={type:a,_template:null};if(a in r){n=e[a];var f=r[a]%n.length;r[a]++,l._template=n[f]}return l}return{newTrace:o}},Q.newContainer=function(e,r,a){var n=e._template,o=n&&(n[r]||a&&n[a]);Z.isPlainObject(o)||(o=null);var i=e[r]={_template:o};return i},Q.arrayTemplater=function(e,r,a){var n=e._template,o=n&&n[t(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function f(y){var v={name:y.name,_input:y},T=v[g]=y[g];if(!S(T))return v._template=o,v;for(var u=0;u=n&&(a._input||{})._templateitemname;i&&(o=n);var l=r+"["+o+"]",f;function x(){f={},i&&(f[l]={},f[l][g]=i)}x();function y(b,_){f[b]=_}function v(b,_){i?Z.nestedProperty(f[l],b).set(_):f[l+"."+b]=_}function T(){var b=f;return x(),b}function u(b,_){b&&v(b,_);var P=T();for(var M in P)Z.nestedProperty(e,M).set(P[M])}return{modifyBase:y,modifyItem:v,getUpdateObj:T,applyUpdate:u}}}),ic=Dt((Q,Z)=>{var c=Mo().counter;Z.exports={idRegex:{x:c("x","( domain)?"),y:c("y","( domain)?")},attrRegex:c("[xy]axis"),xAxisMatch:c("xaxis"),yAxisMatch:c("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"}}),Rc=Dt(Q=>{var Z=Jo(),c=ic();Q.id2name=function(I){if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))){var S=I.split(" ")[0].substr(1);return S==="1"&&(S=""),I.charAt(0)+"axis"+S}},Q.name2id=function(I){if(I.match(c.AX_NAME_PATTERN)){var S=I.substr(5);return S==="1"&&(S=""),I.charAt(0)+S}},Q.cleanId=function(I,S,t){var e=/( domain)$/.test(I);if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))&&!(S&&I.charAt(0)!==S)&&!(e&&!t)){var r=I.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),I.charAt(0)+r+(e&&t?" domain":"")}},Q.list=function(I,S,t){var e=I._fullLayout;if(!e)return[];var r=Q.listIds(I,S),a=new Array(r.length),n;for(n=0;ne?1:-1:+(I.substr(1)||1)-+(S.substr(1)||1)},Q.ref2id=function(I){return/^[xyz]/.test(I)?I.split(" ")[0]:!1};function g(I,S){if(S&&S.length){for(var t=0;t{function c(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".outline-controllers").remove()}function g(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".select-outline").remove(),I._fullLayout._outlining=!1}Z.exports={clearOutlineControllers:c,clearOutline:g}}),vg=Dt((Q,Z)=>{Z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),ud=Dt(Q=>{var Z=Jo();ic().SUBPLOT_PATTERN,Q.getSubplotCalcData=function(c,g,I){var S=Z.subplotsRegistry[g];if(!S)return[];for(var t=S.attr,e=[],r=0;r{var Z=Jo(),c=kn();Q.manageCommandObserver=function(r,a,n,o){var i={},l=!0;a&&a._commandObserver&&(i=a._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var f=Q.hasSimpleAPICommandBindings(r,n,i.lookupTable);if(a&&a._commandObserver){if(f)return i;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,i}if(f){g(r,f,i.cache),i.check=function(){if(l){var v=g(r,f,i.cache);return v.changed&&o&&i.lookupTable[v.value]!==void 0&&(i.disable(),Promise.resolve(o({value:v.value,type:f.type,prop:f.prop,traces:f.traces,index:i.lookupTable[v.value]})).then(i.enable,i.enable)),v.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y0?".":"")+i;c.isPlainObject(l)?e(l,a,f,o+1):a(f,i,l)}})}}),Kc=Dt((Q,Z)=>{var c=qr(),g=Fi().timeFormatLocale,I=Pi().formatLocale,S=Yi(),t=Ni(),e=Jo(),r=Nm(),a=mu(),n=kn(),o=hi(),i=Ca().BADNUM,l=Rc(),f=C0().clearOutline,x=vg(),y=El(),v=xw(),T=ud().getModuleCalcData,u=n.relinkPrivateKeys,b=n._,_=Z.exports={};n.extendFlat(_,e),_.attributes=Ho(),_.attributes.type.values=_.allTypes,_.fontAttrs=da(),_.layoutAttributes=b1();var P=A1();_.executeAPICommand=P.executeAPICommand,_.computeAPICommandBindings=P.computeAPICommandBindings,_.manageCommandObserver=P.manageCommandObserver,_.hasSimpleAPICommandBindings=P.hasSimpleAPICommandBindings,_.redrawText=function(tt){return tt=n.getGraphDiv(tt),new Promise(function(dt){setTimeout(function(){tt._fullLayout&&(e.getComponentMethod("annotations","draw")(tt),e.getComponentMethod("legend","draw")(tt),e.getComponentMethod("colorbar","draw")(tt),dt(_.previousPromises(tt)))},300)})},_.resize=function(tt){tt=n.getGraphDiv(tt);var dt,rt=new Promise(function(at,vt){(!tt||n.isHidden(tt))&&vt(new Error("Resize must be passed a displayed plot div element.")),tt._redrawTimer&&clearTimeout(tt._redrawTimer),tt._resolveResize&&(dt=tt._resolveResize),tt._resolveResize=at,tt._redrawTimer=setTimeout(function(){if(!tt.layout||tt.layout.width&&tt.layout.height||n.isHidden(tt)){at(tt);return}delete tt.layout.width,delete tt.layout.height;var it=tt.changed;tt.autoplay=!0,e.call("relayout",tt,{autosize:!0}).then(function(){tt.changed=it,tt._resolveResize===at&&(delete tt._resolveResize,at(tt))})},100)});return dt&&dt(rt),rt},_.previousPromises=function(tt){if((tt._promises||[]).length)return Promise.all(tt._promises).then(function(){tt._promises=[]})},_.addLinks=function(tt){if(!(!tt._context.showLink&&!tt._context.showSources)){var dt=tt._fullLayout,rt=n.ensureSingle(dt._paper,"text","js-plot-link-container",function(ut){ut.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var kt=c.select(this);kt.append("tspan").classed("js-link-to-tool",!0),kt.append("tspan").classed("js-link-spacer",!0),kt.append("tspan").classed("js-sourcelinks",!0)})}),at=rt.node(),vt={y:dt._paper.attr("height")-9};document.body.contains(at)&&at.getComputedTextLength()>=dt.width-20?(vt["text-anchor"]="start",vt.x=5):(vt["text-anchor"]="end",vt.x=dt._paper.attr("width")-7),rt.attr(vt);var it=rt.select(".js-link-to-tool"),Y=rt.select(".js-link-spacer"),ft=rt.select(".js-sourcelinks");tt._context.showSources&&tt._context.showSources(tt),tt._context.showLink&&M(tt,it),Y.text(it.text()&&ft.text()?" - ":"")}};function M(tt,dt){dt.text("");var rt=dt.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(tt._context.linkText+" »");if(tt._context.sendData)rt.on("click",function(){_.sendDataToCloud(tt)});else{var at=window.location.pathname.split("/"),vt=window.location.search;rt.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+at[2].split(".")[0]+"/"+at[1]+vt})}}_.sendDataToCloud=function(tt){var dt=(window.PLOTLYENV||{}).BASE_URL||tt._context.plotlyServerURL;if(dt){tt.emit("plotly_beforeexport");var rt=c.select(tt).append("div").attr("id","hiddenform").style("display","none"),at=rt.append("form").attr({action:dt+"/external",method:"post",target:"_blank"}),vt=at.append("input").attr({type:"text",name:"data"});return vt.node().value=_.graphJson(tt,!1,"keepdata"),at.node().submit(),rt.remove(),tt.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];_.supplyDefaults=function(tt,dt){var rt=dt&&dt.skipUpdateCalc,at=tt._fullLayout||{};if(at._skipDefaults){delete at._skipDefaults;return}var vt=tt._fullLayout={},it=tt.layout||{},Y=tt._fullData||[],ft=tt._fullData=[],ut=tt.data||[],kt=tt.calcdata||[],It=tt._context||{},Pt;tt._transitionData||_.createTransitionData(tt),vt._dfltTitle={plot:b(tt,"Click to enter Plot title"),subtitle:b(tt,"Click to enter Plot subtitle"),x:b(tt,"Click to enter X axis title"),y:b(tt,"Click to enter Y axis title"),colorbar:b(tt,"Click to enter Colorscale title"),annotation:b(tt,"new text")},vt._traceWord=b(tt,"trace");var qt=k(tt,C);if(vt._mapboxAccessToken=It.mapboxAccessToken,at._initialAutoSizeIsDone){var Wt=at.width,Jt=at.height;_.supplyLayoutGlobalDefaults(it,vt,qt),it.width||(vt.width=Wt),it.height||(vt.height=Jt),_.sanitizeMargins(vt)}else{_.supplyLayoutGlobalDefaults(it,vt,qt);var ge=!it.width||!it.height,fe=vt.autosize,pe=It.autosizable,se=ge&&(fe||pe);se?_.plotAutoSize(tt,it,vt):ge&&_.sanitizeMargins(vt),!fe&&ge&&(it.width=vt.width,it.height=vt.height)}vt._d3locale=w(qt,vt.separators),vt._extraFormat=k(tt,A),vt._initialAutoSizeIsDone=!0,vt._dataLength=ut.length,vt._modules=[],vt._visibleModules=[],vt._basePlotModules=[];var Tt=vt._subplots=p(),Lt=vt._splomAxes={x:{},y:{}},Mt=vt._splomSubplots={};vt._splomGridDflt={},vt._scatterStackOpts={},vt._firstScatter={},vt._alignmentOpts={},vt._colorAxes={},vt._requestRangeslider={},vt._traceUids=h(Y,ut),_.supplyDataDefaults(ut,ft,it,vt);var ee=Object.keys(Lt.x),ve=Object.keys(Lt.y);if(ee.length>1&&ve.length>1){for(e.getComponentMethod("grid","sizeDefaults")(it,vt),Pt=0;Pt15&&ve.length>15&&vt.shapes.length===0&&vt.images.length===0,_.linkSubplots(ft,vt,Y,at),_.cleanPlot(ft,vt,Y,at);var cr=!!(at._has&&at._has("cartesian")),ur=!!(vt._has&&vt._has("cartesian")),jr=cr,Wr=ur;jr&&!Wr?at._bgLayer.remove():Wr&&!jr&&(vt._shouldCreateBgLayer=!0),at._zoomlayer&&!tt._dragging&&f({_fullLayout:at}),R(ft,vt),u(vt,at),e.getComponentMethod("colorscale","crossTraceDefaults")(ft,vt),vt._preGUI||(vt._preGUI={}),vt._tracePreGUI||(vt._tracePreGUI={});var br=vt._tracePreGUI,Xr={},nn;for(nn in br)Xr[nn]="old";for(Pt=0;Pt0){var kt=1-2*vt;it=Math.round(kt*it),Y=Math.round(kt*Y)}}var It=_.layoutAttributes.width.min,Pt=_.layoutAttributes.height.min;it1,Wt=!dt.height&&Math.abs(rt.height-Y)>1;(Wt||qt)&&(qt&&(rt.width=it),Wt&&(rt.height=Y)),tt._initialAutoSize||(tt._initialAutoSize={width:it,height:Y}),_.sanitizeMargins(rt)},_.supplyLayoutModuleDefaults=function(tt,dt,rt,at){var vt=e.componentsRegistry,it=dt._basePlotModules,Y,ft,ut,kt=e.subplotsRegistry.cartesian;for(Y in vt)ut=vt[Y],ut.includeBasePlot&&ut.includeBasePlot(tt,dt);it.length||it.push(kt),dt._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(tt,dt),kt.finalizeSubplots(tt,dt));for(var It in dt._subplots)dt._subplots[It].sort(n.subplotSort);for(ft=0;ft1&&(rt.l/=fe,rt.r/=fe)}if(qt){var pe=(rt.t+rt.b)/qt;pe>1&&(rt.t/=pe,rt.b/=pe)}var se=rt.xl!==void 0?rt.xl:rt.x,Tt=rt.xr!==void 0?rt.xr:rt.x,Lt=rt.yt!==void 0?rt.yt:rt.y,Mt=rt.yb!==void 0?rt.yb:rt.y;Wt[dt]={l:{val:se,size:rt.l+ge},r:{val:Tt,size:rt.r+ge},b:{val:Mt,size:rt.b+ge},t:{val:Lt,size:rt.t+ge}},Jt[dt]=1}if(!at._replotting)return _.doAutoMargin(tt)}};function U(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var dt=l.list(tt,"",!0);for(var rt in dt)if(dt[rt].autoshift||dt[rt].shift)return!0;return!1}_.doAutoMargin=function(tt){var dt=tt._fullLayout,rt=dt.width,at=dt.height;dt._size||(dt._size={}),V(dt);var vt=dt._size,it=dt.margin,Y={t:0,b:0,l:0,r:0},ft=n.extendFlat({},vt),ut=it.l,kt=it.r,It=it.t,Pt=it.b,qt=dt._pushmargin,Wt=dt._pushmarginIds,Jt=dt.minreducedwidth,ge=dt.minreducedheight;if(it.autoexpand!==!1){for(var fe in qt)Wt[fe]||delete qt[fe];var pe=tt._fullLayout._reservedMargin;for(var se in pe)for(var Tt in pe[se]){var Lt=pe[se][Tt];Y[Tt]=Math.max(Y[Tt],Lt)}qt.base={l:{val:0,size:ut},r:{val:1,size:kt},t:{val:1,size:It},b:{val:0,size:Pt}};for(var Mt in Y){var ee=0;for(var ve in qt)ve!=="base"&&S(qt[ve][Mt].size)&&(ee=qt[ve][Mt].size>ee?qt[ve][Mt].size:ee);var oe=Math.max(0,it[Mt]-ee);Y[Mt]=Math.max(0,Y[Mt]-oe)}for(var Te in qt){var He=qt[Te].l||{},Ge=qt[Te].b||{},cr=He.val,ur=He.size,jr=Ge.val,Wr=Ge.size,br=rt-Y.r-Y.l,Xr=at-Y.t-Y.b;for(var nn in qt){if(S(ur)&&qt[nn].r){var Le=qt[nn].r.val,Gt=qt[nn].r.size;if(Le>cr){var ne=(ur*Le+(Gt-br)*cr)/(Le-cr),Ct=(Gt*(1-cr)+(ur-br)*(1-Le))/(Le-cr);ne+Ct>ut+kt&&(ut=ne,kt=Ct)}}if(S(Wr)&&qt[nn].t){var gt=qt[nn].t.val,St=qt[nn].t.size;if(gt>jr){var Nt=(Wr*gt+(St-Xr)*jr)/(gt-jr),re=(St*(1-jr)+(Wr-Xr)*(1-gt))/(gt-jr);Nt+re>Pt+It&&(Pt=Nt,It=re)}}}}}var le=n.constrain(rt-it.l-it.r,H,Jt),we=n.constrain(at-it.t-it.b,F,ge),Ue=Math.max(0,rt-le),qe=Math.max(0,at-we);if(Ue){var or=(ut+kt)/Ue;or>1&&(ut/=or,kt/=or)}if(qe){var Sr=(Pt+It)/qe;Sr>1&&(Pt/=Sr,It/=Sr)}if(vt.l=Math.round(ut)+Y.l,vt.r=Math.round(kt)+Y.r,vt.t=Math.round(It)+Y.t,vt.b=Math.round(Pt)+Y.b,vt.p=Math.round(it.pad),vt.w=Math.round(rt)-vt.l-vt.r,vt.h=Math.round(at)-vt.t-vt.b,!dt._replotting&&(_.didMarginChange(ft,vt)||U(tt))){"_redrawFromAutoMarginCount"in dt?dt._redrawFromAutoMarginCount++:dt._redrawFromAutoMarginCount=1;var Ar=3*(1+Object.keys(Wt).length);if(dt._redrawFromAutoMarginCount1)return!0}return!1},_.graphJson=function(tt,dt,rt,at,vt,it){(vt&&dt&&!tt._fullData||vt&&!dt&&!tt._fullLayout)&&_.supplyDefaults(tt);var Y=vt?tt._fullData:tt.data,ft=vt?tt._fullLayout:tt.layout,ut=(tt._transitionData||{})._frames;function kt(qt,Wt){if(typeof qt=="function")return Wt?"_function_":null;if(n.isPlainObject(qt)){var Jt={},ge;return Object.keys(qt).sort().forEach(function(Tt){if(["_","["].indexOf(Tt.charAt(0))===-1){if(typeof qt[Tt]=="function"){Wt&&(Jt[Tt]="_function");return}if(rt==="keepdata"){if(Tt.substr(Tt.length-3)==="src")return}else if(rt==="keepstream"){if(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0&&!n.isPlainObject(qt.stream))return}else if(rt!=="keepall"&&(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0))return;Jt[Tt]=kt(qt[Tt],Wt)}}),Jt}var fe=Array.isArray(qt),pe=n.isTypedArray(qt);if((fe||pe)&&qt.dtype&&qt.shape){var se=qt.bdata;return kt({dtype:qt.dtype,shape:qt.shape,bdata:n.isArrayBuffer(se)?t.encode(se):se},Wt)}return fe?qt.map(function(Tt){return kt(Tt,Wt)}):pe?n.simpleMap(qt,n.identity):n.isJSDate(qt)?n.ms2DateTimeLocal(+qt):qt}var It={data:(Y||[]).map(function(qt){var Wt=kt(qt);return dt&&delete Wt.fit,Wt})};if(!dt&&(It.layout=kt(ft),vt)){var Pt=ft._size;It.layout.computed={margin:{b:Pt.b,l:Pt.l,r:Pt.r,t:Pt.t}}}return ut&&(It.frames=kt(ut)),it&&(It.config=kt(tt._context,!0)),at==="object"?It:JSON.stringify(It)},_.modifyFrames=function(tt,dt){var rt,at,vt,it=tt._transitionData._frames,Y=tt._transitionData._frameHash;for(rt=0;rt0&&(tt._transitioningWithDuration=!0),tt._transitionData._interruptCallbacks.push(function(){at=!0}),rt.redraw&&tt._transitionData._interruptCallbacks.push(function(){return e.call("redraw",tt)}),tt._transitionData._interruptCallbacks.push(function(){tt.emit("plotly_transitioninterrupted",[])});var qt=0,Wt=0;function Jt(){return qt++,function(){Wt++,!at&&Wt===qt&&ft(Pt)}}rt.runFn(Jt),setTimeout(Jt())})}function ft(Pt){if(tt._transitionData)return it(tt._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(rt.redraw)return e.call("redraw",tt)}).then(function(){tt._transitioning=!1,tt._transitioningWithDuration=!1,tt.emit("plotly_transitioned",[])}).then(Pt)}function ut(){if(tt._transitionData)return tt._transitioning=!1,vt(tt._transitionData._interruptCallbacks)}var kt=[_.previousPromises,ut,rt.prepareFn,_.rehover,_.reselect,Y],It=n.syncOrAsync(kt,tt);return(!It||!It.then)&&(It=Promise.resolve()),It.then(function(){return tt})}_.doCalcdata=function(tt,dt){var rt=l.list(tt),at=tt._fullData,vt=tt._fullLayout,it,Y,ft,ut,kt=new Array(at.length),It=(tt.calcdata||[]).slice();for(tt.calcdata=kt,vt._numBoxes=0,vt._numViolins=0,vt._violinScaleGroupStats={},tt._hmpixcount=0,tt._hmlumcount=0,vt._piecolormap={},vt._sunburstcolormap={},vt._treemapcolormap={},vt._iciclecolormap={},vt._funnelareacolormap={},ft=0;ft=0;ut--)if(Mt[ut].enabled){it._indexToPoints=Mt[ut]._indexToPoints;break}Y&&Y.calc&&(Lt=Y.calc(tt,it))}(!Array.isArray(Lt)||!Lt[0])&&(Lt=[{x:i,y:i}]),Lt[0].t||(Lt[0].t={}),Lt[0].trace=it,kt[se]=Lt}}for(mt(rt,at,vt),ft=0;ft{Q.xmlns="http://www.w3.org/2000/xmlns/",Q.svg="http://www.w3.org/2000/svg",Q.xlink="http://www.w3.org/1999/xlink",Q.svgAttrs={xmlns:Q.svg,"xmlns:xlink":Q.xlink}}),Af=Dt((Q,Z)=>{Z.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"}}}),ec=Dt(Q=>{var Z=qr(),c=kn(),g=c.strTranslate,I=Dp(),S=Af().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Q.convertToTspans=function(F,U,W){var q=F.text(),J=!F.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&q.match(t),lt=Z.select(F.node().parentNode);if(lt.empty())return;var yt=F.attr("class")?F.attr("class").split(" ")[0]:"text";yt+="-math",lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove(),F.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function mt(){lt.empty()||(yt=F.attr("class")+"-math",lt.select("svg."+yt).remove()),F.text("").style("white-space","pre");var st=O(F.node(),q);st&&F.style("pointer-events","all"),Q.positionText(F),W&&W.call(F)}return J?(U&&U._promises||[]).push(new Promise(function(st){F.style("display","none");var tt=parseInt(F.node().style.fontSize,10),dt={fontSize:tt};o(J[2],dt,function(rt,at,vt){lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove();var it=rt&&rt.select("svg");if(!it||!it.node()){mt(),st();return}var Y=lt.append("g").classed(yt+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});Y.node().appendChild(it.node()),at&&at.node()&&it.node().insertBefore(at.node().cloneNode(!0),it.node().firstChild);var ft=vt.width,ut=vt.height;it.attr({class:yt,height:ut,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var kt=F.node().style.fill||"black",It=it.select("g");It.attr({fill:kt,stroke:kt});var Pt=It.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height;(qt>ft||Wt>ut)&&(it.style("overflow","hidden"),Pt=it.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height);var Jt=+F.attr("x"),ge=+F.attr("y"),fe=tt||F.node().getBoundingClientRect().height,pe=-fe/4;if(yt[0]==="y")Y.attr({transform:"rotate("+[-90,Jt,ge]+")"+g(-qt/2,pe-Wt/2)});else if(yt[0]==="l")ge=pe-Wt/2;else if(yt[0]==="a"&&yt.indexOf("atitle")!==0)Jt=0,ge=pe;else{var se=F.attr("text-anchor");Jt=Jt-qt*(se==="middle"?.5:se==="end"?1:0),ge=ge+pe-Wt/2}it.attr({x:Jt,y:ge}),W&&W.call(F,Y),st(Y)})})):mt(),F};var e=/(<|<|<)/g,r=/(>|>|>)/g;function a(F){return F.replace(e,"\\lt ").replace(r,"\\gt ")}var n=[["$","$"],["\\(","\\)"]];function o(F,U,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){c.warn("No MathJax version:",MathJax.version);return}var J,lt,yt,mt,st=function(){return lt=c.extendDeepAll({},MathJax.Hub.config),yt=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:n},displayAlign:"left"})},tt=function(){lt=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=n},dt=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},rt=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},at=function(){var kt="math-output-"+c.randstr({},64);mt=Z.select("body").append("div").attr({id:kt}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(a(F));var It=mt.node();return q===2?MathJax.Hub.Typeset(It):MathJax.typeset([It])},vt=function(){var kt=mt.select(q===2?".MathJax_SVG":".MathJax"),It=!kt.empty()&&mt.select("svg").node();if(!It)c.log("There was an error in the tex syntax.",F),W();else{var Pt=It.getBoundingClientRect(),qt;q===2?qt=Z.select("body").select("#MathJax_SVG_glyphs"):qt=kt.select("defs"),W(kt,qt,Pt)}mt.remove()},it=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},Y=function(){J!=="svg"&&(MathJax.config.startup.output=J)},ft=function(){return yt!==void 0&&(MathJax.Hub.processSectionDelay=yt),MathJax.Hub.Config(lt)},ut=function(){MathJax.config=lt};q===2?MathJax.Hub.Queue(st,dt,at,vt,it,ft):q===3&&(tt(),rt(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){at(),vt(),Y(),ut()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},l={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},x="​",y=["http:","https:","mailto:","",void 0,":"],v=Q.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,u=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;Q.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,P=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,C=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(F,U){if(!F)return null;var W=F.match(U),q=W&&(W[3]||W[4]);return q&&w(q)}var h=/(^|;)\s*color:/;Q.plainText=function(F,U){U=U||{};for(var W=U.len!==void 0&&U.len!==-1?U.len:1/0,q=U.allowedTags!==void 0?U.allowedTags:["br"],J="...",lt=J.length,yt=F.split(T),mt=[],st="",tt=0,dt=0;dtlt?mt.push(rt.substr(0,Y-lt)+J):mt.push(rt.substr(0,Y));break}st=""}}return mt.join("")};var p={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function w(F){return F.replace(k,function(U,W){var q;return W.charAt(0)==="#"?q=R(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=p[W],q||U})}Q.convertEntities=w;function R(F){if(!(F>1114111)){var U=String.fromCodePoint;if(U)return U(F);var W=String.fromCharCode;return F<=65535?W(F):W((F>>10)+55232,F%1024+56320)}}function O(F,U){U=U.replace(v," ");var W=!1,q=[],J,lt=-1;function yt(){lt++;var Wt=document.createElementNS(I.svg,"tspan");Z.select(Wt).attr({class:"line",dy:lt*S+"em"}),F.appendChild(Wt),J=Wt;var Jt=q;if(q=[{node:Wt}],Jt.length>1)for(var ge=1;ge.",U);return}var Jt=q.pop();Wt!==Jt.type&&c.log("Start tag <"+Jt.type+"> doesnt match end tag <"+Wt+">. Pretending it did match.",U),J=q[q.length-1].node}var dt=b.test(U);dt?yt():(J=F,q=[{node:F}]);for(var rt=U.split(T),at=0;at{var c=qr(),g=ro(),I=Yi(),S=kn(),t=hi(),e=vi().isValid;function r(v,T,u){var b=T?S.nestedProperty(v,T).get()||{}:v,_=b[u||"color"];_&&_._inputArray&&(_=_._inputArray);var P=!1;if(S.isArrayOrTypedArray(_)){for(var M=0;M<_.length;M++)if(I(_[M])){P=!0;break}}return S.isPlainObject(b)&&(P||b.showscale===!0||I(b.cmin)&&I(b.cmax)||e(b.colorscale)||S.isPlainObject(b.colorbar))}var a=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function o(v){var T=v._colorAx,u=T||v,b={},_,P,M;for(P=0;P=0;b--,_++){var P=v[b];u[_]=[1-P[0],P[1]]}return u}function f(v,T){T=T||{};for(var u=v.domain,b=v.range,_=b.length,P=new Array(_),M=0;M<_;M++){var C=g(b[M]).toRgb();P[M]=[C.r,C.g,C.b,C.a]}var A=c.scale.linear().domain(u).range(P).clamp(!0),h=T.noNumericCheck,p=T.returnArray,k;return h&&p?k=A:h?k=function(w){return y(A(w))}:p?k=function(w){return I(w)?A(w):g(w).isValid()?w:t.defaultLine}:k=function(w){return I(w)?y(A(w)):g(w).isValid()?w:t.defaultLine},k.domain=A.domain,k.range=function(){return b},k}function x(v,T){return f(i(v),T)}function y(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return g(T).toRgbString()}Z.exports={hasColorscale:r,extractOpts:o,extractScale:i,flipScale:l,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:x}}),dh=Dt((Q,Z)=>{var c=S_(),g=c.FORMAT_LINK,I=c.DATE_FORMAT_LINK;function S(r,a){return{valType:"string",dflt:"",editType:"none",description:(a?t:e)("hover text",r)+["By default the values are formatted using "+(a?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function t(r,a){return["Sets the "+r+" formatting rule"+(a?"for `"+a+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+g+"."].join(" ")}function e(r,a){return t(r,a)+[" And for dates see: "+I+".","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(" ")}Z.exports={axisHoverFormat:S,descriptionOnlyNumbers:t,descriptionWithDates:e}}),Td=Dt((Q,Z)=>{var c=da(),g=wi(),I=kd().dash,S=Ia().extendFlat,t=mu().templatedArray;Zu().templateFormatStringDescription;var e=dh().descriptionWithDates,r=Ca().ONEDAY,a=ic(),n=a.HOUR_PATTERN,o=a.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},l=S({},i,{values:i.values.slice().concat(["sync"])});function f(h){return{valType:"integer",min:0,dflt:h?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function u(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=5),p}function b(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var _={valType:"color",dflt:g.defaultLine,editType:"ticks"},P={valType:"color",dflt:g.lightLine,editType:"ticks"};function M(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var C=S({},I,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};Z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:c({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:t("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:[o,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:r},editType:"calc"}),tickmode:l,nticks:f(),tick0:x,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,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:u(),tickwidth:b(),tickcolor:_,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:S({},I,{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:c({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:e("tick label")},tickformatstops:t("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:e("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:P,gridwidth:M(),griddash:C,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.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:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:f("minor"),tick0:x,dtick:y,tickvals:v,ticks:T,ticklen:u("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:P,gridwidth:M("minor"),griddash:C,showgrid:A,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"}}),M1=Dt((Q,Z)=>{var c=Td(),g=da(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({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:c.linecolor,outlinewidth:c.linewidth,bordercolor:c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:I({},c.ticks,{dflt:""}),ticklabeloverflow:I({},c.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:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:g({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),kc=Dt((Q,Z)=>{var c=M1(),g=Mo().counter,I=G0(),S=vi().scales;I(S);function t(e){return"`"+e+"`"}Z.exports=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c";"onlyIfNumerical"in r&&r.onlyIfNumerical;var n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",i=typeof r.colorscaleDflt=="string"?S[r.colorscaleDflt]:null,l=r.editTypeOverride||"",f=e?e+".":"",x;"colorAttr"in r?(x=r.colorAttr,r.colorAttr):(x={z:"z",c:"color"}[a],""+t(f+x));var y=a+"auto",v=a+"min",T=a+"max",u=a+"mid",b={};b[v]=b[T]=void 0;var _={};_[y]=!1;var P={};return x==="color"&&(P.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(P.color.anim=!0)),P[y]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:b},P[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[T]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[u]={valType:"number",dflt:null,editType:"calc",impliedEdits:b},P.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(P.showscale={valType:"boolean",dflt:o,editType:"calc"},P.colorbar=c),r.noColorAxis||(P.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),P}}),zu=Dt((Q,Z)=>{var c=Ia().extendFlat,g=kc(),I=vi().scales;Z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:I.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:I.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:I.RdBu,editType:"calc"}},coloraxis:c({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),L0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g){return c.isPlainObject(g.colorbar)}}),Nh=Dt(Q=>{var Z=Yi(),c=kn(),g=Ca(),I=g.ONEDAY,S=g.ONEWEEK;Q.dtick=function(t,e){var r=e==="log",a=e==="date",n=e==="category",o=a?I:1;if(!t)return o;if(Z(t))return t=Number(t),t<=0?o:n?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return o;var i=t.charAt(0),l=t.substr(1);return l=Z(l)?Number(l):0,l<=0||!(a&&i==="M"&&l===Math.round(l)||r&&i==="L"||r&&i==="D"&&(l===1||l===2))?o:t},Q.tick0=function(t,e,r,a){if(e==="date")return c.cleanDate(t,c.dateTick0(r,a%S===0?1:0));if(!(a==="D1"||a==="D2"))return Z(t)?Number(t):0}}),yg=Dt((Q,Z)=>{var c=Nh(),g=kn().isArrayOrTypedArray,I=Ma().isTypedArraySpec,S=Ma().decodeTypedArraySpec;Z.exports=function(t,e,r,a,n){n||(n={});var o=n.isMinor,i=o?t.minor||{}:t,l=o?e.minor:e,f=o?"minor.":"";function x(M){var C=i[M];return I(C)&&(C=S(C)),C!==void 0?C:(l._template||{})[M]}var y=x("tick0"),v=x("dtick"),T=x("tickvals"),u=g(T)?"array":v?"linear":"auto",b=r(f+"tickmode",u);if(b==="auto"||b==="sync")r(f+"nticks");else if(b==="linear"){var _=l.dtick=c.dtick(v,a);l.tick0=c.tick0(y,a,e.calendar,_)}else if(a!=="multicategory"){var P=r(f+"tickvals");P===void 0?l.tickmode="auto":o||r("ticktext")}}}),xg=Dt((Q,Z)=>{var c=kn(),g=Td();Z.exports=function(I,S,t,e){var r=e.isMinor,a=r?I.minor||{}:I,n=r?S.minor:S,o=r?g.minor:g,i=r?"minor.":"",l=c.coerce2(a,n,o,"ticklen",r?(S.ticklen||5)*.6:void 0),f=c.coerce2(a,n,o,"tickwidth",r?S.tickwidth||1:void 0),x=c.coerce2(a,n,o,"tickcolor",(r?S.tickcolor:void 0)||n.color),y=t(i+"ticks",!r&&e.outerTicks||l||f||x?"outside":"");y||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}),Ny=Dt((Q,Z)=>{Z.exports=function(c){var g=["showexponent","showtickprefix","showticksuffix"],I=g.filter(function(t){return c[t]!==void 0}),S=function(t){return c[t]===c[I[0]]};if(I.every(S)||I.length===1)return c[I[0]]}}),Ad=Dt((Q,Z)=>{var c=kn(),g=mu();Z.exports=function(I,S,t){var e=t.name,r=t.inclusionAttr||"visible",a=S[e],n=c.isArrayOrTypedArray(I[e])?I[e]:[],o=S[e]=[],i=g.arrayTemplater(S,e,r),l,f;for(l=0;l{var c=kn(),g=hi().contrast,I=Td(),S=Ny(),t=Ad();Z.exports=function(r,a,n,o,i){i||(i={});var l=n("labelalias");c.isPlainObject(l)||delete a.labelalias;var f=S(r),x=n("showticklabels");if(x){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var y=i.font||{},v=a.color,T=a.ticklabelposition||"",u=T.indexOf("inside")!==-1?g(i.bgColor):v&&v!==I.color.dflt?v:y.color;if(c.coerceFont(n,"tickfont",y,{overrideDflt:{color:u}}),!i.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&n("ticklabelstep"),!i.noAng){var b=n("tickangle");!i.noAutotickangles&&b==="auto"&&n("autotickangles")}if(o!=="category"){var _=n("tickformat");t(r,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:e}),a.tickformatstops.length||delete a.tickformatstops,!i.noExp&&!_&&o!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&o==="log"&&n("minorloglabels")}};function e(r,a){function n(i,l){return c.coerce(r,a,I.tickformatstops,i,l)}var o=n("enabled");o&&(n("dtickrange"),n("value"))}}),dm=Dt((Q,Z)=>{var c=Ny();Z.exports=function(g,I,S,t,e){e||(e={});var r=e.tickSuffixDflt,a=c(g),n=S("tickprefix");n&&S("showtickprefix",a);var o=S("ticksuffix",r);o&&S("showticksuffix",a)}}),fv=Dt((Q,Z)=>{var c=kn(),g=mu(),I=yg(),S=xg(),t=n0(),e=dm(),r=M1();Z.exports=function(a,n,o){var i=g.newContainer(n,"colorbar"),l=a.colorbar||{};function f(F,U){return c.coerce(l,i,r,F,U)}var x=o.margin||{t:0,b:0,l:0,r:0},y=o.width-x.l-x.r,v=o.height-x.t-x.b,T=f("orientation"),u=T==="v",b=f("thicknessmode");f("thickness",b==="fraction"?30/(u?y:v):30);var _=f("lenmode");f("len",_==="fraction"?1:u?v:y);var P=f("yref"),M=f("xref"),C=P==="paper",A=M==="paper",h,p,k,w="left";u?(k="middle",w=A?"left":"right",h=A?1.02:1,p=.5):(k=C?"bottom":"top",w="center",h=.5,p=C?1.02:1),c.coerce(l,i,{x:{valType:"number",min:A?-2:0,max:A?3:1,dflt:h}},"x"),c.coerce(l,i,{y:{valType:"number",min:C?-2:0,max:C?3:1,dflt:p}},"y"),f("xanchor",w),f("xpad"),f("yanchor",k),f("ypad"),c.noneOrAll(l,i,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var R=c.coerce(l,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",R.indexOf("inside")!==-1?"hide past domain":"hide past div"),I(l,i,f,"linear");var O=o.font,j={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:O};R.indexOf("inside")!==-1&&(j.bgColor="black"),e(l,i,f,"linear",j),t(l,i,f,"linear",j),S(l,i,f,"linear",j),f("title.text",o._dfltTitle.colorbar);var V=i.showticklabels?i.tickfont:O,H=c.extendFlat({},O,{family:V.family,size:c.bigFont(V.size)});c.coerceFont(f,"title.font",H),f("title.side",u?"top":"right")}}),mc=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=L0(),S=fv(),t=vi().isValid,e=Jo().traceIs;function r(a,n){var o=n.slice(0,n.length-1);return n?g.nestedProperty(a,o).get()||{}:a}Z.exports=function a(n,o,i,l,f){var x=f.prefix,y=f.cLetter,v="_module"in o,T=r(n,x),u=r(o,x),b=r(o._template||{},x)||{},_=function(){return delete n.coloraxis,delete o.coloraxis,a(n,o,i,l,f)};if(v){var P=i._colorAxes||{},M=l(x+"coloraxis");if(M){var C=e(o,"contour")&&g.nestedProperty(o,"contours.coloring").get()||"heatmap",A=P[M];A?(A[2].push(_),A[0]!==C&&(A[0]=!1,g.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):P[M]=[C,o,[_]];return}}var h=T[y+"min"],p=T[y+"max"],k=c(h)&&c(p)&&h{var c=kn(),g=mu(),I=zu(),S=mc();Z.exports=function(t,e){function r(y,v){return c.coerce(t,e,I,y,v)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var a=e._colorAxes,n,o;function i(y,v){return c.coerce(n,o,I.coloraxis,y,v)}for(var l in a){var f=a[l];if(f[0])n=t[l]||{},o=g.newContainer(e,l,"coloraxis"),o._name=l,S(n,o,e,i,{prefix:"",cLetter:"c"});else{for(var x=0;x{var c=kn(),g=Ud().hasColorscale,I=Ud().extractOpts;Z.exports=function(S,t){function e(f,x){var y=f["_"+x];y!==void 0&&(f[x]=y)}function r(f,x){var y=x.container?c.nestedProperty(f,x.container).get():f;if(y)if(y.coloraxis)y._colorAx=t[y.coloraxis];else{var v=I(y),T=v.auto;(T||v.min===void 0)&&e(y,x.min),(T||v.max===void 0)&&e(y,x.max),v.autocolorscale&&e(y,"colorscale")}}for(var a=0;a{var c=Yi(),g=kn(),I=Ud().extractOpts;Z.exports=function(S,t,e){var r=S._fullLayout,a=e.vals,n=e.containerStr,o=n?g.nestedProperty(t,n).get():t,i=I(o),l=i.auto!==!1,f=i.min,x=i.max,y=i.mid,v=function(){return g.aggNums(Math.min,null,a)},T=function(){return g.aggNums(Math.max,null,a)};if(f===void 0?f=v():l&&(o._colorAx&&c(f)?f=Math.min(f,v()):f=v()),x===void 0?x=T():l&&(o._colorAx&&c(x)?x=Math.max(x,T()):x=T()),l&&y!==void 0&&(x-y>y-f?f=y-(x-y):x-y=0?u=r.colorscale.sequential:u=r.colorscale.sequentialminus,i._sync("colorscale",u)}}}),Xc=Dt((Q,Z)=>{var c=vi(),g=Ud();Z.exports={moduleType:"component",name:"colorscale",attributes:kc(),layoutAttributes:zu(),supplyLayoutDefaults:_g(),handleDefaults:mc(),crossTraceDefaults:_w(),calc:Xd(),scales:c.scales,defaultScale:c.defaultScale,getScale:c.get,isValidScale:c.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}}),Tc=Dt((Q,Z)=>{var c=kn(),g=Ma().isTypedArraySpec;Z.exports={hasLines:function(I){return I.visible&&I.mode&&I.mode.indexOf("lines")!==-1},hasMarkers:function(I){return I.visible&&(I.mode&&I.mode.indexOf("markers")!==-1||I.type==="splom")},hasText:function(I){return I.visible&&I.mode&&I.mode.indexOf("text")!==-1},isBubble:function(I){var S=I.marker;return c.isPlainObject(S)&&(c.isArrayOrTypedArray(S.size)||g(S.size))}}}),bg=Dt((Q,Z)=>{var c=Yi();Z.exports=function(g,I){I||(I=2);var S=g.marker,t=S.sizeref||1,e=S.sizemin||0,r=S.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=r(a/I);return c(n)&&n>0?Math.max(n,e):0}}}),Fp=Dt(Q=>{var Z=kn();Q.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},Q.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var a=e.xaxes||[],n=e.yaxes||[],o=0;o=0&&a.index{Z.exports=I;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function I(e){var r=[];return e.replace(g,function(a,n,o){var i=n.toLowerCase();for(o=t(o),i=="m"&&o.length>2&&(r.push([n].concat(o.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(o.length==c[i])return o.unshift(n),r.push(o);if(o.length{var c=S1(),g=function(y,v){return v?Math.round(y*(v=Math.pow(10,v)))/v:Math.round(y)},I="M0,0Z",S=Math.sqrt(2),t=Math.sqrt(3),e=Math.PI,r=Math.cos,a=Math.sin;Z.exports={circle:{n:0,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return T?x(v,T,b):b}},square:{n:1,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(y,v,T){if(n(v))return I;var u=g(y*.4,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H"+u+"V"+b+"H-"+u+"V"+u+"H-"+b+"V-"+u+"H-"+u+"V-"+b+"H"+u+"V-"+u+"H"+b+"Z")}},x:{n:4,f:function(y,v,T){if(n(v))return I;var u=g(y*.8/S,2),b="l"+u+","+u,_="l"+u+",-"+u,P="l-"+u+",-"+u,M="l-"+u+","+u;return x(v,T,"M0,"+u+b+_+P+_+P+M+P+M+b+M+b+"Z")}},"triangle-up":{n:5,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+","+b+"H"+u+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+",-"+b+"H"+u+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M"+b+",-"+u+"V"+u+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+b+",-"+u+"V"+u+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+b+",-"+u+"H"+u+"V"+b+"Z")}},"triangle-se":{n:10,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+u+",-"+b+"V"+u+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H-"+u+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+u+","+b+"V-"+u+"H"+b+"Z")}},pentagon:{n:13,f:function(y,v,T){if(n(v))return I;var u=g(y*.951,2),b=g(y*.588,2),_=g(-y,2),P=g(y*-.309,2),M=g(y*.809,2);return x(v,T,"M"+u+","+P+"L"+b+","+M+"H-"+b+"L-"+u+","+P+"L0,"+_+"Z")}},hexagon:{n:14,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M"+_+",-"+b+"V"+b+"L0,"+u+"L-"+_+","+b+"V-"+b+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M-"+b+","+_+"H"+b+"L"+u+",0L"+b+",-"+_+"H-"+b+"L-"+u+",0Z")}},octagon:{n:16,f:function(y,v,T){if(n(v))return I;var u=g(y*.924,2),b=g(y*.383,2);return x(v,T,"M-"+b+",-"+u+"H"+b+"L"+u+",-"+b+"V"+b+"L"+b+","+u+"H-"+b+"L-"+u+","+b+"V-"+b+"Z")}},star:{n:17,f:function(y,v,T){if(n(v))return I;var u=y*1.4,b=g(u*.225,2),_=g(u*.951,2),P=g(u*.363,2),M=g(u*.588,2),C=g(-u,2),A=g(u*-.309,2),h=g(u*.118,2),p=g(u*.809,2),k=g(u*.382,2);return x(v,T,"M"+b+","+A+"H"+_+"L"+P+","+h+"L"+M+","+p+"L0,"+k+"L-"+M+","+p+"L-"+P+","+h+"L-"+_+","+A+"H-"+b+"L0,"+C+"Z")}},hexagram:{n:18,f:function(y,v,T){if(n(v))return I;var u=g(y*.66,2),b=g(y*.38,2),_=g(y*.76,2);return x(v,T,"M-"+_+",0l-"+b+",-"+u+"h"+_+"l"+b+",-"+u+"l"+b+","+u+"h"+_+"l-"+b+","+u+"l"+b+","+u+"h-"+_+"l-"+b+","+u+"l-"+b+",-"+u+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M-"+u+","+b+M+u+","+b+M+"0,-"+_+M+"-"+u+","+b+"Z")}},"star-triangle-down":{n:20,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M"+u+",-"+b+M+"-"+u+",-"+b+M+"0,"+_+M+u+",-"+b+"Z")}},"star-square":{n:21,f:function(y,v,T){if(n(v))return I;var u=g(y*1.1,2),b=g(y*2,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",-"+u+_+"-"+u+","+u+_+u+","+u+_+u+",-"+u+_+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*1.9,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",0"+_+"0,"+u+_+u+",0"+_+"0,-"+u+_+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(y,v,T){if(n(v))return I;var u=g(y*.7,2),b=g(y*1.4,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*.7,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},hourglass:{n:25,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/S,2);return x(v,T,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2),b=g(y*.65,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*.85,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,v,T){if(n(v))return I;var u=g(y/2,2),b=g(y,2);return x(v,T,"M"+u+","+b+"V-"+b+"M"+(u-b)+",-"+b+"V"+b+"M"+b+","+u+"H-"+b+"M-"+b+","+(u-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+","+_+"L0,0M"+u+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+",-"+_+"L0,0M"+u+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M"+_+","+u+"L0,0M"+_+",-"+u+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+_+","+u+"L0,0M-"+_+",-"+u+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+",-"+b+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L-"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+b+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L-"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,v,T){if(n(v))return I;var u=e/2.5,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,v,T){if(n(v))return I;var u=e/4,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"A "+2*y+","+2*y+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function n(y){return y===null}var o,i,l,f;function x(y,v,T){if((!y||y%360===0)&&!v)return T;if(l===y&&f===v&&o===T)return i;l=y,f=v,o=T;function u(j,V){var H=r(j),F=a(j),U=V[0],W=V[1]+(v||0);return[U*H-W*F,U*F+W*H]}for(var b=y/180*e,_=0,P=0,M=c(T),C="",A=0;A{var c=qr(),g=kn(),I=g.numberFormat,S=Yi(),t=ro(),e=Jo(),r=hi(),a=Xc(),n=g.strTranslate,o=ec(),i=Dp(),l=Af(),f=l.LINE_SPACING,x=go().DESELECTDIM,y=Tc(),v=bg(),T=Fp().appendArrayPointValue,u=Z.exports={};u.font=function(Tt,Lt){var Mt=Lt.variant,ee=Lt.style,ve=Lt.weight,oe=Lt.color,Te=Lt.size,He=Lt.family,Ge=Lt.shadow,cr=Lt.lineposition,ur=Lt.textcase;He&&Tt.style("font-family",He),Te+1&&Tt.style("font-size",Te+"px"),oe&&Tt.call(r.fill,oe),ve&&Tt.style("font-weight",ve),ee&&Tt.style("font-style",ee),Mt&&Tt.style("font-variant",Mt),ur&&Tt.style("text-transform",b(P(ur))),Ge&&Tt.style("text-shadow",Ge==="auto"?o.makeTextShadow(r.contrast(oe)):b(Ge)),cr&&Tt.style("text-decoration-line",b(M(cr)))};function b(Tt){return Tt==="none"?void 0:Tt}var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P(Tt){return _[Tt]}function M(Tt){return Tt.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}u.setPosition=function(Tt,Lt,Mt){Tt.attr("x",Lt).attr("y",Mt)},u.setSize=function(Tt,Lt,Mt){Tt.attr("width",Lt).attr("height",Mt)},u.setRect=function(Tt,Lt,Mt,ee,ve){Tt.call(u.setPosition,Lt,Mt).call(u.setSize,ee,ve)},u.translatePoint=function(Tt,Lt,Mt,ee){var ve=Mt.c2p(Tt.x),oe=ee.c2p(Tt.y);if(S(ve)&&S(oe)&&Lt.node())Lt.node().nodeName==="text"?Lt.attr("x",ve).attr("y",oe):Lt.attr("transform",n(ve,oe));else return!1;return!0},u.translatePoints=function(Tt,Lt,Mt){Tt.each(function(ee){var ve=c.select(this);u.translatePoint(ee,ve,Lt,Mt)})},u.hideOutsideRangePoint=function(Tt,Lt,Mt,ee,ve,oe){Lt.attr("display",Mt.isPtWithinRange(Tt,ve)&&ee.isPtWithinRange(Tt,oe)?null:"none")},u.hideOutsideRangePoints=function(Tt,Lt){if(Lt._hasClipOnAxisFalse){var Mt=Lt.xaxis,ee=Lt.yaxis;Tt.each(function(ve){var oe=ve[0].trace,Te=oe.xcalendar,He=oe.ycalendar,Ge=e.traceIs(oe,"bar-like")?".bartext":".point,.textpoint";Tt.selectAll(Ge).each(function(cr){u.hideOutsideRangePoint(cr,c.select(this),Mt,ee,Te,He)})})}},u.crispRound=function(Tt,Lt,Mt){return!Lt||!S(Lt)?Mt||0:Tt._context.staticPlot?Lt:Lt<1?1:Math.round(Lt)},u.singleLineStyle=function(Tt,Lt,Mt,ee,ve){Lt.style("fill","none");var oe=(((Tt||[])[0]||{}).trace||{}).line||{},Te=Mt||oe.width||0,He=ve||oe.dash||"";r.stroke(Lt,ee||oe.color),u.dashLine(Lt,He,Te)},u.lineGroupStyle=function(Tt,Lt,Mt,ee){Tt.style("fill","none").each(function(ve){var oe=(((ve||[])[0]||{}).trace||{}).line||{},Te=Lt||oe.width||0,He=ee||oe.dash||"";c.select(this).call(r.stroke,Mt||oe.color).call(u.dashLine,He,Te)})},u.dashLine=function(Tt,Lt,Mt){Mt=+Mt||0,Lt=u.dashStyle(Lt,Mt),Tt.style({"stroke-dasharray":Lt,"stroke-width":Mt+"px"})},u.dashStyle=function(Tt,Lt){Lt=+Lt||1;var Mt=Math.max(Lt,3);return Tt==="solid"?Tt="":Tt==="dot"?Tt=Mt+"px,"+Mt+"px":Tt==="dash"?Tt=3*Mt+"px,"+3*Mt+"px":Tt==="longdash"?Tt=5*Mt+"px,"+5*Mt+"px":Tt==="dashdot"?Tt=3*Mt+"px,"+Mt+"px,"+Mt+"px,"+Mt+"px":Tt==="longdashdot"&&(Tt=5*Mt+"px,"+2*Mt+"px,"+Mt+"px,"+2*Mt+"px"),Tt};function C(Tt,Lt,Mt,ee){var ve=Lt.fillpattern,oe=Lt.fillgradient,Te=u.getPatternAttr,He=ve&&(Te(ve.shape,0,"")||Te(ve.path,0,""));if(He){var Ge=Te(ve.bgcolor,0,null),cr=Te(ve.fgcolor,0,null),ur=ve.fgopacity,jr=Te(ve.size,0,8),Wr=Te(ve.solidity,0,.3),br=Lt.uid;u.pattern(Tt,"point",Mt,br,He,jr,Wr,void 0,ve.fillmode,Ge,cr,ur)}else if(oe&&oe.type!=="none"){var Xr=oe.type,nn="scatterfill-"+Lt.uid;if(ee&&(nn="legendfill-"+Lt.uid),!ee&&(oe.start!==void 0||oe.stop!==void 0)){var Le,Gt;Xr==="horizontal"?(Le={x:oe.start,y:0},Gt={x:oe.stop,y:0}):Xr==="vertical"&&(Le={x:0,y:oe.start},Gt={x:0,y:oe.stop}),Le.x=Lt._xA.c2p(Le.x===void 0?Lt._extremes.x.min[0].val:Le.x,!0),Le.y=Lt._yA.c2p(Le.y===void 0?Lt._extremes.y.min[0].val:Le.y,!0),Gt.x=Lt._xA.c2p(Gt.x===void 0?Lt._extremes.x.max[0].val:Gt.x,!0),Gt.y=Lt._yA.c2p(Gt.y===void 0?Lt._extremes.y.max[0].val:Gt.y,!0),Tt.call(O,Mt,nn,"linear",oe.colorscale,"fill",Le,Gt,!0,!1)}else Xr==="horizontal"&&(Xr=Xr+"reversed"),Tt.call(u.gradient,Mt,nn,Xr,oe.colorscale,"fill")}else Lt.fillcolor&&Tt.call(r.fill,Lt.fillcolor)}u.singleFillStyle=function(Tt,Lt){var Mt=c.select(Tt.node()),ee=Mt.data(),ve=((ee[0]||[])[0]||{}).trace||{};C(Tt,ve,Lt,!1)},u.fillGroupStyle=function(Tt,Lt,Mt){Tt.style("stroke-width",0).each(function(ee){var ve=c.select(this);ee[0].trace&&C(ve,ee[0].trace,Lt,Mt)})};var A=Ac();u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(A).forEach(function(Tt){var Lt=A[Tt],Mt=Lt.n;u.symbolList.push(Mt,String(Mt),Tt,Mt+100,String(Mt+100),Tt+"-open"),u.symbolNames[Mt]=Tt,u.symbolFuncs[Mt]=Lt.f,u.symbolBackOffs[Mt]=Lt.backoff||0,Lt.needLine&&(u.symbolNeedLines[Mt]=!0),Lt.noDot?u.symbolNoDot[Mt]=!0:u.symbolList.push(Mt+200,String(Mt+200),Tt+"-dot",Mt+300,String(Mt+300),Tt+"-open-dot"),Lt.noFill&&(u.symbolNoFill[Mt]=!0)});var h=u.symbolNames.length,p="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(Tt){if(S(Tt))Tt=+Tt;else if(typeof Tt=="string"){var Lt=0;Tt.indexOf("-open")>0&&(Lt=100,Tt=Tt.replace("-open","")),Tt.indexOf("-dot")>0&&(Lt+=200,Tt=Tt.replace("-dot","")),Tt=u.symbolNames.indexOf(Tt),Tt>=0&&(Tt+=Lt)}return Tt%100>=h||Tt>=400?0:Math.floor(Math.max(Tt,0))};function k(Tt,Lt,Mt,ee){var ve=Tt%100;return u.symbolFuncs[ve](Lt,Mt,ee)+(Tt>=200?p:"")}var w=I("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(Tt,Lt,Mt,ee,ve,oe){var Te=R[ee];return O(Tt,Lt,Mt,Te.type,ve,oe,Te.start,Te.stop,!1,Te.reversed)};function O(Tt,Lt,Mt,ee,ve,oe,Te,He,Ge,cr){var ur=ve.length,jr;ee==="linear"?jr={node:"linearGradient",attrs:{x1:Te.x,y1:Te.y,x2:He.x,y2:He.y,gradientUnits:Ge?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:ee==="radial"&&(jr={node:"radialGradient",reversed:cr});for(var Wr=new Array(ur),br=0;br=0&&Tt.i===void 0&&(Tt.i=oe.i),Lt.style("opacity",ee.selectedOpacityFn?ee.selectedOpacityFn(Tt):Tt.mo===void 0?Te.opacity:Tt.mo),ee.ms2mrc){var Ge;Tt.ms==="various"||Te.size==="various"?Ge=3:Ge=ee.ms2mrc(Tt.ms),Tt.mrc=Ge,ee.selectedSizeFn&&(Ge=Tt.mrc=ee.selectedSizeFn(Tt));var cr=u.symbolNumber(Tt.mx||Te.symbol)||0;Tt.om=cr%200>=100;var ur=se(Tt,Mt),jr=ft(Tt,Mt);Lt.attr("d",k(cr,Ge,ur,jr))}var Wr=!1,br,Xr,nn;if(Tt.so)nn=He.outlierwidth,Xr=He.outliercolor,br=Te.outliercolor;else{var Le=(He||{}).width;nn=(Tt.mlw+1||Le+1||(Tt.trace?(Tt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Tt?Xr=Tt.mlcc=ee.lineScale(Tt.mlc):g.isArrayOrTypedArray(He.color)?Xr=r.defaultLine:Xr=He.color,g.isArrayOrTypedArray(Te.color)&&(br=r.defaultLine,Wr=!0),"mc"in Tt?br=Tt.mcc=ee.markerScale(Tt.mc):br=Te.color||Te.colors||"rgba(0,0,0,0)",ee.selectedColorFn&&(br=ee.selectedColorFn(Tt))}if(Tt.om)Lt.call(r.stroke,br).style({"stroke-width":(nn||1)+"px",fill:"none"});else{Lt.style("stroke-width",(Tt.isBlank?0:nn)+"px");var Gt=Te.gradient,ne=Tt.mgt;ne?Wr=!0:ne=Gt&&Gt.type,g.isArrayOrTypedArray(ne)&&(ne=ne[0],R[ne]||(ne=0));var Ct=Te.pattern,gt=u.getPatternAttr,St=Ct&&(gt(Ct.shape,Tt.i,"")||gt(Ct.path,Tt.i,""));if(ne&&ne!=="none"){var Nt=Tt.mgc;Nt?Wr=!0:Nt=Gt.color;var re=Mt.uid;Wr&&(re+="-"+Tt.i),u.gradient(Lt,ve,re,ne,[[0,Nt],[1,br]],"fill")}else if(St){var le=!1,we=Ct.fgcolor;!we&&oe&&oe.color&&(we=oe.color,le=!0);var Ue=gt(we,Tt.i,oe&&oe.color||null),qe=gt(Ct.bgcolor,Tt.i,null),or=Ct.fgopacity,Sr=gt(Ct.size,Tt.i,8),Ar=gt(Ct.solidity,Tt.i,.3);le=le||Tt.mcc||g.isArrayOrTypedArray(Ct.shape)||g.isArrayOrTypedArray(Ct.path)||g.isArrayOrTypedArray(Ct.bgcolor)||g.isArrayOrTypedArray(Ct.fgcolor)||g.isArrayOrTypedArray(Ct.size)||g.isArrayOrTypedArray(Ct.solidity);var mr=Mt.uid;le&&(mr+="-"+Tt.i),u.pattern(Lt,"point",ve,mr,St,Sr,Ar,Tt.mcc,Ct.fillmode,qe,Ue,or)}else g.isArrayOrTypedArray(br)?r.fill(Lt,br[Tt.i]):r.fill(Lt,br);nn&&r.stroke(Lt,Xr)}},u.makePointStyleFns=function(Tt){var Lt={},Mt=Tt.marker;return Lt.markerScale=u.tryColorscale(Mt,""),Lt.lineScale=u.tryColorscale(Mt,"line"),e.traceIs(Tt,"symbols")&&(Lt.ms2mrc=y.isBubble(Tt)?v(Tt):function(){return(Mt.size||6)/2}),Tt.selectedpoints&&g.extendFlat(Lt,u.makeSelectedPointStyleFns(Tt)),Lt},u.makeSelectedPointStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.marker||{},oe=Mt.marker||{},Te=ee.marker||{},He=ve.opacity,Ge=oe.opacity,cr=Te.opacity,ur=Ge!==void 0,jr=cr!==void 0;(g.isArrayOrTypedArray(He)||ur||jr)&&(Lt.selectedOpacityFn=function(gt){var St=gt.mo===void 0?ve.opacity:gt.mo;return gt.selected?ur?Ge:St:jr?cr:x*St});var Wr=ve.color,br=oe.color,Xr=Te.color;(br||Xr)&&(Lt.selectedColorFn=function(gt){var St=gt.mcc||Wr;return gt.selected?br||St:Xr||St});var nn=ve.size,Le=oe.size,Gt=Te.size,ne=Le!==void 0,Ct=Gt!==void 0;return e.traceIs(Tt,"symbols")&&(ne||Ct)&&(Lt.selectedSizeFn=function(gt){var St=gt.mrc||nn/2;return gt.selected?ne?Le/2:St:Ct?Gt/2:St}),Lt},u.makeSelectedTextStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.textfont||{},oe=Mt.textfont||{},Te=ee.textfont||{},He=ve.color,Ge=oe.color,cr=Te.color;return Lt.selectedTextColorFn=function(ur){var jr=ur.tc||He;return ur.selected?Ge||jr:cr||(Ge?jr:r.addOpacity(jr,x))},Lt},u.selectedPointStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedPointStyleFns(Lt),ee=Lt.marker||{},ve=[];Mt.selectedOpacityFn&&ve.push(function(oe,Te){oe.style("opacity",Mt.selectedOpacityFn(Te))}),Mt.selectedColorFn&&ve.push(function(oe,Te){r.fill(oe,Mt.selectedColorFn(Te))}),Mt.selectedSizeFn&&ve.push(function(oe,Te){var He=Te.mx||ee.symbol||0,Ge=Mt.selectedSizeFn(Te);oe.attr("d",k(u.symbolNumber(He),Ge,se(Te,Lt),ft(Te,Lt))),Te.mrc2=Ge}),ve.length&&Tt.each(function(oe){for(var Te=c.select(this),He=0;He0?Mt:0}u.textPointStyle=function(Tt,Lt,Mt){if(Tt.size()){var ee;if(Lt.selectedpoints){var ve=u.makeSelectedTextStyleFns(Lt);ee=ve.selectedTextColorFn}var oe=Lt.texttemplate,Te=Mt._fullLayout;Tt.each(function(He){var Ge=c.select(this),cr=oe?g.extractOption(He,Lt,"txt","texttemplate"):g.extractOption(He,Lt,"tx","text");if(!cr&&cr!==0){Ge.remove();return}if(oe){var ur=Lt._module.formatLabels,jr=ur?ur(He,Lt,Te):{},Wr={};T(Wr,Lt,He.i),cr=g.texttemplateString({data:[Wr,He,Lt._meta],fallback:Lt.texttemplatefallback,labels:jr,locale:Te._d3locale,template:cr})}var br=He.tp||Lt.textposition,Xr=H(He,Lt),nn=ee?ee(He):He.tc||Lt.textfont.color;Ge.call(u.font,{family:He.tf||Lt.textfont.family,weight:He.tw||Lt.textfont.weight,style:He.ty||Lt.textfont.style,variant:He.tv||Lt.textfont.variant,textcase:He.tC||Lt.textfont.textcase,lineposition:He.tE||Lt.textfont.lineposition,shadow:He.tS||Lt.textfont.shadow,size:Xr,color:nn}).text(cr).call(o.convertToTspans,Mt).call(V,br,Xr,He.mrc)})}},u.selectedTextStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedTextStyleFns(Lt);Tt.each(function(ee){var ve=c.select(this),oe=Mt.selectedTextColorFn(ee),Te=ee.tp||Lt.textposition,He=H(ee,Lt);r.fill(ve,oe);var Ge=e.traceIs(Lt,"bar-like");V(ve,Te,He,ee.mrc2||ee.mrc,Ge)})}};var F=.5;u.smoothopen=function(Tt,Lt){if(Tt.length<3)return"M"+Tt.join("L");var Mt="M"+Tt[0],ee=[],ve;for(ve=1;ve=Ge||gt>=ur&><=Ge)&&(St<=jr&&St>=cr||St>=jr&&St<=cr)&&(Tt=[gt,St])}return Tt}u.applyBackoff=tt,u.makeTester=function(){var Tt=g.ensureSingleById(c.select("body"),"svg","js-plotly-tester",function(Mt){Mt.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Lt=g.ensureSingle(Tt,"path","js-reference-point",function(Mt){Mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=Tt,u.testref=Lt},u.savedBBoxes={};var dt=0,rt=1e4;u.bBox=function(Tt,Lt,Mt){Mt||(Mt=at(Tt));var ee;if(Mt){if(ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}else if(Tt.childNodes.length===1){var ve=Tt.childNodes[0];if(Mt=at(ve),Mt){var oe=+ve.getAttribute("x")||0,Te=+ve.getAttribute("y")||0,He=ve.getAttribute("transform");if(!He){var Ge=u.bBox(ve,!1,Mt);return oe&&(Ge.left+=oe,Ge.right+=oe),Te&&(Ge.top+=Te,Ge.bottom+=Te),Ge}if(Mt+="~"+oe+"~"+Te+"~"+He,ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}}var cr,ur;Lt?cr=Tt:(ur=u.tester.node(),cr=Tt.cloneNode(!0),ur.appendChild(cr)),c.select(cr).attr("transform",null).call(o.positionText,0,0);var jr=cr.getBoundingClientRect(),Wr=u.testref.node().getBoundingClientRect();Lt||ur.removeChild(cr);var br={height:jr.height,width:jr.width,left:jr.left-Wr.left,top:jr.top-Wr.top,right:jr.right-Wr.left,bottom:jr.bottom-Wr.top};return dt>=rt&&(u.savedBBoxes={},dt=0),Mt&&(u.savedBBoxes[Mt]=br),dt++,g.extendFlat({},br)};function at(Tt){var Lt=Tt.getAttribute("data-unformatted");if(Lt!==null)return Lt+Tt.getAttribute("data-math")+Tt.getAttribute("text-anchor")+Tt.getAttribute("style")}u.setClipUrl=function(Tt,Lt,Mt){Tt.attr("clip-path",vt(Lt,Mt))};function vt(Tt,Lt){if(!Tt)return null;var Mt=Lt._context,ee=Mt._exportedPlot?"":Mt._baseUrl||"";return ee?"url('"+ee+"#"+Tt+"')":"url(#"+Tt+")"}u.getTranslate=function(Tt){var Lt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||0,y:+ve[1]||0}},u.setTranslate=function(Tt,Lt,Mt){var ee=/(\btranslate\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||0,Mt=Mt||0,Te=Te.replace(ee,"").trim(),Te+=n(Lt,Mt),Te=Te.trim(),Tt[oe]("transform",Te),Te},u.getScale=function(Tt){var Lt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||1,y:+ve[1]||1}},u.setScale=function(Tt,Lt,Mt){var ee=/(\bscale\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||1,Mt=Mt||1,Te=Te.replace(ee,"").trim(),Te+="scale("+Lt+","+Mt+")",Te=Te.trim(),Tt[oe]("transform",Te),Te};var it=/\s*sc.*/;u.setPointGroupScale=function(Tt,Lt,Mt){if(Lt=Lt||1,Mt=Mt||1,!!Tt){var ee=Lt===1&&Mt===1?"":"scale("+Lt+","+Mt+")";Tt.each(function(){var ve=(this.getAttribute("transform")||"").replace(it,"");ve+=ee,ve=ve.trim(),this.setAttribute("transform",ve)})}};var Y=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(Tt,Lt,Mt){Tt&&Tt.each(function(){var ee,ve=c.select(this),oe=ve.select("text");if(oe.node()){var Te=parseFloat(oe.attr("x")||0),He=parseFloat(oe.attr("y")||0),Ge=(ve.attr("transform")||"").match(Y);Lt===1&&Mt===1?ee=[]:ee=[n(Te,He),"scale("+Lt+","+Mt+")",n(-Te,-He)],Ge&&ee.push(Ge),ve.attr("transform",ee.join(""))}})};function ft(Tt,Lt){var Mt;return Tt&&(Mt=Tt.mf),Mt===void 0&&(Mt=Lt.marker&&Lt.marker.standoff||0),!Lt._geo&&!Lt._xA?-Mt:Mt}u.getMarkerStandoff=ft;var ut=Math.atan2,kt=Math.cos,It=Math.sin;function Pt(Tt,Lt){var Mt=Lt[0],ee=Lt[1];return[Mt*kt(Tt)-ee*It(Tt),Mt*It(Tt)+ee*kt(Tt)]}var qt,Wt,Jt,ge,fe,pe;function se(Tt,Lt){var Mt=Tt.ma;Mt===void 0&&(Mt=Lt.marker.angle,(!Mt||g.isArrayOrTypedArray(Mt))&&(Mt=0));var ee,ve,oe=Lt.marker.angleref;if(oe==="previous"||oe==="north"){if(Lt._geo){var Te=Lt._geo.project(Tt.lonlat);ee=Te[0],ve=Te[1]}else{var He=Lt._xA,Ge=Lt._yA;if(He&&Ge)ee=He.c2p(Tt.x),ve=Ge.c2p(Tt.y);else return 90}if(Lt._geo){var cr=Tt.lonlat[0],ur=Tt.lonlat[1],jr=Lt._geo.project([cr,ur+1e-5]),Wr=Lt._geo.project([cr+1e-5,ur]),br=ut(Wr[1]-ve,Wr[0]-ee),Xr=ut(jr[1]-ve,jr[0]-ee),nn;if(oe==="north")nn=Mt/180*Math.PI;else if(oe==="previous"){var Le=cr/180*Math.PI,Gt=ur/180*Math.PI,ne=qt/180*Math.PI,Ct=Wt/180*Math.PI,gt=ne-Le,St=kt(Ct)*It(gt),Nt=It(Ct)*kt(Gt)-kt(Ct)*It(Gt)*kt(gt);nn=-ut(St,Nt)-Math.PI,qt=cr,Wt=ur}var re=Pt(br,[kt(nn),0]),le=Pt(Xr,[It(nn),0]);Mt=ut(re[1]+le[1],re[0]+le[0])/Math.PI*180,oe==="previous"&&!(pe===Lt.uid&&Tt.i===fe+1)&&(Mt=null)}if(oe==="previous"&&!Lt._geo)if(pe===Lt.uid&&Tt.i===fe+1&&S(ee)&&S(ve)){var we=ee-Jt,Ue=ve-ge,qe=Lt.line&&Lt.line.shape||"",or=qe.slice(qe.length-1);or==="h"&&(Ue=0),or==="v"&&(we=0),Mt+=ut(Ue,we)/Math.PI*180+90}else Mt=null}return Jt=ee,ge=ve,fe=Tt.i,pe=Lt.uid,Mt}u.getMarkerAngle=se}),lp=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=Kc(),S=Jo(),t=kn(),e=t.strTranslate,r=Vs(),a=hi(),n=ec(),o=go(),i=Af().OPPOSITE_SIDE,l=/ [XY][0-9]* /,f=1.6,x=1.6;function y(v,T,u){var b=v._fullLayout,_=u.propContainer,P=u.propName,M=u.placeholder,C=u.traceIndex,A=u.avoid||{},h=u.attributes,p=u.transform,k=u.containerGroup,w=1,R=_.title,O=(R&&R.text?R.text:"").trim(),j=!1,V=R&&R.font?R.font:{},H=V.family,F=V.size,U=V.color,W=V.weight,q=V.style,J=V.variant,lt=V.textcase,yt=V.lineposition,mt=V.shadow,st=u.subtitlePropName,tt=!!st,dt=u.subtitlePlaceholder,rt=(_.title||{}).subtitle||{text:"",font:{}},at=(rt.text||"").trim(),vt=!1,it=1,Y=rt.font,ft=Y.family,ut=Y.size,kt=Y.color,It=Y.weight,Pt=Y.style,qt=Y.variant,Wt=Y.textcase,Jt=Y.lineposition,ge=Y.shadow,fe;P==="title.text"?fe="titleText":P.indexOf("axis")!==-1?fe="axisTitleText":P.indexOf("colorbar")!==-1&&(fe="colorbarTitleText");var pe=v._context.edits[fe];function se(Wr,br){return Wr===void 0||br===void 0?!1:Wr.replace(l," % ")===br.replace(l," % ")}O===""?w=0:se(O,M)&&(pe||(O=""),w=.2,j=!0),tt&&(at===""?it=0:se(at,dt)&&(pe||(at=""),it=.2,vt=!0)),u._meta?O=t.templateString(O,u._meta):b._meta&&(O=t.templateString(O,b._meta));var Tt=O||at||pe,Lt;k||(k=t.ensureSingle(b._infolayer,"g","g-"+T),Lt=b._hColorbarMoveTitle);var Mt=k.selectAll("text."+T).data(Tt?[0]:[]);Mt.enter().append("text"),Mt.text(O).attr("class",T),Mt.exit().remove();var ee=null,ve=T+"-subtitle",oe=at||pe;if(tt&&(ee=k.selectAll("text."+ve).data(oe?[0]:[]),ee.enter().append("text"),ee.text(at).attr("class",ve),ee.exit().remove()),!Tt)return k;function Te(Wr,br){t.syncOrAsync([He,Ge],{title:Wr,subtitle:br})}function He(Wr){var br=Wr.title,Xr=Wr.subtitle,nn;!p&&Lt&&(p={}),p?(nn="",p.rotate&&(nn+="rotate("+[p.rotate,h.x,h.y]+")"),(p.offset||Lt)&&(nn+=e(0,(p.offset||0)-(Lt||0)))):nn=null,br.attr("transform",nn);function Le(Nt){if(Nt){var re=c.select(Nt.node().parentNode).select("."+ve);if(!re.empty()){var le=Nt.node().getBBox();if(le.height){var we=le.y+le.height+f*ut;re.attr("y",we)}}}}if(br.style("opacity",w*a.opacity(U)).call(r.font,{color:a.rgb(U),size:c.round(F,2),family:H,weight:W,style:q,variant:J,textcase:lt,shadow:mt,lineposition:yt}).attr(h).call(n.convertToTspans,v,Le),Xr&&!Xr.empty()){var Gt=k.select("."+T+"-math-group"),ne=br.node().getBBox(),Ct=Gt.node()?Gt.node().getBBox():void 0,gt=Ct?Ct.y+Ct.height+f*ut:ne.y+ne.height+x*ut,St=t.extendFlat({},h,{y:gt});Xr.attr("transform",nn),Xr.style("opacity",it*a.opacity(kt)).call(r.font,{color:a.rgb(kt),size:c.round(ut,2),family:ft,weight:It,style:Pt,variant:qt,textcase:Wt,shadow:ge,lineposition:Jt}).attr(St).call(n.convertToTspans,v)}return I.previousPromises(v)}function Ge(Wr){var br=Wr.title,Xr=c.select(br.node().parentNode);if(A&&A.selection&&A.side&&O){Xr.attr("transform",null);var nn=i[A.side],Le=A.side==="left"||A.side==="top"?-1:1,Gt=g(A.pad)?A.pad:2,ne=r.bBox(Xr.node()),Ct={t:0,b:0,l:0,r:0},gt=v._fullLayout._reservedMargin;for(var St in gt)for(var Nt in gt[St]){var re=gt[St][Nt];Ct[Nt]=Math.max(Ct[Nt],re)}var le={left:Ct.l,top:Ct.t,right:b.width-Ct.r,bottom:b.height-Ct.b},we=A.maxShift||Le*(le[A.side]-ne[A.side]),Ue=0;if(we<0)Ue=we;else{var qe=A.offsetLeft||0,or=A.offsetTop||0;ne.left-=qe,ne.right-=qe,ne.top-=or,ne.bottom-=or,A.selection.each(function(){var Ar=r.bBox(this);t.bBoxIntersect(ne,Ar,Gt)&&(Ue=Math.max(Ue,Le*(Ar[A.side]-ne[nn])+Gt))}),Ue=Math.min(we,Ue),_._titleScoot=Math.abs(Ue)}if(Ue>0||we<0){var Sr={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[A.side];Xr.attr("transform",e(Sr[0],Sr[1]))}}}Mt.call(Te,ee);function cr(Wr,br){Wr.text(br).on("mouseover.opacity",function(){c.select(this).transition().duration(o.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){c.select(this).transition().duration(o.HIDE_PLACEHOLDER).style("opacity",0)})}if(pe&&(O?Mt.on(".opacity",null):(cr(Mt,M),j=!0),Mt.call(n.makeEditable,{gd:v}).on("edit",function(Wr){C!==void 0?S.call("_guiRestyle",v,P,Wr,C):S.call("_guiRelayout",v,P,Wr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Wr){this.text(Wr||" ").call(n.positionText,h.x,h.y)}),tt)){if(tt&&!O){var ur=Mt.node().getBBox(),jr=ur.y+ur.height+x*ut;ee.attr("y",jr)}at?ee.on(".opacity",null):(cr(ee,dt),vt=!0),ee.call(n.makeEditable,{gd:v}).on("edit",function(Wr){S.call("_guiRelayout",v,"title.subtitle.text",Wr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Wr){this.text(Wr||" ").call(n.positionText,ee.attr("x"),ee.attr("y"))})}return Mt.classed("js-placeholder",j),ee&&!ee.empty()&&ee.classed("js-placeholder",vt),k}Z.exports={draw:y,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:f}}),i0=Dt((Q,Z)=>{var c=qr(),g=Fi().utcFormat,I=kn(),S=I.numberFormat,t=Yi(),e=I.cleanNumber,r=I.ms2DateTime,a=I.dateTime2ms,n=I.ensureNumber,o=I.isArrayOrTypedArray,i=Ca(),l=i.FP_SAFE,f=i.BADNUM,x=i.LOG_CLIP,y=i.ONEWEEK,v=i.ONEDAY,T=i.ONEHOUR,u=i.ONEMIN,b=i.ONESEC,_=Rc(),P=ic(),M=P.HOUR_PATTERN,C=P.WEEKDAY_PATTERN;function A(p){return Math.pow(10,p)}function h(p){return p!=null}Z.exports=function(p,k){k=k||{};var w=p._id||"x",R=w.charAt(0);function O(rt,at){if(rt>0)return Math.log(rt)/Math.LN10;if(rt<=0&&at&&p.range&&p.range.length===2){var vt=p.range[0],it=p.range[1];return .5*(vt+it-2*x*Math.abs(vt-it))}else return f}function j(rt,at,vt,it){if((it||{}).msUTC&&t(rt))return+rt;var Y=a(rt,vt||p.calendar);if(Y===f)if(t(rt)){rt=+rt;var ft=Math.floor(I.mod(rt+.05,1)*10),ut=Math.round(rt-ft/10);Y=a(new Date(ut))+ft/10}else return f;return Y}function V(rt,at,vt){return r(rt,at,vt||p.calendar)}function H(rt){return p._categories[Math.round(rt)]}function F(rt){if(h(rt)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[rt]!==void 0)return p._categoriesMap[rt];p._categories.push(typeof rt=="number"?String(rt):rt);var at=p._categories.length-1;return p._categoriesMap[rt]=at,at}return f}function U(rt,at){for(var vt=new Array(at),it=0;itp.range[1]&&(vt=!vt);for(var it=vt?-1:1,Y=it*rt,ft=0,ut=0;utIt)ft=ut+1;else{ft=Y<(kt+It)/2?ut:ut+1;break}}var Pt=p._B[ft]||0;return isFinite(Pt)?lt(rt,p._m2,Pt):0},st=function(rt){var at=p._rangebreaks.length;if(!at)return yt(rt,p._m,p._b);for(var vt=0,it=0;itp._rangebreaks[it].pmax&&(vt=it+1);return yt(rt,p._m2,p._B[vt])}}p.c2l=p.type==="log"?O:n,p.l2c=p.type==="log"?A:n,p.l2p=mt,p.p2l=st,p.c2p=p.type==="log"?function(rt,at){return mt(O(rt,at))}:mt,p.p2c=p.type==="log"?function(rt){return A(st(rt))}:st,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=e,p.c2d=p.c2r=p.l2d=p.l2r=n,p.d2p=p.r2p=function(rt){return p.l2p(e(rt))},p.p2d=p.p2r=st,p.cleanPos=n):p.type==="log"?(p.d2r=p.d2l=function(rt,at){return O(e(rt),at)},p.r2d=p.r2c=function(rt){return A(e(rt))},p.d2c=p.r2l=e,p.c2d=p.l2r=n,p.c2r=O,p.l2d=A,p.d2p=function(rt,at){return p.l2p(p.d2r(rt,at))},p.p2d=function(rt){return A(st(rt))},p.r2p=function(rt){return p.l2p(e(rt))},p.p2r=st,p.cleanPos=n):p.type==="date"?(p.d2r=p.r2d=I.identity,p.d2c=p.r2c=p.d2l=p.r2l=j,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(rt,at,vt){return p.l2p(j(rt,0,vt))},p.p2d=p.p2r=function(rt,at,vt){return V(st(rt),at,vt)},p.cleanPos=function(rt){return I.cleanDate(rt,f,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=F,p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=J(rt);return at!==void 0?at:p.fraction2r(.5)},p.l2r=p.c2r=n,p.r2l=J,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return typeof rt=="string"&&rt!==""?rt:n(rt)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=q(rt);return at!==void 0?at:p.fraction2r(.5)},p.r2c_just_indices=W,p.l2r=p.c2r=n,p.r2l=q,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return Array.isArray(rt)||typeof rt=="string"&&rt!==""?rt:n(rt)},p.setupMultiCategory=function(rt){var at=p._traceIndices,vt,it,Y=p._matchGroup;if(Y&&p._categories.length===0){for(var ft in Y)if(ft!==w){var ut=k[_.id2name(ft)];at=at.concat(ut._traceIndices)}}var kt=[[0,{}],[0,{}]],It=[];for(vt=0;vtut[1]&&(it[ft?0:1]=vt),it[0]===it[1]){var kt=p.l2r(at),It=p.l2r(vt);if(at!==void 0){var Pt=kt+1;vt!==void 0&&(Pt=Math.min(Pt,It)),it[ft?1:0]=Pt}if(vt!==void 0){var qt=It+1;at!==void 0&&(qt=Math.max(qt,kt)),it[ft?0:1]=qt}}}},p.cleanRange=function(rt,at){p._cleanRange(rt,at),p.limitRange(rt)},p._cleanRange=function(rt,at){at||(at={}),rt||(rt="range");var vt=I.nestedProperty(p,rt).get(),it,Y;if(p.type==="date"?Y=I.dfltRange(p.calendar):R==="y"?Y=P.DFLTRANGEY:p._name==="realaxis"?Y=[0,1]:Y=at.dfltRange||P.DFLTRANGEX,Y=Y.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(Y[0]=0),!vt||vt.length!==2){I.nestedProperty(p,rt).set(Y);return}var ft=vt[0]===null,ut=vt[1]===null;for(p.type==="date"&&!p.autorange&&(vt[0]=I.cleanDate(vt[0],f,p.calendar),vt[1]=I.cleanDate(vt[1],f,p.calendar)),it=0;it<2;it++)if(p.type==="date"){if(!I.isDateTime(vt[it],p.calendar)){p[rt]=Y;break}if(p.r2l(vt[0])===p.r2l(vt[1])){var kt=I.constrain(p.r2l(vt[0]),I.MIN_MS+1e3,I.MAX_MS-1e3);vt[0]=p.l2r(kt-1e3),vt[1]=p.l2r(kt+1e3);break}}else{if(!t(vt[it]))if(!(ft||ut)&&t(vt[1-it]))vt[it]=vt[1-it]*(it?10:.1);else{p[rt]=Y;break}if(vt[it]<-l?vt[it]=-l:vt[it]>l&&(vt[it]=l),vt[0]===vt[1]){var It=Math.max(1,Math.abs(vt[0]*1e-6));vt[0]-=It,vt[1]+=It}}},p.setScale=function(rt){var at=k._size;if(p.overlaying){var vt=_.getFromId({_fullLayout:k},p.overlaying);p.domain=vt.domain}var it=rt&&p._r?"_r":"range",Y=p.calendar;p.cleanRange(it);var ft=p.r2l(p[it][0],Y),ut=p.r2l(p[it][1],Y),kt=R==="y";if(kt?(p._offset=at.t+(1-p.domain[1])*at.h,p._length=at.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ft-ut),p._b=-p._m*ut):(p._offset=at.l+p.domain[0]*at.w,p._length=at.w*(p.domain[1]-p.domain[0]),p._m=p._length/(ut-ft),p._b=-p._m*ft),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var It,Pt;if(p._rangebreaks=p.locateBreaks(Math.min(ft,ut),Math.max(ft,ut)),p._rangebreaks.length){for(It=0;Itut&&(qt=!qt),qt&&p._rangebreaks.reverse();var Wt=qt?-1:1;for(p._m2=Wt*p._length/(Math.abs(ut-ft)-p._lBreaks),p._B.push(-p._m2*(kt?ut:ft)),It=0;ItY&&(Y+=7,ftY&&(Y+=24,ft=it&&ft=it&&rt=oe.min&&(Ltoe.max&&(oe.max=Mt),ee=!1)}ee&&ut.push({min:Lt,max:Mt})}};for(vt=0;vt{var c=Yi(),g=kn(),I=Ca().BADNUM,S=g.isArrayOrTypedArray,t=g.isDateTime,e=g.cleanNumber,r=Math.round;Z.exports=function(x,y,v){var T=x,u=v.noMultiCategory;if(S(T)&&!T.length)return"-";if(!u&&f(T))return"multicategory";if(u&&Array.isArray(T[0])){for(var b=[],_=0;_b*2}function i(x){return Math.max(1,(x-1)/1e3)}function l(x,y){for(var v=x.length,T=i(v),u=0,b=0,_={},P=0;Pu*2}function f(x){return S(x[0])&&S(x[1])}}),Y0=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=Ca().FP_SAFE,t=Jo(),e=Vs(),r=Rc(),a=r.getFromId,n=r.isLinked;Z.exports={applyAutorangeOptions:k,getAutoRange:o,makePadFn:l,doAutoRange:v,findExtremes:T,concatExtremes:y};function o(w,R){var O,j,V=[],H=w._fullLayout,F=l(H,R,0),U=l(H,R,1),W=y(w,R),q=W.min,J=W.max;if(q.length===0||J.length===0)return I.simpleMap(R.range,R.r2l);var lt=q[0].val,yt=J[0].val;for(O=1;O0&&(Pt=vt-F(ft)-U(ut),Pt>it?qt/Pt>Y&&(kt=ft,It=ut,Y=qt/Pt):qt/vt>Y&&(kt={val:ft.val,nopad:1},It={val:ut.val,nopad:1},Y=qt/vt));function Wt(se,Tt){return Math.max(se,U(Tt))}if(lt===yt){var Jt=lt-1,ge=lt+1;if(rt)if(lt===0)V=[0,1];else{var fe=(lt>0?J:q).reduce(Wt,0),pe=lt/(1-Math.min(.5,fe/vt));V=lt>0?[0,pe]:[pe,0]}else at?V=[Math.max(0,Jt),Math.max(1,ge)]:V=[Jt,ge]}else rt?(kt.val>=0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:0,nopad:1})):at&&(kt.val-Y*F(kt)<0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:1,nopad:1})),Y=(It.val-kt.val-i(R,ft.val,ut.val))/(vt-F(kt)-U(It)),V=[kt.val-Y*F(kt),It.val+Y*U(It)];return V=k(V,R),R.limitRange&&R.limitRange(),st&&V.reverse(),I.simpleMap(V,R.l2r||Number)}function i(w,R,O){var j=0;if(w.rangebreaks)for(var V=w.locateBreaks(R,O),H=0;H0?O.ppadplus:O.ppadminus)||O.ppad||0),ft=it((w._m>0?O.ppadminus:O.ppadplus)||O.ppad||0),ut=it(O.vpadplus||O.vpad),kt=it(O.vpadminus||O.vpad);if(!q){if(at=1/0,vt=-1/0,W)for(lt=0;lt0&&(at=yt),yt>vt&&yt-S&&(at=yt),yt>vt&&yt=qt;lt--)Pt(lt);return{min:j,max:V,opts:O}}function u(w,R,O,j){_(w,R,O,j,M)}function b(w,R,O,j){_(w,R,O,j,C)}function _(w,R,O,j,V){for(var H=j.tozero,F=j.extrapad,U=!0,W=0;W=O&&(q.extrapad||!F)){U=!1;break}else V(R,q.val)&&q.pad<=O&&(F||!q.extrapad)&&(w.splice(W,1),W--)}if(U){var J=H&&R===0;w.push({val:R,pad:J?0:O,extrapad:J?!1:F})}}function P(w){return g(w)&&Math.abs(w)=R}function A(w,R){var O=R.autorangeoptions;return O&&O.minallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.minallowed:O&&O.clipmin!==void 0&&p(R,O.clipmin,O.clipmax)?Math.max(w,R.d2l(O.clipmin)):w}function h(w,R){var O=R.autorangeoptions;return O&&O.maxallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.maxallowed:O&&O.clipmax!==void 0&&p(R,O.clipmin,O.clipmax)?Math.min(w,R.d2l(O.clipmax)):w}function p(w,R,O){return R!==void 0&&O!==void 0?(R=w.d2l(R),O=w.d2l(O),R=W&&(H=W,O=W),F<=W&&(F=W,j=W)}}return O=A(O,R),j=h(j,R),[O,j]}}),Ls=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=Kc(),S=Jo(),t=kn(),e=t.strTranslate,r=ec(),a=lp(),n=hi(),o=Vs(),i=Td(),l=Nh(),f=Ca(),x=f.ONEMAXYEAR,y=f.ONEAVGYEAR,v=f.ONEMINYEAR,T=f.ONEMAXQUARTER,u=f.ONEAVGQUARTER,b=f.ONEMINQUARTER,_=f.ONEMAXMONTH,P=f.ONEAVGMONTH,M=f.ONEMINMONTH,C=f.ONEWEEK,A=f.ONEDAY,h=A/2,p=f.ONEHOUR,k=f.ONEMIN,w=f.ONESEC,R=f.ONEMILLI,O=f.ONEMICROSEC,j=f.MINUS_SIGN,V=f.BADNUM,H={K:"zeroline"},F={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},W={K:"tick",L:"path"},q={K:"tick",L:"text"},J={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},lt=Af(),yt=lt.MID_SHIFT,mt=lt.CAP_SHIFT,st=lt.LINE_SPACING,tt=lt.OPPOSITE_SIDE,dt=3,rt=Z.exports={};rt.setConvert=i0();var at=dv(),vt=Rc(),it=vt.idSort,Y=vt.isLinked;rt.id2name=vt.id2name,rt.name2id=vt.name2id,rt.cleanId=vt.cleanId,rt.list=vt.list,rt.listIds=vt.listIds,rt.getFromId=vt.getFromId,rt.getFromTrace=vt.getFromTrace;var ft=Y0();rt.getAutoRange=ft.getAutoRange,rt.findExtremes=ft.findExtremes;var ut=1e-4;function kt(ze){var Ie=(ze[1]-ze[0])*ut;return[ze[0]-Ie,ze[1]+Ie]}rt.coerceRef=function(ze,Ie,Rr,$r,Gr,Br){var Yr=$r.charAt($r.length-1),pn=Rr._fullLayout._subplots[Yr+"axis"],on=$r+"ref",Ce={};return Gr||(Gr=pn[0]||(typeof Br=="string"?Br:Br[0])),Br||(Br=Gr),pn=pn.concat(pn.map(function(dr){return dr+" domain"})),Ce[on]={valType:"enumerated",values:pn.concat(Br?typeof Br=="string"?[Br]:Br:[]),dflt:Gr},t.coerce(ze,Ie,Ce,on)},rt.getRefType=function(ze){return ze===void 0?ze:ze==="paper"?"paper":ze==="pixel"?"pixel":/( domain)$/.test(ze)?"domain":"range"},rt.coercePosition=function(ze,Ie,Rr,$r,Gr,Br){var Yr,pn,on=rt.getRefType($r);if(on!=="range")Yr=t.ensureNumber,pn=Rr(Gr,Br);else{var Ce=rt.getFromId(Ie,$r);Br=Ce.fraction2r(Br),pn=Rr(Gr,Br),Yr=Ce.cleanPos}ze[Gr]=Yr(pn)},rt.cleanPosition=function(ze,Ie,Rr){var $r=Rr==="paper"||Rr==="pixel"?t.ensureNumber:rt.getFromId(Ie,Rr).cleanPos;return $r(ze)},rt.redrawComponents=function(ze,Ie){Ie=Ie||rt.listIds(ze);var Rr=ze._fullLayout;function $r(Gr,Br,Yr,pn){for(var on=S.getComponentMethod(Gr,Br),Ce={},dr=0;dr2e-6||((Rr-ze._forceTick0)/ze._minDtick%1+1.000001)%1>2e-6)&&(ze._minDtick=0))},rt.saveRangeInitial=function(ze,Ie){for(var Rr=rt.list(ze,"",!0),$r=!1,Gr=0;GrHr*.3||Ce($r)||Ce(Gr))){var _n=Rr.dtick/2;ze+=ze+_n<$r?_n:-_n}return ze}function Jt(ze,Ie,Rr,$r,Gr){var Br=t.findExactDates(Ie,Gr),Yr=.8;if(Br.exactDays>Yr){var pn=Number(Rr.substr(1));Br.exactYears>Yr&&pn%12===0?ze=rt.tickIncrement(ze,"M6","reverse")+A*1.5:Br.exactMonths>Yr?ze=rt.tickIncrement(ze,"M1","reverse")+A*15.5:ze-=h;var on=rt.tickIncrement(ze,Rr);if(on<=$r)return on}return ze}rt.prepMinorTicks=function(ze,Ie,Rr){if(!Ie.minor.dtick){delete ze.dtick;var $r=Ie.dtick&&g(Ie._tmin),Gr;if($r){var Br=rt.tickIncrement(Ie._tmin,Ie.dtick,!0);Gr=[Ie._tmin,Br*.99+Ie._tmin*.01]}else{var Yr=t.simpleMap(Ie.range,Ie.r2l);Gr=[Yr[0],.8*Yr[0]+.2*Yr[1]]}if(ze.range=t.simpleMap(Gr,Ie.l2r),ze._isMinor=!0,rt.prepTicks(ze,Rr),$r){var pn=g(Ie.dtick),on=g(ze.dtick),Ce=pn?Ie.dtick:+Ie.dtick.substring(1),dr=on?ze.dtick:+ze.dtick.substring(1);pn&&on?ge(Ce,dr)?Ce===2*C&&dr===2*A&&(ze.dtick=C):Ce===2*C&&dr===3*A?ze.dtick=C:Ce===C&&!(Ie._input.minor||{}).nticks?ze.dtick=A:fe(Ce/dr,2.5)?ze.dtick=Ce/2:ze.dtick=Ce:String(Ie.dtick).charAt(0)==="M"?on?ze.dtick="M1":ge(Ce,dr)?Ce>=12&&dr===2&&(ze.dtick="M3"):ze.dtick=Ie.dtick:String(ze.dtick).charAt(0)==="L"?String(Ie.dtick).charAt(0)==="L"?ge(Ce,dr)||(ze.dtick=fe(Ce/dr,2.5)?Ie.dtick/2:Ie.dtick):ze.dtick="D1":ze.dtick==="D2"&&+Ie.dtick>1&&(ze.dtick=1)}ze.range=Ie.range}Ie.minor._tick0Init===void 0&&(ze.tick0=Ie.tick0)};function ge(ze,Ie){return Math.abs((ze/Ie+.5)%1-.5)<.001}function fe(ze,Ie){return Math.abs(ze/Ie-1)<.001}rt.prepTicks=function(ze,Ie){var Rr=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Ie);if(ze.tickmode==="auto"||!ze.dtick){var $r=ze.nticks,Gr;$r||(ze.type==="category"||ze.type==="multicategory"?(Gr=ze.tickfont?t.bigFont(ze.tickfont.size||12):15,$r=ze._length/Gr):(Gr=ze._id.charAt(0)==="y"?40:80,$r=t.constrain(ze._length/Gr,4,9)+1),ze._name==="radialaxis"&&($r*=2)),ze.minor&&ze.minor.tickmode!=="array"||ze.tickmode==="array"&&($r*=100),ze._roughDTick=Math.abs(Rr[1]-Rr[0])/$r,rt.autoTicks(ze,ze._roughDTick),ze._minDtick>0&&ze.dtick0?(Br=$r-1,Yr=$r):(Br=$r,Yr=$r);var pn=ze[Br].value,on=ze[Yr].value,Ce=Math.abs(on-pn),dr=Rr||Ce,Hr=0;dr>=v?Ce>=v&&Ce<=x?Hr=Ce:Hr=y:Rr===u&&dr>=b?Ce>=b&&Ce<=T?Hr=Ce:Hr=u:dr>=M?Ce>=M&&Ce<=_?Hr=Ce:Hr=P:Rr===C&&dr>=C?Hr=C:dr>=A?Hr=A:Rr===h&&dr>=h?Hr=h:Rr===p&&dr>=p&&(Hr=p);var _n;Hr>=Ce&&(Hr=Ce,_n=!0);var Fn=Gr+Hr;if(Ie.rangebreaks&&Hr>0){for(var Qn=84,Pn=0,En=0;EnC&&(Hr=Ce)}(Hr>0||$r===0)&&(ze[$r].periodX=Gr+Hr/2)}}rt.calcTicks=function(ze,Ie){for(var Rr=ze.type,$r=ze.calendar,Gr=ze.ticklabelstep,Br=ze.ticklabelmode==="period",Yr=ze.range[0]>ze.range[1],pn=!ze.ticklabelindex||t.isArrayOrTypedArray(ze.ticklabelindex)?ze.ticklabelindex:[ze.ticklabelindex],on=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Ie),Ce=on[1]=(La?0:1);Vi--){var Qa=!Vi;Vi?(ze._dtickInit=ze.dtick,ze._tick0Init=ze.tick0):(ze.minor._dtickInit=ze.minor.dtick,ze.minor._tick0Init=ze.minor.tick0);var Ja=Vi?ze:t.extendFlat({},ze,ze.minor);if(Qa?rt.prepMinorTicks(Ja,ze,Ie):rt.prepTicks(Ja,Ie),Ja.tickmode==="array"){Vi?(Pn=[],Fn=ee(ze,!Qa)):(En=[],Qn=ee(ze,!Qa));continue}if(Ja.tickmode==="sync"){Pn=[],Fn=Mt(ze);continue}var Do=kt(on),yo=Do[0],Fo=Do[1],Da=g(Ja.dtick),ys=Rr==="log"&&!(Da||Ja.dtick.charAt(0)==="L"),os=rt.tickFirst(Ja,Ie);if(Vi){if(ze._tmin=os,os=Fo:Zo<=Fo;Zo=rt.tickIncrement(Zo,cl,Ce,$r)){if(Vi&&Ks++,Ja.rangebreaks&&!Ce){if(Zo=Hr)break}if(Pn.length>_n||Zo===ul)break;ul=Zo;var Qs={value:Zo};Vi?(ys&&Zo!==(Zo|0)&&(Qs.simpleLabel=!0),Gr>1&&Ks%Gr&&(Qs.skipLabel=!0),Pn.push(Qs)):(Qs.minor=!0,En.push(Qs))}}if(!En||En.length<2)pn=!1;else{var Nl=(En[1].value-En[0].value)*(Yr?-1:1);Wa(Nl,ze.tickformat)||(pn=!1)}if(!pn)Zn=Pn;else{var cs=Pn.concat(En);Br&&Pn.length&&(cs=cs.slice(1)),cs=cs.sort(function(hl,ts){return hl.value-ts.value}).filter(function(hl,ts,Su){return ts===0||hl.value!==Su[ts-1].value});var Ps=cs.map(function(hl,ts){return hl.minor===void 0&&!hl.skipLabel?ts:null}).filter(function(hl){return hl!==null});Ps.forEach(function(hl){pn.map(function(ts){var Su=hl+ts;Su>=0&&Su-1;qs--){if(Pn[qs].drop){Pn.splice(qs,1);continue}Pn[qs].value=Oi(Pn[qs].value,ze);var al=ze.c2p(Pn[qs].value);(Ql?Gl>al-Xo:GlHr||GuHr&&(Su.periodX=Hr),GuGr&&_ny)Ie/=y,$r=Gr(10),ze.dtick="M"+12*jr(Ie,$r,ve);else if(Br>P)Ie/=P,ze.dtick="M"+jr(Ie,1,oe);else if(Br>A){if(ze.dtick=jr(Ie,A,ze._hasDayOfWeekBreaks?[1,2,7,14]:He),!Rr){var Yr=rt.getTickFormat(ze),pn=ze.ticklabelmode==="period";pn&&(ze._rawTick0=ze.tick0),/%[uVW]/.test(Yr)?ze.tick0=t.dateTick0(ze.calendar,2):ze.tick0=t.dateTick0(ze.calendar,1),pn&&(ze._dowTick0=ze.tick0)}}else Br>p?ze.dtick=jr(Ie,p,oe):Br>k?ze.dtick=jr(Ie,k,Te):Br>w?ze.dtick=jr(Ie,w,Te):($r=Gr(10),ze.dtick=jr(Ie,$r,ve))}else if(ze.type==="log"){ze.tick0=0;var on=t.simpleMap(ze.range,ze.r2l);if(ze._isMinor&&(Ie*=1.5),Ie>.7)ze.dtick=Math.ceil(Ie);else if(Math.abs(on[1]-on[0])<1){var Ce=1.5*Math.abs((on[1]-on[0])/Ie);Ie=Math.abs(Math.pow(10,on[1])-Math.pow(10,on[0]))/Ce,$r=Gr(10),ze.dtick="L"+jr(Ie,$r,ve)}else ze.dtick=Ie>.3?"D2":"D1"}else ze.type==="category"||ze.type==="multicategory"?(ze.tick0=0,ze.dtick=Math.ceil(Math.max(Ie,1))):ki(ze)?(ze.tick0=0,$r=1,ze.dtick=jr(Ie,$r,ur)):(ze.tick0=0,$r=Gr(10),ze.dtick=jr(Ie,$r,ve));if(ze.dtick===0&&(ze.dtick=1),!g(ze.dtick)&&typeof ze.dtick!="string"){var dr=ze.dtick;throw ze.dtick=1,"ax.dtick error: "+String(dr)}};function Wr(ze){var Ie=ze.dtick;if(ze._tickexponent=0,!g(Ie)&&typeof Ie!="string"&&(Ie=1),(ze.type==="category"||ze.type==="multicategory")&&(ze._tickround=null),ze.type==="date"){var Rr=ze.r2l(ze.tick0),$r=ze.l2r(Rr).replace(/(^-|i)/g,""),Gr=$r.length;if(String(Ie).charAt(0)==="M")Gr>10||$r.substr(5)!=="01-01"?ze._tickround="d":ze._tickround=+Ie.substr(1)%12===0?"y":"m";else if(Ie>=A&&Gr<=10||Ie>=A*15)ze._tickround="d";else if(Ie>=k&&Gr<=16||Ie>=p)ze._tickround="M";else if(Ie>=w&&Gr<=19||Ie>=k)ze._tickround="S";else{var Br=ze.l2r(Rr+Ie).replace(/^-/,"").length;ze._tickround=Math.max(Gr,Br)-20,ze._tickround<0&&(ze._tickround=4)}}else if(g(Ie)||Ie.charAt(0)==="L"){var Yr=ze.range.map(ze.r2d||Number);g(Ie)||(Ie=Number(Ie.substr(1))),ze._tickround=2-Math.floor(Math.log(Ie)/Math.LN10+.01);var pn=Math.max(Math.abs(Yr[0]),Math.abs(Yr[1])),on=Math.floor(Math.log(pn)/Math.LN10+.01),Ce=ze.minexponent===void 0?3:ze.minexponent;Math.abs(on)>Ce&&(re(ze.exponentformat)&&ze.exponentformat!=="SI extended"&&!le(on)||re(ze.exponentformat)&&ze.exponentformat==="SI extended"&&!we(on)?ze._tickexponent=3*Math.round((on-1)/3):ze._tickexponent=on)}else ze._tickround=null}rt.tickIncrement=function(ze,Ie,Rr,$r){var Gr=Rr?-1:1;if(g(Ie))return t.increment(ze,Gr*Ie);var Br=Ie.charAt(0),Yr=Gr*Number(Ie.substr(1));if(Br==="M")return t.incrementMonth(ze,Yr,$r);if(Br==="L")return Math.log(Math.pow(10,ze)+Yr)/Math.LN10;if(Br==="D"){var pn=Ie==="D2"?cr:Ge,on=ze+Gr*.01,Ce=t.roundUp(t.mod(on,1),pn,Rr);return Math.floor(on)+Math.log(c.round(Math.pow(10,Ce),1))/Math.LN10}throw"unrecognized dtick "+String(Ie)},rt.tickFirst=function(ze,Ie){var Rr=ze.r2l||Number,$r=t.simpleMap(ze.range,Rr,void 0,void 0,Ie),Gr=$r[1]<$r[0],Br=Gr?Math.floor:Math.ceil,Yr=kt($r)[0],pn=ze.dtick,on=Rr(ze.tick0);if(g(pn)){var Ce=Br((Yr-on)/pn)*pn+on;return(ze.type==="category"||ze.type==="multicategory")&&(Ce=t.constrain(Ce,0,ze._categories.length-1)),Ce}var dr=pn.charAt(0),Hr=Number(pn.substr(1));if(dr==="M"){for(var _n=0,Fn=on,Qn,Pn,En;_n<10;){if(Qn=rt.tickIncrement(Fn,pn,Gr,ze.calendar),(Qn-Yr)*(Fn-Yr)<=0)return Gr?Math.min(Fn,Qn):Math.max(Fn,Qn);Pn=(Yr-(Fn+Qn)/2)/(Qn-Fn),En=dr+(Math.abs(Math.round(Pn))||1)*Hr,Fn=rt.tickIncrement(Fn,En,Pn<0?!Gr:Gr,ze.calendar),_n++}return t.error("tickFirst did not converge",ze),Fn}else{if(dr==="L")return Math.log(Br((Math.pow(10,Yr)-on)/Hr)*Hr+on)/Math.LN10;if(dr==="D"){var Zn=pn==="D2"?cr:Ge,La=t.roundUp(t.mod(Yr,1),Zn,Gr);return Math.floor(Yr)+Math.log(c.round(Math.pow(10,La),1))/Math.LN10}else throw"unrecognized dtick "+String(pn)}},rt.tickText=function(ze,Ie,Rr,$r){var Gr=br(ze,Ie),Br=ze.tickmode==="array",Yr=Rr||Br,pn=ze.type,on=pn==="category"?ze.d2l_noadd:ze.d2l,Ce,dr=function(En){var Zn=ze.l2p(En);return Zn>=0&&Zn<=ze._length?En:null};if(Br&&t.isArrayOrTypedArray(ze.ticktext)){var Hr=t.simpleMap(ze.range,ze.r2l),_n=(Math.abs(Hr[1]-Hr[0])-(ze._lBreaks||0))/1e4;for(Ce=0;Ce"+pn;else{var Ce=ji(ze),dr=ze._trueSide||ze.side;(!Ce&&dr==="top"||Ce&&dr==="bottom")&&(Yr+="
")}Ie.text=Yr}function nn(ze,Ie,Rr,$r,Gr){var Br=ze.dtick,Yr=Ie.x,pn=ze.tickformat,on=typeof Br=="string"&&Br.charAt(0);if(Gr==="never"&&(Gr=""),$r&&on!=="L"&&(Br="L3",on="L"),pn||on==="L")Ie.text=qe(Math.pow(10,Yr),ze,Gr,$r);else if(g(Br)||on==="D"&&(ze.minorloglabels==="complete"||t.mod(Yr+.01,1)<.1)){ze.minorloglabels==="complete"&&!(t.mod(Yr+.01,1)<.1)&&(Ie.fontSize*=.75);var Ce=Math.pow(10,Yr).toExponential(0),dr=Ce.split("e"),Hr=+dr[1],_n=Math.abs(Hr),Fn=ze.exponentformat;Fn==="power"||re(Fn)&&Fn!=="SI extended"&&le(Hr)||re(Fn)&&Fn==="SI extended"&&we(Hr)?(Ie.text=dr[0],_n>0&&(Ie.text+="x10"),Ie.text==="1x10"&&(Ie.text="10"),Hr!==0&&Hr!==1&&(Ie.text+=""+(Hr>0?"":j)+_n+""),Ie.fontSize*=1.25):(Fn==="e"||Fn==="E")&&_n>2?Ie.text=dr[0]+Fn+(Hr>0?"+":j)+_n:(Ie.text=qe(Math.pow(10,Yr),ze,"","fakehover"),Br==="D1"&&ze._id.charAt(0)==="y"&&(Ie.dy-=Ie.fontSize/6))}else if(on==="D")Ie.text=ze.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(Yr,1)))),Ie.fontSize*=.75;else throw"unrecognized dtick "+String(Br);if(ze.dtick==="D1"){var Qn=String(Ie.text).charAt(0);(Qn==="0"||Qn==="1")&&(ze._id.charAt(0)==="y"?Ie.dx-=Ie.fontSize/4:(Ie.dy+=Ie.fontSize/2,Ie.dx+=(ze.range[1]>ze.range[0]?1:-1)*Ie.fontSize*(Yr<0?.5:.25)))}}function Le(ze,Ie){var Rr=ze._categories[Math.round(Ie.x)];Rr===void 0&&(Rr=""),Ie.text=String(Rr)}function Gt(ze,Ie,Rr){var $r=Math.round(Ie.x),Gr=ze._categories[$r]||[],Br=Gr[1]===void 0?"":String(Gr[1]),Yr=Gr[0]===void 0?"":String(Gr[0]);Rr?Ie.text=Yr+" - "+Br:(Ie.text=Br,Ie.text2=Yr)}function ne(ze,Ie,Rr,$r,Gr){Gr==="never"?Gr="":ze.showexponent==="all"&&Math.abs(Ie.x/ze.dtick)<1e-6&&(Gr="hide"),Ie.text=qe(Ie.x,ze,Gr,$r)}function Ct(ze,Ie,Rr,$r,Gr){if(ze.thetaunit==="radians"&&!Rr){var Br=Ie.x/180;if(Br===0)Ie.text="0";else{var Yr=gt(Br);if(Yr[1]>=100)Ie.text=qe(t.deg2rad(Ie.x),ze,Gr,$r);else{var pn=Ie.x<0;Yr[1]===1?Yr[0]===1?Ie.text="π":Ie.text=Yr[0]+"π":Ie.text=["",Yr[0],"","⁄","",Yr[1],"","π"].join(""),pn&&(Ie.text=j+Ie.text)}}}else Ie.text=qe(Ie.x,ze,Gr,$r)}function gt(ze){function Ie(pn,on){return Math.abs(pn-on)<=1e-6}function Rr(pn,on){return Ie(on,0)?pn:Rr(on,pn%on)}function $r(pn){for(var on=1;!Ie(Math.round(pn*on)/on,pn);)on*=10;return on}var Gr=$r(ze),Br=ze*Gr,Yr=Math.abs(Rr(Br,Gr));return[Math.round(Br/Yr),Math.round(Gr/Yr)]}var St=["f","p","n","μ","m","","k","M","G","T"],Nt=["q","r","y","z","a",...St,"P","E","Z","Y","R","Q"],re=ze=>["SI","SI extended","B"].includes(ze);function le(ze){return ze>14||ze<-15}function we(ze){return ze>32||ze<-30}function Ue(ze,Ie){return re(Ie)?!!(Ie==="SI extended"&&we(ze)||Ie!=="SI extended"&&le(ze)):!1}function qe(ze,Ie,Rr,$r){var Gr=ze<0,Br=Ie._tickround,Yr=Rr||Ie.exponentformat||"B",pn=Ie._tickexponent,on=rt.getTickFormat(Ie),Ce=Ie.separatethousands;if($r){var dr={exponentformat:Yr,minexponent:Ie.minexponent,dtick:Ie.showexponent==="none"?Ie.dtick:g(ze)&&Math.abs(ze)||1,range:Ie.showexponent==="none"?Ie.range.map(Ie.r2d):[0,ze||1]};Wr(dr),Br=(Number(dr._tickround)||0)+4,pn=dr._tickexponent,Ie.hoverformat&&(on=Ie.hoverformat)}if(on)return Ie._numFormat(on)(ze).replace(/-/g,j);var Hr=Math.pow(10,-Br)/2;if(Yr==="none"&&(pn=0),ze=Math.abs(ze),ze"+Qn+"":Yr==="B"&&pn===9?ze+="B":re(Yr)&&(ze+=Yr==="SI extended"?Nt[pn/3+10]:St[pn/3+5])}return Gr?j+ze:ze}rt.getTickFormat=function(ze){var Ie;function Rr(on){return typeof on!="string"?on:Number(on.replace("M",""))*P}function $r(on,Ce){var dr=["L","D"];if(typeof on==typeof Ce){if(typeof on=="number")return on-Ce;var Hr=dr.indexOf(on.charAt(0)),_n=dr.indexOf(Ce.charAt(0));return Hr===_n?Number(on.replace(/(L|D)/g,""))-Number(Ce.replace(/(L|D)/g,"")):Hr-_n}else return typeof on=="number"?1:-1}function Gr(on,Ce,dr){var Hr=dr||function(Qn){return Qn},_n=Ce[0],Fn=Ce[1];return(!_n&&typeof _n!="number"||Hr(_n)<=Hr(on))&&(!Fn&&typeof Fn!="number"||Hr(Fn)>=Hr(on))}function Br(on,Ce){var dr=Ce[0]===null,Hr=Ce[1]===null,_n=$r(on,Ce[0])>=0,Fn=$r(on,Ce[1])<=0;return(dr||_n)&&(Hr||Fn)}var Yr,pn;if(ze.tickformatstops&&ze.tickformatstops.length>0)switch(ze.type){case"date":case"linear":{for(Ie=0;Ie=0&&Gr.unshift(Gr.splice(dr,1).shift())}});var pn={false:{left:0,right:0}};return t.syncOrAsync(Gr.map(function(on){return function(){if(on){var Ce=rt.getFromId(ze,on);Rr||(Rr={}),Rr.axShifts=pn,Rr.overlayingShiftedAx=Yr;var dr=rt.drawOne(ze,Ce,Rr);return Ce._shiftPusher&&ci(Ce,Ce._fullDepth||0,pn,!0),Ce._r=Ce.range.slice(),Ce._rl=t.simpleMap(Ce._r,Ce.r2l),dr}}}))},rt.drawOne=function(ze,Ie,Rr){Rr=Rr||{};var $r=Rr.axShifts||{},Gr=Rr.overlayingShiftedAx||[],Br,Yr,pn;Ie.setScale();var on=ze._fullLayout,Ce=Ie._id,dr=Ce.charAt(0),Hr=rt.counterLetter(Ce),_n=on._plots[Ie._mainSubplot],Fn=Ie.zerolinelayer==="above traces";if(!_n)return;if(Ie._shiftPusher=Ie.autoshift||Gr.indexOf(Ie._id)!==-1||Gr.indexOf(Ie.overlaying)!==-1,Ie._shiftPusher&Ie.anchor==="free"){var Qn=Ie.linewidth/2||0;Ie.ticks==="inside"&&(Qn+=Ie.ticklen),ci(Ie,Qn,$r,!0),ci(Ie,Ie.shift||0,$r,!1)}(Rr.skipTitle!==!0||Ie._shift===void 0)&&(Ie._shift=za(Ie,$r));var Pn=_n[dr+"axislayer"],En=Ie._mainLinePosition,Zn=En+=Ie._shift,La=Ie._mainMirrorPosition,Vi=Ie._vals=rt.calcTicks(Ie),Qa=[Ie.mirror,Zn,La].join("_");for(Br=0;Br0?bl.bottom-Su:0,Gu))));var ac=0,mh=0;if(Ie._shiftPusher&&(ac=Math.max(Gu,bl.height>0?hl==="l"?Su-bl.left:bl.right-Su:0),Ie.title.text!==on._dfltTitle[dr]&&(mh=(Ie._titleStandoff||0)+(Ie._titleScoot||0),hl==="l"&&(mh+=oi(Ie))),Ie._fullDepth=Math.max(ac,mh)),Ie.automargin){Dl={x:0,y:0,r:0,l:0,t:0,b:0};var Jc=[0,1],ah=typeof Ie._shift=="number"?Ie._shift:0;if(dr==="x"){if(hl==="b"?Dl[hl]=Ie._depth:(Dl[hl]=Ie._depth=Math.max(bl.width>0?Su-bl.top:0,Gu),Jc.reverse()),bl.width>0){var Bf=bl.right-(Ie._offset+Ie._length);Bf>0&&(Dl.xr=1,Dl.r=Bf);var Sf=Ie._offset-bl.left;Sf>0&&(Dl.xl=0,Dl.l=Sf)}}else if(hl==="l"?(Ie._depth=Math.max(bl.height>0?Su-bl.left:0,Gu),Dl[hl]=Ie._depth-ah):(Ie._depth=Math.max(bl.height>0?bl.right-Su:0,Gu),Dl[hl]=Ie._depth+ah,Jc.reverse()),bl.height>0){var Fl=bl.bottom-(Ie._offset+Ie._length);Fl>0&&(Dl.yb=0,Dl.b=Fl);var Bc=Ie._offset-bl.top;Bc>0&&(Dl.yt=1,Dl.t=Bc)}Dl[Hr]=Ie.anchor==="free"?Ie.position:Ie._anchorAxis.domain[Jc[0]],Ie.title.text!==on._dfltTitle[dr]&&(Dl[hl]+=oi(Ie)+(Ie.title.standoff||0)),Ie.mirror&&Ie.anchor!=="free"&&(tu={x:0,y:0,r:0,l:0,t:0,b:0},tu[ts]=Ie.linewidth,Ie.mirror&&Ie.mirror!==!0&&(tu[ts]+=Gu),Ie.mirror===!0||Ie.mirror==="ticks"?tu[Hr]=Ie._anchorAxis.domain[Jc[1]]:(Ie.mirror==="all"||Ie.mirror==="allticks")&&(tu[Hr]=[Ie._counterDomainMin,Ie._counterDomainMax][Jc[1]]))}ou&&(nu=S.getComponentMethod("rangeslider","autoMarginOpts")(ze,Ie)),typeof Ie.automargin=="string"&&(or(Dl,Ie.automargin),or(tu,Ie.automargin)),I.autoMargin(ze,fr(Ie),Dl),I.autoMargin(ze,_r(Ie),tu),I.autoMargin(ze,tn(Ie),nu)}),t.syncOrAsync(Ms)}};function or(ze,Ie){if(ze){var Rr=Object.keys(J).reduce(function($r,Gr){return Ie.indexOf(Gr)!==-1&&J[Gr].forEach(function(Br){$r[Br]=1}),$r},{});Object.keys(ze).forEach(function($r){Rr[$r]||($r.length===1?ze[$r]=0:delete ze[$r])})}}function Sr(ze,Ie){var Rr=[],$r,Gr=function(Br,Yr){var pn=Br.xbnd[Yr];pn!==null&&Rr.push(t.extendFlat({},Br,{x:pn}))};if(Ie.length){for($r=0;$rze.range[1],pn=ze.ticklabelposition&&ze.ticklabelposition.indexOf("inside")!==-1,on=!pn;if(Rr){var Ce=Yr?-1:1;Rr=Rr*Ce}if($r){var dr=ze.side,Hr=pn&&(dr==="top"||dr==="left")||on&&(dr==="bottom"||dr==="right")?1:-1;$r=$r*Hr}return ze._id.charAt(0)==="x"?function(_n){return e(Gr+ze._offset+ze.l2p(Hn(_n))+Rr,Br+$r)}:function(_n){return e(Br+$r,Gr+ze._offset+ze.l2p(Hn(_n))+Rr)}};function Hn(ze){return ze.periodX!==void 0?ze.periodX:ze.x}function Wn(ze){var Ie=ze.ticklabelposition||"",Rr=ze.tickson||"",$r=function(Qn){return Ie.indexOf(Qn)!==-1},Gr=$r("top"),Br=$r("left"),Yr=$r("right"),pn=$r("bottom"),on=$r("inside"),Ce=Rr!=="boundaries"&&(pn||Br||Gr||Yr);if(!Ce&&!on)return[0,0];var dr=ze.side,Hr=Ce?(ze.tickwidth||0)/2:0,_n=dt,Fn=ze.tickfont?ze.tickfont.size:12;return(pn||Gr)&&(Hr+=Fn*mt,_n+=(ze.linewidth||0)/2),(Br||Yr)&&(Hr+=(ze.linewidth||0)/2,_n+=dt),on&&dr==="top"&&(_n-=Fn*(1-mt)),(Br||Gr)&&(Hr=-Hr),(dr==="bottom"||dr==="right")&&(_n=-_n),[Ce?Hr:0,on?_n:0]}rt.makeTickPath=function(ze,Ie,Rr,$r){$r||($r={});var Gr=$r.minor;if(Gr&&!ze.minor)return"";var Br=$r.len!==void 0?$r.len:Gr?ze.minor.ticklen:ze.ticklen,Yr=ze._id.charAt(0),pn=(ze.linewidth||1)/2;return Yr==="x"?"M0,"+(Ie+pn*Rr)+"v"+Br*Rr:"M"+(Ie+pn*Rr)+",0h"+Br*Rr},rt.makeLabelFns=function(ze,Ie,Rr){var $r=ze.ticklabelposition||"",Gr=ze.tickson||"",Br=function(Zo){return $r.indexOf(Zo)!==-1},Yr=Br("top"),pn=Br("left"),on=Br("right"),Ce=Br("bottom"),dr=Gr!=="boundaries"&&(Ce||pn||Yr||on),Hr=Br("inside"),_n=$r==="inside"&&ze.ticks==="inside"||!Hr&&ze.ticks==="outside"&&Gr!=="boundaries",Fn=0,Qn=0,Pn=_n?ze.ticklen:0;if(Hr?Pn*=-1:dr&&(Pn=0),_n&&(Fn+=Pn,Rr)){var En=t.deg2rad(Rr);Fn=Pn*Math.cos(En)+1,Qn=Pn*Math.sin(En)}ze.showticklabels&&(_n||ze.showline)&&(Fn+=.2*ze.tickfont.size),Fn+=(ze.linewidth||1)/2*(Hr?-1:1);var Zn={labelStandoff:Fn,labelShift:Qn},La,Vi,Qa,Ja,Do=0,yo=ze.side,Fo=ze._id.charAt(0),Da=ze.tickangle,ys;if(Fo==="x")ys=!Hr&&yo==="bottom"||Hr&&yo==="top",Ja=ys?1:-1,Hr&&(Ja*=-1),La=Qn*Ja,Vi=Ie+Fn*Ja,Qa=ys?1:-.2,Math.abs(Da)===90&&(Hr?Qa+=yt:Da===-90&&yo==="bottom"?Qa=mt:Da===90&&yo==="top"?Qa=yt:Qa=.5,Do=yt/2*(Da/90)),Zn.xFn=function(Zo){return Zo.dx+La+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Vi+Zo.fontSize*Qa},Zn.anchorFn=function(Zo,Ks){if(dr){if(pn)return"end";if(on)return"start"}return!g(Ks)||Ks===0||Ks===180?"middle":Ks*Ja<0!==Hr?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return Ks<-60||Ks>60?-.5*ss:ze.side==="top"!==Hr?-ss:0};else if(Fo==="y"){if(ys=!Hr&&yo==="left"||Hr&&yo==="right",Ja=ys?1:-1,Hr&&(Ja*=-1),La=Fn,Vi=Qn*Ja,Qa=0,!Hr&&Math.abs(Da)===90&&(Da===-90&&yo==="left"||Da===90&&yo==="right"?Qa=mt:Qa=.5),Hr){var os=g(Da)?+Da:0;if(os!==0){var ul=t.deg2rad(os);Do=Math.abs(Math.sin(ul))*mt*Ja,Qa=0}}Zn.xFn=function(Zo){return Zo.dx+Ie-(La+Zo.fontSize*Qa)*Ja+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Vi+Zo.fontSize*yt},Zn.anchorFn=function(Zo,Ks){return g(Ks)&&Math.abs(Ks)===90?"middle":ys?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return ze.side==="right"&&(Ks*=-1),Ks<-30?-ss:Ks<30?-.5*ss:0}}return Zn};function Xn(ze){return[ze.text,ze.x,ze.axInfo,ze.font,ze.fontSize,ze.fontColor].join("_")}rt.drawTicks=function(ze,Ie,Rr){Rr=Rr||{};var $r=Ie._id+"tick",Gr=[].concat(Ie.minor&&Ie.minor.ticks?Rr.vals.filter(function(Yr){return Yr.minor&&!Yr.noTick}):[]).concat(Ie.ticks?Rr.vals.filter(function(Yr){return!Yr.minor&&!Yr.noTick}):[]),Br=Rr.layer.selectAll("path."+$r).data(Gr,Xn);Br.exit().remove(),Br.enter().append("path").classed($r,1).classed("ticks",1).classed("crisp",Rr.crisp!==!1).each(function(Yr){return n.stroke(c.select(this),Yr.minor?Ie.minor.tickcolor:Ie.tickcolor)}).style("stroke-width",function(Yr){return o.crispRound(ze,Yr.minor?Ie.minor.tickwidth:Ie.tickwidth,1)+"px"}).attr("d",Rr.path).style("display",null),Xi(Ie,[W]),Br.attr("transform",Rr.transFn)},rt.drawGrid=function(ze,Ie,Rr){if(Rr=Rr||{},Ie.tickmode!=="sync"){var $r=Ie._id+"grid",Gr=Ie.minor&&Ie.minor.showgrid,Br=Gr?Rr.vals.filter(function(Zn){return Zn.minor}):[],Yr=Ie.showgrid?Rr.vals.filter(function(Zn){return!Zn.minor}):[],pn=Rr.counterAxis;if(pn&&rt.shouldShowZeroLine(ze,Ie,pn))for(var on=Ie.tickmode==="array",Ce=0;Ce=0;Qn--){var Pn=Qn?_n:Fn;if(Pn){var En=Pn.selectAll("path."+$r).data(Qn?Yr:Br,Xn);En.exit().remove(),En.enter().append("path").classed($r,1).classed("crisp",Rr.crisp!==!1),En.attr("transform",Rr.transFn).attr("d",Rr.path).each(function(Zn){return n.stroke(c.select(this),Zn.minor?Ie.minor.gridcolor:Ie.gridcolor||"#ddd")}).style("stroke-dasharray",function(Zn){return o.dashStyle(Zn.minor?Ie.minor.griddash:Ie.griddash,Zn.minor?Ie.minor.gridwidth:Ie.gridwidth)}).style("stroke-width",function(Zn){return(Zn.minor?Hr:Ie._gw)+"px"}).style("display",null),typeof Rr.path=="function"&&En.attr("d",Rr.path)}}Xi(Ie,[F,U])}},rt.drawZeroLine=function(ze,Ie,Rr){Rr=Rr||Rr;var $r=Ie._id+"zl",Gr=rt.shouldShowZeroLine(ze,Ie,Rr.counterAxis),Br=Rr.layer.selectAll("path."+$r).data(Gr?[{x:0,id:Ie._id}]:[]);Br.exit().remove(),Br.enter().append("path").classed($r,1).classed("zl",1).classed("crisp",Rr.crisp!==!1).each(function(){Rr.layer.selectAll("path").sort(function(Yr,pn){return it(Yr.id,pn.id)})}),Br.attr("transform",Rr.transFn).attr("d",Rr.path).call(n.stroke,Ie.zerolinecolor||n.defaultLine).style("stroke-width",o.crispRound(ze,Ie.zerolinewidth,Ie._gw||1)+"px").style("display",null),Xi(Ie,[H])},rt.drawLabels=function(ze,Ie,Rr){Rr=Rr||{};var $r=ze._fullLayout,Gr=Ie._id,Br=Ie.zerolinelayer==="above traces",Yr=Rr.cls||Gr+"tick",pn=Rr.vals.filter(function(cs){return cs.text}),on=Rr.labelFns,Ce=Rr.secondary?0:Ie.tickangle,dr=(Ie._prevTickAngles||{})[Yr],Hr=Rr.layer.selectAll("g."+Yr).data(Ie.showticklabels?pn:[],Xn),_n=[];Hr.enter().append("g").classed(Yr,1).append("text").attr("text-anchor","middle").each(function(cs){var Ps=c.select(this),Lo=ze._promises.length;Ps.call(r.positionText,on.xFn(cs),on.yFn(cs)).call(o.font,{family:cs.font,size:cs.fontSize,color:cs.fontColor,weight:cs.fontWeight,style:cs.fontStyle,variant:cs.fontVariant,textcase:cs.fontTextcase,lineposition:cs.fontLineposition,shadow:cs.fontShadow}).text(cs.text).call(r.convertToTspans,ze),ze._promises[Lo]?_n.push(ze._promises.pop().then(function(){Fn(Ps,Ce)})):Fn(Ps,Ce)}),Xi(Ie,[q]),Hr.exit().remove(),Rr.repositionOnUpdate&&Hr.each(function(cs){c.select(this).select("text").call(r.positionText,on.xFn(cs),on.yFn(cs))});function Fn(cs,Ps){cs.each(function(Lo){var As=c.select(this),kl=As.select(".text-math-group"),ql=on.anchorFn(Lo,Ps),Jl=Rr.transFn.call(As.node(),Lo)+(g(Ps)&&+Ps!=0?" rotate("+Ps+","+on.xFn(Lo)+","+(on.yFn(Lo)-Lo.fontSize/2)+")":""),Us=r.lineCount(As),Pa=st*Lo.fontSize,fo=on.heightFn(Lo,g(Ps)?+Ps:0,(Us-1)*Pa);if(fo&&(Jl+=e(0,fo)),kl.empty()){var qs=As.select("text");qs.attr({transform:Jl,"text-anchor":ql}),qs.style("display",null),Ie._adjustTickLabelsOverflow&&Ie._adjustTickLabelsOverflow()}else{var Ql=o.bBox(kl.node()).width,Xo=Ql*{end:-.5,start:.5}[ql];kl.attr("transform",Jl+e(Xo,0))}})}Ie._adjustTickLabelsOverflow=function(){var cs=Ie.ticklabeloverflow;if(!(!cs||cs==="allow")){var Ps=cs.indexOf("hide")!==-1,Lo=Ie._id.charAt(0)==="x",As=0,kl=Lo?ze._fullLayout.width:ze._fullLayout.height;if(cs.indexOf("domain")!==-1){var ql=t.simpleMap(Ie.range,Ie.r2l);As=Ie.l2p(ql[0])+Ie._offset,kl=Ie.l2p(ql[1])+Ie._offset}var Jl=Math.min(As,kl),Us=Math.max(As,kl),Pa=Ie.side,fo=1/0,qs=-1/0;Hr.each(function(al){var Cl=c.select(this),Ru=Cl.select(".text-math-group");if(Ru.empty()){var lo=o.bBox(Cl.node()),Ms=0;Lo?(lo.right>Us||lo.leftUs||lo.top+(Ie.tickangle?0:al.fontSize/4)Ie["_visibleLabelMin_"+ql._id]?Cl.style("display","none"):Us.K==="tick"&&!Jl&&Cl.node().style.display!=="none"&&Cl.style("display",null)})})})})},Fn(Hr,dr+1?dr:Ce);function Qn(){return _n.length&&Promise.all(_n)}var Pn=null;function En(){if(Fn(Hr,Ce),pn.length&&Ie.autotickangles&&(Ie.type!=="log"||String(Ie.dtick).charAt(0)!=="D")){Pn=Ie.autotickangles[0];var cs=0,Ps=[],Lo,As=1;Hr.each(function(Dl){cs=Math.max(cs,Dl.fontSize);var tu=Ie.l2p(Dl.x),nu=nr(this),ac=o.bBox(nu.node());As=Math.max(As,r.lineCount(nu)),Ps.push({top:0,bottom:10,height:10,left:tu-ac.width/2,right:tu+ac.width/2+2,width:ac.width+2})});var kl=(Ie.tickson==="boundaries"||Ie.showdividers)&&!Rr.secondary,ql=pn.length,Jl=Math.abs((pn[ql-1].x-pn[0].x)*Ie._m)/(ql-1),Us=kl?Jl/2:Jl,Pa=kl?Ie.ticklen:cs*1.25*As,fo=Math.sqrt(Math.pow(Us,2)+Math.pow(Pa,2)),qs=Us/fo,Ql=Ie.autotickangles.map(function(Dl){return Dl*Math.PI/180}),Xo=Ql.find(function(Dl){return Math.abs(Math.cos(Dl))<=qs});Xo===void 0&&(Xo=Ql.reduce(function(Dl,tu){return Math.abs(Math.cos(Dl))cl*ss&&(ul=ss,Da[Fo]=ys[Fo]=Zo[Fo])}var Qs=Math.abs(ul-os);Qs-Ja>0?(Qs-=Ja,Ja*=1+Ja/Qs):Ja=0,Ie._id.charAt(0)!=="y"&&(Ja=-Ja),Da[yo]=Vi.p2r(Vi.r2p(ys[yo])+Do*Ja),Vi.autorange==="min"||Vi.autorange==="max reversed"?(Da[0]=null,Vi._rangeInitial0=void 0,Vi._rangeInitial1=void 0):(Vi.autorange==="max"||Vi.autorange==="min reversed")&&(Da[1]=null,Vi._rangeInitial0=void 0,Vi._rangeInitial1=void 0),$r._insideTickLabelsUpdaterange[Vi._name+".range"]=Da}var Nl=t.syncOrAsync(Zn);return Nl&&Nl.then&&ze._promises.push(Nl),Nl};function Ii(ze,Ie,Rr){var $r=Ie._id+"divider",Gr=Rr.vals,Br=Rr.layer.selectAll("path."+$r).data(Gr,Xn);Br.exit().remove(),Br.enter().insert("path",":first-child").classed($r,1).classed("crisp",1).call(n.stroke,Ie.dividercolor).style("stroke-width",o.crispRound(ze,Ie.dividerwidth,1)+"px"),Br.attr("transform",Rr.transFn).attr("d",Rr.path)}rt.getPxPosition=function(ze,Ie){var Rr=ze._fullLayout._size,$r=Ie._id.charAt(0),Gr=Ie.side,Br;if(Ie.anchor!=="free"?Br=Ie._anchorAxis:$r==="x"?Br={_offset:Rr.t+(1-(Ie.position||0))*Rr.h,_length:0}:$r==="y"&&(Br={_offset:Rr.l+(Ie.position||0)*Rr.w+Ie._shift,_length:0}),Gr==="top"||Gr==="left")return Br._offset;if(Gr==="bottom"||Gr==="right")return Br._offset+Br._length};function oi(ze){var Ie=ze.title.font.size,Rr=(ze.title.text.match(r.BR_TAG_ALL)||[]).length;return ze.title.hasOwnProperty("standoff")?Ie*(mt+Rr*st):Rr?Ie*(Rr+1)*st:Ie}function $n(ze,Ie){var Rr=ze._fullLayout,$r=Ie._id,Gr=$r.charAt(0),Br=Ie.title.font.size,Yr,pn=(Ie.title.text.match(r.BR_TAG_ALL)||[]).length;if(Ie.title.hasOwnProperty("standoff"))Ie.side==="bottom"||Ie.side==="right"?Yr=Ie._depth+Ie.title.standoff+Br*mt:(Ie.side==="top"||Ie.side==="left")&&(Yr=Ie._depth+Ie.title.standoff+Br*(yt+pn*st));else{var on=ji(Ie);if(Ie.type==="multicategory")Yr=Ie._depth;else{var Ce=1.5*Br;on&&(Ce=.5*Br,Ie.ticks==="outside"&&(Ce+=Ie.ticklen)),Yr=10+Ce+(Ie.linewidth?Ie.linewidth-1:0)}on||(Gr==="x"?Yr+=Ie.side==="top"?Br*(Ie.showticklabels?1:0):Br*(Ie.showticklabels?1.5:.5):Yr+=Ie.side==="right"?Br*(Ie.showticklabels?1:.5):Br*(Ie.showticklabels?.5:0))}var dr=rt.getPxPosition(ze,Ie),Hr,_n,Fn;Gr==="x"?(_n=Ie._offset+Ie._length/2,Fn=Ie.side==="top"?dr-Yr:dr+Yr):(Fn=Ie._offset+Ie._length/2,_n=Ie.side==="right"?dr+Yr:dr-Yr,Hr={rotate:"-90",offset:0});var Qn;if(Ie.type!=="multicategory"){var Pn=Ie._selections[Ie._id+"tick"];if(Qn={selection:Pn,side:Ie.side},Pn&&Pn.node()&&Pn.node().parentNode){var En=o.getTranslate(Pn.node().parentNode);Qn.offsetLeft=En.x,Qn.offsetTop=En.y}Ie.title.hasOwnProperty("standoff")&&(Qn.pad=0)}return Ie._titleStandoff=Yr,a.draw(ze,$r+"title",{propContainer:Ie,propName:Ie._name+".title.text",placeholder:Rr._dfltTitle[Gr],avoid:Qn,transform:Hr,attributes:{x:_n,y:Fn,"text-anchor":"middle"}})}rt.shouldShowZeroLine=function(ze,Ie,Rr){var $r=t.simpleMap(Ie.range,Ie.r2l);return $r[0]*$r[1]<=0&&Ie.zeroline&&(Ie.type==="linear"||Ie.type==="-")&&!(Ie.rangebreaks&&Ie.maskBreaks(0)===V)&&(sa(Ie,0)||!Zi(ze,Ie,Rr,$r)||We(ze,Ie))},rt.clipEnds=function(ze,Ie){return Ie.filter(function(Rr){return sa(ze,Rr.x)})};function sa(ze,Ie){var Rr=ze.l2p(Ie);return Rr>1&&Rr1)for(Gr=1;Gr=Gr.min&&ze=O:/%L/.test(Ie)?ze>=R:/%[SX]/.test(Ie)?ze>=w:/%M/.test(Ie)?ze>=k:/%[HI]/.test(Ie)?ze>=p:/%p/.test(Ie)?ze>=h:/%[Aadejuwx]/.test(Ie)?ze>=A:/%[UVW]/.test(Ie)?ze>=C:/%[Bbm]/.test(Ie)?ze>=M:/%[q]/.test(Ie)?ze>=b:/%[Yy]/.test(Ie)?ze>=v:!0}}),bw=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S,t;if(I){var e=g==="reversed"||g==="min reversed"||g==="max reversed";S=I[e?1:0],t=I[e?0:1]}var r=c("autorangeoptions.minallowed",t===null?S:void 0),a=c("autorangeoptions.maxallowed",S===null?t:void 0);r===void 0&&c("autorangeoptions.clipmin"),a===void 0&&c("autorangeoptions.clipmax"),c("autorangeoptions.include")}}),I_=Dt((Q,Z)=>{var c=bw();Z.exports=function(g,I,S,t){var e=I._template||{},r=I.type||e.type||"-";S("minallowed"),S("maxallowed");var a=S("range");if(!a){var n;!t.noInsiderange&&r!=="log"&&(n=S("insiderange"),n&&(n[0]===null||n[1]===null)&&(I.insiderange=!1,n=void 0),n&&(a=S("range",n)))}var o=I.getAutorangeDflt(a,t),i=S("autorange",o),l;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(i==="reversed"||i===!0)||a[0]!==null&&(i==="min"||i==="max reversed")||a[1]!==null&&(i==="max"||i==="min reversed"))&&(a=void 0,delete I.range,I.autorange=!0,l=!0),l||(o=I.getAutorangeDflt(a,t),i=S("autorange",o)),i&&(c(S,i,a),(r==="linear"||r==="-")&&S("rangemode")),I.cleanRange()}}),y6=Dt((Q,Z)=>{var c={left:0,top:0};Z.exports=g;function g(S,t,e){t=t||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var r=S.clientX||0,a=S.clientY||0,n=I(t);return e[0]=r-n.left,e[1]=a-n.top,e}function I(S){return S===window||S===document||S===document.body?c:S.getBoundingClientRect()}}),z_=Dt((Q,Z)=>{var c=Wu();function g(){var I=!1;try{var S=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{I=!1}return I}Z.exports=c&&g()}),O_=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=(c-I)/(S-I),r=e+g/(S-I),a=(e+r)/2;return t==="left"||t==="bottom"?e:t==="center"||t==="middle"?a:t==="right"||t==="top"?r:e<2/3-a?e:r>4/3-a?r:a}}),x6=Dt((Q,Z)=>{var c=kn(),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Z.exports=function(I,S,t,e){return t==="left"?I=0:t==="center"?I=1:t==="right"?I=2:I=c.constrain(Math.floor(I*3),0,2),e==="bottom"?S=0:e==="middle"?S=1:e==="top"?S=2:S=c.constrain(Math.floor(S*3),0,2),g[S][I]}}),K0=Dt((Q,Z)=>{var c=Bm(),g=C_(),I=r0().getGraphDiv,S=no(),t=Z.exports={};t.wrapped=function(e,r,a){e=I(e),e._fullLayout&&g.clear(e._fullLayout._uid+S.HOVERID),t.raw(e,r,a)},t.raw=function(e,r){var a=e._fullLayout,n=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&c.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&n&&e.emit("plotly_unhover",{event:r,points:n}))}}),up=Dt((Q,Z)=>{var c=y6(),g=Ff(),I=z_(),S=kn().removeElement,t=ic(),e=Z.exports={};e.align=O_(),e.getCursor=x6();var r=K0();e.unhover=r.wrapped,e.unhoverRaw=r.raw,e.init=function(o){var i=o.gd,l=1,f=i._context.doubleClickDelay,x=o.element,y,v,T,u,b,_,P,M;i._mouseDownTime||(i._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=h,I?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=h,x.addEventListener("touchstart",h,{passive:!1})):x.ontouchstart=h;function C(w,R,O){return Math.abs(w)"u"&&typeof w.clientY>"u"&&(w.clientX=y,w.clientY=v),T=new Date().getTime(),T-i._mouseDownTimef&&(l=Math.max(l-1,1)),i._dragged)o.doneFn&&o.doneFn();else{var R;_.target===P?R=_:(R={target:P,srcElement:P,toElement:P},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(O=>{var j=_[O];!R[O]&&typeof j!="function"&&(R[O]=j)})),o.clickFn&&o.clickFn(l,R),M||P.dispatchEvent(new MouseEvent("click",w))}i._dragging=!1,i._dragged=!1}};function a(){var o=document.createElement("div");o.className="dragcover";var i=o.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(o),o}e.coverSlip=a;function n(o){return c(o.changedTouches?o.changedTouches[0]:o,document.body)}}),P0=Dt((Q,Z)=>{Z.exports=function(c,g){(c.attr("class")||"").split(" ").forEach(function(I){I.indexOf("cursor-")===0&&c.classed(I,!1)}),g&&c.classed("cursor-"+g,!0)}}),jm=Dt((Q,Z)=>{var c=P0(),g="data-savedcursor",I="!!";Z.exports=function(S,t){var e=S.attr(g);if(t){if(!e){for(var r=(S.attr("class")||"").split(" "),a=0;a{var c=da(),g=wi();Z.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:c({editType:"legend"}),grouptitlefont:c({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"},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:c({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),jy=Dt(Q=>{Q.isGrouped=function(Z){return(Z.traceorder||"").indexOf("grouped")!==-1},Q.isVertical=function(Z){return Z.orientation!=="h"},Q.isReversed=function(Z){return(Z.traceorder||"").indexOf("reversed")!==-1}}),Uy=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mu(),S=Ho(),t=D_(),e=b1(),r=jy();function a(n,o,i,l){var f=o[n]||{},x=I.newContainer(i,n);function y(st,tt){return g.coerce(f,x,t,st,tt)}var v=g.coerceFont(y,"font",i.font);y("bgcolor",i.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var u,b=function(st,tt){var dt=u._input,rt=u;return g.coerce(dt,rt,S,st,tt)},_=i.font||{},P=g.coerceFont(y,"grouptitlefont",_,{overrideDflt:{size:Math.round(_.size*1.1)}}),M=0,C=!1,A="normal",h=(i.shapes||[]).filter(function(st){return st.showlegend}),p=l.concat(h).filter(function(st){return n===(st.legend||"legend")}),k=0;k(n==="legend"?1:0));if(R===!1&&(i[n]=void 0),!(R===!1&&!f.uirevision)&&(y("uirevision",i.uirevision),R!==!1)){y("borderwidth");var O=y("orientation"),j=y("yref"),V=y("xref"),H=O==="h",F=j==="paper",U=V==="paper",W,q,J,lt="left";H?(W=0,c.getComponentMethod("rangeslider","isVisible")(o.xaxis)?F?(q=1.1,J="bottom"):(q=1,J="top"):F?(q=-.1,J="top"):(q=0,J="bottom")):(q=1,J="auto",U?W=1.02:(W=1,lt="right")),g.coerce(f,x,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:W}},"x"),g.coerce(f,x,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:q}},"y"),y("traceorder",A),r.isGrouped(i[n])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",lt),y("yanchor",J),y("maxheight"),y("valign"),g.noneOrAll(f,x,["x","y"]);var yt=y("title.text");if(yt){y("title.side",H?"left":"top");var mt=g.extendFlat({},v,{size:g.bigFont(v.size)});g.coerceFont(y,"title.font",mt)}}}}Z.exports=function(n,o,i){var l,f=i.slice(),x=o.shapes;if(x)for(l=0;l{var c=Jo(),g=kn(),I=g.pushUnique,S=!0;Z.exports=function(t,e,r){var a=e._fullLayout;if(e._dragged||e._editing)return;var n=a.legend.itemclick,o=a.legend.itemdoubleclick,i=a.legend.groupclick;r===1&&n==="toggle"&&o==="toggleothers"&&S&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),S=!1;var l;if(r===1?l=n:r===2&&(l=o),!l)return;var f=i==="togglegroup",x=a.hiddenlabels?a.hiddenlabels.slice():[],y=t.data()[0][0];if(y.groupTitle&&y.noClick)return;var v=e._fullData,T=(a.shapes||[]).filter(function(se){return se.showlegend}),u=v.concat(T),b=y.trace;b._isShape&&(b=b._fullInput);var _=b.legendgroup,P,M,C,A,h,p,k={},w=[],R=[],O=[];function j(se,Tt){var Lt=w.indexOf(se),Mt=k.visible;return Mt||(Mt=k.visible=[]),w.indexOf(se)===-1&&(w.push(se),Lt=w.length-1),Mt[Lt]=Tt,Lt}var V=(a.shapes||[]).map(function(se){return se._input}),H=!1;function F(se,Tt){V[se].visible=Tt,H=!0}function U(se,Tt){if(!(y.groupTitle&&!f)){var Lt=se._fullInput||se,Mt=Lt._isShape,ee=Lt.index;ee===void 0&&(ee=Lt._index);var ve=Lt.visible===!1?!1:Tt;Mt?F(ee,ve):j(ee,ve)}}var W=b.legend,q=b._fullInput,J=q&&q._isShape;if(!J&&c.traceIs(b,"pie-like")){var lt=y.label,yt=x.indexOf(lt);if(l==="toggle")yt===-1?x.push(lt):x.splice(yt,1);else if(l==="toggleothers"){var mt=yt!==-1,st=[];for(P=0;P{Z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),ww=Dt((Q,Z)=>{var c=Jo(),g=jy();Z.exports=function(I,S,t){var e=S._inHover,r=g.isGrouped(S),a=g.isReversed(S),n={},o=[],i=!1,l={},f=0,x=0,y,v;function T(U,W,q){if(S.visible!==!1&&!(t&&U!==S._id))if(W===""||!g.isGrouped(S)){var J="~~i"+f;o.push(J),n[J]=[q],f++}else o.indexOf(W)===-1?(o.push(W),i=!0,n[W]=[q]):n[W].push(q)}for(y=0;yw&&(k=w)}h[y][0]._groupMinRank=k,h[y][0]._preGroupSort=y}var R=function(U,W){return U[0]._groupMinRank-W[0]._groupMinRank||U[0]._preGroupSort-W[0]._preGroupSort},O=function(U,W){return U.trace.legendrank-W.trace.legendrank||U._preSort-W._preSort};for(h.forEach(function(U,W){U[0]._preGroupSort=W}),h.sort(R),y=0;y{var Z=kn();function c(g){return g.indexOf("e")!==-1?g.replace(/[.]?0+e/,"e"):g.indexOf(".")!==-1?g.replace(/[.]?0+$/,""):g}Q.formatPiePercent=function(g,I){var S=c((g*100).toPrecision(3));return Z.numSeparate(S,I)+"%"},Q.formatPieValue=function(g,I){var S=c(g.toPrecision(10));return Z.numSeparate(S,I)},Q.getFirstFilled=function(g,I){if(Z.isArrayOrTypedArray(g))for(var S=0;S{var c=Vs(),g=hi();Z.exports=function(I,S,t,e){var r=t.marker.pattern;r&&r.shape?c.pointStyle(I,t,e,S):g.fill(I,S.color)}}),kg=Dt((Q,Z)=>{var c=hi(),g=wg().castOption,I=b6();Z.exports=function(S,t,e,r){var a=e.marker.line,n=g(a.color,t.pts)||c.defaultLine,o=g(a.width,t.pts)||0;S.call(I,t,e,r).style("stroke-width",o).call(c.stroke,n)}}),kw=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=kn(),S=I.strTranslate,t=Vs(),e=hi(),r=Ud().extractOpts,a=Tc(),n=kg(),o=wg().castOption,i=F_(),l=12,f=5,x=2,y=10,v=5;Z.exports=function(_,P,M){var C=P._fullLayout;M||(M=C.legend);var A=M.itemsizing==="constant",h=M.itemwidth,p=(h+i.itemGap*2)/2,k=S(p,0),w=function(st,tt,dt,rt){var at;if(st+1)at=st;else if(tt&&tt.width>0)at=tt.width;else return 0;return A?rt:Math.min(at,dt)};_.each(function(st){var tt=c.select(this),dt=I.ensureSingle(tt,"g","layers");dt.style("opacity",st[0].trace.opacity);var rt=M.indentation,at=M.valign,vt=st[0].lineHeight,it=st[0].height;if(at==="middle"&&rt===0||!vt||!it)dt.attr("transform",null);else{var Y={top:1,bottom:-1}[at],ft=Y*(.5*(vt-it+3))||0,ut=M.indentation;dt.attr("transform",S(ut,ft))}var kt=dt.selectAll("g.legendfill").data([st]);kt.enter().append("g").classed("legendfill",!0);var It=dt.selectAll("g.legendlines").data([st]);It.enter().append("g").classed("legendlines",!0);var Pt=dt.selectAll("g.legendsymbols").data([st]);Pt.enter().append("g").classed("legendsymbols",!0),Pt.selectAll("g.legendpoints").data([st]).enter().append("g").classed("legendpoints",!0)}).each(mt).each(j).each(H).each(V).each(U).each(lt).each(J).each(R).each(O).each(W).each(q);function R(st){var tt=u(st),dt=tt.showFill,rt=tt.showLine,at=tt.showGradientLine,vt=tt.showGradientFill,it=tt.anyFill,Y=tt.anyLine,ft=st[0],ut=ft.trace,kt,It,Pt=r(ut),qt=Pt.colorscale,Wt=Pt.reversescale,Jt=function(Mt){if(Mt.size())if(dt)t.fillGroupStyle(Mt,P,!0);else{var ee="legendfill-"+ut.uid;t.gradient(Mt,P,ee,T(Wt),qt,"fill")}},ge=function(Mt){if(Mt.size()){var ee="legendline-"+ut.uid;t.lineGroupStyle(Mt),t.gradient(Mt,P,ee,T(Wt),qt,"stroke")}},fe=a.hasMarkers(ut)||!it?"M5,0":Y?"M5,-2":"M5,-3",pe=c.select(this),se=pe.select(".legendfill").selectAll("path").data(dt||vt?[st]:[]);if(se.enter().append("path").classed("js-fill",!0),se.exit().remove(),se.attr("d",fe+"h"+h+"v6h-"+h+"z").call(Jt),rt||at){var Tt=w(void 0,ut.line,y,f);It=I.minExtend(ut,{line:{width:Tt}}),kt=[I.minExtend(ft,{trace:It})]}var Lt=pe.select(".legendlines").selectAll("path").data(rt||at?[kt]:[]);Lt.enter().append("path").classed("js-line",!0),Lt.exit().remove(),Lt.attr("d",fe+(at?"l"+h+",0.0001":"h"+h)).call(rt?t.lineGroupStyle:ge)}function O(st){var tt=u(st),dt=tt.anyFill,rt=tt.anyLine,at=tt.showLine,vt=tt.showMarker,it=st[0],Y=it.trace,ft=!vt&&!rt&&!dt&&a.hasText(Y),ut,kt;function It(se,Tt,Lt,Mt){var ee=I.nestedProperty(Y,se).get(),ve=I.isArrayOrTypedArray(ee)&&Tt?Tt(ee):ee;if(A&&ve&&Mt!==void 0&&(ve=Mt),Lt){if(veLt[1])return Lt[1]}return ve}function Pt(se){return it._distinct&&it.index&&se[it.index]?se[it.index]:se[0]}if(vt||ft||at){var qt={},Wt={};if(vt){qt.mc=It("marker.color",Pt),qt.mx=It("marker.symbol",Pt),qt.mo=It("marker.opacity",I.mean,[.2,1]),qt.mlc=It("marker.line.color",Pt),qt.mlw=It("marker.line.width",I.mean,[0,5],x),Wt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Jt=It("marker.size",I.mean,[2,16],l);qt.ms=Jt,Wt.marker.size=Jt}at&&(Wt.line={width:It("line.width",Pt,[0,10],f)}),ft&&(qt.tx="Aa",qt.tp=It("textposition",Pt),qt.ts=10,qt.tc=It("textfont.color",Pt),qt.tf=It("textfont.family",Pt),qt.tw=It("textfont.weight",Pt),qt.ty=It("textfont.style",Pt),qt.tv=It("textfont.variant",Pt),qt.tC=It("textfont.textcase",Pt),qt.tE=It("textfont.lineposition",Pt),qt.tS=It("textfont.shadow",Pt)),ut=[I.minExtend(it,qt)],kt=I.minExtend(Y,Wt),kt.selectedpoints=null,kt.texttemplate=null}var ge=c.select(this).select("g.legendpoints"),fe=ge.selectAll("path.scatterpts").data(vt?ut:[]);fe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",k),fe.exit().remove(),fe.call(t.pointStyle,kt,P),vt&&(ut[0].mrc=3);var pe=ge.selectAll("g.pointtext").data(ft?ut:[]);pe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",k),pe.exit().remove(),pe.selectAll("text").call(t.textPointStyle,kt,P)}function j(st){var tt=st[0].trace,dt=tt.type==="waterfall";if(st[0]._distinct&&dt){var rt=st[0].trace[st[0].dir].marker;return st[0].mc=rt.color,st[0].mlw=rt.line.width,st[0].mlc=rt.line.color,F(st,this,"waterfall")}var at=[];tt.visible&&dt&&(at=st[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 vt=c.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(at);vt.enter().append("path").classed("legendwaterfall",!0).attr("transform",k).style("stroke-miterlimit",1),vt.exit().remove(),vt.each(function(it){var Y=c.select(this),ft=tt[it[0]].marker,ut=w(void 0,ft.line,v,x);Y.attr("d",it[1]).style("stroke-width",ut+"px").call(e.fill,ft.color),ut&&Y.call(e.stroke,ft.line.color)})}function V(st){F(st,this)}function H(st){F(st,this,"funnel")}function F(st,tt,dt){var rt=st[0].trace,at=rt.marker||{},vt=at.line||{},it=at.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=dt?rt.visible&&rt.type===dt:g.traceIs(rt,"bar"),ft=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(Y?[st]:[]);ft.enter().append("path").classed("legend"+dt,!0).attr("d",it).attr("transform",k),ft.exit().remove(),ft.each(function(ut){var kt=c.select(this),It=ut[0],Pt=w(It.mlw,at.line,v,x);kt.style("stroke-width",Pt+"px");var qt=It.mcc;if(!M._inHover&&"mc"in It){var Wt=r(at),Jt=Wt.mid;Jt===void 0&&(Jt=(Wt.max+Wt.min)/2),qt=t.tryColorscale(at,"")(Jt)}var ge=qt||It.mc||at.color,fe=at.pattern,pe=t.getPatternAttr,se=fe&&(pe(fe.shape,0,"")||pe(fe.path,0,""));if(se){var Tt=pe(fe.bgcolor,0,null),Lt=pe(fe.fgcolor,0,null),Mt=fe.fgopacity,ee=b(fe.size,8,10),ve=b(fe.solidity,.5,1),oe="legend-"+rt.uid;kt.call(t.pattern,"legend",P,oe,se,ee,ve,qt,fe.fillmode,Tt,Lt,Mt)}else kt.call(e.fill,ge);Pt&&e.stroke(kt,It.mlc||vt.color)})}function U(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendbox").data(tt.visible&&g.traceIs(tt,"box-violin")?[st]:[]);dt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),dt.exit().remove(),dt.each(function(){var rt=c.select(this);if((tt.boxpoints==="all"||tt.points==="all")&&e.opacity(tt.fillcolor)===0&&e.opacity((tt.line||{}).color)===0){var at=I.minExtend(tt,{marker:{size:A?l:I.constrain(tt.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});dt.call(t.pointStyle,at,P)}else{var vt=w(void 0,tt.line,v,x);rt.style("stroke-width",vt+"px").call(e.fill,tt.fillcolor),vt&&e.stroke(rt,tt.line.color)}})}function W(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(tt.visible&&tt.type==="candlestick"?[st,st]:[]);dt.enter().append("path").classed("legendcandle",!0).attr("d",function(rt,at){return at?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("stroke-width",Y+"px").call(e.fill,it.fillcolor),Y&&e.stroke(vt,it.line.color)})}function q(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(tt.visible&&tt.type==="ohlc"?[st,st]:[]);dt.enter().append("path").classed("legendohlc",!0).attr("d",function(rt,at){return at?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("fill","none").call(t.dashLine,it.line.dash,Y),Y&&e.stroke(vt,it.line.color)})}function J(st){yt(st,this,"pie")}function lt(st){yt(st,this,"funnelarea")}function yt(st,tt,dt){var rt=st[0],at=rt.trace,vt=dt?at.visible&&at.type===dt:g.traceIs(at,dt),it=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(vt?[st]:[]);if(it.enter().append("path").classed("legend"+dt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),it.exit().remove(),it.size()){var Y=at.marker||{},ft=w(o(Y.line.width,rt.pts),Y.line,v,x),ut="pieLike",kt=I.minExtend(at,{marker:{line:{width:ft}}},ut),It=I.minExtend(rt,{trace:kt},ut);n(it,It,kt,P)}}function mt(st){var tt=st[0].trace,dt,rt=[];if(tt.visible)switch(tt.type){case"histogram2d":case"heatmap":rt=[["M-15,-2V4H15V-2Z"]],dt=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":rt=[["M-6,-6V6H6V-6Z"]],dt=!0;break;case"densitymapbox":case"densitymap":rt=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],dt="radial";break;case"cone":rt=[["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"]],dt=!1;break;case"streamtube":rt=[["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"]],dt=!1;break;case"surface":rt=[["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"]],dt=!0;break;case"mesh3d":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!1;break;case"volume":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!0;break;case"isosurface":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],dt=!1;break}var at=c.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(rt);at.enter().append("path").classed("legend3dandfriends",!0).attr("transform",k).style("stroke-miterlimit",1),at.exit().remove(),at.each(function(vt,it){var Y=c.select(this),ft=r(tt),ut=ft.colorscale,kt=ft.reversescale,It=function(Jt){if(Jt.size()){var ge="legendfill-"+tt.uid;t.gradient(Jt,P,ge,T(kt,dt==="radial"),ut,"fill")}},Pt;if(ut){if(!dt){var qt=ut.length;Pt=it===0?ut[kt?qt-1:0][1]:it===1?ut[kt?0:qt-1][1]:ut[Math.floor((qt-1)/2)][1]}}else{var Wt=tt.vertexcolor||tt.facecolor||tt.color;Pt=I.isArrayOrTypedArray(Wt)?Wt[it]||Wt[0]:Wt}Y.attr("d",vt[0]),Pt?Y.call(e.fill,Pt):Y.call(It)})}};function T(_,P){var M=P?"radial":"horizontal";return M+(_?"":"reversed")}function u(_){var P=_[0].trace,M=P.contours,C=a.hasLines(P),A=a.hasMarkers(P),h=P.visible&&P.fill&&P.fill!=="none",p=!1,k=!1;if(M){var w=M.coloring;w==="lines"?p=!0:C=w==="none"||w==="heatmap"||M.showlines,M.type==="constraint"?h=M._operation!=="=":(w==="fill"||w==="heatmap")&&(k=!0)}return{showMarker:A,showLine:C,showFill:h,showGradientLine:p,showGradientFill:k,anyLine:C||p,anyFill:h||k}}function b(_,P,M){return _&&I.isArrayOrTypedArray(_)?P:_>M?M:_}}),R_=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Kc(),S=Jo(),t=Bm(),e=up(),r=Vs(),a=hi(),n=ec(),o=_6(),i=F_(),l=Af(),f=l.LINE_SPACING,x=l.FROM_TL,y=l.FROM_BR,v=ww(),T=kw(),u=jy(),b=1,_=/^legend[0-9]*$/;Z.exports=function(W,q){if(q)M(W,q);else{var J=W._fullLayout,lt=J._legends,yt=J._infolayer.selectAll('[class^="legend"]');yt.each(function(){var dt=c.select(this),rt=dt.attr("class"),at=rt.split(" ")[0];at.match(_)&<.indexOf(at)===-1&&dt.remove()});for(var mt=0;mt1)}var ft=lt.hiddenlabels||[];if(!tt&&(!lt.showlegend||!dt.length))return st.selectAll("."+yt).remove(),lt._topdefs.select("#"+mt).remove(),I.autoMargin(W,yt);var ut=g.ensureSingle(st,"g",yt,function(pe){tt||pe.attr("pointer-events","all")}),kt=g.ensureSingleById(lt._topdefs,"clipPath",mt,function(pe){pe.append("rect")}),It=g.ensureSingle(ut,"rect","bg",function(pe){pe.attr("shape-rendering","crispEdges")});It.call(a.stroke,J.bordercolor).call(a.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px");var Pt=g.ensureSingle(ut,"g","scrollbox"),qt=J.title;J._titleWidth=0,J._titleHeight=0;var Wt;qt.text?(Wt=g.ensureSingle(Pt,"text",yt+"titletext"),Wt.attr("text-anchor","start").call(r.font,qt.font).text(qt.text),w(Wt,Pt,W,J,b)):Pt.selectAll("."+yt+"titletext").remove();var Jt=g.ensureSingle(ut,"rect","scrollbar",function(pe){pe.attr(i.scrollBarEnterAttrs).call(a.fill,i.scrollBarColor)}),ge=Pt.selectAll("g.groups").data(dt);ge.enter().append("g").attr("class","groups"),ge.exit().remove();var fe=ge.selectAll("g.traces").data(g.identity);fe.enter().append("g").attr("class","traces"),fe.exit().remove(),fe.style("opacity",function(pe){var se=pe[0].trace;return S.traceIs(se,"pie-like")?ft.indexOf(pe[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){c.select(this).call(h,W,J)}).call(T,W,J).each(function(){tt||c.select(this).call(k,W,yt)}),g.syncOrAsync([I.previousPromises,function(){return j(W,ge,fe,J)},function(){var pe=lt._size,se=J.borderwidth,Tt=J.xref==="paper",Lt=J.yref==="paper";if(qt.text&&P(Wt,J,se),!tt){var Mt,ee;Tt?Mt=pe.l+pe.w*J.x-x[H(J)]*J._width:Mt=lt.width*J.x-x[H(J)]*J._width,Lt?ee=pe.t+pe.h*(1-J.y)-x[F(J)]*J._effHeight:ee=lt.height*(1-J.y)-x[F(J)]*J._effHeight;var ve=V(W,yt,Mt,ee);if(ve)return;if(lt.margin.autoexpand){var oe=Mt,Te=ee;Mt=Tt?g.constrain(Mt,0,lt.width-J._width):oe,ee=Lt?g.constrain(ee,0,lt.height-J._effHeight):Te,Mt!==oe&&g.log("Constrain "+yt+".x to make legend fit inside graph"),ee!==Te&&g.log("Constrain "+yt+".y to make legend fit inside graph")}r.setTranslate(ut,Mt,ee)}if(Jt.on(".drag",null),ut.on("wheel",null),tt||J._height<=J._maxHeight||W._context.staticPlot){var He=J._effHeight;tt&&(He=J._height),It.attr({width:J._width-se,height:He-se,x:se/2,y:se/2}),r.setTranslate(Pt,0,0),kt.select("rect").attr({width:J._width-2*se,height:He-2*se,x:se,y:se}),r.setClipUrl(Pt,mt,W),r.setRect(Jt,0,0,0,0),delete J._scrollY}else{var Ge=Math.max(i.scrollBarMinHeight,J._effHeight*J._effHeight/J._height),cr=J._effHeight-Ge-2*i.scrollBarMargin,ur=J._height-J._effHeight,jr=cr/ur,Wr=Math.min(J._scrollY||0,ur);It.attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-se,x:se/2,y:se/2}),kt.select("rect").attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-2*se,x:se,y:se+Wr}),r.setClipUrl(Pt,mt,W),gt(Wr,Ge,jr),ut.on("wheel",function(){Wr=g.constrain(J._scrollY+c.event.deltaY/ur*cr,0,ur),gt(Wr,Ge,jr),Wr!==0&&Wr!==ur&&c.event.preventDefault()});var br,Xr,nn,Le=function(we,Ue,qe){var or=(qe-Ue)/jr+we;return g.constrain(or,0,ur)},Gt=function(we,Ue,qe){var or=(Ue-qe)/jr+we;return g.constrain(or,0,ur)},ne=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"?br=we.changedTouches[0].clientY:br=we.clientY,nn=Wr}).on("drag",function(){var we=c.event.sourceEvent;we.buttons===2||we.ctrlKey||(we.type==="touchmove"?Xr=we.changedTouches[0].clientY:Xr=we.clientY,Wr=Le(nn,br,Xr),gt(Wr,Ge,jr))});Jt.call(ne);var Ct=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"&&(br=we.changedTouches[0].clientY,nn=Wr)}).on("drag",function(){var we=c.event.sourceEvent;we.type==="touchmove"&&(Xr=we.changedTouches[0].clientY,Wr=Gt(nn,br,Xr),gt(Wr,Ge,jr))});Pt.call(Ct)}function gt(we,Ue,qe){J._scrollY=W._fullLayout[yt]._scrollY=we,r.setTranslate(Pt,0,-we),r.setRect(Jt,J._width,i.scrollBarMargin+we*qe,i.scrollBarWidth,Ue),kt.select("rect").attr("y",se+we)}if(W._context.edits.legendPosition){var St,Nt,re,le;ut.classed("cursor-move",!0),e.init({element:ut.node(),gd:W,prepFn:function(we){if(we.target!==Jt.node()){var Ue=r.getTranslate(ut);re=Ue.x,le=Ue.y}},moveFn:function(we,Ue){if(re!==void 0&&le!==void 0){var qe=re+we,or=le+Ue;r.setTranslate(ut,qe,or),St=e.align(qe,J._width,pe.l,pe.l+pe.w,J.xanchor),Nt=e.align(or+J._height,-J._height,pe.t+pe.h,pe.t,J.yanchor)}},doneFn:function(){if(St!==void 0&&Nt!==void 0){var we={};we[yt+".x"]=St,we[yt+".y"]=Nt,S.call("_guiRelayout",W,we)}},clickFn:function(we,Ue){var qe=st.selectAll("g.traces").filter(function(){var or=this.getBoundingClientRect();return Ue.clientX>=or.left&&Ue.clientX<=or.right&&Ue.clientY>=or.top&&Ue.clientY<=or.bottom});qe.size()>0&&A(W,ut,qe,we,Ue)}})}}],W)}}function C(W,q,J){var lt=W[0],yt=lt.width,mt=q.entrywidthmode,st=lt.trace.legendwidth||q.entrywidth;return mt==="fraction"?q._maxWidth*st:J+(st||yt)}function A(W,q,J,lt,yt){var mt=J.data()[0][0].trace,st={event:yt,node:J.node(),curveNumber:mt.index,expandedIndex:mt.index,data:W.data,layout:W.layout,frames:W._transitionData._frames,config:W._context,fullData:W._fullData,fullLayout:W._fullLayout};mt._group&&(st.group=mt._group),S.traceIs(mt,"pie-like")&&(st.label=J.datum()[0].label);var tt=t.triggerHandler(W,"plotly_legendclick",st);if(lt===1){if(tt===!1)return;q._clickTimeout=setTimeout(function(){W._fullLayout&&o(J,W,lt)},W._context.doubleClickDelay)}else if(lt===2){q._clickTimeout&&clearTimeout(q._clickTimeout),W._legendMouseDownTime=0;var dt=t.triggerHandler(W,"plotly_legenddoubleclick",st);dt!==!1&&tt!==!1&&o(J,W,lt)}}function h(W,q,J){var lt=U(J),yt=W.data()[0][0],mt=yt.trace,st=S.traceIs(mt,"pie-like"),tt=!J._inHover&&q._context.edits.legendText&&!st,dt=J._maxNameLength,rt,at;yt.groupTitle?(rt=yt.groupTitle.text,at=yt.groupTitle.font):(at=J.font,J.entries?rt=yt.text:(rt=st?yt.label:mt.name,mt._meta&&(rt=g.templateString(rt,mt._meta))));var vt=g.ensureSingle(W,"text",lt+"text");vt.attr("text-anchor","start").call(r.font,at).text(tt?p(rt,dt):rt);var it=J.indentation+J.itemwidth+i.itemGap*2;n.positionText(vt,it,0),tt?vt.call(n.makeEditable,{gd:q,text:rt}).call(w,W,q,J).on("edit",function(Y){this.text(p(Y,dt)).call(w,W,q,J);var ft=yt.trace._fullInput||{},ut={};return ut.name=Y,ft._isShape?S.call("_guiRelayout",q,"shapes["+mt.index+"].name",ut.name):S.call("_guiRestyle",q,ut,mt.index)}):w(vt,W,q,J)}function p(W,q){var J=Math.max(4,q);if(W&&W.trim().length>=J/2)return W;W=W||"";for(var lt=J-W.length;lt>0;lt--)W+=" ";return W}function k(W,q,J){var lt=q._context.doubleClickDelay,yt,mt=1,st=g.ensureSingle(W,"rect",J+"toggle",function(tt){q._context.staticPlot||tt.style("cursor","pointer").attr("pointer-events","all"),tt.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(st.on("mousedown",function(){yt=new Date().getTime(),yt-q._legendMouseDownTimelt&&(mt=Math.max(mt-1,1)),A(q,tt,W,mt,c.event)}}))}function w(W,q,J,lt,yt){lt._inHover&&W.attr("data-notex",!0),n.convertToTspans(W,J,function(){R(q,J,lt,yt)})}function R(W,q,J,lt){var yt=W.data()[0][0];if(!J._inHover&&yt&&!yt.trace.showlegend){W.remove();return}var mt=W.select("g[class*=math-group]"),st=mt.node(),tt=U(J);J||(J=q._fullLayout[tt]);var dt=J.borderwidth,rt;lt===b?rt=J.title.font:yt.groupTitle?rt=yt.groupTitle.font:rt=J.font;var at=rt.size*f,vt,it;if(st){var Y=r.bBox(st);vt=Y.height,it=Y.width,lt===b?r.setTranslate(mt,dt,dt+vt*.75):r.setTranslate(mt,0,vt*.25)}else{var ft="."+tt+(lt===b?"title":"")+"text",ut=W.select(ft),kt=n.lineCount(ut),It=ut.node();if(vt=at*kt,it=It?r.bBox(It).width:0,lt===b)J.title.side==="left"&&(it+=i.itemGap*2),n.positionText(ut,dt+i.titlePad,dt+at);else{var Pt=i.itemGap*2+J.indentation+J.itemwidth;yt.groupTitle&&(Pt=i.itemGap,it-=J.indentation+J.itemwidth),n.positionText(ut,Pt,-at*((kt-1)/2-.3))}}lt===b?(J._titleWidth=it,J._titleHeight=vt):(yt.lineHeight=at,yt.height=Math.max(vt,16)+3,yt.width=it)}function O(W){var q=0,J=0,lt=W.title.side;return lt&&(lt.indexOf("left")!==-1&&(q=W._titleWidth),lt.indexOf("top")!==-1&&(J=W._titleHeight)),[q,J]}function j(W,q,J,lt){var yt=W._fullLayout,mt=U(lt);lt||(lt=yt[mt]);var st=yt._size,tt=u.isVertical(lt),dt=u.isGrouped(lt),rt=lt.entrywidthmode==="fraction",at=lt.borderwidth,vt=2*at,it=i.itemGap,Y=lt.indentation+lt.itemwidth+it*2,ft=2*(at+it),ut=F(lt),kt=lt.y<0||lt.y===0&&ut==="top",It=lt.y>1||lt.y===1&&ut==="bottom",Pt=lt.tracegroupgap,qt={};let{orientation:Wt,yref:Jt}=lt,{maxheight:ge}=lt,fe=kt||It||Wt!=="v"||Jt!=="paper";ge||(ge=fe?.5:1);let pe=fe?yt.height:st.h;lt._maxHeight=Math.max(ge>1?ge:ge*pe,30);var se=0;lt._width=0,lt._height=0;var Tt=O(lt);if(tt)J.each(function(gt){var St=gt[0].height;r.setTranslate(this,at+Tt[0],at+Tt[1]+lt._height+St/2+it),lt._height+=St,lt._width=Math.max(lt._width,gt[0].width)}),se=Y+lt._width,lt._width+=it+Y+vt,lt._height+=ft,dt&&(q.each(function(gt,St){r.setTranslate(this,0,St*lt.tracegroupgap)}),lt._height+=(lt._lgroupsLength-1)*lt.tracegroupgap);else{var Lt=H(lt),Mt=lt.x<0||lt.x===0&&Lt==="right",ee=lt.x>1||lt.x===1&&Lt==="left",ve=It||kt,oe=yt.width/2;lt._maxWidth=Math.max(Mt?ve&&Lt==="left"?st.l+st.w:oe:ee?ve&&Lt==="right"?st.r+st.w:oe:st.w,2*Y);var Te=0,He=0;J.each(function(gt){var St=C(gt,lt,Y);Te=Math.max(Te,St),He+=St}),se=null;var Ge=0;if(dt){var cr=0,ur=0,jr=0;q.each(function(){var gt=0,St=0;c.select(this).selectAll("g.traces").each(function(re){var le=C(re,lt,Y),we=re[0].height;r.setTranslate(this,Tt[0],Tt[1]+at+it+we/2+St),St+=we,gt=Math.max(gt,le),qt[re[0].trace.legendgroup]=gt});var Nt=gt+it;ur>0&&Nt+at+ur>lt._maxWidth?(Ge=Math.max(Ge,ur),ur=0,jr+=cr+Pt,cr=St):cr=Math.max(cr,St),r.setTranslate(this,ur,jr),ur+=Nt}),lt._width=Math.max(Ge,ur)+at,lt._height=jr+cr+ft}else{var Wr=J.size(),br=He+vt+(Wr-1)*it=lt._maxWidth&&(Ge=Math.max(Ge,Gt),nn=0,Le+=Xr,lt._height+=Xr,Xr=0),r.setTranslate(this,Tt[0]+at+nn,Tt[1]+at+Le+St/2+it),Gt=nn+Nt+it,nn+=re,Xr=Math.max(Xr,St)}),br?(lt._width=nn+vt,lt._height=Xr+ft):(lt._width=Math.max(Ge,Gt)+vt,lt._height+=Xr+ft)}}lt._width=Math.ceil(Math.max(lt._width+Tt[0],lt._titleWidth+2*(at+i.titlePad))),lt._height=Math.ceil(Math.max(lt._height+Tt[1],lt._titleHeight+2*(at+i.itemGap))),lt._effHeight=Math.min(lt._height,lt._maxHeight);var ne=W._context.edits,Ct=ne.legendText||ne.legendPosition;J.each(function(gt){var St=c.select(this).select("."+mt+"toggle"),Nt=gt[0].height,re=gt[0].trace.legendgroup,le=C(gt,lt,Y);dt&&re!==""&&(le=qt[re]);var we=Ct?Y:se||le;!tt&&!rt&&(we+=it/2),r.setRect(St,0,-Nt/2,we,Nt)})}function V(W,q,J,lt){var yt=W._fullLayout,mt=yt[q],st=H(mt),tt=F(mt),dt=mt.xref==="paper",rt=mt.yref==="paper";W._fullLayout._reservedMargin[q]={};var at=mt.y<.5?"b":"t",vt=mt.x<.5?"l":"r",it={r:yt.width-J,l:J+mt._width,b:yt.height-lt,t:lt+mt._effHeight};if(dt&&rt)return I.autoMargin(W,q,{x:mt.x,y:mt.y,l:mt._width*x[st],r:mt._width*y[st],b:mt._effHeight*y[tt],t:mt._effHeight*x[tt]});dt?W._fullLayout._reservedMargin[q][at]=it[at]:rt||mt.orientation==="v"?W._fullLayout._reservedMargin[q][vt]=it[vt]:W._fullLayout._reservedMargin[q][at]=it[at]}function H(W){return g.isRightAnchor(W)?"right":g.isCenterAnchor(W)?"center":"left"}function F(W){return g.isBottomAnchor(W)?"bottom":g.isMiddleAnchor(W)?"middle":"top"}function U(W){return W._id||"legend"}}),B_=Dt(Q=>{var Z=qr(),c=Yi(),g=ro(),I=kn(),S=I.pushUnique,t=I.strTranslate,e=I.strRotate,r=Bm(),a=ec(),n=jm(),o=Vs(),i=hi(),l=up(),f=Ls(),x=ic().zindexSeparator,y=Jo(),v=Fp(),T=no(),u=Uy(),b=R_(),_=T.YANGLE,P=Math.PI*_/180,M=1/Math.sin(P),C=Math.cos(P),A=Math.sin(P),h=T.HOVERARROWSIZE,p=T.HOVERTEXTPAD,k={box:!0,ohlc:!0,violin:!0,candlestick:!0},w={scatter:!0,scattergl:!0,splom:!0};function R(Y,ft){return Y.distance-ft.distance}Q.hover=function(Y,ft,ut,kt){Y=I.getGraphDiv(Y);var It=ft.target;I.throttle(Y._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){O(Y,ft,ut,kt,It)})},Q.loneHover=function(Y,ft){var ut=!0;Array.isArray(Y)||(ut=!1,Y=[Y]);var kt=ft.gd,It=at(kt),Pt=vt(kt),qt=Y.map(function(Mt){var ee=Mt._x0||Mt.x0||Mt.x||0,ve=Mt._x1||Mt.x1||Mt.x||0,oe=Mt._y0||Mt.y0||Mt.y||0,Te=Mt._y1||Mt.y1||Mt.y||0,He=Mt.eventData;if(He){var Ge=Math.min(ee,ve),cr=Math.max(ee,ve),ur=Math.min(oe,Te),jr=Math.max(oe,Te),Wr=Mt.trace;if(y.traceIs(Wr,"gl3d")){var br=kt._fullLayout[Wr.scene]._scene.container,Xr=br.offsetLeft,nn=br.offsetTop;Ge+=Xr,cr+=Xr,ur+=nn,jr+=nn}He.bbox={x0:Ge+Pt,x1:cr+Pt,y0:ur+It,y1:jr+It},ft.inOut_bbox&&ft.inOut_bbox.push(He.bbox)}else He=!1;return{color:Mt.color||i.defaultLine,x0:Mt.x0||Mt.x||0,x1:Mt.x1||Mt.x||0,y0:Mt.y0||Mt.y||0,y1:Mt.y1||Mt.y||0,xLabel:Mt.xLabel,yLabel:Mt.yLabel,zLabel:Mt.zLabel,text:Mt.text,name:Mt.name,idealAlign:Mt.idealAlign,borderColor:Mt.borderColor,fontFamily:Mt.fontFamily,fontSize:Mt.fontSize,fontColor:Mt.fontColor,fontWeight:Mt.fontWeight,fontStyle:Mt.fontStyle,fontVariant:Mt.fontVariant,nameLength:Mt.nameLength,textAlign:Mt.textAlign,trace:Mt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Mt.hovertemplate||!1,hovertemplateLabels:Mt.hovertemplateLabels||!1,eventData:He}}),Wt=!1,Jt=H(qt,{gd:kt,hovermode:"closest",rotateLabels:Wt,bgColor:ft.bgColor||i.background,container:Z.select(ft.container),outerContainer:ft.outerContainer||ft.container}),ge=Jt.hoverLabels,fe=5,pe=0,se=0;ge.sort(function(Mt,ee){return Mt.y0-ee.y0}).each(function(Mt,ee){var ve=Mt.y0-Mt.by/2;ve-feur[0]._length||oi<0||oi>jr[0]._length)return l.unhoverRaw(Y,ft)}if(ft.pointerX=Ii+ur[0]._offset,ft.pointerY=oi+jr[0]._offset,"xval"in ft?Ct=v.flat(Pt,ft.xval):Ct=v.p2c(ur,Ii),"yval"in ft?gt=v.flat(Pt,ft.yval):gt=v.p2c(jr,oi),!c(Ct[0])||!c(gt[0]))return I.warn("Fx.hover failed",ft,Y),l.unhoverRaw(Y,ft)}var Zi=1/0;function We(Da,ys){for(Nt=0;Ntmr&&(Gt.splice(0,mr),Zi=Gt[0].distance),pe&&Le!==0&&Gt.length===0){Ar.distance=Le,Ar.index=!1;var ss=le._module.hoverPoints(Ar,or,Sr,"closest",{hoverLayer:Wt._hoverlayer});if(ss&&(ss=ss.filter(function(Lo){return Lo.spikeDistance<=Le})),ss&&ss.length){var cl,Qs=ss.filter(function(Lo){return Lo.xa.showspikes&&Lo.xa.spikesnap!=="hovered data"});if(Qs.length){var Nl=Qs[0];c(Nl.x0)&&c(Nl.y0)&&(cl=fr(Nl),(!Qr.vLinePoint||Qr.vLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.vLinePoint=cl))}var cs=ss.filter(function(Lo){return Lo.ya.showspikes&&Lo.ya.spikesnap!=="hovered data"});if(cs.length){var Ps=cs[0];c(Ps.x0)&&c(Ps.y0)&&(cl=fr(Ps),(!Qr.hLinePoint||Qr.hLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.hLinePoint=cl))}}}}}We();function nr(Da,ys,os){for(var ul=null,Zo=1/0,Ks,ss=0;ssDa.trace.index===ci.trace.index):Gt=[ci];var za=Gt.length,Wa=rt("x",ci,Wt),ze=rt("y",ci,Wt);We(Wa,ze);var Ie=[],Rr={},$r=0,Gr=function(Da){var ys=k[Da.trace.type]?j(Da):Da.trace.index;if(!Rr[ys])$r++,Rr[ys]=$r,Ie.push(Da);else{var os=Rr[ys]-1,ul=Ie[os];os>0&&Math.abs(Da.distance)za-1;Br--)Gr(Gt[Br]);Gt=Ie,Cn()}var Yr=Y._hoverdata,pn=[],on=at(Y),Ce=vt(Y);for(let Da of Gt){var dr=v.makeEventData(Da,Da.trace,Da.cd);if(Da.hovertemplate!==!1){var Hr=!1;Da.cd[Da.index]&&Da.cd[Da.index].ht&&(Hr=Da.cd[Da.index].ht),Da.hovertemplate=Hr||Da.trace.hovertemplate||!1}if(Da.xa&&Da.ya){var _n=Da.x0+Da.xa._offset,Fn=Da.x1+Da.xa._offset,Qn=Da.y0+Da.ya._offset,Pn=Da.y1+Da.ya._offset,En=Math.min(_n,Fn),Zn=Math.max(_n,Fn),La=Math.min(Qn,Pn),Vi=Math.max(Qn,Pn);dr.bbox={x0:En+Ce,x1:Zn+Ce,y0:La+on,y1:Vi+on}}Da.eventData=[dr],pn.push(dr)}Y._hoverdata=pn;var Qa=se==="y"&&(ne.length>1||Gt.length>1)||se==="closest"&&Hn&&Gt.length>1,Ja=i.combine(Wt.plot_bgcolor||i.background,Wt.paper_bgcolor),Do=H(Gt,{gd:Y,hovermode:se,rotateLabels:Qa,bgColor:Ja,container:Wt._hoverlayer,outerContainer:Wt._paper.node(),commonLabelOpts:Wt.hoverlabel,hoverdistance:Wt.hoverdistance}),yo=Do.hoverLabels;if(v.isUnifiedHover(se)||(U(yo,Qa,Wt,Do.commonLabelBoundingBox),J(yo,Qa,Wt._invScaleX,Wt._invScaleY)),It&&It.tagName){var Fo=y.getComponentMethod("annotations","hasClickToShow")(Y,pn);n(Z.select(It),Fo?"pointer":"")}!It||kt||!mt(Y,ft,Yr)||(Yr&&Y.emit("plotly_unhover",{event:ft,points:Yr}),Y.emit("plotly_hover",{event:ft,points:Y._hoverdata,xaxes:ur,yaxes:jr,xvals:Ct,yvals:gt}))}function j(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var V=/([\s\S]*)<\/extra>/;function H(Y,ft){var ut=ft.gd,kt=ut._fullLayout,It=ft.hovermode,Pt=ft.rotateLabels,qt=ft.bgColor,Wt=ft.container,Jt=ft.outerContainer,ge=ft.commonLabelOpts||{};if(Y.length===0)return[[]];var fe=ft.fontFamily||T.HOVERFONT,pe=ft.fontSize||T.HOVERFONTSIZE,se=ft.fontWeight||kt.font.weight,Tt=ft.fontStyle||kt.font.style,Lt=ft.fontVariant||kt.font.variant,Mt=ft.fontTextcase||kt.font.textcase,ee=ft.fontLineposition||kt.font.lineposition,ve=ft.fontShadow||kt.font.shadow,oe=Y[0],Te=oe.xa,He=oe.ya,Ge=It.charAt(0),cr=Ge+"Label",ur=oe[cr];if(ur===void 0&&Te.type==="multicategory")for(var jr=0;jrkt.width-Ce&&(dr=kt.width-Ce),za.attr("d","M"+(Yr-dr)+",0L"+(Yr-dr+h)+","+on+h+"H"+Ce+"v"+on+(p*2+Br.height)+"H"+-Ce+"V"+on+h+"H"+(Yr-dr-h)+"Z"),Yr=dr,Nt.minX=Yr-Ce,Nt.maxX=Yr+Ce,Te.side==="top"?(Nt.minY=pn-(p*2+Br.height),Nt.maxY=pn-p):(Nt.minY=pn+p,Nt.maxY=pn+(p*2+Br.height))}else{var Hr,_n,Fn;He.side==="right"?(Hr="start",_n=1,Fn="",Yr=Te._offset+Te._length):(Hr="end",_n=-1,Fn="-",Yr=Te._offset),pn=He._offset+(oe.y0+oe.y1)/2,Wa.attr("text-anchor",Hr),za.attr("d","M0,0L"+Fn+h+","+h+"V"+(p+Br.height/2)+"h"+Fn+(p*2+Br.width)+"V-"+(p+Br.height/2)+"H"+Fn+h+"V-"+h+"Z"),Nt.minY=pn-(p+Br.height/2),Nt.maxY=pn+(p+Br.height/2),He.side==="right"?(Nt.minX=Yr+h,Nt.maxX=Yr+h+(p*2+Br.width)):(Nt.minX=Yr-h-(p*2+Br.width),Nt.maxX=Yr-h);var Qn=Br.height/2,Pn=br-Br.top-Qn,En="clip"+kt._uid+"commonlabel"+He._id,Zn;if(Yrza.hoverinfo!=="none");if(ci.length===0)return[];var re=kt.hoverlabel,le=re.font,we=ci[0],Ue=((It==="x unified"?we.xa:we.ya).unifiedhovertitle||{}).text,qe=Ue?I.hovertemplateString({data:It==="x unified"?[{xa:we.xa,x:we.xVal}]:[{ya:we.ya,y:we.yVal}],fallback:we.trace.hovertemplatefallback,locale:kt._d3locale,template:Ue}):ur,or={showlegend:!0,legend:{title:{text:qe,font:le},font:le,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:kt.legend?kt.legend.traceorder:void 0,orientation:"v"}},Sr={font:le};u(or,Sr,ut._fullData);var Ar=Sr.legend;Ar.entries=[];for(var mr=0;mr=0?Oi=Tn:Mn+sa=0?Oi=Mn:fi+sa=0?ji=tn:Cn+Zi=0?ji=Cn:ki+Zi=0,(ci.idealAlign==="top"||!Qa)&&Ja?(Fn-=Pn/2,ci.anchor="end"):Qa?(Fn+=Pn/2,ci.anchor="start"):ci.anchor="middle",ci.crossPos=Fn;else{if(ci.pos=Fn,Qa=_n+Qn/2+Vi<=Xr,Ja=_n-Qn/2-Vi>=0,(ci.idealAlign==="left"||!Qa)&&Ja)_n-=Qn/2,ci.anchor="end";else if(Qa)_n+=Qn/2,ci.anchor="start";else{ci.anchor="middle";var Do=Vi/2,yo=_n+Do-Xr,Fo=_n-Do;yo>0&&(_n-=yo),Fo<0&&(_n+=-Fo)}ci.crossPos=_n}pn.attr("text-anchor",ci.anchor),Ce&&on.attr("text-anchor",ci.anchor),za.attr("transform",t(_n,Fn)+(Pt?e(_):""))}),{hoverLabels:Xi,commonLabelBoundingBox:Nt}}function F(Y,ft,ut,kt,It,Pt){var qt="",Wt="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=I.templateString(Y.name,Y.trace._meta)),qt=tt(Y.name,Y.nameLength));var Jt=ut.charAt(0),ge=Jt==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(Wt+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(Wt+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(Wt+=(Wt?"z: ":"")+Y.zLabel)):ft&&Y[Jt+"Label"]===It?Wt=Y[ge+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(Wt=Y.yLabel):Y.yLabel===void 0?Wt=Y.xLabel:Wt="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(Wt+=(Wt?"
":"")+Y.text),Y.extraText!==void 0&&(Wt+=(Wt?"
":"")+Y.extraText),Pt&&Wt===""&&!Y.hovertemplate&&(qt===""&&Pt.remove(),Wt=qt);let{hovertemplate:fe=!1}=Y;if(fe){let pe=Y.hovertemplateLabels||Y;Y[Jt+"Label"]!==It&&(pe[Jt+"other"]=pe[Jt+"Val"],pe[Jt+"otherLabel"]=pe[Jt+"Label"]),Wt=I.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:pe,locale:kt._d3locale,template:fe}),Wt=Wt.replace(V,(se,Tt)=>(qt=tt(Tt,Y.nameLength),""))}return[Wt,qt]}function U(Y,ft,ut,kt){var It=ft?"xa":"ya",Pt=ft?"ya":"xa",qt=0,Wt=1,Jt=Y.size(),ge=new Array(Jt),fe=0,pe=kt.minX,se=kt.maxX,Tt=kt.minY,Lt=kt.maxY,Mt=function(Ct){return Ct*ut._invScaleX},ee=function(Ct){return Ct*ut._invScaleY};Y.each(function(Ct){var gt=Ct[It],St=Ct[Pt],Nt=gt._id.charAt(0)==="x",re=gt.range;fe===0&&re&&re[0]>re[1]!==Nt&&(Wt=-1);var le=0,we=Nt?ut.width:ut.height;if(ut.hovermode==="x"||ut.hovermode==="y"){var Ue=W(Ct,ft),qe=Ct.anchor,or=qe==="end"?-1:1,Sr,Ar;if(qe==="middle")Sr=Ct.crossPos+(Nt?ee(Ue.y-Ct.by/2):Mt(Ct.bx/2+Ct.tx2width/2)),Ar=Sr+(Nt?ee(Ct.by):Mt(Ct.bx));else if(Nt)Sr=Ct.crossPos+ee(h+Ue.y)-ee(Ct.by/2-h),Ar=Sr+ee(Ct.by);else{var mr=Mt(or*h+Ue.x),Qr=mr+Mt(or*Ct.bx);Sr=Ct.crossPos+Math.min(mr,Qr),Ar=Ct.crossPos+Math.max(mr,Qr)}Nt?Tt!==void 0&&Lt!==void 0&&Math.min(Ar,Lt)-Math.max(Sr,Tt)>1&&(St.side==="left"?(le=St._mainLinePosition,we=ut.width):we=St._mainLinePosition):pe!==void 0&&se!==void 0&&Math.min(Ar,se)-Math.max(Sr,pe)>1&&(St.side==="top"?(le=St._mainLinePosition,we=ut.height):we=St._mainLinePosition)}ge[fe++]=[{datum:Ct,traceIndex:Ct.trace.index,dp:0,pos:Ct.pos,posref:Ct.posref,size:Ct.by*(Nt?M:1)/2,pmin:le,pmax:we}]}),ge.sort(function(Ct,gt){return Ct[0].posref-gt[0].posref||Wt*(gt[0].traceIndex-Ct[0].traceIndex)});var ve,oe,Te,He,Ge,cr,ur;function jr(Ct){var gt=Ct[0],St=Ct[Ct.length-1];if(oe=gt.pmin-gt.pos-gt.dp+gt.size,Te=St.pos+St.dp+St.size-gt.pmax,oe>.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp+=oe;ve=!1}if(!(Te<.01)){if(oe<-.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp-=Te;ve=!1}if(ve){var Nt=0;for(He=0;Hegt.pmax&&Nt++;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos>gt.pmax-1&&(cr.del=!0,Nt--);for(He=0;He=0;Ge--)Ct[Ge].dp-=Te;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos+cr.dp+cr.size>gt.pmax&&(cr.del=!0,Nt--)}}}for(;!ve&&qt<=Jt;){for(qt++,ve=!0,He=0;He.01){for(Ge=br.length-1;Ge>=0;Ge--)br[Ge].dp+=oe;for(Wr.push.apply(Wr,br),ge.splice(He+1,1),ur=0,Ge=Wr.length-1;Ge>=0;Ge--)ur+=Wr[Ge].dp;for(Te=ur/Wr.length,Ge=Wr.length-1;Ge>=0;Ge--)Wr[Ge].dp-=Te;ve=!1}else He++}ge.forEach(jr)}for(He=ge.length-1;He>=0;He--){var Le=ge[He];for(Ge=Le.length-1;Ge>=0;Ge--){var Gt=Le[Ge],ne=Gt.datum;ne.offset=Gt.dp,ne.del=Gt.del}}}function W(Y,ft){var ut=0,kt=Y.offset;return ft&&(kt*=-A,ut=Y.offset*C),{x:ut,y:kt}}function q(Y){var ft={start:1,end:-1,middle:0}[Y.anchor],ut=ft*(h+p),kt=ut+ft*(Y.txwidth+p),It=Y.anchor==="middle";return It&&(ut-=Y.tx2width/2,kt+=Y.txwidth/2+p),{alignShift:ft,textShiftX:ut,text2ShiftX:kt}}function J(Y,ft,ut,kt){var It=function(qt){return qt*ut},Pt=function(qt){return qt*kt};Y.each(function(qt){var Wt=Z.select(this);if(qt.del)return Wt.remove();var Jt=Wt.select("text.nums"),ge=qt.anchor,fe=ge==="end"?-1:1,pe=q(qt),se=W(qt,ft),Tt=se.x,Lt=se.y,Mt=ge==="middle",ee="hoverlabel"in qt.trace?qt.trace.hoverlabel.showarrow:!0,ve;Mt?ve="M-"+It(qt.bx/2+qt.tx2width/2)+","+Pt(Lt-qt.by/2)+"h"+It(qt.bx)+"v"+Pt(qt.by)+"h-"+It(qt.bx)+"Z":ee?ve="M0,0L"+It(fe*h+Tt)+","+Pt(h+Lt)+"v"+Pt(qt.by/2-h)+"h"+It(fe*qt.bx)+"v-"+Pt(qt.by)+"H"+It(fe*h+Tt)+"V"+Pt(Lt-h)+"Z":ve="M"+It(fe*h+Tt)+","+Pt(Lt-qt.by/2)+"h"+It(fe*qt.bx)+"v"+Pt(qt.by)+"h"+It(-fe*qt.bx)+"Z",Wt.select("path").attr("d",ve);var oe=Tt+pe.textShiftX,Te=Lt+qt.ty0-qt.by/2+p,He=qt.textAlign||"auto";He!=="auto"&&(He==="left"&&ge!=="start"?(Jt.attr("text-anchor","start"),oe=Mt?-qt.bx/2-qt.tx2width/2+p:-qt.bx-p):He==="right"&&ge!=="end"&&(Jt.attr("text-anchor","end"),oe=Mt?qt.bx/2-qt.tx2width/2-p:qt.bx+p)),Jt.call(a.positionText,It(oe),Pt(Te)),qt.tx2width&&(Wt.select("text.name").call(a.positionText,It(pe.text2ShiftX+pe.alignShift*p+Tt),Pt(Lt+qt.ty0-qt.by/2+p)),Wt.select("rect").call(o.setRect,It(pe.text2ShiftX+(pe.alignShift-1)*qt.tx2width/2+Tt),Pt(Lt-qt.by/2-1),It(qt.tx2width),Pt(qt.by+2)))})}function lt(Y,ft){var ut=Y.index,kt=Y.trace||{},It=Y.cd[0],Pt=Y.cd[ut]||{};function qt(se){return se||c(se)&&se===0}var Wt=Array.isArray(ut)?function(se,Tt){var Lt=I.castOption(It,ut,se);return qt(Lt)?Lt:I.extractOption({},kt,"",Tt)}:function(se,Tt){return I.extractOption(Pt,kt,se,Tt)};function Jt(se,Tt,Lt){var Mt=Wt(Tt,Lt);qt(Mt)&&(Y[se]=Mt)}if(Jt("hoverinfo","hi","hoverinfo"),Jt("bgcolor","hbg","hoverlabel.bgcolor"),Jt("borderColor","hbc","hoverlabel.bordercolor"),Jt("fontFamily","htf","hoverlabel.font.family"),Jt("fontSize","hts","hoverlabel.font.size"),Jt("fontColor","htc","hoverlabel.font.color"),Jt("fontWeight","htw","hoverlabel.font.weight"),Jt("fontStyle","hty","hoverlabel.font.style"),Jt("fontVariant","htv","hoverlabel.font.variant"),Jt("nameLength","hnl","hoverlabel.namelength"),Jt("textAlign","hta","hoverlabel.align"),Y.posref=ft==="y"||ft==="closest"&&kt.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=I.constrain(Y.x0,0,Y.xa._length),Y.x1=I.constrain(Y.x1,0,Y.xa._length),Y.y0=I.constrain(Y.y0,0,Y.ya._length),Y.y1=I.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:f.hoverLabelText(Y.xa,Y.xLabelVal,kt.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:f.hoverLabelText(Y.ya,Y.yLabelVal,kt.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var ge=f.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+ge+" / -"+f.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+ge,ft==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var fe=f.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+fe+" / -"+f.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+fe,ft==="y"&&(Y.distance+=1)}var pe=Y.hoverinfo||Y.trace.hoverinfo;return pe&&pe!=="all"&&(pe=Array.isArray(pe)?pe:pe.split("+"),pe.indexOf("x")===-1&&(Y.xLabel=void 0),pe.indexOf("y")===-1&&(Y.yLabel=void 0),pe.indexOf("z")===-1&&(Y.zLabel=void 0),pe.indexOf("text")===-1&&(Y.text=void 0),pe.indexOf("name")===-1&&(Y.name=void 0)),Y}function yt(Y,ft,ut){var kt=ut.container,It=ut.fullLayout,Pt=It._size,qt=ut.event,Wt=!!ft.hLinePoint,Jt=!!ft.vLinePoint,ge,fe;if(kt.selectAll(".spikeline").remove(),!!(Jt||Wt)){var pe=i.combine(It.plot_bgcolor,It.paper_bgcolor);if(Wt){var se=ft.hLinePoint,Tt,Lt;ge=se&&se.xa,fe=se&&se.ya;var Mt=fe.spikesnap;Mt==="cursor"?(Tt=qt.pointerX,Lt=qt.pointerY):(Tt=ge._offset+se.x,Lt=fe._offset+se.y);var ee=g.readability(se.color,pe)<1.5?i.contrast(pe):se.color,ve=fe.spikemode,oe=fe.spikethickness,Te=fe.spikecolor||ee,He=f.getPxPosition(Y,fe),Ge,cr;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(Ge=He,cr=Tt),ve.indexOf("across")!==-1){var ur=fe._counterDomainMin,jr=fe._counterDomainMax;fe.anchor==="free"&&(ur=Math.min(ur,fe.position),jr=Math.max(jr,fe.position)),Ge=Pt.l+ur*Pt.w,cr=Pt.l+jr*Pt.w}kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe,stroke:Te,"stroke-dasharray":o.dashStyle(fe.spikedash,oe)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:He+(fe.side!=="right"?oe:-oe),cy:Lt,r:oe,fill:Te}).classed("spikeline",!0)}if(Jt){var Wr=ft.vLinePoint,br,Xr;ge=Wr&&Wr.xa,fe=Wr&&Wr.ya;var nn=ge.spikesnap;nn==="cursor"?(br=qt.pointerX,Xr=qt.pointerY):(br=ge._offset+Wr.x,Xr=fe._offset+Wr.y);var Le=g.readability(Wr.color,pe)<1.5?i.contrast(pe):Wr.color,Gt=ge.spikemode,ne=ge.spikethickness,Ct=ge.spikecolor||Le,gt=f.getPxPosition(Y,ge),St,Nt;if(Gt.indexOf("toaxis")!==-1||Gt.indexOf("across")!==-1){if(Gt.indexOf("toaxis")!==-1&&(St=gt,Nt=Xr),Gt.indexOf("across")!==-1){var re=ge._counterDomainMin,le=ge._counterDomainMax;ge.anchor==="free"&&(re=Math.min(re,ge.position),le=Math.max(le,ge.position)),St=Pt.t+(1-le)*Pt.h,Nt=Pt.t+(1-re)*Pt.h}kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne,stroke:Ct,"stroke-dasharray":o.dashStyle(ge.spikedash,ne)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}Gt.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:br,cy:gt-(ge.side!=="top"?ne:-ne),r:ne,fill:Ct}).classed("spikeline",!0)}}}function mt(Y,ft,ut){if(!ut||ut.length!==Y._hoverdata.length)return!0;for(var kt=ut.length-1;kt>=0;kt--){var It=ut[kt],Pt=Y._hoverdata[kt];if(It.curveNumber!==Pt.curveNumber||String(It.pointNumber)!==String(Pt.pointNumber)||String(It.pointNumbers)!==String(Pt.pointNumbers)||It.binNumber!==Pt.binNumber)return!0}return!1}function st(Y,ft){return!0}function tt(Y,ft){return a.plainText(Y||"",{len:ft,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function dt(Y,ft){for(var ut=ft.charAt(0),kt=[],It=[],Pt=[],qt=0;qtY.offsetTop+Y.clientTop,vt=Y=>Y.offsetLeft+Y.clientLeft;function it(Y,ft){var ut=Y._fullLayout,kt=ft.getBoundingClientRect(),It=kt.left,Pt=kt.top,qt=It+kt.width,Wt=Pt+kt.height,Jt=I.apply3DTransform(ut._invTransform)(It,Pt),ge=I.apply3DTransform(ut._invTransform)(qt,Wt),fe=Jt[0],pe=Jt[1],se=ge[0],Tt=ge[1];return{x:fe,y:pe,width:se-fe,height:Tt-pe,top:Math.min(pe,Tt),left:Math.min(fe,se),right:Math.max(fe,se),bottom:Math.max(pe,Tt)}}}),Tg=Dt((Q,Z)=>{var c=kn(),g=hi(),I=Fp().isUnifiedHover;Z.exports=function(S,t,e,r){r=r||{};var a=t.legend;function n(o){r.font[o]||(r.font[o]=a?t.legend.font[o]:t.font[o])}t&&I(t.hovermode)&&(r.font||(r.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(r.bgcolor||(r.bgcolor=g.combine(t.legend.bgcolor,t.paper_bgcolor)),r.bordercolor||(r.bordercolor=t.legend.bordercolor)):r.bgcolor||(r.bgcolor=t.paper_bgcolor)),e("hoverlabel.bgcolor",r.bgcolor),e("hoverlabel.bordercolor",r.bordercolor),e("hoverlabel.namelength",r.namelength),e("hoverlabel.showarrow",r.showarrow),c.coerceFont(e,"hoverlabel.font",r.font),e("hoverlabel.align",r.align)}}),Ag=Dt((Q,Z)=>{var c=kn(),g=Tg(),I=po();Z.exports=function(S,t){function e(r,a){return c.coerce(S,t,I,r,a)}g(S,t,e)}}),w6=Dt((Q,Z)=>{var c=kn(),g=us(),I=Tg();Z.exports=function(S,t,e,r){function a(o,i){return c.coerce(S,t,g,o,i)}var n=c.extendFlat({},r.hoverlabel);t.hovertemplate&&(n.namelength=-1),I(S,t,a,n)}}),pv=Dt((Q,Z)=>{var c=kn(),g=po();Z.exports=function(I,S){function t(e,r){return S[e]!==void 0?S[e]:c.coerce(I,S,g,e,r)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}),g0=Dt((Q,Z)=>{var c=kn(),g=po(),I=pv(),S=Tg();Z.exports=function(t,e){function r(x,y){return c.coerce(t,e,g,x,y)}var a=I(t,e);a&&(r("hoverdistance"),r("spikedistance"));var n=r("dragmode");n==="select"&&r("selectdirection");var o=e._has("mapbox"),i=e._has("map"),l=e._has("geo"),f=e._basePlotModules.length;e.dragmode==="zoom"&&((o||i||l)&&f===1||(o||i)&&l&&f===2)&&(e.dragmode="pan"),S(t,e,r),c.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}}),Tw=Dt((Q,Z)=>{var c=kn(),g=Jo();Z.exports=function(S){var t=S.calcdata,e=S._fullLayout;function r(l){return function(f){return c.coerceHoverinfo({hoverinfo:f},{_module:l._module},e)}}for(var a=0;a{var c=Jo(),g=B_().hover;Z.exports=function(I,S,t){var e=c.getComponentMethod("annotations","onClick")(I,I._hoverdata);t!==void 0&&g(I,S,t,!0);function r(){I.emit("plotly_click",{points:I._hoverdata,event:S})}I._hoverdata&&S&&S.target&&(e&&e.then?e.then(r):r(),S.stopImmediatePropagation&&S.stopImmediatePropagation())}}),tf=Dt((Q,Z)=>{var c=qr(),g=kn(),I=up(),S=Fp(),t=po(),e=B_();Z.exports={moduleType:"component",name:"fx",constants:no(),schema:{layout:t},attributes:us(),layoutAttributes:t,supplyLayoutGlobalDefaults:Ag(),supplyDefaults:w6(),supplyLayoutDefaults:g0(),calc:Tw(),getDistanceFunction:S.getDistanceFunction,getClosest:S.getClosest,inbox:S.inbox,quadrature:S.quadrature,appendArrayPointValue:S.appendArrayPointValue,castHoverOption:a,castHoverinfo:n,hover:e.hover,unhover:I.unhover,loneHover:e.loneHover,loneUnhover:r,click:Aw()};function r(o){var i=g.isD3Selection(o)?o:c.select(o);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function a(o,i,l){return g.castOption(o,i,"hoverlabel."+l)}function n(o,i,l){function f(x){return g.coerceHoverinfo({hoverinfo:x},{_module:o._module},i)}return g.castOption(o,l,"hoverinfo",f)}}),v0=Dt(Q=>{Q.selectMode=function(Z){return Z==="lasso"||Z==="select"},Q.drawMode=function(Z){return Z==="drawclosedpath"||Z==="drawopenpath"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.openMode=function(Z){return Z==="drawline"||Z==="drawopenpath"},Q.rectMode=function(Z){return Z==="select"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.freeMode=function(Z){return Z==="lasso"||Z==="drawclosedpath"||Z==="drawopenpath"},Q.selectingOrDrawing=function(Z){return Q.freeMode(Z)||Q.rectMode(Z)}}),mv=Dt((Q,Z)=>{Z.exports=function(c){var g=c._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(I){I.regl&&I.regl.clear({color:!0,depth:!0})})}}),N_=Dt((Q,Z)=>{Z.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),j_=Dt((Q,Z)=>{var c=32;Z.exports={CIRCLE_SIDES:c,i000:0,i090:c/4,i180:c/2,i270:c/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Vy=Dt((Q,Z)=>{var c=kn().strTranslate;function g(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function I(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function S(e){var r=e._id.charAt(0)==="y"?1:0;return function(a){return g(e,a[r])}}function t(e){return c(e.xaxis._offset,e.yaxis._offset)}Z.exports={p2r:g,r2p:I,axValue:S,getTransform:t}}),Mg=Dt(Q=>{var Z=S1(),c=j_(),g=c.CIRCLE_SIDES,I=c.SQRT2,S=Vy(),t=S.p2r,e=S.r2p,r=[0,3,4,5,6,1,2],a=[0,3,4,1,2];Q.writePaths=function(i){var l=i.length;if(!l)return"M0,0Z";for(var f="",x=0;x0&&b{var c=Rc(),g=v0(),I=g.drawMode,S=g.openMode,t=j_(),e=t.i000,r=t.i090,a=t.i180,n=t.i270,o=t.cos45,i=t.sin45,l=Vy(),f=l.p2r,x=l.r2p,y=C0(),v=y.clearOutline,T=Mg(),u=T.readPaths,b=T.writePaths,_=T.ellipseOver,P=T.fixDatesForPaths;function M(A,h){if(A.length){var p=A[0][0];if(p){var k=h.gd,w=h.isActiveShape,R=h.dragmode,O=(k.layout||{}).shapes||[];if(!I(R)&&w!==void 0){var j=k._fullLayout._activeShapeIndex;if(j{var c=v0(),g=c.selectMode,I=C0(),S=I.clearOutline,t=Mg(),e=t.readPaths,r=t.writePaths,a=t.fixDatesForPaths;Z.exports=function(n,o){if(n.length){var i=n[0][0];if(i){var l=i.getAttribute("d"),f=o.gd,x=f._fullLayout.newselection,y=o.plotinfo,v=y.xaxis,T=y.yaxis,u=o.isActiveSelection,b=o.dragmode,_=(f.layout||{}).selections||[];if(!g(b)&&u!==void 0){var P=f._fullLayout._activeSelectionIndex;if(P<_.length)switch(f._fullLayout.selections[P].type){case"rect":b="select";break;case"path":b="lasso";break}}var M=e(l,f,y,u),C={xref:v._id,yref:T._id,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}},A;M.length===1&&(A=M[0]),A&&A.length===5&&b==="select"?(C.type="rect",C.x0=A[0][1],C.y0=A[0][2],C.x1=A[2][1],C.y1=A[2][2]):(C.type="path",v&&T&&a(M,v,T),C.path=r(M),A=null),S(f);for(var h=o.editHelpers,p=(h||{}).modifyItem,k=[],w=0;w<_.length;w++){var R=f._fullLayout.selections[w];if(!R){k[w]=R;continue}if(k[w]=R._input,u!==void 0&&w===f._fullLayout._activeSelectionIndex){var O=C;switch(R.type){case"rect":p("x0",O.x0),p("x1",O.x1),p("y0",O.y0),p("y1",O.y1);break;case"path":p("path",O.path);break}}}return u===void 0?(k.push(C),k):h?h.getUpdateObj():{}}}}}),Hy=Dt((Q,Z)=>{Z.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),wp=Dt(Q=>{var Z=Hy(),c=kn(),g=Ls();Q.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(e){return e}},Q.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(e){return e}},Q.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},Q.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},Q.extractPathCoords=function(t,e,r){var a=[],n=t.match(Z.segmentRE);return n.forEach(function(o){var i=e[o.charAt(0)].drawn;if(i!==void 0){var l=o.substr(1).match(Z.paramRE);if(!(!l||l.lengthu&&(_="X"),_});return x>u&&(b=b.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+f)),y+b})}function S(t,e){e=e||0;var r=0;return e&&t&&(t.type==="category"||t.type==="multicategory")&&(r=(t.r2p(1)-t.r2p(0))*e),r}}),Mw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=ec(),S=Vs(),t=Mg().readPaths,e=wp(),r=e.getPathString,a=_1(),n=Af().FROM_TL;Z.exports=function(l,f,x,y){if(y.selectAll(".shape-label").remove(),!!(x.label.text||x.label.texttemplate)){var v;if(x.label.texttemplate){var T={};if(x.type!=="path"){var u=g.getFromId(l,x.xref),b=g.getFromId(l,x.yref);for(var _ in a){var P=a[_](x,u,b);P!==void 0&&(T[_]=P)}}v=c.texttemplateStringForShapes({data:[T],fallback:x.label.texttemplatefallback,locale:l._fullLayout._d3locale,template:x.label.texttemplate})}else v=x.label.text;var M={"data-index":f},C=x.label.font,A={"data-notex":1},h=y.append("g").attr(M).classed("shape-label",!0),p=h.append("text").attr(A).classed("shape-label-text",!0).text(v),k,w,R,O;if(x.path){var j=r(l,x),V=t(j,l);k=1/0,R=1/0,w=-1/0,O=-1/0;for(var H=0;H=l?v=f-y:v=y-f,-180/Math.PI*Math.atan2(v,T)}function i(l,f,x,y,v,T,u){var b=v.label.textposition,_=v.label.textangle,P=v.label.padding,M=v.type,C=Math.PI/180*T,A=Math.sin(C),h=Math.cos(C),p=v.label.xanchor,k=v.label.yanchor,w,R,O,j;if(M==="line"){b==="start"?(w=l,R=f):b==="end"?(w=x,R=y):(w=(l+x)/2,R=(f+y)/2),p==="auto"&&(b==="start"?_==="auto"?x>l?p="left":xl?p="right":xl?p="right":xl?p="left":x{var c=kn(),g=c.strTranslate,I=up(),S=v0(),t=S.drawMode,e=S.selectMode,r=Jo(),a=hi(),n=j_(),o=n.i000,i=n.i090,l=n.i180,f=n.i270,x=C0(),y=x.clearOutlineControllers,v=Mg(),T=v.pointsOnRectangle,u=v.pointsOnEllipse,b=v.writePaths,_=a0().newShapes,P=a0().createShapeObj,M=Sg(),C=Mw();Z.exports=function k(w,R,O,j){j||(j=0);var V=O.gd;function H(){k(w,R,O,j++),(u(w[0])||O.hasText)&&F({redrawing:!0})}function F(pe){var se={};O.isActiveShape!==void 0&&(O.isActiveShape=!1,se=_(R,O)),O.isActiveSelection!==void 0&&(O.isActiveSelection=!1,se=M(R,O),V._fullLayout._reselect=!0),Object.keys(se).length&&r.call((pe||{}).redrawing?"relayout":"_guiRelayout",V,se)}var U=V._fullLayout,W=U._zoomlayer,q=O.dragmode,J=t(q),lt=e(q);(J||lt)&&(V._fullLayout._outlining=!0),y(V),R.attr("d",b(w));var yt,mt,st,tt,dt;if(!j&&(O.isActiveShape||O.isActiveSelection)){dt=A([],w);var rt=W.append("g").attr("class","outline-controllers");It(rt),fe()}if(J&&O.hasText){var at=W.select(".label-temp"),vt=P(R,O,O.dragmode);C(V,"label-temp",vt,at)}function it(pe){st=+pe.srcElement.getAttribute("data-i"),tt=+pe.srcElement.getAttribute("data-j"),yt[st][tt].moveFn=Y}function Y(pe,se){if(w.length){var Tt=dt[st][tt][1],Lt=dt[st][tt][2],Mt=w[st],ee=Mt.length;if(T(Mt)){var ve=pe,oe=se;if(O.isActiveSelection){var Te=h(Mt,tt);Te[1]===Mt[tt][1]?oe=0:ve=0}for(var He=0;He1&&!(pe.length===2&&pe[1][0]==="Z")&&(tt===0&&(pe[0][0]="M"),w[st]=pe,H(),F())}}function kt(pe,se){if(pe===2){st=+se.srcElement.getAttribute("data-i"),tt=+se.srcElement.getAttribute("data-j");var Tt=w[st];!T(Tt)&&!u(Tt)&&ut()}}function It(pe){yt=[];for(var se=0;se{var c=qr(),g=Jo(),I=kn(),S=Ls(),t=Mg().readPaths,e=Um(),r=Mw(),a=C0().clearOutlineControllers,n=hi(),o=Vs(),i=mu().arrayEditor,l=up(),f=P0(),x=Hy(),y=wp(),v=y.getPathString;Z.exports={draw:T,drawOne:_,eraseActiveShape:p,drawLabel:r};function T(k){var w=k._fullLayout;w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._shapeUpperLayer.selectAll("text").remove(),w._shapeLowerLayer.selectAll("text").remove();for(var R in w._plots){var O=w._plots[R].shapelayer;O&&(O.selectAll("path").remove(),O.selectAll("text").remove())}for(var j=0;jH&&re>F&&!gt.shiftKey?l.getCursor(le/Nt,1-we/re):"move";f(w,Ue),Ge=Ue.split("-")[0]}}function Wr(gt){u(k)||(U&&(dt=Mt(R.xanchor)),W&&(rt=ee(R.yanchor)),R.type==="path"?Pt=R.path:(yt=U?R.x0:Mt(R.x0),mt=W?R.y0:ee(R.y0),st=U?R.x1:Mt(R.x1),tt=W?R.y1:ee(R.y1)),yttt?(at=mt,ft="y0",vt=tt,ut="y1"):(at=tt,ft="y1",vt=mt,ut="y0"),jr(gt),Gt(j,R),Ct(w,R,k),He.moveFn=Ge==="move"?nn:Le,He.altKey=gt.altKey)}function br(){u(k)||(f(w),ne(j),P(w,k,R),g.call("_guiRelayout",k,V.getUpdateObj()))}function Xr(){u(k)||ne(j)}function nn(gt,St){if(R.type==="path"){var Nt=function(we){return we},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function(we){return ve(Mt(we)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(we){return oe(ee(we)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=C(Pt,re,le))}else U?lt("xanchor",R.xanchor=ve(dt+gt)):(lt("x0",R.x0=ve(yt+gt)),lt("x1",R.x1=ve(st+gt))),W?lt("yanchor",R.yanchor=oe(rt+St)):(lt("y0",R.y0=oe(mt+St)),lt("y1",R.y1=oe(tt+St)));w.attr("d",v(k,R)),Gt(j,R),r(k,O,R,qt)}function Le(gt,St){if(J){var Nt=function($n){return $n},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function($n){return ve(Mt($n)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function($n){return oe(ee($n)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=C(Pt,re,le))}else if(q){if(Ge==="resize-over-start-point"){var we=yt+gt,Ue=W?mt-St:mt+St;lt("x0",R.x0=U?we:ve(we)),lt("y0",R.y0=W?Ue:oe(Ue))}else if(Ge==="resize-over-end-point"){var qe=st+gt,or=W?tt-St:tt+St;lt("x1",R.x1=U?qe:ve(qe)),lt("y1",R.y1=W?or:oe(or))}}else{var Sr=function($n){return Ge.indexOf($n)!==-1},Ar=Sr("n"),mr=Sr("s"),Qr=Sr("w"),Hn=Sr("e"),Wn=Ar?at+St:at,Xn=mr?vt+St:vt,Ii=Qr?it+gt:it,oi=Hn?Y+gt:Y;W&&(Ar&&(Wn=at-St),mr&&(Xn=vt-St)),(!W&&Xn-Wn>F||W&&Wn-Xn>F)&&(lt(ft,R[ft]=W?Wn:oe(Wn)),lt(ut,R[ut]=W?Xn:oe(Xn))),oi-Ii>H&&(lt(kt,R[kt]=U?Ii:ve(Ii)),lt(It,R[It]=U?oi:ve(oi)))}w.attr("d",v(k,R)),Gt(j,R),r(k,O,R,qt)}function Gt(gt,St){(U||W)&&Nt();function Nt(){var re=St.type!=="path",le=gt.selectAll(".visual-cue").data([0]),we=1;le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Ue=Mt(U?St.xanchor:I.midRange(re?[St.x0,St.x1]:y.extractPathCoords(St.path,x.paramIsX))),qe=ee(W?St.yanchor:I.midRange(re?[St.y0,St.y1]:y.extractPathCoords(St.path,x.paramIsY)));if(Ue=y.roundPositionForSharpStrokeRendering(Ue,we),qe=y.roundPositionForSharpStrokeRendering(qe,we),U&&W){var or="M"+(Ue-1-we)+","+(qe-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";le.attr("d",or)}else if(U){var Sr="M"+(Ue-1-we)+","+(qe-9-we)+"v18 h2 v-18 Z";le.attr("d",Sr)}else{var Ar="M"+(Ue-9-we)+","+(qe-1-we)+"h18 v2 h-18 Z";le.attr("d",Ar)}}}function ne(gt){gt.selectAll(".visual-cue").remove()}function Ct(gt,St,Nt){var re=St.xref,le=St.yref,we=S.getFromId(Nt,re),Ue=S.getFromId(Nt,le),qe="";re!=="paper"&&!we.autorange&&(qe+=re),le!=="paper"&&!Ue.autorange&&(qe+=le),o.setClipUrl(gt,qe?"clip"+Nt._fullLayout._uid+qe:null,Nt)}}function C(k,w,R){return k.replace(x.segmentRE,function(O){var j=0,V=O.charAt(0),H=x.paramIsX[V],F=x.paramIsY[V],U=x.numParams[V],W=O.substr(1).replace(x.paramRE,function(q){return j>=U||(H[j]?q=w(q):F[j]&&(q=R(q)),j++),q});return V+W})}function A(k,w){if(b(k)){var R=w.node(),O=+R.getAttribute("data-index");if(O>=0){if(O===k._fullLayout._activeShapeIndex){h(k);return}k._fullLayout._activeShapeIndex=O,k._fullLayout._deactivateShape=h,T(k)}}}function h(k){if(b(k)){var w=k._fullLayout._activeShapeIndex;w>=0&&(a(k),delete k._fullLayout._activeShapeIndex,T(k))}}function p(k){if(b(k)){a(k);var w=k._fullLayout._activeShapeIndex,R=(k.layout||{}).shapes||[];if(w{var c=Jo(),g=Kc(),I=Rc(),S=N_(),t=U_().eraseActiveShape,e=kn(),r=e._,a=Z.exports={};a.toImage={name:"toImage",title:function(M){var C=M._context.toImageButtonOptions||{},A=C.format||"png";return A==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:S.camera,click:function(M){var C=M._context.toImageButtonOptions,A={format:C.format||"png"};e.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(h){h in C&&(A[h]=C[h])}),c.call("downloadImage",M,A).then(function(h){e.notifier(r(M,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){e.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},a.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.disk,click:function(M){g.sendDataToCloud(M)}},a.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.pencil,click:function(M){g.sendDataToCloud(M)}},a.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:n},a.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:n},a.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:n},a.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:n},a.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:n},a.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:n},a.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:n},a.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:n},a.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:n},a.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:S.eraseshape,click:t},a.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:n},a.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:n},a.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:n},a.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:n},a.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:n},a.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:n};function n(M,C){var A=C.currentTarget,h=A.getAttribute("data-attr"),p=A.getAttribute("data-val")||!0,k=M._fullLayout,w={},R=I.list(M,null,!0),O=k._cartesianSpikesEnabled,j,V;if(h==="zoom"){var H=p==="in"?.5:2,F=(1+H)/2,U=(1-H)/2,W,q;for(V=0;V{var c=gv(),g=Object.keys(c),I=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],S=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(I),t=[],e=function(r){if(S.indexOf(r._cat||r.name)===-1){var a=r.name,n=(r._cat||r.name).toLowerCase();t.indexOf(a)===-1&&t.push(a),t.indexOf(n)===-1&&t.push(n)}};g.forEach(function(r){e(c[r])}),t.sort(),Z.exports={DRAW_MODES:I,backButtons:S,foreButtons:t}}),E1=Dt((Q,Z)=>{V_(),Z.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),k6=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=E1();Z.exports=function(t,e){var r=t.modebar||{},a=I.newContainer(e,"modebar");function n(i,l){return c.coerce(r,a,S,i,l)}n("orientation"),n("bgcolor",g.addOpacity(e.paper_bgcolor,.5));var o=g.contrast(g.rgb(e.modebar.bgcolor));n("color",g.addOpacity(o,.3)),n("activecolor",g.addOpacity(o,.7)),n("uirevision",e.uirevision),n("add"),n("remove")}}),Vm=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=N_(),t=Wi().version,e=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=r.prototype;a.update=function(i,l){this.graphInfo=i;var f=this.graphInfo._context,x=this.graphInfo._fullLayout,y="modebar-"+x._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",f.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",l=l.reverse());var v=x.modebar,T="#"+y+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=v.bgcolor});var u=!this.hasButtons(l),b=this.hasLogo!==f.displaylogo,_=this.locale!==f.locale;if(this.locale=f.locale,(u||b||_)&&(this.removeAllButtons(),this.updateButtons(l),f.watermark||f.displaylogo)){var P=this.getLogo();f.watermark&&(P.className=P.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(P,this.element.childNodes[0]):this.element.appendChild(P),this.hasLogo=!0}this.updateActiveButton(),I.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},a.updateButtons=function(i){var l=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(f){var x=l.createGroup();f.forEach(function(y){var v=y.name;if(!v)throw new Error("must provide button 'name' in button config");if(l.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");l.buttonsNames.push(v);var T=l.createButton(y);l.buttonElements.push(T),x.appendChild(T)}),l.element.appendChild(x)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var l=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=l.bgcolor,i},a.createButton=function(i){var l=this,f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("rel","tooltip"),f.className="modebar-btn";var x=i.title;x===void 0?x=i.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(f.setAttribute("data-title",x),f.setAttribute("aria-label",x)),i.attr!==void 0&&f.setAttribute("data-attr",i.attr);var y=i.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),f.setAttribute("data-val",y));var v=i.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");f.addEventListener("click",function(u){i.click(l.graphInfo,u),l.updateActiveButton(u.currentTarget)}),f.setAttribute("data-toggle",i.toggle||!1),i.toggle&&c.select(f).classed("active",!0);var T=i.icon;return typeof T=="function"?f.appendChild(T()):f.appendChild(this.createIcon(T||S.question)),f.setAttribute("data-gravity",i.gravity||"n"),f},a.createIcon=function(i){var l=g(i.height)?Number(i.height):i.ascent-i.descent,f="http://www.w3.org/2000/svg",x;if(i.path){x=document.createElementNS(f,"svg"),x.setAttribute("viewBox",[0,0,i.width,l].join(" ")),x.setAttribute("class","icon");var y=document.createElementNS(f,"path");y.setAttribute("d",i.path),i.transform?y.setAttribute("transform",i.transform):i.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),x.appendChild(y)}if(i.svg){var v=e.parseFromString(i.svg,"application/xml");x=v.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},a.updateActiveButton=function(i){var l=this.graphInfo._fullLayout,f=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var y=x.getAttribute("data-val")||!0,v=x.getAttribute("data-attr"),T=x.getAttribute("data-toggle")==="true",u=c.select(x),b=function(M,C){var A=l.modebar,h=M.querySelector(".icon path");h&&(C||M.matches(":hover")?h.style.fill=A.activecolor:h.style.fill=A.color)};if(T){if(v===f){var _=!u.classed("active");u.classed("active",_),b(x,_)}}else{var P=v===null?v:I.nestedProperty(l,v).get();u.classed("active",P===y),b(x,P===y)}})},a.hasButtons=function(i){var l=this.buttons;if(!l||i.length!==l.length)return!1;for(var f=0;f{var c=Rc(),g=Tc(),I=Jo(),S=Fp().isUnifiedHover,t=Vm(),e=gv(),r=V_().DRAW_MODES,a=kn().extendDeep;Z.exports=function(y){var v=y._fullLayout,T=y._context,u=v._modeBar;if(!T.displayModeBar&&!T.watermark){u&&(u.destroy(),delete v._modeBar);return}if(!Array.isArray(T.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(T.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var b=T.modeBarButtons,_;Array.isArray(b)&&b.length?_=x(b):!T.displayModeBar&&T.watermark?_=[]:_=n(y),u?u.update(y,_):v._modeBar=t(y,_)};function n(y){var v=y._fullLayout,T=y._fullData,u=y._context;function b(Y,ft){if(typeof ft=="string"){if(ft.toLowerCase()===Y.toLowerCase())return!0}else{var ut=ft.name,kt=ft._cat||ft.name;if(ut===Y||kt===Y.toLowerCase())return!0}return!1}var _=v.modebar.add;typeof _=="string"&&(_=[_]);var P=v.modebar.remove;typeof P=="string"&&(P=[P]);var M=u.modeBarButtonsToAdd.concat(_.filter(function(Y){for(var ft=0;ft1?(mt=["toggleHover"],st=["resetViews"]):p?(yt=["zoomInGeo","zoomOutGeo"],mt=["hoverClosestGeo"],st=["resetGeo"]):h?(mt=["hoverClosest3d"],st=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(yt=["zoomInMapbox","zoomOutMapbox"],mt=["toggleHover"],st=["resetViewMapbox"]):j?(yt=["zoomInMap","zoomOutMap"],mt=["toggleHover"],st=["resetViewMap"]):k?mt=["hoverClosestPie"]:F?(mt=["hoverClosestCartesian","hoverCompareCartesian"],st=["resetViewSankey"]):mt=["toggleHover"],A&&mt.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(l(T)||W)&&(mt=[]),A&&!U&&(yt=["zoomIn2d","zoomOut2d","autoScale2d"],st[0]!=="resetViews"&&(st=["resetScale2d"])),h?tt=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!U||R?tt=["zoom2d","pan2d"]:O||j||p?tt=["pan2d"]:V&&(tt=["zoom2d"]),i(T)&&tt.push("select2d","lasso2d");var dt=[],rt=function(Y){dt.indexOf(Y)===-1&&mt.indexOf(Y)!==-1&&dt.push(Y)};if(Array.isArray(M)){for(var at=[],vt=0;vt{Z.exports={moduleType:"component",name:"modebar",layoutAttributes:E1(),supplyLayoutDefaults:k6(),manage:Wy()}}),qy=Dt((Q,Z)=>{var c=Af().FROM_BL;Z.exports=function(g,I,S){S===void 0&&(S=c[g.constraintoward||"center"]);var t=[g.r2l(g.range[0]),g.r2l(g.range[1])],e=t[0]+(t[1]-t[0])*S;g.range=g._input.range=[g.l2r(e+(t[0]-e)*I),g.l2r(e+(t[1]-e)*I)],g.setScale()}}),vv=Dt(Q=>{var Z=kn(),c=Y0(),g=Rc().id2name,I=Td(),S=qy(),t=i0(),e=Ca().ALMOST_EQUAL,r=Af().FROM_BL;Q.handleDefaults=function(y,v,T){var u=T.axIds,b=T.axHasImage,_=v._axisConstraintGroups=[],P=v._axisMatchGroups=[],M,C,A,h,p,k,w,R;for(M=0;M_?T.substr(_):u.substr(b))+P}function f(y,v){for(var T=v._size,u=T.h/T.w,b={},_=Object.keys(y),P=0;P<_.length;P++){var M=_[P],C=y[M];if(typeof C=="string"){var A=C.match(/^[xy]*/)[0],h=A.length;C=+C.substr(h);for(var p=A.charAt(0)==="y"?u:1/u,k=0;ke*w&&!V)){for(b=0;bst&&ftyt&&(yt=ft);var kt=(yt-lt)/(2*mt);h/=kt,lt=M.l2r(lt),yt=M.l2r(yt),M.range=M._input.range=W{var Z=qr(),c=Jo(),g=Kc(),I=kn(),S=ec(),t=mv(),e=hi(),r=Vs(),a=lp(),n=Sw(),o=Ls(),i=Af(),l=vv(),f=l.enforce,x=l.clean,y=Y0().doAutoRange,v="start",T="middle",u="end",b=ic().zindexSeparator;Q.layoutStyles=function(F){return I.syncOrAsync([g.doAutoMargin,P],F)};function _(F,U,W){for(var q=0;q=F[1]||J[1]<=F[0])&<[0]U[0])return!0}return!1}function P(F){var U=F._fullLayout,W=U._size,q=W.p,J=o.list(F,"",!0),lt,yt,mt,st,tt,dt;if(U._paperdiv.style({width:F._context.responsive&&U.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":U.width+"px",height:F._context.responsive&&U.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":U.height+"px"}).selectAll(".main-svg").call(r.setSize,U.width,U.height),F._context.setBackground(F,U.paper_bgcolor),Q.drawMainTitle(F),n.manage(F),!U._has("cartesian"))return g.previousPromises(F);function rt(Ct,gt,St){var Nt=Ct._lw/2;if(Ct._id.charAt(0)==="x"){if(gt){if(St==="top")return gt._offset-q-Nt}else return W.t+W.h*(1-(Ct.position||0))+Nt%1;return gt._offset+gt._length+q+Nt}if(gt){if(St==="right")return gt._offset+gt._length+q+Nt}else return W.l+W.w*(Ct.position||0)+Nt%1;return gt._offset-q-Nt}for(lt=0;lt0){w(F,lt,tt,st),mt.attr({x:yt,y:lt,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,lt);var dt=(U.text.match(S.BR_TAG_ALL)||[]).length;if(dt){var rt=i.LINE_SPACING*dt+i.MID_SHIFT;U.y===0&&(rt=-rt),mt.selectAll(".line").each(function(){var ft=+this.getAttribute("dy").slice(0,-2)-rt+"em";this.setAttribute("dy",ft)})}var at=Z.select(F).selectAll(".gtitle-subtitle");if(at.node()){var vt=mt.node().getBBox(),it=vt.y+vt.height,Y=it+a.SUBTITLE_PADDING_EM*U.subtitle.font.size;at.attr({x:yt,y:Y,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,Y)}}}};function h(F,U,W,q,J){var lt=U.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,yt=I.isTopAnchor(U)?q:q-J,mt=W==="b"?lt-yt:yt;return I.isTopAnchor(U)&&W==="t"||I.isBottomAnchor(U)&&W==="b"?!1:mt.5?"t":"b",yt=F._fullLayout.margin[lt],mt=0;return U.yref==="paper"?mt=W+U.pad.t+U.pad.b:U.yref==="container"&&(mt=p(lt,q,J,F._fullLayout.height,W)+U.pad.t+U.pad.b),mt>yt?mt:0}function w(F,U,W,q){var J="title.automargin",lt=F._fullLayout.title,yt=lt.y>.5?"t":"b",mt={x:lt.x,y:lt.y,t:0,b:0},st={};lt.yref==="paper"&&h(F,lt,yt,U,q)?mt[yt]=W:lt.yref==="container"&&(st[yt]=W,F._fullLayout._reservedMargin[J]=st),g.allowAutoMargin(F,J),g.autoMargin(F,J,mt)}function R(F,U){var W=F.title,q=F._size,J=0;switch(U===v?J=W.pad.l:U===u&&(J=-W.pad.r),W.xref){case"paper":return q.l+q.w*W.x+J;case"container":default:return F.width*W.x+J}}function O(F,U){var W=F.title,q=F._size,J=0;if(U==="0em"||!U?J=-W.pad.b:U===i.CAP_SHIFT+"em"&&(J=W.pad.t),W.y==="auto")return q.t/2;switch(W.yref){case"paper":return q.t+q.h-q.h*W.y+J;case"container":default:return F.height-F.height*W.y+J}}function j(F){return F==="top"?i.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function V(F){var U=F.title,W=T;return I.isRightAnchor(U)?W=u:I.isLeftAnchor(U)&&(W=v),W}function H(F){var U=F.title,W="0em";return I.isTopAnchor(U)?W=i.CAP_SHIFT+"em":I.isMiddleAnchor(U)&&(W=i.MID_SHIFT+"em"),W}Q.doTraceStyle=function(F){var U=F.calcdata,W=[],q;for(q=0;q{var c=Mg().readPaths,g=Um(),I=C0().clearOutlineControllers,S=hi(),t=Vs(),e=mu().arrayEditor,r=wp(),a=r.getPathString;Z.exports={draw:n,drawOne:i,activateLastSelection:x};function n(v){var T=v._fullLayout;I(v),T._selectionLayer.selectAll("path").remove();for(var u in T._plots){var b=T._plots[u].selectionLayer;b&&b.selectAll("path").remove()}for(var _=0;_=0;V--){var H=M.append("path").attr(A).style("opacity",V?.1:h).call(S.stroke,k).call(S.fill,p).call(t.dashLine,V?"solid":R,V?4+w:w);if(l(H,v,b),O){var F=e(v.layout,"selections",b);H.style({cursor:"move"});var U={element:H.node(),plotinfo:_,gd:v,editHelpers:F,isActiveSelection:!0},W=c(C,v);g(W,H,U)}else H.style("pointer-events",V?"all":"none");j[V]=H}var q=j[0],J=j[1];J.node().addEventListener("click",function(){return f(v,q)})}}function l(v,T,u){var b=u.xref+u.yref;t.setClipUrl(v,"clip"+T._fullLayout._uid+b,T)}function f(v,T){if(o(v)){var u=T.node(),b=+u.getAttribute("data-index");if(b>=0){if(b===v._fullLayout._activeSelectionIndex){y(v);return}v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=y,n(v)}}}function x(v){if(o(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=y,n(v)}}function y(v){if(o(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(I(v),delete v._fullLayout._activeSelectionIndex,n(v))}}}),yv=Dt((Q,Z)=>{function c(){var g,I=0,S=!1;function t(e,r){return g.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),g}return g={list:[],segmentId:function(){return I++},checkIntersection:function(e,r){return t("check",{seg1:e,seg2:r})},segmentChop:function(e,r){return t("div_seg",{seg:e,pt:r}),t("chop",{seg:e,pt:r})},statusRemove:function(e){return t("pop_seg",{seg:e})},segmentUpdate:function(e){return t("seg_update",{seg:e})},segmentNew:function(e,r){return t("new_seg",{seg:e,primary:r})},segmentRemove:function(e){return t("rem_seg",{seg:e})},tempStatus:function(e,r,a){return t("temp_status",{seg:e,above:r,below:a})},rewind:function(e){return t("rewind",{seg:e})},status:function(e,r,a){return t("status",{seg:e,above:r,below:a})},vert:function(e){return e===S?g:(S=e,t("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),t("log",{txt:e})},reset:function(){return t("reset")},selected:function(e){return t("selected",{segs:e})},chainStart:function(e){return t("chain_start",{seg:e})},chainRemoveHead:function(e,r){return t("chain_rem_head",{index:e,pt:r})},chainRemoveTail:function(e,r){return t("chain_rem_tail",{index:e,pt:r})},chainNew:function(e,r){return t("chain_new",{pt1:e,pt2:r})},chainMatch:function(e){return t("chain_match",{index:e})},chainClose:function(e){return t("chain_close",{index:e})},chainAddHead:function(e,r){return t("chain_add_head",{index:e,pt:r})},chainAddTail:function(e,r){return t("chain_add_tail",{index:e,pt:r})},chainConnect:function(e,r){return t("chain_con",{index1:e,index2:r})},chainReverse:function(e){return t("chain_rev",{index:e})},chainJoin:function(e,r){return t("chain_join",{index1:e,index2:r})},done:function(){return t("done")}},g}Z.exports=c}),T6=Dt((Q,Z)=>{function c(g){typeof g!="number"&&(g=1e-10);var I={epsilon:function(S){return typeof S=="number"&&(g=S),g},pointAboveOrOnLine:function(S,t,e){var r=t[0],a=t[1],n=e[0],o=e[1],i=S[0],l=S[1];return(n-r)*(l-a)-(o-a)*(i-r)>=-g},pointBetween:function(S,t,e){var r=S[1]-t[1],a=e[0]-t[0],n=S[0]-t[0],o=e[1]-t[1],i=n*a+r*o;if(i-g)},pointsSameX:function(S,t){return Math.abs(S[0]-t[0])g!=n-r>g&&(a-l)*(r-f)/(n-f)+l-e>g&&(o=!o),a=l,n=f}return o}};return I}Z.exports=c}),pm=Dt((Q,Z)=>{var c={create:function(){var g={root:{root:!0,next:null},exists:function(I){return!(I===null||I===g.root)},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(I,S){for(var t=g.root,e=g.root.next;e!==null;){if(S(e)){I.prev=e.prev,I.next=e,e.prev.next=I,e.prev=I;return}t=e,e=e.next}t.next=I,I.prev=t,I.next=null},findTransition:function(I){for(var S=g.root,t=g.root.next;t!==null&&!I(t);)S=t,t=t.next;return{before:S===g.root?null:S,after:t,insert:function(e){return e.prev=S,e.next=t,S.next=e,t!==null&&(t.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}};Z.exports=c}),$y=Dt((Q,Z)=>{var c=pm();function g(I,S,t){function e(T,u){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:null,below:null},otherFill:null}}function r(T,u,b){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=c.create();function n(T,u,b,_,P,M){var C=S.pointsCompare(u,P);return C!==0?C:S.pointsSame(b,M)?0:T!==_?T?1:-1:S.pointAboveOrOnLine(b,_?P:M,_?M:P)?1:-1}function o(T,u){a.insertBefore(T,function(b){var _=n(T.isStart,T.pt,u,b.isStart,b.pt,b.other.pt);return _<0})}function i(T,u){var b=c.node({isStart:!0,pt:T.start,seg:T,primary:u,other:null,status:null});return o(b,T.end),b}function l(T,u,b){var _=c.node({isStart:!1,pt:u.end,seg:u,primary:b,other:T,status:null});T.other=_,o(_,T.pt)}function f(T,u){var b=i(T,u);return l(b,T,u),b}function x(T,u){t&&t.segmentChop(T.seg,u),T.other.remove(),T.seg.end=u,T.other.pt=u,o(T.other,T.pt)}function y(T,u){var b=r(u,T.seg.end,T.seg);return x(T,u),f(b,T.primary)}function v(T,u){var b=c.create();function _(H,F){var U=H.seg.start,W=H.seg.end,q=F.seg.start,J=F.seg.end;return S.pointsCollinear(U,q,J)?S.pointsCollinear(W,q,J)||S.pointAboveOrOnLine(W,q,J)?1:-1:S.pointAboveOrOnLine(U,q,J)?1:-1}function P(H){return b.findTransition(function(F){var U=_(H,F.ev);return U>0})}function M(H,F){var U=H.seg,W=F.seg,q=U.start,J=U.end,lt=W.start,yt=W.end;t&&t.checkIntersection(U,W);var mt=S.linesIntersect(q,J,lt,yt);if(mt===!1){if(!S.pointsCollinear(q,J,lt)||S.pointsSame(q,yt)||S.pointsSame(J,lt))return!1;var st=S.pointsSame(q,lt),tt=S.pointsSame(J,yt);if(st&&tt)return F;var dt=!st&&S.pointBetween(q,lt,yt),rt=!tt&&S.pointBetween(J,lt,yt);if(st)return rt?y(F,J):y(H,yt),F;dt&&(tt||(rt?y(F,J):y(H,yt)),y(F,q))}else mt.alongA===0&&(mt.alongB===-1?y(H,lt):mt.alongB===0?y(H,mt.pt):mt.alongB===1&&y(H,yt)),mt.alongB===0&&(mt.alongA===-1?y(F,q):mt.alongA===0?y(F,mt.pt):mt.alongA===1&&y(F,J));return!1}for(var C=[];!a.isEmpty();){var A=a.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let H=function(){if(p){var F=M(A,p);if(F)return F}return k?M(A,k):!1};t&&t.segmentNew(A.seg,A.primary);var h=P(A),p=h.before?h.before.ev:null,k=h.after?h.after.ev:null;t&&t.tempStatus(A.seg,p?p.seg:!1,k?k.seg:!1);var w=H();if(w){if(I){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,R&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(w.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){t&&t.rewind(A.seg);continue}if(I){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,k?A.seg.myFill.below=k.seg.myFill.above:A.seg.myFill.below=T,R?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;k?A.primary===k.primary?O=k.seg.otherFill.above:O=k.seg.myFill.above:O=A.primary?u:T,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,p?p.seg:!1,k?k.seg:!1),A.other.status=h.insert(c.node({ev:A}))}else{var j=A.status;if(j===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(j.prev)&&b.exists(j.next)&&M(j.prev.ev,j.next.ev),t&&t.statusRemove(j.ev.seg),j.remove(),!A.primary){var V=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=V}C.push(A.seg)}a.getHead().remove()}return t&&t.done(),C}return I?{addRegion:function(T){for(var u,b=T[T.length-1],_=0;_{function c(g,I,S){var t=[],e=[];return g.forEach(function(r){var a=r.start,n=r.end;if(I.pointsSame(a,n)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}S&&S.chainStart(r);var o={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},l=o;function f(O,j,V){return l.index=O,l.matches_head=j,l.matches_pt1=V,l===o?(l=i,!1):(l=null,!0)}for(var x=0;x{function c(I,S,t){var e=[];return I.forEach(function(r){var a=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);S[a]!==0&&e.push({id:t?t.segmentId():-1,start:r.start,end:r.end,myFill:{above:S[a]===1,below:S[a]===2},otherFill:null})}),t&&t.selected(e),e}var g={union:function(I,S){return c(I,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],S)},intersect:function(I,S){return c(I,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],S)},difference:function(I,S){return c(I,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],S)},differenceRev:function(I,S){return c(I,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],S)},xor:function(I,S){return c(I,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],S)}};Z.exports=g}),Zy=Dt((Q,Z)=>{var c={toPolygon:function(g,I){function S(r){if(r.length<=0)return g.segments({inverted:!1,regions:[]});function a(i){var l=i.slice(0,i.length-1);return g.segments({inverted:!1,regions:[l]})}for(var n=a(r[0]),o=1;o{var c=yv(),g=T6(),I=$y(),S=Cw(),t=H_(),e=Zy(),r=!1,a=g(),n;n={buildLog:function(i){return i===!0?r=c():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return a.epsilon(i)},segments:function(i){var l=I(!0,a,r);return i.regions.forEach(l.addRegion),{segments:l.calculate(i.inverted),inverted:i.inverted}},combine:function(i,l){var f=I(!1,a,r);return{combined:f.calculate(i.segments,i.inverted,l.segments,l.inverted),inverted1:i.inverted,inverted2:l.inverted}},selectUnion:function(i){return{segments:t.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:t.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:t.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:t.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:t.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:S(i.segments,a,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return e.toPolygon(n,i)},polygonToGeoJSON:function(i){return e.fromPolygon(n,a,i)},union:function(i,l){return o(i,l,n.selectUnion)},intersect:function(i,l){return o(i,l,n.selectIntersect)},difference:function(i,l){return o(i,l,n.selectDifference)},differenceRev:function(i,l){return o(i,l,n.selectDifferenceRev)},xor:function(i,l){return o(i,l,n.selectXor)}};function o(i,l,f){var x=n.segments(i),y=n.segments(l),v=n.combine(x,y),T=f(v);return n.polygon(T)}typeof window=="object"&&(window.PolyBool=n),Z.exports=n}),Gy=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=c[0],e=c[1],r=!1;I===void 0&&(I=0),S===void 0&&(S=g.length);for(var a=S-I,n=0,o=a-1;ne!=x>e&&t<(f-i)*(e-l)/(x-l)+i;y&&(r=!r)}return r}}),mm=Dt((Q,Z)=>{var c=M_().dot,g=Ca().BADNUM,I=Z.exports={};I.tester=function(S){var t=S.slice(),e=t[0][0],r=e,a=t[0][1],n=a,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;or||_===g||_n||u&&l(T))}function x(T,u){var b=T[0],_=T[1];if(b===g||br||_===g||_n)return!1;var P=t.length,M=t[0][0],C=t[0][1],A=0,h,p,k,w,R;for(h=1;hMath.max(p,M)||_>Math.max(k,C)))if(_o||Math.abs(c(x,l))>r)return!0;return!1},I.filter=function(S,t){var e=[S[0]],r=0,a=0;function n(i){S.push(i);var l=e.length,f=r;e.splice(a+1);for(var x=f+1;x1){var o=S.pop();n(o)}return{addPt:n,raw:S,filtered:e}}}),Yy=Dt((Q,Z)=>{Z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),q_=Dt((Q,Z)=>{var c=W_(),g=Gy(),I=Jo(),S=Vs().dashStyle,t=hi(),e=tf(),r=Fp().makeEventData,a=v0(),n=a.freeMode,o=a.rectMode,i=a.drawMode,l=a.openMode,f=a.selectMode,x=wp(),y=Hy(),v=Um(),T=C0().clearOutline,u=Mg(),b=u.handleEllipse,_=u.readPaths,P=a0().newShapes,M=Sg(),C=Ew().activateLastSelection,A=kn(),h=A.sorterAsc,p=mm(),k=C_(),w=Rc().getFromId,R=mv(),O=y0().redrawReglTraces,j=Yy(),V=j.MINSELECT,H=p.filter,F=p.tester,U=Vy(),W=U.p2r,q=U.axValue,J=U.getTransform;function lt(Gt){return Gt.subplot!==void 0}function yt(Gt,ne,Ct,gt,St){var Nt=!lt(gt),re=n(St),le=o(St),we=l(St),Ue=i(St),qe=f(St),or=St==="drawline",Sr=St==="drawcircle",Ar=or||Sr,mr=gt.gd,Qr=mr._fullLayout,Hn=qe&&Qr.newselection.mode==="immediate"&&Nt,Wn=Qr._zoomlayer,Xn=gt.element.getBoundingClientRect(),Ii=gt.plotinfo,oi=J(Ii),$n=ne-Xn.left,sa=Ct-Xn.top;Qr._calcInverseTransform(mr);var Zi=A.apply3DTransform(Qr._invTransform)($n,sa);$n=Zi[0],sa=Zi[1];var We=Qr._invScaleX,nr=Qr._invScaleY,fr=$n,_r=sa,tn="M"+$n+","+sa,Cn=gt.xaxes[0],Tn=gt.yaxes[0],Mn=Cn._length,fi=Tn._length,ki=Gt.altKey&&!(i(St)&&we),Oi,ji,Xi,ci,za,Wa,ze;at(Gt,mr,gt),re&&(Oi=H([[$n,sa]],j.BENDPX));var Ie=Wn.selectAll("path.select-outline-"+Ii.id).data([1]),Rr=Ue?Qr.newshape:Qr.newselection;Ue&&(gt.hasText=Rr.label.text||Rr.label.texttemplate);var $r=Ue&&!we?Rr.fillcolor:"rgba(0,0,0,0)",Gr=Rr.line.color||(Nt?t.contrast(mr._fullLayout.plot_bgcolor):"#7f7f7f");Ie.enter().append("path").attr("class","select-outline select-outline-"+Ii.id).style({opacity:Ue?Rr.opacity/2:1,"stroke-dasharray":S(Rr.line.dash,Rr.line.width),"stroke-width":Rr.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,Gr).call(t.fill,$r).attr("fill-rule","evenodd").classed("cursor-move",!!Ue).attr("transform",oi).attr("d",tn+"Z");var Br=Wn.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",oi).attr("d","M0,0Z");if(Ue&>.hasText){var Yr=Wn.select(".label-temp");Yr.empty()&&(Yr=Wn.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pn=Qr._uid+j.SELECTID,on=[],Ce=ut(mr,gt.xaxes,gt.yaxes,gt.subplot);Hn&&!Gt.shiftKey&&(gt._clearSubplotSelections=function(){if(Nt){var Hr=Cn._id,_n=Tn._id;oe(mr,Hr,_n,Ce);for(var Fn=(mr.layout||{}).selections||[],Qn=[],Pn=!1,En=0;En=0){mr._fullLayout._deactivateShape(mr);return}if(!Ue){var Fn=Qr.clickmode;k.done(pn).then(function(){if(k.clear(pn),Hr===2){for(Ie.remove(),za=0;za-1&&mt(_n,mr,gt.xaxes,gt.yaxes,gt.subplot,gt,Ie),Fn==="event"&&nn(mr,void 0);e.click(mr,_n,Ii.id)}).catch(A.error)}},gt.doneFn=function(){Br.remove(),k.done(pn).then(function(){k.clear(pn),!Hn&&ci&>.selectionDefs&&(ci.subtract=ki,gt.selectionDefs.push(ci),gt.mergedPolygons.length=0,[].push.apply(gt.mergedPolygons,Xi)),(Hn||Ue)&&Y(gt,Hn),gt.doneFnCompleted&>.doneFnCompleted(on),qe&&nn(mr,ze)}).catch(A.error)}}function mt(Gt,ne,Ct,gt,St,Nt,re){var le=ne._hoverdata,we=ne._fullLayout,Ue=we.clickmode,qe=Ue.indexOf("event")>-1,or=[],Sr,Ar,mr,Qr,Hn,Wn,Xn,Ii,oi,$n;if(It(le)){at(Gt,ne,Nt),Sr=ut(ne,Ct,gt,St);var sa=Pt(le,Sr),Zi=sa.pointNumbers.length>0;if(Zi?Wt(Sr,sa):Jt(Sr)&&(Xn=qt(sa))){for(re&&re.remove(),$n=0;$n=0}function it(Gt){return Gt._fullLayout._activeSelectionIndex>=0}function Y(Gt,ne){var Ct=Gt.dragmode,gt=Gt.plotinfo,St=Gt.gd;vt(St)&&St._fullLayout._deactivateShape(St),it(St)&&St._fullLayout._deactivateSelection(St);var Nt=St._fullLayout,re=Nt._zoomlayer,le=i(Ct),we=f(Ct);if(le||we){var Ue=re.selectAll(".select-outline-"+gt.id);if(Ue&&St._fullLayout._outlining){var qe;le&&(qe=P(Ue,Gt)),qe&&I.call("_guiRelayout",St,{shapes:qe});var or;we&&!lt(Gt)&&(or=M(Ue,Gt)),or&&(St._fullLayout._noEmitSelectedAtStart=!0,I.call("_guiRelayout",St,{selections:or}).then(function(){ne&&C(St)})),St._fullLayout._outlining=!1}}gt.selection={},gt.selection.selectionDefs=Gt.selectionDefs=[],gt.selection.mergedPolygons=Gt.mergedPolygons=[]}function ft(Gt){return Gt._id}function ut(Gt,ne,Ct,gt){if(!Gt.calcdata)return[];var St=[],Nt=ne.map(ft),re=Ct.map(ft),le,we,Ue;for(Ue=0;Ue0,Nt=St?gt[0]:Ct;return ne.selectedpoints?ne.selectedpoints.indexOf(Nt)>-1:!1}function Wt(Gt,ne){var Ct=[],gt,St,Nt,re;for(re=0;re0&&Ct.push(gt);if(Ct.length===1&&(Nt=Ct[0]===ne.searchInfo,Nt&&(St=ne.searchInfo.cd[0].trace,St.selectedpoints.length===ne.pointNumbers.length))){for(re=0;re1||(ne+=gt.selectedpoints.length,ne>1)))return!1;return ne===1}function ge(Gt,ne,Ct){var gt;for(gt=0;gt-1&≠if(!re&&ne){var Hr=He(Gt,!0);if(Hr.length){var _n=Hr[0].xref,Fn=Hr[0].yref;if(_n&&Fn){var Qn=ur(Hr),Pn=Wr([w(Gt,_n,"x"),w(Gt,Fn,"y")]);Pn(on,Qn)}}Gt._fullLayout._noEmitSelectedAtStart?Gt._fullLayout._noEmitSelectedAtStart=!1:dr&&nn(Gt,on),Sr._reselect=!1}if(!re&&Sr._deselect){var En=Sr._deselect;le=En.xref,we=En.yref,ve(le,we,qe)||oe(Gt,le,we,gt),dr&&(on.points.length?nn(Gt,on):Le(Gt)),Sr._deselect=!1}return{eventData:on,selectionTesters:Ct}}function ee(Gt){var ne=Gt.calcdata;if(ne)for(var Ct=0;Ct{Z.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}]}),Ky=Dt((Q,Z)=>{Z.exports={axisRefDescription:function(c,g,I){return["If set to a",c,"axis id (e.g. *"+c+"* or","*"+c+"2*), the `"+c+"` position refers to a",c,"coordinate. If set to *paper*, the `"+c+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+I+"). If set to a",c,"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",g,"of the domain of that axis: e.g.,","*"+c+"2 domain* refers to the domain of the second",c," axis and a",c,"position of 0.5 refers to the","point between the",g,"and the",I,"of the domain of the","second",c,"axis."].join(" ")}}}),gm=Dt((Q,Z)=>{var c=$_(),g=da(),I=ic(),S=mu().templatedArray;Ky(),Z.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({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:c.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:c.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",I.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",I.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",I.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",I.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:g({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),vm=Dt((Q,Z)=>{Z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),I0=Dt((Q,Z)=>{Z.exports=function(c){return{valType:"color",editType:"style",anim:!0}}}),ef=Dt((Q,Z)=>{var c=dh().axisHoverFormat,{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=da(),r=kd().dash,a=kd().pattern,n=Vs(),o=vm(),i=Ia().extendFlat,l=I0();function f(v){return{valType:"any",dflt:0,editType:"calc"}}function x(v){return{valType:"any",editType:"calc"}}function y(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Z.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:f(),yperiod:f(),xperiod0:x(),yperiod0:x(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:c("x"),yhoverformat:c("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:I(),texttemplatefallback:S({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:g({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},r,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:l(!0),fillgradient:i({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:a,marker:i({symbol:{valType:"enumerated",values:n.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("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"},t("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:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),Z_=Dt((Q,Z)=>{var c=gm(),g=ef().line,I=kd().dash,S=Ia().extendFlat,t=Yc().overrideAll,e=mu().templatedArray;Ky(),Z.exports=t(e("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:S({},c.xref,{}),yref:S({},c.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:g.color,width:S({},g.width,{min:1,dflt:1}),dash:S({},I,{dflt:"dot"})}}),"arraydraw","from-root")}),A6=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Z_(),t=wp();Z.exports=function(r,a){I(r,a,{name:"selections",handleItemDefaults:e});for(var n=a.selections,o=0;o{Z.exports=function(c,g,I){I("newselection.mode");var S=I("newselection.line.width");S&&(I("newselection.line.color"),I("newselection.line.dash")),I("activeselection.fillcolor"),I("activeselection.opacity")}}),Eg=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Rc();Z.exports=function(S){return function(t,e){var r=t[S];if(Array.isArray(r))for(var a=c.subplotsRegistry.cartesian,n=a.idRegex,o=e._subplots,i=o.xaxis,l=o.yaxis,f=o.cartesian,x=e._has("cartesian"),y=0;y{var c=Ew(),g=q_();Z.exports={moduleType:"component",name:"selections",layoutAttributes:Z_(),supplyLayoutDefaults:A6(),supplyDrawNewSelectionDefaults:X0(),includeBasePlot:Eg()("selections"),draw:c.draw,drawOne:c.drawOne,reselect:g.reselect,prepSelect:g.prepSelect,clearOutline:g.clearOutline,clearSelectionsCache:g.clearSelectionsCache,selectOnClick:g.selectOnClick}}),C1=Dt((Q,Z)=>{var c=qr(),g=kn(),I=g.numberFormat,S=ro(),t=z_(),e=Jo(),r=g.strTranslate,a=ec(),n=hi(),o=Vs(),i=tf(),l=Ls(),f=P0(),x=up(),y=v0(),v=y.selectingOrDrawing,T=y.freeMode,u=Af().FROM_TL,b=mv(),_=y0().redrawReglTraces,P=Kc(),M=Rc().getFromId,C=vf().prepSelect,A=vf().clearOutline,h=vf().selectOnClick,p=qy(),k=ic(),w=k.MINDRAG,R=k.MINZOOM,O=!0;function j(kt,It,Pt,qt,Wt,Jt,ge,fe){var pe=kt._fullLayout._zoomlayer,se=ge+fe==="nsew",Tt=(ge+fe).length===1,Lt,Mt,ee,ve,oe,Te,He,Ge,cr,ur,jr,Wr,br,Xr,nn,Le,Gt,ne,Ct,gt,St,Nt,re;Pt+=It.yaxis._shift;function le(){if(Lt=It.xaxis,Mt=It.yaxis,cr=Lt._length,ur=Mt._length,He=Lt._offset,Ge=Mt._offset,ee={},ee[Lt._id]=Lt,ve={},ve[Mt._id]=Mt,ge&&fe)for(var Ie=It.overlays,Rr=0;Rr=0){$r._fullLayout._deactivateShape($r);return}var Gr=$r._fullLayout.clickmode;if(dt($r),Ie===2&&!Tt&&ji(),se)Gr.indexOf("select")>-1&&h(Rr,$r,oe,Te,It.id,qe),Gr.indexOf("event")>-1&&i.click($r,Rr,It.id);else if(Ie===1&&Tt){var Br=ge?Mt:Lt,Yr=ge==="s"||fe==="w"?0:1,pn=Br._name+".range["+Yr+"]",on=U(Br,Yr),Ce="left",dr="middle";if(Br.fixedrange)return;ge?(dr=ge==="n"?"top":"bottom",Br.side==="right"&&(Ce="right")):fe==="e"&&(Ce="right"),$r._context.showAxisRangeEntryBoxes&&c.select(Ue).call(a.makeEditable,{gd:$r,immediate:!0,background:$r._fullLayout.paper_bgcolor,text:String(on),fill:Br.tickfont?Br.tickfont.color:"#444",horizontalAlign:Ce,verticalAlign:dr}).on("edit",function(Hr){var _n=Br.d2r(Hr);_n!==void 0&&e.call("_guiRelayout",$r,pn,_n)})}}x.init(qe);var Ar,mr,Qr,Hn,Wn,Xn,Ii,oi,$n,sa;function Zi(Ie,Rr,$r){var Gr=Ue.getBoundingClientRect();Ar=Rr-Gr.left,mr=$r-Gr.top,kt._fullLayout._calcInverseTransform(kt);var Br=g.apply3DTransform(kt._fullLayout._invTransform)(Ar,mr);Ar=Br[0],mr=Br[1],Qr={l:Ar,r:Ar,w:0,t:mr,b:mr,h:0},Hn=kt._hmpixcount?kt._hmlumcount/kt._hmpixcount:S(kt._fullLayout.plot_bgcolor).getLuminance(),Wn="M0,0H"+cr+"V"+ur+"H0V0",Xn=!1,Ii="xy",sa=!1,oi=yt(pe,Hn,He,Ge,Wn),$n=mt(pe,He,Ge)}function We(Ie,Rr){if(kt._transitioningWithDuration)return!1;var $r=Math.max(0,Math.min(cr,Nt*Ie+Ar)),Gr=Math.max(0,Math.min(ur,re*Rr+mr)),Br=Math.abs($r-Ar),Yr=Math.abs(Gr-mr);Qr.l=Math.min(Ar,$r),Qr.r=Math.max(Ar,$r),Qr.t=Math.min(mr,Gr),Qr.b=Math.max(mr,Gr);function pn(){Ii="",Qr.r=Qr.l,Qr.t=Qr.b,$n.attr("d","M0,0Z")}if(jr.isSubplotConstrained)Br>R||Yr>R?(Ii="xy",Br/cr>Yr/ur?(Yr=Br*ur/cr,mr>Gr?Qr.t=mr-Yr:Qr.b=mr+Yr):(Br=Yr*cr/ur,Ar>$r?Qr.l=Ar-Br:Qr.r=Ar+Br),$n.attr("d",it(Qr))):pn();else if(Wr.isSubplotConstrained)if(Br>R||Yr>R){Ii="xy";var on=Math.min(Qr.l/cr,(ur-Qr.b)/ur),Ce=Math.max(Qr.r/cr,(ur-Qr.t)/ur);Qr.l=on*cr,Qr.r=Ce*cr,Qr.b=(1-on)*ur,Qr.t=(1-Ce)*ur,$n.attr("d",it(Qr))}else pn();else!Xr||Yr0){var Hr;if(Wr.isSubplotConstrained||!br&&Xr.length===1){for(Hr=0;Hr1&&(pn.maxallowed!==void 0&&Le===(pn.range[0]1&&(on.maxallowed!==void 0&&Gt===(on.range[0]=0?Math.min(kt,.9):1/(1/Math.max(kt,-.3)+3.222))}function lt(kt,It,Pt){return kt?kt==="nsew"?Pt?"":It==="pan"?"move":"crosshair":kt.toLowerCase()+"-resize":"pointer"}function yt(kt,It,Pt,qt,Wt){return kt.append("path").attr("class","zoombox").style({fill:It>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Pt,qt)).attr("d",Wt+"Z")}function mt(kt,It,Pt){return kt.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(It,Pt)).attr("d","M0,0Z")}function st(kt,It,Pt,qt,Wt,Jt){kt.attr("d",qt+"M"+Pt.l+","+Pt.t+"v"+Pt.h+"h"+Pt.w+"v-"+Pt.h+"h-"+Pt.w+"Z"),tt(kt,It,Wt,Jt)}function tt(kt,It,Pt,qt){Pt||(kt.transition().style("fill",qt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),It.transition().style("opacity",1).duration(200))}function dt(kt){c.select(kt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rt(kt){O&&kt.data&&kt._context.showTips&&(g.notifier(g._(kt,"Double-click to zoom back out"),"long"),O=!1)}function at(kt,It){return"M"+(kt.l-.5)+","+(It-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(kt.r+.5)+","+(It-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function vt(kt,It){return"M"+(It-R-.5)+","+(kt.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(It-R-.5)+","+(kt.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function it(kt){var It=Math.floor(Math.min(kt.b-kt.t,kt.r-kt.l,R)/2);return"M"+(kt.l-3.5)+","+(kt.t-.5+It)+"h3v"+-It+"h"+It+"v-3h-"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.t-.5+It)+"h-3v"+-It+"h"+-It+"v-3h"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.b+.5-It)+"h-3v"+It+"h"+-It+"v3h"+(It+3)+"ZM"+(kt.l-3.5)+","+(kt.b+.5-It)+"h3v"+It+"h"+It+"v3h-"+(It+3)+"Z"}function Y(kt,It,Pt,qt,Wt){for(var Jt=!1,ge={},fe={},pe,se,Tt,Lt,Mt=(Wt||{}).xaHash,ee=(Wt||{}).yaHash,ve=0;ve{var Z=qr(),c=tf(),g=up(),I=P0(),S=C1().makeDragBox,t=ic().DRAGGERSIZE;Q.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot){Z.select(e).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var a=Object.keys(r._plots||{}).sort(function(o,i){if((r._plots[o].mainplot&&!0)===(r._plots[i].mainplot&&!0)){var l=o.split("y"),f=i.split("y");return l[0]===f[0]?Number(l[1]||1)-Number(f[1]||1):Number(l[0]||1)-Number(f[0]||1)}return r._plots[o].mainplot?1:-1});a.forEach(function(o){var i=r._plots[o],l=i.xaxis,f=i.yaxis;if(!i.mainplot){var x=S(e,i,l._offset,f._offset,l._length,f._length,"ns","ew");x.onmousemove=function(T){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===o&&e._fullLayout._plots[o]&&c.hover(e,T,o)},c.hover(e,T,o),e._fullLayout._lasthover=x,e._fullLayout._hoversubplot=o},x.onmouseout=function(T){e._dragging||(e._fullLayout._hoversubplot=null,g.unhover(e,T))},e._context.showAxisDragHandles&&(S(e,i,l._offset-t,f._offset-t,t,t,"n","w"),S(e,i,l._offset+l._length,f._offset-t,t,t,"n","e"),S(e,i,l._offset-t,f._offset+f._length,t,t,"s","w"),S(e,i,l._offset+l._length,f._offset+f._length,t,t,"s","e"))}if(e._context.showAxisDragHandles){if(o===l._mainSubplot){var y=l._mainLinePosition;l.side==="top"&&(y-=t),S(e,i,l._offset+l._length*.1,y,l._length*.8,t,"","ew"),S(e,i,l._offset,y,l._length*.1,t,"","w"),S(e,i,l._offset+l._length*.9,y,l._length*.1,t,"","e")}if(o===f._mainSubplot){var v=f._mainLinePosition;f.side!=="right"&&(v-=t),S(e,i,v,f._offset+f._length*.1,t,f._length*.8,"ns",""),S(e,i,v,f._offset+f._length*.9,t,f._length*.1,"s",""),S(e,i,v,f._offset,t,f._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(o){o.target=e._fullLayout._lasthover,c.hover(e,o,r._hoversubplot)},n.onclick=function(o){o.target=e._fullLayout._lasthover,c.click(e,o)},n.onmousedown=function(o){e._fullLayout._lasthover.onmousedown(o)},Q.updateFx(e)}},Q.updateFx=function(e){var r=e._fullLayout,a=r.dragmode==="pan"?"move":"crosshair";I(r._draggers,a)}}),Pw=Dt((Q,Z)=>{var c=Jo();Z.exports=function(g){for(var I=c.layoutArrayContainers,S=c.layoutArrayRegexes,t=g.split("[")[0],e,r,a=0;a{var Z=si(),c=Yo(),g=as(),I=E_().sorterAsc,S=Jo();Q.containerArrayMatch=Pw();var t=Q.isAddVal=function(r){return r==="add"||Z(r)},e=Q.isRemoveVal=function(r){return r===null||r==="remove"};Q.applyContainerArrayChanges=function(r,a,n,o,i){var l=a.astr,f=S.getComponentMethod(l,"supplyLayoutDefaults"),x=S.getComponentMethod(l,"draw"),y=S.getComponentMethod(l,"drawOne"),v=o.replot||o.recalc||f===c||x===c,T=r.layout,u=r._fullLayout;if(n[""]){Object.keys(n).length>1&&g.warn("Full array edits are incompatible with other edits",l);var b=n[""][""];if(e(b))a.set(null);else if(Array.isArray(b))a.set(b);else return g.warn("Unrecognized full array edit value",l,b),!0;return v?!1:(f(T,u),x(r),!0)}var _=Object.keys(n).map(Number).sort(I),P=a.get(),M=P||[],C=i(u,l).get(),A=[],h=-1,p=M.length,k,w,R,O,j,V,H,F;for(k=0;k<_.length;k++){if(R=_[k],O=n[R],j=Object.keys(O),V=O[""],H=t(V),R<0||R>M.length-(H?0:1)){g.warn("index out of range",l,R);continue}if(V!==void 0)j.length>1&&g.warn("Insertion & removal are incompatible with edits to the same index.",l,R),e(V)?A.push(R):H?(V==="add"&&(V={}),M.splice(R,0,V),C&&C.splice(R,0,{})):g.warn("Unrecognized full object edit value",l,R,V),h===-1&&(h=R);else for(w=0;w=0;k--)M.splice(A[k],1),C&&C.splice(A[k],1);if(M.length?P||a.set(M):a.set(null),v)return!1;if(f(T,u),y!==c){var U;if(h===-1)U=_;else{for(p=Math.max(M.length,p),U=[],k=0;k<_.length&&(R=_[k],!(R>=h));k++)U.push(R);for(k=h;k{var Z=Yi(),c=Jo(),g=kn(),I=Kc(),S=Rc(),t=hi(),e=S.cleanId,r=S.getFromTrace,a=c.traceIs,n=["x","y","z"];Q.clearPromiseQueue=function(u){Array.isArray(u._promises)&&u._promises.length>0&&g.log("Clearing previous rejected promises from queue."),u._promises=[]},Q.cleanLayout=function(u){var b;u||(u={}),u.xaxis1&&(u.xaxis||(u.xaxis=u.xaxis1),delete u.xaxis1),u.yaxis1&&(u.yaxis||(u.yaxis=u.yaxis1),delete u.yaxis1),u.scene1&&(u.scene||(u.scene=u.scene1),delete u.scene1);var _=(I.subplotsRegistry.cartesian||{}).attrRegex;(I.subplotsRegistry.polar||{}).attrRegex,(I.subplotsRegistry.ternary||{}).attrRegex,(I.subplotsRegistry.gl3d||{}).attrRegex;var P=Object.keys(u);for(b=0;b3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),u.dragmode==="rotate"&&(u.dragmode="orbit"),t.clean(u),u.template&&u.template.layout&&Q.cleanLayout(u.template.layout),u};function o(u,b){var _=u[b],P=b.charAt(0);_&&_!=="paper"&&(u[b]=e(_,P,!0))}Q.cleanData=function(u){for(var b=0;b0)return u.substr(0,b)}Q.hasParent=function(u,b){for(var _=v(b);_;){if(_ in u)return!0;_=v(_)}return!1},Q.clearAxisTypes=function(u,b,_){for(var P=0;P{let _=(...P)=>P.every(M=>g.isPlainObject(M))||P.every(M=>Array.isArray(M));if([u,b].every(P=>Array.isArray(P))){if(u.length!==b.length)return!1;for(let P=0;Pg.isPlainObject(P))){if(Object.keys(u).length!==Object.keys(b).length)return!1;for(let P in u){if(P.startsWith("_"))continue;let M=u[P],C=b[P];if(M!==C&&!(_(M,C)&&T(M,C)))return!1}return!0}return!1};Q.collectionsAreEqual=T}),G_=Dt(Q=>{var Z=qr(),c=Yi(),g=Ff(),I=kn(),S=I.nestedProperty,t=Bm(),e=m0(),r=Jo(),a=Nm(),n=Kc(),o=Ls(),i=I_(),l=Td(),f=Vs(),x=hi(),y=Lw().initInteractions,v=Dp(),T=vf().clearOutline,u=ms().dfltConfig,b=M6(),_=L1(),P=y0(),M=Yc(),C=ic().AX_NAME_PATTERN,A=0,h=5;function p(Ct,gt,St,Nt){var re;if(Ct=I.getGraphDiv(Ct),t.init(Ct),I.isPlainObject(gt)){var le=gt;gt=le.data,St=le.layout,Nt=le.config,re=le.frames}var we=t.triggerHandler(Ct,"plotly_beforeplot",[gt,St,Nt]);if(we===!1)return Promise.reject();!gt&&!St&&!I.isPlotDiv(Ct)&&I.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ct);function Ue(){if(re)return Q.addFrames(Ct,re)}j(Ct,Nt),St||(St={}),Z.select(Ct).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(Ct._promises)||(Ct._promises=[]);var qe=(Ct.data||[]).length===0&&Array.isArray(gt);Array.isArray(gt)&&(_.cleanData(gt),qe?Ct.data=gt:Ct.data.push.apply(Ct.data,gt),Ct.empty=!1),(!Ct.layout||qe)&&(Ct.layout=_.cleanLayout(St)),n.supplyDefaults(Ct);var or=Ct._fullLayout,Sr=or._has("cartesian");or._replotting=!0,(qe||or._shouldCreateBgLayer)&&(ne(Ct),or._shouldCreateBgLayer&&delete or._shouldCreateBgLayer),f.initGradients(Ct),f.initPatterns(Ct),qe&&o.saveShowSpikeInitial(Ct);var Ar=!Ct.calcdata||Ct.calcdata.length!==(Ct._fullData||[]).length;Ar&&n.doCalcdata(Ct);for(var mr=0;mr=Ct.data.length||re<-Ct.data.length)throw new Error(St+" must be valid indices for gd.data.");if(gt.indexOf(re,Nt+1)>-1||re>=0&>.indexOf(-Ct.data.length+re)>-1||re<0&>.indexOf(Ct.data.length+re)>-1)throw new Error("each index in "+St+" must be unique.")}}function W(Ct,gt,St){if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"currentIndices"),typeof St<"u"&&!Array.isArray(St)&&(St=[St]),typeof St<"u"&&U(Ct,St,"newIndices"),typeof St<"u"&>.length!==St.length)throw new Error("current and new indices must be of equal length.")}function q(Ct,gt,St){var Nt,re;if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("traces must be defined.");for(Array.isArray(gt)||(gt=[gt]),Nt=0;Nt"u")throw new Error("indices must be an integer or array of integers");U(Ct,St,"indices");for(var le in gt){if(!Array.isArray(gt[le])||gt[le].length!==St.length)throw new Error("attribute "+le+" must be an array of length equal to indices array length");if(re&&(!(le in Nt)||!Array.isArray(Nt[le])||Nt[le].length!==gt[le].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 lt(Ct,gt,St,Nt){var re=I.isPlainObject(Nt),le=[],we,Ue,qe,or,Sr;Array.isArray(St)||(St=[St]),St=F(St,Ct.data.length-1);for(var Ar in gt)for(var mr=0;mr=0&&Sr=0&&Sr"u")return or=Q.redraw(Ct),e.add(Ct,re,we,le,Ue),or;Array.isArray(St)||(St=[St]);try{W(Ct,Nt,St)}catch(Sr){throw Ct.data.splice(Ct.data.length-gt.length,gt.length),Sr}return e.startSequence(Ct),e.add(Ct,re,we,le,Ue),or=Q.moveTraces(Ct,Nt,St),e.stopSequence(Ct),or}function rt(Ct,gt){Ct=I.getGraphDiv(Ct);var St=[],Nt=Q.addTraces,re=rt,le=[Ct,St,gt],we=[Ct,gt],Ue,qe;if(typeof gt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"indices"),gt=F(gt,Ct.data.length-1),gt.sort(I.sorterDes),Ue=0;Ue"u")for(St=[],or=0;or0&&typeof fr.parts[Cn]!="string";)Cn--;var Tn=fr.parts[Cn],Mn=fr.parts[Cn-1]+"."+Tn,fi=fr.parts.slice(0,Cn).join("."),ki=S(Ct.layout,fi).get(),Oi=S(Nt,fi).get(),ji=fr.get();if(_r!==void 0){Ii[nr]=_r,oi[nr]=Tn==="reverse"?_r:it(ji);var Xi=a.getLayoutValObject(Nt,fr.parts);if(Xi&&Xi.impliedEdits&&_r!==null)for(var ci in Xi.impliedEdits)$n(I.relativeAttr(nr,ci),Xi.impliedEdits[ci]);if(["width","height"].indexOf(nr)!==-1)if(_r){$n("autosize",null);var za=nr==="height"?"width":"height";$n(za,Nt[za])}else Nt[nr]=Ct._initialAutoSize[nr];else if(nr==="autosize")$n("width",_r?null:Nt.width),$n("height",_r?null:Nt.height);else if(Mn.match(Wt))We(Mn),S(Nt,fi+"._inputRange").set(null);else if(Mn.match(Jt)){We(Mn),S(Nt,fi+"._inputRange").set(null);var Wa=S(Nt,fi).get();Wa._inputDomain&&(Wa._input.domain=Wa._inputDomain.slice())}else Mn.match(ge)&&S(Nt,fi+"._inputDomain").set(null);if(Tn==="type"){Zi=ki;var ze=Oi.type==="linear"&&_r==="log",Ie=Oi.type==="log"&&_r==="linear";if(ze||Ie){if(!Zi||!Zi.range)$n(fi+".autorange",!0);else if(Oi.autorange)ze&&(Zi.range=Zi.range[1]>Zi.range[0]?[1,2]:[2,1]);else{var Rr=Zi.range[0],$r=Zi.range[1];ze?(Rr<=0&&$r<=0&&$n(fi+".autorange",!0),Rr<=0?Rr=$r/1e6:$r<=0&&($r=Rr/1e6),$n(fi+".range[0]",Math.log(Rr)/Math.LN10),$n(fi+".range[1]",Math.log($r)/Math.LN10)):($n(fi+".range[0]",Math.pow(10,Rr)),$n(fi+".range[1]",Math.pow(10,$r)))}Array.isArray(Nt._subplots.polar)&&Nt._subplots.polar.length&&Nt[fr.parts[0]]&&fr.parts[1]==="radialaxis"&&delete Nt[fr.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ct,Oi,_r,$n),r.getComponentMethod("images","convertCoords")(Ct,Oi,_r,$n)}else $n(fi+".autorange",!0),$n(fi+".range",null);S(Nt,fi+"._inputRange").set(null)}else if(Tn.match(C)){var Gr=S(Nt,nr).get(),Br=(_r||{}).type;(!Br||Br==="-")&&(Br="linear"),r.getComponentMethod("annotations","convertCoords")(Ct,Gr,Br,$n),r.getComponentMethod("images","convertCoords")(Ct,Gr,Br,$n)}var Yr=b.containerArrayMatch(nr);if(Yr){Sr=Yr.array,Ar=Yr.index;var pn=Yr.property,on=Xi||{editType:"calc"};Ar!==""&&pn===""&&(b.isAddVal(_r)?oi[nr]=null:b.isRemoveVal(_r)?oi[nr]=(S(St,Sr).get()||[])[Ar]:I.warn("unrecognized full object value",gt)),M.update(Xn,on),or[Sr]||(or[Sr]={});var Ce=or[Sr][Ar];Ce||(Ce=or[Sr][Ar]={}),Ce[pn]=_r,delete gt[nr]}else Tn==="reverse"?(ki.range?ki.range.reverse():($n(fi+".autorange",!0),ki.range=[1,0]),Oi.autorange?Xn.calc=!0:Xn.plot=!0):(nr==="dragmode"&&(_r===!1&&ji!==!1||_r!==!1&&ji===!1)||Nt._has("scatter-like")&&Nt._has("regl")&&nr==="dragmode"&&(_r==="lasso"||_r==="select")&&!(ji==="lasso"||ji==="select")?Xn.plot=!0:Xi?M.update(Xn,Xi):Xn.calc=!0,fr.set(_r))}}for(Sr in or){var dr=b.applyContainerArrayChanges(Ct,le(St,Sr),or[Sr],Xn,le);dr||(Xn.plot=!0)}for(var Hr in sa){Zi=o.getFromId(Ct,Hr);var _n=Zi&&Zi._constraintGroup;if(_n){Xn.calc=!0;for(var Fn in _n)sa[Fn]||(o.getFromId(Ct,Fn)._constraintShrinkable=!0)}}(pe(Ct)||gt.height||gt.width)&&(Xn.plot=!0);var Qn=Nt.shapes;for(Ar=0;Ar1;)if(Nt.pop(),St=S(gt,Nt.join(".")+".uirevision").get(),St!==void 0)return St;return gt.uirevision}function oe(Ct,gt){for(var St=0;St[fi,Ct._ev.listeners(fi)]);le=Q.newPlot(Ct,gt,St,Nt).then(()=>{for(let[fi,ki]of Mn)ki.forEach(Oi=>Ct.on(fi,Oi));return Q.react(Ct,gt,St,Nt)})}else{Ct.data=gt||[],_.cleanData(Ct.data),Ct.layout=St||{},_.cleanLayout(Ct.layout),Ge(Ct.data,Ct.layout,Ue,qe),n.supplyDefaults(Ct,{skipUpdateCalc:!0});var Ar=Ct._fullData,mr=Ct._fullLayout,Qr=mr.datarevision===void 0,Hn=mr.transition,Wn=jr(Ct,qe,mr,Qr,Hn),Xn=Wn.newDataRevision,Ii=ur(Ct,Ue,Ar,Qr,Hn,Xn);if(pe(Ct)&&(Wn.layoutReplot=!0),Ii.calc||Wn.calc){Ct.calcdata=void 0;for(var oi=Object.getOwnPropertyNames(mr),$n=0;$n(Sr||Ct.emit("plotly_react",{config:Nt,data:gt,layout:St}),Ct))}function ur(Ct,gt,St,Nt,re,le){var we=gt.length===St.length;if(!re&&!we)return{fullReplot:!0,calc:!0};var Ue=M.traceFlags();Ue.arrays={},Ue.nChanges=0,Ue.nChangesAnim=0;var qe,or;function Sr(Qr){var Hn=a.getTraceValObject(or,Qr);return!or._module.animatable&&Hn.anim&&(Hn.anim=!1),Hn}var Ar={getValObject:Sr,flags:Ue,immutable:Nt,transition:re,newDataRevision:le,gd:Ct},mr={};for(qe=0;qe=re.length?re[0]:re[or]:re}function Ue(or){return Array.isArray(le)?or>=le.length?le[0]:le[or]:le}function qe(or,Sr){var Ar=0;return function(){if(or&&++Ar===Sr)return or()}}return new Promise(function(or,Sr){function Ar(){if(Nt._frameQueue.length!==0){for(;Nt._frameQueue.length;){var Tn=Nt._frameQueue.pop();Tn.onInterrupt&&Tn.onInterrupt()}Ct.emit("plotly_animationinterrupted",[])}}function mr(Tn){if(Tn.length!==0){for(var Mn=0;MnNt._timeToNext&&Hn()};Tn()}var Xn=0;function Ii(Tn){return Array.isArray(re)?Xn>=re.length?Tn.transitionOpts=re[Xn]:Tn.transitionOpts=re[0]:Tn.transitionOpts=re,Xn++,Tn}var oi,$n,sa=[],Zi=gt==null,We=Array.isArray(gt),nr=!Zi&&!We&&I.isPlainObject(gt);if(nr)sa.push({type:"object",data:Ii(I.extendFlat({},gt))});else if(Zi||["string","number"].indexOf(typeof gt)!==-1)for(oi=0;oi0&&tntn)&&Cn.push($n);sa=Cn}}sa.length>0?mr(sa):(Ct.emit("plotly_animated"),or())})}function Xr(Ct,gt,St){if(Ct=I.getGraphDiv(Ct),gt==null)return Promise.resolve();if(!I.isPlotDiv(Ct))throw new Error("This element is not a Plotly plot: "+Ct+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Nt,re,le,we,Ue=Ct._transitionData._frames,qe=Ct._transitionData._frameHash;if(!Array.isArray(gt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+gt);var or=Ue.length+gt.length*2,Sr=[],Ar={};for(Nt=gt.length-1;Nt>=0;Nt--)if(I.isPlainObject(gt[Nt])){var mr=gt[Nt].name,Qr=(qe[mr]||Ar[mr]||{}).name,Hn=gt[Nt].name,Wn=qe[Qr]||Ar[Qr];Qr&&Hn&&typeof Hn=="number"&&Wn&&Afr.index?-1:nr.index=0;Nt--){if(re=Sr[Nt].frame,typeof re.name=="number"&&I.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!re.name)for(;qe[re.name="frame "+Ct._transitionData._counter++];);if(qe[re.name]){for(le=0;le=0;St--)Nt=gt[St],le.push({type:"delete",index:Nt}),we.unshift({type:"insert",index:Nt,value:re[Nt]});var Ue=n.modifyFrames,qe=n.modifyFrames,or=[Ct,we],Sr=[Ct,le];return e&&e.add(Ct,Ue,or,qe,Sr),n.modifyFrames(Ct,le)}function Le(Ct){Ct=I.getGraphDiv(Ct);var gt=Ct._fullLayout||{},St=Ct._fullData||[];return n.cleanPlot([],{},St,gt),n.purge(Ct),t.purge(Ct),gt._container&>._container.remove(),delete Ct._context,Ct}function Gt(Ct){var gt=Ct._fullLayout,St=Ct.getBoundingClientRect();if(!I.equalDomRects(St,gt._lastBBox)){var Nt=gt._invTransform=I.inverseTransformMatrix(I.getFullTransformMatrix(Ct));gt._invScaleX=Math.sqrt(Nt[0][0]*Nt[0][0]+Nt[0][1]*Nt[0][1]+Nt[0][2]*Nt[0][2]),gt._invScaleY=Math.sqrt(Nt[1][0]*Nt[1][0]+Nt[1][1]*Nt[1][1]+Nt[1][2]*Nt[1][2]),gt._lastBBox=St}}function ne(Ct){var gt=Z.select(Ct),St=Ct._fullLayout;if(St._calcInverseTransform=Gt,St._calcInverseTransform(Ct),St._container=gt.selectAll(".plot-container").data([0]),St._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),St._paperdiv=St._container.selectAll(".svg-container").data([0]),St._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),St._glcontainer=St._paperdiv.selectAll(".gl-container").data([{}]),St._glcontainer.enter().append("div").classed("gl-container",!0),St._paperdiv.selectAll(".main-svg").remove(),St._paperdiv.select(".modebar-container").remove(),St._paper=St._paperdiv.insert("svg",":first-child").classed("main-svg",!0),St._toppaper=St._paperdiv.append("svg").classed("main-svg",!0),St._modebardiv=St._paperdiv.append("div"),delete St._modeBar,St._hoverpaper=St._paperdiv.append("svg").classed("main-svg",!0),!St._uid){var Nt={};Z.selectAll("defs").each(function(){this.id&&(Nt[this.id.split("-")[1]]=1)}),St._uid=I.randstr(Nt)}St._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),St._defs=St._paper.append("defs").attr("id","defs-"+St._uid),St._clips=St._defs.append("g").classed("clips",!0),St._topdefs=St._toppaper.append("defs").attr("id","topdefs-"+St._uid),St._topclips=St._topdefs.append("g").classed("clips",!0),St._bgLayer=St._paper.append("g").classed("bglayer",!0),St._draggers=St._paper.append("g").classed("draglayer",!0);var re=St._paper.append("g").classed("layer-below",!0);St._imageLowerLayer=re.append("g").classed("imagelayer",!0),St._shapeLowerLayer=re.append("g").classed("shapelayer",!0),St._cartesianlayer=St._paper.append("g").classed("cartesianlayer",!0),St._polarlayer=St._paper.append("g").classed("polarlayer",!0),St._smithlayer=St._paper.append("g").classed("smithlayer",!0),St._ternarylayer=St._paper.append("g").classed("ternarylayer",!0),St._geolayer=St._paper.append("g").classed("geolayer",!0),St._funnelarealayer=St._paper.append("g").classed("funnelarealayer",!0),St._pielayer=St._paper.append("g").classed("pielayer",!0),St._iciclelayer=St._paper.append("g").classed("iciclelayer",!0),St._treemaplayer=St._paper.append("g").classed("treemaplayer",!0),St._sunburstlayer=St._paper.append("g").classed("sunburstlayer",!0),St._indicatorlayer=St._toppaper.append("g").classed("indicatorlayer",!0),St._glimages=St._paper.append("g").classed("glimages",!0);var le=St._toppaper.append("g").classed("layer-above",!0);St._imageUpperLayer=le.append("g").classed("imagelayer",!0),St._shapeUpperLayer=le.append("g").classed("shapelayer",!0),St._selectionLayer=St._toppaper.append("g").classed("selectionlayer",!0),St._infolayer=St._toppaper.append("g").classed("infolayer",!0),St._menulayer=St._toppaper.append("g").classed("menulayer",!0),St._zoomlayer=St._toppaper.append("g").classed("zoomlayer",!0),St._hoverlayer=St._hoverpaper.append("g").classed("hoverlayer",!0),St._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ct.emit("plotly_framework")}Q.animate=br,Q.addFrames=Xr,Q.deleteFrames=nn,Q.addTraces=dt,Q.deleteTraces=rt,Q.extendTraces=st,Q.moveTraces=at,Q.prependTraces=tt,Q.newPlot=H,Q._doPlot=p,Q.purge=Le,Q.react=cr,Q.redraw=V,Q.relayout=It,Q.restyle=vt,Q.setPlotConfig=w,Q.update=se,Q._guiRelayout=Tt(It),Q._guiRestyle=Tt(vt),Q._guiUpdate=Tt(se),Q._storeDirectGUIEdit=ut}),o0=Dt(Q=>{var Z=Jo();Q.getDelay=function(I){return I._has&&(I._has("gl3d")||I._has("mapbox")||I._has("map"))?500:0},Q.getRedrawFunc=function(I){return function(){Z.getComponentMethod("colorbar","draw")(I)}},Q.encodeSVG=function(I){return"data:image/svg+xml,"+encodeURIComponent(I)},Q.encodeJSON=function(I){return"data:application/json,"+encodeURIComponent(I)};var c=window.URL||window.webkitURL;Q.createObjectURL=function(I){return c.createObjectURL(I)},Q.revokeObjectURL=function(I){return c.revokeObjectURL(I)},Q.createBlob=function(I,S){if(S==="svg")return new window.Blob([I],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([I],{type:"application/json;charset=utf-8"});var t=g(window.atob(I));return new window.Blob([t],{type:"image/"+S})},Q.octetStream=function(I){document.location.href="data:application/octet-stream"+I};function g(I){for(var S=I.length,t=new ArrayBuffer(S),e=new Uint8Array(t),r=0;r{var c=qr();kn();var g=Vs(),I=hi();Dp();var S=/"/g,t="TOBESTRIPPED",e=new RegExp('("'+t+")|("+t+'")',"g");function r(n){var o=c.select("body").append("div").style({display:"none"}).html(""),i=n.replace(/(&[^;]*;)/gi,function(l){return l==="<"?"<":l==="&rt;"?">":l.indexOf("<")!==-1||l.indexOf(">")!==-1?"":o.html(l).text()});return o.remove(),i}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Z.exports=function(n,o,i){var l=n._fullLayout,f=l._paper,x=l._toppaper,y=l.width,v=l.height,T;f.insert("rect",":first-child").call(g.setRect,0,0,y,v).call(I.fill,l.paper_bgcolor);var u=l._basePlotModules||[];for(T=0;T{var c=kn(),g=Rm().EventEmitter,I=o0();function S(t){var e=t.emitter||new g,r=new Promise(function(a,n){var o=window.Image,i=t.svg,l=t.format||"png",f=t.canvas,x=t.scale||1,y=t.width||300,v=t.height||150,T=x*y,u=x*v,b=f.getContext("2d",{willReadFrequently:!0}),_=new o,P,M;l==="svg"||c.isSafari()?M=I.encodeSVG(i):(P=I.createBlob(i,"svg"),M=I.createObjectURL(P)),f.width=T,f.height=u,_.onload=function(){var C;switch(P=null,I.revokeObjectURL(M),l!=="svg"&&b.drawImage(_,0,0,T,u),l){case"jpeg":C=f.toDataURL("image/jpeg");break;case"png":C=f.toDataURL("image/png");break;case"webp":C=f.toDataURL("image/webp");break;case"svg":C=M;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!t.promise)return e.emit("error",A)}a(C),t.promise||e.emit("success",C)},_.onerror=function(C){if(P=null,I.revokeObjectURL(M),n(C),!t.promise)return e.emit("error",C)},_.src=M});return t.promise?r:e}Z.exports=S}),Iw=Dt((Q,Z)=>{var c=Yi(),g=G_(),I=Kc(),S=kn(),t=o0(),e=Xy(),r=Jy(),a=Wi().version,n={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 o(i,l){l=l||{};var f,x,y,v;S.isPlainObject(i)?(f=i.data||[],x=i.layout||{},y=i.config||{},v={}):(i=S.getGraphDiv(i),f=S.extendDeep([],i.data),x=S.extendDeep({},i.layout),y=i._context,v=i._fullLayout||{});function T(H){return!(H in l)||S.validate(l[H],n[H])}if(!T("width")&&l.width!==null||!T("height")&&l.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+S.join2(n.format.values,", "," or ")+".");var u={};function b(H,F){return S.coerce(l,u,n,H,F)}var _=b("format"),P=b("width"),M=b("height"),C=b("scale"),A=b("setBackground"),h=b("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var k=S.extendFlat({},x);P?k.width=P:l.width===null&&c(v.width)&&(k.width=v.width),M?k.height=M:l.height===null&&c(v.height)&&(k.height=v.height);var w=S.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),R=t.getRedrawFunc(p);function O(){return new Promise(function(H){setTimeout(H,t.getDelay(p._fullLayout))})}function j(){return new Promise(function(H,F){var U=e(p,_,C),W=p._fullLayout.width,q=p._fullLayout.height;function J(){g.purge(p),document.body.removeChild(p)}if(_==="full-json"){var lt=I.graphJson(p,!1,"keepdata","object",!0,!0);return lt.version=a,lt=JSON.stringify(lt),J(),H(h?lt:t.encodeJSON(lt))}if(J(),_==="svg")return H(h?U:t.encodeSVG(U));var yt=document.createElement("canvas");yt.id=S.randstr(),r({format:_,width:W,height:q,scale:C,canvas:yt,svg:U,promise:!0}).then(H).catch(F)})}function V(H){return h?H.replace(t.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,F){g.newPlot(p,f,k,w).then(R).then(O).then(j).then(function(U){H(V(U))}).catch(function(U){F(U)})})}Z.exports=o}),ym=Dt((Q,Z)=>{var c=kn(),g=Kc(),I=Nm(),S=ms().dfltConfig,t=c.isPlainObject,e=Array.isArray,r=c.isArrayOrTypedArray;Z.exports=function(u,b){u===void 0&&(u=[]),b===void 0&&(b={});var _=I.get(),P=[],M={_context:c.extendFlat({},S)},C,A;e(u)?(M.data=c.extendDeep([],u),C=u):(M.data=[],C=[],P.push(l("array","data"))),t(b)?(M.layout=c.extendDeep({},b),A=b):(M.layout={},A={},arguments.length>1&&P.push(l("object","layout"))),g.supplyDefaults(M);for(var h=M._fullData,p=C.length,k=0;kR.length&&P.push(l("unused",M,k.concat(R.length)));var U=R.length,W=Array.isArray(F);W&&(U=Math.min(U,F.length));var q,J,lt,yt,mt;if(O.dimensions===2)for(J=0;JR[J].length&&P.push(l("unused",M,k.concat(J,R[J].length)));var st=R[J].length;for(q=0;q<(W?Math.min(st,F[J].length):st);q++)lt=W?F[J][q]:F,yt=w[J][q],mt=R[J][q],c.validate(yt,lt)?mt!==yt&&mt!==+yt&&P.push(l("dynamic",M,k.concat(J,q),yt,mt)):P.push(l("value",M,k.concat(J,q),yt))}else P.push(l("array",M,k.concat(J),w[J]));else for(J=0;J{var c=kn(),g=o0();function I(S,t,e){var r=document.createElement("a"),a="download"in r,n=new Promise(function(o,i){var l,f;if(a)return l=g.createBlob(S,e),f=g.createObjectURL(l),r.href=f,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),g.revokeObjectURL(f),l=null,o(t);if(c.isSafari()){var x=e==="svg"?",":";base64,";return g.octetStream(x+encodeURIComponent(S)),o(t)}i(new Error("download error"))});return n}Z.exports=I}),Y_=Dt((Q,Z)=>{var c=kn(),g=Iw(),I=zw();o0();function S(t,e){var r;return c.isPlainObject(t)||(r=c.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,n){r&&r._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var o=g(t,e),i=e.filename||t.fn||"newplot";i+="."+e.format.replace("-","."),o.then(function(l){return r&&(r._snapshotInProgress=!1),I(l,i,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Z.exports=S}),P1=Dt(Q=>{var Z=kn(),c=Z.isPlainObject,g=Nm(),I=Kc(),S=Ho(),t=mu(),e=ms().dfltConfig;Q.makeTemplate=function(y){y=Z.isPlainObject(y)?y:Z.getGraphDiv(y),y=Z.extendDeep({_context:e},{data:y.data,layout:y.layout}),I.supplyDefaults(y);var v=y.data||[],T=y.layout||{};T._basePlotModules=y._fullLayout._basePlotModules,T._modules=y._fullLayout._modules;var u={data:{},layout:{}};v.forEach(function(w){var R={};n(w,R,i.bind(null,w));var O=Z.coerce(w,{},S,"type"),j=u.data[O];j||(j=u.data[O]=[]),j.push(R)}),n(T,u.layout,o.bind(null,T)),delete u.layout.template;var b=T.template;if(c(b)){var _=b.layout,P,M,C,A,h,p;c(_)&&r(_,u.layout);var k=b.data;if(c(k)){for(M in u.data)if(C=k[M],Array.isArray(C)){for(h=u.data[M],p=h.length,A=C.length,P=0;PV?P.push({code:"unused",traceType:w,templateCount:j,dataCount:V}):V>j&&P.push({code:"reused",traceType:w,templateCount:j,dataCount:V})}}function H(F,U){for(var W in F)if(W.charAt(0)!=="_"){var q=F[W],J=l(F,W,U);c(q)?(Array.isArray(F)&&q._template===!1&&q.templateitemname&&P.push({code:"missing",path:J,templateitemname:q.templateitemname}),H(q,J)):Array.isArray(q)&&f(q)&&H(q,J)}}if(H({data:C,layout:M},""),P.length)return P.map(x)};function f(y){for(var v=0;v{var Z=G_();Q._doPlot=Z._doPlot,Q.newPlot=Z.newPlot,Q.restyle=Z.restyle,Q.relayout=Z.relayout,Q.redraw=Z.redraw,Q.update=Z.update,Q._guiRestyle=Z._guiRestyle,Q._guiRelayout=Z._guiRelayout,Q._guiUpdate=Z._guiUpdate,Q._storeDirectGUIEdit=Z._storeDirectGUIEdit,Q.react=Z.react,Q.extendTraces=Z.extendTraces,Q.prependTraces=Z.prependTraces,Q.addTraces=Z.addTraces,Q.deleteTraces=Z.deleteTraces,Q.moveTraces=Z.moveTraces,Q.purge=Z.purge,Q.addFrames=Z.addFrames,Q.deleteFrames=Z.deleteFrames,Q.animate=Z.animate,Q.setPlotConfig=Z.setPlotConfig;var c=r0().getGraphDiv,g=U_().eraseActiveShape;Q.deleteActiveShape=function(S){return g(c(S))},Q.toImage=Iw(),Q.validate=ym(),Q.downloadImage=Y_();var I=P1();Q.makeTemplate=I.makeTemplate,Q.validateTemplate=I.validateTemplate}),Hm=Dt((Q,Z)=>{var c=kn(),g=Jo();Z.exports=function(I,S,t,e){var r=e("x"),a=e("y"),n,o=g.getComponentMethod("calendars","handleTraceDefaults");if(o(I,S,["x","y"],t),r){var i=c.minRowLength(r);a?n=Math.min(i,c.minRowLength(a)):(n=i,e("y0"),e("dy"))}else{if(!a)return 0;n=c.minRowLength(a),e("x0"),e("dx")}return S._length=n,n}}),Rp=Dt((Q,Z)=>{var c=kn().dateTick0,g=Ca(),I=g.ONEWEEK;function S(t,e){return t%I===0?c(e,1):c(e,0)}Z.exports=function(t,e,r,a,n){if(n||(n={x:!0,y:!0}),n.x){var o=a("xperiod");o&&(a("xperiod0",S(o,e.xcalendar)),a("xperiodalignment"))}if(n.y){var i=a("yperiod");i&&(a("yperiod0",S(i,e.ycalendar)),a("yperiodalignment"))}}}),Ow=Dt((Q,Z)=>{var c=["orientation","groupnorm","stackgaps"];Z.exports=function(g,I,S,t){var e=S._scatterStackOpts,r=t("stackgroup");if(r){var a=I.xaxis+I.yaxis,n=e[a];n||(n=e[a]={});var o=n[r],i=!1;o?o.traces.push(I):(o=n[r]={traceIndices:[],traces:[I]},i=!0);for(var l={orientation:I.x&&!I.y?"h":"v"},f=0;f{var c=hi(),g=Ud().hasColorscale,I=mc(),S=Tc();Z.exports=function(t,e,r,a,n,o){var i=S.isBubble(t),l=(t.line||{}).color,f;if(o=o||{},l&&(r=l),n("marker.symbol"),n("marker.opacity",i?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",r),g(t,"marker")&&I(t,e,a,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&e.marker.color!==l?f=l:i?f=c.background:f=c.defaultLine,n("marker.line.color",f),g(t,"marker.line")&&I(t,e,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",i?1:0)),i&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var x=n("marker.gradient.type");x!=="none"&&n("marker.gradient.color")}}}),z0=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Ud().hasColorscale,I=mc();Z.exports=function(S,t,e,r,a,n){n||(n={});var o=(S.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),a("line.color",e),g(S,"line"))I(S,t,r,a,{prefix:"line.",cLetter:"c"});else{var i=(c(o)?!1:o)||e;a("line.color",i)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}),xv=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("line.shape");S==="spline"&&I("line.smoothing")}}),x0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t,e){e=e||{},t("textposition"),c.coerceFont(t,"textfont",e.font||S.font,e),e.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}),O0=Dt((Q,Z)=>{var c=hi(),g=kn().isArrayOrTypedArray;function I(S){for(var t=c.interpolate(S[0][1],S[1][1],.5),e=2;e{var c=kn(),g=Jo(),I=ef(),S=vm(),t=Tc(),e=Hm(),r=Rp(),a=Ow(),n=s0(),o=z0(),i=xv(),l=x0(),f=O0(),x=kn().coercePattern;Z.exports=function(y,v,T,u){function b(k,w){return c.coerce(y,v,I,k,w)}var _=e(y,v,u,b);if(_||(v.visible=!1),!!v.visible){r(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var P=a(y,v,u,b);u.scattermode==="group"&&v.orientation===void 0&&b("orientation","v");var M=!P&&_{var c=vv().getAxisGroup;Z.exports=function(g,I,S,t,e){var r=I.orientation,a=I[{v:"x",h:"y"}[r]+"axis"],n=c(S,a)+r,o=S._alignmentOpts||{},i=t("alignmentgroup"),l=o[n];l||(l=o[n]={});var f=l[i];f?f.traces.push(I):f=l[i]={traces:[I],alignmentIndex:Object.keys(l).length,offsetGroups:{}};var x=t("offsetgroup")||"",y=f.offsetGroups,v=y[x];I._offsetIndex=0,(e!=="group"||x)&&(v||(v=y[x]={offsetIndex:Object.keys(y).length}),I._offsetIndex=v.offsetIndex)}}),Fw=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=ef();Z.exports=function(S,t){var e,r,a,n=t.scattermode;function o(y){return c.coerce(r._input,r,I,y)}if(t.scattermode==="group")for(a=0;a=0;f--){var x=S[f];if(x.type==="scatter"&&x.xaxis===i.xaxis&&x.yaxis===i.yaxis){x.opacity=void 0;break}}}}}}),Rw=Dt((Q,Z)=>{var c=kn(),g=vg();Z.exports=function(I,S){function t(r,a){return c.coerce(I,S,g,r,a)}var e=S.barmode==="group";S.scattermode==="group"&&t("scattergap",e?S.bargap:.2)}}),D0=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=g.dateTime2ms,S=g.incrementMonth,t=Ca(),e=t.ONEAVGMONTH;Z.exports=function(r,a,n,o){if(a.type!=="date")return{vals:o};var i=r[n+"periodalignment"];if(!i)return{vals:o};var l=r[n+"period"],f;if(c(l)){if(l=+l,l<=0)return{vals:o}}else if(typeof l=="string"&&l.charAt(0)==="M"){var x=+l.substring(1);if(x>0&&Math.round(x)===x)f=x;else return{vals:o}}for(var y=a.calendar,v=i==="start",T=i==="end",u=r[n+"period0"],b=I(u,y)||0,_=[],P=[],M=[],C=o.length,A=0;Ah;)w=S(w,-f,y);for(;w<=h;)w=S(w,f,y);k=S(w,-f,y)}else{for(p=Math.round((h-b)/l),w=b+p*l;w>h;)w-=l;for(;w<=h;)w+=l;k=w-l}_[A]=v?k:T?w:(k+w)/2,P[A]=k,M[A]=w}return{vals:_,starts:P,ends:M}}}),F0=Dt((Q,Z)=>{var c=Ud().hasColorscale,g=Xd(),I=Tc();Z.exports=function(S,t){I.hasLines(t)&&c(t,"line")&&g(S,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),I.hasMarkers(t)&&(c(t,"marker")&&g(S,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c(t,"marker.line")&&g(S,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),ct=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=kn();Z.exports=function(g,I){c.isArrayOrTypedArray(I.selectedpoints)&&c.tagSelected(g,I)}}),me=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ls(),S=D0(),t=Ca().BADNUM,e=Tc(),r=F0(),a=ct(),n=Bt();function o(v,T){var u=v._fullLayout,b=T._xA=I.getFromId(v,T.xaxis||"x","x"),_=T._yA=I.getFromId(v,T.yaxis||"y","y"),P=b.makeCalcdata(T,"x"),M=_.makeCalcdata(T,"y"),C=S(T,b,"x",P),A=S(T,_,"y",M),h=C.vals,p=A.vals,k=T._length,w=new Array(k),R=T.ids,O=y(T,u,b,_),j=!1,V,H,F,U,W,q;f(u,T);var J="x",lt="y",yt;if(O)g.pushUnique(O.traceIndices,T.index),V=O.orientation==="v",V?(lt="s",yt="x"):(J="s",yt="y"),W=O.stackgaps==="interpolate";else{var mt=l(T,k);i(v,T,b,_,h,p,mt)}var st=!!T.xperiodalignment,tt=!!T.yperiodalignment;for(H=0;HH&&w[U].gap;)U--;for(q=w[U].s,F=w.length-1;F>U;F--)w[F].s=q;for(;H{Z.exports=g;var c=kn().distinctVals;function g(I,S){this.traces=I,this.sepNegVal=S.sepNegVal,this.overlapNoMerge=S.overlapNoMerge;for(var t=1/0,e=S.posAxis._id.charAt(0),r=[],a=0;a{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Jo(),t=Ls(),e=vv().getAxisGroup,r=Qe();function a(w,R){for(var O=R.xaxis,j=R.yaxis,V=w._fullLayout,H=w._fullData,F=w.calcdata,U=[],W=[],q=0;qW+F||!c(U))}for(var J=0;J{var c=me(),g=zr().setGroupPositions;function I(e,r){for(var a=r.xaxis,n=r.yaxis,o=e._fullLayout,i=e._fullData,l=e.calcdata,f=[],x=[],y=0;yO[y]&&y{var c=Vs(),g=Ca(),I=g.BADNUM,S=g.LOG_CLIP,t=S+.5,e=S-.5,r=kn(),a=r.segmentsIntersect,n=r.constrain,o=vm();Z.exports=function(i,l){var f=l.trace||{},x=l.xaxis,y=l.yaxis,v=x.type==="log",T=y.type==="log",u=x._length,b=y._length,_=l.backoff,P=f.marker,M=l.connectGaps,C=l.baseTolerance,A=l.shape,h=A==="linear",p=f.fill&&f.fill!=="none",k=[],w=o.minTolerance,R=i.length,O=new Array(R),j=0,V,H,F,U,W,q,J,lt,yt,mt,st,tt,dt,rt,at,vt;function it(we){var Ue=i[we];if(!Ue)return!1;var qe=l.linearized?x.l2p(Ue.x):x.c2p(Ue.x),or=l.linearized?y.l2p(Ue.y):y.c2p(Ue.y);if(qe===I){if(v&&(qe=x.c2p(Ue.x,!0)),qe===I)return!1;T&&or===I&&(qe*=Math.abs(x._m*b*(x._m>0?t:e)/(y._m*u*(y._m>0?t:e)))),qe*=1e3}if(or===I){if(T&&(or=y.c2p(Ue.y,!0)),or===I)return!1;or*=1e3}return[qe,or]}function Y(we,Ue,qe,or){var Sr=qe-we,Ar=or-Ue,mr=.5-we,Qr=.5-Ue,Hn=Sr*Sr+Ar*Ar,Wn=Sr*mr+Ar*Qr;if(Wn>0&&Wn1||Math.abs(mr.y-qe[0][1])>1)&&(mr=[mr.x,mr.y],or&&It(mr,we)Wt||we[1]ge)return[n(we[0],qt,Wt),n(we[1],Jt,ge)]}function Te(we,Ue){if(we[0]===Ue[0]&&(we[0]===qt||we[0]===Wt)||we[1]===Ue[1]&&(we[1]===Jt||we[1]===ge))return!0}function He(we,Ue){var qe=[],or=oe(we),Sr=oe(Ue);return or&&Sr&&Te(or,Sr)||(or&&qe.push(or),Sr&&qe.push(Sr)),qe}function Ge(we,Ue,qe){return function(or,Sr){var Ar=oe(or),mr=oe(Sr),Qr=[];if(Ar&&mr&&Te(Ar,mr))return Qr;Ar&&Qr.push(Ar),mr&&Qr.push(mr);var Hn=2*r.constrain((or[we]+Sr[we])/2,Ue,qe)-((Ar||or)[we]+(mr||Sr)[we]);if(Hn){var Wn;Ar&&mr?Wn=Hn>0==Ar[we]>mr[we]?Ar:mr:Wn=Ar||mr,Wn[we]+=Hn}return Qr}}var cr;A==="linear"||A==="spline"?cr=ve:A==="hv"||A==="vh"?cr=He:A==="hvh"?cr=Ge(0,qt,Wt):A==="vhv"&&(cr=Ge(1,Jt,ge));function ur(we,Ue){var qe=Ue[0]-we[0],or=(Ue[1]-we[1])/qe,Sr=(we[1]*Ue[0]-Ue[1]*we[0])/qe;return Sr>0?[or>0?qt:Wt,ge]:[or>0?Wt:qt,Jt]}function jr(we){var Ue=we[0],qe=we[1],or=Ue===O[j-1][0],Sr=qe===O[j-1][1];if(!(or&&Sr))if(j>1){var Ar=Ue===O[j-2][0],mr=qe===O[j-2][1];or&&(Ue===qt||Ue===Wt)&&Ar?mr?j--:O[j-1]=we:Sr&&(qe===Jt||qe===ge)&&mr?Ar?j--:O[j-1]=we:O[j++]=we}else O[j++]=we}function Wr(we){O[j-1][0]!==we[0]&&O[j-1][1]!==we[1]&&jr([Tt,Lt]),jr(we),Mt=null,Tt=Lt=0}var br=r.isArrayOrTypedArray(P);function Xr(we){if(we&&_&&(we.i=V,we.d=i,we.trace=f,we.marker=br?P[we.i]:P,we.backoff=_),ft=we[0]/u,ut=we[1]/b,pe=we[0]Wt?Wt:0,se=we[1]ge?ge:0,pe||se){if(!j)O[j++]=[pe||we[0],se||we[1]];else if(Mt){var Ue=cr(Mt,we);Ue.length>1&&(Wr(Ue[0]),O[j++]=Ue[1])}else ee=cr(O[j-1],we)[0],O[j++]=ee;var qe=O[j-1];pe&&se&&(qe[0]!==pe||qe[1]!==se)?(Mt&&(Tt!==pe&&Lt!==se?jr(Tt&&Lt?ur(Mt,we):[Tt||pe,Lt||se]):Tt&&Lt&&jr([Tt,Lt])),jr([pe,se])):Tt-pe&&Lt-se&&jr([pe||Tt,se||Lt]),Mt=we,Tt=pe,Lt=se}else Mt&&Wr(cr(Mt,we)[0]),O[j++]=we}for(V=0;Vkt(q,nn))break;F=q,dt=yt[0]*lt[0]+yt[1]*lt[1],dt>st?(st=dt,U=q,J=!1):dt=i.length||!q)break;Xr(q),H=q}}Mt&&jr([Tt||Mt[0],Lt||Mt[1]]),k.push(O.slice(0,j))}var Le=A.slice(A.length-1);if(_&&Le!=="h"&&Le!=="v"){for(var Gt=!1,ne=-1,Ct=[],gt=0;gt{var c={tonextx:1,tonexty:1,tonext:1};Z.exports=function(g,I,S){var t,e,r,a,n,o={},i=!1,l=-1,f=0,x=-1;for(e=0;e=0?n=x:(n=x=f,f++),n{var c=qr(),g=Jo(),I=kn(),S=I.ensureSingle,t=I.identity,e=Vs(),r=Tc(),a=qi(),n=ja(),o=mm().tester;Z.exports=function(x,y,v,T,u,b){var _,P,M=!u,C=!!u&&u.duration>0,A=n(x,y,v);if(_=T.selectAll("g.trace").data(A,function(p){return p[0].trace.uid}),_.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),_.order(),i(x,_,y),C){b&&(P=b());var h=c.transition().duration(u.duration).ease(u.easing).each("end",function(){P&&P()}).each("interrupt",function(){P&&P()});h.each(function(){T.selectAll("g.trace").each(function(p,k){l(x,k,y,p,A,this,u)})})}else _.each(function(p,k){l(x,k,y,p,A,this,u)});M&&_.exit().remove(),T.selectAll("path:not([d])").remove()};function i(x,y,v){y.each(function(T){var u=S(c.select(this),"g","fills");e.setClipUrl(u,v.layerClipId,x);var b=T[0].trace,_=[];b._ownfill&&_.push("_ownFill"),b._nexttrace&&_.push("_nextFill");var P=u.selectAll("g").data(_,t);P.enter().append("g"),P.exit().each(function(M){b[M]=null}).remove(),P.order().each(function(M){b[M]=S(c.select(this),"path","js-fill")})})}function l(x,y,v,T,u,b,_){var P=x._context.staticPlot,M;f(x,y,v,T,u);var C=!!_&&_.duration>0;function A(Wr){return C?Wr.transition():Wr}var h=v.xaxis,p=v.yaxis,k=T[0].trace,w=k.line,R=c.select(b),O=S(R,"g","errorbars"),j=S(R,"g","lines"),V=S(R,"g","points"),H=S(R,"g","text");if(g.getComponentMethod("errorbars","plot")(x,O,v,_),k.visible!==!0)return;A(R).style("opacity",k.opacity);var F,U,W=k.fill.charAt(k.fill.length-1);W!=="x"&&W!=="y"&&(W="");var q,J;W==="y"?(q=1,J=p.c2p(0,!0)):W==="x"&&(q=0,J=h.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=R;var lt="",yt=[],mt=k._prevtrace,st=null,tt=null;mt&&(lt=mt._prevRevpath||"",U=mt._nextFill,yt=mt._ownPolygons,st=mt._fillsegments,tt=mt._fillElement);var dt,rt,at="",vt="",it,Y,ft,ut,kt,It,Pt=[];k._polygons=[];var qt=[],Wt=[],Jt=I.noop;if(F=k._ownFill,r.hasLines(k)||k.fill!=="none"){U&&U.datum(T),["hv","vh","hvh","vhv"].indexOf(w.shape)!==-1?(it=e.steps(w.shape),Y=e.steps(w.shape.split("").reverse().join(""))):w.shape==="spline"?it=Y=function(Wr){var br=Wr[Wr.length-1];return Wr.length>1&&Wr[0][0]===br[0]&&Wr[0][1]===br[1]?e.smoothclosed(Wr.slice(1),w.smoothing):e.smoothopen(Wr,w.smoothing)}:it=Y=function(Wr){return"M"+Wr.join("L")},ft=function(Wr){return Y(Wr.reverse())},Wt=a(T,{xaxis:h,yaxis:p,trace:k,connectGaps:k.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:k.fill}),qt=new Array(Wt.length);var ge=0;for(M=0;M=P[0]&&R.x<=P[1]&&R.y>=M[0]&&R.y<=M[1]}),p=Math.ceil(h.length/A),k=0;u.forEach(function(R,O){var j=R[0].trace;r.hasMarkers(j)&&j.marker.maxdisplayed>0&&O{Z.exports={container:"marker",min:"cmin",max:"cmax"}}),Ws=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e={_fullLayout:S},r=c.getFromTrace(e,I,"x"),a=c.getFromTrace(e,I,"y"),n=g.orig_x;n===void 0&&(n=g.x);var o=g.orig_y;return o===void 0&&(o=g.y),t.xLabel=c.tickText(r,r.c2l(n),!0).text,t.yLabel=c.tickText(a,a.c2l(o),!0).text,t}}),_l=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=Jo();function S(a){var n=c.select(a).selectAll("g.trace.scatter");n.style("opacity",function(o){return o[0].trace.opacity}),n.selectAll("g.points").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;t(i,l,a)}),n.selectAll("g.text").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;e(i,l,a)}),n.selectAll("g.trace path.js-line").call(g.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,a,!1),I.getComponentMethod("errorbars","style")(n)}function t(a,n,o){g.pointStyle(a.selectAll("path.point"),n,o)}function e(a,n,o){g.textPointStyle(a.selectAll("text"),n,o)}function r(a,n,o){var i=n[0].trace;i.selectedpoints?(g.selectedPointStyle(o.selectAll("path.point"),i),g.selectedTextStyle(o.selectAll("text"),i)):(t(o,i,a),e(o,i,a))}Z.exports={style:S,stylePoints:t,styleText:e,styleOnSelect:r}}),Fu=Dt((Q,Z)=>{var c=hi(),g=Tc();Z.exports=function(I,S){var t,e;if(I.mode==="lines")return t=I.line.color,t&&c.opacity(t)?t:I.fillcolor;if(I.mode==="none")return I.fill?I.fillcolor:"";var r=S.mcc||(I.marker||{}).color,a=S.mlcc||((I.marker||{}).line||{}).color;return e=r&&c.opacity(r)?r:a&&c.opacity(a)&&(S.mlw||((I.marker||{}).line||{}).width)?a:"",e?c.opacity(e)<.3?c.addOpacity(e,.3):e:(t=(I.line||{}).color,t&&c.opacity(t)&&g.hasLines(I)&&I.line.width?t:I.fillcolor)}}),Md=Dt((Q,Z)=>{var c=kn(),g=tf(),I=Jo(),S=Fu(),t=hi(),e=c.fillText;Z.exports=function(r,a,n,o){var i=r.cd,l=i[0].trace,f=r.xa,x=r.ya,y=f.c2p(a),v=x.c2p(n),T=[y,v],u=l.hoveron||"",b=l.mode.indexOf("markers")!==-1?3:.5,_=!!l.xperiodalignment,P=!!l.yperiodalignment;if(u.indexOf("points")!==-1){var M=function(lt){if(_){var yt=f.c2p(lt.xStart),mt=f.c2p(lt.xEnd);return y>=Math.min(yt,mt)&&y<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(f.c2p(lt.x)-y);return dt=Math.min(yt,mt)&&v<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(x.c2p(lt.y)-v);return dtat!=Pt>=at&&(ut=Y[it-1][0],kt=Y[it][0],Pt-It&&(ft=ut+(kt-ut)*(at-It)/(Pt-It),st=Math.min(st,ft),tt=Math.max(tt,ft)));return st=Math.max(st,0),tt=Math.min(tt,f._length),{x0:st,x1:tt,y0:at,y1:at}}if(u.indexOf("fills")!==-1&&l._fillElement){var W=F(l._fillElement)&&!F(l._fillExclusionElement);if(W){var q=U(l._polygons);q===null&&(q={x0:T[0],x1:T[0],y0:T[1],y1:T[1]});var J=t.defaultLine;return t.opacity(l.fillcolor)?J=l.fillcolor:t.opacity((l.line||{}).color)&&(J=l.line.color),c.extendFlat(r,{distance:r.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:J,hovertemplate:!1}),delete r.index,l.text&&!c.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}}),Rf=Dt((Q,Z)=>{var c=Tc();Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=[],a=S[0].trace,n,o,i,l,f=!c.hasMarkers(a)&&!c.hasText(a);if(f)return[];if(I===!1)for(n=0;n{Z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),kp=Dt((Q,Z)=>{var c=Jo().traceIs,g=dv();Z.exports=function(r,a,n,o){n("autotypenumbers",o.autotypenumbersDflt);var i=n("type",(o.splomStash||{}).type);i==="-"&&(I(a,o.data),a.type==="-"?a.type="linear":r.type=a.type)};function I(r,a){if(r.type==="-"){var n=r._id,o=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=o);var l=S(a,n,o);if(l){if(l.type==="histogram"&&o==={v:"y",h:"x"}[l.orientation||"v"]){r.type="linear";return}var f=o+"calendar",x=l[f],y={noMultiCategory:!c(l,"cartesian")||c(l,"noMultiCategory")};if(l.type==="box"&&l._hasPreCompStats&&o==={h:"x",v:"y"}[l.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=r.autotypenumbers,e(l,o)){var v=t(l),T=[];for(i=0;i0&&(i["_"+n+"axes"]||{})[a]||(i[n+"axis"]||n)===a&&(e(i,n)||(i[n]||[]).length||i[n+"0"]))return i}}function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function e(r,a){var n=t(r),o=c(r,"box-violin"),i=c(r._fullInput||{},"candlestick");return o&&!i&&a===n&&r[n]===void 0&&r[n+"0"]===void 0}}),Wm=Dt((Q,Z)=>{var c=Ma().isTypedArraySpec;function g(I,S){var t=S.dataAttr||I._id.charAt(0),e={},r,a,n;if(S.axData)r=S.axData;else for(r=[],a=0;a0||c(r),n;a&&(n="array");var o=t("categoryorder",n),i;o==="array"&&(i=t("categoryarray")),!a&&o==="array"&&(o=S.categoryorder="trace"),o==="trace"?S._initialCategories=[]:o==="array"?S._initialCategories=i.slice():(i=g(S,e).sort(),o==="category ascending"?S._initialCategories=i:o==="category descending"&&(S._initialCategories=i.reverse()))}}}),Qy=Dt((Q,Z)=>{var c=ro().mix,g=wi(),I=kn();Z.exports=function(S,t,e,r){r=r||{};var a=r.dfltColor;function n(p,k){return I.coerce2(S,t,r.attributes,p,k)}var o=n("linecolor",a),i=n("linewidth"),l=e("showline",r.showLine||!!o||!!i);l||(delete t.linecolor,delete t.linewidth);var f=c(a,r.bgColor,r.blend||g.lightFraction).toRgbString(),x=n("gridcolor",f),y=n("gridwidth"),v=n("griddash"),T=e("showgrid",r.showGrid||!!x||!!y||!!v);if(T||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),r.hasMinor){var u=c(t.gridcolor,r.bgColor,67).toRgbString(),b=n("minor.gridcolor",u),_=n("minor.gridwidth",t.gridwidth||1),P=n("minor.griddash",t.griddash||"solid"),M=e("minor.showgrid",!!b||!!_||!!P);M||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!r.noZeroLine){n("zerolinelayer");var C=n("zerolinecolor",a),A=n("zerolinewidth"),h=e("zeroline",r.showGrid||!!C||!!A);h||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),tx=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=kn(),S=mu(),t=Ad(),e=Td(),r=yg(),a=xg(),n=n0(),o=dm(),i=Wm(),l=Qy(),f=I_(),x=i0(),y=ic().WEEKDAY_PATTERN,v=ic().HOUR_PATTERN;Z.exports=function(_,P,M,C,A){var h=C.letter,p=C.font||{},k=C.splomStash||{},w=M("visible",!C.visibleDflt),R=P._template||{},O=P.type||R.type||"-",j;if(O==="date"){var V=g.getComponentMethod("calendars","handleDefaults");V(_,P,"calendar",C.calendar),C.noTicklabelmode||(j=M("ticklabelmode"))}!C.noTicklabelindex&&(O==="date"||O==="linear")&&M("ticklabelindex");var H="";(!C.noTicklabelposition||O==="multicategory")&&(H=I.coerce(_,P,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:j==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),C.noTicklabeloverflow||M("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),x(P,A),f(_,P,M,C),i(_,P,M,C),C.noHover||(O!=="category"&&M("hoverformat"),C.noUnifiedhovertitle||M("unifiedhovertitle.text"));var F=M("color"),U=F!==e.color.dflt?F:p.color,W=k.label||A._dfltTitle[h];if(o(_,P,M,O,C),!w)return P;M("title.text",W),I.coerceFont(M,"title.font",p,{overrideDflt:{size:I.bigFont(p.size),color:U}}),r(_,P,M,O);var q=C.hasMinor;if(q&&(S.newContainer(P,"minor"),r(_,P,M,O,{isMinor:!0})),n(_,P,M,O,C),a(_,P,M,C),q){var J=C.isMinor;C.isMinor=!0,a(_,P,M,C),C.isMinor=J}l(_,P,M,{dfltColor:F,bgColor:C.bgColor,showGrid:C.showGrid,hasMinor:q,attributes:e}),q&&!P.minor.ticks&&!P.minor.showgrid&&delete P.minor,(P.showline||P.ticks)&&M("mirror");var lt=O==="multicategory";if(!C.noTickson&&(O==="category"||lt)&&(P.ticks||P.showgrid)&&(lt?(M("tickson","boundaries"),delete P.ticklabelposition):M("tickson")),lt){var yt=M("showdividers");yt&&(M("dividercolor"),M("dividerwidth"))}if(O==="date")if(t(_,P,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!P.rangebreaks.length)delete P.rangebreaks;else{for(var mt=0;mt=2){var p="",k,w;if(h.length===2){for(k=0;k<2;k++)if(w=b(h[k]),w){p=y;break}}var R=C("pattern",p);if(R===y)for(k=0;k<2;k++)w=b(h[k]),w&&(P.bounds[k]=h[k]=w-1);if(R)for(k=0;k<2;k++)switch(w=h[k],R){case y:if(!c(w)){P.enabled=!1;return}if(w=+w,w!==Math.floor(w)||w<0||w>=7){P.enabled=!1;return}P.bounds[k]=h[k]=w;break;case v:if(!c(w)){P.enabled=!1;return}if(w=+w,w<0||w>24){P.enabled=!1;return}P.bounds[k]=h[k]=w;break}if(M.autorange===!1){var O=M.range;if(O[0]O[1]){P.enabled=!1;return}}else if(h[0]>O[0]&&h[1]{var c=Yi(),g=kn();Z.exports=function(I,S,t,e){var r=e.counterAxes||[],a=e.overlayableAxes||[],n=e.letter,o=e.grid,i=e.overlayingDomain,l,f,x,y,v,T;o&&(f=o._domains[n][o._axisMap[S._id]],l=o._anchors[S._id],f&&(x=o[n+"side"].split(" ")[0],y=o.domain[n][x==="right"||x==="top"?1:0])),f=f||[0,1],l=l||(c(I.position)?"free":r[0]||"free"),x=x||(n==="x"?"bottom":"left"),y=y||0,v=0,T=!1;var u=g.coerce(I,S,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:l}},"anchor"),b=g.coerce(I,S,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:x}},"side");if(u==="free"){if(n==="y"){var _=t("autoshift");_&&(y=b==="left"?i[0]:i[1],T=S.automargin?S.automargin:!0,v=b==="left"?-3:3),t("shift",v)}t("position",y)}t("automargin",T);var P=!1;if(a.length&&(P=g.coerce(I,S,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!P){var M=t("domain",f);M[0]>M[1]-1/4096&&(S.domain=f),g.noneOrAll(I.domain,S.domain,f),S.tickmode==="sync"&&(S.tickmode="auto")}return t("layer"),S}}),Bw=Dt((Q,Z)=>{var c=kn(),g=hi(),I=Fp().isUnifiedHover,S=pv(),t=mu(),e=b1(),r=Td(),a=kp(),n=tx(),o=vv(),i=K_(),l=Rc(),f=l.id2name,x=l.name2id,y=ic().AX_ID_PATTERN,v=Jo(),T=v.traceIs,u=v.getComponentMethod;function b(_,P,M){Array.isArray(_[P])?_[P].push(M):_[P]=[M]}Z.exports=function(_,P,M){var C=P.autotypenumbers,A={},h={},p={},k={},w={},R={},O={},j={},V={},H={},F,U;for(F=0;F{var c=qr(),g=Jo(),I=kn(),S=Vs(),t=Ls();Z.exports=function(e,r,a,n){var o=e._fullLayout;if(r.length===0){t.redrawComponents(e);return}function i(P){var M=P.xaxis,C=P.yaxis;o._defs.select("#"+P.clipId+"> rect").call(S.setTranslate,0,0).call(S.setScale,1,1),P.plot.call(S.setTranslate,M._offset,C._offset).call(S.setScale,1,1);var A=P.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(S.setPointGroupScale,1,1),A.selectAll(".textpoint").call(S.setTextPointsScale,1,1),A.call(S.hideOutsideRangePoints,P)}function l(P,M){var C=P.plotinfo,A=C.xaxis,h=C.yaxis,p=A._length,k=h._length,w=!!P.xr1,R=!!P.yr1,O=[];if(w){var j=I.simpleMap(P.xr0,A.r2l),V=I.simpleMap(P.xr1,A.r2l),H=j[1]-j[0],F=V[1]-V[0];O[0]=(j[0]*(1-M)+M*V[0]-j[0])/(j[1]-j[0])*p,O[2]=p*(1-M+M*F/H),A.range[0]=A.l2r(j[0]*(1-M)+M*V[0]),A.range[1]=A.l2r(j[1]*(1-M)+M*V[1])}else O[0]=0,O[2]=p;if(R){var U=I.simpleMap(P.yr0,h.r2l),W=I.simpleMap(P.yr1,h.r2l),q=U[1]-U[0],J=W[1]-W[0];O[1]=(U[1]*(1-M)+M*W[1]-U[1])/(U[0]-U[1])*k,O[3]=k*(1-M+M*J/q),h.range[0]=A.l2r(U[0]*(1-M)+M*W[0]),h.range[1]=h.l2r(U[1]*(1-M)+M*W[1])}else O[1]=0,O[3]=k;t.drawOne(e,A,{skipTitle:!0}),t.drawOne(e,h,{skipTitle:!0}),t.redrawComponents(e,[A._id,h._id]);var lt=w?p/O[2]:1,yt=R?k/O[3]:1,mt=w?O[0]:0,st=R?O[1]:0,tt=w?O[0]/O[2]*p:0,dt=R?O[1]/O[3]*k:0,rt=A._offset-tt,at=h._offset-dt;C.clipRect.call(S.setTranslate,mt,st).call(S.setScale,1/lt,1/yt),C.plot.call(S.setTranslate,rt,at).call(S.setScale,lt,yt),S.setPointGroupScale(C.zoomScalePts,1/lt,1/yt),S.setTextPointsScale(C.zoomScaleTxt,1/lt,1/yt)}var f;n&&(f=n());function x(){for(var P={},M=0;Ma.duration?(x(),u=window.cancelAnimationFrame(_)):u=window.requestAnimationFrame(_)}return v=Date.now(),u=window.requestAnimationFrame(_),Promise.resolve()}}),Mf=Dt(Q=>{var Z=qr(),c=Jo(),g=kn(),I=Kc(),S=Vs(),t=ud().getModuleCalcData,e=Rc(),r=ic(),a=Dp(),n=g.ensureSingle;function o(T,u,b){return g.ensureSingle(T,u,b,function(_){_.datum(b)})}var i=r.zindexSeparator;Q.name="cartesian",Q.attr=["xaxis","yaxis"],Q.idRoot=["x","y"],Q.idRegex=r.idRegex,Q.attrRegex=r.attrRegex,Q.attributes=_0(),Q.layoutAttributes=Td(),Q.supplyLayoutDefaults=Bw(),Q.transitionAxes=E6(),Q.finalizeSubplots=function(T,u){var b=u._subplots,_=b.xaxis,P=b.yaxis,M=b.cartesian,C=M,A={},h={},p,k,w;for(p=0;p0){var O=R.id;if(O.indexOf(i)!==-1)continue;O+=i+(p+1),R=g.extendFlat({},R,{id:O,plot:P._cartesianlayer.selectAll(".subplot").select("."+O)})}for(var j=[],V,H=0;H1&&(J+=i+q),W.push(A+J),C=0;C1,w=u.mainplotinfo;if(!u.mainplot||k)if(p)u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.xaxislayer=n(_,"g","xaxislayer-above"),u.yaxislayer=n(_,"g","yaxislayer-above");else{if(!C){var R=n(_,"g","layer-subplot");u.shapelayer=n(R,"g","shapelayer"),u.imagelayer=n(R,"g","imagelayer"),w&&k?(u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer):(u.minorGridlayer=n(_,"g","minor-gridlayer"),u.gridlayer=n(_,"g","gridlayer"),u.zerolinelayer=n(_,"g","zerolinelayer"));var O=n(_,"g","layer-between");u.shapelayerBetween=n(O,"g","shapelayer"),u.imagelayerBetween=n(O,"g","imagelayer"),n(_,"path","xlines-below"),n(_,"path","ylines-below"),u.overlinesBelow=n(_,"g","overlines-below"),n(_,"g","xaxislayer-below"),n(_,"g","yaxislayer-below"),u.overaxesBelow=n(_,"g","overaxes-below")}u.overplot=n(_,"g","overplot"),u.plot=n(u.overplot,"g",P),w&&k?u.zerolinelayerAbove=w.zerolinelayerAbove:u.zerolinelayerAbove=n(_,"g","zerolinelayer-above"),C||(u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.overlinesAbove=n(_,"g","overlines-above"),n(_,"g","xaxislayer-above"),n(_,"g","yaxislayer-above"),u.overaxesAbove=n(_,"g","overaxes-above"),u.xlines=_.select(".xlines-"+A),u.ylines=_.select(".ylines-"+h),u.xaxislayer=_.select(".xaxislayer-"+A),u.yaxislayer=_.select(".yaxislayer-"+h))}else{var j=w.plotgroup,V=P+"-x",H=P+"-y";u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer,u.zerolinelayerAbove=w.zerolinelayerAbove,n(w.overlinesBelow,"path",V),n(w.overlinesBelow,"path",H),n(w.overaxesBelow,"g",V),n(w.overaxesBelow,"g",H),u.plot=n(w.overplot,"g",P),n(w.overlinesAbove,"path",V),n(w.overlinesAbove,"path",H),n(w.overaxesAbove,"g",V),n(w.overaxesAbove,"g",H),u.xlines=j.select(".overlines-"+A).select("."+V),u.ylines=j.select(".overlines-"+h).select("."+H),u.xaxislayer=j.select(".overaxes-"+A).select("."+V),u.yaxislayer=j.select(".overaxes-"+h).select("."+H)}C||(p||(o(u.minorGridlayer,"g",u.xaxis._id),o(u.minorGridlayer,"g",u.yaxis._id),u.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),o(u.gridlayer,"g",u.xaxis._id),o(u.gridlayer,"g",u.yaxis._id),u.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),u.xlines.style("fill","none").classed("crisp",!0),u.ylines.style("fill","none").classed("crisp",!0))}function y(T,u){if(T){var b={};T.each(function(h){var p=h[0],k=Z.select(this);k.remove(),v(p,u),b[p]=!0});for(var _ in u._plots)for(var P=u._plots[_],M=P.overlays||[],C=0;C{var c=Tc();Z.exports={hasLines:c.hasLines,hasMarkers:c.hasMarkers,hasText:c.hasText,isBubble:c.isBubble,attributes:ef(),layoutAttributes:vg(),supplyDefaults:Dw(),crossTraceDefaults:Fw(),supplyLayoutDefaults:Rw(),calc:me().calc,crossTraceCalc:An(),arraysToCalcdata:ct(),plot:Ka(),colorbar:xo(),formatLabels:Ws(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:Md(),selectPoints:Rf(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Mf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),ex=Dt((Q,Z)=>{var c=qr(),g=hi(),I=$_(),S=kn(),t=S.strScale,e=S.strRotate,r=S.strTranslate;Z.exports=function(a,n,o){var i=a.node(),l=I[o.arrowhead||0],f=I[o.startarrowhead||0],x=(o.arrowwidth||1)*(o.arrowsize||1),y=(o.arrowwidth||1)*(o.startarrowsize||1),v=n.indexOf("start")>=0,T=n.indexOf("end")>=0,u=l.backoff*x+o.standoff,b=f.backoff*y+o.startstandoff,_,P,M,C;if(i.nodeName==="line"){_={x:+a.attr("x1"),y:+a.attr("y1")},P={x:+a.attr("x2"),y:+a.attr("y2")};var A=_.x-P.x,h=_.y-P.y;if(M=Math.atan2(h,A),C=M+Math.PI,u&&b&&u+b>Math.sqrt(A*A+h*h)){q();return}if(u){if(u*u>A*A+h*h){q();return}var p=u*Math.cos(M),k=u*Math.sin(M);P.x+=p,P.y+=k,a.attr({x2:P.x,y2:P.y})}if(b){if(b*b>A*A+h*h){q();return}var w=b*Math.cos(M),R=b*Math.sin(M);_.x-=w,_.y-=R,a.attr({x1:_.x,y1:_.y})}}else if(i.nodeName==="path"){var O=i.getTotalLength(),j="";if(O{var c=qr(),g=Jo(),I=Kc(),S=kn(),t=S.strTranslate,e=Ls(),r=hi(),a=Vs(),n=tf(),o=ec(),i=P0(),l=up(),f=mu().arrayEditor,x=ex();Z.exports={draw:y,drawOne:v,drawRaw:u};function y(b){var _=b._fullLayout;_._infolayer.selectAll(".annotation").remove();for(var P=0;P<_.annotations.length;P++)_.annotations[P].visible&&v(b,P);return I.previousPromises(b)}function v(b,_){var P=b._fullLayout,M=P.annotations[_]||{},C=e.getFromId(b,M.xref),A=e.getFromId(b,M.yref);C&&C.setScale(),A&&A.setScale(),u(b,M,_,!1,C,A)}function T(b,_,P,M,C){var A=C[P],h=C[P+"ref"],p=P.indexOf("y")!==-1,k=e.getRefType(h)==="domain",w=p?M.h:M.w;return b?k?A+(p?-_:_)/b._length:b.p2r(b.r2p(A)+_):A+(p?-_:_)/w}function u(b,_,P,M,C,A){var h=b._fullLayout,p=b._fullLayout._size,k=b._context.edits,w,R;M?(w="annotation-"+M,R=M+".annotations"):(w="annotation",R="annotations");var O=f(b.layout,R,_),j=O.modifyBase,V=O.modifyItem,H=O.getUpdateObj;h._infolayer.selectAll("."+w+'[data-index="'+P+'"]').remove();var F="clip"+h._uid+"_ann"+P;if(!_._input||_.visible===!1){c.selectAll("#"+F).remove();return}var U={x:{},y:{}},W=+_.textangle||0,q=h._infolayer.append("g").classed(w,!0).attr("data-index",String(P)).style("opacity",_.opacity),J=q.append("g").classed("annotation-text-g",!0),lt=k[_.showarrow?"annotationTail":"annotationPosition"],yt=_.captureevents||k.annotationText||lt;function mt(Pt){var qt={index:P,annotation:_._input,fullAnnotation:_,event:Pt};return M&&(qt.subplotId=M),qt}var st=J.append("g").style("pointer-events",yt?"all":null).call(i,"pointer").on("click",function(){b._dragging=!1,b.emit("plotly_clickannotation",mt(c.event))});_.hovertext&&st.on("mouseover",function(){var Pt=_.hoverlabel,qt=Pt.font,Wt=this.getBoundingClientRect(),Jt=b.getBoundingClientRect();n.loneHover({x0:Wt.left-Jt.left,x1:Wt.right-Jt.left,y:(Wt.top+Wt.bottom)/2-Jt.top,text:_.hovertext,color:Pt.bgcolor,borderColor:Pt.bordercolor,fontFamily:qt.family,fontSize:qt.size,fontColor:qt.color,fontWeight:qt.weight,fontStyle:qt.style,fontVariant:qt.variant,fontShadow:qt.fontShadow,fontLineposition:qt.fontLineposition,fontTextcase:qt.fontTextcase},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:b})}).on("mouseout",function(){n.loneUnhover(h._hoverlayer.node())});var tt=_.borderwidth,dt=_.borderpad,rt=tt+dt,at=st.append("rect").attr("class","bg").style("stroke-width",tt+"px").call(r.stroke,_.bordercolor).call(r.fill,_.bgcolor),vt=_.width||_.height,it=h._topclips.selectAll("#"+F).data(vt?[0]:[]);it.enter().append("clipPath").classed("annclip",!0).attr("id",F).append("rect"),it.exit().remove();var Y=_.font,ft=h._meta?S.templateString(_.text,h._meta):_.text,ut=st.append("text").classed("annotation-text",!0).text(ft);function kt(Pt){return Pt.call(a.font,Y).attr({"text-anchor":{left:"start",right:"end"}[_.align]||"middle"}),o.convertToTspans(Pt,b,It),Pt}function It(){var Pt=ut.selectAll("a");if(Pt.size()===1&&Pt.text()===ut.text()){var qt=st.insert("a",":first-child").attr({"xlink:xlink:href":Pt.attr("xlink:href"),"xlink:xlink:show":Pt.attr("xlink:show")}).style({cursor:"pointer"});qt.node().appendChild(at.node())}var Wt=st.select(".annotation-text-math-group"),Jt=!Wt.empty(),ge=a.bBox((Jt?Wt:ut).node()),fe=ge.width,pe=ge.height,se=_.width||fe,Tt=_.height||pe,Lt=Math.round(se+2*rt),Mt=Math.round(Tt+2*rt);function ee(oi,$n){return $n==="auto"&&(oi<1/3?$n="left":oi>2/3?$n="right":$n="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$n]}for(var ve=!1,oe=["x","y"],Te=0;Te1)&&(cr===Ge?(le=ur.r2fraction(_["a"+He]),(le<0||le>1)&&(ve=!0)):ve=!0),ne=ur._offset+ur.r2p(_[He]),St=.5}else{var we=re==="domain";He==="x"?(gt=_[He],ne=we?ur._offset+ur._length*gt:ne=p.l+p.w*gt):(gt=1-_[He],ne=we?ur._offset+ur._length*gt:ne=p.t+p.h*gt),St=_.showarrow?.5:gt}if(_.showarrow){Gt.head=ne;var Ue=_["a"+He];if(Nt=Wr*ee(.5,_.xanchor)-br*ee(.5,_.yanchor),cr===Ge){var qe=e.getRefType(cr);qe==="domain"?(He==="y"&&(Ue=1-Ue),Gt.tail=ur._offset+ur._length*Ue):qe==="paper"?He==="y"?(Ue=1-Ue,Gt.tail=p.t+p.h*Ue):Gt.tail=p.l+p.w*Ue:Gt.tail=ur._offset+ur.r2p(Ue),Ct=Nt}else Gt.tail=ne+Ue,Ct=Nt+Ue;Gt.text=Gt.tail+Nt;var or=h[He==="x"?"width":"height"];if(Ge==="paper"&&(Gt.head=S.constrain(Gt.head,1,or-1)),cr==="pixel"){var Sr=-Math.max(Gt.tail-3,Gt.text),Ar=Math.min(Gt.tail+3,Gt.text)-or;Sr>0?(Gt.tail+=Sr,Gt.text+=Sr):Ar>0&&(Gt.tail-=Ar,Gt.text-=Ar)}Gt.tail+=Le,Gt.head+=Le}else Nt=Xr*ee(St,nn),Ct=Nt,Gt.text=ne+Nt;Gt.text+=Le,Nt+=Le,Ct+=Le,_["_"+He+"padplus"]=Xr/2+Ct,_["_"+He+"padminus"]=Xr/2-Ct,_["_"+He+"size"]=Xr,_["_"+He+"shift"]=Nt}if(ve){st.remove();return}var mr=0,Qr=0;if(_.align!=="left"&&(mr=(se-fe)*(_.align==="center"?.5:1)),_.valign!=="top"&&(Qr=(Tt-pe)*(_.valign==="middle"?.5:1)),Jt)Wt.select("svg").attr({x:rt+mr-1,y:rt+Qr}).call(a.setClipUrl,vt?F:null,b);else{var Hn=rt+Qr-ge.top,Wn=rt+mr-ge.left;ut.call(o.positionText,Wn,Hn).call(a.setClipUrl,vt?F:null,b)}it.select("rect").call(a.setRect,rt,rt,se,Tt),at.call(a.setRect,tt/2,tt/2,Lt-tt,Mt-tt),st.call(a.setTranslate,Math.round(U.x.text-Lt/2),Math.round(U.y.text-Mt/2)),J.attr({transform:"rotate("+W+","+U.x.text+","+U.y.text+")"});var Xn=function(oi,$n){q.selectAll(".annotation-arrow-g").remove();var sa=U.x.head,Zi=U.y.head,We=U.x.tail+oi,nr=U.y.tail+$n,fr=U.x.text+oi,_r=U.y.text+$n,tn=S.rotationXYMatrix(W,fr,_r),Cn=S.apply2DTransform(tn),Tn=S.apply2DTransform2(tn),Mn=+at.attr("width"),fi=+at.attr("height"),ki=fr-.5*Mn,Oi=ki+Mn,ji=_r-.5*fi,Xi=ji+fi,ci=[[ki,ji,ki,Xi],[ki,Xi,Oi,Xi],[Oi,Xi,Oi,ji],[Oi,ji,ki,ji]].map(Tn);if(!ci.reduce(function(Ce,dr){return Ce^!!S.segmentsIntersect(sa,Zi,sa+1e6,Zi+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){ci.forEach(function(Ce){var dr=S.segmentsIntersect(We,nr,sa,Zi,Ce[0],Ce[1],Ce[2],Ce[3]);dr&&(We=dr.x,nr=dr.y)});var za=_.arrowwidth,Wa=_.arrowcolor,ze=_.arrowside,Ie=q.append("g").style({opacity:r.opacity(Wa)}).classed("annotation-arrow-g",!0),Rr=Ie.append("path").attr("d","M"+We+","+nr+"L"+sa+","+Zi).style("stroke-width",za+"px").call(r.stroke,r.rgb(Wa));if(x(Rr,ze,_),k.annotationPosition&&Rr.node().parentNode&&!M){var $r=sa,Gr=Zi;if(_.standoff){var Br=Math.sqrt(Math.pow(sa-We,2)+Math.pow(Zi-nr,2));$r+=_.standoff*(We-sa)/Br,Gr+=_.standoff*(nr-Zi)/Br}var Yr=Ie.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(We-$r)+","+(nr-Gr),transform:t($r,Gr)}).style("stroke-width",za+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),pn,on;l.init({element:Yr.node(),gd:b,prepFn:function(){var Ce=a.getTranslate(st);pn=Ce.x,on=Ce.y,C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0)},moveFn:function(Ce,dr){var Hr=Cn(pn,on),_n=Hr[0]+Ce,Fn=Hr[1]+dr;st.call(a.setTranslate,_n,Fn),V("x",T(C,Ce,"x",p,_)),V("y",T(A,dr,"y",p,_)),_.axref===_.xref&&V("ax",T(C,Ce,"ax",p,_)),_.ayref===_.yref&&V("ay",T(A,dr,"ay",p,_)),Ie.attr("transform",t(Ce,dr)),J.attr({transform:"rotate("+W+","+_n+","+Fn+")"})},doneFn:function(){g.call("_guiRelayout",b,H());var Ce=document.querySelector(".js-notes-box-panel");Ce&&Ce.redraw(Ce.selectedObj)}})}}};if(_.showarrow&&Xn(0,0),lt){var Ii;l.init({element:st.node(),gd:b,prepFn:function(){Ii=J.attr("transform")},moveFn:function(oi,$n){var sa="pointer";if(_.showarrow)_.axref===_.xref?V("ax",T(C,oi,"ax",p,_)):V("ax",_.ax+oi),_.ayref===_.yref?V("ay",T(A,$n,"ay",p.w,_)):V("ay",_.ay+$n),Xn(oi,$n);else{if(M)return;var Zi,We;if(C)Zi=T(C,oi,"x",p,_);else{var nr=_._xsize/p.w,fr=_.x+(_._xshift-_.xshift)/p.w-nr/2;Zi=l.align(fr+oi/p.w,nr,0,1,_.xanchor)}if(A)We=T(A,$n,"y",p,_);else{var _r=_._ysize/p.h,tn=_.y-(_._yshift+_.yshift)/p.h-_r/2;We=l.align(tn-$n/p.h,_r,0,1,_.yanchor)}V("x",Zi),V("y",We),(!C||!A)&&(sa=l.getCursor(C?.5:Zi,A?.5:We,_.xanchor,_.yanchor))}J.attr({transform:t(oi,$n)+Ii}),i(st,sa)},clickFn:function(oi,$n){_.captureevents&&b.emit("plotly_clickannotation",mt($n))},doneFn:function(){i(st),g.call("_guiRelayout",b,H());var oi=document.querySelector(".js-notes-box-panel");oi&&oi.redraw(oi.selectedObj)}})}}k.annotationText?ut.call(o.makeEditable,{delegate:st,gd:b}).call(kt).on("edit",function(Pt){_.text=Pt,this.call(kt),V("text",Pt),C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0),g.call("_guiRelayout",b,H())}):ut.call(kt)}}),C6=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=mu().arrayEditor;Z.exports={hasClickToShow:S,onClick:t};function S(a,n){var o=e(a,n);return o.on.length>0||o.explicitOff.length>0}function t(a,n){var o=e(a,n),i=o.on,l=o.off.concat(o.explicitOff),f={},x=a._fullLayout.annotations,y,v;if(i.length||l.length){for(y=0;y{var c=kn(),g=hi();Z.exports=function(I,S,t,e){e("opacity");var r=e("bgcolor"),a=e("bordercolor"),n=g.opacity(a);e("borderpad");var o=e("borderwidth"),i=e("showarrow");e("text",i?" ":t._dfltTitle.annotation),e("textangle"),c.coerceFont(e,"font",t.font),e("width"),e("align");var l=e("height");if(l&&e("valign"),i){var f=e("arrowside"),x,y;f.indexOf("end")!==-1&&(x=e("arrowhead"),y=e("arrowsize")),f.indexOf("start")!==-1&&(e("startarrowhead",x),e("startarrowsize",y)),e("arrowcolor",n?S.bordercolor:g.defaultLine),e("arrowwidth",(n&&o||1)*2),e("standoff"),e("startstandoff")}var v=e("hovertext"),T=t.hoverlabel||{};if(v){var u=e("hoverlabel.bgcolor",T.bgcolor||(g.opacity(r)?g.rgb(r):g.defaultLine)),b=e("hoverlabel.bordercolor",T.bordercolor||g.contrast(u)),_=c.extendFlat({},T.font);_.color||(_.color=b),c.coerceFont(e,"hoverlabel.font",_)}e("captureevents",!!v)}}),J_=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Nw(),t=gm();Z.exports=function(r,a){I(r,a,{name:"annotations",handleItemDefaults:e})};function e(r,a,n){function o(p,k){return c.coerce(r,a,t,p,k)}var i=o("visible"),l=o("clicktoshow");if(i||l){S(r,a,n,o);for(var f=a.showarrow,x=["x","y"],y=[-10,-30],v={_fullLayout:n},T=0;T<2;T++){var u=x[T],b=g.coerceRef(r,a,v,u,"","paper");if(b!=="paper"){var _=g.getFromId(v,b);_._annIndices.push(a._index)}if(g.coercePosition(a,v,o,b,u,.5),f){var P="a"+u,M=g.coerceRef(r,a,v,P,"pixel",["pixel","paper"]);M!=="pixel"&&M!==b&&(M=a[P]="pixel");var C=M==="pixel"?y[T]:.4;g.coercePosition(a,v,o,M,P,C)}o(u+"anchor"),o(u+"shift")}if(c.noneOrAll(r,a,["x","y"]),f&&c.noneOrAll(r,a,["ax","ay"]),l){var A=o("xclick"),h=o("yclick");a._xclick=A===void 0?a.x:g.cleanPosition(A,v,a.xref),a._yclick=h===void 0?a.y:g.cleanPosition(h,v,a.yref)}}}}),jw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=X_().draw;Z.exports=function(e){var r=e._fullLayout,a=c.filterVisible(r.annotations);if(a.length&&e._fullData.length)return c.syncOrAsync([I,S],e)};function S(e){var r=e._fullLayout;c.filterVisible(r.annotations).forEach(function(a){var n=g.getFromId(e,a.xref),o=g.getFromId(e,a.yref),i=g.getRefType(a.xref),l=g.getRefType(a.yref);a._extremes={},i==="range"&&t(a,n),l==="range"&&t(a,o)})}function t(e,r){var a=r._id,n=a.charAt(0),o=e[n],i=e["a"+n],l=e[n+"ref"],f=e["a"+n+"ref"],x=e["_"+n+"padplus"],y=e["_"+n+"padminus"],v={x:1,y:-1}[n]*e[n+"shift"],T=3*e.arrowsize*e.arrowwidth||0,u=T+v,b=T-v,_=3*e.startarrowsize*e.arrowwidth||0,P=_+v,M=_-v,C;if(f===l){var A=g.findExtremes(r,[r.r2c(o)],{ppadplus:u,ppadminus:b}),h=g.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(x,P),ppadminus:Math.max(y,M)});C={min:[A.min[0],h.min[0]],max:[A.max[0],h.max[0]]}}else P=i?P+i:P,M=i?M-i:M,C=g.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(x,u,P),ppadminus:Math.max(y,b,M)});e._extremes[a]=C}}),L6=Dt((Q,Z)=>{var c=Yi(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(!(r||a))return;var n=I._fullLayout.annotations,o=S._id.charAt(0),i,l;function f(y){var v=i[y],T=null;r?T=g(v,S.range):T=Math.pow(10,v),c(T)||(T=null),e(l+y,T)}for(var x=0;x{var c=X_(),g=C6();Z.exports={moduleType:"component",name:"annotations",layoutAttributes:gm(),supplyLayoutDefaults:J_(),includeBasePlot:Eg()("annotations"),calcAutorange:jw(),draw:c.draw,drawOne:c.drawOne,drawRaw:c.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:L6()}}),P6=Dt((Q,Z)=>{var c=gm(),g=Yc().overrideAll,I=mu().templatedArray;Z.exports=g(I("annotation",{visible:c.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:c.xanchor,xshift:c.xshift,yanchor:c.yanchor,yshift:c.yshift,text:c.text,textangle:c.textangle,font:c.font,width:c.width,height:c.height,opacity:c.opacity,align:c.align,valign:c.valign,bgcolor:c.bgcolor,bordercolor:c.bordercolor,borderpad:c.borderpad,borderwidth:c.borderwidth,showarrow:c.showarrow,arrowcolor:c.arrowcolor,arrowhead:c.arrowhead,startarrowhead:c.startarrowhead,arrowside:c.arrowside,arrowsize:c.arrowsize,startarrowsize:c.startarrowsize,arrowwidth:c.arrowwidth,standoff:c.standoff,startstandoff:c.startstandoff,hovertext:c.hovertext,hoverlabel:c.hoverlabel,captureevents:c.captureevents}),"calc","from-root")}),mF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Nw(),t=P6();Z.exports=function(r,a,n){I(r,a,{name:"annotations",handleItemDefaults:e,fullLayout:n.fullLayout})};function e(r,a,n,o){function i(x,y){return c.coerce(r,a,t,x,y)}function l(x){var y=x+"axis",v={_fullLayout:{}};return v._fullLayout[y]=n[y],g.coercePosition(a,v,i,x,x,.5)}var f=i("visible");f&&(S(r,a,o.fullLayout,i),l("x"),l("y"),l("z"),c.noneOrAll(r,a,["x","y","z"]),a.xref="x",a.yref="y",a.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),a.showarrow&&(a.axref="pixel",a.ayref="pixel",i("ax",-10),i("ay",-30),c.noneOrAll(r,a,["ax","ay"])))}}),gF=Dt((Q,Z)=>{var c=kn(),g=Ls();Z.exports=function(S){for(var t=S.fullSceneLayout,e=t.annotations,r=0;r{function c(I,S){var t=[0,0,0,0],e,r;for(e=0;e<4;++e)for(r=0;r<4;++r)t[r]+=I[4*e+r]*S[e];return t}function g(I,S){var t=c(I.projection,c(I.view,c(I.model,[S[0],S[1],S[2],1])));return t}Z.exports=g}),vF=Dt((Q,Z)=>{var c=X_().drawRaw,g=FM(),I=["x","y","z"];Z.exports=function(S){for(var t=S.fullSceneLayout,e=S.dataScale,r=t.annotations,a=0;a1){o=!0;break}}o?S.fullLayout._infolayer.select(".annotation-"+S.id+'[data-index="'+a+'"]').remove():(n._pdata=g(S.glplot.cameraParams,[t.xaxis.r2l(n.x)*e[0],t.yaxis.r2l(n.y)*e[1],t.zaxis.r2l(n.z)*e[2]]),c(S.graphDiv,n,a,S.id,n._xa,n._ya))}}}),yF=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:P6()}}},layoutAttributes:P6(),handleDefaults:mF(),includeBasePlot:I,convert:gF(),draw:vF()};function I(S,t){var e=c.subplotsRegistry.gl3d;if(e)for(var r=e.attrRegex,a=Object.keys(S),n=0;n{var c=gm(),g=da(),I=ef().line,S=kd().dash,t=Ia().extendFlat,e=mu().templatedArray;Ky();var r=Ho(),{shapeTexttemplateAttrs:a,templatefallbackAttrs:n}=Zu(),o=_1();Z.exports=e("shape",{visible:t({},r.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},r.legend,{editType:"calc+arraydraw"}),legendgroup:t({},r.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},r.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:g({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},r.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},r.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:t({},c.xref,{}),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:t({},c.yref,{}),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:t({},I.color,{editType:"arraydraw"}),width:t({},I.width,{editType:"calc+arraydraw"}),dash:t({},S,{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:a({},{keys:Object.keys(o)}),texttemplatefallback:n({editType:"arraydraw"}),font:g({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"})}),xF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=RM(),t=wp();Z.exports=function(a,n){I(a,n,{name:"shapes",handleItemDefaults:r})};function e(a,n){return a?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function r(a,n,o){function i(tt,dt){return c.coerce(a,n,S,tt,dt)}n._isShape=!0;var l=i("visible");if(l){var f=i("showlegend");f&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),c.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var x=i("path"),y=x?"path":"rect",v=i("type",y),T=v!=="path";T&&delete n.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var u=i("line.width");u&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),_=i("ysizemode"),P=["x","y"],M=0;M<2;M++){var C=P[M],A=C+"anchor",h=C==="x"?b:_,p={_fullLayout:o},k,w,R,O=g.coerceRef(a,n,p,C,void 0,"paper"),j=g.getRefType(O);if(j==="range"?(k=g.getFromId(p,O),k._shapeIndices.push(n._index),R=t.rangeToShapePosition(k),w=t.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(i(C+"0shift"),i(C+"1shift"))):w=R=c.identity,T){var V=.25,H=.75,F=C+"0",U=C+"1",W=a[F],q=a[U];a[F]=w(a[F],!0),a[U]=w(a[U],!0),h==="pixel"?(i(F,0),i(U,10)):(g.coercePosition(n,p,i,O,F,V),g.coercePosition(n,p,i,O,U,H)),n[F]=R(n[F]),n[U]=R(n[U]),a[F]=W,a[U]=q}if(h==="pixel"){var J=a[A];a[A]=w(a[A],!0),g.coercePosition(n,p,i,O,A,.25),n[A]=R(n[A]),a[A]=J}}T&&c.noneOrAll(a,n,["x0","x1","y0","y1"]);var lt=v==="line",yt,mt;if(T&&(yt=i("label.texttemplate"),i("label.texttemplatefallback")),yt||(mt=i("label.text")),mt||yt){i("label.textangle");var st=i("label.textposition",lt?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(lt,st)),i("label.padding"),c.coerceFont(i,"label.font",o.font)}}}}),_F=Dt((Q,Z)=>{var c=hi(),g=kn();function I(S,t){return S?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Z.exports=function(S,t,e){e("newshape.visible"),e("newshape.name"),e("newshape.showlegend"),e("newshape.legend"),e("newshape.legendwidth"),e("newshape.legendgroup"),e("newshape.legendgrouptitle.text"),g.coerceFont(e,"newshape.legendgrouptitle.font"),e("newshape.legendrank"),e("newshape.drawdirection"),e("newshape.layer"),e("newshape.fillcolor"),e("newshape.fillrule"),e("newshape.opacity");var r=e("newshape.line.width");if(r){var a=(S||{}).plot_bgcolor||"#FFF";e("newshape.line.color",c.contrast(a)),e("newshape.line.dash")}var n=S.dragmode==="drawline",o=e("newshape.label.text"),i=e("newshape.label.texttemplate");if(e("newshape.label.texttemplatefallback"),o||i){e("newshape.label.textangle");var l=e("newshape.label.textposition",n?"middle":"middle center");e("newshape.label.xanchor"),e("newshape.label.yanchor",I(n,l)),e("newshape.label.padding"),g.coerceFont(e,"newshape.label.font",t.font)}e("activeshape.fillcolor"),e("activeshape.opacity")}}),bF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Hy(),S=wp();Z.exports=function(n){var o=n._fullLayout,i=c.filterVisible(o.shapes);if(!(!i.length||!n._fullData.length))for(var l=0;l0?u+y:y;return{ppad:y,ppadplus:v?_:P,ppadminus:v?P:_}}else return{ppad:y}}function a(n,o,i){var l=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",x,y,v=0,T=0,u=f?n.r2c:n.d2c,b=o[l+"sizemode"]==="scaled";if(b?(x=o[l+"0"],y=o[l+"1"],f&&(v=o[l+"0shift"],T=o[l+"1shift"])):(x=o[l+"anchor"],y=o[l+"anchor"]),x!==void 0)return[u(x)+v,u(y)+T];if(o.path){var _=1/0,P=-1/0,M=o.path.match(I.segmentRE),C,A,h,p,k;for(n.type==="date"&&(u=S.decodeDate(u)),C=0;CP&&(P=k)));if(P>=_)return[_,P]}}}),wF=Dt((Q,Z)=>{var c=U_();Z.exports={moduleType:"component",name:"shapes",layoutAttributes:RM(),supplyLayoutDefaults:xF(),supplyDrawNewShapeDefaults:_F(),includeBasePlot:Eg()("shapes"),calcAutorange:bF(),draw:c.draw,drawOne:c.drawOne}}),BM=Dt((Q,Z)=>{var c=ic(),g=mu().templatedArray;Ky(),Z.exports=g("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",c.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",c.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),kF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=BM(),t="images";Z.exports=function(r,a){var n={name:t,handleItemDefaults:e};I(r,a,n)};function e(r,a,n){function o(b,_){return c.coerce(r,a,S,b,_)}var i=o("source"),l=o("visible",!!i);if(!l)return a;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var f={_fullLayout:n},x=["x","y"],y=0;y<2;y++){var v=x[y],T=g.coerceRef(r,a,f,v,"paper",void 0);if(T!=="paper"){var u=g.getFromId(f,T);u._imgIndices.push(a._index)}g.coercePosition(a,f,o,T,v,0)}return a}}),TF=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=Ls(),S=Rc(),t=Dp();Z.exports=function(e){var r=e._fullLayout,a=[],n={},o=[],i,l;for(l=0;l{var c=Yi(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(r||a){for(var n=I._fullLayout.images,o=S._id.charAt(0),i,l,f=0;f{Z.exports={moduleType:"component",name:"images",layoutAttributes:BM(),supplyLayoutDefaults:kF(),includeBasePlot:Eg()("images"),draw:TF(),convertCoords:AF()}}),I6=Dt((Q,Z)=>{Z.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),NM=Dt((Q,Z)=>{var c=da(),g=wi(),I=Ia().extendFlat,S=Yc().overrideAll,t=Ry(),e=mu().templatedArray,r=e("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}});Z.exports=S(e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:r,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:I(t({editType:"arraydraw"}),{}),font:c({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),SF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=NM(),S=I6(),t=S.name,e=I.buttons;Z.exports=function(n,o){var i={name:t,handleItemDefaults:r};g(n,o,i)};function r(n,o,i){function l(y,v){return c.coerce(n,o,I,y,v)}var f=g(n,o,{name:"buttons",handleItemDefaults:a}),x=l("visible",f.length>0);x&&(l("active"),l("direction"),l("type"),l("showactive"),l("x"),l("y"),c.noneOrAll(n,o,["x","y"]),l("xanchor"),l("yanchor"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),c.coerceFont(l,"font",i.font),l("bgcolor",i.paper_bgcolor),l("bordercolor"),l("borderwidth"))}function a(n,o){function i(f,x){return c.coerce(n,o,e,f,x)}var l=i("visible",n.method==="skip"||Array.isArray(n.args));l&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}),EF=Dt((Q,Z)=>{Z.exports=t;var c=qr(),g=hi(),I=Vs(),S=kn();function t(e,r,a){this.gd=e,this.container=r,this.id=a,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})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(e,r,a){var n=this.gd._fullLayout,o=n.width,i=n.height;this.position=e;var l=this.position.l,f=this.position.w,x=this.position.t,y=this.position.h,v=this.position.direction,T=v==="down",u=v==="left",b=v==="right",_=v==="up",P=f,M=y,C,A,h,p;!T&&!u&&!b&&!_&&(this.position.direction="down",T=!0);var k=T||_;k?(C=l,A=C+P,T?(h=x,p=Math.min(h+M,i),M=p-h):(p=x+M,h=Math.max(p-M,0),M=p-h)):(h=x,p=h+M,u?(A=l+P,C=Math.max(A-P,0),P=A-C):(C=l,A=Math.min(C+P,o),P=A-C)),this._box={l:C,t:h,w:P,h:M};var w=f>P,R=t.barLength+2*t.barPad,O=t.barWidth+2*t.barPad,j=l,V=x+y;V+O>i&&(V=i-O);var H=this.container.selectAll("rect.scrollbar-horizontal").data(w?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-horizontal",!0).call(g.fill,t.barColor),w?(this.hbar=H.attr({rx:t.barRadius,ry:t.barRadius,x:j,y:V,width:R,height:O}),this._hbarXMin=j+R/2,this._hbarTranslateMax=P-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=y>M,U=t.barWidth+2*t.barPad,W=t.barLength+2*t.barPad,q=l+f,J=x;q+U>o&&(q=o-U);var lt=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);lt.exit().on(".drag",null).remove(),lt.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,t.barColor),F?(this.vbar=lt.attr({rx:t.barRadius,ry:t.barRadius,x:q,y:J,width:U,height:W}),this._vbarYMin=J+W/2,this._vbarTranslateMax=M-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var yt=this.id,mt=C-.5,st=F?A+U+.5:A+.5,tt=h-.5,dt=w?p+O+.5:p+.5,rt=n._topdefs.selectAll("#"+yt).data(w||F?[0]:[]);if(rt.exit().remove(),rt.enter().append("clipPath").attr("id",yt).append("rect"),w||F?(this._clipRect=rt.select("rect").attr({x:Math.floor(mt),y:Math.floor(tt),width:Math.ceil(st)-Math.floor(mt),height:Math.ceil(dt)-Math.floor(tt)}),this.container.call(I.setClipUrl,yt,this.gd),this.bg.attr({x:l,y:x,width:f,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.setClipUrl,null),delete this._clipRect),w||F){var at=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(at);var vt=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault(),c.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));w&&this.hbar.on(".drag",null).call(vt),F&&this.vbar.on(".drag",null).call(vt)}this.setTranslate(r,a)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.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)},t.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=c.event.dx),this.vbar&&(r-=c.event.dy),this.setTranslate(e,r)},t.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=c.event.deltaY),this.vbar&&(r+=c.event.deltaY),this.setTranslate(e,r)},t.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,n=a+this._hbarTranslateMax,o=S.constrain(c.event.x,a,n),i=(o-a)/(n-a),l=this.position.w-this._box.w;e=i*l}if(this.vbar){var f=r+this._vbarYMin,x=f+this._vbarTranslateMax,y=S.constrain(c.event.y,f,x),v=(y-f)/(x-f),T=this.position.h-this._box.h;r=v*T}this.setTranslate(e,r)},t.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=S.constrain(e||0,0,a),r=S.constrain(r||0,0,n),this.translateX=e,this.translateY=r,this.container.call(I.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var o=e/a;this.hbar.call(I.setTranslate,e+o*this._hbarTranslateMax,r)}if(this.vbar){var i=r/n;this.vbar.call(I.setTranslate,e,r+i*this._vbarTranslateMax)}}}),CF=Dt((Q,Z)=>{var c=qr(),g=Kc(),I=hi(),S=Vs(),t=kn(),e=ec(),r=mu().arrayEditor,a=Af().LINE_SPACING,n=I6(),o=EF();Z.exports=function(R){var O=R._fullLayout,j=t.filterVisible(O[n.name]);function V(yt){g.autoMargin(R,p(yt))}var H=O._menulayer.selectAll("g."+n.containerClassName).data(j.length>0?[0]:[]);if(H.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),H.exit().each(function(){c.select(this).selectAll("g."+n.headerGroupClassName).each(V)}).remove(),j.length!==0){var F=H.selectAll("g."+n.headerGroupClassName).data(j,i);F.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=t.ensureSingle(H,"g",n.dropdownButtonGroupClassName,function(yt){yt.style("pointer-events","all")}),W=0;W{var c=I6();Z.exports={moduleType:"component",name:c.name,layoutAttributes:NM(),supplyLayoutDefaults:SF(),draw:CF()}}),Uw=Dt((Q,Z)=>{Z.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}}),jM=Dt((Q,Z)=>{var c=da(),g=Ry(),I=Ia().extendDeepAll,S=Yc().overrideAll,t=El(),e=mu().templatedArray,r=Uw(),a=e("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}});Z.exports=S(e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:a,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:I(g({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:t.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:c({})},font:c({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}),PF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=jM(),S=Uw(),t=S.name,e=I.steps;Z.exports=function(n,o){g(n,o,{name:t,handleItemDefaults:r})};function r(n,o,i){function l(_,P){return c.coerce(n,o,I,_,P)}for(var f=g(n,o,{name:"steps",handleItemDefaults:a}),x=0,y=0;y{var c=qr(),g=Kc(),I=hi(),S=Vs(),t=kn(),e=t.strTranslate,r=ec(),a=mu().arrayEditor,n=Uw(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR;Z.exports=function(H){var F=H._context.staticPlot,U=H._fullLayout,W=y(U,H),q=U._infolayer.selectAll("g."+n.containerClassName).data(W.length>0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",F?null:"ew-resize");function J(st){st._commandObserver&&(st._commandObserver.remove(),delete st._commandObserver),g.autoMargin(H,x(st))}if(q.exit().each(function(){c.select(this).selectAll("g."+n.groupClassName).each(J)}).remove(),W.length!==0){var lt=q.selectAll("g."+n.groupClassName).data(W,v);lt.enter().append("g").classed(n.groupClassName,!0),lt.exit().each(J).remove();for(var yt=0;yt0&&(yt=yt.transition().duration(F.transition.duration).ease(F.transition.easing)),yt.attr("transform",e(lt-n.gripWidth*.5,F._dims.currentValueTotalHeight))}}function R(H,F){var U=H._dims;return U.inputAreaStart+n.stepInset+(U.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,F))}function O(H,F){var U=H._dims;return Math.min(1,Math.max(0,(F-n.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*n.stepInset-2*U.inputAreaStart)))}function j(H,F,U){var W=U._dims,q=t.ensureSingle(H,"rect",n.railTouchRectClass,function(J){J.call(h,F,H,U).style("pointer-events","all")});q.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,n.tickOffset+U.ticklen+W.labelHeight)}).call(I.fill,U.bgcolor).attr("opacity",0),S.setTranslate(q,0,W.currentValueTotalHeight)}function V(H,F){var U=F._dims,W=U.inputAreaLength-n.railInset*2,q=t.ensureSingle(H,"rect",n.railRectClass);q.attr({width:W,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(I.stroke,F.bordercolor).call(I.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),S.setTranslate(q,n.railInset,(U.inputAreaWidth-n.railWidth)*.5+U.currentValueTotalHeight)}}),zF=Dt((Q,Z)=>{var c=Uw();Z.exports={moduleType:"component",name:c.name,layoutAttributes:jM(),supplyLayoutDefaults:PF(),draw:IF()}}),z6=Dt((Q,Z)=>{var c=wi();Z.exports={bgcolor:{valType:"color",dflt:c.background,editType:"plot"},bordercolor:{valType:"color",dflt:c.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"}}),UM=Dt((Q,Z)=>{Z.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"}}),O6=Dt((Q,Z)=>{Z.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}}),OF=Dt(Q=>{var Z=Rc(),c=ec(),g=O6(),I=Af().LINE_SPACING,S=g.name;function t(e){var r=e&&e[S];return r&&r.visible}Q.isVisible=t,Q.makeData=function(e){for(var r=Z.list({_fullLayout:e},"x",!0),a=e.margin,n=[],o=0;o{var c=kn(),g=mu(),I=Rc(),S=z6(),t=UM();Z.exports=function(e,r,a){var n=e[a],o=r[a];if(!(n.rangeslider||r._requestRangeslider[o._id]))return;c.isPlainObject(n.rangeslider)||(n.rangeslider={});var i=n.rangeslider,l=g.newContainer(o,"rangeslider");function f(p,k){return c.coerce(i,l,S,p,k)}var x,y;function v(p,k){return c.coerce(x,y,t,p,k)}var T=f("visible");if(T){f("bgcolor",r.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!o.isValidRange(i.range)),f("range");var u=r._subplots;if(u)for(var b=u.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===I.name2id(a)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),_=c.simpleMap(b,I.id2name),P=0;P<_.length;P++){var M=_[P];x=i[M]||{},y=g.newContainer(l,M,"yaxis");var C=r[M],A;x.range&&C.isValidRange(x.range)&&(A="fixed");var h=v("rangemode",A);h!=="match"&&v("range",C.range.slice())}l._input=i}}}),FF=Dt((Q,Z)=>{var c=Rc().list,g=Y0().getAutoRange,I=O6();Z.exports=function(S){for(var t=c(S,"x",!0),e=0;e{var c=qr(),g=Jo(),I=Kc(),S=kn(),t=S.strTranslate,e=Vs(),r=hi(),a=lp(),n=Mf(),o=Rc(),i=up(),l=P0(),f=O6();Z.exports=function(h){for(var p=h._fullLayout,k=p._rangeSliderData,w=0;w=fe.max)Jt=kt[ge+1];else if(Wt=fe.pmax)Jt=kt[ge+1];else if(Wt0?h.touches[0].clientX:0}function y(h,p,k,w){if(p._context.staticPlot)return;var R=h.select("rect."+f.slideBoxClassName).node(),O=h.select("rect."+f.grabAreaMinClassName).node(),j=h.select("rect."+f.grabAreaMaxClassName).node();function V(){var H=c.event,F=H.target,U=x(H),W=U-h.node().getBoundingClientRect().left,q=w.d2p(k._rl[0]),J=w.d2p(k._rl[1]),lt=i.coverSlip();this.addEventListener("touchmove",yt),this.addEventListener("touchend",mt),lt.addEventListener("mousemove",yt),lt.addEventListener("mouseup",mt);function yt(st){var tt=x(st),dt=+tt-U,rt,at,vt;switch(F){case R:if(vt="ew-resize",q+dt>k._length||J+dt<0)return;rt=q+dt,at=J+dt;break;case O:if(vt="col-resize",q+dt>k._length)return;rt=q+dt,at=J;break;case j:if(vt="col-resize",J+dt<0)return;rt=q,at=J+dt;break;default:vt="ew-resize",rt=W,at=W+dt;break}if(at{var c=kn(),g=z6(),I=UM(),S=OF();Z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:c.extendFlat({},g,{yaxis:I})}}},layoutAttributes:z6(),handleDefaults:DF(),calcAutorange:FF(),draw:RF(),isVisible:S.isVisible,makeData:S.makeData,autoMarginOpts:S.autoMarginOpts}}),D6=Dt((Q,Z)=>{var c=da(),g=wi(),I=mu().templatedArray,S=I("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"});Z.exports={visible:{valType:"boolean",editType:"plot"},buttons:S,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:c({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),VM=Dt((Q,Z)=>{Z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),NF=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=Ad(),t=D6(),e=VM();Z.exports=function(n,o,i,l,f){var x=n.rangeselector||{},y=I.newContainer(o,"rangeselector");function v(P,M){return c.coerce(x,y,t,P,M)}var T=S(x,y,{name:"buttons",handleItemDefaults:r,calendar:f}),u=v("visible",T.length>0);if(u){var b=a(o,i,l);v("x",b[0]),v("y",b[1]),c.noneOrAll(n,o,["x","y"]),v("xanchor"),v("yanchor"),c.coerceFont(v,"font",i.font);var _=v("bgcolor");v("activecolor",g.contrast(_,e.lightAmount,e.darkAmount)),v("bordercolor"),v("borderwidth")}};function r(n,o,i,l){var f=l.calendar;function x(T,u){return c.coerce(n,o,t.buttons,T,u)}var y=x("visible");if(y){var v=x("step");v!=="all"&&(f&&f!=="gregorian"&&(v==="month"||v==="year")?o.stepmode="backward":x("stepmode"),x("count")),x("label")}}function a(n,o,i){for(var l=i.filter(function(v){return o[v].anchor===n._id}),f=0,x=0;x{var c=Di(),g=kn().titleCase;Z.exports=function(S,t){var e=S._name,r={};if(t.step==="all")r[e+".autorange"]=!0;else{var a=I(S,t);r[e+".range[0]"]=a[0],r[e+".range[1]"]=a[1]}return r};function I(S,t){var e=S.range,r=new Date(S.r2l(e[1])),a=t.step,n=c["utc"+g(a)],o=t.count,i;switch(t.stepmode){case"backward":i=S.l2r(+n.offset(r,-o));break;case"todate":var l=n.offset(r,-o);i=S.l2r(+n.ceil(l));break}var f=e[1];return[i,f]}}),UF=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=Kc(),S=hi(),t=Vs(),e=kn(),r=e.strTranslate,a=ec(),n=Rc(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR,x=VM(),y=jF();Z.exports=function(A){var h=A._fullLayout,p=h._infolayer.selectAll(".rangeselector").data(v(A),T);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(k){var w=c.select(this),R=k,O=R.rangeselector,j=w.selectAll("g.button").data(e.filterVisible(O.buttons));j.enter().append("g").classed("button",!0),j.exit().remove(),j.each(function(V){var H=c.select(this),F=y(R,V);V._isActive=u(R,V,F),H.call(b,O,V),H.call(P,O,V,A),H.on("click",function(){A._dragged||g.call("_guiRelayout",A,F)}),H.on("mouseover",function(){V._isHovered=!0,H.call(b,O,V)}),H.on("mouseout",function(){V._isHovered=!1,H.call(b,O,V)})}),C(A,j,O,R._name,w)})};function v(A){for(var h=n.list(A,"x",!0),p=[],k=0;k{Z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:D6()}}},layoutAttributes:D6(),handleDefaults:NF(),draw:UF()}}),jh=Dt(Q=>{var Z=Ia().extendFlat;Q.attributes=function(c,g){c=c||{},g=g||{};var I={valType:"info_array",editType:c.editType,items:[{valType:"number",min:0,max:1,editType:c.editType},{valType:"number",min:0,max:1,editType:c.editType}],dflt:[0,1]};c.name&&c.name+"",c.trace,g.description&&""+g.description;var S={x:Z({},I,{}),y:Z({},I,{}),editType:c.editType};return c.noGridCell||(S.row={valType:"integer",min:0,dflt:0,editType:c.editType},S.column={valType:"integer",min:0,dflt:0,editType:c.editType}),S},Q.defaults=function(c,g,I,S){var t=S&&S.x||[0,1],e=S&&S.y||[0,1],r=g.grid;if(r){var a=I("domain.column");a!==void 0&&(a{var c=kn(),g=Mo().counter,I=jh().attributes,S=ic().idRegex,t=mu(),e={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:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.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:I({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function r(l,f,x){var y=f[x+"axes"],v=Object.keys((l._splomAxes||{})[x]||{});if(Array.isArray(y))return y;if(v.length)return v}function a(l,f){var x=l.grid||{},y=r(f,x,"x"),v=r(f,x,"y");if(!l.grid&&!y&&!v)return;var T=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),u=Array.isArray(y),b=Array.isArray(v),_=u&&y!==x.xaxes&&b&&v!==x.yaxes,P,M;T?(P=x.subplots.length,M=x.subplots[0].length):(b&&(P=v.length),u&&(M=y.length));var C=t.newContainer(f,"grid");function A(F,U){return c.coerce(x,C,e,F,U)}var h=A("rows",P),p=A("columns",M);if(!(h*p>1)){delete f.grid;return}if(!T&&!u&&!b){var k=A("pattern")==="independent";k&&(T=!0)}C._hasSubplotGrid=T;var w=A("roworder"),R=w==="top to bottom",O=T?.2:.1,j=T?.3:.1,V,H;_&&f._splomGridDflt&&(V=f._splomGridDflt.xside,H=f._splomGridDflt.yside),C._domains={x:n("x",A,O,V,p),y:n("y",A,j,H,h,R)}}function n(l,f,x,y,v,T){var u=f(l+"gap",x),b=f("domain."+l);f(l+"side",y);for(var _=new Array(v),P=b[0],M=(b[1]-P)/(v-u),C=M*(1-u),A=0;A{Z.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"}}),HF=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=kn(),S=mu(),t=WM();Z.exports=function(e,r,a,n){var o="error_"+n.axis,i=S.newContainer(r,o),l=e[o]||{};function f(_,P){return I.coerce(l,i,t,_,P)}var x=l.array!==void 0||l.value!==void 0||l.type==="sqrt",y=f("visible",x);if(y!==!1){var v=f("type","array"in l?"data":"percent"),T=!0;v!=="sqrt"&&(T=f("symmetric",!((v==="data"?"arrayminus":"valueminus")in l))),v==="data"?(f("array"),f("traceref"),T||(f("arrayminus"),f("tracerefminus"))):(v==="percent"||v==="constant")&&(f("value"),T||f("valueminus"));var u="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&f(u,!(l.color||c(l.thickness)||c(l.width)))}(!n.inherit||!i[u])&&(f("color",a),f("thickness"),f("width",g.traceIs(r,"gl3d")?0:4))}}}),qM=Dt((Q,Z)=>{Z.exports=function(g){var I=g.type,S=g.symmetric;if(I==="data"){var t=g.array||[];if(S)return function(n,o){var i=+t[o];return[i,i]};var e=g.arrayminus||[];return function(n,o){var i=+t[o],l=+e[o];return!isNaN(i)||!isNaN(l)?[l||0,i||0]:[NaN,NaN]}}else{var r=c(I,g.value),a=c(I,g.valueminus);return S||g.valueminus===void 0?function(n){var o=r(n);return[o,o]}:function(n){return[a(n),r(n)]}}};function c(g,I){if(g==="percent")return function(S){return Math.abs(S*I/100)};if(g==="constant")return function(){return Math.abs(I)};if(g==="sqrt")return function(S){return Math.sqrt(Math.abs(S))}}}),WF=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=Ls(),S=kn(),t=qM();Z.exports=function(r){for(var a=r.calcdata,n=0;n{var c=qr(),g=Yi(),I=Vs(),S=Tc();Z.exports=function(e,r,a,n){var o,i=a.xaxis,l=a.yaxis,f=n&&n.duration>0,x=e._context.staticPlot;r.each(function(y){var v=y[0].trace,T=v.error_x||{},u=v.error_y||{},b;v.ids&&(b=function(C){return C.id});var _=S.hasMarkers(v)&&v.marker.maxdisplayed>0;!u.visible&&!T.visible&&(y=[]);var P=c.select(this).selectAll("g.errorbar").data(y,b);if(P.exit().remove(),!!y.length){T.visible||P.selectAll("path.xerror").remove(),u.visible||P.selectAll("path.yerror").remove(),P.style("opacity",1);var M=P.enter().append("g").classed("errorbar",!0);f&&M.style("opacity",0).transition().duration(n.duration).style("opacity",1),I.setClipUrl(P,a.layerClipId,e),P.each(function(C){var A=c.select(this),h=t(C,i,l);if(!(_&&!C.vis)){var p,k=A.select("path.yerror");if(u.visible&&g(h.x)&&g(h.yh)&&g(h.ys)){var w=u.width;p="M"+(h.x-w)+","+h.yh+"h"+2*w+"m-"+w+",0V"+h.ys,h.noYS||(p+="m-"+w+",0h"+2*w),o=!k.size(),o?k=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("yerror",!0):f&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",p)}else k.remove();var R=A.select("path.xerror");if(T.visible&&g(h.y)&&g(h.xh)&&g(h.xs)){var O=(T.copy_ystyle?u:T).width;p="M"+h.xh+","+(h.y-O)+"v"+2*O+"m0,-"+O+"H"+h.xs,h.noXS||(p+="m0,-"+O+"v"+2*O),o=!R.size(),o?R=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("xerror",!0):f&&(R=R.transition().duration(n.duration).ease(n.easing)),R.attr("d",p)}else R.remove()}})}})};function t(e,r,a){var n={x:r.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(n.yh=a.c2p(e.yh),n.ys=a.c2p(e.ys),g(n.ys)||(n.noYS=!0,n.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),g(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}}),$F=Dt((Q,Z)=>{var c=qr(),g=hi();Z.exports=function(I){I.each(function(S){var t=S[0].trace,e=t.error_y||{},r=t.error_x||{},a=c.select(this);a.selectAll("path.yerror").style("stroke-width",e.thickness+"px").call(g.stroke,e.color),r.copy_ystyle&&(r=e),a.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(g.stroke,r.color)})}}),ZF=Dt((Q,Z)=>{var c=kn(),g=Yc().overrideAll,I=WM(),S={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var t={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I),error_z:c.extendFlat({},I)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,Z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:g(t,"calc","nested"),scattergl:g(S,"calc","nested")}},supplyDefaults:HF(),calc:WF(),makeComputeError:qM(),plot:qF(),style:$F(),hoverInfo:e};function e(r,a,n){(a.error_y||{}).visible&&(n.yerr=r.yh-r.y,a.error_y.symmetric||(n.yerrneg=r.y-r.ys)),(a.error_x||{}).visible&&(n.xerr=r.xh-r.x,a.error_x.symmetric||(n.xerrneg=r.x-r.xs))}}),GF=Dt((Q,Z)=>{Z.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"}}}),YF=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Kc(),S=Jo(),t=Ls(),e=up(),r=kn(),a=r.strTranslate,n=Ia().extendFlat,o=P0(),i=Vs(),l=hi(),f=lp(),x=ec(),y=Ud().flipScale,v=tx(),T=K_(),u=Td(),b=Af(),_=b.LINE_SPACING,P=b.FROM_TL,M=b.FROM_BR,C=GF().cn;function A(O){var j=O._fullLayout,V=j._infolayer.selectAll("g."+C.colorbar).data(h(O),function(H){return H._id});V.enter().append("g").attr("class",function(H){return H._id}).classed(C.colorbar,!0),V.each(function(H){var F=c.select(this);r.ensureSingle(F,"rect",C.cbbg),r.ensureSingle(F,"g",C.cbfills),r.ensureSingle(F,"g",C.cblines),r.ensureSingle(F,"g",C.cbaxis,function(W){W.classed(C.crisp,!0)}),r.ensureSingle(F,"g",C.cbtitleunshift,function(W){W.append("g").classed(C.cbtitle,!0)}),r.ensureSingle(F,"rect",C.cboutline);var U=p(F,H,O);U&&U.then&&(O._promises||[]).push(U),O._context.edits.colorbarPosition&&k(F,H,O)}),V.exit().each(function(H){I.autoMargin(O,H._id)}).remove(),V.order()}function h(O){var j=O._fullLayout,V=O.calcdata,H=[],F,U,W,q;function J(Y){return n(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function lt(){typeof q.calc=="function"?q.calc(O,W,F):(F._fillgradient=U.reversescale?y(U.colorscale):U.colorscale,F._zrange=[U[q.min],U[q.max]])}for(var yt=0;yt1){var Gt=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10));Xr*=Gt*r.roundUp(Le/Gt,[2,5,10]),(Math.abs(ge.start)/ge.size+1e-6)%1<2e-6&&(Wr.tick0=0)}Wr.dtick=Xr}Wr.domain=H?[ur+dt/ft.h,ur+ee-dt/ft.h]:[ur+tt/ft.w,ur+ee-tt/ft.w],Wr.setScale(),O.attr("transform",a(Math.round(ft.l),Math.round(ft.t)));var ne=O.select("."+C.cbtitleunshift).attr("transform",a(-Math.round(ft.l),-Math.round(ft.t))),Ct=Wr.ticklabelposition,gt=Wr.title.font.size,St=O.select("."+C.cbaxis),Nt,re=0,le=0;function we(Ar,mr){var Qr={propContainer:Wr,propName:j._propPrefix+"title.text",traceIndex:j._traceIndex,_meta:j._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Hn=Ar.charAt(0)==="h"?Ar.substr(1):"h"+Ar;O.selectAll("."+Hn+",."+Hn+"-math-group").remove(),f.draw(V,Ar,n(Qr,mr||{}))}function Ue(){if(H&&br||!H&&!br){var Ar,mr;Pt==="top"&&(Ar=tt+ft.l+ve*rt,mr=dt+ft.t+oe*(1-ur-ee)+3+gt*.75),Pt==="bottom"&&(Ar=tt+ft.l+ve*rt,mr=dt+ft.t+oe*(1-ur)-3-gt*.25),Pt==="right"&&(mr=dt+ft.t+oe*at+3+gt*.75,Ar=tt+ft.l+ve*ur),we(Wr._id+"title",{attributes:{x:Ar,y:mr,"text-anchor":H?"start":"middle"}})}}function qe(){if(H&&!br||!H&&br){var Ar=Wr.position||0,mr=Wr._offset+Wr._length/2,Qr,Hn;if(Pt==="right")Hn=mr,Qr=ft.l+ve*Ar+10+gt*(Wr.showticklabels?1:.5);else if(Qr=mr,Pt==="bottom"&&(Hn=ft.t+oe*Ar+10+(Ct.indexOf("inside")===-1?Wr.tickfont.size:0)+(Wr.ticks!=="inside"&&j.ticklen||0)),Pt==="top"){var Wn=It.text.split("
").length;Hn=ft.t+oe*Ar+10-Tt-_*gt*Wn}we((H?"h":"v")+Wr._id+"title",{avoid:{selection:c.select(V).selectAll("g."+Wr._id+"tick"),side:Pt,offsetTop:H?0:ft.t,offsetLeft:H?ft.l:0,maxShift:H?Y.width:Y.height},attributes:{x:Qr,y:Hn,"text-anchor":"middle"},transform:{rotate:H?-90:0,offset:0}})}}function or(){if(!H&&!br||H&&br){var Ar=O.select("."+C.cbtitle),mr=Ar.select("text"),Qr=[-J/2,J/2],Hn=Ar.select(".h"+Wr._id+"title-math-group").node(),Wn=15.6;mr.node()&&(Wn=parseInt(mr.node().style.fontSize,10)*_);var Xn;if(Hn?(Xn=i.bBox(Hn),le=Xn.width,re=Xn.height,re>Wn&&(Qr[1]-=(re-Wn)/2)):mr.node()&&!mr.classed(C.jsPlaceholder)&&(Xn=i.bBox(mr.node()),le=Xn.width,re=Xn.height),H){if(re){if(re+=5,Pt==="top")Wr.domain[1]-=re/ft.h,Qr[1]*=-1;else{Wr.domain[0]+=re/ft.h;var Ii=x.lineCount(mr);Qr[1]+=(1-Ii)*Wn}Ar.attr("transform",a(Qr[0],Qr[1])),Wr.setScale()}}else le&&(Pt==="right"&&(Wr.domain[0]+=(le+gt/2)/ft.w),Ar.attr("transform",a(Qr[0],Qr[1])),Wr.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",H?a(0,Math.round(ft.h*(1-Wr.domain[1]))):a(Math.round(ft.w*Wr.domain[0]),0)),St.attr("transform",H?a(0,Math.round(-ft.t)):a(Math.round(-ft.l),0));var oi=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(pe);oi.enter().append("rect").classed(C.cbfill,!0).attr("style",""),oi.exit().remove();var $n=qt.map(Wr.c2p).map(Math.round).sort(function(fr,_r){return fr-_r});oi.each(function(fr,_r){var tn=[_r===0?qt[0]:(pe[_r]+pe[_r-1])/2,_r===pe.length-1?qt[1]:(pe[_r]+pe[_r+1])/2].map(Wr.c2p).map(Math.round);H&&(tn[1]=r.constrain(tn[1]+(tn[1]>tn[0])?1:-1,$n[0],$n[1]));var Cn=c.select(this).attr(H?"x":"y",Te).attr(H?"y":"x",c.min(tn)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(c.max(tn)-c.min(tn),2));if(j._fillgradient)i.gradient(Cn,V,j._id,H?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var Tn=Jt(fr).replace("e-","");Cn.attr("fill",g(Tn).toHexString())}});var sa=O.select("."+C.cblines).selectAll("path."+C.cbline).data(kt.color&&kt.width?se:[]);sa.enter().append("path").classed(C.cbline,!0),sa.exit().remove(),sa.each(function(fr){var _r=Te,tn=Math.round(Wr.c2p(fr))+kt.width/2%1;c.select(this).attr("d","M"+(H?_r+","+tn:tn+","+_r)+(H?"h":"v")+Tt).call(i.lineGroupStyle,kt.width,Wt(fr),kt.dash)}),St.selectAll("g."+Wr._id+"tick,path").remove();var Zi=Te+Tt+(J||0)/2-(j.ticks==="outside"?1:0),We=t.calcTicks(Wr),nr=t.getTickSigns(Wr)[2];return t.drawTicks(V,Wr,{vals:Wr.ticks==="inside"?t.clipEnds(Wr,We):We,layer:St,path:t.makeTickPath(Wr,Zi,nr),transFn:t.makeTransTickFn(Wr)}),t.drawLabels(V,Wr,{vals:We,layer:St,transFn:t.makeTransTickLabelFn(Wr),labelFns:t.makeLabelFns(Wr,Zi)})}function Sr(){var Ar,mr=Tt+J/2;Ct.indexOf("inside")===-1&&(Ar=i.bBox(St.node()),mr+=H?Ar.width:Ar.height),Nt=ne.select("text");var Qr=0,Hn=H&&Pt==="top",Wn=!H&&Pt==="right",Xn=0;if(Nt.node()&&!Nt.classed(C.jsPlaceholder)){var Ii,oi=ne.select(".h"+Wr._id+"title-math-group").node();oi&&(H&&br||!H&&!br)?(Ar=i.bBox(oi),Qr=Ar.width,Ii=Ar.height):(Ar=i.bBox(ne.node()),Qr=Ar.right-ft.l-(H?Te:jr),Ii=Ar.bottom-ft.t-(H?jr:Te),!H&&Pt==="top"&&(mr+=Ar.height,Xn=Ar.height)),Wn&&(Nt.attr("transform",a(Qr/2+gt/2,0)),Qr*=2),mr=Math.max(mr,H?Qr:Ii)}var $n=(H?tt:dt)*2+mr+lt+J/2,sa=0;!H&&It.text&&st==="bottom"&&at<=0&&(sa=$n/2,$n+=sa,Xn+=sa),Y._hColorbarMoveTitle=sa,Y._hColorbarMoveCBTitle=Xn;var Zi=lt+J,We=(H?Te:jr)-Zi/2-(H?tt:0),nr=(H?jr:Te)-(H?Mt:dt+Xn-sa);O.select("."+C.cbbg).attr("x",We).attr("y",nr).attr(H?"width":"height",Math.max($n-sa,2)).attr(H?"height":"width",Math.max(Mt+Zi,2)).call(l.fill,yt).call(l.stroke,j.bordercolor).style("stroke-width",lt);var fr=Wn?Math.max(Qr-10,0):0;O.selectAll("."+C.cboutline).attr("x",(H?Te:jr+tt)+fr).attr("y",(H?jr+dt-Mt:Te)+(Hn?re:0)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(Mt-(H?2*dt+re:2*tt+fr),2)).call(l.stroke,j.outlinecolor).style({fill:"none","stroke-width":J});var _r=H?He*$n:0,tn=H?0:(1-Ge)*$n-Xn;if(_r=it?ft.l-_r:-_r,tn=vt?ft.t-tn:-tn,O.attr("transform",a(_r,tn)),!H&&(lt||g(yt).getAlpha()&&!g.equals(Y.paper_bgcolor,yt))){var Cn=St.selectAll("text"),Tn=Cn[0].length,Mn=O.select("."+C.cbbg).node(),fi=i.bBox(Mn),ki=i.getTranslate(O),Oi=2;Cn.each(function(Gr,Br){var Yr=0,pn=Tn-1;if(Br===Yr||Br===pn){var on=i.bBox(this),Ce=i.getTranslate(this),dr;if(Br===pn){var Hr=on.right+Ce.x,_n=fi.right+ki.x+jr-lt-Oi+rt;dr=_n-Hr,dr>0&&(dr=0)}else if(Br===Yr){var Fn=on.left+Ce.x,Qn=fi.left+ki.x+jr+lt+Oi;dr=Qn-Fn,dr<0&&(dr=0)}dr&&(Tn<3?this.setAttribute("transform","translate("+dr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ji={},Xi=P[mt],ci=M[mt],za=P[st],Wa=M[st],ze=$n-Tt;H?(U==="pixels"?(ji.y=at,ji.t=Mt*za,ji.b=Mt*Wa):(ji.t=ji.b=0,ji.yt=at+F*za,ji.yb=at-F*Wa),q==="pixels"?(ji.x=rt,ji.l=$n*Xi,ji.r=$n*ci):(ji.l=ze*Xi,ji.r=ze*ci,ji.xl=rt-W*Xi,ji.xr=rt+W*ci)):(U==="pixels"?(ji.x=rt,ji.l=Mt*Xi,ji.r=Mt*ci):(ji.l=ji.r=0,ji.xl=rt+F*Xi,ji.xr=rt-F*ci),q==="pixels"?(ji.y=1-at,ji.t=$n*za,ji.b=$n*Wa):(ji.t=ze*za,ji.b=ze*Wa,ji.yt=at-W*za,ji.yb=at+W*Wa));var Ie=j.y<.5?"b":"t",Rr=j.x<.5?"l":"r";V._fullLayout._reservedMargin[j._id]={};var $r={r:Y.width-We-_r,l:We+ji.r,b:Y.height-nr-tn,t:nr+ji.b};it&&vt?I.autoMargin(V,j._id,ji):it?V._fullLayout._reservedMargin[j._id][Ie]=$r[Ie]:vt||H?V._fullLayout._reservedMargin[j._id][Rr]=$r[Rr]:V._fullLayout._reservedMargin[j._id][Ie]=$r[Ie]}return r.syncOrAsync([I.previousPromises,Ue,or,qe,I.previousPromises,Sr],V)}function k(O,j,V){var H=j.orientation==="v",F=V._fullLayout,U=F._size,W,q,J;e.init({element:O.node(),gd:V,prepFn:function(){W=O.attr("transform"),o(O)},moveFn:function(lt,yt){O.attr("transform",W+a(lt,yt)),q=e.align((H?j._uFrac:j._vFrac)+lt/U.w,H?j._thickFrac:j._lenFrac,0,1,j.xanchor),J=e.align((H?j._vFrac:1-j._uFrac)-yt/U.h,H?j._lenFrac:j._thickFrac,0,1,j.yanchor);var mt=e.getCursor(q,J,j.xanchor,j.yanchor);o(O,mt)},doneFn:function(){if(o(O),q!==void 0&&J!==void 0){var lt={};lt[j._propPrefix+"x"]=q,lt[j._propPrefix+"y"]=J,j._traceIndex!==void 0?S.call("_guiRestyle",V,lt,j._traceIndex):S.call("_guiRelayout",V,lt)}}})}function w(O,j,V){var H=j._levels,F=[],U=[],W,q,J=H.end+H.size/100,lt=H.size,yt=1.001*V[0]-.001*V[1],mt=1.001*V[1]-.001*V[0];for(q=0;q<1e5&&(W=H.start+q*lt,!(lt>0?W>=J:W<=J));q++)W>yt&&W0?W>=J:W<=J));q++)W>V[0]&&W{Z.exports={moduleType:"component",name:"colorbar",attributes:M1(),supplyDefaults:fv(),draw:YF().draw,hasColorbar:L0()}}),XF=Dt((Q,Z)=>{Z.exports={moduleType:"component",name:"legend",layoutAttributes:D_(),supplyLayoutDefaults:Uy(),draw:R_(),style:kw()}}),JF=Dt((Q,Z)=>{Z.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"}}}),QF=Dt((Q,Z)=>{Z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),$M=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=g.extendFlat,S=g.extendDeep;function t(r){var a;switch(r){case"themes__thumb":a={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":a={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:a={}}return a}function e(r){var a=["xaxis","yaxis","zaxis"];return a.indexOf(r.slice(0,5))>-1}Z.exports=function(r,a){var n,o=r.data,i=r.layout,l=S([],o),f=S({},i,t(a.tileClass)),x=r._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var y=Object.keys(f);for(n=0;n{var c=Rm().EventEmitter,g=Jo(),I=kn(),S=o0(),t=$M(),e=Xy(),r=Jy();function a(n,o){var i=new c,l=t(n,{format:"png"}),f=l.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);function x(){var v=S.getDelay(f._fullLayout);setTimeout(function(){var T=e(f),u=document.createElement("canvas");u.id=I.randstr(),i=r({format:o.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:u,emitter:i,svg:T}),i.clean=function(){f&&document.body.removeChild(f)}},v)}var y=S.getRedrawFunc(f);return g.call("_doPlot",f,l.data,l.layout,l.config).then(y).then(x).catch(function(v){i.emit("error",v)}),i}Z.exports=a}),eR=Dt((Q,Z)=>{var c=o0(),g={getDelay:c.getDelay,getRedrawFunc:c.getRedrawFunc,clone:$M(),toSVG:Xy(),svgToImg:Jy(),toImage:tR(),downloadImage:Y_()};Z.exports=g}),rR=Dt(Q=>{Q.version=Wi().version,Un(),P_();var Z=Jo(),c=Q.register=Z.register,g=S6(),I=Object.keys(g);for(t=0;t{Z.exports=rR()}),rx=Dt((Q,Z)=>{Z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),Lg=Dt((Q,Z)=>{var c=ef(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=kc(),r=da(),a=rx(),n=kd().pattern,o=Ia().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),l=c.marker,f=l.line,x=o({},f.width,{dflt:0}),y=o({width:x,editType:"calc"},e("marker.line")),v=o({line:y,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:n,cornerradius:{valType:"any",editType:"calc"}});Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:c.text,texttemplate:S({editType:"plot"},{keys:a.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:c.hovertext,hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),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:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},c.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:v,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:{marker:{opacity:c.selected.marker.opacity,color:c.selected.marker.color,editType:"style"},textfont:c.selected.textfont,editType:"style"},unselected:{marker:{opacity:c.unselected.marker.opacity,color:c.unselected.marker.color,editType:"style"},textfont:c.unselected.textfont,editType:"style"},zorder:c.zorder}}),F6=Dt((Q,Z)=>{Z.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"}}}),R6=Dt((Q,Z)=>{var c=hi(),g=Ud().hasColorscale,I=mc(),S=kn().coercePattern;Z.exports=function(t,e,r,a,n){var o=r("marker.color",a),i=g(t,"marker");i&&I(t,e,n,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",c.defaultLine),g(t,"marker.line")&&I(t,e,n,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",o,i),r("selected.marker.color"),r("unselected.marker.color")}}),J0=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=hi(),S=Jo(),t=Hm(),e=Rp(),r=R6(),a=Cg(),n=Lg(),o=g.coerceFont;function i(y,v,T,u){function b(A,h){return g.coerce(y,v,n,A,h)}var _=t(y,v,u,b);if(!_){v.visible=!1;return}e(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");x(y,v,u,b,P,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(y,v,b,T,u);var M=(v.marker.line||{}).color,C=S.getComponentMethod("errorbars","supplyDefaults");C(y,v,M||I.defaultLine,{axis:"y"}),C(y,v,M||I.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(v,b)}function l(y,v){var T,u;function b(M,C){return g.coerce(u._input,u,n,M,C)}for(var _=0;_=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&c(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function x(y,v,T,u,b,_){_=_||{};var P=_.moduleHasSelected!==!1,M=_.moduleHasUnselected!==!1,C=_.moduleHasConstrain!==!1,A=_.moduleHasCliponaxis!==!1,h=_.moduleHasTextangle!==!1,p=_.moduleHasInsideanchor!==!1,k=!!_.hasPathbar,w=Array.isArray(b)||b==="auto",R=w||b==="inside",O=w||b==="outside";if(R||O){var j=o(u,"textfont",T.font),V=g.extendFlat({},j),H=y.textfont&&y.textfont.color,F=!H;if(F&&delete V.color,o(u,"insidetextfont",V),k){var U=g.extendFlat({},j);F&&delete U.color,o(u,"pathbar.textfont",U)}O&&o(u,"outsidetextfont",j),P&&u("selected.textfont.color"),M&&u("unselected.textfont.color"),C&&u("constraintext"),A&&u("cliponaxis"),h&&u("textangle"),u("texttemplate"),u("texttemplatefallback")}R&&p&&u("insidetextanchor")}Z.exports={supplyDefaults:i,crossTraceDefaults:l,handleText:x,validateCornerradius:f}}),ZM=Dt((Q,Z)=>{var c=Jo(),g=Ls(),I=kn(),S=F6(),t=J0().validateCornerradius;Z.exports=function(e,r,a){function n(P,M){return I.coerce(e,r,S,P,M)}for(var o=!1,i=!1,l=!1,f={},x=n("barmode"),y=x==="group",v=0;v0&&!f[u]&&(l=!0),f[u]=!0),T.visible&&T.type==="histogram"){var b=g.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!o){delete r.barmode;return}x!=="overlay"&&n("barnorm"),n("bargap",i&&!l?0:.2),n("bargroupgap");var _=n("barcornerradius");r.barcornerradius=t(_)}}),Vw=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=D0(),I=Ud().hasColorscale,S=Xd(),t=Vw(),e=Bt();Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(i=n.makeCalcdata(a,"x",T),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y",T),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;for(var u=Math.min(l.length,i.length),b=new Array(u),_=0;_{var c=qr(),g=kn();function I(r,a,n){var o=r._fullLayout,i=o["_"+n+"Text_minsize"];if(i){var l=o.uniformtext.mode==="hide",f;switch(n){case"funnelarea":case"pie":case"sunburst":f="g.slice";break;case"treemap":case"icicle":f="g.slice, g.pathbar";break;default:f="g.points > g.point"}a.selectAll(f).each(function(x){var y=x.transform;if(y){y.scale=l&&y.hide?0:i/y.fontSize;var v=c.select(this).select("text");g.setTransormAndDisplay(v,y)}})}}function S(r,a,n){if(n.uniformtext.mode){var o=e(r),i=n.uniformtext.minsize,l=a.scale*a.fontSize;a.hide=l{var Z=Yi(),c=ro(),g=kn().isArrayOrTypedArray;Q.coerceString=function(I,S,t){if(typeof S=="string"){if(S||!I.noBlank)return S}else if((typeof S=="number"||S===!0)&&!I.strict)return String(S);return t!==void 0?t:I.dflt},Q.coerceNumber=function(I,S,t){if(Z(S)){S=+S;var e=I.min,r=I.max,a=e!==void 0&&Sr;if(!a)return S}return t!==void 0?t:I.dflt},Q.coerceColor=function(I,S,t){return c(S).isValid()?S:t!==void 0?t:I.dflt},Q.coerceEnumerated=function(I,S,t){return I.coerceNumber&&(S=+S),I.values.indexOf(S)!==-1?S:t!==void 0?t:I.dflt},Q.getValue=function(I,S){var t;return g(I)?S{var c=qr(),g=hi(),I=Vs(),S=kn(),t=Jo(),e=Bp().resizeText,r=Lg(),a=r.textfont,n=r.insidetextfont,o=r.outsidetextfont,i=B6();function l(A){var h=c.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");e(A,h,"bar");var p=h.size(),k=A._fullLayout;h.style("opacity",function(w){return w[0].trace.opacity}).each(function(w){(k.barmode==="stack"&&p>1||k.bargap===0&&k.bargroupgap===0&&!w[0].trace.marker.line.width)&&c.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(w){var R=c.select(this),O=w[0].trace;f(R,O,A)}),t.getComponentMethod("errorbars","style")(h)}function f(A,h,p){I.pointStyle(A.selectAll("path"),h,p),x(A,h,p)}function x(A,h,p){A.selectAll("text").each(function(k){var w=c.select(this),R=S.ensureUniformFontSize(p,u(w,k,h,p));I.font(w,R)})}function y(A,h,p){var k=h[0].trace;k.selectedpoints?v(p,k,A):(f(p,k,A),t.getComponentMethod("errorbars","style")(p))}function v(A,h,p){I.selectedPointStyle(A.selectAll("path"),h),T(A.selectAll("text"),h,p)}function T(A,h,p){A.each(function(k){var w=c.select(this),R;if(k.selected){R=S.ensureUniformFontSize(p,u(w,k,h,p));var O=h.selected.textfont&&h.selected.textfont.color;O&&(R.color=O),I.font(w,R)}else I.selectedTextStyle(w,h)})}function u(A,h,p,k){var w=k._fullLayout.font,R=p.textfont;if(A.classed("bartext-inside")){var O=C(h,p);R=_(p,h.i,w,O)}else A.classed("bartext-outside")&&(R=P(p,h.i,w));return R}function b(A,h,p){return M(a,A.textfont,h,p)}function _(A,h,p,k){var w=b(A,h,p),R=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[h]===void 0;return R&&(w={color:g.contrast(k),family:w.family,size:w.size,weight:w.weight,style:w.style,variant:w.variant,textcase:w.textcase,lineposition:w.lineposition,shadow:w.shadow}),M(n,A.insidetextfont,h,w)}function P(A,h,p){var k=b(A,h,p);return M(o,A.outsidetextfont,h,k)}function M(A,h,p,k){h=h||{};var w=i.getValue(h.family,p),R=i.getValue(h.size,p),O=i.getValue(h.color,p),j=i.getValue(h.weight,p),V=i.getValue(h.style,p),H=i.getValue(h.variant,p),F=i.getValue(h.textcase,p),U=i.getValue(h.lineposition,p),W=i.getValue(h.shadow,p);return{family:i.coerceString(A.family,w,k.family),size:i.coerceNumber(A.size,R,k.size),color:i.coerceColor(A.color,O,k.color),weight:i.coerceString(A.weight,j,k.weight),style:i.coerceString(A.style,V,k.style),variant:i.coerceString(A.variant,H,k.variant),textcase:i.coerceString(A.variant,F,k.textcase),lineposition:i.coerceString(A.variant,U,k.lineposition),shadow:i.coerceString(A.variant,W,k.shadow)}}function C(A,h){return h.type==="waterfall"?h[A.dir].marker.color:A.mcc||A.mc||h.marker.color}Z.exports={style:l,styleTextPoints:x,styleOnSelect:y,getInsideTextFont:_,getOutsideTextFont:P,getBarColor:C,resizeText:e}}),nx=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=ec(),t=hi(),e=Vs(),r=Jo(),a=Ls().tickText,n=Bp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=xm(),f=B6(),x=rx(),y=Lg(),v=y.text,T=y.textposition,u=Fp().appendArrayPointValue,b=x.TEXTPAD;function _(lt){return lt.id}function P(lt){if(lt.ids)return _}function M(lt){return(lt>0)-(lt<0)}function C(lt,yt){return lt0}function k(lt,yt,mt,st,tt,dt){var rt=yt.xaxis,at=yt.yaxis,vt=lt._fullLayout,it=lt._context.staticPlot;tt||(tt={mode:vt.barmode,norm:vt.barmode,gap:vt.bargap,groupgap:vt.bargroupgap},i("bar",vt));var Y=I.makeTraceGroups(st,mt,"trace bars").each(function(ft){var ut=c.select(this),kt=ft[0].trace,It=ft[0].t,Pt=kt.type==="waterfall",qt=kt.type==="funnel",Wt=kt.type==="histogram",Jt=kt.type==="bar",ge=Jt||qt,fe=0;Pt&&kt.connector.visible&&kt.connector.mode==="between"&&(fe=kt.connector.line.width/2);var pe=kt.orientation==="h",se=p(tt),Tt=I.ensureSingle(ut,"g","points"),Lt=P(kt),Mt=Tt.selectAll("g.point").data(I.identity,Lt);Mt.enter().append("g").classed("point",!0),Mt.exit().remove(),Mt.each(function(ve,oe){var Te=c.select(this),He=A(ve,rt,at,pe),Ge=He[0][0],cr=He[0][1],ur=He[1][0],jr=He[1][1],Wr=(pe?cr-Ge:jr-ur)===0;Wr&&ge&&f.getLineWidth(kt,ve)&&(Wr=!1),Wr||(Wr=!g(Ge)||!g(cr)||!g(ur)||!g(jr)),ve.isBlank=Wr,Wr&&(pe?cr=Ge:jr=ur),fe&&!Wr&&(pe?(Ge-=C(Ge,cr)*fe,cr+=C(Ge,cr)*fe):(ur-=C(ur,jr)*fe,jr+=C(ur,jr)*fe));var br,Xr;if(kt.type==="waterfall"){if(!Wr){var nn=kt[ve.dir].marker;br=nn.line.width,Xr=nn.color}}else br=f.getLineWidth(kt,ve),Xr=ve.mc||kt.marker.color;function Le(Zi){var We=c.round(br/2%1,2);return tt.gap===0&&tt.groupgap===0?c.round(Math.round(Zi)-We,2):Zi}function Gt(Zi,We,nr){return nr&&Zi===We?Zi:Math.abs(Zi-We)>=2?Le(Zi):Zi>We?Math.ceil(Zi):Math.floor(Zi)}var ne=t.opacity(Xr),Ct=ne<1||br>.01?Le:Gt;lt._context.staticPlot||(Ge=Ct(Ge,cr,pe),cr=Ct(cr,Ge,pe),ur=Ct(ur,jr,!pe),jr=Ct(jr,ur,!pe));var gt=pe?rt.c2p:at.c2p,St;ve.s0>0?St=ve._sMax:ve.s0<0?St=ve._sMin:St=ve.s1>0?ve._sMax:ve._sMin;function Nt(Zi,We){if(!Zi)return 0;var nr=Math.abs(pe?jr-ur:cr-Ge),fr=Math.abs(pe?cr-Ge:jr-ur),_r=Ct(Math.abs(gt(St,!0)-gt(0,!0))),tn=ve.hasB?Math.min(nr/2,fr/2):Math.min(nr/2,_r),Cn;if(We==="%"){var Tn=Math.min(50,Zi);Cn=nr*(Tn/100)}else Cn=Zi;return Ct(Math.max(Math.min(Cn,tn),0))}var re=Jt||Wt?Nt(It.cornerradiusvalue,It.cornerradiusform):0,le,we,Ue="M"+Ge+","+ur+"V"+jr+"H"+cr+"V"+ur+"Z",qe=0;if(re&&ve.s){var or=M(ve.s0)===0||M(ve.s)===M(ve.s0)?ve.s1:ve.s0;if(qe=Ct(ve.hasB?0:Math.abs(gt(St,!0)-gt(or,!0))),qe0?Math.sqrt(qe*(2*re-qe)):0,Wn=Sr>0?Math.max:Math.min;le="M"+Ge+","+ur+"V"+(jr-Qr*Ar)+"H"+Wn(cr-(re-qe)*Sr,Ge)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Ar-Hn)+"V"+(ur+re*Ar+Hn)+"A "+re+","+re+" 0 0 "+mr+" "+Wn(cr-(re-qe)*Sr,Ge)+","+(ur+Qr*Ar)+"Z"}else if(ve.hasB)le="M"+(Ge+re*Sr)+","+ur+"A "+re+","+re+" 0 0 "+mr+" "+Ge+","+(ur+re*Ar)+"V"+(jr-re*Ar)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr)+","+jr+"H"+(cr-re*Sr)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Ar)+"V"+(ur+re*Ar)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-re*Sr)+","+ur+"Z";else{we=Math.abs(jr-ur)+qe;var Xn=we0?Math.sqrt(qe*(2*re-qe)):0,oi=Ar>0?Math.max:Math.min;le="M"+(Ge+Xn*Sr)+","+ur+"V"+oi(jr-(re-qe)*Ar,ur)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr-Ii)+","+jr+"H"+(cr-re*Sr+Ii)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-Xn*Sr)+","+oi(jr-(re-qe)*Ar,ur)+"V"+ur+"Z"}}else le=Ue}else le=Ue;var $n=h(I.ensureSingle(Te,"path"),vt,tt,dt);if($n.style("vector-effect",it?"none":"non-scaling-stroke").attr("d",isNaN((cr-Ge)*(jr-ur))||Wr&<._context.staticPlot?"M0,0Z":le).call(e.setClipUrl,yt.layerClipId,lt),!vt.uniformtext.mode&&se){var sa=e.makePointStyleFns(kt);e.singlePointStyle(ve,$n,kt,sa,lt)}w(lt,yt,Te,ft,oe,Ge,cr,ur,jr,re,qe,tt,dt),yt.layerClipId&&e.hideOutsideRangePoint(ve,Te.select("text"),rt,at,kt.xcalendar,kt.ycalendar)});var ee=kt.cliponaxis===!1;e.setClipUrl(ut,ee?null:yt.layerClipId,lt)});r.getComponentMethod("errorbars","plot")(lt,Y,yt,tt)}function w(lt,yt,mt,st,tt,dt,rt,at,vt,it,Y,ft,ut){var kt=yt.xaxis,It=yt.yaxis,Pt=lt._fullLayout,qt;function Wt(we,Ue,qe){var or=I.ensureSingle(we,"text").text(Ue).attr({class:"bartext bartext-"+qt,"text-anchor":"middle","data-notex":1}).call(e.font,qe).call(S.convertToTspans,lt);return or}var Jt=st[0].trace,ge=Jt.orientation==="h",fe=U(Pt,st,tt,kt,It);qt=W(Jt,tt);var pe=ft.mode==="stack"||ft.mode==="relative",se=st[tt],Tt=!pe||se._outmost,Lt=se.hasB,Mt=it&&it-Y>b;if(!fe||qt==="none"||(se.isBlank||dt===rt||at===vt)&&(qt==="auto"||qt==="inside")){mt.select("text").remove();return}var ee=Pt.font,ve=l.getBarColor(st[tt],Jt),oe=l.getInsideTextFont(Jt,tt,ee,ve),Te=l.getOutsideTextFont(Jt,tt,ee),He=Jt.insidetextanchor||"end",Ge=mt.datum();ge?kt.type==="log"&&Ge.s0<=0&&(kt.range[0]0&&Le>0,Ct;Mt?Lt?Ct=R(jr-2*it,Wr,nn,Le,ge)||R(jr,Wr-2*it,nn,Le,ge):ge?Ct=R(jr-(it-Y),Wr,nn,Le,ge)||R(jr,Wr-2*(it-Y),nn,Le,ge):Ct=R(jr,Wr-(it-Y),nn,Le,ge)||R(jr-2*(it-Y),Wr,nn,Le,ge):Ct=R(jr,Wr,nn,Le,ge),ne&&Ct?qt="inside":(qt="outside",br.remove(),br=null)}else qt="inside";if(!br){Gt=I.ensureUniformFontSize(lt,qt==="outside"?Te:oe),br=Wt(mt,fe,Gt);var gt=br.attr("transform");if(br.attr("transform",""),Xr=e.bBox(br.node()),nn=Xr.width,Le=Xr.height,br.attr("transform",gt),nn<=0||Le<=0){br.remove();return}}var St=Jt.textangle,Nt,re;qt==="outside"?(re=Jt.constraintext==="both"||Jt.constraintext==="outside",Nt=F(dt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St})):(re=Jt.constraintext==="both"||Jt.constraintext==="inside",Nt=V(dt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St,anchor:He,hasB:Lt,r:it,overhead:Y})),Nt.fontSize=Gt.size,o(Jt.type==="histogram"?"bar":Jt.type,Nt,Pt),se.transform=Nt;var le=h(br,Pt,ft,ut);I.setTransormAndDisplay(le,Nt)}function R(lt,yt,mt,st,tt){if(lt<0||yt<0)return!1;var dt=mt<=lt&&st<=yt,rt=mt<=yt&&st<=lt,at=tt?lt>=mt*(yt/st):yt>=st*(lt/mt);return dt||rt||at}function O(lt){return lt==="auto"?0:lt}function j(lt,yt){var mt=Math.PI/180*yt,st=Math.abs(Math.sin(mt)),tt=Math.abs(Math.cos(mt));return{x:lt.width*tt+lt.height*st,y:lt.width*st+lt.height*tt}}function V(lt,yt,mt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=dt.anchor,Y=it==="end",ft=it==="start",ut=dt.leftToRight||0,kt=(ut+1)/2,It=1-kt,Pt=dt.hasB,qt=dt.r,Wt=dt.overhead,Jt=tt.width,ge=tt.height,fe=Math.abs(yt-lt),pe=Math.abs(st-mt),se=fe>2*b&&pe>2*b?b:0;fe-=2*se,pe-=2*se;var Tt=O(vt);vt==="auto"&&!(Jt<=fe&&ge<=pe)&&(Jt>fe||ge>pe)&&(!(Jt>pe||ge>fe)||Jtb){var ve=H(lt,yt,mt,st,Lt,qt,Wt,rt,Pt);Mt=ve.scale,ee=ve.pad}else Mt=1,at&&(Mt=Math.min(1,fe/Lt.x,pe/Lt.y)),ee=0;var oe=tt.left*It+tt.right*kt,Te=(tt.top+tt.bottom)/2,He=(lt+b)*It+(yt-b)*kt,Ge=(mt+st)/2,cr=0,ur=0;if(ft||Y){var jr=(rt?Lt.x:Lt.y)/2;qt&&(Y||Pt)&&(se+=ee);var Wr=rt?C(lt,yt):C(mt,st);rt?ft?(He=lt+Wr*se,cr=-Wr*jr):(He=yt-Wr*se,cr=Wr*jr):ft?(Ge=mt+Wr*se,ur=-Wr*jr):(Ge=st-Wr*se,ur=Wr*jr)}return{textX:oe,textY:Te,targetX:He,targetY:Ge,anchorX:cr,anchorY:ur,scale:Mt,rotate:Tt}}function H(lt,yt,mt,st,tt,dt,rt,at,vt){var it=Math.max(0,Math.abs(yt-lt)-2*b),Y=Math.max(0,Math.abs(st-mt)-2*b),ft=dt-b,ut=rt?ft-Math.sqrt(ft*ft-(ft-rt)*(ft-rt)):ft,kt=vt?ft*2:at?ft-rt:2*ut,It=vt?ft*2:at?2*ut:ft-rt,Pt,qt,Wt,Jt,ge;return tt.y/tt.x>=Y/(it-kt)?Jt=Y/tt.y:tt.y/tt.x<=(Y-It)/it?Jt=it/tt.x:!vt&&at?(Pt=tt.x*tt.x+tt.y*tt.y/4,qt=-2*tt.x*(it-ft)-tt.y*(Y/2-ft),Wt=(it-ft)*(it-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):vt?(Pt=(tt.x*tt.x+tt.y*tt.y)/4,qt=-tt.x*(it/2-ft)-tt.y*(Y/2-ft),Wt=(it/2-ft)*(it/2-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):(Pt=tt.x*tt.x/4+tt.y*tt.y,qt=-tt.x*(it/2-ft)-2*tt.y*(Y-ft),Wt=(it/2-ft)*(it/2-ft)+(Y-ft)*(Y-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)),Jt=Math.min(1,Jt),at?ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(Y-tt.y*Jt)/2)*(ft-(Y-tt.y*Jt)/2)))-rt):ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(it-tt.x*Jt)/2)*(ft-(it-tt.x*Jt)/2)))-rt),{scale:Jt,pad:ge}}function F(lt,yt,mt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=tt.width,Y=tt.height,ft=Math.abs(yt-lt),ut=Math.abs(st-mt),kt;rt?kt=ut>2*b?b:0:kt=ft>2*b?b:0;var It=1;at&&(It=rt?Math.min(1,ut/Y):Math.min(1,ft/it));var Pt=O(vt),qt=j(tt,Pt),Wt=(rt?qt.x:qt.y)/2,Jt=(tt.left+tt.right)/2,ge=(tt.top+tt.bottom)/2,fe=(lt+yt)/2,pe=(mt+st)/2,se=0,Tt=0,Lt=rt?C(yt,lt):C(mt,st);return rt?(fe=yt-Lt*kt,se=Lt*Wt):(pe=st+Lt*kt,Tt=-Lt*Wt),{textX:Jt,textY:ge,targetX:fe,targetY:pe,anchorX:se,anchorY:Tt,scale:It,rotate:Pt}}function U(lt,yt,mt,st,tt){var dt=yt[0].trace,rt=dt.texttemplate,at;return rt?at=q(lt,yt,mt,st,tt):dt.textinfo?at=J(yt,mt,st,tt):at=f.getValue(dt.text,mt),f.coerceString(v,at)}function W(lt,yt){var mt=f.getValue(lt.textposition,yt);return f.coerceEnumerated(T,mt)}function q(lt,yt,mt,st,tt){var dt=yt[0].trace,rt=I.castOption(dt,mt,"texttemplate");if(!rt)return"";var at=dt.type==="histogram",vt=dt.type==="waterfall",it=dt.type==="funnel",Y=dt.orientation==="h",ft,ut,kt,It;Y?(ft="y",ut=tt,kt="x",It=st):(ft="x",ut=st,kt="y",It=tt);function Pt(se){return a(ut,ut.c2l(se),!0).text}function qt(se){return a(It,It.c2l(se),!0).text}var Wt=yt[mt],Jt={};Jt.label=Wt.p,Jt.labelLabel=Jt[ft+"Label"]=Pt(Wt.p);var ge=I.castOption(dt,Wt.i,"text");(ge===0||ge)&&(Jt.text=ge),Jt.value=Wt.s,Jt.valueLabel=Jt[kt+"Label"]=qt(Wt.s);var fe={};u(fe,dt,Wt.i),(at||fe.x===void 0)&&(fe.x=Y?Jt.value:Jt.label),(at||fe.y===void 0)&&(fe.y=Y?Jt.label:Jt.value),(at||fe.xLabel===void 0)&&(fe.xLabel=Y?Jt.valueLabel:Jt.labelLabel),(at||fe.yLabel===void 0)&&(fe.yLabel=Y?Jt.labelLabel:Jt.valueLabel),vt&&(Jt.delta=+Wt.rawS||Wt.s,Jt.deltaLabel=qt(Jt.delta),Jt.final=Wt.v,Jt.finalLabel=qt(Jt.final),Jt.initial=Jt.final-Jt.delta,Jt.initialLabel=qt(Jt.initial)),it&&(Jt.value=Wt.s,Jt.valueLabel=qt(Jt.value),Jt.percentInitial=Wt.begR,Jt.percentInitialLabel=I.formatPercent(Wt.begR),Jt.percentPrevious=Wt.difR,Jt.percentPreviousLabel=I.formatPercent(Wt.difR),Jt.percentTotal=Wt.sumR,Jt.percenTotalLabel=I.formatPercent(Wt.sumR));var pe=I.castOption(dt,Wt.i,"customdata");return pe&&(Jt.customdata=pe),I.texttemplateString({data:[fe,Jt,dt._meta],fallback:dt.texttemplatefallback,labels:Jt,locale:lt._d3locale,template:rt})}function J(lt,yt,mt,st){var tt=lt[0].trace,dt=tt.orientation==="h",rt=tt.type==="waterfall",at=tt.type==="funnel";function vt(pe){var se=dt?st:mt;return a(se,pe,!0).text}function it(pe){var se=dt?mt:st;return a(se,+pe,!0).text}var Y=tt.textinfo,ft=lt[yt],ut=Y.split("+"),kt=[],It,Pt=function(pe){return ut.indexOf(pe)!==-1};if(Pt("label")&&kt.push(vt(lt[yt].p)),Pt("text")&&(It=I.castOption(tt,ft.i,"text"),(It===0||It)&&kt.push(It)),rt){var qt=+ft.rawS||ft.s,Wt=ft.v,Jt=Wt-qt;Pt("initial")&&kt.push(it(Jt)),Pt("delta")&&kt.push(it(qt)),Pt("final")&&kt.push(it(Wt))}if(at){Pt("value")&&kt.push(it(ft.s));var ge=0;Pt("percent initial")&&ge++,Pt("percent previous")&&ge++,Pt("percent total")&&ge++;var fe=ge>1;Pt("percent initial")&&(It=I.formatPercent(ft.begR),fe&&(It+=" of initial"),kt.push(It)),Pt("percent previous")&&(It=I.formatPercent(ft.difR),fe&&(It+=" of previous"),kt.push(It)),Pt("percent total")&&(It=I.formatPercent(ft.sumR),fe&&(It+=" of total"),kt.push(It))}return kt.join("
")}Z.exports={plot:k,toMoveInsideBar:V}}),Q_=Dt((Q,Z)=>{var c=tf(),g=Jo(),I=hi(),S=kn().fillText,t=B6().getLineWidth,e=Ls().hoverLabelText,r=Ca().BADNUM;function a(i,l,f,x,y){var v=n(i,l,f,x,y);if(v){var T=v.cd,u=T[0].trace,b=T[v.index];return v.color=o(u,b),g.getComponentMethod("errorbars","hoverInfo")(b,u,v),[v]}}function n(i,l,f,x,y){var v=i.cd,T=v[0].trace,u=v[0].t,b=x==="closest",_=T.type==="waterfall",P=i.maxHoverDistance,M=i.maxSpikeDistance,C,A,h,p,k,w,R;T.orientation==="h"?(C=f,A=l,h="y",p="x",k=st,w=lt):(C=l,A=f,h="x",p="y",w=st,k=lt);var O=T[h+"period"],j=b||O;function V(It){return F(It,-1)}function H(It){return F(It,1)}function F(It,Pt){var qt=It.w;return It[h]+Pt*qt/2}function U(It){return It[h+"End"]-It[h+"Start"]}var W=b?V:O?function(It){return It.p-U(It)/2}:function(It){return Math.min(V(It),It.p-u.bardelta/2)},q=b?H:O?function(It){return It.p+U(It)/2}:function(It){return Math.max(H(It),It.p+u.bardelta/2)};function J(It,Pt,qt){return y.finiteRange&&(qt=0),c.inbox(It-C,Pt-C,qt+Math.min(1,Math.abs(Pt-It)/R)-1)}function lt(It){return J(W(It),q(It),P)}function yt(It){return J(V(It),H(It),M)}function mt(It){var Pt=It[p];if(_){var qt=Math.abs(It.rawS)||0;A>0?Pt+=qt:A<0&&(Pt-=qt)}return Pt}function st(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,P+(Wt-Pt)/(Wt-qt)-1)}function tt(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,M+(Wt-Pt)/(Wt-qt)-1)}var dt=i[h+"a"],rt=i[p+"a"];R=Math.abs(dt.r2c(dt.range[1])-dt.r2c(dt.range[0]));function at(It){return(k(It)+w(It))/2}var vt=c.getDistanceFunction(x,k,w,at);if(c.getClosest(v,vt,i),i.index!==!1&&v[i.index].p!==r){j||(W=function(It){return Math.min(V(It),It.p-u.bargroupwidth/2)},q=function(It){return Math.max(H(It),It.p+u.bargroupwidth/2)});var it=i.index,Y=v[it],ft=T.base?Y.b+Y.s:Y.s;i[p+"0"]=i[p+"1"]=rt.c2p(Y[p],!0),i[p+"LabelVal"]=ft;var ut=u.extents[u.extents.round(Y.p)];i[h+"0"]=dt.c2p(b?W(Y):ut[0],!0),i[h+"1"]=dt.c2p(b?q(Y):ut[1],!0);var kt=Y.orig_p!==void 0;return i[h+"LabelVal"]=kt?Y.orig_p:Y.p,i.labelLabel=e(dt,i[h+"LabelVal"],T[h+"hoverformat"]),i.valueLabel=e(rt,i[p+"LabelVal"],T[p+"hoverformat"]),i.baseLabel=e(rt,Y.b,T[p+"hoverformat"]),i.spikeDistance=(tt(Y)+yt(Y))/2,i[h+"Spike"]=dt.c2p(Y.p,!0),S(Y,T,i),i.hovertemplate=T.hovertemplate,i}}function o(i,l){var f=l.mcc||i.marker.color,x=l.mlcc||i.marker.line.color,y=t(i,l);if(I.opacity(f))return f;if(I.opacity(x)&&y)return x}Z.exports={hoverPoints:a,hoverOnBars:n,getTraceColor:o}}),aR=Dt((Q,Z)=>{Z.exports=function(c,g,I){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),I.orientation==="h"?(c.label=c.y,c.value=c.x):(c.label=c.x,c.value=c.y),c}}),tb=Dt((Q,Z)=>{Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=S[0].trace,a=r.type==="funnel",n=r.orientation==="h",o=[],i;if(I===!1)for(i=0;i{Z.exports={attributes:Lg(),layoutAttributes:F6(),supplyDefaults:J0().supplyDefaults,crossTraceDefaults:J0().crossTraceDefaults,supplyLayoutDefaults:ZM(),calc:iR(),crossTraceCalc:zr().crossTraceCalc,colorbar:xo(),arraysToCalcdata:Vw(),plot:nx().plot,style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:Q_().hoverPoints,eventData:aR(),selectPoints:tb(),moduleType:"trace",name:"bar",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),sR=Dt((Q,Z)=>{Z.exports=oR()}),Hw=Dt((Q,Z)=>{var c=I0(),g=ef(),I=Lg(),S=wi(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=g.marker,o=n.line;Z.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:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("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:a({},n.symbol,{arrayOk:!1,editType:"plot"}),opacity:a({},n.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:a({},n.angle,{arrayOk:!1,editType:"calc"}),size:a({},n.size,{arrayOk:!1,editType:"calc"}),color:a({},n.color,{arrayOk:!1,editType:"style"}),line:{color:a({},o.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:a({},o.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:c(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:I.offsetgroup,alignmentgroup:I.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:a({},g.text,{}),hovertext:a({},g.hovertext,{}),hovertemplate:e({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:g.zorder}}),Ww=Dt((Q,Z)=>{Z.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"}}}),qw=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=hi(),S=Rp(),t=Cg(),e=dv(),r=Hw();function a(l,f,x,y){function v(p,k){return c.coerce(l,f,r,p,k)}if(n(l,f,v,y),f.visible!==!1){S(l,f,y,v),v("xhoverformat"),v("yhoverformat");var T=f._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(l.marker||{}).color||x),v("line.width"),v("fillcolor",I.addOpacity(f.line.color,.5));var u=!1;if(T){var b=v("mean"),_=v("sd");b&&b.length&&(u=!0,_&&_.length&&(u="sd"))}v("whiskerwidth");var P=v("sizemode"),M;P==="quartiles"&&(M=v("boxmean",u)),v("showwhiskers",P==="quartiles"),(P==="sd"||M==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var C=!1;if(T){var A=v("notchspan");A&&A.length&&(C=!0)}else c.validate(l.notchwidth,r.notchwidth)&&(C=!0);var h=v("notched",C);h&&v("notchwidth"),o(l,f,v,{prefix:"box"}),v("zorder")}}function n(l,f,x,y){function v(J){var lt=0;return J&&J.length&&(lt+=1,c.isArrayOrTypedArray(J[0])&&J[0].length&&(lt+=1)),lt}function T(J){return c.validate(l[J],r[J])}var u=x("y"),b=x("x"),_;if(f.type==="box"){var P=x("q1"),M=x("median"),C=x("q3");f._hasPreCompStats=P&&P.length&&M&&M.length&&C&&C.length,_=Math.min(c.minRowLength(P),c.minRowLength(M),c.minRowLength(C))}var A=v(u),h=v(b),p=A&&c.minRowLength(u),k=h&&c.minRowLength(b),w=y.calendar,R={autotypenumbers:y.autotypenumbers},O,j;if(f._hasPreCompStats)switch(String(h)+String(A)){case"00":var V=T("x0")||T("dx"),H=T("y0")||T("dy");H&&!V?O="h":O="v",j=_;break;case"10":O="v",j=Math.min(_,k);break;case"20":O="h",j=Math.min(_,b.length);break;case"01":O="h",j=Math.min(_,p);break;case"02":O="v",j=Math.min(_,u.length);break;case"12":O="v",j=Math.min(_,k,u.length);break;case"21":O="h",j=Math.min(_,b.length,p);break;case"11":j=0;break;case"22":var F=!1,U;for(U=0;U0?(O="v",h>0?j=Math.min(k,p):j=Math.min(p)):h>0?(O="h",j=Math.min(k)):j=0;if(!j){f.visible=!1;return}f._length=j;var W=x("orientation",O);f._hasPreCompStats?W==="v"&&h===0?(x("x0",0),x("dx",1)):W==="h"&&A===0&&(x("y0",0),x("dy",1)):W==="v"&&h===0?x("x0"):W==="h"&&A===0&&x("y0");var q=g.getComponentMethod("calendars","handleTraceDefaults");q(l,f,["x","y"],y)}function o(l,f,x,y){var v=y.prefix,T=c.coerce2(l,f,r,"marker.outliercolor"),u=x("marker.line.outliercolor"),b="outliers";f._hasPreCompStats?b="all":(T||u)&&(b="suspectedoutliers");var _=x(v+"points",b);_?(x("jitter",_==="all"?.3:0),x("pointpos",_==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",f.line.color),x("marker.line.color"),x("marker.line.width"),_==="suspectedoutliers"&&(x("marker.line.outliercolor",f.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete f.marker;var P=x("hoveron");(P==="all"||P.indexOf("points")!==-1)&&(x("hovertemplate"),x("hovertemplatefallback")),c.coerceSelectionMarkerOpacity(f,x)}function i(l,f){var x,y;function v(_){return c.coerce(y._input,y,r,_)}for(var T=0;T{var c=Jo(),g=kn(),I=Ww();function S(e,r,a,n,o){for(var i=o+"Layout",l=!1,f=0;f{var c=Yi(),g=Ls(),I=D0(),S=kn(),t=Ca().BADNUM,e=S._;Z.exports=function(_,P){var M=_._fullLayout,C=g.getFromId(_,P.xaxis||"x"),A=g.getFromId(_,P.yaxis||"y"),h=[],p=P.type==="violin"?"_numViolins":"_numBoxes",k,w,R,O,j,V,H;P.orientation==="h"?(R=C,O="x",j=A,V="y",H=!!P.yperiodalignment):(R=A,O="y",j=C,V="x",H=!!P.xperiodalignment);var F=r(P,V,j,M[p]),U=F[0],W=F[1],q=S.distinctVals(U,j),J=q.vals,lt=q.minDiff/2,yt,mt,st,tt,dt,rt,at=(P.boxpoints||P.points)==="all"?S.identity:function(jr){return jr.vyt.uf};if(P._hasPreCompStats){var vt=P[O],it=function(jr){return R.d2c((P[jr]||[])[k])},Y=1/0,ft=-1/0;for(k=0;k=yt.q1&&yt.q3>=yt.med){var kt=it("lowerfence");yt.lf=kt!==t&&kt<=yt.q1?kt:y(yt,st,tt);var It=it("upperfence");yt.uf=It!==t&&It>=yt.q3?It:v(yt,st,tt);var Pt=it("mean");yt.mean=Pt!==t?Pt:tt?S.mean(st,tt):(yt.q1+yt.q3)/2;var qt=it("sd");yt.sd=Pt!==t&&qt>=0?qt:tt?S.stdev(st,tt,yt.mean):yt.q3-yt.q1,yt.lo=T(yt),yt.uo=u(yt);var Wt=it("notchspan");Wt=Wt!==t&&Wt>0?Wt:b(yt,tt),yt.ln=yt.med-Wt,yt.un=yt.med+Wt;var Jt=yt.lf,ge=yt.uf;P.boxpoints&&st.length&&(Jt=Math.min(Jt,st[0]),ge=Math.max(ge,st[tt-1])),P.notched&&(Jt=Math.min(Jt,yt.ln),ge=Math.max(ge,yt.un)),yt.min=Jt,yt.max=ge}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+yt.q1,"median = "+yt.med,"q3 = "+yt.q3].join(` -`));var fe;yt.med!==t?fe=yt.med:yt.q1!==t?yt.q3!==t?fe=(yt.q1+yt.q3)/2:fe=yt.q1:yt.q3!==t?fe=yt.q3:fe=0,yt.med=fe,yt.q1=yt.q3=fe,yt.lf=yt.uf=fe,yt.mean=yt.sd=fe,yt.ln=yt.un=fe,yt.min=yt.max=fe}Y=Math.min(Y,yt.min),ft=Math.max(ft,yt.max),yt.pts2=mt.filter(at),h.push(yt)}}P._extremes[R._id]=g.findExtremes(R,[Y,ft],{padded:!0})}else{var pe=R.makeCalcdata(P,O),se=a(J,lt),Tt=J.length,Lt=n(Tt);for(k=0;k=0&&Mt0){if(yt={},yt.pos=yt[V]=J[k],mt=yt.pts=Lt[k].sort(f),st=yt[O]=mt.map(x),tt=st.length,yt.min=st[0],yt.max=st[tt-1],yt.mean=S.mean(st,tt),yt.sd=S.stdev(st,tt,yt.mean)*P.sdmultiple,yt.med=S.interp(st,.5),tt%2&&(Te||He)){var Ge,cr;Te?(Ge=st.slice(0,tt/2),cr=st.slice(tt/2+1)):He&&(Ge=st.slice(0,tt/2+1),cr=st.slice(tt/2)),yt.q1=S.interp(Ge,.5),yt.q3=S.interp(cr,.5)}else yt.q1=S.interp(st,.25),yt.q3=S.interp(st,.75);yt.lf=y(yt,st,tt),yt.uf=v(yt,st,tt),yt.lo=T(yt),yt.uo=u(yt);var ur=b(yt,tt);yt.ln=yt.med-ur,yt.un=yt.med+ur,ee=Math.min(ee,yt.ln),ve=Math.max(ve,yt.un),yt.pts2=mt.filter(at),h.push(yt)}P.notched&&S.isTypedArray(pe)&&(pe=Array.from(pe)),P._extremes[R._id]=g.findExtremes(R,P.notched?pe.concat([ee,ve]):pe,{padded:!0})}return l(h,P),h.length>0?(h[0].t={num:M[p],dPos:lt,posLetter:V,valLetter:O,labels:{med:e(_,"median:"),min:e(_,"min:"),q1:e(_,"q1:"),q3:e(_,"q3:"),max:e(_,"max:"),mean:P.boxmean==="sd"||P.sizemode==="sd"?e(_,"mean ± σ:").replace("σ",P.sdmultiple===1?"σ":P.sdmultiple+"σ"):e(_,"mean:"),lf:e(_,"lower fence:"),uf:e(_,"upper fence:")}},M[p]++,h):[{t:{empty:!0}}]};function r(_,P,M,C){var A=P in _,h=P+"0"in _,p="d"+P in _;if(A||h&&p){var k=M.makeCalcdata(_,P),w=I(_,M,P,k).vals;return[w,k]}var R;h?R=_[P+"0"]:"name"in _&&(M.type==="category"||c(_.name)&&["linear","log"].indexOf(M.type)!==-1||S.isDateTime(_.name)&&M.type==="date")?R=_.name:R=C;for(var O=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,_[P+"calendar"]),j=_._length,V=new Array(j),H=0;H{var c=Ls(),g=kn(),I=vv().getAxisGroup,S=["v","h"];function t(r,a){for(var n=r.calcdata,o=a.xaxis,i=a.yaxis,l=0;l1,h=1-l[r+"gap"],p=1-l[r+"groupgap"];for(y=0;y0;if(O==="positive"?(mt=j*(R?1:.5),dt=tt,st=dt=H):O==="negative"?(mt=dt=H,st=j*(R?1:.5),rt=tt):(mt=st=j,dt=rt=tt),ut){var kt=k.pointpos,It=k.jitter,Pt=k.marker.size/2,qt=0;kt+It>=0&&(qt=tt*(kt+It),qt>mt?(ft=!0,it=Pt,at=qt):qt>dt&&(it=Pt,at=mt)),qt<=mt&&(at=mt);var Wt=0;kt-It<=0&&(Wt=-tt*(kt-It),Wt>st?(ft=!0,Y=Pt,vt=Wt):Wt>rt&&(Y=Pt,vt=st)),Wt<=st&&(vt=st)}else at=mt,vt=st;var Jt=new Array(T.length);for(v=0;v{var c=qr(),g=kn(),I=Vs(),S=5,t=.01;function e(o,i,l,f){var x=o._context.staticPlot,y=i.xaxis,v=i.yaxis;g.makeTraceGroups(f,l,"trace boxes").each(function(T){var u=c.select(this),b=T[0],_=b.t,P=b.trace;if(_.wdPos=_.bdPos*P.whiskerwidth,P.visible!==!0||_.empty){u.remove();return}var M,C;P.orientation==="h"?(M=v,C=y):(M=y,C=v),r(u,{pos:M,val:C},P,_,x),a(u,{x:y,y:v},P,_),n(u,{pos:M,val:C},P,_)})}function r(o,i,l,f,x){var y=l.orientation==="h",v=i.val,T=i.pos,u=!!T.rangebreaks,b=f.bPos,_=f.wdPos||0,P=f.bPosPxOffset||0,M=l.whiskerwidth||0,C=l.showwhiskers!==!1,A=l.notched||!1,h=A?1-2*l.notchwidth:1,p,k;Array.isArray(f.bdPos)?(p=f.bdPos[0],k=f.bdPos[1]):(p=f.bdPos,k=f.bdPos);var w=o.selectAll("path.box").data(l.type!=="violin"||l.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(R){if(R.empty)return c.select(this).attr("d","M0,0Z");var O=T.c2l(R.pos+b,!0),j=T.l2p(O-p)+P,V=T.l2p(O+k)+P,H=u?(j+V)/2:T.l2p(O)+P,F=l.whiskerwidth,U=u?j*F+(1-F)*H:T.l2p(O-_)+P,W=u?V*F+(1-F)*H:T.l2p(O+_)+P,q=T.l2p(O-p*h)+P,J=T.l2p(O+k*h)+P,lt=l.sizemode==="sd",yt=v.c2p(lt?R.mean-R.sd:R.q1,!0),mt=lt?v.c2p(R.mean+R.sd,!0):v.c2p(R.q3,!0),st=g.constrain(lt?v.c2p(R.mean,!0):v.c2p(R.med,!0),Math.min(yt,mt)+1,Math.max(yt,mt)-1),tt=R.lf===void 0||l.boxpoints===!1||lt,dt=v.c2p(tt?R.min:R.lf,!0),rt=v.c2p(tt?R.max:R.uf,!0),at=v.c2p(R.ln,!0),vt=v.c2p(R.un,!0);y?c.select(this).attr("d","M"+st+","+q+"V"+J+"M"+yt+","+j+"V"+V+(A?"H"+at+"L"+st+","+J+"L"+vt+","+V:"")+"H"+mt+"V"+j+(A?"H"+vt+"L"+st+","+q+"L"+at+","+j:"")+"Z"+(C?"M"+yt+","+H+"H"+dt+"M"+mt+","+H+"H"+rt+(M===0?"":"M"+dt+","+U+"V"+W+"M"+rt+","+U+"V"+W):"")):c.select(this).attr("d","M"+q+","+st+"H"+J+"M"+j+","+yt+"H"+V+(A?"V"+at+"L"+J+","+st+"L"+V+","+vt:"")+"V"+mt+"H"+j+(A?"V"+vt+"L"+q+","+st+"L"+j+","+at:"")+"Z"+(C?"M"+H+","+yt+"V"+dt+"M"+H+","+mt+"V"+rt+(M===0?"":"M"+U+","+dt+"H"+W+"M"+U+","+rt+"H"+W):""))})}function a(o,i,l,f){var x=i.x,y=i.y,v=f.bdPos,T=f.bPos,u=l.boxpoints||l.points;g.seedPseudoRandom();var b=function(M){return M.forEach(function(C){C.t=f,C.trace=l}),M},_=o.selectAll("g.points").data(u?b:[]);_.enter().append("g").attr("class","points"),_.exit().remove();var P=_.selectAll("path").data(function(M){var C,A=M.pts2,h=Math.max((M.max-M.min)/10,M.q3-M.q1),p=h*1e-9,k=h*t,w=[],R=0,O;if(l.jitter){if(h===0)for(R=1,w=new Array(A.length),C=0;CM.lo&&(W.so=!0)}return A});P.enter().append("path").classed("point",!0),P.exit().remove(),P.call(I.translatePoints,x,y)}function n(o,i,l,f){var x=i.val,y=i.pos,v=!!y.rangebreaks,T=f.bPos,u=f.bPosPxOffset||0,b=l.boxmean||(l.meanline||{}).visible,_,P;Array.isArray(f.bdPos)?(_=f.bdPos[0],P=f.bdPos[1]):(_=f.bdPos,P=f.bdPos);var M=o.selectAll("path.mean").data(l.type==="box"&&l.boxmean||l.type==="violin"&&l.box.visible&&l.meanline.visible?g.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(C){var A=y.c2l(C.pos+T,!0),h=y.l2p(A-_)+u,p=y.l2p(A+P)+u,k=v?(h+p)/2:y.l2p(A)+u,w=x.c2p(C.mean,!0),R=x.c2p(C.mean-C.sd,!0),O=x.c2p(C.mean+C.sd,!0);l.orientation==="h"?c.select(this).attr("d","M"+w+","+h+"V"+p+(b==="sd"?"m0,0L"+R+","+k+"L"+w+","+h+"L"+O+","+k+"Z":"")):c.select(this).attr("d","M"+h+","+w+"H"+p+(b==="sd"?"m0,0L"+k+","+R+"L"+h+","+w+"L"+k+","+O+"Z":""))})}Z.exports={plot:e,plotBoxAndWhiskers:r,plotPoints:a,plotBoxMean:n}}),V6=Dt((Q,Z)=>{var c=qr(),g=hi(),I=Vs();function S(e,r,a){var n=a||c.select(e).selectAll("g.trace.boxes");n.style("opacity",function(o){return o[0].trace.opacity}),n.each(function(o){var i=c.select(this),l=o[0].trace,f=l.line.width;function x(T,u,b,_){T.style("stroke-width",u+"px").call(g.stroke,b).call(g.fill,_)}var y=i.selectAll("path.box");if(l.type==="candlestick")y.each(function(T){if(!T.empty){var u=c.select(this),b=l[T.dir];x(u,b.line.width,b.line.color,b.fillcolor),u.style("opacity",l.selectedpoints&&!T.selected?.3:1)}});else{x(y,f,l.line.color,l.fillcolor),i.selectAll("path.mean").style({"stroke-width":f,"stroke-dasharray":2*f+"px,"+f+"px"}).call(g.stroke,l.line.color);var v=i.selectAll("path.point");I.pointStyle(v,l,e)}})}function t(e,r,a){var n=r[0].trace,o=a.selectAll("path.point");n.selectedpoints?I.selectedPointStyle(o,n):I.pointStyle(o,n,e)}Z.exports={style:S,styleOnSelect:t}}),YM=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=hi(),t=g.fillText;function e(n,o,i,l){var f=n.cd,x=f[0].trace,y=x.hoveron,v=[],T;return y.indexOf("boxes")!==-1&&(v=v.concat(r(n,o,i,l))),y.indexOf("points")!==-1&&(T=a(n,o,i)),l==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(n,o,i,l){var f=n.cd,x=n.xa,y=n.ya,v=f[0].trace,T=f[0].t,u=v.type==="violin",b,_,P,M,C,A,h,p,k,w,R,O=T.bdPos,j,V,H=T.wHover,F=function(Wt){return P.c2l(Wt.pos)+T.bPos-P.c2l(A)};u&&v.side!=="both"?(v.side==="positive"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt,Jt+H,w)},j=O,V=0),v.side==="negative"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt,w)},j=0,V=O)):(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt+H,w)},j=V=O);var U;u?U=function(Wt){return I.inbox(Wt.span[0]-C,Wt.span[1]-C,w)}:U=function(Wt){return I.inbox(Wt.min-C,Wt.max-C,w)},v.orientation==="h"?(C=o,A=i,h=U,p=k,b="y",P=y,_="x",M=x):(C=i,A=o,h=k,p=U,b="x",P=x,_="y",M=y);var W=Math.min(1,O/Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0])));w=n.maxHoverDistance-W,R=n.maxSpikeDistance-W;function q(Wt){return(h(Wt)+p(Wt))/2}var J=I.getDistanceFunction(l,h,p,q);if(I.getClosest(f,J,n),n.index===!1)return[];var lt=f[n.index],yt=v.line.color,mt=(v.marker||{}).color;S.opacity(yt)&&v.line.width?n.color=yt:S.opacity(mt)&&v.boxpoints?n.color=mt:n.color=v.fillcolor,n[b+"0"]=P.c2p(lt.pos+T.bPos-V,!0),n[b+"1"]=P.c2p(lt.pos+T.bPos+j,!0),n[b+"LabelVal"]=lt.orig_p!==void 0?lt.orig_p:lt.pos;var st=b+"Spike";n.spikeDistance=q(lt)*R/w,n[st]=P.c2p(lt.pos,!0);var tt=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,dt=v.boxpoints||v.points,rt=dt&&tt?["max","uf","q3","med","mean","q1","lf","min"]:dt&&!tt?["max","uf","q3","med","q1","lf","min"]:!dt&&tt?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],at=M.range[1]{Z.exports=function(c,g){return g.hoverOnBox&&(c.hoverOnBox=g.hoverOnBox),"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),KM=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a;if(g===!1)for(r=0;r{Z.exports={attributes:Hw(),layoutAttributes:Ww(),supplyDefaults:qw().supplyDefaults,crossTraceDefaults:qw().crossTraceDefaults,supplyLayoutDefaults:N6().supplyLayoutDefaults,calc:GM(),crossTraceCalc:j6().crossTraceCalc,plot:U6().plot,style:V6().style,styleOnSelect:V6().styleOnSelect,hoverPoints:YM().hoverPoints,eventData:lR(),selectPoints:KM(),moduleType:"trace",name:"box",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}),cR=Dt((Q,Z)=>{Z.exports=uR()}),eb=Dt((Q,Z)=>{var c=kc(),{extendFlat:g}=Ia(),I=Ho(),{axisHoverFormat:S}=dh(),t=da(),{hovertemplateAttrs:e,templatefallbackAttrs:r,texttemplateAttrs:a}=Zu(),n=ef();Z.exports=g({z:{valType:"data_array",editType:"calc"},x:g({},n.x,{impliedEdits:{xtype:"array"}}),x0:g({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:g({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:g({},n.y,{impliedEdits:{ytype:"array"}}),y0:g({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:g({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:g({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:g({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:g({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:g({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:g({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:g({},n.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:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:e(),hovertemplatefallback:r(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:g({},I.showlegend,{dflt:!1}),zorder:n.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}),H6=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Jo();Z.exports=function(e,r,a,n,o,i){var l=a("z");o=o||"x",i=i||"y";var f,x;if(l===void 0||!l.length)return 0;if(g.isArray1D(l)){f=a(o),x=a(i);var y=g.minRowLength(f),v=g.minRowLength(x);if(y===0||v===0)return 0;r._length=Math.min(y,v,l.length)}else{if(f=S(o,a),x=S(i,a),!t(l))return 0;a("transpose"),r._length=null}var T=I.getComponentMethod("calendars","handleTraceDefaults");return T(e,r,[o,i],n),!0};function S(e,r){var a=r(e),n=a?r(e+"type","array"):"scaled";return n==="scaled"&&(r(e+"0"),r("d"+e)),a}function t(e){for(var r=!0,a=!1,n=!1,o,i=0;i0&&(a=!0);for(var l=0;l{var c=kn();Z.exports=function(g,I){g("texttemplate"),g("texttemplatefallback");var S=c.extendFlat({},I.font,{color:"auto",size:"auto"});c.coerceFont(g,"textfont",S)}}),XM=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("zsmooth");S===!1&&(I("xgap"),I("ygap")),I("zhoverformat")}}),hR=Dt((Q,Z)=>{var c=kn(),g=H6(),I=$w(),S=Rp(),t=XM(),e=mc(),r=eb();Z.exports=function(a,n,o,i){function l(x,y){return c.coerce(a,n,r,x,y)}var f=g(a,n,l,i);if(!f){n.visible=!1;return}S(a,n,i,l),l("xhoverformat"),l("yhoverformat"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),I(l,i),t(a,n,l,i),l("hoverongaps"),l("connectgaps",c.isArray1D(n.z)&&n.zsmooth!==!1),e(a,n,i,l,{prefix:"",cLetter:"z"}),l("zorder")}}),JM=Dt((Q,Z)=>{var c=Yi();Z.exports={count:function(g,I,S){return S[g]++,1},sum:function(g,I,S,t){var e=t[I];return c(e)?(e=Number(e),S[g]+=e,e):0},avg:function(g,I,S,t,e){var r=t[I];return c(r)&&(r=Number(r),S[g]+=r,e[g]++),0},min:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]>e){var r=e-S[g];return S[g]=e,r}}else return S[g]=e,e;return 0},max:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]{Z.exports={percent:function(c,g){for(var I=c.length,S=100/g,t=0;t{Z.exports=function(c,g){for(var I=c.length,S=0,t=0;t{var c=Ca(),g=c.ONEAVGYEAR,I=c.ONEAVGMONTH,S=c.ONEDAY,t=c.ONEHOUR,e=c.ONEMIN,r=c.ONESEC,a=Ls().tickIncrement;Z.exports=function(f,x,y,v,T){var u=-1.1*x,b=-.1*x,_=f-b,P=y[0],M=y[1],C=Math.min(n(P+b,P+_,v,T),n(M+b,M+_,v,T)),A=Math.min(n(P+u,P+b,v,T),n(M+u,M+b,v,T)),h,p;if(C>A&&AS){var k=h===g?1:6,w=h===g?"M12":"M1";return function(R,O){var j=v.c2d(R,g,T),V=j.indexOf("-",k);V>0&&(j=j.substr(0,V));var H=v.d2c(j,0,T);if(Hr?f>S?f>g*1.1?g:f>I*1.1?I:S:f>t?t:f>e?e:r:Math.pow(10,Math.floor(Math.log(f)/Math.LN10))}function i(f,x,y,v,T,u){if(v&&f>S){var b=l(x,T,u),_=l(y,T,u),P=f===g?0:1;return b[P]!==_[P]}return Math.floor(y/f)-Math.floor(x/f)>.1}function l(f,x,y){var v=x.c2d(f,g,y).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}),r7=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Jo(),S=Ls(),{hasColorscale:t}=Ud(),e=Xd(),r=Vw(),a=JM(),n=QM(),o=t7(),i=e7();function l(T,u){var b=[],_=[],P=u.orientation==="h",M=S.getFromId(T,P?u.yaxis:u.xaxis),C=P?"y":"x",A={x:"y",y:"x"}[C],h=u[C+"calendar"],p=u.cumulative,k,w=f(T,u,M,C),R=w[0],O=w[1],j=typeof R.size=="string",V=[],H=j?V:R,F=[],U=[],W=[],q=0,J=u.histnorm,lt=u.histfunc,yt=J.indexOf("density")!==-1,mt,st,tt;p.enabled&&yt&&(J=J.replace(/ ?density$/,""),yt=!1);var dt=lt==="max"||lt==="min",rt=dt?null:0,at=a.count,vt=n[J],it=!1,Y=function(ee){return M.r2c(ee,0,h)},ft;for(g.isArrayOrTypedArray(u[A])&<!=="count"&&(ft=u[A],it=lt==="avg",at=a[lt]),k=Y(R.start),st=Y(R.end)+(k-S.tickIncrement(k,R.size,!1,h))/1e6;k=0&&tt=Tt;k--)if(_[k]){Lt=k;break}for(k=Tt;k<=Lt;k++)if(c(b[k])&&c(_[k])){var Mt={p:b[k],s:_[k],b:0};p.enabled||(Mt.pts=W[k],Pt?Mt.ph0=Mt.ph1=W[k].length?O[W[k][0]]:b[k]:(u._computePh=!0,Mt.ph0=fe(V[k]),Mt.ph1=fe(V[k+1],!0))),se.push(Mt)}return se.length===1&&(se[0].width1=S.tickIncrement(se[0].p,R.size,!1,h)-se[0].p),t(u,"marker")&&e(T,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),t(u,"marker.line")&&e(T,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(se,u),g.isArrayOrTypedArray(u.selectedpoints)&&g.tagSelected(se,u,Jt),se}function f(T,u,b,_,P){var M=_+"bins",C=T._fullLayout,A=u["_"+_+"bingroup"],h=C._histogramBinOpts[A],p=C.barmode==="overlay",k,w,R,O,j,V,H,F=function(ge){return b.r2c(ge,0,O)},U=function(ge){return b.c2r(ge,0,O)},W=b.type==="date"?function(ge){return ge||ge===0?g.cleanDate(ge,null,O):null}:function(ge){return c(ge)?Number(ge):null};function q(ge,fe,pe){fe[ge+"Found"]?(fe[ge]=W(fe[ge]),fe[ge]===null&&(fe[ge]=pe[ge])):(V[ge]=fe[ge]=pe[ge],g.nestedProperty(w[0],M+"."+ge).set(pe[ge]))}if(u["_"+_+"autoBinFinished"])delete u["_"+_+"autoBinFinished"];else{w=h.traces;var J=[],lt=!0,yt=!1,mt=!1;for(k=0;k"u"){if(P)return[tt,j,!0];tt=x(T,u,b,_,M)}H=R.cumulative||{},H.enabled&&H.currentbin!=="include"&&(H.direction==="decreasing"?tt.start=U(S.tickIncrement(F(tt.start),tt.size,!0,O)):tt.end=U(S.tickIncrement(F(tt.end),tt.size,!1,O))),h.size=tt.size,h.sizeFound||(V.size=tt.size,g.nestedProperty(w[0],M+".size").set(tt.size)),q("start",h,tt),q("end",h,tt)}j=u["_"+_+"pos0"],delete u["_"+_+"pos0"];var rt=u._input[M]||{},at=g.extendFlat({},h),vt=h.start,it=b.r2l(rt.start),Y=it!==void 0;if((h.startFound||Y)&&it!==b.r2l(vt)){var ft=Y?it:g.aggNums(Math.min,null,j),ut={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:h.size,tick0:vt,calendar:O,range:[ft,S.tickIncrement(ft,h.size,!1,O)].map(b.l2r)},kt=S.tickFirst(ut);kt>b.r2l(ft)&&(kt=S.tickIncrement(kt,h.size,!0,O)),at.start=b.l2r(kt),Y||g.nestedProperty(u,M+".start").set(at.start)}var It=h.end,Pt=b.r2l(rt.end),qt=Pt!==void 0;if((h.endFound||qt)&&Pt!==b.r2l(It)){var Wt=qt?Pt:g.aggNums(Math.max,null,j);at.end=b.l2r(Wt),qt||g.nestedProperty(u,M+".start").set(at.end)}var Jt="autobin"+_;return u._input[Jt]===!1&&(u._input[M]=g.extendFlat({},u[M]||{}),delete u._input[Jt],delete u[Jt]),[at,j]}function x(T,u,b,_,P){var M=T._fullLayout,C=y(T,u),A=!1,h=1/0,p=[u],k,w,R;for(k=0;k=0;_--)A(_);else if(u==="increasing"){for(_=1;_=0;_--)T[_]+=T[_+1];b==="exclude"&&(T.push(0),T.shift())}}Z.exports={calc:l,calcAllAutoBins:f}}),fR=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=JM(),S=QM(),t=t7(),e=e7(),r=r7().calcAllAutoBins;Z.exports=function(i,l){var f=g.getFromId(i,l.xaxis),x=g.getFromId(i,l.yaxis),y=l.xcalendar,v=l.ycalendar,T=function(Le){return f.r2c(Le,0,y)},u=function(Le){return x.r2c(Le,0,v)},b=function(Le){return f.c2r(Le,0,y)},_=function(Le){return x.c2r(Le,0,v)},P,M,C,A,h=r(i,l,f,"x"),p=h[0],k=h[1],w=r(i,l,x,"y"),R=w[0],O=w[1],j=l._length;k.length>j&&k.splice(j,k.length-j),O.length>j&&O.splice(j,O.length-j);var V=[],H=[],F=[],U=typeof p.size=="string",W=typeof R.size=="string",q=[],J=[],lt=U?q:p,yt=W?J:R,mt=0,st=[],tt=[],dt=l.histnorm,rt=l.histfunc,at=dt.indexOf("density")!==-1,vt=rt==="max"||rt==="min",it=vt?null:0,Y=I.count,ft=S[dt],ut=!1,kt=[],It=[],Pt="z"in l?l.z:"marker"in l&&Array.isArray(l.marker.color)?l.marker.color:"";Pt&&rt!=="count"&&(ut=rt==="avg",Y=I[rt]);var qt=p.size,Wt=T(p.start),Jt=T(p.end)+(Wt-g.tickIncrement(Wt,qt,!1,y))/1e6;for(P=Wt;P=0&&C=0&&A{var c=kn(),g=Ca().BADNUM,I=D0();Z.exports=function(S,t,e,r,a,n){var o=S._length,i=t.makeCalcdata(S,r),l=e.makeCalcdata(S,a);i=I(S,t,r,i).vals,l=I(S,e,a,l).vals;var f=S.text,x=f!==void 0&&c.isArray1D(f),y=S.hovertext,v=y!==void 0&&c.isArray1D(y),T,u,b=c.distinctVals(i),_=b.vals,P=c.distinctVals(l),M=P.vals,C=[],A,h,p=M.length,k=_.length;for(T=0;T{var c=Yi(),g=kn(),I=Ca().BADNUM;Z.exports=function(S,t,e,r){var a,n,o,i,l,f;function x(_){if(c(_))return+_}if(t&&t.transpose){for(a=0,l=0;l{var c=kn(),g=.01,I=[[-1,0],[1,0],[0,-1],[0,1]];function S(e){return .5-.25*Math.min(1,e*.5)}Z.exports=function(e,r){var a=1,n;for(t(e,r),n=0;ng;n++)a=t(e,r,S(a));return a>g&&c.log("interp2d didn't converge quickly",a),e};function t(e,r,a){var n=0,o,i,l,f,x,y,v,T,u,b,_,P,M;for(f=0;fP&&(n=Math.max(n,Math.abs(e[i][l]-_)/(M-P))))}return n}}),Z6=Dt((Q,Z)=>{var c=kn().maxRowLength;Z.exports=function(g){var I=[],S={},t=[],e=g[0],r=[],a=[0,0,0],n=c(g),o,i,l,f,x,y,v,T;for(i=0;i=0;x--)f=t[x],i=f[0],l=f[1],y=((S[[i-1,l]]||a)[2]+(S[[i+1,l]]||a)[2]+(S[[i,l-1]]||a)[2]+(S[[i,l+1]]||a)[2])/20,y&&(v[f]=[i,l,y],t.splice(x,1),T=!0);if(!T)throw"findEmpties iterated with no new neighbors";for(f in v)S[f]=v[f],I.push(v[f])}return I.sort(function(u,b){return b[2]-u[2]})}}),n7=Dt((Q,Z)=>{var c=Jo(),g=kn().isArrayOrTypedArray;Z.exports=function(I,S,t,e,r,a){var n=[],o=c.traceIs(I,"contour"),i=c.traceIs(I,"histogram"),l,f,x,y=g(S)&&S.length>1;if(y&&!i&&a.type!=="category"){var v=S.length;if(v<=r){if(o)n=Array.from(S).slice(0,r);else if(r===1)a.type==="log"?n=[.5*S[0],2*S[0]]:n=[S[0]-.5,S[0]+.5];else if(a.type==="log"){for(n=[Math.pow(S[0],1.5)/Math.pow(S[1],.5)],x=1;x{var c=Jo(),g=kn(),I=Ls(),S=D0(),t=fR(),e=Xd(),r=W6(),a=q6(),n=$6(),o=Z6(),i=n7(),l=Ca().BADNUM;Z.exports=function(y,v){var T=I.getFromId(y,v.xaxis||"x"),u=I.getFromId(y,v.yaxis||"y"),b=c.traceIs(v,"contour"),_=c.traceIs(v,"histogram"),P=b?"best":v.zsmooth,M,C,A,h,p,k,w,R,O,j,V;if(T._minDtick=0,u._minDtick=0,_)V=t(y,v),h=V.orig_x,M=V.x,C=V.x0,A=V.dx,R=V.orig_y,p=V.y,k=V.y0,w=V.dy,O=V.z;else{var H=v.z;g.isArray1D(H)?(r(v,T,u,"x","y",["z"]),M=v._x,p=v._y,H=v._z):(h=v.x?T.makeCalcdata(v,"x"):[],R=v.y?u.makeCalcdata(v,"y"):[],M=S(v,T,"x",h).vals,p=S(v,u,"y",R).vals,v._x=M,v._y=p),C=v.x0,A=v.dx,k=v.y0,w=v.dy,O=a(H,v,T,u)}(T.rangebreaks||u.rangebreaks)&&(O=x(M,p,O),_||(M=f(M),p=f(p),v._x=M,v._y=p)),!_&&(b||v.connectgaps)&&(v._emptypoints=o(O),n(O,v._emptypoints));function F(tt){P=v._input.zsmooth=v.zsmooth=!1,g.warn('cannot use zsmooth: "fast": '+tt)}function U(tt){if(tt.length>1){var dt=(tt[tt.length-1]-tt[0])/(tt.length-1),rt=Math.abs(dt/100);for(j=0;jrt)return!1}return!0}v._islinear=!1,T.type==="log"||u.type==="log"?P==="fast"&&F("log axis found"):U(M)?U(p)?v._islinear=!0:P==="fast"&&F("y scale is not linear"):P==="fast"&&F("x scale is not linear");var W=g.maxRowLength(O),q=v.xtype==="scaled"?"":M,J=i(v,q,C,A,W,T),lt=v.ytype==="scaled"?"":p,yt=i(v,lt,k,w,O.length,u);v._extremes[T._id]=I.findExtremes(T,J),v._extremes[u._id]=I.findExtremes(u,yt);var mt={x:J,y:yt,z:O,text:v._text||v.text,hovertext:v._hovertext||v.hovertext};if(v.xperiodalignment&&h&&(mt.orig_x=h),v.yperiodalignment&&R&&(mt.orig_y=R),q&&q.length===J.length-1&&(mt.xCenter=q),lt&<.length===yt.length-1&&(mt.yCenter=lt),_&&(mt.xRanges=V.xRanges,mt.yRanges=V.yRanges,mt.pts=V.pts),b||e(y,v,{vals:O,cLetter:"z"}),b&&v.contours&&v.contours.coloring==="heatmap"){var st={type:v.type==="contour"?"heatmap":"histogram2d",xcalendar:v.xcalendar,ycalendar:v.ycalendar};mt.xfill=i(st,q,C,A,W,T),mt.yfill=i(st,lt,k,w,O.length,u)}return[mt]};function f(y){for(var v=[],T=y.length,u=0;u{Q.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"]],Q.STYLE=Q.CSS_DECLARATIONS.map(function(Z){return Z.join(": ")+"; "}).join("")}),i7=Dt((Q,Z)=>{var c=Y6(),g=Vs(),I=kn(),S=null;function t(){if(S!==null)return S;S=!1;var e=I.isSafari()||I.isMacWKWebView()||I.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(c.CSS_DECLARATIONS).reverse(),a=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof a=="function")S=r.some(function(l){return a.apply(null,l)});else{var n=g.tester.append("image").attr("style",c.STYLE),o=window.getComputedStyle(n.node()),i=o.imageRendering;S=r.some(function(l){var f=l[1];return i===f||i===f.toLowerCase()}),n.remove()}}return S}Z.exports=t}),K6=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Jo(),S=Vs(),t=Ls(),e=kn(),r=ec(),a=Ws(),n=hi(),o=Xc().extractOpts,i=Xc().makeColorScaleFuncFromTrace,l=Dp(),f=Af(),x=f.LINE_SPACING,y=i7(),v=Y6().STYLE,T="heatmap-label";function u(C){return C.selectAll("g."+T)}function b(C){u(C).remove()}Z.exports=function(C,A,h,p){var k=A.xaxis,w=A.yaxis;e.makeTraceGroups(p,h,"hm").each(function(R){var O=c.select(this),j=R[0],V=j.trace,H=V.xgap||0,F=V.ygap||0,U=j.z,W=j.x,q=j.y,J=j.xCenter,lt=j.yCenter,yt=I.traceIs(V,"contour"),mt=yt?"best":V.zsmooth,st=U.length,tt=e.maxRowLength(U),dt=!1,rt=!1,at,vt,it,Y,ft,ut,kt,It;for(ut=0;at===void 0&&ut0;)vt=k.c2p(W[ut]),ut--;for(vt0;)ft=w.c2p(q[ut]),ut--;ft=k._length||vt<=0||Y>=w._length||ft<=0;if(ge){var fe=O.selectAll("image").data([]);fe.exit().remove(),b(O);return}var pe,se;Pt==="fast"?(pe=tt,se=st):(pe=Wt,se=Jt);var Tt=document.createElement("canvas");Tt.width=pe,Tt.height=se;var Lt=Tt.getContext("2d",{willReadFrequently:!0}),Mt=i(V,{noNumericCheck:!0,returnArray:!0}),ee,ve;Pt==="fast"?(ee=dt?function(Zn){return tt-1-Zn}:e.identity,ve=rt?function(Zn){return st-1-Zn}:e.identity):(ee=function(Zn){return e.constrain(Math.round(k.c2p(W[Zn])-at),0,Wt)},ve=function(Zn){return e.constrain(Math.round(w.c2p(q[Zn])-Y),0,Jt)});var oe=ve(0),Te=[oe,oe],He=dt?0:1,Ge=rt?0:1,cr=0,ur=0,jr=0,Wr=0,br,Xr,nn,Le,Gt;function ne(Zn,La){if(Zn!==void 0){var Vi=Mt(Zn);return Vi[0]=Math.round(Vi[0]),Vi[1]=Math.round(Vi[1]),Vi[2]=Math.round(Vi[2]),cr+=La,ur+=Vi[0]*La,jr+=Vi[1]*La,Wr+=Vi[2]*La,Vi}return[0,0,0,0]}function Ct(Zn,La,Vi,Qa){var Ja=Zn[Vi.bin0];if(Ja===void 0)return ne(void 0,1);var Do=Zn[Vi.bin1],yo=La[Vi.bin0],Fo=La[Vi.bin1],Da=Do-Ja||0,ys=yo-Ja||0,os;return Do===void 0?Fo===void 0?os=0:yo===void 0?os=2*(Fo-Ja):os=(2*Fo-yo-Ja)*2/3:Fo===void 0?yo===void 0?os=0:os=(2*Ja-Do-yo)*2/3:yo===void 0?os=(2*Fo-Do-Ja)*2/3:os=Fo+Ja-Do-yo,ne(Ja+Vi.frac*Da+Qa.frac*(ys+Vi.frac*os))}if(Pt!=="default"){var gt=0,St;try{St=new Uint8Array(pe*se*4)}catch{St=new Array(pe*se*4)}if(Pt==="smooth"){var Nt=J||W,re=lt||q,le=new Array(Nt.length),we=new Array(re.length),Ue=new Array(Wt),qe=J?P:_,or=lt?P:_,Sr,Ar,mr;for(ut=0;utki||ki>w._length))for(kt=Cn;ktji||ji>k._length)){var Xi=a({x:Oi,y:fi},V,C._fullLayout);Xi.x=Oi,Xi.y=fi;var ci=j.z[ut][kt];ci===void 0?(Xi.z="",Xi.zLabel=""):(Xi.z=ci,Xi.zLabel=t.tickText(We,ci,"hover").text);var za=j.text&&j.text[ut]&&j.text[ut][kt];(za===void 0||za===!1)&&(za=""),Xi.text=za;var Wa=e.texttemplateString({data:[Xi,V._meta],fallback:V.texttemplatefallback,labels:Xi,locale:C._fullLayout._d3locale,template:sa});if(Wa){var ze=Wa.split("
"),Ie=ze.length,Rr=0;for(It=0;It{Z.exports={min:"zmin",max:"zmax"}}),X6=Dt((Q,Z)=>{var c=qr();Z.exports=function(g){c.select(g).selectAll(".hm image").style("opacity",function(I){return I.trace.opacity})}}),J6=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=Ls(),t=Xc().extractOpts;Z.exports=function(e,r,a,n,o){o||(o={});var i=o.isContour,l=e.cd[0],f=l.trace,x=e.xa,y=e.ya,v=l.x,T=l.y,u=l.z,b=l.xCenter,_=l.yCenter,P=l.zmask,M=f.zhoverformat,C=v,A=T,h,p,k,w;if(e.index!==!1){try{k=Math.round(e.index[1]),w=Math.round(e.index[0])}catch{g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index);return}if(k<0||k>=u[0].length||w<0||w>u.length)return}else{if(c.inbox(r-v[0],r-v[v.length-1],0)>0||c.inbox(a-T[0],a-T[T.length-1],0)>0)return;if(i){var R;for(C=[2*v[0]-v[1]],R=1;R{Z.exports={attributes:eb(),supplyDefaults:hR(),calc:G6(),plot:K6(),colorbar:I1(),style:X6(),hoverPoints:J6(),moduleType:"trace",name:"heatmap",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}),pR=Dt((Q,Z)=>{Z.exports=dR()}),a7=Dt((Q,Z)=>{Z.exports=function(c,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}),mR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["binNumber"]}}),Q6=Dt((Q,Z)=>{var c=Lg(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=da(),r=a7(),a=mR(),n=Ia().extendFlat;Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:n({},c.text,{}),hovertext:n({},c.hovertext,{}),orientation:c.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),texttemplate:S({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:n({},c.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:c.insidetextanchor,textangle:c.textangle,cliponaxis:c.cliponaxis,constraintext:c.constraintext,marker:c.marker,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,zorder:c.zorder}}),gR=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=hi(),S=J0().handleText,t=R6(),e=Q6();Z.exports=function(r,a,n,o){function i(A,h){return g.coerce(r,a,e,A,h)}var l=i("x"),f=i("y"),x=i("cumulative.enabled");x&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var y=i("textposition");S(r,a,o,i,y,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var v=i("orientation",f&&!l?"h":"v"),T=v==="v"?"x":"y",u=v==="v"?"y":"x",b=l&&f?Math.min(g.minRowLength(l)&&g.minRowLength(f)):g.minRowLength(a[T]||[]);if(!b){a.visible=!1;return}a._length=b;var _=c.getComponentMethod("calendars","handleTraceDefaults");_(r,a,["x","y"],o);var P=a[u];P&&i("histfunc"),i("histnorm"),i("autobin"+T),t(r,a,i,n,o),g.coerceSelectionMarkerOpacity(a,i);var M=(a.marker.line||{}).color,C=c.getComponentMethod("errorbars","supplyDefaults");C(r,a,M||I.defaultLine,{axis:"y"}),C(r,a,M||I.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}}),tk=Dt((Q,Z)=>{var c=kn(),g=Rc(),I=Jo().traceIs,S=Cg(),t=J0().validateCornerradius,e=c.nestedProperty,r=vv().getAxisGroup,a=[{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"}],n=["x","y"];Z.exports=function(o,i){var l=i._histogramBinOpts={},f=[],x={},y=[],v,T,u,b,_,P,M;function C(yt,mt){return c.coerce(v._input,v,v._module.attributes,yt,mt)}function A(yt){return yt.orientation==="v"?"x":"y"}function h(yt,mt){var st=g.getFromTrace({_fullLayout:i},yt,mt);return st.type}function p(yt,mt,st){var tt=yt.uid+"__"+st;mt||(mt=tt);var dt=h(yt,st),rt=yt[st+"calendar"]||"",at=l[mt],vt=!0;at&&(dt===at.axType&&rt===at.calendar?(vt=!1,at.traces.push(yt),at.dirs.push(st)):(mt=tt,dt!==at.axType&&c.warn(["Attempted to group the bins of trace",yt.index,"set on a","type:"+dt,"axis","with bins on","type:"+at.axType,"axis."].join(" ")),rt!==at.calendar&&c.warn(["Attempted to group the bins of trace",yt.index,"set with a",rt,"calendar","with bins",at.calendar?"on a "+at.calendar+" calendar":"w/o a set calendar"].join(" ")))),vt&&(l[mt]={traces:[yt],dirs:[st],axType:dt,calendar:yt[st+"calendar"]||""}),yt["_"+st+"bingroup"]=mt}for(_=0;_{var c=Q_().hoverPoints,g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.cd[I.index],o=I.cd[0].trace;if(!o.cumulative.enabled){var i=o.orientation==="h"?"y":"x";I[i+"Label"]=g(I[i+"a"],[n.ph0,n.ph1],o[i+"hoverformat"])}return a}}}),o7=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(c.z=g.zLabelVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),!(I.cumulative||{}).enabled){var e=Array.isArray(t)?S[0].pts[t[0]][t[1]]:S[t].pts;c.pointNumbers=e,c.binNumber=c.pointNumber,delete c.pointNumber,delete c.pointIndex;var r;if(I._indexToPoints){r=[];for(var a=0;a{Z.exports={attributes:Q6(),layoutAttributes:F6(),supplyDefaults:gR(),crossTraceDefaults:tk(),supplyLayoutDefaults:ZM(),calc:r7().calc,crossTraceCalc:zr().crossTraceCalc,plot:nx().plot,layerName:"barlayer",style:xm().style,styleOnSelect:xm().styleOnSelect,colorbar:xo(),hoverPoints:vR(),selectPoints:tb(),eventData:o7(),moduleType:"trace",name:"histogram",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}),xR=Dt((Q,Z)=>{Z.exports=yR()}),ek=Dt((Q,Z)=>{var c=Q6(),g=a7(),I=eb(),S=Ho(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:r,templatefallbackAttrs:a}=Zu(),n=kc(),o=Ia().extendFlat;Z.exports=o({x:c.x,y:c.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:g("x"),nbinsy:c.nbinsy,ybins:g("y"),autobinx:c.autobinx,autobiny:c.autobiny,bingroup:o({},c.bingroup,{}),xbingroup:o({},c.bingroup,{}),ybingroup:o({},c.bingroup,{}),xgap:I.xgap,ygap:I.ygap,zsmooth:I.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:e({},{keys:["z"]}),hovertemplatefallback:a(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:a({editType:"plot"}),textfont:I.textfont,showlegend:o({},S.showlegend,{dflt:!1})},n("",{cLetter:"z",autoColorDflt:!1}))}),s7=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("y"),n=g.minRowLength(r),o=g.minRowLength(a);if(!n||!o){S.visible=!1;return}S._length=Math.min(n,o);var i=c.getComponentMethod("calendars","handleTraceDefaults");i(I,S,["x","y"],e);var l=t("z")||t("marker.color");l&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}),_R=Dt((Q,Z)=>{var c=kn(),g=s7(),I=XM(),S=mc(),t=$w(),e=ek();Z.exports=function(r,a,n,o){function i(l,f){return c.coerce(r,a,e,l,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,o),S(r,a,o,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),t(i,o),i("xhoverformat"),i("yhoverformat"))}}),bR=Dt((Q,Z)=>{var c=J6(),g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.index,o=n[0],i=n[1],l=I.cd[0],f=l.trace,x=l.xRanges[i],y=l.yRanges[o];return I.xLabel=g(I.xa,[x[0],x[1]],f.xhoverformat),I.yLabel=g(I.ya,[y[0],y[1]],f.yhoverformat),a}}}),wR=Dt((Q,Z)=>{Z.exports={attributes:ek(),supplyDefaults:_R(),crossTraceDefaults:tk(),calc:G6(),plot:K6(),layerName:"heatmaplayer",colorbar:I1(),style:X6(),hoverPoints:bR(),eventData:o7(),moduleType:"trace",name:"histogram2d",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}),kR=Dt((Q,Z)=>{Z.exports=wR()}),rk=Dt((Q,Z)=>{Z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}),Zw=Dt((Q,Z)=>{var c=eb(),g=ef(),I=dh(),S=I.axisHoverFormat,t=I.descriptionOnlyNumbers,e=kc(),r=kd().dash,a=da(),n=Ia().extendFlat,o=rk(),i=o.COMPARISON_OPS2,l=o.INTERVAL_OPS,f=g.line;Z.exports=n({z:c.z,x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,text:c.text,hovertext:c.hovertext,transpose:c.transpose,xtype:c.xtype,ytype:c.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:n({},c.texttemplate,{}),texttemplatefallback:c.texttemplatefallback,textfont:n({},c.textfont,{}),hoverongaps:c.hoverongaps,connectgaps:n({},c.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:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(l),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},f.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:n({},f.smoothing,{}),editType:"plot"},zorder:g.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}),l7=Dt((Q,Z)=>{var c=ek(),g=Zw(),I=kc(),S=dh().axisHoverFormat,t=Ia().extendFlat;Z.exports=t({x:c.x,y:c.y,z:c.z,marker:c.marker,histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:c.xbins,nbinsy:c.nbinsy,ybins:c.ybins,autobinx:c.autobinx,autobiny:c.autobiny,bingroup:c.bingroup,xbingroup:c.xbingroup,ybingroup:c.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:t({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:g.texttemplate,texttemplatefallback:g.texttemplatefallback,textfont:g.textfont},I("",{cLetter:"z",editTypeOverride:"calc"}))}),nk=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=S("contours.start"),e=S("contours.end"),r=t===!1||e===!1,a=I("contours.size"),n;r?n=g.autocontour=!0:n=I("autocontour",!1),(n||!a)&&I("ncontours")}}),u7=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t){t||(t={});var e=g("contours.showlabels");if(e){var r=I.font;c.coerceFont(g,"contours.labelfont",r,{overrideDflt:{color:S}}),g("contours.labelformat")}t.hasHover!==!1&&g("zhoverformat")}}),ik=Dt((Q,Z)=>{var c=mc(),g=u7();Z.exports=function(I,S,t,e,r){var a=t("contours.coloring"),n,o="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(o=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(I.showlegend!==!0&&(S.showlegend=!1),S._dfltShowLegend=!1,c(I,S,e,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),g(t,e,o,r)}}),TR=Dt((Q,Z)=>{var c=kn(),g=s7(),I=nk(),S=ik(),t=$w(),e=l7();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,e,f,x)}function l(f){return c.coerce2(r,a,e,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,l),S(r,a,i,o),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&t(i,o))}}),c7=Dt((Q,Z)=>{var c=Ls(),g=kn();Z.exports=function(S,t){var e=S.contours;if(S.autocontour){var r=S.zmin,a=S.zmax;(S.zauto||r===void 0)&&(r=g.aggNums(Math.min,null,t)),(S.zauto||a===void 0)&&(a=g.aggNums(Math.max,null,t));var n=I(r,a,S.ncontours);e.size=n.dtick,e.start=c.tickFirst(n),n.range.reverse(),e.end=c.tickFirst(n),e.start===r&&(e.start+=e.size),e.end===a&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),S._input.contours||(S._input.contours={}),g.extendFlat(S._input.contours,{start:e.start,end:e.end,size:e.size}),S._input.autocontour=!0}else if(e.type!=="constraint"){var o=e.start,i=e.end,l=S._input.contours;if(o>i&&(e.start=l.start=i,i=e.end=l.end=o,o=e.start),!(e.size>0)){var f;o===i?f=1:f=I(o,i,S.ncontours).dtick,l.size=e.size=f}}};function I(S,t,e){var r={type:"linear",range:[S,t]};return c.autoTicks(r,(t-S)/(e||15)),r}}),Gw=Dt((Q,Z)=>{Z.exports=function(c){return c.end+c.size/1e6}}),h7=Dt((Q,Z)=>{var c=Xc(),g=G6(),I=c7(),S=Gw();Z.exports=function(t,e){var r=g(t,e),a=r[0].z;I(e,a);var n=e.contours,o=c.extractOpts(e),i;if(n.coloring==="heatmap"&&o.auto&&e.autocontour===!1){var l=n.start,f=S(n),x=n.size||1,y=Math.floor((f-l)/x)+1;isFinite(x)||(x=1,y=1);var v=l-x/2,T=v+y*x;i=[v,T]}else i=a;return c.calc(t,e,{vals:i,cLetter:"z"}),r}}),Yw=Dt((Q,Z)=>{Z.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}}}),f7=Dt((Q,Z)=>{var c=Yw();Z.exports=function(I){var S=I[0].z,t=S.length,e=S[0].length,r=t===2||e===2,a,n,o,i,l,f,x,y,v;for(n=0;nI?0:1)+(S[0][1]>I?0:2)+(S[1][1]>I?0:4)+(S[1][0]>I?0:8);if(t===5||t===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return I>e?t===5?713:1114:t===5?104:208}return t===15?0:t}}),d7=Dt((Q,Z)=>{var c=kn(),g=Yw();Z.exports=function(a,n,o){var i,l,f,x,y;for(n=n||.01,o=o||.01,f=0;f20?(x=g.CHOOSESADDLE[x][(y[0]||y[1])<0?0:1],a.crossings[f]=g.SADDLEREMAINDER[x]):delete a.crossings[f],y=g.NEWDELTA[x],!y){c.log("Found bad marching index:",x,n,a.level);break}v.push(r(a,n,y)),n[0]+=y[0],n[1]+=y[1],f=n.join(","),I(v[v.length-1],v[v.length-2],i,l)&&v.pop();var M=y[0]&&(n[0]<0||n[0]>u-2)||y[1]&&(n[1]<0||n[1]>T-2),C=n[0]===b[0]&&n[1]===b[1]&&y[0]===_[0]&&y[1]===_[1];if(C||o&&M)break;x=a.crossings[f]}P===1e4&&c.log("Infinite loop in contour?");var A=I(v[0],v[v.length-1],i,l),h=0,p=.2*a.smoothing,k=[],w=0,R,O,j,V,H,F,U,W,q,J,lt;for(P=1;P=w;P--)if(R=k[P],R=w&&R+k[O]W&&q--,a.edgepaths[q]=lt.concat(v,J));break}tt||(a.edgepaths[W]=v.concat(J))}for(W=0;W20&&n?a===208||a===1114?i=o[0]===0?1:-1:l=o[1]===0?1:-1:g.BOTTOMSTART.indexOf(a)!==-1?l=1:g.LEFTSTART.indexOf(a)!==-1?i=1:g.TOPSTART.indexOf(a)!==-1?l=-1:i=-1,[i,l]}function r(a,n,o){var i=n[0]+Math.max(o[0],0),l=n[1]+Math.max(o[1],0),f=a.z[l][i],x=a.xaxis,y=a.yaxis;if(o[1]){var v=(a.level-f)/(a.z[l][i+1]-f),T=(v!==1?(1-v)*x.c2l(a.x[i]):0)+(v!==0?v*x.c2l(a.x[i+1]):0);return[x.c2p(x.l2c(T),!0),y.c2p(a.y[l],!0),i+v,l]}else{var u=(a.level-f)/(a.z[l+1][i]-f),b=(u!==1?(1-u)*y.c2l(a.y[l]):0)+(u!==0?u*y.c2l(a.y[l+1]):0);return[x.c2p(a.x[i],!0),y.c2p(y.l2c(b),!0),i,l+u]}}}),AR=Dt((Q,Z)=>{var c=rk(),g=Yi();Z.exports={"[]":S("[]"),"][":S("]["),">":t(">"),"<":t("<"),"=":t("=")};function I(e,r){var a=Array.isArray(r),n;function o(i){return g(i)?+i:null}return c.COMPARISON_OPS2.indexOf(e)!==-1?n=o(a?r[0]:r):c.INTERVAL_OPS.indexOf(e)!==-1?n=a?[o(r[0]),o(r[1])]:[o(r),o(r)]:c.SET_OPS.indexOf(e)!==-1&&(n=a?r.map(o):[o(r)]),n}function S(e){return function(r){r=I(e,r);var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return{start:a,end:n,size:n-a}}}function t(e){return function(r){return r=I(e,r),{start:r,end:1/0,size:1/0}}}}),p7=Dt((Q,Z)=>{var c=kn(),g=AR(),I=Gw();Z.exports=function(S,t,e){for(var r=S.type==="constraint"?g[S._operation](S.value):S,a=r.size,n=[],o=I(r),i=e.trace._carpetTrace,l=i?{xaxis:i.aaxis,yaxis:i.baxis,x:e.a,y:e.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:e.x,y:e.y},f=r.start;f1e3){c.warn("Too many contours, clipping at 1000",S);break}return n}}),m7=Dt((Q,Z)=>{var c=kn();Z.exports=function(I,S){var t,e,r,a=function(i){return i.reverse()},n=function(i){return i};switch(S){case"=":case"<":return I;case">":for(I.length!==1&&c.warn("Contour data invalid for the specified inequality operation."),e=I[0],t=0;t{Z.exports=function(c,g){var I=c[0],S=I.z,t;switch(g.type){case"levels":var e=Math.min(S[0][0],S[0][1]);for(t=0;tr.level||r.starts.length&&e===r.level)}break;case"constraint":if(I.prefixBoundary=!1,I.edgepaths.length)return;var a=I.x.length,n=I.y.length,o=-1/0,i=1/0;for(t=0;t":l>o&&(I.prefixBoundary=!0);break;case"<":(lo||I.starts.length&&x===i)&&(I.prefixBoundary=!0);break;case"][":f=Math.min(l[0],l[1]),x=Math.max(l[0],l[1]),fo&&(I.prefixBoundary=!0);break}break}}}),ak=Dt(Q=>{var Z=qr(),c=kn(),g=Vs(),I=Xc(),S=ec(),t=Ls(),e=i0(),r=K6(),a=f7(),n=d7(),o=p7(),i=m7(),l=g7(),f=Yw(),x=f.LABELOPTIMIZER;Q.plot=function(M,C,A,h){var p=C.xaxis,k=C.yaxis;c.makeTraceGroups(h,A,"contour").each(function(w){var R=Z.select(this),O=w[0],j=O.trace,V=O.x,H=O.y,F=j.contours,U=o(F,C,O),W=c.ensureSingle(R,"g","heatmapcoloring"),q=[];F.coloring==="heatmap"&&(q=[w]),r(M,C,q,W),a(U),n(U);var J=p.c2p(V[0],!0),lt=p.c2p(V[V.length-1],!0),yt=k.c2p(H[0],!0),mt=k.c2p(H[H.length-1],!0),st=[[J,mt],[lt,mt],[lt,yt],[J,yt]],tt=U;F.type==="constraint"&&(tt=i(U,F._operation)),y(R,st,F),v(R,tt,st,F),u(R,U,M,O,F),_(R,C,M,O,st)})};function y(M,C,A){var h=c.ensureSingle(M,"g","contourbg"),p=h.selectAll("path").data(A.coloring==="fill"?[0]:[]);p.enter().append("path"),p.exit().remove(),p.attr("d","M"+C.join("L")+"Z").style("stroke","none")}function v(M,C,A,h){var p=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",k="M"+A.join("L")+"Z";p&&l(C,h);var w=c.ensureSingle(M,"g","contourfill"),R=w.selectAll("path").data(p?C:[]);R.enter().append("path"),R.exit().remove(),R.each(function(O){var j=(O.prefixBoundary?k:"")+T(O,A);j?Z.select(this).attr("d",j).style("stroke","none"):Z.select(this).remove()})}function T(M,C){var A="",h=0,p=M.edgepaths.map(function(lt,yt){return yt}),k=!0,w,R,O,j,V,H;function F(lt){return Math.abs(lt[1]-C[0][1])<.01}function U(lt){return Math.abs(lt[1]-C[2][1])<.01}function W(lt){return Math.abs(lt[0]-C[0][0])<.01}function q(lt){return Math.abs(lt[0]-C[2][0])<.01}for(;p.length;){for(H=g.smoothopen(M.edgepaths[h],M.smoothing),A+=k?H:H.replace(/^M/,"L"),p.splice(p.indexOf(h),1),w=M.edgepaths[h][M.edgepaths[h].length-1],j=-1,O=0;O<4;O++){if(!w){c.log("Missing end?",h,M);break}for(F(w)&&!q(w)?R=C[1]:W(w)?R=C[0]:U(w)?R=C[3]:q(w)&&(R=C[2]),V=0;V=0&&(R=J,j=V):Math.abs(w[1]-R[1])<.01?Math.abs(w[1]-J[1])<.01&&(J[0]-w[0])*(R[0]-J[0])>=0&&(R=J,j=V):c.log("endpt to newendpt is not vert. or horz.",w,R,J)}if(w=R,j>=0)break;A+="L"+R}if(j===M.edgepaths.length){c.log("unclosed perimeter path");break}h=j,k=p.indexOf(h)===-1,k&&(h=p[0],A+="Z")}for(h=0;hx.MAXCOST*2)break;F&&(R/=2),w=j-R/2,O=w+R*1.5}if(H<=x.MAXCOST)return V};function b(M,C,A,h){var p=C.width/2,k=C.height/2,w=M.x,R=M.y,O=M.theta,j=Math.cos(O)*p,V=Math.sin(O)*p,H=(w>h.center?h.right-w:w-h.left)/(j+Math.abs(Math.sin(O)*k)),F=(R>h.middle?h.bottom-R:R-h.top)/(Math.abs(V)+Math.cos(O)*k);if(H<1||F<1)return 1/0;var U=x.EDGECOST*(1/(H-1)+1/(F-1));U+=x.ANGLECOST*O*O;for(var W=w-j,q=R-V,J=w+j,lt=R+V,yt=0;yt{var c=qr(),g=Xc(),I=Gw();Z.exports=function(S){var t=S.contours,e=t.start,r=I(t),a=t.size||1,n=Math.floor((r-e)/a)+1,o=t.coloring==="lines"?0:1,i=g.extractOpts(S);isFinite(a)||(a=1,n=1);var l=i.reversescale?g.flipScale(i.colorscale):i.colorscale,f=l.length,x=new Array(f),y=new Array(f),v,T,u=i.min,b=i.max;if(t.coloring==="heatmap"){for(T=0;T=b)&&(e<=u&&(e=u),r>=b&&(r=b),n=Math.floor((r-e)/a)+1,o=0),T=0;Tu&&(x.unshift(u),y.unshift(y[0])),x[x.length-1]{var c=qr(),g=Vs(),I=X6(),S=v7();Z.exports=function(t){var e=c.select(t).selectAll("g.contour");e.style("opacity",function(r){return r[0].trace.opacity}),e.each(function(r){var a=c.select(this),n=r[0].trace,o=n.contours,i=n.line,l=o.size||1,f=o.start,x=o.type==="constraint",y=!x&&o.coloring==="lines",v=!x&&o.coloring==="fill",T=y||v?S(n):null;a.selectAll("g.contourlevel").each(function(_){c.select(this).selectAll("path").call(g.lineGroupStyle,i.width,y?T(_.level):i.color,i.dash)});var u=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){g.font(c.select(this),{weight:u.weight,style:u.style,variant:u.variant,textcase:u.textcase,lineposition:u.lineposition,shadow:u.shadow,family:u.family,size:u.size,color:u.color||(y?T(_.level):i.color)})}),x)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(v){var b;a.selectAll("g.contourfill path").style("fill",function(_){return b===void 0&&(b=_.level),T(_.level+.5*l)}),b===void 0&&(b=f),a.selectAll("g.contourbg path").style("fill",T(b-.5*l))}}),I(t)}}),sk=Dt((Q,Z)=>{var c=Xc(),g=v7(),I=Gw();function S(t,e,r){var a=e.contours,n=e.line,o=a.size||1,i=a.coloring,l=g(e,{isColorbar:!0});if(i==="heatmap"){var f=c.extractOpts(e);r._fillgradient=f.reversescale?c.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else i==="fill"&&(r._fillcolor=l);r._line={color:i==="lines"?l:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:a.start,end:I(a),size:o}}Z.exports={min:"zmin",max:"zmax",calc:S}}),y7=Dt((Q,Z)=>{var c=hi(),g=J6();Z.exports=function(I,S,t,e,r){r||(r={}),r.isContour=!0;var a=g(I,S,t,e,r);return a&&a.forEach(function(n){var o=n.trace;o.contours.type==="constraint"&&(o.fillcolor&&c.opacity(o.fillcolor)?n.color=c.addOpacity(o.fillcolor,1):o.contours.showlines&&c.opacity(o.line.color)&&(n.color=c.addOpacity(o.line.color,1)))}),a}}),MR=Dt((Q,Z)=>{Z.exports={attributes:l7(),supplyDefaults:TR(),crossTraceDefaults:tk(),calc:h7(),plot:ak().plot,layerName:"contourlayer",style:ok(),colorbar:sk(),hoverPoints:y7(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}),SR=Dt((Q,Z)=>{Z.exports=MR()}),x7=Dt((Q,Z)=>{var c=Yi(),g=u7(),I=hi(),S=I.addOpacity,t=I.opacity,e=rk(),r=kn().isArrayOrTypedArray,a=e.CONSTRAINT_REDUCTION,n=e.COMPARISON_OPS2;Z.exports=function(i,l,f,x,y,v){var T=l.contours,u,b,_,P=f("contours.operation");if(T._operation=a[P],o(f,T),P==="="?u=T.showlines=!0:(u=f("contours.showlines"),_=f("fillcolor",S((i.line||{}).color||y,.5))),u){var M=_&&t(_)?S(l.fillcolor,1):y;b=f("line.color",M),f("line.width",2),f("line.dash")}f("line.smoothing"),g(f,x,b,v)};function o(i,l){var f;n.indexOf(l.operation)===-1?(i("contours.value",[0,1]),r(l.value)?l.value.length>2?l.value=l.value.slice(2):l.length===0?l.value=[0,1]:l.length<2?(f=parseFloat(l.value[0]),l.value=[f,f+1]):l.value=[parseFloat(l.value[0]),parseFloat(l.value[1])]:c(l.value)&&(f=parseFloat(l.value),l.value=[f,f+1])):(i("contours.value",0),c(l.value)||(r(l.value)?l.value=parseFloat(l.value[0]):l.value=0))}}),ER=Dt((Q,Z)=>{var c=kn(),g=H6(),I=Rp(),S=x7(),t=nk(),e=ik(),r=$w(),a=Zw();Z.exports=function(n,o,i,l){function f(T,u){return c.coerce(n,o,a,T,u)}function x(T){return c.coerce2(n,o,a,T)}var y=g(n,o,f,l);if(!y){o.visible=!1;return}I(n,o,l,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var v=f("contours.type")==="constraint";f("connectgaps",c.isArray1D(o.z)),v?S(n,o,f,l,i):(t(n,o,f,x),e(n,o,f,l)),o.contours&&o.contours.coloring==="heatmap"&&r(f,l),f("zorder")}}),CR=Dt((Q,Z)=>{Z.exports={attributes:Zw(),supplyDefaults:ER(),calc:h7(),plot:ak().plot,style:ok(),colorbar:sk(),hoverPoints:y7(),moduleType:"trace",name:"contour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}),LR=Dt((Q,Z)=>{Z.exports=CR()}),_7=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=ef(),e=Ho(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=t.marker,i=t.line,l=o.line;Z.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:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:n({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:n({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:o.angleref,standoff:o.standoff,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:n({width:l.width,editType:"calc"},r("marker.line")),gradient:o.gradient,editType:"calc"},r("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:c(),hovertemplatefallback:I()}}),PR=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=z0(),e=xv(),r=x0(),a=O0(),n=_7();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}var y=x("a"),v=x("b"),T=x("c"),u;if(y?(u=y.length,v?(u=Math.min(u,v.length),T&&(u=Math.min(u,T.length))):T?u=Math.min(u,T.length):u=0):v&&T&&(u=Math.min(v.length,T.length)),!u){i.visible=!1;return}i._length=u,x("sum"),x("text"),x("hovertext"),i.hoveron!=="fills"&&(x("hovertemplate"),x("hovertemplatefallback"));var b=u{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.aLabel=c.tickText(e.aaxis,g.a,!0).text,t.bLabel=c.tickText(e.baxis,g.b,!0).text,t.cLabel=c.tickText(e.caxis,g.c,!0).text,t}}),zR=Dt((Q,Z)=>{var c=Yi(),g=F0(),I=ct(),S=Bt(),t=me().calcMarkerSize,e=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};Z.exports=function(a,n){var o=a._fullLayout[n.subplot],i=o.sum,l=n.sum||i,f={a:n.a,b:n.b,c:n.c},x=n.ids,y,v,T,u,b,_;for(y=0;y{var c=Ka();Z.exports=function(g,I,S){var t=I.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var e=I.xaxis,r=I.yaxis,a={xaxis:e,yaxis:r,plot:t,layerClipId:I._hasClipOnAxisFalse?I.clipIdRelative:null},n=I.layers.frontplot.select("g.scatterlayer"),o=0;o{var c=Md();Z.exports=function(g,I,S,t){var e=c(g,I,S,t);if(!e||e[0].index===!1)return;var r=e[0];if(r.index===void 0){var a=1-r.y0/g.ya._length,n=g.xa._length,o=n*a/2,i=n-o;return r.x0=Math.max(Math.min(r.x0,i),o),r.x1=Math.max(Math.min(r.x1,i),o),e}var l=r.cd[r.index],f=r.trace,x=r.subplot;r.a=l.a,r.b=l.b,r.c=l.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var y={};y[f.subplot]={_subplot:x};var v=f._module.formatLabels(l,f,y);r.aLabel=v.aLabel,r.bLabel=v.bLabel,r.cLabel=v.cLabel;var T=l.hi||f.hoverinfo,u=[];function b(P,M){u.push(P._hovertitle+": "+M)}if(!f.hovertemplate){var _=T.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&b(x.aaxis,r.aLabel),_.indexOf("b")!==-1&&b(x.baxis,r.bLabel),_.indexOf("c")!==-1&&b(x.caxis,r.cLabel)}return r.extraText=u.join("
"),r.hovertemplate=f.hovertemplate,e}}),FR=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),S[t]){var e=S[t];c.a=e.a,c.b=e.b,c.c=e.c}else c.a=g.a,c.b=g.b,c.c=g.c;return c}}),RR=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Jo(),S=kn(),t=S.strTranslate,e=S._,r=hi(),a=Vs(),n=i0(),o=Ia().extendFlat,i=Kc(),l=Ls(),f=up(),x=tf(),y=v0(),v=y.freeMode,T=y.rectMode,u=lp(),b=vf().prepSelect,_=vf().selectOnClick,P=vf().clearOutline,M=vf().clearSelectionsCache,C=ic();function A(U,W){this.id=U.id,this.graphDiv=U.graphDiv,this.init(W),this.makeFramework(W),this.updateFx(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Z.exports=A;var h=A.prototype;h.init=function(U){this.container=U._ternarylayer,this.defs=U._defs,this.layoutId=U._uid,this.traceHash={},this.layers={}},h.plot=function(U,W){var q=this,J=W[q.id],lt=W._size;q._hasClipOnAxisFalse=!1;for(var yt=0;ytp*dt?(kt=dt,ut=kt*p):(ut=tt,kt=ut/p),It=mt*ut/tt,Pt=st*kt/dt,Y=W.l+W.w*lt-ut/2,ft=W.t+W.h*(1-yt)-kt/2,q.x0=Y,q.y0=ft,q.w=ut,q.h=kt,q.sum=rt,q.xaxis={type:"linear",range:[at+2*it-rt,rt-at-2*vt],domain:[lt-It/2,lt+It/2],_id:"x"},n(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(ee){return ee.a>=q.aaxis.range[0]&&ee.a<=q.aaxis.range[1]&&ee.b>=q.baxis.range[1]&&ee.b<=q.baxis.range[0]&&ee.c>=q.caxis.range[1]&&ee.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[at,rt-vt-it],domain:[yt-Pt/2,yt+Pt/2],_id:"y"},n(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var qt=q.yaxis.domain[0],Wt=q.aaxis=o({},U.aaxis,{range:[at,rt-vt-it],side:"left",tickangle:(+U.aaxis.tickangle||0)-30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(Wt,q.graphDiv._fullLayout),Wt.setScale();var Jt=q.baxis=o({},U.baxis,{range:[rt-at-it,vt],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ut});n(Jt,q.graphDiv._fullLayout),Jt.setScale();var ge=q.caxis=o({},U.caxis,{range:[rt-at-vt,it],side:"right",tickangle:(+U.caxis.tickangle||0)+30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(ge,q.graphDiv._fullLayout),ge.setScale();var fe="M"+Y+","+(ft+kt)+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDef.select("path").attr("d",fe),q.layers.plotbg.select("path").attr("d",fe);var pe="M0,"+kt+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDefRelative.select("path").attr("d",pe);var se=t(Y,ft);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",se),q.clipDefRelative.select("path").attr("transform",null);var Tt=t(Y-Jt._offset,ft+kt);q.layers.baxis.attr("transform",Tt),q.layers.bgrid.attr("transform",Tt);var Lt=t(Y+ut/2,ft)+"rotate(30)"+t(0,-Wt._offset);q.layers.aaxis.attr("transform",Lt),q.layers.agrid.attr("transform",Lt);var Mt=t(Y+ut/2,ft)+"rotate(-30)"+t(0,-ge._offset);q.layers.caxis.attr("transform",Mt),q.layers.cgrid.attr("transform",Mt),q.drawAxes(!0),q.layers.aline.select("path").attr("d",Wt.showline?"M"+Y+","+(ft+kt)+"l"+ut/2+",-"+kt:"M0,0").call(r.stroke,Wt.linecolor||"#000").style("stroke-width",(Wt.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",Jt.showline?"M"+Y+","+(ft+kt)+"h"+ut:"M0,0").call(r.stroke,Jt.linecolor||"#000").style("stroke-width",(Jt.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",ge.showline?"M"+(Y+ut/2)+","+ft+"l"+ut/2+","+kt:"M0,0").call(r.stroke,ge.linecolor||"#000").style("stroke-width",(ge.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),a.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},h.drawAxes=function(U){var W=this,q=W.graphDiv,J=W.id.substr(7)+"title",lt=W.layers,yt=W.aaxis,mt=W.baxis,st=W.caxis;if(W.drawAx(yt),W.drawAx(mt),W.drawAx(st),U){var tt=Math.max(yt.showticklabels?yt.tickfont.size/2:0,(st.showticklabels?st.tickfont.size*.75:0)+(st.ticks==="outside"?st.ticklen*.87:0)),dt=(mt.showticklabels?mt.tickfont.size:0)+(mt.ticks==="outside"?mt.ticklen:0)+3;lt["a-title"]=u.draw(q,"a"+J,{propContainer:yt,propName:W.id+".aaxis.title.text",placeholder:e(q,"Click to enter Component A title"),attributes:{x:W.x0+W.w/2,y:W.y0-yt.title.font.size/3-tt,"text-anchor":"middle"}}),lt["b-title"]=u.draw(q,"b"+J,{propContainer:mt,propName:W.id+".baxis.title.text",placeholder:e(q,"Click to enter Component B title"),attributes:{x:W.x0-dt,y:W.y0+W.h+mt.title.font.size*.83+dt,"text-anchor":"middle"}}),lt["c-title"]=u.draw(q,"c"+J,{propContainer:st,propName:W.id+".caxis.title.text",placeholder:e(q,"Click to enter Component C title"),attributes:{x:W.x0+W.w+dt,y:W.y0+W.h+st.title.font.size*.83+dt,"text-anchor":"middle"}})}},h.drawAx=function(U){var W=this,q=W.graphDiv,J=U._name,lt=J.charAt(0),yt=U._id,mt=W.layers[J],st=30,tt=lt+"tickLayout",dt=k(U);W[tt]!==dt&&(mt.selectAll("."+yt+"tick").remove(),W[tt]=dt),U.setScale();var rt=l.calcTicks(U),at=l.clipEnds(U,rt),vt=l.makeTransTickFn(U),it=l.getTickSigns(U)[2],Y=S.deg2rad(st),ft=it*(U.linewidth||1)/2,ut=it*U.ticklen,kt=W.w,It=W.h,Pt=lt==="b"?"M0,"+ft+"l"+Math.sin(Y)*ut+","+Math.cos(Y)*ut:"M"+ft+",0l"+Math.cos(Y)*ut+","+-Math.sin(Y)*ut,qt={a:"M0,0l"+It+",-"+kt/2,b:"M0,0l-"+kt/2+",-"+It,c:"M0,0l-"+It+","+kt/2}[lt];l.drawTicks(q,U,{vals:U.ticks==="inside"?at:rt,layer:mt,path:Pt,transFn:vt,crisp:!1}),l.drawGrid(q,U,{vals:at,layer:W.layers[lt+"grid"],path:qt,transFn:vt,crisp:!1}),l.drawLabels(q,U,{vals:rt,layer:mt,transFn:vt,labelFns:l.makeLabelFns(U,0,st)})};function k(U){return U.ticks+String(U.ticklen)+String(U.showticklabels)}var w=C.MINZOOM/2+.87,R="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(w*.87+4.5)+"l2.6,1.5l-"+w/2+","+w*.87+"Z",O="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-2.6,1.5l"+w/2+","+w*.87+"Z",j="m0,1l"+w/2+","+w*.87+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-"+(w/2+2.6)+","+(w*.87+4.5)+"l2.6,1.5l"+w/2+",-"+w*.87+"Z",V="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",H=!0;h.clearOutline=function(){M(this.dragOptions),P(this.dragOptions.gd)},h.initInteractions=function(){var U=this,W=U.layers.plotbg.select("path").node(),q=U.graphDiv,J=q._fullLayout._zoomlayer,lt,yt;this.dragOptions={element:W,gd:q,plotinfo:{id:U.id,domain:q._fullLayout[U.id].domain,xaxis:U.xaxis,yaxis:U.yaxis},subplot:U.id,prepFn:function(Tt,Lt,Mt){U.dragOptions.xaxes=[U.xaxis],U.dragOptions.yaxes=[U.yaxis],lt=q._fullLayout._invScaleX,yt=q._fullLayout._invScaleY;var ee=U.dragOptions.dragmode=q._fullLayout.dragmode;v(ee)?U.dragOptions.minDrag=1:U.dragOptions.minDrag=void 0,ee==="zoom"?(U.dragOptions.moveFn=Jt,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=ge,It(Tt,Lt,Mt)):ee==="pan"?(U.dragOptions.moveFn=pe,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=se,fe(),U.clearOutline(q)):(T(ee)||v(ee))&&b(Tt,Lt,Mt,U.dragOptions,ee)}};var mt,st,tt,dt,rt,at,vt,it,Y,ft;function ut(Tt){var Lt={};return Lt[U.id+".aaxis.min"]=Tt.a,Lt[U.id+".baxis.min"]=Tt.b,Lt[U.id+".caxis.min"]=Tt.c,Lt}function kt(Tt,Lt){var Mt=q._fullLayout.clickmode;F(q),Tt===2&&(q.emit("plotly_doubleclick",null),I.call("_guiRelayout",q,ut({a:0,b:0,c:0}))),Mt.indexOf("select")>-1&&Tt===1&&_(Lt,q,[U.xaxis],[U.yaxis],U.id,U.dragOptions),Mt.indexOf("event")>-1&&x.click(q,Lt,U.id)}function It(Tt,Lt,Mt){var ee=W.getBoundingClientRect();mt=Lt-ee.left,st=Mt-ee.top,q._fullLayout._calcInverseTransform(q);var ve=q._fullLayout._invTransform,oe=S.apply3DTransform(ve)(mt,st);mt=oe[0],st=oe[1],tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt,dt=U.aaxis.range[1]-tt.a,at=g(U.graphDiv._fullLayout[U.id].bgcolor).getLuminance(),vt="M0,"+U.h+"L"+U.w/2+", 0L"+U.w+","+U.h+"Z",it=!1,Y=J.append("path").attr("class","zoombox").attr("transform",t(U.x0,U.y0)).style({fill:at>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",vt),ft=J.append("path").attr("class","zoombox-corners").attr("transform",t(U.x0,U.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),U.clearOutline(q)}function Pt(Tt,Lt){return 1-Lt/U.h}function qt(Tt,Lt){return 1-(Tt+(U.h-Lt)/Math.sqrt(3))/U.w}function Wt(Tt,Lt){return(Tt-(U.h-Lt)/Math.sqrt(3))/U.w}function Jt(Tt,Lt){var Mt=mt+Tt*lt,ee=st+Lt*yt,ve=Math.max(0,Math.min(1,Pt(mt,st),Pt(Mt,ee))),oe=Math.max(0,Math.min(1,qt(mt,st),qt(Mt,ee))),Te=Math.max(0,Math.min(1,Wt(mt,st),Wt(Mt,ee))),He=(ve/2+Te)*U.w,Ge=(1-ve/2-oe)*U.w,cr=(He+Ge)/2,ur=Ge-He,jr=(1-ve)*U.h,Wr=jr-ur/p;ur.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ft.transition().style("opacity",1).duration(200),it=!0),q.emit("plotly_relayouting",ut(rt))}function ge(){F(q),rt!==tt&&(I.call("_guiRelayout",q,ut(rt)),H&&q.data&&q._context.showTips&&(S.notifier(e(q,"Double-click to zoom back out"),"long"),H=!1))}function fe(){tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt}function pe(Tt,Lt){var Mt=Tt/U.xaxis._m,ee=Lt/U.yaxis._m;rt={a:tt.a-ee,b:tt.b+(Mt+ee)/2,c:tt.c-(Mt-ee)/2};var ve=[rt.a,rt.b,rt.c].sort(S.sorterAsc),oe={a:ve.indexOf(rt.a),b:ve.indexOf(rt.b),c:ve.indexOf(rt.c)};ve[0]<0&&(ve[1]+ve[0]/2<0?(ve[2]+=ve[0]+ve[1],ve[0]=ve[1]=0):(ve[2]+=ve[0]/2,ve[1]+=ve[0]/2,ve[0]=0),rt={a:ve[oe.a],b:ve[oe.b],c:ve[oe.c]},Lt=(tt.a-rt.a)*U.yaxis._m,Tt=(tt.c-rt.c-tt.b+rt.b)*U.xaxis._m);var Te=t(U.x0+Tt,U.y0+Lt);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Te);var He=t(-Tt,-Lt);U.clipDefRelative.select("path").attr("transform",He),U.aaxis.range=[rt.a,U.sum-rt.b-rt.c],U.baxis.range=[U.sum-rt.a-rt.c,rt.b],U.caxis.range=[U.sum-rt.a-rt.b,rt.c],U.drawAxes(!1),U._hasClipOnAxisFalse&&U.plotContainer.select(".scatterlayer").selectAll(".trace").call(a.hideOutsideRangePoints,U),q.emit("plotly_relayouting",ut(rt))}function se(){I.call("_guiRelayout",q,ut(rt))}W.onmousemove=function(Tt){x.hover(q,Tt,U.id),q._fullLayout._lasthover=W,q._fullLayout._hoversubplot=U.id},W.onmouseout=function(Tt){q._dragging||f.unhover(q,Tt)},f.init(this.dragOptions)};function F(U){c.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}),b7=Dt((Q,Z)=>{var c=wi(),g=jh().attributes,I=Td(),S=Yc().overrideAll,t=Ia().extendFlat,e={title:{text:I.title.text,font:I.title.font},color:I.color,tickmode:I.minor.tickmode,nticks:t({},I.nticks,{dflt:6,min:1}),tick0:I.tick0,dtick:I.dtick,tickvals:I.tickvals,ticktext:I.ticktext,ticks:I.ticks,ticklen:I.ticklen,tickwidth:I.tickwidth,tickcolor:I.tickcolor,ticklabelstep:I.ticklabelstep,showticklabels:I.showticklabels,labelalias:I.labelalias,showtickprefix:I.showtickprefix,tickprefix:I.tickprefix,showticksuffix:I.showticksuffix,ticksuffix:I.ticksuffix,showexponent:I.showexponent,exponentformat:I.exponentformat,minexponent:I.minexponent,separatethousands:I.separatethousands,tickfont:I.tickfont,tickangle:I.tickangle,tickformat:I.tickformat,tickformatstops:I.tickformatstops,hoverformat:I.hoverformat,showline:t({},I.showline,{dflt:!0}),linecolor:I.linecolor,linewidth:I.linewidth,showgrid:t({},I.showgrid,{dflt:!0}),gridcolor:I.gridcolor,gridwidth:I.gridwidth,griddash:I.griddash,layer:I.layer,min:{valType:"number",dflt:0,min:0}},r=Z.exports=S({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:c.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}),z1=Dt((Q,Z)=>{var c=kn(),g=mu(),I=jh().defaults;Z.exports=function(S,t,e,r){var a=r.type,n=r.attributes,o=r.handleDefaults,i=r.partition||"x",l=t._subplots[a],f=l.length,x=f&&l[0].replace(/\d+$/,""),y,v;function T(P,M){return c.coerce(y,v,n,P,M)}for(var u=0;u{var c=hi(),g=mu(),I=kn(),S=z1(),t=n0(),e=dm(),r=xg(),a=yg(),n=Qy(),o=b7(),i=["aaxis","baxis","caxis"];Z.exports=function(x,y,v){S(x,y,v,{type:"ternary",attributes:o,handleDefaults:l,font:y.font,paper_bgcolor:y.paper_bgcolor})};function l(x,y,v,T){var u=v("bgcolor"),b=v("sum");T.bgColor=c.combine(u,T.paper_bgcolor);for(var _,P,M,C=0;C=b&&(A.min=0,h.min=0,p.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function f(x,y,v,T){var u=o[y._name];function b(k,w){return I.coerce(x,y,u,k,w)}b("uirevision",T.uirevision),y.type="linear";var _=b("color"),P=_!==u.color.dflt?_:v.font.color,M=y._name,C=M.charAt(0).toUpperCase(),A="Component "+C,h=b("title.text",A);y._hovertitle=h===A?h:C,I.coerceFont(b,"title.font",v.font,{overrideDflt:{size:I.bigFont(v.font.size),color:P}}),b("min"),a(x,y,b,"linear"),e(x,y,b,"linear"),t(x,y,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(x,y,b,{outerTicks:!0});var p=b("showticklabels");p&&(I.coerceFont(b,"tickfont",v.font,{overrideDflt:{color:P}}),b("tickangle"),b("tickformat")),n(x,y,b,{dfltColor:_,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),b("hoverformat"),b("layer")}}),NR=Dt(Q=>{var Z=RR(),c=ud().getSubplotCalcData,g=kn().counterRegex,I="ternary";Q.name=I;var S=Q.attr="subplot";Q.idRoot=I,Q.idRegex=Q.attrRegex=g(I);var t=Q.attributes={};t[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},Q.layoutAttributes=b7(),Q.supplyLayoutDefaults=BR(),Q.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,n=r._subplots[I],o=0;o{Z.exports={attributes:_7(),supplyDefaults:PR(),colorbar:xo(),formatLabels:IR(),calc:zR(),plot:OR(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:DR(),selectPoints:Rf(),eventData:FR(),moduleType:"trace",name:"scatterternary",basePlotModule:NR(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}),UR=Dt((Q,Z)=>{Z.exports=jR()}),w7=Dt((Q,Z)=>{var c=Hw(),g=Ia().extendFlat,I=dh().axisHoverFormat;Z.exports={y:c.y,x:c.x,x0:c.x0,y0:c.y0,xhoverformat:I("x"),yhoverformat:I("y"),name:g({},c.name,{}),orientation:g({},c.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:c.fillcolor,points:g({},c.boxpoints,{}),jitter:g({},c.jitter,{}),pointpos:g({},c.pointpos,{}),width:g({},c.width,{}),marker:c.marker,text:c.text,hovertext:c.hovertext,hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,quartilemethod:c.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:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:c.zorder}}),k7=Dt((Q,Z)=>{var c=Ww(),g=kn().extendFlat;Z.exports={violinmode:g({},c.boxmode,{}),violingap:g({},c.boxgap,{}),violingroupgap:g({},c.boxgroupgap,{})}}),VR=Dt((Q,Z)=>{var c=kn(),g=hi(),I=qw(),S=w7();Z.exports=function(t,e,r,a){function n(h,p){return c.coerce(t,e,S,h,p)}function o(h,p){return c.coerce2(t,e,S,h,p)}if(I.handleSampleDefaults(t,e,n,a),e.visible!==!1){n("bandwidth"),n("side");var i=n("width");i||(n("scalegroup",e.name),n("scalemode"));var l=n("span"),f;Array.isArray(l)&&(f="manual"),n("spanmode",f);var x=n("line.color",(t.marker||{}).color||r),y=n("line.width"),v=n("fillcolor",g.addOpacity(e.line.color,.5));I.handlePointsDefaults(t,e,n,{prefix:""});var T=o("box.width"),u=o("box.fillcolor",v),b=o("box.line.color",x),_=o("box.line.width",y),P=n("box.visible",!!(T||u||b||_));P||(e.box={visible:!1});var M=o("meanline.color",x),C=o("meanline.width",y),A=n("meanline.visible",!!(M||C));A||(e.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}),HR=Dt((Q,Z)=>{var c=kn(),g=k7(),I=N6();Z.exports=function(S,t,e){function r(a,n){return c.coerce(S,t,g,a,n)}I._supply(S,t,e,r,"violin")}}),lk=Dt(Q=>{var Z=kn(),c={gaussian:function(g){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*g*g)}};Q.makeKDE=function(g,I,S){var t=S.length,e=c.gaussian,r=g.bandwidth,a=1/(t*r);return function(n){for(var o=0,i=0;i{var c=kn(),g=Ls(),I=GM(),S=lk(),t=Ca().BADNUM;Z.exports=function(n,o){var i=I(n,o);if(i[0].t.empty)return i;for(var l=n._fullLayout,f=g.getFromId(n,o[o.orientation==="h"?"xaxis":"yaxis"]),x=1/0,y=-1/0,v=0,T=0,u=0;u{var c=j6().setPositionOffset,g=["v","h"];Z.exports=function(I,S){for(var t=I.calcdata,e=S.xaxis,r=S.yaxis,a=0;a{var c=qr(),g=kn(),I=Vs(),S=U6(),t=qi(),e=lk();Z.exports=function(r,a,n,o){var i=r._context.staticPlot,l=r._fullLayout,f=a.xaxis,x=a.yaxis;function y(v,T){var u=t(v,{xaxis:f,yaxis:x,trace:T,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return I.smoothopen(u[0],1)}g.makeTraceGroups(o,n,"trace violins").each(function(v){var T=c.select(this),u=v[0],b=u.t,_=u.trace;if(_.visible!==!0||b.empty){T.remove();return}var P=b.bPos,M=b.bdPos,C=a[b.valLetter+"axis"],A=a[b.posLetter+"axis"],h=_.side==="both",p=h||_.side==="positive",k=h||_.side==="negative",w=T.selectAll("path.violin").data(g.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(W){var q=c.select(this),J=W.density,lt=J.length,yt=A.c2l(W.pos+P,!0),mt=A.l2p(yt),st;if(_.width)st=b.maxKDE/M;else{var tt=l._violinScaleGroupStats[_.scalegroup];st=_.scalemode==="count"?tt.maxKDE/M*(tt.maxCount/W.pts.length):tt.maxKDE/M}var dt,rt,at,vt,it,Y,ft;if(p){for(Y=new Array(lt),vt=0;vt{var c=qr(),g=hi(),I=_l().stylePoints;Z.exports=function(S){var t=c.select(S).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var r=e[0].trace,a=c.select(this),n=r.box||{},o=n.line||{},i=r.meanline||{},l=i.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(g.stroke,r.line.color).call(g.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",o.width+"px").call(g.stroke,o.color).call(g.fill,n.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(g.stroke,i.color),a.selectAll("path.meanline").style(f).call(g.stroke,i.color),I(a,r,S)})}}),GR=Dt((Q,Z)=>{var c=hi(),g=kn(),I=Ls(),S=YM(),t=lk();Z.exports=function(e,r,a,n,o){o||(o={});var i=o.hoverLayer,l=e.cd,f=l[0].trace,x=f.hoveron,y=x.indexOf("violins")!==-1,v=x.indexOf("kde")!==-1,T=[],u,b;if(y||v){var _=S.hoverOnBoxes(e,r,a,n);if(v&&_.length>0){var P=e.xa,M=e.ya,C,A,h,p,k;f.orientation==="h"?(k=r,C="y",h=M,A="x",p=P):(k=a,C="x",h=P,A="y",p=M);var w=l[e.index];if(k>=w.span[0]&&k<=w.span[1]){var R=g.extendFlat({},e),O=p.c2p(k,!0),j=t.getKdeValue(w,f,k),V=t.getPositionOnKdePath(w,f,O),H=h._offset,F=h._length;R[C+"0"]=V[0],R[C+"1"]=V[1],R[A+"0"]=R[A+"1"]=O,R[A+"Label"]=A+": "+I.hoverLabelText(p,k,f[A+"hoverformat"])+", "+l[0].t.labels.kde+" "+j.toFixed(3);for(var U=0,W=0;W<_.length;W++)if(_[W].attr==="med"){U=W;break}R.spikeDistance=_[U].spikeDistance;var q=C+"Spike";R[q]=_[U][q],_[U].spikeDistance=void 0,_[U][q]=void 0,R.hovertemplate=!1,T.push(R),b={},b[C+"1"]=g.constrain(H+V[0],H,H+F),b[C+"2"]=g.constrain(H+V[1],H,H+F),b[A+"1"]=b[A+"2"]=p._offset+O}}y&&(T=T.concat(_))}x.indexOf("points")!==-1&&(u=S.hoverOnPoints(e,r,a));var J=i.selectAll(".violinline-"+f.uid).data(b?[0]:[]);return J.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),J.exit().remove(),J.attr(b).call(c.stroke,e.color),n==="closest"?u?[u]:T:(u&&T.push(u),T)}}),YR=Dt((Q,Z)=>{Z.exports={attributes:w7(),layoutAttributes:k7(),supplyDefaults:VR(),crossTraceDefaults:qw().crossTraceDefaults,supplyLayoutDefaults:HR(),calc:WR(),crossTraceCalc:qR(),plot:$R(),style:ZR(),styleOnSelect:_l().styleOnSelect,hoverPoints:GR(),selectPoints:KM(),moduleType:"trace",name:"violin",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}),KR=Dt((Q,Z)=>{Z.exports=YR()}),XR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}),T7=Dt((Q,Z)=>{var c=Lg(),g=ef().line,I=Ho(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=XR(),n=Ia().extendFlat,o=hi();Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.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:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:n({},c.insidetextanchor,{dflt:"middle"}),textangle:n({},c.textangle,{dflt:0}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:n({},c.orientation,{}),offset:n({},c.offset,{arrayOk:!1}),width:n({},c.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{dflt:0,editType:"plot"}),dash:g.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder};function i(){var l=n({},c.marker);return delete l.pattern,delete l.cornerradius,l}}),A7=Dt((Q,Z)=>{Z.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"}}}),M7=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=J0().handleText,S=Hm(),t=Rp(),e=T7(),r=hi();function a(i,l,f,x){function y(M,C){return c.coerce(i,l,e,M,C)}var v=S(i,l,x,y);if(!v){l.visible=!1;return}t(i,l,x,y),y("xhoverformat"),y("yhoverformat"),y("orientation",l.y&&!l.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var u=y("textposition");I(i,l,x,y,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l.textposition!=="none"&&!l.texttemplate&&y("textinfo",c.isArrayOrTypedArray(T)?"text+value":"value");var b=y("marker.color",f);y("marker.line.color",r.defaultLine),y("marker.line.width");var _=y("connector.visible");if(_){y("connector.fillcolor",n(b));var P=y("connector.line.width");P&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function n(i){var l=c.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(l,.5*r.opacity(l))}function o(i,l){var f,x;function y(T){return c.coerce(x._input,x,e,T)}for(var v=0;v{var c=kn(),g=A7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=D0(),I=QR(),S=Bt(),t=Ca().BADNUM;Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T,u;a.orientation==="h"?(i=n.makeCalcdata(a,"x"),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;var b=Math.min(l.length,i.length),_=new Array(b);for(a._base=[],T=0;T{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=qr(),g=kn(),I=Vs(),S=Ca().BADNUM,t=nx(),e=Bp().clearMinTextSize;Z.exports=function(o,i,l,f){var x=o._fullLayout;e("funnel",x),r(o,i,l,f),a(o,i,l,f),t.plot(o,i,l,f,{mode:x.funnelmode,norm:x.funnelmode,gap:x.funnelgap,groupgap:x.funnelgroupgap})};function r(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","regions");if(!u.connector||!u.connector.visible){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.region").data(g.identity);P.enter().append("g").classed("region",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&p[2]!==S&&k[2]!==S&&p[3]!==S&&k[3]!==S&&(_?w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2]+"H"+p[3]+"L"+p[1]+","+k[1]+"Z":w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3]+"V"+k[2]+"L"+p[1]+","+k[0]+"Z"),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function a(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[3]!==void 0&&k[3]!==void 0&&(_?(w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2],w+="M"+p[1]+","+k[1]+"L"+p[3]+","+k[2]):(w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3],w+="M"+p[1]+","+k[0]+"L"+p[2]+","+k[2])),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function n(o,i,l,f){var x=[],y=[],v=f?i:l,T=f?l:i;return x[0]=v.c2p(o.s0,!0),y[0]=T.c2p(o.p0,!0),x[1]=v.c2p(o.s1,!0),y[1]=T.c2p(o.p1,!0),x[2]=v.c2p(o.nextS0,!0),y[2]=T.c2p(o.nextP0,!0),x[3]=v.c2p(o.nextS1,!0),y[3]=T.c2p(o.nextP1,!0),f?[x,y]:[y,x]}}),nB=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=hi(),S=go().DESELECTDIM,t=xm(),e=Bp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="funnellayer"]').selectAll("g.trace");e(n,l,"funnel"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y.marker;c.select(this).call(I.fill,v.mc||T.color).call(I.stroke,v.mlc||T.line.color).call(g.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".regions").each(function(){c.select(this).selectAll("path").style("stroke-width",0).call(I.fill,y.connector.fillcolor)}),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),iB=Dt((Q,Z)=>{var c=hi().opacity,g=Q_().hoverOnBars,I=kn().formatPercent;Z.exports=function(t,e,r,a,n){var o=g(t,e,r,a,n);if(o){var i=o.cd,l=i[0].trace,f=l.orientation==="h",x=o.index,y=i[x],v=f?"x":"y";o[v+"LabelVal"]=y.s,o.percentInitial=y.begR,o.percentInitialLabel=I(y.begR,1),o.percentPrevious=y.difR,o.percentPreviousLabel=I(y.difR,1),o.percentTotal=y.sumR,o.percentTotalLabel=I(y.sumR,1);var T=y.hi||l.hoverinfo,u=[];if(T&&T!=="none"&&T!=="skip"){var b=T==="all",_=T.split("+"),P=function(M){return b||_.indexOf(M)!==-1};P("percent initial")&&u.push(o.percentInitialLabel+" of initial"),P("percent previous")&&u.push(o.percentPreviousLabel+" of previous"),P("percent total")&&u.push(o.percentTotalLabel+" of total")}return o.extraText=u.join("
"),o.color=S(l,y),[o]}};function S(t,e){var r=t.marker,a=e.mc||r.color,n=e.mlc||r.line.color,o=e.mlw||r.line.width;if(c(a))return a;if(c(n)&&o)return n}}),aB=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(c.percentInitial=g.percentInitial),"percentPrevious"in g&&(c.percentPrevious=g.percentPrevious),"percentTotal"in g&&(c.percentTotal=g.percentTotal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),oB=Dt((Q,Z)=>{Z.exports={attributes:T7(),layoutAttributes:A7(),supplyDefaults:M7().supplyDefaults,crossTraceDefaults:M7().crossTraceDefaults,supplyLayoutDefaults:JR(),calc:tB(),crossTraceCalc:eB(),plot:rB(),style:nB().style,hoverPoints:iB(),eventData:aB(),selectPoints:tb(),moduleType:"trace",name:"funnel",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),sB=Dt((Q,Z)=>{Z.exports=oB()}),lB=Dt((Q,Z)=>{Z.exports={eventDataKeys:["initial","delta","final"]}}),S7=Dt((Q,Z)=>{var c=Lg(),g=ef().line,I=Ho(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=lB(),n=Ia().extendFlat,o=hi();function i(l){return{marker:{color:n({},c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:n({},c.marker.line.color,{arrayOk:!1,editType:"style"}),width:n({},c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.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:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:c.insidetextanchor,textangle:c.textangle,textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:c.orientation,offset:c.offset,width:c.width,increasing:i(),decreasing:i(),totals:i(),connector:{line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder}}),E7=Dt((Q,Z)=>{Z.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"}}}),rb=Dt((Q,Z)=>{Z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}),C7=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=J0().handleText,S=Hm(),t=Rp(),e=S7(),r=hi(),a=rb(),n=a.INCREASING.COLOR,o=a.DECREASING.COLOR,i="#4499FF";function l(y,v,T){y(v+".marker.color",T),y(v+".marker.line.color",r.defaultLine),y(v+".marker.line.width")}function f(y,v,T,u){function b(A,h){return c.coerce(y,v,e,A,h)}var _=S(y,v,u,b);if(!_){v.visible=!1;return}t(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");I(y,v,u,b,P,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),v.texttemplate||b("textinfo")),l(b,"increasing",n),l(b,"decreasing",o),l(b,"totals",i);var M=b("connector.visible");if(M){b("connector.mode");var C=b("connector.line.width");C&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function x(y,v){var T,u;function b(P){return c.coerce(u._input,u,e,P)}if(v.waterfallmode==="group")for(var _=0;_{var c=kn(),g=E7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=Ls(),g=D0(),I=kn().mergeArray,S=Bt(),t=Ca().BADNUM;function e(a){return a==="a"||a==="absolute"}function r(a){return a==="t"||a==="total"}Z.exports=function(a,n){var o=c.getFromId(a,n.xaxis||"x"),i=c.getFromId(a,n.yaxis||"y"),l,f,x,y,v,T;n.orientation==="h"?(l=o.makeCalcdata(n,"x"),x=i.makeCalcdata(n,"y"),y=g(n,i,"y",x),v=!!n.yperiodalignment,T="y"):(l=i.makeCalcdata(n,"y"),x=o.makeCalcdata(n,"x"),y=g(n,o,"x",x),v=!!n.xperiodalignment,T="x"),f=y.vals;for(var u=Math.min(f.length,l.length),b=new Array(u),_=0,P,M=!1,C=0;C{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=qr(),g=kn(),I=Vs(),S=Ca().BADNUM,t=nx(),e=Bp().clearMinTextSize;Z.exports=function(n,o,i,l){var f=n._fullLayout;e("waterfall",f),t.plot(n,o,i,l,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,o,i,l)};function r(n,o,i,l){var f=o.xaxis,x=o.yaxis;g.makeTraceGroups(l,i,"trace bars").each(function(y){var v=c.select(this),T=y[0].trace,u=g.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){u.remove();return}var b=T.orientation==="h",_=T.connector.mode,P=u.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=a(C,f,x,b),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&(_==="spanning"&&!C.isSum&&A>0&&(b?w+="M"+p[0]+","+k[1]+"V"+k[0]:w+="M"+p[1]+","+k[0]+"H"+p[0]),_!=="between"&&(C.isSum||A{var c=qr(),g=Vs(),I=hi(),S=go().DESELECTDIM,t=xm(),e=Bp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");e(n,l,"waterfall"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y[v.dir].marker;c.select(this).call(I.fill,T.color).call(I.stroke,T.line.color).call(g.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),pB=Dt((Q,Z)=>{var c=Ls().hoverLabelText,g=hi().opacity,I=Q_().hoverOnBars,S=rb(),t={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};Z.exports=function(r,a,n,o,i){var l=I(r,a,n,o,i);if(!l)return;var f=l.cd,x=f[0].trace,y=x.orientation==="h",v=y?"x":"y",T=y?r.xa:r.ya;function u(w){return c(T,w,x[v+"hoverformat"])}var b=l.index,_=f[b],P=_.isSum?_.b+_.s:_.rawS;l.initial=_.b+_.s-P,l.delta=P,l.final=l.initial+l.delta;var M=u(Math.abs(l.delta));l.deltaLabel=P<0?"("+M+")":M,l.finalLabel=u(l.final),l.initialLabel=u(l.initial);var C=_.hi||x.hoverinfo,A=[];if(C&&C!=="none"&&C!=="skip"){var h=C==="all",p=C.split("+"),k=function(w){return h||p.indexOf(w)!==-1};_.isSum||(k("final")&&(y?!k("x"):!k("y"))&&A.push(l.finalLabel),k("delta")&&(P<0?A.push(l.deltaLabel+" "+t.decreasing):A.push(l.deltaLabel+" "+t.increasing)),k("initial")&&A.push("Initial: "+l.initialLabel))}return A.length&&(l.extraText=A.join("
")),l.color=e(x,_),[l]};function e(r,a){var n=r[a.dir].marker,o=n.color,i=n.line.color,l=n.line.width;if(g(o))return o;if(g(i)&&l)return i}}),mB=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"initial"in g&&(c.initial=g.initial),"delta"in g&&(c.delta=g.delta),"final"in g&&(c.final=g.final),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),gB=Dt((Q,Z)=>{Z.exports={attributes:S7(),layoutAttributes:E7(),supplyDefaults:C7().supplyDefaults,crossTraceDefaults:C7().crossTraceDefaults,supplyLayoutDefaults:uB(),calc:cB(),crossTraceCalc:hB(),plot:fB(),style:dB().style,hoverPoints:pB(),eventData:mB(),selectPoints:tb(),moduleType:"trace",name:"waterfall",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),vB=Dt((Q,Z)=>{Z.exports=gB()}),nb=Dt((Q,Z)=>{Z.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(c){return c.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.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(c){return c.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(c){var g=c.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(c){var g=c.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%",""]}}}}),L7=Dt((Q,Z)=>{var c=Ho(),g=ef().zorder,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ia().extendFlat,e=nb().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],a=[],n=[];for(i=0;i{var c=kn(),g=L7(),I=nb(),S=o0().IMAGE_URL_PREFIX;Z.exports=function(t,e){function r(o,i){return c.coerce(t,e,g,o,i)}r("source"),e.source&&!e.source.match(S)&&delete e.source,e._hasSource=!!e.source;var a=r("z");if(e._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!e._hasZ&&!e._hasSource){e.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var n;e._hasZ?(r("colormodel","rgb"),n=I.colormodel[e.colormodel],r("zmin",n.zminDflt||n.min),r("zmax",n.zmaxDflt||n.max)):e._hasSource&&(e.colormodel="rgba256",n=I.colormodel[e.colormodel],e.zmin=n.zminDflt,e.zmax=n.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),e._length=null,r("zorder")}}),_v=Dt((Q,Z)=>{typeof Object.create=="function"?Z.exports=function(c,g){g&&(c.super_=g,c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(c,g){if(g){c.super_=g;var I=function(){};I.prototype=g.prototype,c.prototype=new I,c.prototype.constructor=c}}}),P7=Dt((Q,Z)=>{Z.exports=Rm().EventEmitter}),xB=Dt(Q=>{Q.byteLength=r,Q.toByteArray=n,Q.fromByteArray=l;var Z=[],c=[],g=typeof Uint8Array<"u"?Uint8Array:Array,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,t=I.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=x);var v=y===x?0:4-y%4;return[y,v]}function r(f){var x=e(f),y=x[0],v=x[1];return(y+v)*3/4-v}function a(f,x,y){return(x+y)*3/4-y}function n(f){var x,y=e(f),v=y[0],T=y[1],u=new g(a(f,v,T)),b=0,_=T>0?v-4:v,P;for(P=0;P<_;P+=4)x=c[f.charCodeAt(P)]<<18|c[f.charCodeAt(P+1)]<<12|c[f.charCodeAt(P+2)]<<6|c[f.charCodeAt(P+3)],u[b++]=x>>16&255,u[b++]=x>>8&255,u[b++]=x&255;return T===2&&(x=c[f.charCodeAt(P)]<<2|c[f.charCodeAt(P+1)]>>4,u[b++]=x&255),T===1&&(x=c[f.charCodeAt(P)]<<10|c[f.charCodeAt(P+1)]<<4|c[f.charCodeAt(P+2)]>>2,u[b++]=x>>8&255,u[b++]=x&255),u}function o(f){return Z[f>>18&63]+Z[f>>12&63]+Z[f>>6&63]+Z[f&63]}function i(f,x,y){for(var v,T=[],u=x;u_?_:b+u));return v===1?(x=f[y-1],T.push(Z[x>>2]+Z[x<<4&63]+"==")):v===2&&(x=(f[y-2]<<8)+f[y-1],T.push(Z[x>>10]+Z[x>>4&63]+Z[x<<2&63]+"=")),T.join("")}}),_B=Dt(Q=>{Q.read=function(Z,c,g,I,S){var t,e,r=S*8-I-1,a=(1<>1,o=-7,i=g?S-1:0,l=g?-1:1,f=Z[c+i];for(i+=l,t=f&(1<<-o)-1,f>>=-o,o+=r;o>0;t=t*256+Z[c+i],i+=l,o-=8);for(e=t&(1<<-o)-1,t>>=-o,o+=I;o>0;e=e*256+Z[c+i],i+=l,o-=8);if(t===0)t=1-n;else{if(t===a)return e?NaN:(f?-1:1)*(1/0);e=e+Math.pow(2,I),t=t-n}return(f?-1:1)*e*Math.pow(2,t-I)},Q.write=function(Z,c,g,I,S,t){var e,r,a,n=t*8-S-1,o=(1<>1,l=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=I?0:t-1,x=I?1:-1,y=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(r=isNaN(c)?1:0,e=o):(e=Math.floor(Math.log(c)/Math.LN2),c*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?c+=l/a:c+=l*Math.pow(2,1-i),c*a>=2&&(e++,a/=2),e+i>=o?(r=0,e=o):e+i>=1?(r=(c*a-1)*Math.pow(2,S),e=e+i):(r=c*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;Z[g+f]=r&255,f+=x,r/=256,S-=8);for(e=e<0;Z[g+f]=e&255,f+=x,e/=256,n-=8);Z[g+f-x]|=y*128}}),ix=Dt(Q=>{var Z=xB(),c=_B(),g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q.Buffer=e,Q.SlowBuffer=T,Q.INSPECT_MAX_BYTES=50;var I=2147483647;Q.kMaxLength=I,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let Tt=new Uint8Array(1),Lt={foo:function(){return 42}};return Object.setPrototypeOf(Lt,Uint8Array.prototype),Object.setPrototypeOf(Tt,Lt),Tt.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(Tt){if(Tt>I)throw new RangeError('The value "'+Tt+'" is invalid for option "size"');let Lt=new Uint8Array(Tt);return Object.setPrototypeOf(Lt,e.prototype),Lt}function e(Tt,Lt,Mt){if(typeof Tt=="number"){if(typeof Lt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(Tt)}return r(Tt,Lt,Mt)}e.poolSize=8192;function r(Tt,Lt,Mt){if(typeof Tt=="string")return i(Tt,Lt);if(ArrayBuffer.isView(Tt))return f(Tt);if(Tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt);if(Jt(Tt,ArrayBuffer)||Tt&&Jt(Tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(Tt,SharedArrayBuffer)||Tt&&Jt(Tt.buffer,SharedArrayBuffer)))return x(Tt,Lt,Mt);if(typeof Tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ee=Tt.valueOf&&Tt.valueOf();if(ee!=null&&ee!==Tt)return e.from(ee,Lt,Mt);let ve=y(Tt);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Tt[Symbol.toPrimitive]=="function")return e.from(Tt[Symbol.toPrimitive]("string"),Lt,Mt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt)}e.from=function(Tt,Lt,Mt){return r(Tt,Lt,Mt)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(Tt){if(typeof Tt!="number")throw new TypeError('"size" argument must be of type number');if(Tt<0)throw new RangeError('The value "'+Tt+'" is invalid for option "size"')}function n(Tt,Lt,Mt){return a(Tt),Tt<=0?t(Tt):Lt!==void 0?typeof Mt=="string"?t(Tt).fill(Lt,Mt):t(Tt).fill(Lt):t(Tt)}e.alloc=function(Tt,Lt,Mt){return n(Tt,Lt,Mt)};function o(Tt){return a(Tt),t(Tt<0?0:v(Tt)|0)}e.allocUnsafe=function(Tt){return o(Tt)},e.allocUnsafeSlow=function(Tt){return o(Tt)};function i(Tt,Lt){if((typeof Lt!="string"||Lt==="")&&(Lt="utf8"),!e.isEncoding(Lt))throw new TypeError("Unknown encoding: "+Lt);let Mt=u(Tt,Lt)|0,ee=t(Mt),ve=ee.write(Tt,Lt);return ve!==Mt&&(ee=ee.slice(0,ve)),ee}function l(Tt){let Lt=Tt.length<0?0:v(Tt.length)|0,Mt=t(Lt);for(let ee=0;ee=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return Tt|0}function T(Tt){return+Tt!=Tt&&(Tt=0),e.alloc(+Tt)}e.isBuffer=function(Tt){return Tt!=null&&Tt._isBuffer===!0&&Tt!==e.prototype},e.compare=function(Tt,Lt){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),Jt(Lt,Uint8Array)&&(Lt=e.from(Lt,Lt.offset,Lt.byteLength)),!e.isBuffer(Tt)||!e.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Tt===Lt)return 0;let Mt=Tt.length,ee=Lt.length;for(let ve=0,oe=Math.min(Mt,ee);veee.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ee,ve)):Uint8Array.prototype.set.call(ee,oe,ve);else if(e.isBuffer(oe))oe.copy(ee,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ee};function u(Tt,Lt){if(e.isBuffer(Tt))return Tt.length;if(ArrayBuffer.isView(Tt)||Jt(Tt,ArrayBuffer))return Tt.byteLength;if(typeof Tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Tt);let Mt=Tt.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&Mt===0)return 0;let ve=!1;for(;;)switch(Lt){case"ascii":case"latin1":case"binary":return Mt;case"utf8":case"utf-8":return kt(Tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt*2;case"hex":return Mt>>>1;case"base64":return qt(Tt).length;default:if(ve)return ee?-1:kt(Tt).length;Lt=(""+Lt).toLowerCase(),ve=!0}}e.byteLength=u;function b(Tt,Lt,Mt){let ee=!1;if((Lt===void 0||Lt<0)&&(Lt=0),Lt>this.length||((Mt===void 0||Mt>this.length)&&(Mt=this.length),Mt<=0)||(Mt>>>=0,Lt>>>=0,Mt<=Lt))return"";for(Tt||(Tt="utf8");;)switch(Tt){case"hex":return F(this,Lt,Mt);case"utf8":case"utf-8":return R(this,Lt,Mt);case"ascii":return V(this,Lt,Mt);case"latin1":case"binary":return H(this,Lt,Mt);case"base64":return w(this,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Lt,Mt);default:if(ee)throw new TypeError("Unknown encoding: "+Tt);Tt=(Tt+"").toLowerCase(),ee=!0}}e.prototype._isBuffer=!0;function _(Tt,Lt,Mt){let ee=Tt[Lt];Tt[Lt]=Tt[Mt],Tt[Mt]=ee}e.prototype.swap16=function(){let Tt=this.length;if(Tt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Lt=0;LtLt&&(Tt+=" ... "),""},g&&(e.prototype[g]=e.prototype.inspect),e.prototype.compare=function(Tt,Lt,Mt,ee,ve){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),!e.isBuffer(Tt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Tt);if(Lt===void 0&&(Lt=0),Mt===void 0&&(Mt=Tt?Tt.length:0),ee===void 0&&(ee=0),ve===void 0&&(ve=this.length),Lt<0||Mt>Tt.length||ee<0||ve>this.length)throw new RangeError("out of range index");if(ee>=ve&&Lt>=Mt)return 0;if(ee>=ve)return-1;if(Lt>=Mt)return 1;if(Lt>>>=0,Mt>>>=0,ee>>>=0,ve>>>=0,this===Tt)return 0;let oe=ve-ee,Te=Mt-Lt,He=Math.min(oe,Te),Ge=this.slice(ee,ve),cr=Tt.slice(Lt,Mt);for(let ur=0;ur2147483647?Mt=2147483647:Mt<-2147483648&&(Mt=-2147483648),Mt=+Mt,ge(Mt)&&(Mt=ve?0:Tt.length-1),Mt<0&&(Mt=Tt.length+Mt),Mt>=Tt.length){if(ve)return-1;Mt=Tt.length-1}else if(Mt<0)if(ve)Mt=0;else return-1;if(typeof Lt=="string"&&(Lt=e.from(Lt,ee)),e.isBuffer(Lt))return Lt.length===0?-1:M(Tt,Lt,Mt,ee,ve);if(typeof Lt=="number")return Lt=Lt&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(Tt,Lt,Mt):Uint8Array.prototype.lastIndexOf.call(Tt,Lt,Mt):M(Tt,[Lt],Mt,ee,ve);throw new TypeError("val must be string, number or Buffer")}function M(Tt,Lt,Mt,ee,ve){let oe=1,Te=Tt.length,He=Lt.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(Tt.length<2||Lt.length<2)return-1;oe=2,Te/=2,He/=2,Mt/=2}function Ge(ur,jr){return oe===1?ur[jr]:ur.readUInt16BE(jr*oe)}let cr;if(ve){let ur=-1;for(cr=Mt;crTe&&(Mt=Te-He),cr=Mt;cr>=0;cr--){let ur=!0;for(let jr=0;jrve&&(ee=ve)):ee=ve;let oe=Lt.length;ee>oe/2&&(ee=oe/2);let Te;for(Te=0;Te>>0,isFinite(Mt)?(Mt=Mt>>>0,ee===void 0&&(ee="utf8")):(ee=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ve=this.length-Lt;if((Mt===void 0||Mt>ve)&&(Mt=ve),Tt.length>0&&(Mt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");let oe=!1;for(;;)switch(ee){case"hex":return C(this,Tt,Lt,Mt);case"utf8":case"utf-8":return A(this,Tt,Lt,Mt);case"ascii":case"latin1":case"binary":return h(this,Tt,Lt,Mt);case"base64":return p(this,Tt,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,Tt,Lt,Mt);default:if(oe)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(Tt,Lt,Mt){return Lt===0&&Mt===Tt.length?Z.fromByteArray(Tt):Z.fromByteArray(Tt.slice(Lt,Mt))}function R(Tt,Lt,Mt){Mt=Math.min(Tt.length,Mt);let ee=[],ve=Lt;for(;ve239?4:oe>223?3:oe>191?2:1;if(ve+He<=Mt){let Ge,cr,ur,jr;switch(He){case 1:oe<128&&(Te=oe);break;case 2:Ge=Tt[ve+1],(Ge&192)===128&&(jr=(oe&31)<<6|Ge&63,jr>127&&(Te=jr));break;case 3:Ge=Tt[ve+1],cr=Tt[ve+2],(Ge&192)===128&&(cr&192)===128&&(jr=(oe&15)<<12|(Ge&63)<<6|cr&63,jr>2047&&(jr<55296||jr>57343)&&(Te=jr));break;case 4:Ge=Tt[ve+1],cr=Tt[ve+2],ur=Tt[ve+3],(Ge&192)===128&&(cr&192)===128&&(ur&192)===128&&(jr=(oe&15)<<18|(Ge&63)<<12|(cr&63)<<6|ur&63,jr>65535&&jr<1114112&&(Te=jr))}}Te===null?(Te=65533,He=1):Te>65535&&(Te-=65536,ee.push(Te>>>10&1023|55296),Te=56320|Te&1023),ee.push(Te),ve+=He}return j(ee)}var O=4096;function j(Tt){let Lt=Tt.length;if(Lt<=O)return String.fromCharCode.apply(String,Tt);let Mt="",ee=0;for(;eeee)&&(Mt=ee);let ve="";for(let oe=Lt;oeMt&&(Tt=Mt),Lt<0?(Lt+=Mt,Lt<0&&(Lt=0)):Lt>Mt&&(Lt=Mt),LtMt)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt+--Lt],ve=1;for(;Lt>0&&(ve*=256);)ee+=this[Tt+--Lt]*ve;return ee},e.prototype.readUint8=e.prototype.readUInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]|this[Tt+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]<<8|this[Tt+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),(this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16)+this[Tt+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]*16777216+(this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3])},e.prototype.readBigUInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=Lt+this[++Tt]*2**8+this[++Tt]*2**16+this[++Tt]*2**24,ve=this[++Tt]+this[++Tt]*2**8+this[++Tt]*2**16+Mt*2**24;return BigInt(ee)+(BigInt(ve)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=Lt*2**24+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt],ve=this[++Tt]*2**24+this[++Tt]*2**16+this[++Tt]*2**8+Mt;return(BigInt(ee)<>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe=ve&&(ee-=Math.pow(2,8*Lt)),ee},e.prototype.readIntBE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=Lt,ve=1,oe=this[Tt+--ee];for(;ee>0&&(ve*=256);)oe+=this[Tt+--ee]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*Lt)),oe},e.prototype.readInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]&128?(255-this[Tt]+1)*-1:this[Tt]},e.prototype.readInt16LE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt]|this[Tt+1]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt16BE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt+1]|this[Tt]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16|this[Tt+3]<<24},e.prototype.readInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]<<24|this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3]},e.prototype.readBigInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=this[Tt+4]+this[Tt+5]*2**8+this[Tt+6]*2**16+(Mt<<24);return(BigInt(ee)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=(Lt<<24)+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt];return(BigInt(ee)<>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!0,23,4)},e.prototype.readFloatBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!1,23,4)},e.prototype.readDoubleLE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!0,52,8)},e.prototype.readDoubleBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!1,52,8)};function q(Tt,Lt,Mt,ee,ve,oe){if(!e.isBuffer(Tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Lt>ve||LtTt.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,Mt=Mt>>>0,!ee){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=1,oe=0;for(this[Lt]=Tt&255;++oe>>0,Mt=Mt>>>0,!ee){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=Mt-1,oe=1;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)this[Lt+ve]=Tt/oe&255;return Lt+Mt},e.prototype.writeUint8=e.prototype.writeUInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,255,0),this[Lt]=Tt&255,Lt+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt+3]=Tt>>>24,this[Lt+2]=Tt>>>16,this[Lt+1]=Tt>>>8,this[Lt]=Tt&255,Lt+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4};function J(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Mt}function lt(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt+7]=oe,oe=oe>>8,Tt[Mt+6]=oe,oe=oe>>8,Tt[Mt+5]=oe,oe=oe>>8,Tt[Mt+4]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt+3]=Te,Te=Te>>8,Tt[Mt+2]=Te,Te=Te>>8,Tt[Mt+1]=Te,Te=Te>>8,Tt[Mt]=Te,Mt+8}e.prototype.writeBigUInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=0,oe=1,Te=0;for(this[Lt]=Tt&255;++ve>0)-Te&255;return Lt+Mt},e.prototype.writeIntBE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=Mt-1,oe=1,Te=0;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)Tt<0&&Te===0&&this[Lt+ve+1]!==0&&(Te=1),this[Lt+ve]=(Tt/oe>>0)-Te&255;return Lt+Mt},e.prototype.writeInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,127,-128),Tt<0&&(Tt=255+Tt+1),this[Lt]=Tt&255,Lt+1},e.prototype.writeInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,this[Lt+2]=Tt>>>16,this[Lt+3]=Tt>>>24,Lt+4},e.prototype.writeInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),Tt<0&&(Tt=4294967295+Tt+1),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4},e.prototype.writeBigInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yt(Tt,Lt,Mt,ee,ve,oe){if(Mt+ee>Tt.length)throw new RangeError("Index out of range");if(Mt<0)throw new RangeError("Index out of range")}function mt(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,4),c.write(Tt,Lt,Mt,ee,23,4),Mt+4}e.prototype.writeFloatLE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!0,Mt)},e.prototype.writeFloatBE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!1,Mt)};function st(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,8),c.write(Tt,Lt,Mt,ee,52,8),Mt+8}e.prototype.writeDoubleLE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!0,Mt)},e.prototype.writeDoubleBE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!1,Mt)},e.prototype.copy=function(Tt,Lt,Mt,ee){if(!e.isBuffer(Tt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!ee&&ee!==0&&(ee=this.length),Lt>=Tt.length&&(Lt=Tt.length),Lt||(Lt=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),Tt.length-Lt>>0,Mt=Mt===void 0?this.length:Mt>>>0,Tt||(Tt=0);let ve;if(typeof Tt=="number")for(ve=Lt;ve2**32?ve=rt(String(Mt)):typeof Mt=="bigint"&&(ve=String(Mt),(Mt>BigInt(2)**BigInt(32)||Mt<-(BigInt(2)**BigInt(32)))&&(ve=rt(ve)),ve+="n"),ee+=` It must be ${Lt}. Received ${ve}`,ee},RangeError);function rt(Tt){let Lt="",Mt=Tt.length,ee=Tt[0]==="-"?1:0;for(;Mt>=ee+4;Mt-=3)Lt=`_${Tt.slice(Mt-3,Mt)}${Lt}`;return`${Tt.slice(0,Mt)}${Lt}`}function at(Tt,Lt,Mt){it(Lt,"offset"),(Tt[Lt]===void 0||Tt[Lt+Mt]===void 0)&&Y(Lt,Tt.length-(Mt+1))}function vt(Tt,Lt,Mt,ee,ve,oe){if(Tt>Mt||Tt= 0${Te} and < 2${Te} ** ${(oe+1)*8}${Te}`:He=`>= -(2${Te} ** ${(oe+1)*8-1}${Te}) and < 2 ** ${(oe+1)*8-1}${Te}`,new tt.ERR_OUT_OF_RANGE("value",He,Tt)}at(ee,ve,oe)}function it(Tt,Lt){if(typeof Tt!="number")throw new tt.ERR_INVALID_ARG_TYPE(Lt,"number",Tt)}function Y(Tt,Lt,Mt){throw Math.floor(Tt)!==Tt?(it(Tt,Mt),new tt.ERR_OUT_OF_RANGE("offset","an integer",Tt)):Lt<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Lt}`,Tt)}var ft=/[^+/0-9A-Za-z-_]/g;function ut(Tt){if(Tt=Tt.split("=")[0],Tt=Tt.trim().replace(ft,""),Tt.length<2)return"";for(;Tt.length%4!==0;)Tt=Tt+"=";return Tt}function kt(Tt,Lt){Lt=Lt||1/0;let Mt,ee=Tt.length,ve=null,oe=[];for(let Te=0;Te55295&&Mt<57344){if(!ve){if(Mt>56319){(Lt-=3)>-1&&oe.push(239,191,189);continue}else if(Te+1===ee){(Lt-=3)>-1&&oe.push(239,191,189);continue}ve=Mt;continue}if(Mt<56320){(Lt-=3)>-1&&oe.push(239,191,189),ve=Mt;continue}Mt=(ve-55296<<10|Mt-56320)+65536}else ve&&(Lt-=3)>-1&&oe.push(239,191,189);if(ve=null,Mt<128){if((Lt-=1)<0)break;oe.push(Mt)}else if(Mt<2048){if((Lt-=2)<0)break;oe.push(Mt>>6|192,Mt&63|128)}else if(Mt<65536){if((Lt-=3)<0)break;oe.push(Mt>>12|224,Mt>>6&63|128,Mt&63|128)}else if(Mt<1114112){if((Lt-=4)<0)break;oe.push(Mt>>18|240,Mt>>12&63|128,Mt>>6&63|128,Mt&63|128)}else throw new Error("Invalid code point")}return oe}function It(Tt){let Lt=[];for(let Mt=0;Mt>8,ve=Mt%256,oe.push(ve),oe.push(ee);return oe}function qt(Tt){return Z.toByteArray(ut(Tt))}function Wt(Tt,Lt,Mt,ee){let ve;for(ve=0;ve=Lt.length||ve>=Tt.length);++ve)Lt[ve+Mt]=Tt[ve];return ve}function Jt(Tt,Lt){return Tt instanceof Lt||Tt!=null&&Tt.constructor!=null&&Tt.constructor.name!=null&&Tt.constructor.name===Lt.name}function ge(Tt){return Tt!==Tt}var fe=function(){let Tt="0123456789abcdef",Lt=new Array(256);for(let Mt=0;Mt<16;++Mt){let ee=Mt*16;for(let ve=0;ve<16;++ve)Lt[ee+ve]=Tt[Mt]+Tt[ve]}return Lt}();function pe(Tt){return typeof BigInt>"u"?se:Tt}function se(){throw new Error("BigInt not supported")}}),uk=Dt((Q,Z)=>{Z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},g=Symbol("test"),I=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var S=42;c[g]=S;for(var t in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var e=Object.getOwnPropertySymbols(c);if(e.length!==1||e[0]!==g||!Object.prototype.propertyIsEnumerable.call(c,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(c,g);if(r.value!==S||r.enumerable!==!0)return!1}return!0}}),Kw=Dt((Q,Z)=>{var c=uk();Z.exports=function(){return c()&&!!Symbol.toStringTag}}),I7=Dt((Q,Z)=>{Z.exports=Object}),bB=Dt((Q,Z)=>{Z.exports=Error}),wB=Dt((Q,Z)=>{Z.exports=EvalError}),kB=Dt((Q,Z)=>{Z.exports=RangeError}),TB=Dt((Q,Z)=>{Z.exports=ReferenceError}),z7=Dt((Q,Z)=>{Z.exports=SyntaxError}),ib=Dt((Q,Z)=>{Z.exports=TypeError}),AB=Dt((Q,Z)=>{Z.exports=URIError}),MB=Dt((Q,Z)=>{Z.exports=Math.abs}),SB=Dt((Q,Z)=>{Z.exports=Math.floor}),EB=Dt((Q,Z)=>{Z.exports=Math.max}),CB=Dt((Q,Z)=>{Z.exports=Math.min}),LB=Dt((Q,Z)=>{Z.exports=Math.pow}),PB=Dt((Q,Z)=>{Z.exports=Math.round}),IB=Dt((Q,Z)=>{Z.exports=Number.isNaN||function(c){return c!==c}}),zB=Dt((Q,Z)=>{var c=IB();Z.exports=function(g){return c(g)||g===0?g:g<0?-1:1}}),OB=Dt((Q,Z)=>{Z.exports=Object.getOwnPropertyDescriptor}),ax=Dt((Q,Z)=>{var c=OB();if(c)try{c([],"length")}catch{c=null}Z.exports=c}),Xw=Dt((Q,Z)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch{c=!1}Z.exports=c}),DB=Dt((Q,Z)=>{var c=typeof Symbol<"u"&&Symbol,g=uk();Z.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()}}),O7=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),D7=Dt((Q,Z)=>{var c=I7();Z.exports=c.getPrototypeOf||null}),FB=Dt((Q,Z)=>{var c="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,I=Math.max,S="[object Function]",t=function(a,n){for(var o=[],i=0;i{var c=FB();Z.exports=Function.prototype.bind||c}),ck=Dt((Q,Z)=>{Z.exports=Function.prototype.call}),F7=Dt((Q,Z)=>{Z.exports=Function.prototype.apply}),RB=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),BB=Dt((Q,Z)=>{var c=ab(),g=F7(),I=ck(),S=RB();Z.exports=S||c.call(I,g)}),NB=Dt((Q,Z)=>{var c=ab(),g=ib(),I=ck(),S=BB();Z.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new g("a function is required");return S(c,I,t)}}),jB=Dt((Q,Z)=>{var c=NB(),g=ax(),I;try{I=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var S=!!I&&g&&g(Object.prototype,"__proto__"),t=Object,e=t.getPrototypeOf;Z.exports=S&&typeof S.get=="function"?c([S.get]):typeof e=="function"?function(r){return e(r==null?r:t(r))}:!1}),UB=Dt((Q,Z)=>{var c=O7(),g=D7(),I=jB();Z.exports=c?function(S){return c(S)}:g?function(S){if(!S||typeof S!="object"&&typeof S!="function")throw new TypeError("getProto: not an object");return g(S)}:I?function(S){return I(S)}:null}),VB=Dt((Q,Z)=>{var c=Function.prototype.call,g=Object.prototype.hasOwnProperty,I=ab();Z.exports=I.call(c,g)}),hk=Dt((Q,Z)=>{var c,g=I7(),I=bB(),S=wB(),t=kB(),e=TB(),r=z7(),a=ib(),n=AB(),o=MB(),i=SB(),l=EB(),f=CB(),x=LB(),y=PB(),v=zB(),T=Function,u=function(at){try{return T('"use strict"; return ('+at+").constructor;")()}catch{}},b=ax(),_=Xw(),P=function(){throw new a},M=b?function(){try{return arguments.callee,P}catch{try{return b(arguments,"callee").get}catch{return P}}}():P,C=DB()(),A=UB(),h=D7(),p=O7(),k=F7(),w=ck(),R={},O=typeof Uint8Array>"u"||!A?c:A(Uint8Array),j={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!A?c:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":t,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!A?c:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):c,"%Symbol%":C?Symbol:c,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":O,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":w,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":h,"%Math.abs%":o,"%Math.floor%":i,"%Math.max%":l,"%Math.min%":f,"%Math.pow%":x,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":p};if(A)try{null.error}catch(at){V=A(A(at)),j["%Error.prototype%"]=V}var V,H=function at(vt){var it;if(vt==="%AsyncFunction%")it=u("async function () {}");else if(vt==="%GeneratorFunction%")it=u("function* () {}");else if(vt==="%AsyncGeneratorFunction%")it=u("async function* () {}");else if(vt==="%AsyncGenerator%"){var Y=at("%AsyncGeneratorFunction%");Y&&(it=Y.prototype)}else if(vt==="%AsyncIteratorPrototype%"){var ft=at("%AsyncGenerator%");ft&&A&&(it=A(ft.prototype))}return j[vt]=it,it},F={__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"]},U=ab(),W=VB(),q=U.call(w,Array.prototype.concat),J=U.call(k,Array.prototype.splice),lt=U.call(w,String.prototype.replace),yt=U.call(w,String.prototype.slice),mt=U.call(w,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tt=/\\(\\)?/g,dt=function(at){var vt=yt(at,0,1),it=yt(at,-1);if(vt==="%"&&it!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(it==="%"&&vt!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return lt(at,st,function(ft,ut,kt,It){Y[Y.length]=kt?lt(It,tt,"$1"):ut||ft}),Y},rt=function(at,vt){var it=at,Y;if(W(F,it)&&(Y=F[it],it="%"+Y[0]+"%"),W(j,it)){var ft=j[it];if(ft===R&&(ft=H(it)),typeof ft>"u"&&!vt)throw new a("intrinsic "+at+" exists, but is not available. Please file an issue!");return{alias:Y,name:it,value:ft}}throw new r("intrinsic "+at+" does not exist!")};Z.exports=function(at,vt){if(typeof at!="string"||at.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof vt!="boolean")throw new a('"allowMissing" argument must be a boolean');if(mt(/^%?[^%]*%?$/,at)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var it=dt(at),Y=it.length>0?it[0]:"",ft=rt("%"+Y+"%",vt),ut=ft.name,kt=ft.value,It=!1,Pt=ft.alias;Pt&&(Y=Pt[0],J(it,q([0,1],Pt)));for(var qt=1,Wt=!0;qt=it.length){var pe=b(kt,Jt);Wt=!!pe,Wt&&"get"in pe&&!("originalValue"in pe.get)?kt=pe.get:kt=kt[Jt]}else Wt=W(kt,Jt),kt=kt[Jt];Wt&&!It&&(j[ut]=kt)}}return kt}}),HB=Dt((Q,Z)=>{var c=Xw(),g=z7(),I=ib(),S=ax();Z.exports=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new I("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,l=!!S&&S(t,e);if(c)c(t,e,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:r,writable:n===null&&l?l.writable:!n});else if(i||!a&&!n&&!o)t[e]=r;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),R7=Dt((Q,Z)=>{var c=Xw(),g=function(){return!!c};g.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch{return!0}},Z.exports=g}),WB=Dt((Q,Z)=>{var c=hk(),g=HB(),I=R7()(),S=ax(),t=ib(),e=c("%Math.floor%");Z.exports=function(r,a){if(typeof r!="function")throw new t("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||e(a)!==a)throw new t("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&S){var l=S(r,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(I?g(r,"length",a,!0,!0):g(r,"length",a)),r}}),Jw=Dt((Q,Z)=>{var c=ab(),g=hk(),I=WB(),S=ib(),t=g("%Function.prototype.apply%"),e=g("%Function.prototype.call%"),r=g("%Reflect.apply%",!0)||c.call(e,t),a=Xw(),n=g("%Math.max%");Z.exports=function(i){if(typeof i!="function")throw new S("a function is required");var l=r(c,e,arguments);return I(l,1+n(0,i.length-(arguments.length-1)),!0)};var o=function(){return r(c,t,arguments)};a?a(Z.exports,"apply",{value:o}):Z.exports.apply=o}),ob=Dt((Q,Z)=>{var c=hk(),g=Jw(),I=g(c("String.prototype.indexOf"));Z.exports=function(S,t){var e=c(S,!!t);return typeof e=="function"&&I(S,".prototype.")>-1?g(e):e}}),qB=Dt((Q,Z)=>{var c=Kw()(),g=ob(),I=g("Object.prototype.toString"),S=function(r){return c&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:I(r)==="[object Arguments]"},t=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&I(r)!=="[object Array]"&&I(r.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=t,Z.exports=e?S:t}),$B=Dt((Q,Z)=>{var c=Object.prototype.toString,g=Function.prototype.toString,I=/^\s*(?:function)?\*/,S=Kw()(),t=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},r;Z.exports=function(a){if(typeof a!="function")return!1;if(I.test(g.call(a)))return!0;if(!S){var n=c.call(a);return n==="[object GeneratorFunction]"}if(!t)return!1;if(typeof r>"u"){var o=e();r=o?t(o):!1}return t(a)===r}}),ZB=Dt((Q,Z)=>{var c=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,S;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw S}}),S={},g(function(){throw 42},null,I)}catch(b){b!==S&&(g=null)}else g=null;var t=/^\s*class\b/,e=function(b){try{var _=c.call(b);return t.test(_)}catch{return!1}},r=function(b){try{return e(b)?!1:(c.call(b),!0)}catch{return!1}},a=Object.prototype.toString,n="[object Object]",o="[object Function]",i="[object GeneratorFunction]",l="[object HTMLAllCollection]",f="[object HTML document.all class]",x="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(u=document.all,a.call(u)===a.call(document.all)&&(T=function(b){if((v||!b)&&(typeof b>"u"||typeof b=="object"))try{var _=a.call(b);return(_===l||_===f||_===x||_===n)&&b("")==null}catch{}return!1}));var u;Z.exports=g?function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{g(b,null,I)}catch(_){if(_!==S)return!1}return!e(b)&&r(b)}:function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(y)return r(b);if(e(b))return!1;var _=a.call(b);return _!==o&&_!==i&&!/^\[object HTML/.test(_)?!1:r(b)}}),B7=Dt((Q,Z)=>{var c=ZB(),g=Object.prototype.toString,I=Object.prototype.hasOwnProperty,S=function(a,n,o){for(var i=0,l=a.length;i=3&&(i=o),g.call(a)==="[object Array]"?S(a,n,i):typeof a=="string"?t(a,n,i):e(a,n,i)};Z.exports=r}),N7=Dt((Q,Z)=>{var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;Z.exports=function(){for(var I=[],S=0;S{var c=B7(),g=N7(),I=Jw(),S=ob(),t=ax(),e=S("Object.prototype.toString"),r=Kw()(),a=typeof globalThis>"u"?window:globalThis,n=g(),o=S("String.prototype.slice"),i=Object.getPrototypeOf,l=S("Array.prototype.indexOf",!0)||function(v,T){for(var u=0;u-1?T:T!=="Object"?!1:y(v)}return t?x(v):null}}),YB=Dt((Q,Z)=>{var c=B7(),g=N7(),I=ob(),S=I("Object.prototype.toString"),t=Kw()(),e=ax(),r=typeof globalThis>"u"?window:globalThis,a=g(),n=I("Array.prototype.indexOf",!0)||function(x,y){for(var v=0;v-1}return e?f(x):!1}}),j7=Dt(Q=>{var Z=qB(),c=$B(),g=GB(),I=YB();function S(Pt){return Pt.call.bind(Pt)}var t=typeof BigInt<"u",e=typeof Symbol<"u",r=S(Object.prototype.toString),a=S(Number.prototype.valueOf),n=S(String.prototype.valueOf),o=S(Boolean.prototype.valueOf);t&&(i=S(BigInt.prototype.valueOf));var i;e&&(l=S(Symbol.prototype.valueOf));var l;function f(Pt,qt){if(typeof Pt!="object")return!1;try{return qt(Pt),!0}catch{return!1}}Q.isArgumentsObject=Z,Q.isGeneratorFunction=c,Q.isTypedArray=I;function x(Pt){return typeof Promise<"u"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Q.isPromise=x;function y(Pt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):I(Pt)||J(Pt)}Q.isArrayBufferView=y;function v(Pt){return g(Pt)==="Uint8Array"}Q.isUint8Array=v;function T(Pt){return g(Pt)==="Uint8ClampedArray"}Q.isUint8ClampedArray=T;function u(Pt){return g(Pt)==="Uint16Array"}Q.isUint16Array=u;function b(Pt){return g(Pt)==="Uint32Array"}Q.isUint32Array=b;function _(Pt){return g(Pt)==="Int8Array"}Q.isInt8Array=_;function P(Pt){return g(Pt)==="Int16Array"}Q.isInt16Array=P;function M(Pt){return g(Pt)==="Int32Array"}Q.isInt32Array=M;function C(Pt){return g(Pt)==="Float32Array"}Q.isFloat32Array=C;function A(Pt){return g(Pt)==="Float64Array"}Q.isFloat64Array=A;function h(Pt){return g(Pt)==="BigInt64Array"}Q.isBigInt64Array=h;function p(Pt){return g(Pt)==="BigUint64Array"}Q.isBigUint64Array=p;function k(Pt){return r(Pt)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function w(Pt){return typeof Map>"u"?!1:k.working?k(Pt):Pt instanceof Map}Q.isMap=w;function R(Pt){return r(Pt)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function O(Pt){return typeof Set>"u"?!1:R.working?R(Pt):Pt instanceof Set}Q.isSet=O;function j(Pt){return r(Pt)==="[object WeakMap]"}j.working=typeof WeakMap<"u"&&j(new WeakMap);function V(Pt){return typeof WeakMap>"u"?!1:j.working?j(Pt):Pt instanceof WeakMap}Q.isWeakMap=V;function H(Pt){return r(Pt)==="[object WeakSet]"}H.working=typeof WeakSet<"u"&&H(new WeakSet);function F(Pt){return H(Pt)}Q.isWeakSet=F;function U(Pt){return r(Pt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(Pt){return typeof ArrayBuffer>"u"?!1:U.working?U(Pt):Pt instanceof ArrayBuffer}Q.isArrayBuffer=W;function q(Pt){return r(Pt)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function J(Pt){return typeof DataView>"u"?!1:q.working?q(Pt):Pt instanceof DataView}Q.isDataView=J;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(Pt){return r(Pt)==="[object SharedArrayBuffer]"}function mt(Pt){return typeof lt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new lt)),yt.working?yt(Pt):Pt instanceof lt)}Q.isSharedArrayBuffer=mt;function st(Pt){return r(Pt)==="[object AsyncFunction]"}Q.isAsyncFunction=st;function tt(Pt){return r(Pt)==="[object Map Iterator]"}Q.isMapIterator=tt;function dt(Pt){return r(Pt)==="[object Set Iterator]"}Q.isSetIterator=dt;function rt(Pt){return r(Pt)==="[object Generator]"}Q.isGeneratorObject=rt;function at(Pt){return r(Pt)==="[object WebAssembly.Module]"}Q.isWebAssemblyCompiledModule=at;function vt(Pt){return f(Pt,a)}Q.isNumberObject=vt;function it(Pt){return f(Pt,n)}Q.isStringObject=it;function Y(Pt){return f(Pt,o)}Q.isBooleanObject=Y;function ft(Pt){return t&&f(Pt,i)}Q.isBigIntObject=ft;function ut(Pt){return e&&f(Pt,l)}Q.isSymbolObject=ut;function kt(Pt){return vt(Pt)||it(Pt)||Y(Pt)||ft(Pt)||ut(Pt)}Q.isBoxedPrimitive=kt;function It(Pt){return typeof Uint8Array<"u"&&(W(Pt)||mt(Pt))}Q.isAnyArrayBuffer=It,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Q,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})}),U7=Dt((Q,Z)=>{Z.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}}),V7=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var dt=J.name?": "+J.name:"";return q.stylize("[Function"+dt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var Y;return at?Y=l(q,J,lt,tt,st):Y=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,dt=J.length;tt-1&&(st?dt=dt.split(` +`+w(q.dayMonthYear,V,U,W);return w(H,V,U,W)};var j=3*e;Q.incrementMonth=function(V,H,F){F=v(F)&&F;var U=I(V,e);if(V=Math.round(V-U),F)try{var W=Math.round(V/e)+o,q=i.getComponentMethod("calendars","getCal")(F),J=q.fromJD(W);return H%12?q.add(J,H,"m"):q.add(J,H/12,"y"),(J.toJD()-o)*e+U}catch{g.error("invalid ms "+V+" in calendar "+F)}var lt=new Date(V+j);return lt.setUTCMonth(lt.getUTCMonth()+H)+U-j},Q.findExactDates=function(V,H){for(var F=0,U=0,W=0,q=0,J,lt,yt=v(H)&&i.getComponentMethod("calendars","getCal")(H),mt=0;mt{Z.exports=function(c){return c}}),C_=Dt(Q=>{var Z=Hn(),c=as(),g=T1(),I=sa().BADNUM,S=1e-9;Q.findBin=function(n,o,i){if(Z(o.start))return i?Math.ceil((n-o.start)/o.size-S)-1:Math.floor((n-o.start)/o.size+S);var l=0,f=o.length,x=0,y=f>1?(o[f-1]-o[0])/(f-1):1,v,T;for(y>=0?T=i?t:e:T=i?a:r,n+=y*S*(i?-1:1)*(y>=0?1:-1);l90&&c.log("Long binary search..."),l-1};function t(n,o){return no}function a(n,o){return n>=o}Q.sorterAsc=function(n,o){return n-o},Q.sorterDes=function(n,o){return o-n},Q.distinctVals=function(n){var o=n.slice();o.sort(Q.sorterAsc);var i;for(i=o.length-1;i>-1&&o[i]===I;i--);for(var l=o[i]-o[0]||1,f=l/(i||1)/1e4,x=[],y,v=0;v<=i;v++){var T=o[v],u=T-y;y===void 0?(x.push(T),y=T):u>f&&(l=Math.min(l,u),x.push(T),y=T)}return{vals:x,minDiff:l}},Q.roundUp=function(n,o,i){for(var l=0,f=o.length-1,x,y=0,v=i?0:1,T=i?1:0,u=i?Math.ceil:Math.floor;l0&&(l=1),i&&l)return n.sort(o)}return l?n:n.reverse()},Q.findIndexOfMin=function(n,o){o=o||g;for(var i=1/0,l,f=0;f{Z.exports=function(c){return Object.keys(c).sort()}}),m6=Dt(Q=>{var Z=Hn(),c=la().isArrayOrTypedArray;Q.aggNums=function(g,I,S,t){var e,r;if((!t||t>S.length)&&(t=S.length),Z(I)||(I=!1),c(S[0])){for(r=new Array(t),e=0;eg.length-1)return g[g.length-1];var S=I%1;return S*g[Math.ceil(I)]+(1-S)*g[Math.floor(I)]}}),g6=Dt((Q,Z)=>{var c=ko(),g=c.mod,I=c.modHalf,S=Math.PI,t=2*S;function e(T){return T/180*S}function r(T){return T/S*180}function a(T){return Math.abs(T[1]-T[0])>t-1e-14}function n(T,u){return I(u-T,t)}function o(T,u){return Math.abs(n(T,u))}function i(T,u){if(a(u))return!0;var b,_;u[0]_&&(_+=t);var P=g(T,t),M=P+t;return P>=b&&P<=_||M>=b&&M<=_}function l(T,u,b,_){if(!i(u,_))return!1;var P,M;return b[0]=P&&T<=M}function f(T,u,b,_,P,M,C){P=P||0,M=M||0;var A=a([b,_]),h,p,k,w,B;A?(h=0,p=S,k=t):b<_?(h=b,k=_):(h=_,k=b),T{Q.isLeftAnchor=function(Z){return Z.xanchor==="left"||Z.xanchor==="auto"&&Z.x<=1/3},Q.isCenterAnchor=function(Z){return Z.xanchor==="center"||Z.xanchor==="auto"&&Z.x>1/3&&Z.x<2/3},Q.isRightAnchor=function(Z){return Z.xanchor==="right"||Z.xanchor==="auto"&&Z.x>=2/3},Q.isTopAnchor=function(Z){return Z.yanchor==="top"||Z.yanchor==="auto"&&Z.y>=2/3},Q.isMiddleAnchor=function(Z){return Z.yanchor==="middle"||Z.yanchor==="auto"&&Z.y>1/3&&Z.y<2/3},Q.isBottomAnchor=function(Z){return Z.yanchor==="bottom"||Z.yanchor==="auto"&&Z.y<=1/3}}),y6=Dt(Q=>{var Z=ko().mod;Q.segmentsIntersect=c;function c(e,r,a,n,o,i,l,f){var x=a-e,y=o-e,v=l-o,T=n-r,u=i-r,b=f-i,_=x*b-v*T;if(_===0)return null;var P=(y*b-v*u)/_,M=(y*T-x*u)/_;return M<0||M>1||P<0||P>1?null:{x:e+x*P,y:r+T*P}}Q.segmentDistance=function(e,r,a,n,o,i,l,f){if(c(e,r,a,n,o,i,l,f))return 0;var x=a-e,y=n-r,v=l-o,T=f-i,u=x*x+y*y,b=v*v+T*T,_=Math.min(g(x,y,u,o-e,i-r),g(x,y,u,l-e,f-r),g(v,T,b,e-o,r-i),g(v,T,b,a-o,n-i));return Math.sqrt(_)};function g(e,r,a,n,o){var i=n*e+o*r;if(i<0)return n*n+o*o;if(i>a){var l=n-e,f=o-r;return l*l+f*f}else{var x=n*r-o*e;return x*x/a}}var I,S,t;Q.getTextLocation=function(e,r,a,n){if((e!==S||n!==t)&&(I={},S=e,t=n),I[a])return I[a];var o=e.getPointAtLength(Z(a-n/2,r)),i=e.getPointAtLength(Z(a+n/2,r)),l=Math.atan((i.y-o.y)/(i.x-o.x)),f=e.getPointAtLength(Z(a,r)),x=(f.x*4+o.x+i.x)/6,y=(f.y*4+o.y+i.y)/6,v={x,y,theta:l};return I[a]=v,v},Q.clearLocationCache=function(){S=null},Q.getVisibleSegment=function(e,r,a){var n=r.left,o=r.right,i=r.top,l=r.bottom,f=0,x=e.getTotalLength(),y=x,v,T;function u(_){var P=e.getPointAtLength(_);_===0?v=P:_===x&&(T=P);var M=P.xo?P.x-o:0,C=P.yl?P.y-l:0;return Math.sqrt(M*M+C*C)}for(var b=u(f);b;){if(f+=b+a,f>y)return;b=u(f)}for(b=u(y);b;){if(y-=b+a,f>y)return;b=u(y)}return{min:f,max:y,len:y-f,total:x,isClosed:f===0&&y===x&&Math.abs(v.x-T.x)<.1&&Math.abs(v.y-T.y)<.1}},Q.findPointOnPath=function(e,r,a,n){n=n||{};for(var o=n.pathLength||e.getTotalLength(),i=n.tolerance||.001,l=n.iterationLimit||30,f=e.getPointAtLength(0)[a]>e.getPointAtLength(o)[a]?-1:1,x=0,y=0,v=o,T,u,b;x0?v=T:y=T,x++}return u}}),L_=Dt(Q=>{var Z={};Q.throttle=function(g,I,S){var t=Z[g],e=Date.now();if(!t){for(var r in Z)Z[r].tst.ts+I){a();return}t.timer=setTimeout(function(){a(),t.timer=null},I)},Q.done=function(g){var I=Z[g];return!I||!I.timer?Promise.resolve():new Promise(function(S){var t=I.onDone;I.onDone=function(){t&&t(),S(),I.onDone=null}})},Q.clear=function(g){if(g)c(Z[g]),delete Z[g];else for(var I in Z)Q.clear(I)};function c(g){g&&g.timer!==null&&(clearTimeout(g.timer),g.timer=null)}}),P_=Dt((Q,Z)=>{Z.exports=function(c){c._responsiveChartHandler&&(window.removeEventListener("resize",c._responsiveChartHandler),delete c._responsiveChartHandler)}}),A1=Dt((Q,Z)=>{Z.exports=S,Z.exports.isMobile=S,Z.exports.default=S;var c=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,I=/android|ipad|playbook|silk/i;function S(t){t||(t={});let e=t.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let r=c.test(e)&&!g.test(e)||!!t.tablet&&I.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(r=!0),r}}),yw=Dt((Q,Z)=>{var c=Hn(),g=A1();Z.exports=function(S){var t;if(S&&S.hasOwnProperty("userAgent")?t=S.userAgent:t=I(),typeof t!="string")return!0;var e=g({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!e)for(var r=t.split(" "),a=1;a-1;o--){var i=r[o];if(i.substr(0,8)==="Version/"){var l=i.substr(8).split(".")[0];if(c(l)&&(l=+l),l>=13)return!0}}}return e};function I(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}),xw=Dt((Q,Z)=>{var c=Wr();Z.exports=function(g,I,S){var t=g.selectAll("g."+S.replace(/\s/g,".")).data(I,function(r){return r[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",S),t.order();var e=g.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(r){r[0][e]=c.select(this)}),t}}),M1=Dt((Q,Z)=>{var c=Qo();Z.exports=function(g,I){for(var S=g._context.locale,t=0;t<2;t++){for(var e=g._context.locales,r=0;r<2;r++){var a=(e[S]||{}).dictionary;if(a){var n=a[I];if(n)return n}e=c.localeRegistry}var o=S.split("-")[0];if(o===S)break;S=o}return I}}),Cc=Dt((Q,Z)=>{Z.exports=function(c){for(var g={},I=[],S=0,t=0;t{Z.exports=function(S){for(var t=I(S)?g:c,e=[],r=0;r{Z.exports=function(c,g){if(!g)return c;var I=1/Math.abs(g),S=I>1?(I*c+I*g)/I:c+g,t=String(S).length;if(t>16){var e=String(g).length,r=String(c).length;if(t>=r+e){var a=parseFloat(S).toPrecision(12);a.indexOf("e+")===-1&&(S=+a)}}return S}}),dv=Dt((Q,Z)=>{var c=Hn(),g=sa().BADNUM,I=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Z.exports=function(S){return typeof S=="string"&&(S=S.replace(I,"")),c(S)?Number(S):g}}),kn=Dt((Q,Z)=>{var c=Wr(),g=Ri().utcFormat,I=Li().format,S=Hn(),t=sa(),e=t.FP_SAFE,r=-e,a=t.BADNUM,n=Z.exports={};n.adjustFormat=function(it){return!it||/^\d[.]\df/.test(it)||/[.]\d%/.test(it)?it:it==="0.f"?"~f":/^\d%/.test(it)?"~%":/^\ds/.test(it)?"~s":!/^[~,.0$]/.test(it)&&/[&fps]/.test(it)?"~"+it:it};var o={};n.warnBadFormat=function(it){var K=String(it);o[K]||(o[K]=1,n.warn('encountered bad format: "'+K+'"'))},n.noFormat=function(it){return String(it)},n.numberFormat=function(it){var K;try{K=I(n.adjustFormat(it))}catch{return n.warnBadFormat(it),n.noFormat}return K},n.nestedProperty=Eo(),n.keyedContainer=no(),n.relativeAttr=mo(),n.isPlainObject=Qn(),n.toLogRange=Ts(),n.relinkPrivateKeys=xl();var i=la();n.isArrayBuffer=i.isArrayBuffer,n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var l=ko();n.mod=l.mod,n.modHalf=l.modHalf;var f=To();n.valObjectMeta=f.valObjectMeta,n.coerce=f.coerce,n.coerce2=f.coerce2,n.coerceFont=f.coerceFont,n.coercePattern=f.coercePattern,n.coerceHoverinfo=f.coerceHoverinfo,n.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,n.validate=f.validate;var x=p6();n.dateTime2ms=x.dateTime2ms,n.isDateTime=x.isDateTime,n.ms2DateTime=x.ms2DateTime,n.ms2DateTimeLocal=x.ms2DateTimeLocal,n.cleanDate=x.cleanDate,n.isJSDate=x.isJSDate,n.formatDate=x.formatDate,n.incrementMonth=x.incrementMonth,n.dateTick0=x.dateTick0,n.dfltRange=x.dfltRange,n.findExactDates=x.findExactDates,n.MIN_MS=x.MIN_MS,n.MAX_MS=x.MAX_MS;var y=C_();n.findBin=y.findBin,n.sorterAsc=y.sorterAsc,n.sorterDes=y.sorterDes,n.distinctVals=y.distinctVals,n.roundUp=y.roundUp,n.sort=y.sort,n.findIndexOfMin=y.findIndexOfMin,n.sortObjectKeys=Y0();var v=m6();n.aggNums=v.aggNums,n.len=v.len,n.mean=v.mean,n.geometricMean=v.geometricMean,n.median=v.median,n.midRange=v.midRange,n.variance=v.variance,n.stdev=v.stdev,n.interp=v.interp;var T=S_();n.init2dArray=T.init2dArray,n.transposeRagged=T.transposeRagged,n.dot=T.dot,n.translationMatrix=T.translationMatrix,n.rotationMatrix=T.rotationMatrix,n.rotationXYMatrix=T.rotationXYMatrix,n.apply3DTransform=T.apply3DTransform,n.apply2DTransform=T.apply2DTransform,n.apply2DTransform2=T.apply2DTransform2,n.convertCssMatrix=T.convertCssMatrix,n.inverseTransformMatrix=T.inverseTransformMatrix;var u=g6();n.deg2rad=u.deg2rad,n.rad2deg=u.rad2deg,n.angleDelta=u.angleDelta,n.angleDist=u.angleDist,n.isFullCircle=u.isFullCircle,n.isAngleInsideSector=u.isAngleInsideSector,n.isPtInsideSector=u.isPtInsideSector,n.pathArc=u.pathArc,n.pathSector=u.pathSector,n.pathAnnulus=u.pathAnnulus;var b=v6();n.isLeftAnchor=b.isLeftAnchor,n.isCenterAnchor=b.isCenterAnchor,n.isRightAnchor=b.isRightAnchor,n.isTopAnchor=b.isTopAnchor,n.isMiddleAnchor=b.isMiddleAnchor,n.isBottomAnchor=b.isBottomAnchor;var _=y6();n.segmentsIntersect=_.segmentsIntersect,n.segmentDistance=_.segmentDistance,n.getTextLocation=_.getTextLocation,n.clearLocationCache=_.clearLocationCache,n.getVisibleSegment=_.getVisibleSegment,n.findPointOnPath=_.findPointOnPath;var P=Ia();n.extendFlat=P.extendFlat,n.extendDeep=P.extendDeep,n.extendDeepAll=P.extendDeepAll,n.extendDeepNoArrays=P.extendDeepNoArrays;var M=as();n.log=M.log,n.warn=M.warn,n.error=M.error;var C=Mo();n.counterRegex=C.counter;var A=L_();n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var h=r0();n.getGraphDiv=h.getGraphDiv,n.isPlotDiv=h.isPlotDiv,n.removeElement=h.removeElement,n.addStyleRule=h.addStyleRule,n.addRelatedStyleRule=h.addRelatedStyleRule,n.deleteRelatedStyleRule=h.deleteRelatedStyleRule,n.setStyleOnHover=h.setStyleOnHover,n.getFullTransformMatrix=h.getFullTransformMatrix,n.getElementTransformMatrix=h.getElementTransformMatrix,n.getElementAndAncestors=h.getElementAndAncestors,n.equalDomRects=h.equalDomRects,n.clearResponsive=P_(),n.preserveDrawingBuffer=yw(),n.makeTraceGroups=xw(),n._=M1(),n.notifier=bs(),n.filterUnique=Cc(),n.filterVisible=Tf(),n.pushUnique=Dl(),n.increment=jy(),n.cleanNumber=dv(),n.ensureNumber=function(it){return S(it)?(it=Number(it),it>e||it=K?!1:S(it)&&it>=0&&it%1===0},n.noop=Ko(),n.identity=T1(),n.repeat=function(it,K){for(var ft=new Array(K),ut=0;utft?Math.max(ft,Math.min(K,it)):Math.max(K,Math.min(ft,it))},n.bBoxIntersect=function(it,K,ft){return ft=ft||0,it.left<=K.right+ft&&K.left<=it.right+ft&&it.top<=K.bottom+ft&&K.top<=it.bottom+ft},n.simpleMap=function(it,K,ft,ut,kt){for(var It=it.length,Pt=new Array(It),qt=0;qt=Math.pow(2,ft)?kt>10?(n.warn("randstr failed uniqueness"),Pt):it(K,ft,ut,(kt||0)+1):Pt},n.OptionControl=function(it,K){it||(it={}),K||(K="opt");var ft={};return ft.optionList=[],ft._newoption=function(ut){ut[K]=it,ft[ut.name]=ut,ft.optionList.push(ut)},ft["_"+K]=it,ft},n.smooth=function(it,K){if(K=Math.round(K)||0,K<2)return it;var ft=it.length,ut=2*ft,kt=2*K-1,It=new Array(kt),Pt=new Array(ft),qt,Wt,Jt,ge;for(qt=0;qt=ut&&(Jt-=ut*Math.floor(Jt/ut)),Jt<0?Jt=-1-Jt:Jt>=ft&&(Jt=ut-1-Jt),ge+=it[Jt]*It[Wt];Pt[qt]=ge}return Pt},n.syncOrAsync=function(it,K,ft){var ut,kt;function It(){return n.syncOrAsync(it,K,ft)}for(;it.length;)if(kt=it.splice(0,1)[0],ut=kt(K),ut&&ut.then)return ut.then(It);return ft&&ft(K)},n.stripTrailingSlash=function(it){return it.substr(-1)==="/"?it.substr(0,it.length-1):it},n.noneOrAll=function(it,K,ft){if(it){var ut=!1,kt=!0,It,Pt;for(It=0;It0?kt:0})},n.fillArray=function(it,K,ft,ut){if(ut=ut||n.identity,n.isArrayOrTypedArray(it))for(var kt=0;ktO.test(window.navigator.userAgent);var j=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var it=j.exec(window.navigator.userAgent);if(it&&it.length===2){var K=parseInt(it[1]);if(!isNaN(K))return K}return null},n.isD3Selection=function(it){return it instanceof c.selection},n.ensureSingle=function(it,K,ft,ut){var kt=it.select(K+(ft?"."+ft:""));if(kt.size())return kt;var It=it.append(K);return ft&&It.classed(ft,!0),ut&&It.call(ut),It},n.ensureSingleById=function(it,K,ft,ut){var kt=it.select(K+"#"+ft);if(kt.size())return kt;var It=it.append(K).attr("id",ft);return ut&&It.call(ut),It},n.objectFromPath=function(it,K){for(var ft=it.split("."),ut,kt=ut={},It=0;It1?kt+Pt[1]:"";if(It&&(Pt.length>1||qt.length>4||ft))for(;ut.test(qt);)qt=qt.replace(ut,"$1"+It+"$2");return qt+Wt},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;n.templateString=function(it,K){var ft={};return it.replace(n.TEMPLATE_STRING_REGEX,function(ut,kt){var It;return U.test(kt)?It=K[kt]:(ft[kt]=ft[kt]||n.nestedProperty(K,kt).get,It=ft[kt](!0)),It!==void 0?It:""})};var W={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=it=>st(kr(Ar({},it),{opts:W}));var q={max:10,count:0,name:"texttemplate"};n.texttemplateString=it=>st(kr(Ar({},it),{opts:q}));var J=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function lt(it){var K=it.match(J);return K?{key:K[1],op:K[2],number:Number(K[3])}:{key:it,op:null,number:null}}var yt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};n.texttemplateStringForShapes=it=>st(kr(Ar({},it),{opts:yt}));var mt=/^[:|\|]/;function st({data:it=[],locale:K,fallback:ft,labels:ut={},opts:kt,template:It}){return It.replace(n.TEMPLATE_STRING_REGEX,(Pt,qt,Wt)=>{let Jt=["xother","yother"].includes(qt),ge=["_xother","_yother"].includes(qt),fe=["_xother_","_yother_"].includes(qt),pe=["xother_","yother_"].includes(qt),se=Jt||ge||pe||fe;(ge||fe)&&(qt=qt.substring(1)),(pe||fe)&&(qt=qt.substring(0,qt.length-1));let Tt=null,Lt=null;if(kt.parseMultDiv){var Mt=lt(qt);qt=Mt.key,Tt=Mt.op,Lt=Mt.number}let ee;if(se){if(ut[qt]===void 0)return"";ee=ut[qt]}else for(let He of it)if(He){if(He.hasOwnProperty(qt)){ee=He[qt];break}if(U.test(qt)||(ee=n.nestedProperty(He,qt).get(!0)),ee!==void 0)break}if(ee===void 0){let{count:He,max:Ge,name:cr}=kt,ur=ft===!1?Pt:ft;return He=tt&&Pt<=pt,Jt=qt>=tt&&qt<=pt;if(Wt&&(ut=10*ut+Pt-tt),Jt&&(kt=10*kt+qt-tt),!Wt||!Jt){if(ut!==kt)return ut-kt;if(Pt!==qt)return Pt-qt}}return kt-ut};var rt=2e9;n.seedPseudoRandom=function(){rt=2e9},n.pseudoRandom=function(){var it=rt;return rt=(69069*rt+1)%4294967296,Math.abs(rt-it)<429496729?n.pseudoRandom():rt/4294967296},n.fillText=function(it,K,ft){var ut=Array.isArray(ft)?function(Pt){ft.push(Pt)}:function(Pt){ft.text=Pt},kt=n.extractOption(it,K,"htx","hovertext");if(n.isValidTextValue(kt))return ut(kt);var It=n.extractOption(it,K,"tx","text");if(n.isValidTextValue(It))return ut(It)},n.isValidTextValue=function(it){return it||it===0},n.formatPercent=function(it,K){K=K||0;for(var ft=(Math.round(100*it*Math.pow(10,K))*Math.pow(.1,K)).toFixed(K)+"%",ut=0;ut1&&(Jt=1):Jt=0,n.strTranslate(kt-Jt*(ft+Pt),It-Jt*(ut+qt))+n.strScale(Jt)+(Wt?"rotate("+Wt+(K?"":" "+ft+" "+ut)+")":"")},n.setTransormAndDisplay=function(it,K){it.attr("transform",n.getTextTransform(K)),it.style("display",K.scale?null:"none")},n.ensureUniformFontSize=function(it,K){var ft=n.extendFlat({},K);return ft.size=Math.max(K.size,it._fullLayout.uniformtext.minsize||0),ft},n.join2=function(it,K,ft){var ut=it.length;return ut>1?it.slice(0,-1).join(K)+ft+it[ut-1]:it.join(K)},n.bigFont=function(it){return Math.round(1.2*it)};var at=n.getFirefoxVersion(),vt=at!==null&&at<86;n.getPositionFromD3Event=function(){return vt?[c.event.layerX,c.event.layerY]:[c.event.offsetX,c.event.offsetY]}}),I_=Dt(()=>{var Q=kn(),Z={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(g in Z)c=g.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Q.addStyleRule(c,Z[g]);var c,g}),Wu=Dt((Q,Z)=>{Z.exports=!0}),Rf=Dt((Q,Z)=>{var c=Wu(),g;typeof window.matchMedia=="function"?g=!window.matchMedia("(hover: none)").matches:g=c,Z.exports=g}),Rm=Dt((Q,Z)=>{var c=typeof Reflect=="object"?Reflect:null,g=c&&typeof c.apply=="function"?c.apply:function(P,M,C){return Function.prototype.apply.call(P,M,C)},I;c&&typeof c.ownKeys=="function"?I=c.ownKeys:Object.getOwnPropertySymbols?I=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:I=function(P){return Object.getOwnPropertyNames(P)};function S(P){console&&console.warn&&console.warn(P)}var t=Number.isNaN||function(P){return P!==P};function e(){e.init.call(this)}Z.exports=e,Z.exports.once=u,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var r=10;function a(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");r=P}}),e.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},e.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function n(P){return P._maxListeners===void 0?e.defaultMaxListeners:P._maxListeners}e.prototype.getMaxListeners=function(){return n(this)},e.prototype.emit=function(P){for(var M=[],C=1;C0&&(p=M[0]),p instanceof Error)throw p;var k=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw k.context=p,k}var w=h[P];if(w===void 0)return!1;if(typeof w=="function")g(w,this,M);else for(var B=w.length,O=y(w,B),C=0;C0&&k.length>h&&!k.warned){k.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=P,w.type=M,w.count=k.length,S(w)}return P}e.prototype.addListener=function(P,M){return o(this,P,M,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(P,M){return o(this,P,M,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(P,M,C){var A={fired:!1,wrapFn:void 0,target:P,type:M,listener:C},h=i.bind(A);return h.listener=C,A.wrapFn=h,h}e.prototype.once=function(P,M){return a(M),this.on(P,l(this,P,M)),this},e.prototype.prependOnceListener=function(P,M){return a(M),this.prependListener(P,l(this,P,M)),this},e.prototype.removeListener=function(P,M){var C,A,h,p,k;if(a(M),A=this._events,A===void 0)return this;if(C=A[P],C===void 0)return this;if(C===M||C.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete A[P],A.removeListener&&this.emit("removeListener",P,C.listener||M));else if(typeof C!="function"){for(h=-1,p=C.length-1;p>=0;p--)if(C[p]===M||C[p].listener===M){k=C[p].listener,h=p;break}if(h<0)return this;h===0?C.shift():v(C,h),C.length===1&&(A[P]=C[0]),A.removeListener!==void 0&&this.emit("removeListener",P,k||M)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(P){var M,C,A;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[P]),this;if(arguments.length===0){var h=Object.keys(C),p;for(A=0;A=0;A--)this.removeListener(P,M[A]);return this};function f(P,M,C){var A=P._events;if(A===void 0)return[];var h=A[M];return h===void 0?[]:typeof h=="function"?C?[h.listener||h]:[h]:C?T(h):y(h,h.length)}e.prototype.listeners=function(P){return f(this,P,!0)},e.prototype.rawListeners=function(P){return f(this,P,!1)},e.listenerCount=function(P,M){return typeof P.listenerCount=="function"?P.listenerCount(M):x.call(P,M)},e.prototype.listenerCount=x;function x(P){var M=this._events;if(M!==void 0){var C=M[P];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function y(P,M){for(var C=new Array(M),A=0;A{var c=Rm().EventEmitter,g={init:function(I){if(I._ev instanceof c)return I;var S=new c,t=new c;return I._ev=S,I._internalEv=t,I.on=S.on.bind(S),I.once=S.once.bind(S),I.removeListener=S.removeListener.bind(S),I.removeAllListeners=S.removeAllListeners.bind(S),I._internalOn=t.on.bind(t),I._internalOnce=t.once.bind(t),I._removeInternalListener=t.removeListener.bind(t),I._removeAllInternalListeners=t.removeAllListeners.bind(t),I.emit=function(e,r){S.emit(e,r),t.emit(e,r)},typeof I.addEventListener=="function"&&I.addEventListener("wheel",()=>{},{passive:!0}),I},triggerHandler:function(I,S,t){var e,r=I._ev;if(!r)return;var a=r._events[S];if(!a)return;function n(i){if(i.listener){if(r.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[t])}else return i.apply(r,[t])}a=Array.isArray(a)?a:[a];var o;for(o=0;o{var c=kn(),g=ms().dfltConfig;function I(t,e){for(var r=[],a,n=0;ng.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},S.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},S.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},S.undo=function(t){var e,r;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{Z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),jm=Dt(Q=>{var Z=Qo(),c=kn(),g=qo(),I=k1(),S=_w(),t=Cl(),e=ms().configAttributes,r=Yc(),a=c.extendDeepAll,n=c.isPlainObject,o=c.isArrayOrTypedArray,i=c.nestedProperty,l=c.valObjectMeta,f="_isSubplotObj",x="_isLinkedToArray",y="_arrayAttrRegexps",v="_deprecated",T=[f,x,y,v];Q.IS_SUBPLOT_OBJ=f,Q.IS_LINKED_TO_ARRAY=x,Q.DEPRECATED=v,Q.UNDERSCORE_ATTRS=T,Q.get=function(){var O={};return Z.allTypes.forEach(function(j){O[j]=P(j)}),{defs:{valObjects:l,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:O,layout:M(),frames:C(),animation:A(t),config:A(e)}},Q.crawl=function(O,j,V,H){var F=V||0;H=H||"",Object.keys(O).forEach(function(U){var W=O[U];if(T.indexOf(U)===-1){var q=(H?H+".":"")+U;j(W,U,O,F,q),!Q.isValObject(W)&&n(W)&&U!=="impliedEdits"&&Q.crawl(W,j,F+1,q)}})},Q.isValObject=function(O){return O&&O.valType!==void 0},Q.findArrayAttributes=function(O){var j=[],V=[],H=[],F,U;function W(J,lt,yt,mt){V=V.slice(0,mt).concat([lt]),H=H.slice(0,mt).concat([J&&J._isLinkedToArray]);var st=J&&(J.valType==="data_array"||J.arrayOk===!0)&&!(V[mt-1]==="colorbar"&&(lt==="ticktext"||lt==="tickvals"));st&&q(F,0,"")}function q(J,lt,yt){var mt=J[V[lt]],st=yt+V[lt];if(lt===V.length-1)o(mt)&&j.push(U+st);else if(H[lt]){if(Array.isArray(mt))for(var tt=0;tt=U.length)return!1;if(O.dimensions===2){if(V++,j.length===V)return O;var W=j[V];if(!_(W))return!1;O=U[F][W]}else O=U[F]}else O=U}}return O}function _(O){return O===Math.round(O)&&O>=0}function P(O){var j,V;j=Z.modules[O]._module,V=j.basePlotModule;var H={};H.type=null;var F=a({},g),U=a({},j.attributes);Q.crawl(U,function(J,lt,yt,mt,st){i(F,st).set(void 0),J===void 0&&i(U,st).set(void 0)}),a(H,F),Z.traceIs(O,"noOpacity")&&delete H.opacity,Z.traceIs(O,"showLegend")||(delete H.showlegend,delete H.legendgroup),Z.traceIs(O,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),j.selectPoints||delete H.selectedpoints,a(H,U),V.attributes&&a(H,V.attributes),H.type=O;var W={meta:j.meta||{},categories:j.categories||{},animatable:!!j.animatable,type:O,attributes:A(H)};if(j.layoutAttributes){var q={};a(q,j.layoutAttributes),W.layoutAttributes=A(q)}return j.animatable||Q.crawl(W,function(J){Q.isValObject(J)&&"anim"in J&&delete J.anim}),W}function M(){var O={},j,V;a(O,I);for(j in Z.subplotsRegistry)if(V=Z.subplotsRegistry[j],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var H=0;H{var Z=kn(),c=qo(),g="templateitemname",I={name:{valType:"string",editType:"none"}};I[g]={valType:"string",editType:"calc"},Q.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=I.name,r[g]=I[g],r},Q.traceTemplater=function(e){var r={},a,n;for(a in e)n=e[a],Array.isArray(n)&&n.length&&(r[a]=0);function o(i){a=Z.coerce(i,{},c,"type");var l={type:a,_template:null};if(a in r){n=e[a];var f=r[a]%n.length;r[a]++,l._template=n[f]}return l}return{newTrace:o}},Q.newContainer=function(e,r,a){var n=e._template,o=n&&(n[r]||a&&n[a]);Z.isPlainObject(o)||(o=null);var i=e[r]={_template:o};return i},Q.arrayTemplater=function(e,r,a){var n=e._template,o=n&&n[t(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function f(y){var v={name:y.name,_input:y},T=v[g]=y[g];if(!S(T))return v._template=o,v;for(var u=0;u=n&&(a._input||{})._templateitemname;i&&(o=n);var l=r+"["+o+"]",f;function x(){f={},i&&(f[l]={},f[l][g]=i)}x();function y(b,_){f[b]=_}function v(b,_){i?Z.nestedProperty(f[l],b).set(_):f[l+"."+b]=_}function T(){var b=f;return x(),b}function u(b,_){b&&v(b,_);var P=T();for(var M in P)Z.nestedProperty(e,M).set(P[M])}return{modifyBase:y,modifyItem:v,getUpdateObj:T,applyUpdate:u}}}),ic=Dt((Q,Z)=>{var c=Mo().counter;Z.exports={idRegex:{x:c("x","( domain)?"),y:c("y","( domain)?")},attrRegex:c("[xy]axis"),xAxisMatch:c("xaxis"),yAxisMatch:c("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"}}),Bc=Dt(Q=>{var Z=Qo(),c=ic();Q.id2name=function(I){if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))){var S=I.split(" ")[0].substr(1);return S==="1"&&(S=""),I.charAt(0)+"axis"+S}},Q.name2id=function(I){if(I.match(c.AX_NAME_PATTERN)){var S=I.substr(5);return S==="1"&&(S=""),I.charAt(0)+S}},Q.cleanId=function(I,S,t){var e=/( domain)$/.test(I);if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))&&!(S&&I.charAt(0)!==S)&&!(e&&!t)){var r=I.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),I.charAt(0)+r+(e&&t?" domain":"")}},Q.list=function(I,S,t){var e=I._fullLayout;if(!e)return[];var r=Q.listIds(I,S),a=new Array(r.length),n;for(n=0;ne?1:-1:+(I.substr(1)||1)-+(S.substr(1)||1)},Q.ref2id=function(I){return/^[xyz]/.test(I)?I.split(" ")[0]:!1};function g(I,S){if(S&&S.length){for(var t=0;t{function c(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".outline-controllers").remove()}function g(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".select-outline").remove(),I._fullLayout._outlining=!1}Z.exports={clearOutlineControllers:c,clearOutline:g}}),yg=Dt((Q,Z)=>{Z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),ud=Dt(Q=>{var Z=Qo();ic().SUBPLOT_PATTERN,Q.getSubplotCalcData=function(c,g,I){var S=Z.subplotsRegistry[g];if(!S)return[];for(var t=S.attr,e=[],r=0;r{var Z=Qo(),c=kn();Q.manageCommandObserver=function(r,a,n,o){var i={},l=!0;a&&a._commandObserver&&(i=a._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var f=Q.hasSimpleAPICommandBindings(r,n,i.lookupTable);if(a&&a._commandObserver){if(f)return i;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,i}if(f){g(r,f,i.cache),i.check=function(){if(l){var v=g(r,f,i.cache);return v.changed&&o&&i.lookupTable[v.value]!==void 0&&(i.disable(),Promise.resolve(o({value:v.value,type:f.type,prop:f.prop,traces:f.traces,index:i.lookupTable[v.value]})).then(i.enable,i.enable)),v.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y0?".":"")+i;c.isPlainObject(l)?e(l,a,f,o+1):a(f,i,l)}})}}),Kc=Dt((Q,Z)=>{var c=Wr(),g=Ri().timeFormatLocale,I=Li().formatLocale,S=Hn(),t=Ti(),e=Qo(),r=jm(),a=mu(),n=kn(),o=pi(),i=sa().BADNUM,l=Bc(),f=L0().clearOutline,x=yg(),y=Cl(),v=_w(),T=ud().getModuleCalcData,u=n.relinkPrivateKeys,b=n._,_=Z.exports={};n.extendFlat(_,e),_.attributes=qo(),_.attributes.type.values=_.allTypes,_.fontAttrs=ma(),_.layoutAttributes=k1();var P=S1();_.executeAPICommand=P.executeAPICommand,_.computeAPICommandBindings=P.computeAPICommandBindings,_.manageCommandObserver=P.manageCommandObserver,_.hasSimpleAPICommandBindings=P.hasSimpleAPICommandBindings,_.redrawText=function(tt){return tt=n.getGraphDiv(tt),new Promise(function(pt){setTimeout(function(){tt._fullLayout&&(e.getComponentMethod("annotations","draw")(tt),e.getComponentMethod("legend","draw")(tt),e.getComponentMethod("colorbar","draw")(tt),pt(_.previousPromises(tt)))},300)})},_.resize=function(tt){tt=n.getGraphDiv(tt);var pt,rt=new Promise(function(at,vt){(!tt||n.isHidden(tt))&&vt(new Error("Resize must be passed a displayed plot div element.")),tt._redrawTimer&&clearTimeout(tt._redrawTimer),tt._resolveResize&&(pt=tt._resolveResize),tt._resolveResize=at,tt._redrawTimer=setTimeout(function(){if(!tt.layout||tt.layout.width&&tt.layout.height||n.isHidden(tt)){at(tt);return}delete tt.layout.width,delete tt.layout.height;var it=tt.changed;tt.autoplay=!0,e.call("relayout",tt,{autosize:!0}).then(function(){tt.changed=it,tt._resolveResize===at&&(delete tt._resolveResize,at(tt))})},100)});return pt&&pt(rt),rt},_.previousPromises=function(tt){if((tt._promises||[]).length)return Promise.all(tt._promises).then(function(){tt._promises=[]})},_.addLinks=function(tt){if(!(!tt._context.showLink&&!tt._context.showSources)){var pt=tt._fullLayout,rt=n.ensureSingle(pt._paper,"text","js-plot-link-container",function(ut){ut.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var kt=c.select(this);kt.append("tspan").classed("js-link-to-tool",!0),kt.append("tspan").classed("js-link-spacer",!0),kt.append("tspan").classed("js-sourcelinks",!0)})}),at=rt.node(),vt={y:pt._paper.attr("height")-9};document.body.contains(at)&&at.getComputedTextLength()>=pt.width-20?(vt["text-anchor"]="start",vt.x=5):(vt["text-anchor"]="end",vt.x=pt._paper.attr("width")-7),rt.attr(vt);var it=rt.select(".js-link-to-tool"),K=rt.select(".js-link-spacer"),ft=rt.select(".js-sourcelinks");tt._context.showSources&&tt._context.showSources(tt),tt._context.showLink&&M(tt,it),K.text(it.text()&&ft.text()?" - ":"")}};function M(tt,pt){pt.text("");var rt=pt.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(tt._context.linkText+" »");if(tt._context.sendData)rt.on("click",function(){_.sendDataToCloud(tt)});else{var at=window.location.pathname.split("/"),vt=window.location.search;rt.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+at[2].split(".")[0]+"/"+at[1]+vt})}}_.sendDataToCloud=function(tt){var pt=(window.PLOTLYENV||{}).BASE_URL||tt._context.plotlyServerURL;if(pt){tt.emit("plotly_beforeexport");var rt=c.select(tt).append("div").attr("id","hiddenform").style("display","none"),at=rt.append("form").attr({action:pt+"/external",method:"post",target:"_blank"}),vt=at.append("input").attr({type:"text",name:"data"});return vt.node().value=_.graphJson(tt,!1,"keepdata"),at.node().submit(),rt.remove(),tt.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];_.supplyDefaults=function(tt,pt){var rt=pt&&pt.skipUpdateCalc,at=tt._fullLayout||{};if(at._skipDefaults){delete at._skipDefaults;return}var vt=tt._fullLayout={},it=tt.layout||{},K=tt._fullData||[],ft=tt._fullData=[],ut=tt.data||[],kt=tt.calcdata||[],It=tt._context||{},Pt;tt._transitionData||_.createTransitionData(tt),vt._dfltTitle={plot:b(tt,"Click to enter Plot title"),subtitle:b(tt,"Click to enter Plot subtitle"),x:b(tt,"Click to enter X axis title"),y:b(tt,"Click to enter Y axis title"),colorbar:b(tt,"Click to enter Colorscale title"),annotation:b(tt,"new text")},vt._traceWord=b(tt,"trace");var qt=k(tt,C);if(vt._mapboxAccessToken=It.mapboxAccessToken,at._initialAutoSizeIsDone){var Wt=at.width,Jt=at.height;_.supplyLayoutGlobalDefaults(it,vt,qt),it.width||(vt.width=Wt),it.height||(vt.height=Jt),_.sanitizeMargins(vt)}else{_.supplyLayoutGlobalDefaults(it,vt,qt);var ge=!it.width||!it.height,fe=vt.autosize,pe=It.autosizable,se=ge&&(fe||pe);se?_.plotAutoSize(tt,it,vt):ge&&_.sanitizeMargins(vt),!fe&&ge&&(it.width=vt.width,it.height=vt.height)}vt._d3locale=w(qt,vt.separators),vt._extraFormat=k(tt,A),vt._initialAutoSizeIsDone=!0,vt._dataLength=ut.length,vt._modules=[],vt._visibleModules=[],vt._basePlotModules=[];var Tt=vt._subplots=p(),Lt=vt._splomAxes={x:{},y:{}},Mt=vt._splomSubplots={};vt._splomGridDflt={},vt._scatterStackOpts={},vt._firstScatter={},vt._alignmentOpts={},vt._colorAxes={},vt._requestRangeslider={},vt._traceUids=h(K,ut),_.supplyDataDefaults(ut,ft,it,vt);var ee=Object.keys(Lt.x),ve=Object.keys(Lt.y);if(ee.length>1&&ve.length>1){for(e.getComponentMethod("grid","sizeDefaults")(it,vt),Pt=0;Pt15&&ve.length>15&&vt.shapes.length===0&&vt.images.length===0,_.linkSubplots(ft,vt,K,at),_.cleanPlot(ft,vt,K,at);var cr=!!(at._has&&at._has("cartesian")),ur=!!(vt._has&&vt._has("cartesian")),jr=cr,qr=ur;jr&&!qr?at._bgLayer.remove():qr&&!jr&&(vt._shouldCreateBgLayer=!0),at._zoomlayer&&!tt._dragging&&f({_fullLayout:at}),B(ft,vt),u(vt,at),e.getComponentMethod("colorscale","crossTraceDefaults")(ft,vt),vt._preGUI||(vt._preGUI={}),vt._tracePreGUI||(vt._tracePreGUI={});var br=vt._tracePreGUI,Xr={},nn;for(nn in br)Xr[nn]="old";for(Pt=0;Pt0){var kt=1-2*vt;it=Math.round(kt*it),K=Math.round(kt*K)}}var It=_.layoutAttributes.width.min,Pt=_.layoutAttributes.height.min;it1,Wt=!pt.height&&Math.abs(rt.height-K)>1;(Wt||qt)&&(qt&&(rt.width=it),Wt&&(rt.height=K)),tt._initialAutoSize||(tt._initialAutoSize={width:it,height:K}),_.sanitizeMargins(rt)},_.supplyLayoutModuleDefaults=function(tt,pt,rt,at){var vt=e.componentsRegistry,it=pt._basePlotModules,K,ft,ut,kt=e.subplotsRegistry.cartesian;for(K in vt)ut=vt[K],ut.includeBasePlot&&ut.includeBasePlot(tt,pt);it.length||it.push(kt),pt._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(tt,pt),kt.finalizeSubplots(tt,pt));for(var It in pt._subplots)pt._subplots[It].sort(n.subplotSort);for(ft=0;ft1&&(rt.l/=fe,rt.r/=fe)}if(qt){var pe=(rt.t+rt.b)/qt;pe>1&&(rt.t/=pe,rt.b/=pe)}var se=rt.xl!==void 0?rt.xl:rt.x,Tt=rt.xr!==void 0?rt.xr:rt.x,Lt=rt.yt!==void 0?rt.yt:rt.y,Mt=rt.yb!==void 0?rt.yb:rt.y;Wt[pt]={l:{val:se,size:rt.l+ge},r:{val:Tt,size:rt.r+ge},b:{val:Mt,size:rt.b+ge},t:{val:Lt,size:rt.t+ge}},Jt[pt]=1}if(!at._replotting)return _.doAutoMargin(tt)}};function U(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var pt=l.list(tt,"",!0);for(var rt in pt)if(pt[rt].autoshift||pt[rt].shift)return!0;return!1}_.doAutoMargin=function(tt){var pt=tt._fullLayout,rt=pt.width,at=pt.height;pt._size||(pt._size={}),V(pt);var vt=pt._size,it=pt.margin,K={t:0,b:0,l:0,r:0},ft=n.extendFlat({},vt),ut=it.l,kt=it.r,It=it.t,Pt=it.b,qt=pt._pushmargin,Wt=pt._pushmarginIds,Jt=pt.minreducedwidth,ge=pt.minreducedheight;if(it.autoexpand!==!1){for(var fe in qt)Wt[fe]||delete qt[fe];var pe=tt._fullLayout._reservedMargin;for(var se in pe)for(var Tt in pe[se]){var Lt=pe[se][Tt];K[Tt]=Math.max(K[Tt],Lt)}qt.base={l:{val:0,size:ut},r:{val:1,size:kt},t:{val:1,size:It},b:{val:0,size:Pt}};for(var Mt in K){var ee=0;for(var ve in qt)ve!=="base"&&S(qt[ve][Mt].size)&&(ee=qt[ve][Mt].size>ee?qt[ve][Mt].size:ee);var oe=Math.max(0,it[Mt]-ee);K[Mt]=Math.max(0,K[Mt]-oe)}for(var Ae in qt){var He=qt[Ae].l||{},Ge=qt[Ae].b||{},cr=He.val,ur=He.size,jr=Ge.val,qr=Ge.size,br=rt-K.r-K.l,Xr=at-K.t-K.b;for(var nn in qt){if(S(ur)&&qt[nn].r){var Le=qt[nn].r.val,Gt=qt[nn].r.size;if(Le>cr){var ne=(ur*Le+(Gt-br)*cr)/(Le-cr),Ct=(Gt*(1-cr)+(ur-br)*(1-Le))/(Le-cr);ne+Ct>ut+kt&&(ut=ne,kt=Ct)}}if(S(qr)&&qt[nn].t){var gt=qt[nn].t.val,St=qt[nn].t.size;if(gt>jr){var Nt=(qr*gt+(St-Xr)*jr)/(gt-jr),re=(St*(1-jr)+(qr-Xr)*(1-gt))/(gt-jr);Nt+re>Pt+It&&(Pt=Nt,It=re)}}}}}var le=n.constrain(rt-it.l-it.r,H,Jt),ke=n.constrain(at-it.t-it.b,F,ge),Ue=Math.max(0,rt-le),qe=Math.max(0,at-ke);if(Ue){var or=(ut+kt)/Ue;or>1&&(ut/=or,kt/=or)}if(qe){var Sr=(Pt+It)/qe;Sr>1&&(Pt/=Sr,It/=Sr)}if(vt.l=Math.round(ut)+K.l,vt.r=Math.round(kt)+K.r,vt.t=Math.round(It)+K.t,vt.b=Math.round(Pt)+K.b,vt.p=Math.round(it.pad),vt.w=Math.round(rt)-vt.l-vt.r,vt.h=Math.round(at)-vt.t-vt.b,!pt._replotting&&(_.didMarginChange(ft,vt)||U(tt))){"_redrawFromAutoMarginCount"in pt?pt._redrawFromAutoMarginCount++:pt._redrawFromAutoMarginCount=1;var Mr=3*(1+Object.keys(Wt).length);if(pt._redrawFromAutoMarginCount1)return!0}return!1},_.graphJson=function(tt,pt,rt,at,vt,it){(vt&&pt&&!tt._fullData||vt&&!pt&&!tt._fullLayout)&&_.supplyDefaults(tt);var K=vt?tt._fullData:tt.data,ft=vt?tt._fullLayout:tt.layout,ut=(tt._transitionData||{})._frames;function kt(qt,Wt){if(typeof qt=="function")return Wt?"_function_":null;if(n.isPlainObject(qt)){var Jt={},ge;return Object.keys(qt).sort().forEach(function(Tt){if(["_","["].indexOf(Tt.charAt(0))===-1){if(typeof qt[Tt]=="function"){Wt&&(Jt[Tt]="_function");return}if(rt==="keepdata"){if(Tt.substr(Tt.length-3)==="src")return}else if(rt==="keepstream"){if(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0&&!n.isPlainObject(qt.stream))return}else if(rt!=="keepall"&&(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0))return;Jt[Tt]=kt(qt[Tt],Wt)}}),Jt}var fe=Array.isArray(qt),pe=n.isTypedArray(qt);if((fe||pe)&&qt.dtype&&qt.shape){var se=qt.bdata;return kt({dtype:qt.dtype,shape:qt.shape,bdata:n.isArrayBuffer(se)?t.encode(se):se},Wt)}return fe?qt.map(function(Tt){return kt(Tt,Wt)}):pe?n.simpleMap(qt,n.identity):n.isJSDate(qt)?n.ms2DateTimeLocal(+qt):qt}var It={data:(K||[]).map(function(qt){var Wt=kt(qt);return pt&&delete Wt.fit,Wt})};if(!pt&&(It.layout=kt(ft),vt)){var Pt=ft._size;It.layout.computed={margin:{b:Pt.b,l:Pt.l,r:Pt.r,t:Pt.t}}}return ut&&(It.frames=kt(ut)),it&&(It.config=kt(tt._context,!0)),at==="object"?It:JSON.stringify(It)},_.modifyFrames=function(tt,pt){var rt,at,vt,it=tt._transitionData._frames,K=tt._transitionData._frameHash;for(rt=0;rt0&&(tt._transitioningWithDuration=!0),tt._transitionData._interruptCallbacks.push(function(){at=!0}),rt.redraw&&tt._transitionData._interruptCallbacks.push(function(){return e.call("redraw",tt)}),tt._transitionData._interruptCallbacks.push(function(){tt.emit("plotly_transitioninterrupted",[])});var qt=0,Wt=0;function Jt(){return qt++,function(){Wt++,!at&&Wt===qt&&ft(Pt)}}rt.runFn(Jt),setTimeout(Jt())})}function ft(Pt){if(tt._transitionData)return it(tt._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(rt.redraw)return e.call("redraw",tt)}).then(function(){tt._transitioning=!1,tt._transitioningWithDuration=!1,tt.emit("plotly_transitioned",[])}).then(Pt)}function ut(){if(tt._transitionData)return tt._transitioning=!1,vt(tt._transitionData._interruptCallbacks)}var kt=[_.previousPromises,ut,rt.prepareFn,_.rehover,_.reselect,K],It=n.syncOrAsync(kt,tt);return(!It||!It.then)&&(It=Promise.resolve()),It.then(function(){return tt})}_.doCalcdata=function(tt,pt){var rt=l.list(tt),at=tt._fullData,vt=tt._fullLayout,it,K,ft,ut,kt=new Array(at.length),It=(tt.calcdata||[]).slice();for(tt.calcdata=kt,vt._numBoxes=0,vt._numViolins=0,vt._violinScaleGroupStats={},tt._hmpixcount=0,tt._hmlumcount=0,vt._piecolormap={},vt._sunburstcolormap={},vt._treemapcolormap={},vt._iciclecolormap={},vt._funnelareacolormap={},ft=0;ft=0;ut--)if(Mt[ut].enabled){it._indexToPoints=Mt[ut]._indexToPoints;break}K&&K.calc&&(Lt=K.calc(tt,it))}(!Array.isArray(Lt)||!Lt[0])&&(Lt=[{x:i,y:i}]),Lt[0].t||(Lt[0].t={}),Lt[0].trace=it,kt[se]=Lt}}for(mt(rt,at,vt),ft=0;ft{Q.xmlns="http://www.w3.org/2000/xmlns/",Q.svg="http://www.w3.org/2000/svg",Q.xlink="http://www.w3.org/1999/xlink",Q.svgAttrs={xmlns:Q.svg,"xmlns:xlink":Q.xlink}}),Af=Dt((Q,Z)=>{Z.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"}}}),ec=Dt(Q=>{var Z=Wr(),c=kn(),g=c.strTranslate,I=Dp(),S=Af().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Q.convertToTspans=function(F,U,W){var q=F.text(),J=!F.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&q.match(t),lt=Z.select(F.node().parentNode);if(lt.empty())return;var yt=F.attr("class")?F.attr("class").split(" ")[0]:"text";yt+="-math",lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove(),F.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function mt(){lt.empty()||(yt=F.attr("class")+"-math",lt.select("svg."+yt).remove()),F.text("").style("white-space","pre");var st=O(F.node(),q);st&&F.style("pointer-events","all"),Q.positionText(F),W&&W.call(F)}return J?(U&&U._promises||[]).push(new Promise(function(st){F.style("display","none");var tt=parseInt(F.node().style.fontSize,10),pt={fontSize:tt};o(J[2],pt,function(rt,at,vt){lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove();var it=rt&&rt.select("svg");if(!it||!it.node()){mt(),st();return}var K=lt.append("g").classed(yt+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});K.node().appendChild(it.node()),at&&at.node()&&it.node().insertBefore(at.node().cloneNode(!0),it.node().firstChild);var ft=vt.width,ut=vt.height;it.attr({class:yt,height:ut,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var kt=F.node().style.fill||"black",It=it.select("g");It.attr({fill:kt,stroke:kt});var Pt=It.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height;(qt>ft||Wt>ut)&&(it.style("overflow","hidden"),Pt=it.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height);var Jt=+F.attr("x"),ge=+F.attr("y"),fe=tt||F.node().getBoundingClientRect().height,pe=-fe/4;if(yt[0]==="y")K.attr({transform:"rotate("+[-90,Jt,ge]+")"+g(-qt/2,pe-Wt/2)});else if(yt[0]==="l")ge=pe-Wt/2;else if(yt[0]==="a"&&yt.indexOf("atitle")!==0)Jt=0,ge=pe;else{var se=F.attr("text-anchor");Jt=Jt-qt*(se==="middle"?.5:se==="end"?1:0),ge=ge+pe-Wt/2}it.attr({x:Jt,y:ge}),W&&W.call(F,K),st(K)})})):mt(),F};var e=/(<|<|<)/g,r=/(>|>|>)/g;function a(F){return F.replace(e,"\\lt ").replace(r,"\\gt ")}var n=[["$","$"],["\\(","\\)"]];function o(F,U,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){c.warn("No MathJax version:",MathJax.version);return}var J,lt,yt,mt,st=function(){return lt=c.extendDeepAll({},MathJax.Hub.config),yt=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:n},displayAlign:"left"})},tt=function(){lt=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=n},pt=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},rt=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},at=function(){var kt="math-output-"+c.randstr({},64);mt=Z.select("body").append("div").attr({id:kt}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(a(F));var It=mt.node();return q===2?MathJax.Hub.Typeset(It):MathJax.typeset([It])},vt=function(){var kt=mt.select(q===2?".MathJax_SVG":".MathJax"),It=!kt.empty()&&mt.select("svg").node();if(!It)c.log("There was an error in the tex syntax.",F),W();else{var Pt=It.getBoundingClientRect(),qt;q===2?qt=Z.select("body").select("#MathJax_SVG_glyphs"):qt=kt.select("defs"),W(kt,qt,Pt)}mt.remove()},it=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},K=function(){J!=="svg"&&(MathJax.config.startup.output=J)},ft=function(){return yt!==void 0&&(MathJax.Hub.processSectionDelay=yt),MathJax.Hub.Config(lt)},ut=function(){MathJax.config=lt};q===2?MathJax.Hub.Queue(st,pt,at,vt,it,ft):q===3&&(tt(),rt(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){at(),vt(),K(),ut()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},l={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},x="​",y=["http:","https:","mailto:","",void 0,":"],v=Q.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,u=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;Q.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,P=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,C=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(F,U){if(!F)return null;var W=F.match(U),q=W&&(W[3]||W[4]);return q&&w(q)}var h=/(^|;)\s*color:/;Q.plainText=function(F,U){U=U||{};for(var W=U.len!==void 0&&U.len!==-1?U.len:1/0,q=U.allowedTags!==void 0?U.allowedTags:["br"],J="...",lt=J.length,yt=F.split(T),mt=[],st="",tt=0,pt=0;ptlt?mt.push(rt.substr(0,K-lt)+J):mt.push(rt.substr(0,K));break}st=""}}return mt.join("")};var p={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function w(F){return F.replace(k,function(U,W){var q;return W.charAt(0)==="#"?q=B(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=p[W],q||U})}Q.convertEntities=w;function B(F){if(!(F>1114111)){var U=String.fromCodePoint;if(U)return U(F);var W=String.fromCharCode;return F<=65535?W(F):W((F>>10)+55232,F%1024+56320)}}function O(F,U){U=U.replace(v," ");var W=!1,q=[],J,lt=-1;function yt(){lt++;var Wt=document.createElementNS(I.svg,"tspan");Z.select(Wt).attr({class:"line",dy:lt*S+"em"}),F.appendChild(Wt),J=Wt;var Jt=q;if(q=[{node:Wt}],Jt.length>1)for(var ge=1;ge.",U);return}var Jt=q.pop();Wt!==Jt.type&&c.log("Start tag <"+Jt.type+"> doesnt match end tag <"+Wt+">. Pretending it did match.",U),J=q[q.length-1].node}var pt=b.test(U);pt?yt():(J=F,q=[{node:F}]);for(var rt=U.split(T),at=0;at{var c=Wr(),g=ro(),I=Hn(),S=kn(),t=pi(),e=_i().isValid;function r(v,T,u){var b=T?S.nestedProperty(v,T).get()||{}:v,_=b[u||"color"];_&&_._inputArray&&(_=_._inputArray);var P=!1;if(S.isArrayOrTypedArray(_)){for(var M=0;M<_.length;M++)if(I(_[M])){P=!0;break}}return S.isPlainObject(b)&&(P||b.showscale===!0||I(b.cmin)&&I(b.cmax)||e(b.colorscale)||S.isPlainObject(b.colorbar))}var a=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function o(v){var T=v._colorAx,u=T||v,b={},_,P,M;for(P=0;P=0;b--,_++){var P=v[b];u[_]=[1-P[0],P[1]]}return u}function f(v,T){T=T||{};for(var u=v.domain,b=v.range,_=b.length,P=new Array(_),M=0;M<_;M++){var C=g(b[M]).toRgb();P[M]=[C.r,C.g,C.b,C.a]}var A=c.scale.linear().domain(u).range(P).clamp(!0),h=T.noNumericCheck,p=T.returnArray,k;return h&&p?k=A:h?k=function(w){return y(A(w))}:p?k=function(w){return I(w)?A(w):g(w).isValid()?w:t.defaultLine}:k=function(w){return I(w)?y(A(w)):g(w).isValid()?w:t.defaultLine},k.domain=A.domain,k.range=function(){return b},k}function x(v,T){return f(i(v),T)}function y(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return g(T).toRgbString()}Z.exports={hasColorscale:r,extractOpts:o,extractScale:i,flipScale:l,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:x}}),ph=Dt((Q,Z)=>{var c=E_(),g=c.FORMAT_LINK,I=c.DATE_FORMAT_LINK;function S(r,a){return{valType:"string",dflt:"",editType:"none",description:(a?t:e)("hover text",r)+["By default the values are formatted using "+(a?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function t(r,a){return["Sets the "+r+" formatting rule"+(a?"for `"+a+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+g+"."].join(" ")}function e(r,a){return t(r,a)+[" And for dates see: "+I+".","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(" ")}Z.exports={axisHoverFormat:S,descriptionOnlyNumbers:t,descriptionWithDates:e}}),Td=Dt((Q,Z)=>{var c=ma(),g=Ai(),I=kd().dash,S=Ia().extendFlat,t=mu().templatedArray;Zu().templateFormatStringDescription;var e=ph().descriptionWithDates,r=sa().ONEDAY,a=ic(),n=a.HOUR_PATTERN,o=a.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},l=S({},i,{values:i.values.slice().concat(["sync"])});function f(h){return{valType:"integer",min:0,dflt:h?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function u(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=5),p}function b(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var _={valType:"color",dflt:g.defaultLine,editType:"ticks"},P={valType:"color",dflt:g.lightLine,editType:"ticks"};function M(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var C=S({},I,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};Z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:c({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:t("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:[o,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:r},editType:"calc"}),tickmode:l,nticks:f(),tick0:x,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,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:u(),tickwidth:b(),tickcolor:_,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:S({},I,{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:c({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:e("tick label")},tickformatstops:t("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:e("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:P,gridwidth:M(),griddash:C,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.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:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:f("minor"),tick0:x,dtick:y,tickvals:v,ticks:T,ticklen:u("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:P,gridwidth:M("minor"),griddash:C,showgrid:A,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"}}),E1=Dt((Q,Z)=>{var c=Td(),g=ma(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({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:c.linecolor,outlinewidth:c.linewidth,bordercolor:c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:I({},c.ticks,{dflt:""}),ticklabeloverflow:I({},c.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:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:g({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),kc=Dt((Q,Z)=>{var c=E1(),g=Mo().counter,I=Y0(),S=_i().scales;I(S);function t(e){return"`"+e+"`"}Z.exports=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c";"onlyIfNumerical"in r&&r.onlyIfNumerical;var n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",i=typeof r.colorscaleDflt=="string"?S[r.colorscaleDflt]:null,l=r.editTypeOverride||"",f=e?e+".":"",x;"colorAttr"in r?(x=r.colorAttr,r.colorAttr):(x={z:"z",c:"color"}[a],""+t(f+x));var y=a+"auto",v=a+"min",T=a+"max",u=a+"mid",b={};b[v]=b[T]=void 0;var _={};_[y]=!1;var P={};return x==="color"&&(P.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(P.color.anim=!0)),P[y]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:b},P[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[T]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[u]={valType:"number",dflt:null,editType:"calc",impliedEdits:b},P.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(P.showscale={valType:"boolean",dflt:o,editType:"calc"},P.colorbar=c),r.noColorAxis||(P.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),P}}),Ou=Dt((Q,Z)=>{var c=Ia().extendFlat,g=kc(),I=_i().scales;Z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:I.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:I.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:I.RdBu,editType:"calc"}},coloraxis:c({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),P0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g){return c.isPlainObject(g.colorbar)}}),jh=Dt(Q=>{var Z=Hn(),c=kn(),g=sa(),I=g.ONEDAY,S=g.ONEWEEK;Q.dtick=function(t,e){var r=e==="log",a=e==="date",n=e==="category",o=a?I:1;if(!t)return o;if(Z(t))return t=Number(t),t<=0?o:n?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return o;var i=t.charAt(0),l=t.substr(1);return l=Z(l)?Number(l):0,l<=0||!(a&&i==="M"&&l===Math.round(l)||r&&i==="L"||r&&i==="D"&&(l===1||l===2))?o:t},Q.tick0=function(t,e,r,a){if(e==="date")return c.cleanDate(t,c.dateTick0(r,a%S===0?1:0));if(!(a==="D1"||a==="D2"))return Z(t)?Number(t):0}}),xg=Dt((Q,Z)=>{var c=jh(),g=kn().isArrayOrTypedArray,I=la().isTypedArraySpec,S=la().decodeTypedArraySpec;Z.exports=function(t,e,r,a,n){n||(n={});var o=n.isMinor,i=o?t.minor||{}:t,l=o?e.minor:e,f=o?"minor.":"";function x(M){var C=i[M];return I(C)&&(C=S(C)),C!==void 0?C:(l._template||{})[M]}var y=x("tick0"),v=x("dtick"),T=x("tickvals"),u=g(T)?"array":v?"linear":"auto",b=r(f+"tickmode",u);if(b==="auto"||b==="sync")r(f+"nticks");else if(b==="linear"){var _=l.dtick=c.dtick(v,a);l.tick0=c.tick0(y,a,e.calendar,_)}else if(a!=="multicategory"){var P=r(f+"tickvals");P===void 0?l.tickmode="auto":o||r("ticktext")}}}),_g=Dt((Q,Z)=>{var c=kn(),g=Td();Z.exports=function(I,S,t,e){var r=e.isMinor,a=r?I.minor||{}:I,n=r?S.minor:S,o=r?g.minor:g,i=r?"minor.":"",l=c.coerce2(a,n,o,"ticklen",r?(S.ticklen||5)*.6:void 0),f=c.coerce2(a,n,o,"tickwidth",r?S.tickwidth||1:void 0),x=c.coerce2(a,n,o,"tickcolor",(r?S.tickcolor:void 0)||n.color),y=t(i+"ticks",!r&&e.outerTicks||l||f||x?"outside":"");y||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}),Uy=Dt((Q,Z)=>{Z.exports=function(c){var g=["showexponent","showtickprefix","showticksuffix"],I=g.filter(function(t){return c[t]!==void 0}),S=function(t){return c[t]===c[I[0]]};if(I.every(S)||I.length===1)return c[I[0]]}}),Ad=Dt((Q,Z)=>{var c=kn(),g=mu();Z.exports=function(I,S,t){var e=t.name,r=t.inclusionAttr||"visible",a=S[e],n=c.isArrayOrTypedArray(I[e])?I[e]:[],o=S[e]=[],i=g.arrayTemplater(S,e,r),l,f;for(l=0;l{var c=kn(),g=pi().contrast,I=Td(),S=Uy(),t=Ad();Z.exports=function(r,a,n,o,i){i||(i={});var l=n("labelalias");c.isPlainObject(l)||delete a.labelalias;var f=S(r),x=n("showticklabels");if(x){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var y=i.font||{},v=a.color,T=a.ticklabelposition||"",u=T.indexOf("inside")!==-1?g(i.bgColor):v&&v!==I.color.dflt?v:y.color;if(c.coerceFont(n,"tickfont",y,{overrideDflt:{color:u}}),!i.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&n("ticklabelstep"),!i.noAng){var b=n("tickangle");!i.noAutotickangles&&b==="auto"&&n("autotickangles")}if(o!=="category"){var _=n("tickformat");t(r,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:e}),a.tickformatstops.length||delete a.tickformatstops,!i.noExp&&!_&&o!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&o==="log"&&n("minorloglabels")}};function e(r,a){function n(i,l){return c.coerce(r,a,I.tickformatstops,i,l)}var o=n("enabled");o&&(n("dtickrange"),n("value"))}}),dm=Dt((Q,Z)=>{var c=Uy();Z.exports=function(g,I,S,t,e){e||(e={});var r=e.tickSuffixDflt,a=c(g),n=S("tickprefix");n&&S("showtickprefix",a);var o=S("ticksuffix",r);o&&S("showticksuffix",a)}}),pv=Dt((Q,Z)=>{var c=kn(),g=mu(),I=xg(),S=_g(),t=n0(),e=dm(),r=E1();Z.exports=function(a,n,o){var i=g.newContainer(n,"colorbar"),l=a.colorbar||{};function f(F,U){return c.coerce(l,i,r,F,U)}var x=o.margin||{t:0,b:0,l:0,r:0},y=o.width-x.l-x.r,v=o.height-x.t-x.b,T=f("orientation"),u=T==="v",b=f("thicknessmode");f("thickness",b==="fraction"?30/(u?y:v):30);var _=f("lenmode");f("len",_==="fraction"?1:u?v:y);var P=f("yref"),M=f("xref"),C=P==="paper",A=M==="paper",h,p,k,w="left";u?(k="middle",w=A?"left":"right",h=A?1.02:1,p=.5):(k=C?"bottom":"top",w="center",h=.5,p=C?1.02:1),c.coerce(l,i,{x:{valType:"number",min:A?-2:0,max:A?3:1,dflt:h}},"x"),c.coerce(l,i,{y:{valType:"number",min:C?-2:0,max:C?3:1,dflt:p}},"y"),f("xanchor",w),f("xpad"),f("yanchor",k),f("ypad"),c.noneOrAll(l,i,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var B=c.coerce(l,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",B.indexOf("inside")!==-1?"hide past domain":"hide past div"),I(l,i,f,"linear");var O=o.font,j={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:O};B.indexOf("inside")!==-1&&(j.bgColor="black"),e(l,i,f,"linear",j),t(l,i,f,"linear",j),S(l,i,f,"linear",j),f("title.text",o._dfltTitle.colorbar);var V=i.showticklabels?i.tickfont:O,H=c.extendFlat({},O,{family:V.family,size:c.bigFont(V.size)});c.coerceFont(f,"title.font",H),f("title.side",u?"top":"right")}}),mc=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=P0(),S=pv(),t=_i().isValid,e=Qo().traceIs;function r(a,n){var o=n.slice(0,n.length-1);return n?g.nestedProperty(a,o).get()||{}:a}Z.exports=function a(n,o,i,l,f){var x=f.prefix,y=f.cLetter,v="_module"in o,T=r(n,x),u=r(o,x),b=r(o._template||{},x)||{},_=function(){return delete n.coloraxis,delete o.coloraxis,a(n,o,i,l,f)};if(v){var P=i._colorAxes||{},M=l(x+"coloraxis");if(M){var C=e(o,"contour")&&g.nestedProperty(o,"contours.coloring").get()||"heatmap",A=P[M];A?(A[2].push(_),A[0]!==C&&(A[0]=!1,g.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):P[M]=[C,o,[_]];return}}var h=T[y+"min"],p=T[y+"max"],k=c(h)&&c(p)&&h{var c=kn(),g=mu(),I=Ou(),S=mc();Z.exports=function(t,e){function r(y,v){return c.coerce(t,e,I,y,v)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var a=e._colorAxes,n,o;function i(y,v){return c.coerce(n,o,I.coloraxis,y,v)}for(var l in a){var f=a[l];if(f[0])n=t[l]||{},o=g.newContainer(e,l,"coloraxis"),o._name=l,S(n,o,e,i,{prefix:"",cLetter:"c"});else{for(var x=0;x{var c=kn(),g=Ud().hasColorscale,I=Ud().extractOpts;Z.exports=function(S,t){function e(f,x){var y=f["_"+x];y!==void 0&&(f[x]=y)}function r(f,x){var y=x.container?c.nestedProperty(f,x.container).get():f;if(y)if(y.coloraxis)y._colorAx=t[y.coloraxis];else{var v=I(y),T=v.auto;(T||v.min===void 0)&&e(y,x.min),(T||v.max===void 0)&&e(y,x.max),v.autocolorscale&&e(y,"colorscale")}}for(var a=0;a{var c=Hn(),g=kn(),I=Ud().extractOpts;Z.exports=function(S,t,e){var r=S._fullLayout,a=e.vals,n=e.containerStr,o=n?g.nestedProperty(t,n).get():t,i=I(o),l=i.auto!==!1,f=i.min,x=i.max,y=i.mid,v=function(){return g.aggNums(Math.min,null,a)},T=function(){return g.aggNums(Math.max,null,a)};if(f===void 0?f=v():l&&(o._colorAx&&c(f)?f=Math.min(f,v()):f=v()),x===void 0?x=T():l&&(o._colorAx&&c(x)?x=Math.max(x,T()):x=T()),l&&y!==void 0&&(x-y>y-f?f=y-(x-y):x-y=0?u=r.colorscale.sequential:u=r.colorscale.sequentialminus,i._sync("colorscale",u)}}}),Xc=Dt((Q,Z)=>{var c=_i(),g=Ud();Z.exports={moduleType:"component",name:"colorscale",attributes:kc(),layoutAttributes:Ou(),supplyLayoutDefaults:bg(),handleDefaults:mc(),crossTraceDefaults:bw(),calc:Xd(),scales:c.scales,defaultScale:c.defaultScale,getScale:c.get,isValidScale:c.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}}),Tc=Dt((Q,Z)=>{var c=kn(),g=la().isTypedArraySpec;Z.exports={hasLines:function(I){return I.visible&&I.mode&&I.mode.indexOf("lines")!==-1},hasMarkers:function(I){return I.visible&&(I.mode&&I.mode.indexOf("markers")!==-1||I.type==="splom")},hasText:function(I){return I.visible&&I.mode&&I.mode.indexOf("text")!==-1},isBubble:function(I){var S=I.marker;return c.isPlainObject(S)&&(c.isArrayOrTypedArray(S.size)||g(S.size))}}}),wg=Dt((Q,Z)=>{var c=Hn();Z.exports=function(g,I){I||(I=2);var S=g.marker,t=S.sizeref||1,e=S.sizemin||0,r=S.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=r(a/I);return c(n)&&n>0?Math.max(n,e):0}}}),Fp=Dt(Q=>{var Z=kn();Q.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},Q.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var a=e.xaxes||[],n=e.yaxes||[],o=0;o=0&&a.index{Z.exports=I;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function I(e){var r=[];return e.replace(g,function(a,n,o){var i=n.toLowerCase();for(o=t(o),i=="m"&&o.length>2&&(r.push([n].concat(o.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(o.length==c[i])return o.unshift(n),r.push(o);if(o.length{var c=C1(),g=function(y,v){return v?Math.round(y*(v=Math.pow(10,v)))/v:Math.round(y)},I="M0,0Z",S=Math.sqrt(2),t=Math.sqrt(3),e=Math.PI,r=Math.cos,a=Math.sin;Z.exports={circle:{n:0,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return T?x(v,T,b):b}},square:{n:1,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(y,v,T){if(n(v))return I;var u=g(y*.4,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H"+u+"V"+b+"H-"+u+"V"+u+"H-"+b+"V-"+u+"H-"+u+"V-"+b+"H"+u+"V-"+u+"H"+b+"Z")}},x:{n:4,f:function(y,v,T){if(n(v))return I;var u=g(y*.8/S,2),b="l"+u+","+u,_="l"+u+",-"+u,P="l-"+u+",-"+u,M="l-"+u+","+u;return x(v,T,"M0,"+u+b+_+P+_+P+M+P+M+b+M+b+"Z")}},"triangle-up":{n:5,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+","+b+"H"+u+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+",-"+b+"H"+u+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M"+b+",-"+u+"V"+u+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+b+",-"+u+"V"+u+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+b+",-"+u+"H"+u+"V"+b+"Z")}},"triangle-se":{n:10,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+u+",-"+b+"V"+u+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H-"+u+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+u+","+b+"V-"+u+"H"+b+"Z")}},pentagon:{n:13,f:function(y,v,T){if(n(v))return I;var u=g(y*.951,2),b=g(y*.588,2),_=g(-y,2),P=g(y*-.309,2),M=g(y*.809,2);return x(v,T,"M"+u+","+P+"L"+b+","+M+"H-"+b+"L-"+u+","+P+"L0,"+_+"Z")}},hexagon:{n:14,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M"+_+",-"+b+"V"+b+"L0,"+u+"L-"+_+","+b+"V-"+b+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M-"+b+","+_+"H"+b+"L"+u+",0L"+b+",-"+_+"H-"+b+"L-"+u+",0Z")}},octagon:{n:16,f:function(y,v,T){if(n(v))return I;var u=g(y*.924,2),b=g(y*.383,2);return x(v,T,"M-"+b+",-"+u+"H"+b+"L"+u+",-"+b+"V"+b+"L"+b+","+u+"H-"+b+"L-"+u+","+b+"V-"+b+"Z")}},star:{n:17,f:function(y,v,T){if(n(v))return I;var u=y*1.4,b=g(u*.225,2),_=g(u*.951,2),P=g(u*.363,2),M=g(u*.588,2),C=g(-u,2),A=g(u*-.309,2),h=g(u*.118,2),p=g(u*.809,2),k=g(u*.382,2);return x(v,T,"M"+b+","+A+"H"+_+"L"+P+","+h+"L"+M+","+p+"L0,"+k+"L-"+M+","+p+"L-"+P+","+h+"L-"+_+","+A+"H-"+b+"L0,"+C+"Z")}},hexagram:{n:18,f:function(y,v,T){if(n(v))return I;var u=g(y*.66,2),b=g(y*.38,2),_=g(y*.76,2);return x(v,T,"M-"+_+",0l-"+b+",-"+u+"h"+_+"l"+b+",-"+u+"l"+b+","+u+"h"+_+"l-"+b+","+u+"l"+b+","+u+"h-"+_+"l-"+b+","+u+"l-"+b+",-"+u+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M-"+u+","+b+M+u+","+b+M+"0,-"+_+M+"-"+u+","+b+"Z")}},"star-triangle-down":{n:20,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M"+u+",-"+b+M+"-"+u+",-"+b+M+"0,"+_+M+u+",-"+b+"Z")}},"star-square":{n:21,f:function(y,v,T){if(n(v))return I;var u=g(y*1.1,2),b=g(y*2,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",-"+u+_+"-"+u+","+u+_+u+","+u+_+u+",-"+u+_+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*1.9,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",0"+_+"0,"+u+_+u+",0"+_+"0,-"+u+_+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(y,v,T){if(n(v))return I;var u=g(y*.7,2),b=g(y*1.4,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*.7,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},hourglass:{n:25,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/S,2);return x(v,T,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2),b=g(y*.65,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*.85,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,v,T){if(n(v))return I;var u=g(y/2,2),b=g(y,2);return x(v,T,"M"+u+","+b+"V-"+b+"M"+(u-b)+",-"+b+"V"+b+"M"+b+","+u+"H-"+b+"M-"+b+","+(u-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+","+_+"L0,0M"+u+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+",-"+_+"L0,0M"+u+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M"+_+","+u+"L0,0M"+_+",-"+u+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+_+","+u+"L0,0M-"+_+",-"+u+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+",-"+b+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L-"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+b+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L-"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,v,T){if(n(v))return I;var u=e/2.5,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,v,T){if(n(v))return I;var u=e/4,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"A "+2*y+","+2*y+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function n(y){return y===null}var o,i,l,f;function x(y,v,T){if((!y||y%360===0)&&!v)return T;if(l===y&&f===v&&o===T)return i;l=y,f=v,o=T;function u(j,V){var H=r(j),F=a(j),U=V[0],W=V[1]+(v||0);return[U*H-W*F,U*F+W*H]}for(var b=y/180*e,_=0,P=0,M=c(T),C="",A=0;A{var c=Wr(),g=kn(),I=g.numberFormat,S=Hn(),t=ro(),e=Qo(),r=pi(),a=Xc(),n=g.strTranslate,o=ec(),i=Dp(),l=Af(),f=l.LINE_SPACING,x=go().DESELECTDIM,y=Tc(),v=wg(),T=Fp().appendArrayPointValue,u=Z.exports={};u.font=function(Tt,Lt){var Mt=Lt.variant,ee=Lt.style,ve=Lt.weight,oe=Lt.color,Ae=Lt.size,He=Lt.family,Ge=Lt.shadow,cr=Lt.lineposition,ur=Lt.textcase;He&&Tt.style("font-family",He),Ae+1&&Tt.style("font-size",Ae+"px"),oe&&Tt.call(r.fill,oe),ve&&Tt.style("font-weight",ve),ee&&Tt.style("font-style",ee),Mt&&Tt.style("font-variant",Mt),ur&&Tt.style("text-transform",b(P(ur))),Ge&&Tt.style("text-shadow",Ge==="auto"?o.makeTextShadow(r.contrast(oe)):b(Ge)),cr&&Tt.style("text-decoration-line",b(M(cr)))};function b(Tt){return Tt==="none"?void 0:Tt}var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P(Tt){return _[Tt]}function M(Tt){return Tt.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}u.setPosition=function(Tt,Lt,Mt){Tt.attr("x",Lt).attr("y",Mt)},u.setSize=function(Tt,Lt,Mt){Tt.attr("width",Lt).attr("height",Mt)},u.setRect=function(Tt,Lt,Mt,ee,ve){Tt.call(u.setPosition,Lt,Mt).call(u.setSize,ee,ve)},u.translatePoint=function(Tt,Lt,Mt,ee){var ve=Mt.c2p(Tt.x),oe=ee.c2p(Tt.y);if(S(ve)&&S(oe)&&Lt.node())Lt.node().nodeName==="text"?Lt.attr("x",ve).attr("y",oe):Lt.attr("transform",n(ve,oe));else return!1;return!0},u.translatePoints=function(Tt,Lt,Mt){Tt.each(function(ee){var ve=c.select(this);u.translatePoint(ee,ve,Lt,Mt)})},u.hideOutsideRangePoint=function(Tt,Lt,Mt,ee,ve,oe){Lt.attr("display",Mt.isPtWithinRange(Tt,ve)&&ee.isPtWithinRange(Tt,oe)?null:"none")},u.hideOutsideRangePoints=function(Tt,Lt){if(Lt._hasClipOnAxisFalse){var Mt=Lt.xaxis,ee=Lt.yaxis;Tt.each(function(ve){var oe=ve[0].trace,Ae=oe.xcalendar,He=oe.ycalendar,Ge=e.traceIs(oe,"bar-like")?".bartext":".point,.textpoint";Tt.selectAll(Ge).each(function(cr){u.hideOutsideRangePoint(cr,c.select(this),Mt,ee,Ae,He)})})}},u.crispRound=function(Tt,Lt,Mt){return!Lt||!S(Lt)?Mt||0:Tt._context.staticPlot?Lt:Lt<1?1:Math.round(Lt)},u.singleLineStyle=function(Tt,Lt,Mt,ee,ve){Lt.style("fill","none");var oe=(((Tt||[])[0]||{}).trace||{}).line||{},Ae=Mt||oe.width||0,He=ve||oe.dash||"";r.stroke(Lt,ee||oe.color),u.dashLine(Lt,He,Ae)},u.lineGroupStyle=function(Tt,Lt,Mt,ee){Tt.style("fill","none").each(function(ve){var oe=(((ve||[])[0]||{}).trace||{}).line||{},Ae=Lt||oe.width||0,He=ee||oe.dash||"";c.select(this).call(r.stroke,Mt||oe.color).call(u.dashLine,He,Ae)})},u.dashLine=function(Tt,Lt,Mt){Mt=+Mt||0,Lt=u.dashStyle(Lt,Mt),Tt.style({"stroke-dasharray":Lt,"stroke-width":Mt+"px"})},u.dashStyle=function(Tt,Lt){Lt=+Lt||1;var Mt=Math.max(Lt,3);return Tt==="solid"?Tt="":Tt==="dot"?Tt=Mt+"px,"+Mt+"px":Tt==="dash"?Tt=3*Mt+"px,"+3*Mt+"px":Tt==="longdash"?Tt=5*Mt+"px,"+5*Mt+"px":Tt==="dashdot"?Tt=3*Mt+"px,"+Mt+"px,"+Mt+"px,"+Mt+"px":Tt==="longdashdot"&&(Tt=5*Mt+"px,"+2*Mt+"px,"+Mt+"px,"+2*Mt+"px"),Tt};function C(Tt,Lt,Mt,ee){var ve=Lt.fillpattern,oe=Lt.fillgradient,Ae=u.getPatternAttr,He=ve&&(Ae(ve.shape,0,"")||Ae(ve.path,0,""));if(He){var Ge=Ae(ve.bgcolor,0,null),cr=Ae(ve.fgcolor,0,null),ur=ve.fgopacity,jr=Ae(ve.size,0,8),qr=Ae(ve.solidity,0,.3),br=Lt.uid;u.pattern(Tt,"point",Mt,br,He,jr,qr,void 0,ve.fillmode,Ge,cr,ur)}else if(oe&&oe.type!=="none"){var Xr=oe.type,nn="scatterfill-"+Lt.uid;if(ee&&(nn="legendfill-"+Lt.uid),!ee&&(oe.start!==void 0||oe.stop!==void 0)){var Le,Gt;Xr==="horizontal"?(Le={x:oe.start,y:0},Gt={x:oe.stop,y:0}):Xr==="vertical"&&(Le={x:0,y:oe.start},Gt={x:0,y:oe.stop}),Le.x=Lt._xA.c2p(Le.x===void 0?Lt._extremes.x.min[0].val:Le.x,!0),Le.y=Lt._yA.c2p(Le.y===void 0?Lt._extremes.y.min[0].val:Le.y,!0),Gt.x=Lt._xA.c2p(Gt.x===void 0?Lt._extremes.x.max[0].val:Gt.x,!0),Gt.y=Lt._yA.c2p(Gt.y===void 0?Lt._extremes.y.max[0].val:Gt.y,!0),Tt.call(O,Mt,nn,"linear",oe.colorscale,"fill",Le,Gt,!0,!1)}else Xr==="horizontal"&&(Xr=Xr+"reversed"),Tt.call(u.gradient,Mt,nn,Xr,oe.colorscale,"fill")}else Lt.fillcolor&&Tt.call(r.fill,Lt.fillcolor)}u.singleFillStyle=function(Tt,Lt){var Mt=c.select(Tt.node()),ee=Mt.data(),ve=((ee[0]||[])[0]||{}).trace||{};C(Tt,ve,Lt,!1)},u.fillGroupStyle=function(Tt,Lt,Mt){Tt.style("stroke-width",0).each(function(ee){var ve=c.select(this);ee[0].trace&&C(ve,ee[0].trace,Lt,Mt)})};var A=Ac();u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(A).forEach(function(Tt){var Lt=A[Tt],Mt=Lt.n;u.symbolList.push(Mt,String(Mt),Tt,Mt+100,String(Mt+100),Tt+"-open"),u.symbolNames[Mt]=Tt,u.symbolFuncs[Mt]=Lt.f,u.symbolBackOffs[Mt]=Lt.backoff||0,Lt.needLine&&(u.symbolNeedLines[Mt]=!0),Lt.noDot?u.symbolNoDot[Mt]=!0:u.symbolList.push(Mt+200,String(Mt+200),Tt+"-dot",Mt+300,String(Mt+300),Tt+"-open-dot"),Lt.noFill&&(u.symbolNoFill[Mt]=!0)});var h=u.symbolNames.length,p="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(Tt){if(S(Tt))Tt=+Tt;else if(typeof Tt=="string"){var Lt=0;Tt.indexOf("-open")>0&&(Lt=100,Tt=Tt.replace("-open","")),Tt.indexOf("-dot")>0&&(Lt+=200,Tt=Tt.replace("-dot","")),Tt=u.symbolNames.indexOf(Tt),Tt>=0&&(Tt+=Lt)}return Tt%100>=h||Tt>=400?0:Math.floor(Math.max(Tt,0))};function k(Tt,Lt,Mt,ee){var ve=Tt%100;return u.symbolFuncs[ve](Lt,Mt,ee)+(Tt>=200?p:"")}var w=I("~f"),B={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}};u.gradient=function(Tt,Lt,Mt,ee,ve,oe){var Ae=B[ee];return O(Tt,Lt,Mt,Ae.type,ve,oe,Ae.start,Ae.stop,!1,Ae.reversed)};function O(Tt,Lt,Mt,ee,ve,oe,Ae,He,Ge,cr){var ur=ve.length,jr;ee==="linear"?jr={node:"linearGradient",attrs:{x1:Ae.x,y1:Ae.y,x2:He.x,y2:He.y,gradientUnits:Ge?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:ee==="radial"&&(jr={node:"radialGradient",reversed:cr});for(var qr=new Array(ur),br=0;br=0&&Tt.i===void 0&&(Tt.i=oe.i),Lt.style("opacity",ee.selectedOpacityFn?ee.selectedOpacityFn(Tt):Tt.mo===void 0?Ae.opacity:Tt.mo),ee.ms2mrc){var Ge;Tt.ms==="various"||Ae.size==="various"?Ge=3:Ge=ee.ms2mrc(Tt.ms),Tt.mrc=Ge,ee.selectedSizeFn&&(Ge=Tt.mrc=ee.selectedSizeFn(Tt));var cr=u.symbolNumber(Tt.mx||Ae.symbol)||0;Tt.om=cr%200>=100;var ur=se(Tt,Mt),jr=ft(Tt,Mt);Lt.attr("d",k(cr,Ge,ur,jr))}var qr=!1,br,Xr,nn;if(Tt.so)nn=He.outlierwidth,Xr=He.outliercolor,br=Ae.outliercolor;else{var Le=(He||{}).width;nn=(Tt.mlw+1||Le+1||(Tt.trace?(Tt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Tt?Xr=Tt.mlcc=ee.lineScale(Tt.mlc):g.isArrayOrTypedArray(He.color)?Xr=r.defaultLine:Xr=He.color,g.isArrayOrTypedArray(Ae.color)&&(br=r.defaultLine,qr=!0),"mc"in Tt?br=Tt.mcc=ee.markerScale(Tt.mc):br=Ae.color||Ae.colors||"rgba(0,0,0,0)",ee.selectedColorFn&&(br=ee.selectedColorFn(Tt))}if(Tt.om)Lt.call(r.stroke,br).style({"stroke-width":(nn||1)+"px",fill:"none"});else{Lt.style("stroke-width",(Tt.isBlank?0:nn)+"px");var Gt=Ae.gradient,ne=Tt.mgt;ne?qr=!0:ne=Gt&&Gt.type,g.isArrayOrTypedArray(ne)&&(ne=ne[0],B[ne]||(ne=0));var Ct=Ae.pattern,gt=u.getPatternAttr,St=Ct&&(gt(Ct.shape,Tt.i,"")||gt(Ct.path,Tt.i,""));if(ne&&ne!=="none"){var Nt=Tt.mgc;Nt?qr=!0:Nt=Gt.color;var re=Mt.uid;qr&&(re+="-"+Tt.i),u.gradient(Lt,ve,re,ne,[[0,Nt],[1,br]],"fill")}else if(St){var le=!1,ke=Ct.fgcolor;!ke&&oe&&oe.color&&(ke=oe.color,le=!0);var Ue=gt(ke,Tt.i,oe&&oe.color||null),qe=gt(Ct.bgcolor,Tt.i,null),or=Ct.fgopacity,Sr=gt(Ct.size,Tt.i,8),Mr=gt(Ct.solidity,Tt.i,.3);le=le||Tt.mcc||g.isArrayOrTypedArray(Ct.shape)||g.isArrayOrTypedArray(Ct.path)||g.isArrayOrTypedArray(Ct.bgcolor)||g.isArrayOrTypedArray(Ct.fgcolor)||g.isArrayOrTypedArray(Ct.size)||g.isArrayOrTypedArray(Ct.solidity);var mr=Mt.uid;le&&(mr+="-"+Tt.i),u.pattern(Lt,"point",ve,mr,St,Sr,Mr,Tt.mcc,Ct.fillmode,qe,Ue,or)}else g.isArrayOrTypedArray(br)?r.fill(Lt,br[Tt.i]):r.fill(Lt,br);nn&&r.stroke(Lt,Xr)}},u.makePointStyleFns=function(Tt){var Lt={},Mt=Tt.marker;return Lt.markerScale=u.tryColorscale(Mt,""),Lt.lineScale=u.tryColorscale(Mt,"line"),e.traceIs(Tt,"symbols")&&(Lt.ms2mrc=y.isBubble(Tt)?v(Tt):function(){return(Mt.size||6)/2}),Tt.selectedpoints&&g.extendFlat(Lt,u.makeSelectedPointStyleFns(Tt)),Lt},u.makeSelectedPointStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.marker||{},oe=Mt.marker||{},Ae=ee.marker||{},He=ve.opacity,Ge=oe.opacity,cr=Ae.opacity,ur=Ge!==void 0,jr=cr!==void 0;(g.isArrayOrTypedArray(He)||ur||jr)&&(Lt.selectedOpacityFn=function(gt){var St=gt.mo===void 0?ve.opacity:gt.mo;return gt.selected?ur?Ge:St:jr?cr:x*St});var qr=ve.color,br=oe.color,Xr=Ae.color;(br||Xr)&&(Lt.selectedColorFn=function(gt){var St=gt.mcc||qr;return gt.selected?br||St:Xr||St});var nn=ve.size,Le=oe.size,Gt=Ae.size,ne=Le!==void 0,Ct=Gt!==void 0;return e.traceIs(Tt,"symbols")&&(ne||Ct)&&(Lt.selectedSizeFn=function(gt){var St=gt.mrc||nn/2;return gt.selected?ne?Le/2:St:Ct?Gt/2:St}),Lt},u.makeSelectedTextStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.textfont||{},oe=Mt.textfont||{},Ae=ee.textfont||{},He=ve.color,Ge=oe.color,cr=Ae.color;return Lt.selectedTextColorFn=function(ur){var jr=ur.tc||He;return ur.selected?Ge||jr:cr||(Ge?jr:r.addOpacity(jr,x))},Lt},u.selectedPointStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedPointStyleFns(Lt),ee=Lt.marker||{},ve=[];Mt.selectedOpacityFn&&ve.push(function(oe,Ae){oe.style("opacity",Mt.selectedOpacityFn(Ae))}),Mt.selectedColorFn&&ve.push(function(oe,Ae){r.fill(oe,Mt.selectedColorFn(Ae))}),Mt.selectedSizeFn&&ve.push(function(oe,Ae){var He=Ae.mx||ee.symbol||0,Ge=Mt.selectedSizeFn(Ae);oe.attr("d",k(u.symbolNumber(He),Ge,se(Ae,Lt),ft(Ae,Lt))),Ae.mrc2=Ge}),ve.length&&Tt.each(function(oe){for(var Ae=c.select(this),He=0;He0?Mt:0}u.textPointStyle=function(Tt,Lt,Mt){if(Tt.size()){var ee;if(Lt.selectedpoints){var ve=u.makeSelectedTextStyleFns(Lt);ee=ve.selectedTextColorFn}var oe=Lt.texttemplate,Ae=Mt._fullLayout;Tt.each(function(He){var Ge=c.select(this),cr=oe?g.extractOption(He,Lt,"txt","texttemplate"):g.extractOption(He,Lt,"tx","text");if(!cr&&cr!==0){Ge.remove();return}if(oe){var ur=Lt._module.formatLabels,jr=ur?ur(He,Lt,Ae):{},qr={};T(qr,Lt,He.i),cr=g.texttemplateString({data:[qr,He,Lt._meta],fallback:Lt.texttemplatefallback,labels:jr,locale:Ae._d3locale,template:cr})}var br=He.tp||Lt.textposition,Xr=H(He,Lt),nn=ee?ee(He):He.tc||Lt.textfont.color;Ge.call(u.font,{family:He.tf||Lt.textfont.family,weight:He.tw||Lt.textfont.weight,style:He.ty||Lt.textfont.style,variant:He.tv||Lt.textfont.variant,textcase:He.tC||Lt.textfont.textcase,lineposition:He.tE||Lt.textfont.lineposition,shadow:He.tS||Lt.textfont.shadow,size:Xr,color:nn}).text(cr).call(o.convertToTspans,Mt).call(V,br,Xr,He.mrc)})}},u.selectedTextStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedTextStyleFns(Lt);Tt.each(function(ee){var ve=c.select(this),oe=Mt.selectedTextColorFn(ee),Ae=ee.tp||Lt.textposition,He=H(ee,Lt);r.fill(ve,oe);var Ge=e.traceIs(Lt,"bar-like");V(ve,Ae,He,ee.mrc2||ee.mrc,Ge)})}};var F=.5;u.smoothopen=function(Tt,Lt){if(Tt.length<3)return"M"+Tt.join("L");var Mt="M"+Tt[0],ee=[],ve;for(ve=1;ve=Ge||gt>=ur&><=Ge)&&(St<=jr&&St>=cr||St>=jr&&St<=cr)&&(Tt=[gt,St])}return Tt}u.applyBackoff=tt,u.makeTester=function(){var Tt=g.ensureSingleById(c.select("body"),"svg","js-plotly-tester",function(Mt){Mt.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Lt=g.ensureSingle(Tt,"path","js-reference-point",function(Mt){Mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=Tt,u.testref=Lt},u.savedBBoxes={};var pt=0,rt=1e4;u.bBox=function(Tt,Lt,Mt){Mt||(Mt=at(Tt));var ee;if(Mt){if(ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}else if(Tt.childNodes.length===1){var ve=Tt.childNodes[0];if(Mt=at(ve),Mt){var oe=+ve.getAttribute("x")||0,Ae=+ve.getAttribute("y")||0,He=ve.getAttribute("transform");if(!He){var Ge=u.bBox(ve,!1,Mt);return oe&&(Ge.left+=oe,Ge.right+=oe),Ae&&(Ge.top+=Ae,Ge.bottom+=Ae),Ge}if(Mt+="~"+oe+"~"+Ae+"~"+He,ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}}var cr,ur;Lt?cr=Tt:(ur=u.tester.node(),cr=Tt.cloneNode(!0),ur.appendChild(cr)),c.select(cr).attr("transform",null).call(o.positionText,0,0);var jr=cr.getBoundingClientRect(),qr=u.testref.node().getBoundingClientRect();Lt||ur.removeChild(cr);var br={height:jr.height,width:jr.width,left:jr.left-qr.left,top:jr.top-qr.top,right:jr.right-qr.left,bottom:jr.bottom-qr.top};return pt>=rt&&(u.savedBBoxes={},pt=0),Mt&&(u.savedBBoxes[Mt]=br),pt++,g.extendFlat({},br)};function at(Tt){var Lt=Tt.getAttribute("data-unformatted");if(Lt!==null)return Lt+Tt.getAttribute("data-math")+Tt.getAttribute("text-anchor")+Tt.getAttribute("style")}u.setClipUrl=function(Tt,Lt,Mt){Tt.attr("clip-path",vt(Lt,Mt))};function vt(Tt,Lt){if(!Tt)return null;var Mt=Lt._context,ee=Mt._exportedPlot?"":Mt._baseUrl||"";return ee?"url('"+ee+"#"+Tt+"')":"url(#"+Tt+")"}u.getTranslate=function(Tt){var Lt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Ae,He){return[Ae,He].join(" ")}).split(" ");return{x:+ve[0]||0,y:+ve[1]||0}},u.setTranslate=function(Tt,Lt,Mt){var ee=/(\btranslate\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Ae=Tt[ve]("transform")||"";return Lt=Lt||0,Mt=Mt||0,Ae=Ae.replace(ee,"").trim(),Ae+=n(Lt,Mt),Ae=Ae.trim(),Tt[oe]("transform",Ae),Ae},u.getScale=function(Tt){var Lt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Ae,He){return[Ae,He].join(" ")}).split(" ");return{x:+ve[0]||1,y:+ve[1]||1}},u.setScale=function(Tt,Lt,Mt){var ee=/(\bscale\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Ae=Tt[ve]("transform")||"";return Lt=Lt||1,Mt=Mt||1,Ae=Ae.replace(ee,"").trim(),Ae+="scale("+Lt+","+Mt+")",Ae=Ae.trim(),Tt[oe]("transform",Ae),Ae};var it=/\s*sc.*/;u.setPointGroupScale=function(Tt,Lt,Mt){if(Lt=Lt||1,Mt=Mt||1,!!Tt){var ee=Lt===1&&Mt===1?"":"scale("+Lt+","+Mt+")";Tt.each(function(){var ve=(this.getAttribute("transform")||"").replace(it,"");ve+=ee,ve=ve.trim(),this.setAttribute("transform",ve)})}};var K=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(Tt,Lt,Mt){Tt&&Tt.each(function(){var ee,ve=c.select(this),oe=ve.select("text");if(oe.node()){var Ae=parseFloat(oe.attr("x")||0),He=parseFloat(oe.attr("y")||0),Ge=(ve.attr("transform")||"").match(K);Lt===1&&Mt===1?ee=[]:ee=[n(Ae,He),"scale("+Lt+","+Mt+")",n(-Ae,-He)],Ge&&ee.push(Ge),ve.attr("transform",ee.join(""))}})};function ft(Tt,Lt){var Mt;return Tt&&(Mt=Tt.mf),Mt===void 0&&(Mt=Lt.marker&&Lt.marker.standoff||0),!Lt._geo&&!Lt._xA?-Mt:Mt}u.getMarkerStandoff=ft;var ut=Math.atan2,kt=Math.cos,It=Math.sin;function Pt(Tt,Lt){var Mt=Lt[0],ee=Lt[1];return[Mt*kt(Tt)-ee*It(Tt),Mt*It(Tt)+ee*kt(Tt)]}var qt,Wt,Jt,ge,fe,pe;function se(Tt,Lt){var Mt=Tt.ma;Mt===void 0&&(Mt=Lt.marker.angle,(!Mt||g.isArrayOrTypedArray(Mt))&&(Mt=0));var ee,ve,oe=Lt.marker.angleref;if(oe==="previous"||oe==="north"){if(Lt._geo){var Ae=Lt._geo.project(Tt.lonlat);ee=Ae[0],ve=Ae[1]}else{var He=Lt._xA,Ge=Lt._yA;if(He&&Ge)ee=He.c2p(Tt.x),ve=Ge.c2p(Tt.y);else return 90}if(Lt._geo){var cr=Tt.lonlat[0],ur=Tt.lonlat[1],jr=Lt._geo.project([cr,ur+1e-5]),qr=Lt._geo.project([cr+1e-5,ur]),br=ut(qr[1]-ve,qr[0]-ee),Xr=ut(jr[1]-ve,jr[0]-ee),nn;if(oe==="north")nn=Mt/180*Math.PI;else if(oe==="previous"){var Le=cr/180*Math.PI,Gt=ur/180*Math.PI,ne=qt/180*Math.PI,Ct=Wt/180*Math.PI,gt=ne-Le,St=kt(Ct)*It(gt),Nt=It(Ct)*kt(Gt)-kt(Ct)*It(Gt)*kt(gt);nn=-ut(St,Nt)-Math.PI,qt=cr,Wt=ur}var re=Pt(br,[kt(nn),0]),le=Pt(Xr,[It(nn),0]);Mt=ut(re[1]+le[1],re[0]+le[0])/Math.PI*180,oe==="previous"&&!(pe===Lt.uid&&Tt.i===fe+1)&&(Mt=null)}if(oe==="previous"&&!Lt._geo)if(pe===Lt.uid&&Tt.i===fe+1&&S(ee)&&S(ve)){var ke=ee-Jt,Ue=ve-ge,qe=Lt.line&&Lt.line.shape||"",or=qe.slice(qe.length-1);or==="h"&&(Ue=0),or==="v"&&(ke=0),Mt+=ut(Ue,ke)/Math.PI*180+90}else Mt=null}return Jt=ee,ge=ve,fe=Tt.i,pe=Lt.uid,Mt}u.getMarkerAngle=se}),up=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=Kc(),S=Qo(),t=kn(),e=t.strTranslate,r=Vs(),a=pi(),n=ec(),o=go(),i=Af().OPPOSITE_SIDE,l=/ [XY][0-9]* /,f=1.6,x=1.6;function y(v,T,u){var b=v._fullLayout,_=u.propContainer,P=u.propName,M=u.placeholder,C=u.traceIndex,A=u.avoid||{},h=u.attributes,p=u.transform,k=u.containerGroup,w=1,B=_.title,O=(B&&B.text?B.text:"").trim(),j=!1,V=B&&B.font?B.font:{},H=V.family,F=V.size,U=V.color,W=V.weight,q=V.style,J=V.variant,lt=V.textcase,yt=V.lineposition,mt=V.shadow,st=u.subtitlePropName,tt=!!st,pt=u.subtitlePlaceholder,rt=(_.title||{}).subtitle||{text:"",font:{}},at=(rt.text||"").trim(),vt=!1,it=1,K=rt.font,ft=K.family,ut=K.size,kt=K.color,It=K.weight,Pt=K.style,qt=K.variant,Wt=K.textcase,Jt=K.lineposition,ge=K.shadow,fe;P==="title.text"?fe="titleText":P.indexOf("axis")!==-1?fe="axisTitleText":P.indexOf("colorbar")!==-1&&(fe="colorbarTitleText");var pe=v._context.edits[fe];function se(qr,br){return qr===void 0||br===void 0?!1:qr.replace(l," % ")===br.replace(l," % ")}O===""?w=0:se(O,M)&&(pe||(O=""),w=.2,j=!0),tt&&(at===""?it=0:se(at,pt)&&(pe||(at=""),it=.2,vt=!0)),u._meta?O=t.templateString(O,u._meta):b._meta&&(O=t.templateString(O,b._meta));var Tt=O||at||pe,Lt;k||(k=t.ensureSingle(b._infolayer,"g","g-"+T),Lt=b._hColorbarMoveTitle);var Mt=k.selectAll("text."+T).data(Tt?[0]:[]);Mt.enter().append("text"),Mt.text(O).attr("class",T),Mt.exit().remove();var ee=null,ve=T+"-subtitle",oe=at||pe;if(tt&&(ee=k.selectAll("text."+ve).data(oe?[0]:[]),ee.enter().append("text"),ee.text(at).attr("class",ve),ee.exit().remove()),!Tt)return k;function Ae(qr,br){t.syncOrAsync([He,Ge],{title:qr,subtitle:br})}function He(qr){var br=qr.title,Xr=qr.subtitle,nn;!p&&Lt&&(p={}),p?(nn="",p.rotate&&(nn+="rotate("+[p.rotate,h.x,h.y]+")"),(p.offset||Lt)&&(nn+=e(0,(p.offset||0)-(Lt||0)))):nn=null,br.attr("transform",nn);function Le(Nt){if(Nt){var re=c.select(Nt.node().parentNode).select("."+ve);if(!re.empty()){var le=Nt.node().getBBox();if(le.height){var ke=le.y+le.height+f*ut;re.attr("y",ke)}}}}if(br.style("opacity",w*a.opacity(U)).call(r.font,{color:a.rgb(U),size:c.round(F,2),family:H,weight:W,style:q,variant:J,textcase:lt,shadow:mt,lineposition:yt}).attr(h).call(n.convertToTspans,v,Le),Xr&&!Xr.empty()){var Gt=k.select("."+T+"-math-group"),ne=br.node().getBBox(),Ct=Gt.node()?Gt.node().getBBox():void 0,gt=Ct?Ct.y+Ct.height+f*ut:ne.y+ne.height+x*ut,St=t.extendFlat({},h,{y:gt});Xr.attr("transform",nn),Xr.style("opacity",it*a.opacity(kt)).call(r.font,{color:a.rgb(kt),size:c.round(ut,2),family:ft,weight:It,style:Pt,variant:qt,textcase:Wt,shadow:ge,lineposition:Jt}).attr(St).call(n.convertToTspans,v)}return I.previousPromises(v)}function Ge(qr){var br=qr.title,Xr=c.select(br.node().parentNode);if(A&&A.selection&&A.side&&O){Xr.attr("transform",null);var nn=i[A.side],Le=A.side==="left"||A.side==="top"?-1:1,Gt=g(A.pad)?A.pad:2,ne=r.bBox(Xr.node()),Ct={t:0,b:0,l:0,r:0},gt=v._fullLayout._reservedMargin;for(var St in gt)for(var Nt in gt[St]){var re=gt[St][Nt];Ct[Nt]=Math.max(Ct[Nt],re)}var le={left:Ct.l,top:Ct.t,right:b.width-Ct.r,bottom:b.height-Ct.b},ke=A.maxShift||Le*(le[A.side]-ne[A.side]),Ue=0;if(ke<0)Ue=ke;else{var qe=A.offsetLeft||0,or=A.offsetTop||0;ne.left-=qe,ne.right-=qe,ne.top-=or,ne.bottom-=or,A.selection.each(function(){var Mr=r.bBox(this);t.bBoxIntersect(ne,Mr,Gt)&&(Ue=Math.max(Ue,Le*(Mr[A.side]-ne[nn])+Gt))}),Ue=Math.min(ke,Ue),_._titleScoot=Math.abs(Ue)}if(Ue>0||ke<0){var Sr={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[A.side];Xr.attr("transform",e(Sr[0],Sr[1]))}}}Mt.call(Ae,ee);function cr(qr,br){qr.text(br).on("mouseover.opacity",function(){c.select(this).transition().duration(o.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){c.select(this).transition().duration(o.HIDE_PLACEHOLDER).style("opacity",0)})}if(pe&&(O?Mt.on(".opacity",null):(cr(Mt,M),j=!0),Mt.call(n.makeEditable,{gd:v}).on("edit",function(qr){C!==void 0?S.call("_guiRestyle",v,P,qr,C):S.call("_guiRelayout",v,P,qr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ae)}).on("input",function(qr){this.text(qr||" ").call(n.positionText,h.x,h.y)}),tt)){if(tt&&!O){var ur=Mt.node().getBBox(),jr=ur.y+ur.height+x*ut;ee.attr("y",jr)}at?ee.on(".opacity",null):(cr(ee,pt),vt=!0),ee.call(n.makeEditable,{gd:v}).on("edit",function(qr){S.call("_guiRelayout",v,"title.subtitle.text",qr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ae)}).on("input",function(qr){this.text(qr||" ").call(n.positionText,ee.attr("x"),ee.attr("y"))})}return Mt.classed("js-placeholder",j),ee&&!ee.empty()&&ee.classed("js-placeholder",vt),k}Z.exports={draw:y,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:f}}),i0=Dt((Q,Z)=>{var c=Wr(),g=Ri().utcFormat,I=kn(),S=I.numberFormat,t=Hn(),e=I.cleanNumber,r=I.ms2DateTime,a=I.dateTime2ms,n=I.ensureNumber,o=I.isArrayOrTypedArray,i=sa(),l=i.FP_SAFE,f=i.BADNUM,x=i.LOG_CLIP,y=i.ONEWEEK,v=i.ONEDAY,T=i.ONEHOUR,u=i.ONEMIN,b=i.ONESEC,_=Bc(),P=ic(),M=P.HOUR_PATTERN,C=P.WEEKDAY_PATTERN;function A(p){return Math.pow(10,p)}function h(p){return p!=null}Z.exports=function(p,k){k=k||{};var w=p._id||"x",B=w.charAt(0);function O(rt,at){if(rt>0)return Math.log(rt)/Math.LN10;if(rt<=0&&at&&p.range&&p.range.length===2){var vt=p.range[0],it=p.range[1];return .5*(vt+it-2*x*Math.abs(vt-it))}else return f}function j(rt,at,vt,it){if((it||{}).msUTC&&t(rt))return+rt;var K=a(rt,vt||p.calendar);if(K===f)if(t(rt)){rt=+rt;var ft=Math.floor(I.mod(rt+.05,1)*10),ut=Math.round(rt-ft/10);K=a(new Date(ut))+ft/10}else return f;return K}function V(rt,at,vt){return r(rt,at,vt||p.calendar)}function H(rt){return p._categories[Math.round(rt)]}function F(rt){if(h(rt)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[rt]!==void 0)return p._categoriesMap[rt];p._categories.push(typeof rt=="number"?String(rt):rt);var at=p._categories.length-1;return p._categoriesMap[rt]=at,at}return f}function U(rt,at){for(var vt=new Array(at),it=0;itp.range[1]&&(vt=!vt);for(var it=vt?-1:1,K=it*rt,ft=0,ut=0;utIt)ft=ut+1;else{ft=K<(kt+It)/2?ut:ut+1;break}}var Pt=p._B[ft]||0;return isFinite(Pt)?lt(rt,p._m2,Pt):0},st=function(rt){var at=p._rangebreaks.length;if(!at)return yt(rt,p._m,p._b);for(var vt=0,it=0;itp._rangebreaks[it].pmax&&(vt=it+1);return yt(rt,p._m2,p._B[vt])}}p.c2l=p.type==="log"?O:n,p.l2c=p.type==="log"?A:n,p.l2p=mt,p.p2l=st,p.c2p=p.type==="log"?function(rt,at){return mt(O(rt,at))}:mt,p.p2c=p.type==="log"?function(rt){return A(st(rt))}:st,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=e,p.c2d=p.c2r=p.l2d=p.l2r=n,p.d2p=p.r2p=function(rt){return p.l2p(e(rt))},p.p2d=p.p2r=st,p.cleanPos=n):p.type==="log"?(p.d2r=p.d2l=function(rt,at){return O(e(rt),at)},p.r2d=p.r2c=function(rt){return A(e(rt))},p.d2c=p.r2l=e,p.c2d=p.l2r=n,p.c2r=O,p.l2d=A,p.d2p=function(rt,at){return p.l2p(p.d2r(rt,at))},p.p2d=function(rt){return A(st(rt))},p.r2p=function(rt){return p.l2p(e(rt))},p.p2r=st,p.cleanPos=n):p.type==="date"?(p.d2r=p.r2d=I.identity,p.d2c=p.r2c=p.d2l=p.r2l=j,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(rt,at,vt){return p.l2p(j(rt,0,vt))},p.p2d=p.p2r=function(rt,at,vt){return V(st(rt),at,vt)},p.cleanPos=function(rt){return I.cleanDate(rt,f,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=F,p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=J(rt);return at!==void 0?at:p.fraction2r(.5)},p.l2r=p.c2r=n,p.r2l=J,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return typeof rt=="string"&&rt!==""?rt:n(rt)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=q(rt);return at!==void 0?at:p.fraction2r(.5)},p.r2c_just_indices=W,p.l2r=p.c2r=n,p.r2l=q,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return Array.isArray(rt)||typeof rt=="string"&&rt!==""?rt:n(rt)},p.setupMultiCategory=function(rt){var at=p._traceIndices,vt,it,K=p._matchGroup;if(K&&p._categories.length===0){for(var ft in K)if(ft!==w){var ut=k[_.id2name(ft)];at=at.concat(ut._traceIndices)}}var kt=[[0,{}],[0,{}]],It=[];for(vt=0;vtut[1]&&(it[ft?0:1]=vt),it[0]===it[1]){var kt=p.l2r(at),It=p.l2r(vt);if(at!==void 0){var Pt=kt+1;vt!==void 0&&(Pt=Math.min(Pt,It)),it[ft?1:0]=Pt}if(vt!==void 0){var qt=It+1;at!==void 0&&(qt=Math.max(qt,kt)),it[ft?0:1]=qt}}}},p.cleanRange=function(rt,at){p._cleanRange(rt,at),p.limitRange(rt)},p._cleanRange=function(rt,at){at||(at={}),rt||(rt="range");var vt=I.nestedProperty(p,rt).get(),it,K;if(p.type==="date"?K=I.dfltRange(p.calendar):B==="y"?K=P.DFLTRANGEY:p._name==="realaxis"?K=[0,1]:K=at.dfltRange||P.DFLTRANGEX,K=K.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(K[0]=0),!vt||vt.length!==2){I.nestedProperty(p,rt).set(K);return}var ft=vt[0]===null,ut=vt[1]===null;for(p.type==="date"&&!p.autorange&&(vt[0]=I.cleanDate(vt[0],f,p.calendar),vt[1]=I.cleanDate(vt[1],f,p.calendar)),it=0;it<2;it++)if(p.type==="date"){if(!I.isDateTime(vt[it],p.calendar)){p[rt]=K;break}if(p.r2l(vt[0])===p.r2l(vt[1])){var kt=I.constrain(p.r2l(vt[0]),I.MIN_MS+1e3,I.MAX_MS-1e3);vt[0]=p.l2r(kt-1e3),vt[1]=p.l2r(kt+1e3);break}}else{if(!t(vt[it]))if(!(ft||ut)&&t(vt[1-it]))vt[it]=vt[1-it]*(it?10:.1);else{p[rt]=K;break}if(vt[it]<-l?vt[it]=-l:vt[it]>l&&(vt[it]=l),vt[0]===vt[1]){var It=Math.max(1,Math.abs(vt[0]*1e-6));vt[0]-=It,vt[1]+=It}}},p.setScale=function(rt){var at=k._size;if(p.overlaying){var vt=_.getFromId({_fullLayout:k},p.overlaying);p.domain=vt.domain}var it=rt&&p._r?"_r":"range",K=p.calendar;p.cleanRange(it);var ft=p.r2l(p[it][0],K),ut=p.r2l(p[it][1],K),kt=B==="y";if(kt?(p._offset=at.t+(1-p.domain[1])*at.h,p._length=at.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ft-ut),p._b=-p._m*ut):(p._offset=at.l+p.domain[0]*at.w,p._length=at.w*(p.domain[1]-p.domain[0]),p._m=p._length/(ut-ft),p._b=-p._m*ft),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var It,Pt;if(p._rangebreaks=p.locateBreaks(Math.min(ft,ut),Math.max(ft,ut)),p._rangebreaks.length){for(It=0;Itut&&(qt=!qt),qt&&p._rangebreaks.reverse();var Wt=qt?-1:1;for(p._m2=Wt*p._length/(Math.abs(ut-ft)-p._lBreaks),p._B.push(-p._m2*(kt?ut:ft)),It=0;ItK&&(K+=7,ftK&&(K+=24,ft=it&&ft=it&&rt=oe.min&&(Ltoe.max&&(oe.max=Mt),ee=!1)}ee&&ut.push({min:Lt,max:Mt})}};for(vt=0;vt{var c=Hn(),g=kn(),I=sa().BADNUM,S=g.isArrayOrTypedArray,t=g.isDateTime,e=g.cleanNumber,r=Math.round;Z.exports=function(x,y,v){var T=x,u=v.noMultiCategory;if(S(T)&&!T.length)return"-";if(!u&&f(T))return"multicategory";if(u&&Array.isArray(T[0])){for(var b=[],_=0;_b*2}function i(x){return Math.max(1,(x-1)/1e3)}function l(x,y){for(var v=x.length,T=i(v),u=0,b=0,_={},P=0;Pu*2}function f(x){return S(x[0])&&S(x[1])}}),K0=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=kn(),S=sa().FP_SAFE,t=Qo(),e=Vs(),r=Bc(),a=r.getFromId,n=r.isLinked;Z.exports={applyAutorangeOptions:k,getAutoRange:o,makePadFn:l,doAutoRange:v,findExtremes:T,concatExtremes:y};function o(w,B){var O,j,V=[],H=w._fullLayout,F=l(H,B,0),U=l(H,B,1),W=y(w,B),q=W.min,J=W.max;if(q.length===0||J.length===0)return I.simpleMap(B.range,B.r2l);var lt=q[0].val,yt=J[0].val;for(O=1;O0&&(Pt=vt-F(ft)-U(ut),Pt>it?qt/Pt>K&&(kt=ft,It=ut,K=qt/Pt):qt/vt>K&&(kt={val:ft.val,nopad:1},It={val:ut.val,nopad:1},K=qt/vt));function Wt(se,Tt){return Math.max(se,U(Tt))}if(lt===yt){var Jt=lt-1,ge=lt+1;if(rt)if(lt===0)V=[0,1];else{var fe=(lt>0?J:q).reduce(Wt,0),pe=lt/(1-Math.min(.5,fe/vt));V=lt>0?[0,pe]:[pe,0]}else at?V=[Math.max(0,Jt),Math.max(1,ge)]:V=[Jt,ge]}else rt?(kt.val>=0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:0,nopad:1})):at&&(kt.val-K*F(kt)<0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:1,nopad:1})),K=(It.val-kt.val-i(B,ft.val,ut.val))/(vt-F(kt)-U(It)),V=[kt.val-K*F(kt),It.val+K*U(It)];return V=k(V,B),B.limitRange&&B.limitRange(),st&&V.reverse(),I.simpleMap(V,B.l2r||Number)}function i(w,B,O){var j=0;if(w.rangebreaks)for(var V=w.locateBreaks(B,O),H=0;H0?O.ppadplus:O.ppadminus)||O.ppad||0),ft=it((w._m>0?O.ppadminus:O.ppadplus)||O.ppad||0),ut=it(O.vpadplus||O.vpad),kt=it(O.vpadminus||O.vpad);if(!q){if(at=1/0,vt=-1/0,W)for(lt=0;lt0&&(at=yt),yt>vt&&yt-S&&(at=yt),yt>vt&&yt=qt;lt--)Pt(lt);return{min:j,max:V,opts:O}}function u(w,B,O,j){_(w,B,O,j,M)}function b(w,B,O,j){_(w,B,O,j,C)}function _(w,B,O,j,V){for(var H=j.tozero,F=j.extrapad,U=!0,W=0;W=O&&(q.extrapad||!F)){U=!1;break}else V(B,q.val)&&q.pad<=O&&(F||!q.extrapad)&&(w.splice(W,1),W--)}if(U){var J=H&&B===0;w.push({val:B,pad:J?0:O,extrapad:J?!1:F})}}function P(w){return g(w)&&Math.abs(w)=B}function A(w,B){var O=B.autorangeoptions;return O&&O.minallowed!==void 0&&p(B,O.minallowed,O.maxallowed)?O.minallowed:O&&O.clipmin!==void 0&&p(B,O.clipmin,O.clipmax)?Math.max(w,B.d2l(O.clipmin)):w}function h(w,B){var O=B.autorangeoptions;return O&&O.maxallowed!==void 0&&p(B,O.minallowed,O.maxallowed)?O.maxallowed:O&&O.clipmax!==void 0&&p(B,O.clipmin,O.clipmax)?Math.min(w,B.d2l(O.clipmax)):w}function p(w,B,O){return B!==void 0&&O!==void 0?(B=w.d2l(B),O=w.d2l(O),B=W&&(H=W,O=W),F<=W&&(F=W,j=W)}}return O=A(O,B),j=h(j,B),[O,j]}}),Ls=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=Kc(),S=Qo(),t=kn(),e=t.strTranslate,r=ec(),a=up(),n=pi(),o=Vs(),i=Td(),l=jh(),f=sa(),x=f.ONEMAXYEAR,y=f.ONEAVGYEAR,v=f.ONEMINYEAR,T=f.ONEMAXQUARTER,u=f.ONEAVGQUARTER,b=f.ONEMINQUARTER,_=f.ONEMAXMONTH,P=f.ONEAVGMONTH,M=f.ONEMINMONTH,C=f.ONEWEEK,A=f.ONEDAY,h=A/2,p=f.ONEHOUR,k=f.ONEMIN,w=f.ONESEC,B=f.ONEMILLI,O=f.ONEMICROSEC,j=f.MINUS_SIGN,V=f.BADNUM,H={K:"zeroline"},F={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},W={K:"tick",L:"path"},q={K:"tick",L:"text"},J={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},lt=Af(),yt=lt.MID_SHIFT,mt=lt.CAP_SHIFT,st=lt.LINE_SPACING,tt=lt.OPPOSITE_SIDE,pt=3,rt=Z.exports={};rt.setConvert=i0();var at=mv(),vt=Bc(),it=vt.idSort,K=vt.isLinked;rt.id2name=vt.id2name,rt.name2id=vt.name2id,rt.cleanId=vt.cleanId,rt.list=vt.list,rt.listIds=vt.listIds,rt.getFromId=vt.getFromId,rt.getFromTrace=vt.getFromTrace;var ft=K0();rt.getAutoRange=ft.getAutoRange,rt.findExtremes=ft.findExtremes;var ut=1e-4;function kt(Oe){var ze=(Oe[1]-Oe[0])*ut;return[Oe[0]-ze,Oe[1]+ze]}rt.coerceRef=function(Oe,ze,Br,$r,Gr,Rr){var Yr=$r.charAt($r.length-1),mn=Br._fullLayout._subplots[Yr+"axis"],on=$r+"ref",Ce={};return Gr||(Gr=mn[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=Gr),mn=mn.concat(mn.map(function(pr){return pr+" domain"})),Ce[on]={valType:"enumerated",values:mn.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:Gr},t.coerce(Oe,ze,Ce,on)},rt.getRefType=function(Oe){return Oe===void 0?Oe:Oe==="paper"?"paper":Oe==="pixel"?"pixel":/( domain)$/.test(Oe)?"domain":"range"},rt.coercePosition=function(Oe,ze,Br,$r,Gr,Rr){var Yr,mn,on=rt.getRefType($r);if(on!=="range")Yr=t.ensureNumber,mn=Br(Gr,Rr);else{var Ce=rt.getFromId(ze,$r);Rr=Ce.fraction2r(Rr),mn=Br(Gr,Rr),Yr=Ce.cleanPos}Oe[Gr]=Yr(mn)},rt.cleanPosition=function(Oe,ze,Br){var $r=Br==="paper"||Br==="pixel"?t.ensureNumber:rt.getFromId(ze,Br).cleanPos;return $r(Oe)},rt.redrawComponents=function(Oe,ze){ze=ze||rt.listIds(Oe);var Br=Oe._fullLayout;function $r(Gr,Rr,Yr,mn){for(var on=S.getComponentMethod(Gr,Rr),Ce={},pr=0;pr2e-6||((Br-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0))},rt.saveRangeInitial=function(Oe,ze){for(var Br=rt.list(Oe,"",!0),$r=!1,Gr=0;GrHr*.3||Ce($r)||Ce(Gr))){var _n=Br.dtick/2;Oe+=Oe+_n<$r?_n:-_n}return Oe}function Jt(Oe,ze,Br,$r,Gr){var Rr=t.findExactDates(ze,Gr),Yr=.8;if(Rr.exactDays>Yr){var mn=Number(Br.substr(1));Rr.exactYears>Yr&&mn%12===0?Oe=rt.tickIncrement(Oe,"M6","reverse")+A*1.5:Rr.exactMonths>Yr?Oe=rt.tickIncrement(Oe,"M1","reverse")+A*15.5:Oe-=h;var on=rt.tickIncrement(Oe,Br);if(on<=$r)return on}return Oe}rt.prepMinorTicks=function(Oe,ze,Br){if(!ze.minor.dtick){delete Oe.dtick;var $r=ze.dtick&&g(ze._tmin),Gr;if($r){var Rr=rt.tickIncrement(ze._tmin,ze.dtick,!0);Gr=[ze._tmin,Rr*.99+ze._tmin*.01]}else{var Yr=t.simpleMap(ze.range,ze.r2l);Gr=[Yr[0],.8*Yr[0]+.2*Yr[1]]}if(Oe.range=t.simpleMap(Gr,ze.l2r),Oe._isMinor=!0,rt.prepTicks(Oe,Br),$r){var mn=g(ze.dtick),on=g(Oe.dtick),Ce=mn?ze.dtick:+ze.dtick.substring(1),pr=on?Oe.dtick:+Oe.dtick.substring(1);mn&&on?ge(Ce,pr)?Ce===2*C&&pr===2*A&&(Oe.dtick=C):Ce===2*C&&pr===3*A?Oe.dtick=C:Ce===C&&!(ze._input.minor||{}).nticks?Oe.dtick=A:fe(Ce/pr,2.5)?Oe.dtick=Ce/2:Oe.dtick=Ce:String(ze.dtick).charAt(0)==="M"?on?Oe.dtick="M1":ge(Ce,pr)?Ce>=12&&pr===2&&(Oe.dtick="M3"):Oe.dtick=ze.dtick:String(Oe.dtick).charAt(0)==="L"?String(ze.dtick).charAt(0)==="L"?ge(Ce,pr)||(Oe.dtick=fe(Ce/pr,2.5)?ze.dtick/2:ze.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+ze.dtick>1&&(Oe.dtick=1)}Oe.range=ze.range}ze.minor._tick0Init===void 0&&(Oe.tick0=ze.tick0)};function ge(Oe,ze){return Math.abs((Oe/ze+.5)%1-.5)<.001}function fe(Oe,ze){return Math.abs(Oe/ze-1)<.001}rt.prepTicks=function(Oe,ze){var Br=t.simpleMap(Oe.range,Oe.r2l,void 0,void 0,ze);if(Oe.tickmode==="auto"||!Oe.dtick){var $r=Oe.nticks,Gr;$r||(Oe.type==="category"||Oe.type==="multicategory"?(Gr=Oe.tickfont?t.bigFont(Oe.tickfont.size||12):15,$r=Oe._length/Gr):(Gr=Oe._id.charAt(0)==="y"?40:80,$r=t.constrain(Oe._length/Gr,4,9)+1),Oe._name==="radialaxis"&&($r*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&($r*=100),Oe._roughDTick=Math.abs(Br[1]-Br[0])/$r,rt.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick0?(Rr=$r-1,Yr=$r):(Rr=$r,Yr=$r);var mn=Oe[Rr].value,on=Oe[Yr].value,Ce=Math.abs(on-mn),pr=Br||Ce,Hr=0;pr>=v?Ce>=v&&Ce<=x?Hr=Ce:Hr=y:Br===u&&pr>=b?Ce>=b&&Ce<=T?Hr=Ce:Hr=u:pr>=M?Ce>=M&&Ce<=_?Hr=Ce:Hr=P:Br===C&&pr>=C?Hr=C:pr>=A?Hr=A:Br===h&&pr>=h?Hr=h:Br===p&&pr>=p&&(Hr=p);var _n;Hr>=Ce&&(Hr=Ce,_n=!0);var Bn=Gr+Hr;if(ze.rangebreaks&&Hr>0){for(var ri=84,Pn=0,En=0;EnC&&(Hr=Ce)}(Hr>0||$r===0)&&(Oe[$r].periodX=Gr+Hr/2)}}rt.calcTicks=function(Oe,ze){for(var Br=Oe.type,$r=Oe.calendar,Gr=Oe.ticklabelstep,Rr=Oe.ticklabelmode==="period",Yr=Oe.range[0]>Oe.range[1],mn=!Oe.ticklabelindex||t.isArrayOrTypedArray(Oe.ticklabelindex)?Oe.ticklabelindex:[Oe.ticklabelindex],on=t.simpleMap(Oe.range,Oe.r2l,void 0,void 0,ze),Ce=on[1]=(La?0:1);qi--){var Qa=!qi;qi?(Oe._dtickInit=Oe.dtick,Oe._tick0Init=Oe.tick0):(Oe.minor._dtickInit=Oe.minor.dtick,Oe.minor._tick0Init=Oe.minor.tick0);var Ja=qi?Oe:t.extendFlat({},Oe,Oe.minor);if(Qa?rt.prepMinorTicks(Ja,Oe,ze):rt.prepTicks(Ja,ze),Ja.tickmode==="array"){qi?(Pn=[],Bn=ee(Oe,!Qa)):(En=[],ri=ee(Oe,!Qa));continue}if(Ja.tickmode==="sync"){Pn=[],Bn=Mt(Oe);continue}var Do=kt(on),yo=Do[0],Bo=Do[1],Da=g(Ja.dtick),ys=Br==="log"&&!(Da||Ja.dtick.charAt(0)==="L"),os=rt.tickFirst(Ja,ze);if(qi){if(Oe._tmin=os,os=Bo:Go<=Bo;Go=rt.tickIncrement(Go,cl,Ce,$r)){if(qi&&Ks++,Ja.rangebreaks&&!Ce){if(Go=Hr)break}if(Pn.length>_n||Go===ul)break;ul=Go;var Qs={value:Go};qi?(ys&&Go!==(Go|0)&&(Qs.simpleLabel=!0),Gr>1&&Ks%Gr&&(Qs.skipLabel=!0),Pn.push(Qs)):(Qs.minor=!0,En.push(Qs))}}if(!En||En.length<2)mn=!1;else{var jl=(En[1].value-En[0].value)*(Yr?-1:1);qa(jl,Oe.tickformat)||(mn=!1)}if(!mn)Yn=Pn;else{var cs=Pn.concat(En);Rr&&Pn.length&&(cs=cs.slice(1)),cs=cs.sort(function(hl,es){return hl.value-es.value}).filter(function(hl,es,Cu){return es===0||hl.value!==Cu[es-1].value});var Ps=cs.map(function(hl,es){return hl.minor===void 0&&!hl.skipLabel?es:null}).filter(function(hl){return hl!==null});Ps.forEach(function(hl){mn.map(function(es){var Cu=hl+es;Cu>=0&&Cu-1;qs--){if(Pn[qs].drop){Pn.splice(qs,1);continue}Pn[qs].value=Ni(Pn[qs].value,Oe);var al=Oe.c2p(Pn[qs].value);(Ql?Gl>al-Jo:GlHr||GuHr&&(Cu.periodX=Hr),GuGr&&_ny)ze/=y,$r=Gr(10),Oe.dtick="M"+12*jr(ze,$r,ve);else if(Rr>P)ze/=P,Oe.dtick="M"+jr(ze,1,oe);else if(Rr>A){if(Oe.dtick=jr(ze,A,Oe._hasDayOfWeekBreaks?[1,2,7,14]:He),!Br){var Yr=rt.getTickFormat(Oe),mn=Oe.ticklabelmode==="period";mn&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Yr)?Oe.tick0=t.dateTick0(Oe.calendar,2):Oe.tick0=t.dateTick0(Oe.calendar,1),mn&&(Oe._dowTick0=Oe.tick0)}}else Rr>p?Oe.dtick=jr(ze,p,oe):Rr>k?Oe.dtick=jr(ze,k,Ae):Rr>w?Oe.dtick=jr(ze,w,Ae):($r=Gr(10),Oe.dtick=jr(ze,$r,ve))}else if(Oe.type==="log"){Oe.tick0=0;var on=t.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(ze*=1.5),ze>.7)Oe.dtick=Math.ceil(ze);else if(Math.abs(on[1]-on[0])<1){var Ce=1.5*Math.abs((on[1]-on[0])/ze);ze=Math.abs(Math.pow(10,on[1])-Math.pow(10,on[0]))/Ce,$r=Gr(10),Oe.dtick="L"+jr(ze,$r,ve)}else Oe.dtick=ze>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(ze,1))):Mi(Oe)?(Oe.tick0=0,$r=1,Oe.dtick=jr(ze,$r,ur)):(Oe.tick0=0,$r=Gr(10),Oe.dtick=jr(ze,$r,ve));if(Oe.dtick===0&&(Oe.dtick=1),!g(Oe.dtick)&&typeof Oe.dtick!="string"){var pr=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(pr)}};function qr(Oe){var ze=Oe.dtick;if(Oe._tickexponent=0,!g(ze)&&typeof ze!="string"&&(ze=1),(Oe.type==="category"||Oe.type==="multicategory")&&(Oe._tickround=null),Oe.type==="date"){var Br=Oe.r2l(Oe.tick0),$r=Oe.l2r(Br).replace(/(^-|i)/g,""),Gr=$r.length;if(String(ze).charAt(0)==="M")Gr>10||$r.substr(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+ze.substr(1)%12===0?"y":"m";else if(ze>=A&&Gr<=10||ze>=A*15)Oe._tickround="d";else if(ze>=k&&Gr<=16||ze>=p)Oe._tickround="M";else if(ze>=w&&Gr<=19||ze>=k)Oe._tickround="S";else{var Rr=Oe.l2r(Br+ze).replace(/^-/,"").length;Oe._tickround=Math.max(Gr,Rr)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(g(ze)||ze.charAt(0)==="L"){var Yr=Oe.range.map(Oe.r2d||Number);g(ze)||(ze=Number(ze.substr(1))),Oe._tickround=2-Math.floor(Math.log(ze)/Math.LN10+.01);var mn=Math.max(Math.abs(Yr[0]),Math.abs(Yr[1])),on=Math.floor(Math.log(mn)/Math.LN10+.01),Ce=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(on)>Ce&&(re(Oe.exponentformat)&&Oe.exponentformat!=="SI extended"&&!le(on)||re(Oe.exponentformat)&&Oe.exponentformat==="SI extended"&&!ke(on)?Oe._tickexponent=3*Math.round((on-1)/3):Oe._tickexponent=on)}else Oe._tickround=null}rt.tickIncrement=function(Oe,ze,Br,$r){var Gr=Br?-1:1;if(g(ze))return t.increment(Oe,Gr*ze);var Rr=ze.charAt(0),Yr=Gr*Number(ze.substr(1));if(Rr==="M")return t.incrementMonth(Oe,Yr,$r);if(Rr==="L")return Math.log(Math.pow(10,Oe)+Yr)/Math.LN10;if(Rr==="D"){var mn=ze==="D2"?cr:Ge,on=Oe+Gr*.01,Ce=t.roundUp(t.mod(on,1),mn,Br);return Math.floor(on)+Math.log(c.round(Math.pow(10,Ce),1))/Math.LN10}throw"unrecognized dtick "+String(ze)},rt.tickFirst=function(Oe,ze){var Br=Oe.r2l||Number,$r=t.simpleMap(Oe.range,Br,void 0,void 0,ze),Gr=$r[1]<$r[0],Rr=Gr?Math.floor:Math.ceil,Yr=kt($r)[0],mn=Oe.dtick,on=Br(Oe.tick0);if(g(mn)){var Ce=Rr((Yr-on)/mn)*mn+on;return(Oe.type==="category"||Oe.type==="multicategory")&&(Ce=t.constrain(Ce,0,Oe._categories.length-1)),Ce}var pr=mn.charAt(0),Hr=Number(mn.substr(1));if(pr==="M"){for(var _n=0,Bn=on,ri,Pn,En;_n<10;){if(ri=rt.tickIncrement(Bn,mn,Gr,Oe.calendar),(ri-Yr)*(Bn-Yr)<=0)return Gr?Math.min(Bn,ri):Math.max(Bn,ri);Pn=(Yr-(Bn+ri)/2)/(ri-Bn),En=pr+(Math.abs(Math.round(Pn))||1)*Hr,Bn=rt.tickIncrement(Bn,En,Pn<0?!Gr:Gr,Oe.calendar),_n++}return t.error("tickFirst did not converge",Oe),Bn}else{if(pr==="L")return Math.log(Rr((Math.pow(10,Yr)-on)/Hr)*Hr+on)/Math.LN10;if(pr==="D"){var Yn=mn==="D2"?cr:Ge,La=t.roundUp(t.mod(Yr,1),Yn,Gr);return Math.floor(Yr)+Math.log(c.round(Math.pow(10,La),1))/Math.LN10}else throw"unrecognized dtick "+String(mn)}},rt.tickText=function(Oe,ze,Br,$r){var Gr=br(Oe,ze),Rr=Oe.tickmode==="array",Yr=Br||Rr,mn=Oe.type,on=mn==="category"?Oe.d2l_noadd:Oe.d2l,Ce,pr=function(En){var Yn=Oe.l2p(En);return Yn>=0&&Yn<=Oe._length?En:null};if(Rr&&t.isArrayOrTypedArray(Oe.ticktext)){var Hr=t.simpleMap(Oe.range,Oe.r2l),_n=(Math.abs(Hr[1]-Hr[0])-(Oe._lBreaks||0))/1e4;for(Ce=0;Ce"+mn;else{var Ce=Hi(Oe),pr=Oe._trueSide||Oe.side;(!Ce&&pr==="top"||Ce&&pr==="bottom")&&(Yr+="
")}ze.text=Yr}function nn(Oe,ze,Br,$r,Gr){var Rr=Oe.dtick,Yr=ze.x,mn=Oe.tickformat,on=typeof Rr=="string"&&Rr.charAt(0);if(Gr==="never"&&(Gr=""),$r&&on!=="L"&&(Rr="L3",on="L"),mn||on==="L")ze.text=qe(Math.pow(10,Yr),Oe,Gr,$r);else if(g(Rr)||on==="D"&&(Oe.minorloglabels==="complete"||t.mod(Yr+.01,1)<.1)){Oe.minorloglabels==="complete"&&!(t.mod(Yr+.01,1)<.1)&&(ze.fontSize*=.75);var Ce=Math.pow(10,Yr).toExponential(0),pr=Ce.split("e"),Hr=+pr[1],_n=Math.abs(Hr),Bn=Oe.exponentformat;Bn==="power"||re(Bn)&&Bn!=="SI extended"&&le(Hr)||re(Bn)&&Bn==="SI extended"&&ke(Hr)?(ze.text=pr[0],_n>0&&(ze.text+="x10"),ze.text==="1x10"&&(ze.text="10"),Hr!==0&&Hr!==1&&(ze.text+=""+(Hr>0?"":j)+_n+""),ze.fontSize*=1.25):(Bn==="e"||Bn==="E")&&_n>2?ze.text=pr[0]+Bn+(Hr>0?"+":j)+_n:(ze.text=qe(Math.pow(10,Yr),Oe,"","fakehover"),Rr==="D1"&&Oe._id.charAt(0)==="y"&&(ze.dy-=ze.fontSize/6))}else if(on==="D")ze.text=Oe.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(Yr,1)))),ze.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(Oe.dtick==="D1"){var ri=String(ze.text).charAt(0);(ri==="0"||ri==="1")&&(Oe._id.charAt(0)==="y"?ze.dx-=ze.fontSize/4:(ze.dy+=ze.fontSize/2,ze.dx+=(Oe.range[1]>Oe.range[0]?1:-1)*ze.fontSize*(Yr<0?.5:.25)))}}function Le(Oe,ze){var Br=Oe._categories[Math.round(ze.x)];Br===void 0&&(Br=""),ze.text=String(Br)}function Gt(Oe,ze,Br){var $r=Math.round(ze.x),Gr=Oe._categories[$r]||[],Rr=Gr[1]===void 0?"":String(Gr[1]),Yr=Gr[0]===void 0?"":String(Gr[0]);Br?ze.text=Yr+" - "+Rr:(ze.text=Rr,ze.text2=Yr)}function ne(Oe,ze,Br,$r,Gr){Gr==="never"?Gr="":Oe.showexponent==="all"&&Math.abs(ze.x/Oe.dtick)<1e-6&&(Gr="hide"),ze.text=qe(ze.x,Oe,Gr,$r)}function Ct(Oe,ze,Br,$r,Gr){if(Oe.thetaunit==="radians"&&!Br){var Rr=ze.x/180;if(Rr===0)ze.text="0";else{var Yr=gt(Rr);if(Yr[1]>=100)ze.text=qe(t.deg2rad(ze.x),Oe,Gr,$r);else{var mn=ze.x<0;Yr[1]===1?Yr[0]===1?ze.text="π":ze.text=Yr[0]+"π":ze.text=["",Yr[0],"","⁄","",Yr[1],"","π"].join(""),mn&&(ze.text=j+ze.text)}}}else ze.text=qe(ze.x,Oe,Gr,$r)}function gt(Oe){function ze(mn,on){return Math.abs(mn-on)<=1e-6}function Br(mn,on){return ze(on,0)?mn:Br(on,mn%on)}function $r(mn){for(var on=1;!ze(Math.round(mn*on)/on,mn);)on*=10;return on}var Gr=$r(Oe),Rr=Oe*Gr,Yr=Math.abs(Br(Rr,Gr));return[Math.round(Rr/Yr),Math.round(Gr/Yr)]}var St=["f","p","n","μ","m","","k","M","G","T"],Nt=["q","r","y","z","a",...St,"P","E","Z","Y","R","Q"],re=Oe=>["SI","SI extended","B"].includes(Oe);function le(Oe){return Oe>14||Oe<-15}function ke(Oe){return Oe>32||Oe<-30}function Ue(Oe,ze){return re(ze)?!!(ze==="SI extended"&&ke(Oe)||ze!=="SI extended"&&le(Oe)):!1}function qe(Oe,ze,Br,$r){var Gr=Oe<0,Rr=ze._tickround,Yr=Br||ze.exponentformat||"B",mn=ze._tickexponent,on=rt.getTickFormat(ze),Ce=ze.separatethousands;if($r){var pr={exponentformat:Yr,minexponent:ze.minexponent,dtick:ze.showexponent==="none"?ze.dtick:g(Oe)&&Math.abs(Oe)||1,range:ze.showexponent==="none"?ze.range.map(ze.r2d):[0,Oe||1]};qr(pr),Rr=(Number(pr._tickround)||0)+4,mn=pr._tickexponent,ze.hoverformat&&(on=ze.hoverformat)}if(on)return ze._numFormat(on)(Oe).replace(/-/g,j);var Hr=Math.pow(10,-Rr)/2;if(Yr==="none"&&(mn=0),Oe=Math.abs(Oe),Oe"+ri+"":Yr==="B"&&mn===9?Oe+="B":re(Yr)&&(Oe+=Yr==="SI extended"?Nt[mn/3+10]:St[mn/3+5])}return Gr?j+Oe:Oe}rt.getTickFormat=function(Oe){var ze;function Br(on){return typeof on!="string"?on:Number(on.replace("M",""))*P}function $r(on,Ce){var pr=["L","D"];if(typeof on==typeof Ce){if(typeof on=="number")return on-Ce;var Hr=pr.indexOf(on.charAt(0)),_n=pr.indexOf(Ce.charAt(0));return Hr===_n?Number(on.replace(/(L|D)/g,""))-Number(Ce.replace(/(L|D)/g,"")):Hr-_n}else return typeof on=="number"?1:-1}function Gr(on,Ce,pr){var Hr=pr||function(ri){return ri},_n=Ce[0],Bn=Ce[1];return(!_n&&typeof _n!="number"||Hr(_n)<=Hr(on))&&(!Bn&&typeof Bn!="number"||Hr(Bn)>=Hr(on))}function Rr(on,Ce){var pr=Ce[0]===null,Hr=Ce[1]===null,_n=$r(on,Ce[0])>=0,Bn=$r(on,Ce[1])<=0;return(pr||_n)&&(Hr||Bn)}var Yr,mn;if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":{for(ze=0;ze=0&&Gr.unshift(Gr.splice(pr,1).shift())}});var mn={false:{left:0,right:0}};return t.syncOrAsync(Gr.map(function(on){return function(){if(on){var Ce=rt.getFromId(Oe,on);Br||(Br={}),Br.axShifts=mn,Br.overlayingShiftedAx=Yr;var pr=rt.drawOne(Oe,Ce,Br);return Ce._shiftPusher&&di(Ce,Ce._fullDepth||0,mn,!0),Ce._r=Ce.range.slice(),Ce._rl=t.simpleMap(Ce._r,Ce.r2l),pr}}}))},rt.drawOne=function(Oe,ze,Br){Br=Br||{};var $r=Br.axShifts||{},Gr=Br.overlayingShiftedAx||[],Rr,Yr,mn;ze.setScale();var on=Oe._fullLayout,Ce=ze._id,pr=Ce.charAt(0),Hr=rt.counterLetter(Ce),_n=on._plots[ze._mainSubplot],Bn=ze.zerolinelayer==="above traces";if(!_n)return;if(ze._shiftPusher=ze.autoshift||Gr.indexOf(ze._id)!==-1||Gr.indexOf(ze.overlaying)!==-1,ze._shiftPusher&ze.anchor==="free"){var ri=ze.linewidth/2||0;ze.ticks==="inside"&&(ri+=ze.ticklen),di(ze,ri,$r,!0),di(ze,ze.shift||0,$r,!1)}(Br.skipTitle!==!0||ze._shift===void 0)&&(ze._shift=za(ze,$r));var Pn=_n[pr+"axislayer"],En=ze._mainLinePosition,Yn=En+=ze._shift,La=ze._mainMirrorPosition,qi=ze._vals=rt.calcTicks(ze),Qa=[ze.mirror,Yn,La].join("_");for(Rr=0;Rr0?bl.bottom-Cu:0,Gu))));var ac=0,gh=0;if(ze._shiftPusher&&(ac=Math.max(Gu,bl.height>0?hl==="l"?Cu-bl.left:bl.right-Cu:0),ze.title.text!==on._dfltTitle[pr]&&(gh=(ze._titleStandoff||0)+(ze._titleScoot||0),hl==="l"&&(gh+=ui(ze))),ze._fullDepth=Math.max(ac,gh)),ze.automargin){Fl={x:0,y:0,r:0,l:0,t:0,b:0};var Jc=[0,1],oh=typeof ze._shift=="number"?ze._shift:0;if(pr==="x"){if(hl==="b"?Fl[hl]=ze._depth:(Fl[hl]=ze._depth=Math.max(bl.width>0?Cu-bl.top:0,Gu),Jc.reverse()),bl.width>0){var jf=bl.right-(ze._offset+ze._length);jf>0&&(Fl.xr=1,Fl.r=jf);var Sf=ze._offset-bl.left;Sf>0&&(Fl.xl=0,Fl.l=Sf)}}else if(hl==="l"?(ze._depth=Math.max(bl.height>0?Cu-bl.left:0,Gu),Fl[hl]=ze._depth-oh):(ze._depth=Math.max(bl.height>0?bl.right-Cu:0,Gu),Fl[hl]=ze._depth+oh,Jc.reverse()),bl.height>0){var Bl=bl.bottom-(ze._offset+ze._length);Bl>0&&(Fl.yb=0,Fl.b=Bl);var Rc=ze._offset-bl.top;Rc>0&&(Fl.yt=1,Fl.t=Rc)}Fl[Hr]=ze.anchor==="free"?ze.position:ze._anchorAxis.domain[Jc[0]],ze.title.text!==on._dfltTitle[pr]&&(Fl[hl]+=ui(ze)+(ze.title.standoff||0)),ze.mirror&&ze.anchor!=="free"&&(tu={x:0,y:0,r:0,l:0,t:0,b:0},tu[es]=ze.linewidth,ze.mirror&&ze.mirror!==!0&&(tu[es]+=Gu),ze.mirror===!0||ze.mirror==="ticks"?tu[Hr]=ze._anchorAxis.domain[Jc[1]]:(ze.mirror==="all"||ze.mirror==="allticks")&&(tu[Hr]=[ze._counterDomainMin,ze._counterDomainMax][Jc[1]]))}ou&&(nu=S.getComponentMethod("rangeslider","autoMarginOpts")(Oe,ze)),typeof ze.automargin=="string"&&(or(Fl,ze.automargin),or(tu,ze.automargin)),I.autoMargin(Oe,dr(ze),Fl),I.autoMargin(Oe,_r(ze),tu),I.autoMargin(Oe,tn(ze),nu)}),t.syncOrAsync(Ms)}};function or(Oe,ze){if(Oe){var Br=Object.keys(J).reduce(function($r,Gr){return ze.indexOf(Gr)!==-1&&J[Gr].forEach(function(Rr){$r[Rr]=1}),$r},{});Object.keys(Oe).forEach(function($r){Br[$r]||($r.length===1?Oe[$r]=0:delete Oe[$r])})}}function Sr(Oe,ze){var Br=[],$r,Gr=function(Rr,Yr){var mn=Rr.xbnd[Yr];mn!==null&&Br.push(t.extendFlat({},Rr,{x:mn}))};if(ze.length){for($r=0;$rOe.range[1],mn=Oe.ticklabelposition&&Oe.ticklabelposition.indexOf("inside")!==-1,on=!mn;if(Br){var Ce=Yr?-1:1;Br=Br*Ce}if($r){var pr=Oe.side,Hr=mn&&(pr==="top"||pr==="left")||on&&(pr==="bottom"||pr==="right")?1:-1;$r=$r*Hr}return Oe._id.charAt(0)==="x"?function(_n){return e(Gr+Oe._offset+Oe.l2p(Wn(_n))+Br,Rr+$r)}:function(_n){return e(Rr+$r,Gr+Oe._offset+Oe.l2p(Wn(_n))+Br)}};function Wn(Oe){return Oe.periodX!==void 0?Oe.periodX:Oe.x}function qn(Oe){var ze=Oe.ticklabelposition||"",Br=Oe.tickson||"",$r=function(ri){return ze.indexOf(ri)!==-1},Gr=$r("top"),Rr=$r("left"),Yr=$r("right"),mn=$r("bottom"),on=$r("inside"),Ce=Br!=="boundaries"&&(mn||Rr||Gr||Yr);if(!Ce&&!on)return[0,0];var pr=Oe.side,Hr=Ce?(Oe.tickwidth||0)/2:0,_n=pt,Bn=Oe.tickfont?Oe.tickfont.size:12;return(mn||Gr)&&(Hr+=Bn*mt,_n+=(Oe.linewidth||0)/2),(Rr||Yr)&&(Hr+=(Oe.linewidth||0)/2,_n+=pt),on&&pr==="top"&&(_n-=Bn*(1-mt)),(Rr||Gr)&&(Hr=-Hr),(pr==="bottom"||pr==="right")&&(_n=-_n),[Ce?Hr:0,on?_n:0]}rt.makeTickPath=function(Oe,ze,Br,$r){$r||($r={});var Gr=$r.minor;if(Gr&&!Oe.minor)return"";var Rr=$r.len!==void 0?$r.len:Gr?Oe.minor.ticklen:Oe.ticklen,Yr=Oe._id.charAt(0),mn=(Oe.linewidth||1)/2;return Yr==="x"?"M0,"+(ze+mn*Br)+"v"+Rr*Br:"M"+(ze+mn*Br)+",0h"+Rr*Br},rt.makeLabelFns=function(Oe,ze,Br){var $r=Oe.ticklabelposition||"",Gr=Oe.tickson||"",Rr=function(Go){return $r.indexOf(Go)!==-1},Yr=Rr("top"),mn=Rr("left"),on=Rr("right"),Ce=Rr("bottom"),pr=Gr!=="boundaries"&&(Ce||mn||Yr||on),Hr=Rr("inside"),_n=$r==="inside"&&Oe.ticks==="inside"||!Hr&&Oe.ticks==="outside"&&Gr!=="boundaries",Bn=0,ri=0,Pn=_n?Oe.ticklen:0;if(Hr?Pn*=-1:pr&&(Pn=0),_n&&(Bn+=Pn,Br)){var En=t.deg2rad(Br);Bn=Pn*Math.cos(En)+1,ri=Pn*Math.sin(En)}Oe.showticklabels&&(_n||Oe.showline)&&(Bn+=.2*Oe.tickfont.size),Bn+=(Oe.linewidth||1)/2*(Hr?-1:1);var Yn={labelStandoff:Bn,labelShift:ri},La,qi,Qa,Ja,Do=0,yo=Oe.side,Bo=Oe._id.charAt(0),Da=Oe.tickangle,ys;if(Bo==="x")ys=!Hr&&yo==="bottom"||Hr&&yo==="top",Ja=ys?1:-1,Hr&&(Ja*=-1),La=ri*Ja,qi=ze+Bn*Ja,Qa=ys?1:-.2,Math.abs(Da)===90&&(Hr?Qa+=yt:Da===-90&&yo==="bottom"?Qa=mt:Da===90&&yo==="top"?Qa=yt:Qa=.5,Do=yt/2*(Da/90)),Yn.xFn=function(Go){return Go.dx+La+Do*Go.fontSize},Yn.yFn=function(Go){return Go.dy+qi+Go.fontSize*Qa},Yn.anchorFn=function(Go,Ks){if(pr){if(mn)return"end";if(on)return"start"}return!g(Ks)||Ks===0||Ks===180?"middle":Ks*Ja<0!==Hr?"end":"start"},Yn.heightFn=function(Go,Ks,ss){return Ks<-60||Ks>60?-.5*ss:Oe.side==="top"!==Hr?-ss:0};else if(Bo==="y"){if(ys=!Hr&&yo==="left"||Hr&&yo==="right",Ja=ys?1:-1,Hr&&(Ja*=-1),La=Bn,qi=ri*Ja,Qa=0,!Hr&&Math.abs(Da)===90&&(Da===-90&&yo==="left"||Da===90&&yo==="right"?Qa=mt:Qa=.5),Hr){var os=g(Da)?+Da:0;if(os!==0){var ul=t.deg2rad(os);Do=Math.abs(Math.sin(ul))*mt*Ja,Qa=0}}Yn.xFn=function(Go){return Go.dx+ze-(La+Go.fontSize*Qa)*Ja+Do*Go.fontSize},Yn.yFn=function(Go){return Go.dy+qi+Go.fontSize*yt},Yn.anchorFn=function(Go,Ks){return g(Ks)&&Math.abs(Ks)===90?"middle":ys?"end":"start"},Yn.heightFn=function(Go,Ks,ss){return Oe.side==="right"&&(Ks*=-1),Ks<-30?-ss:Ks<30?-.5*ss:0}}return Yn};function ei(Oe){return[Oe.text,Oe.x,Oe.axInfo,Oe.font,Oe.fontSize,Oe.fontColor].join("_")}rt.drawTicks=function(Oe,ze,Br){Br=Br||{};var $r=ze._id+"tick",Gr=[].concat(ze.minor&&ze.minor.ticks?Br.vals.filter(function(Yr){return Yr.minor&&!Yr.noTick}):[]).concat(ze.ticks?Br.vals.filter(function(Yr){return!Yr.minor&&!Yr.noTick}):[]),Rr=Br.layer.selectAll("path."+$r).data(Gr,ei);Rr.exit().remove(),Rr.enter().append("path").classed($r,1).classed("ticks",1).classed("crisp",Br.crisp!==!1).each(function(Yr){return n.stroke(c.select(this),Yr.minor?ze.minor.tickcolor:ze.tickcolor)}).style("stroke-width",function(Yr){return o.crispRound(Oe,Yr.minor?ze.minor.tickwidth:ze.tickwidth,1)+"px"}).attr("d",Br.path).style("display",null),Ji(ze,[W]),Rr.attr("transform",Br.transFn)},rt.drawGrid=function(Oe,ze,Br){if(Br=Br||{},ze.tickmode!=="sync"){var $r=ze._id+"grid",Gr=ze.minor&&ze.minor.showgrid,Rr=Gr?Br.vals.filter(function(Yn){return Yn.minor}):[],Yr=ze.showgrid?Br.vals.filter(function(Yn){return!Yn.minor}):[],mn=Br.counterAxis;if(mn&&rt.shouldShowZeroLine(Oe,ze,mn))for(var on=ze.tickmode==="array",Ce=0;Ce=0;ri--){var Pn=ri?_n:Bn;if(Pn){var En=Pn.selectAll("path."+$r).data(ri?Yr:Rr,ei);En.exit().remove(),En.enter().append("path").classed($r,1).classed("crisp",Br.crisp!==!1),En.attr("transform",Br.transFn).attr("d",Br.path).each(function(Yn){return n.stroke(c.select(this),Yn.minor?ze.minor.gridcolor:ze.gridcolor||"#ddd")}).style("stroke-dasharray",function(Yn){return o.dashStyle(Yn.minor?ze.minor.griddash:ze.griddash,Yn.minor?ze.minor.gridwidth:ze.gridwidth)}).style("stroke-width",function(Yn){return(Yn.minor?Hr:ze._gw)+"px"}).style("display",null),typeof Br.path=="function"&&En.attr("d",Br.path)}}Ji(ze,[F,U])}},rt.drawZeroLine=function(Oe,ze,Br){Br=Br||Br;var $r=ze._id+"zl",Gr=rt.shouldShowZeroLine(Oe,ze,Br.counterAxis),Rr=Br.layer.selectAll("path."+$r).data(Gr?[{x:0,id:ze._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed($r,1).classed("zl",1).classed("crisp",Br.crisp!==!1).each(function(){Br.layer.selectAll("path").sort(function(Yr,mn){return it(Yr.id,mn.id)})}),Rr.attr("transform",Br.transFn).attr("d",Br.path).call(n.stroke,ze.zerolinecolor||n.defaultLine).style("stroke-width",o.crispRound(Oe,ze.zerolinewidth,ze._gw||1)+"px").style("display",null),Ji(ze,[H])},rt.drawLabels=function(Oe,ze,Br){Br=Br||{};var $r=Oe._fullLayout,Gr=ze._id,Rr=ze.zerolinelayer==="above traces",Yr=Br.cls||Gr+"tick",mn=Br.vals.filter(function(cs){return cs.text}),on=Br.labelFns,Ce=Br.secondary?0:ze.tickangle,pr=(ze._prevTickAngles||{})[Yr],Hr=Br.layer.selectAll("g."+Yr).data(ze.showticklabels?mn:[],ei),_n=[];Hr.enter().append("g").classed(Yr,1).append("text").attr("text-anchor","middle").each(function(cs){var Ps=c.select(this),Po=Oe._promises.length;Ps.call(r.positionText,on.xFn(cs),on.yFn(cs)).call(o.font,{family:cs.font,size:cs.fontSize,color:cs.fontColor,weight:cs.fontWeight,style:cs.fontStyle,variant:cs.fontVariant,textcase:cs.fontTextcase,lineposition:cs.fontLineposition,shadow:cs.fontShadow}).text(cs.text).call(r.convertToTspans,Oe),Oe._promises[Po]?_n.push(Oe._promises.pop().then(function(){Bn(Ps,Ce)})):Bn(Ps,Ce)}),Ji(ze,[q]),Hr.exit().remove(),Br.repositionOnUpdate&&Hr.each(function(cs){c.select(this).select("text").call(r.positionText,on.xFn(cs),on.yFn(cs))});function Bn(cs,Ps){cs.each(function(Po){var As=c.select(this),kl=As.select(".text-math-group"),ql=on.anchorFn(Po,Ps),Jl=Br.transFn.call(As.node(),Po)+(g(Ps)&&+Ps!=0?" rotate("+Ps+","+on.xFn(Po)+","+(on.yFn(Po)-Po.fontSize/2)+")":""),Us=r.lineCount(As),Pa=st*Po.fontSize,fo=on.heightFn(Po,g(Ps)?+Ps:0,(Us-1)*Pa);if(fo&&(Jl+=e(0,fo)),kl.empty()){var qs=As.select("text");qs.attr({transform:Jl,"text-anchor":ql}),qs.style("display",null),ze._adjustTickLabelsOverflow&&ze._adjustTickLabelsOverflow()}else{var Ql=o.bBox(kl.node()).width,Jo=Ql*{end:-.5,start:.5}[ql];kl.attr("transform",Jl+e(Jo,0))}})}ze._adjustTickLabelsOverflow=function(){var cs=ze.ticklabeloverflow;if(!(!cs||cs==="allow")){var Ps=cs.indexOf("hide")!==-1,Po=ze._id.charAt(0)==="x",As=0,kl=Po?Oe._fullLayout.width:Oe._fullLayout.height;if(cs.indexOf("domain")!==-1){var ql=t.simpleMap(ze.range,ze.r2l);As=ze.l2p(ql[0])+ze._offset,kl=ze.l2p(ql[1])+ze._offset}var Jl=Math.min(As,kl),Us=Math.max(As,kl),Pa=ze.side,fo=1/0,qs=-1/0;Hr.each(function(al){var Ll=c.select(this),Ru=Ll.select(".text-math-group");if(Ru.empty()){var uo=o.bBox(Ll.node()),Ms=0;Po?(uo.right>Us||uo.leftUs||uo.top+(ze.tickangle?0:al.fontSize/4)ze["_visibleLabelMin_"+ql._id]?Ll.style("display","none"):Us.K==="tick"&&!Jl&&Ll.node().style.display!=="none"&&Ll.style("display",null)})})})})},Bn(Hr,pr+1?pr:Ce);function ri(){return _n.length&&Promise.all(_n)}var Pn=null;function En(){if(Bn(Hr,Ce),mn.length&&ze.autotickangles&&(ze.type!=="log"||String(ze.dtick).charAt(0)!=="D")){Pn=ze.autotickangles[0];var cs=0,Ps=[],Po,As=1;Hr.each(function(Fl){cs=Math.max(cs,Fl.fontSize);var tu=ze.l2p(Fl.x),nu=nr(this),ac=o.bBox(nu.node());As=Math.max(As,r.lineCount(nu)),Ps.push({top:0,bottom:10,height:10,left:tu-ac.width/2,right:tu+ac.width/2+2,width:ac.width+2})});var kl=(ze.tickson==="boundaries"||ze.showdividers)&&!Br.secondary,ql=mn.length,Jl=Math.abs((mn[ql-1].x-mn[0].x)*ze._m)/(ql-1),Us=kl?Jl/2:Jl,Pa=kl?ze.ticklen:cs*1.25*As,fo=Math.sqrt(Math.pow(Us,2)+Math.pow(Pa,2)),qs=Us/fo,Ql=ze.autotickangles.map(function(Fl){return Fl*Math.PI/180}),Jo=Ql.find(function(Fl){return Math.abs(Math.cos(Fl))<=qs});Jo===void 0&&(Jo=Ql.reduce(function(Fl,tu){return Math.abs(Math.cos(Fl))cl*ss&&(ul=ss,Da[Bo]=ys[Bo]=Go[Bo])}var Qs=Math.abs(ul-os);Qs-Ja>0?(Qs-=Ja,Ja*=1+Ja/Qs):Ja=0,ze._id.charAt(0)!=="y"&&(Ja=-Ja),Da[yo]=qi.p2r(qi.r2p(ys[yo])+Do*Ja),qi.autorange==="min"||qi.autorange==="max reversed"?(Da[0]=null,qi._rangeInitial0=void 0,qi._rangeInitial1=void 0):(qi.autorange==="max"||qi.autorange==="min reversed")&&(Da[1]=null,qi._rangeInitial0=void 0,qi._rangeInitial1=void 0),$r._insideTickLabelsUpdaterange[qi._name+".range"]=Da}var jl=t.syncOrAsync(Yn);return jl&&jl.then&&Oe._promises.push(jl),jl};function Di(Oe,ze,Br){var $r=ze._id+"divider",Gr=Br.vals,Rr=Br.layer.selectAll("path."+$r).data(Gr,ei);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed($r,1).classed("crisp",1).call(n.stroke,ze.dividercolor).style("stroke-width",o.crispRound(Oe,ze.dividerwidth,1)+"px"),Rr.attr("transform",Br.transFn).attr("d",Br.path)}rt.getPxPosition=function(Oe,ze){var Br=Oe._fullLayout._size,$r=ze._id.charAt(0),Gr=ze.side,Rr;if(ze.anchor!=="free"?Rr=ze._anchorAxis:$r==="x"?Rr={_offset:Br.t+(1-(ze.position||0))*Br.h,_length:0}:$r==="y"&&(Rr={_offset:Br.l+(ze.position||0)*Br.w+ze._shift,_length:0}),Gr==="top"||Gr==="left")return Rr._offset;if(Gr==="bottom"||Gr==="right")return Rr._offset+Rr._length};function ui(Oe){var ze=Oe.title.font.size,Br=(Oe.title.text.match(r.BR_TAG_ALL)||[]).length;return Oe.title.hasOwnProperty("standoff")?ze*(mt+Br*st):Br?ze*(Br+1)*st:ze}function Gn(Oe,ze){var Br=Oe._fullLayout,$r=ze._id,Gr=$r.charAt(0),Rr=ze.title.font.size,Yr,mn=(ze.title.text.match(r.BR_TAG_ALL)||[]).length;if(ze.title.hasOwnProperty("standoff"))ze.side==="bottom"||ze.side==="right"?Yr=ze._depth+ze.title.standoff+Rr*mt:(ze.side==="top"||ze.side==="left")&&(Yr=ze._depth+ze.title.standoff+Rr*(yt+mn*st));else{var on=Hi(ze);if(ze.type==="multicategory")Yr=ze._depth;else{var Ce=1.5*Rr;on&&(Ce=.5*Rr,ze.ticks==="outside"&&(Ce+=ze.ticklen)),Yr=10+Ce+(ze.linewidth?ze.linewidth-1:0)}on||(Gr==="x"?Yr+=ze.side==="top"?Rr*(ze.showticklabels?1:0):Rr*(ze.showticklabels?1.5:.5):Yr+=ze.side==="right"?Rr*(ze.showticklabels?1:.5):Rr*(ze.showticklabels?.5:0))}var pr=rt.getPxPosition(Oe,ze),Hr,_n,Bn;Gr==="x"?(_n=ze._offset+ze._length/2,Bn=ze.side==="top"?pr-Yr:pr+Yr):(Bn=ze._offset+ze._length/2,_n=ze.side==="right"?pr+Yr:pr-Yr,Hr={rotate:"-90",offset:0});var ri;if(ze.type!=="multicategory"){var Pn=ze._selections[ze._id+"tick"];if(ri={selection:Pn,side:ze.side},Pn&&Pn.node()&&Pn.node().parentNode){var En=o.getTranslate(Pn.node().parentNode);ri.offsetLeft=En.x,ri.offsetTop=En.y}ze.title.hasOwnProperty("standoff")&&(ri.pad=0)}return ze._titleStandoff=Yr,a.draw(Oe,$r+"title",{propContainer:ze,propName:ze._name+".title.text",placeholder:Br._dfltTitle[Gr],avoid:ri,transform:Hr,attributes:{x:_n,y:Bn,"text-anchor":"middle"}})}rt.shouldShowZeroLine=function(Oe,ze,Br){var $r=t.simpleMap(ze.range,ze.r2l);return $r[0]*$r[1]<=0&&ze.zeroline&&(ze.type==="linear"||ze.type==="-")&&!(ze.rangebreaks&&ze.maskBreaks(0)===V)&&(ua(ze,0)||!Yi(Oe,ze,Br,$r)||We(Oe,ze))},rt.clipEnds=function(Oe,ze){return ze.filter(function(Br){return ua(Oe,Br.x)})};function ua(Oe,ze){var Br=Oe.l2p(ze);return Br>1&&Br1)for(Gr=1;Gr=Gr.min&&Oe=O:/%L/.test(ze)?Oe>=B:/%[SX]/.test(ze)?Oe>=w:/%M/.test(ze)?Oe>=k:/%[HI]/.test(ze)?Oe>=p:/%p/.test(ze)?Oe>=h:/%[Aadejuwx]/.test(ze)?Oe>=A:/%[UVW]/.test(ze)?Oe>=C:/%[Bbm]/.test(ze)?Oe>=M:/%[q]/.test(ze)?Oe>=b:/%[Yy]/.test(ze)?Oe>=v:!0}}),ww=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S,t;if(I){var e=g==="reversed"||g==="min reversed"||g==="max reversed";S=I[e?1:0],t=I[e?0:1]}var r=c("autorangeoptions.minallowed",t===null?S:void 0),a=c("autorangeoptions.maxallowed",S===null?t:void 0);r===void 0&&c("autorangeoptions.clipmin"),a===void 0&&c("autorangeoptions.clipmax"),c("autorangeoptions.include")}}),z_=Dt((Q,Z)=>{var c=ww();Z.exports=function(g,I,S,t){var e=I._template||{},r=I.type||e.type||"-";S("minallowed"),S("maxallowed");var a=S("range");if(!a){var n;!t.noInsiderange&&r!=="log"&&(n=S("insiderange"),n&&(n[0]===null||n[1]===null)&&(I.insiderange=!1,n=void 0),n&&(a=S("range",n)))}var o=I.getAutorangeDflt(a,t),i=S("autorange",o),l;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(i==="reversed"||i===!0)||a[0]!==null&&(i==="min"||i==="max reversed")||a[1]!==null&&(i==="max"||i==="min reversed"))&&(a=void 0,delete I.range,I.autorange=!0,l=!0),l||(o=I.getAutorangeDflt(a,t),i=S("autorange",o)),i&&(c(S,i,a),(r==="linear"||r==="-")&&S("rangemode")),I.cleanRange()}}),x6=Dt((Q,Z)=>{var c={left:0,top:0};Z.exports=g;function g(S,t,e){t=t||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var r=S.clientX||0,a=S.clientY||0,n=I(t);return e[0]=r-n.left,e[1]=a-n.top,e}function I(S){return S===window||S===document||S===document.body?c:S.getBoundingClientRect()}}),O_=Dt((Q,Z)=>{var c=Wu();function g(){var I=!1;try{var S=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{I=!1}return I}Z.exports=c&&g()}),D_=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=(c-I)/(S-I),r=e+g/(S-I),a=(e+r)/2;return t==="left"||t==="bottom"?e:t==="center"||t==="middle"?a:t==="right"||t==="top"?r:e<2/3-a?e:r>4/3-a?r:a}}),_6=Dt((Q,Z)=>{var c=kn(),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Z.exports=function(I,S,t,e){return t==="left"?I=0:t==="center"?I=1:t==="right"?I=2:I=c.constrain(Math.floor(I*3),0,2),e==="bottom"?S=0:e==="middle"?S=1:e==="top"?S=2:S=c.constrain(Math.floor(S*3),0,2),g[S][I]}}),X0=Dt((Q,Z)=>{var c=Nm(),g=L_(),I=r0().getGraphDiv,S=io(),t=Z.exports={};t.wrapped=function(e,r,a){e=I(e),e._fullLayout&&g.clear(e._fullLayout._uid+S.HOVERID),t.raw(e,r,a)},t.raw=function(e,r){var a=e._fullLayout,n=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&c.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&n&&e.emit("plotly_unhover",{event:r,points:n}))}}),cp=Dt((Q,Z)=>{var c=x6(),g=Rf(),I=O_(),S=kn().removeElement,t=ic(),e=Z.exports={};e.align=D_(),e.getCursor=_6();var r=X0();e.unhover=r.wrapped,e.unhoverRaw=r.raw,e.init=function(o){var i=o.gd,l=1,f=i._context.doubleClickDelay,x=o.element,y,v,T,u,b,_,P,M;i._mouseDownTime||(i._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=h,I?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=h,x.addEventListener("touchstart",h,{passive:!1})):x.ontouchstart=h;function C(w,B,O){return Math.abs(w)"u"&&typeof w.clientY>"u"&&(w.clientX=y,w.clientY=v),T=new Date().getTime(),T-i._mouseDownTimef&&(l=Math.max(l-1,1)),i._dragged)o.doneFn&&o.doneFn();else{var B;_.target===P?B=_:(B={target:P,srcElement:P,toElement:P},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(O=>{var j=_[O];!B[O]&&typeof j!="function"&&(B[O]=j)})),o.clickFn&&o.clickFn(l,B),M||P.dispatchEvent(new MouseEvent("click",w))}i._dragging=!1,i._dragged=!1}};function a(){var o=document.createElement("div");o.className="dragcover";var i=o.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(o),o}e.coverSlip=a;function n(o){return c(o.changedTouches?o.changedTouches[0]:o,document.body)}}),I0=Dt((Q,Z)=>{Z.exports=function(c,g){(c.attr("class")||"").split(" ").forEach(function(I){I.indexOf("cursor-")===0&&c.classed(I,!1)}),g&&c.classed("cursor-"+g,!0)}}),Um=Dt((Q,Z)=>{var c=I0(),g="data-savedcursor",I="!!";Z.exports=function(S,t){var e=S.attr(g);if(t){if(!e){for(var r=(S.attr("class")||"").split(" "),a=0;a{var c=ma(),g=Ai();Z.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:c({editType:"legend"}),grouptitlefont:c({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"},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:c({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),Vy=Dt(Q=>{Q.isGrouped=function(Z){return(Z.traceorder||"").indexOf("grouped")!==-1},Q.isVertical=function(Z){return Z.orientation!=="h"},Q.isReversed=function(Z){return(Z.traceorder||"").indexOf("reversed")!==-1}}),Hy=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=mu(),S=qo(),t=F_(),e=k1(),r=Vy();function a(n,o,i,l){var f=o[n]||{},x=I.newContainer(i,n);function y(st,tt){return g.coerce(f,x,t,st,tt)}var v=g.coerceFont(y,"font",i.font);y("bgcolor",i.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var u,b=function(st,tt){var pt=u._input,rt=u;return g.coerce(pt,rt,S,st,tt)},_=i.font||{},P=g.coerceFont(y,"grouptitlefont",_,{overrideDflt:{size:Math.round(_.size*1.1)}}),M=0,C=!1,A="normal",h=(i.shapes||[]).filter(function(st){return st.showlegend}),p=l.concat(h).filter(function(st){return n===(st.legend||"legend")}),k=0;k(n==="legend"?1:0));if(B===!1&&(i[n]=void 0),!(B===!1&&!f.uirevision)&&(y("uirevision",i.uirevision),B!==!1)){y("borderwidth");var O=y("orientation"),j=y("yref"),V=y("xref"),H=O==="h",F=j==="paper",U=V==="paper",W,q,J,lt="left";H?(W=0,c.getComponentMethod("rangeslider","isVisible")(o.xaxis)?F?(q=1.1,J="bottom"):(q=1,J="top"):F?(q=-.1,J="top"):(q=0,J="bottom")):(q=1,J="auto",U?W=1.02:(W=1,lt="right")),g.coerce(f,x,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:W}},"x"),g.coerce(f,x,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:q}},"y"),y("traceorder",A),r.isGrouped(i[n])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",lt),y("yanchor",J),y("maxheight"),y("valign"),g.noneOrAll(f,x,["x","y"]);var yt=y("title.text");if(yt){y("title.side",H?"left":"top");var mt=g.extendFlat({},v,{size:g.bigFont(v.size)});g.coerceFont(y,"title.font",mt)}}}}Z.exports=function(n,o,i){var l,f=i.slice(),x=o.shapes;if(x)for(l=0;l{var c=Qo(),g=kn(),I=g.pushUnique,S=!0;Z.exports=function(t,e,r){var a=e._fullLayout;if(e._dragged||e._editing)return;var n=a.legend.itemclick,o=a.legend.itemdoubleclick,i=a.legend.groupclick;r===1&&n==="toggle"&&o==="toggleothers"&&S&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),S=!1;var l;if(r===1?l=n:r===2&&(l=o),!l)return;var f=i==="togglegroup",x=a.hiddenlabels?a.hiddenlabels.slice():[],y=t.data()[0][0];if(y.groupTitle&&y.noClick)return;var v=e._fullData,T=(a.shapes||[]).filter(function(se){return se.showlegend}),u=v.concat(T),b=y.trace;b._isShape&&(b=b._fullInput);var _=b.legendgroup,P,M,C,A,h,p,k={},w=[],B=[],O=[];function j(se,Tt){var Lt=w.indexOf(se),Mt=k.visible;return Mt||(Mt=k.visible=[]),w.indexOf(se)===-1&&(w.push(se),Lt=w.length-1),Mt[Lt]=Tt,Lt}var V=(a.shapes||[]).map(function(se){return se._input}),H=!1;function F(se,Tt){V[se].visible=Tt,H=!0}function U(se,Tt){if(!(y.groupTitle&&!f)){var Lt=se._fullInput||se,Mt=Lt._isShape,ee=Lt.index;ee===void 0&&(ee=Lt._index);var ve=Lt.visible===!1?!1:Tt;Mt?F(ee,ve):j(ee,ve)}}var W=b.legend,q=b._fullInput,J=q&&q._isShape;if(!J&&c.traceIs(b,"pie-like")){var lt=y.label,yt=x.indexOf(lt);if(l==="toggle")yt===-1?x.push(lt):x.splice(yt,1);else if(l==="toggleothers"){var mt=yt!==-1,st=[];for(P=0;P{Z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),kw=Dt((Q,Z)=>{var c=Qo(),g=Vy();Z.exports=function(I,S,t){var e=S._inHover,r=g.isGrouped(S),a=g.isReversed(S),n={},o=[],i=!1,l={},f=0,x=0,y,v;function T(U,W,q){if(S.visible!==!1&&!(t&&U!==S._id))if(W===""||!g.isGrouped(S)){var J="~~i"+f;o.push(J),n[J]=[q],f++}else o.indexOf(W)===-1?(o.push(W),i=!0,n[W]=[q]):n[W].push(q)}for(y=0;yw&&(k=w)}h[y][0]._groupMinRank=k,h[y][0]._preGroupSort=y}var B=function(U,W){return U[0]._groupMinRank-W[0]._groupMinRank||U[0]._preGroupSort-W[0]._preGroupSort},O=function(U,W){return U.trace.legendrank-W.trace.legendrank||U._preSort-W._preSort};for(h.forEach(function(U,W){U[0]._preGroupSort=W}),h.sort(B),y=0;y{var Z=kn();function c(g){return g.indexOf("e")!==-1?g.replace(/[.]?0+e/,"e"):g.indexOf(".")!==-1?g.replace(/[.]?0+$/,""):g}Q.formatPiePercent=function(g,I){var S=c((g*100).toPrecision(3));return Z.numSeparate(S,I)+"%"},Q.formatPieValue=function(g,I){var S=c(g.toPrecision(10));return Z.numSeparate(S,I)},Q.getFirstFilled=function(g,I){if(Z.isArrayOrTypedArray(g))for(var S=0;S{var c=Vs(),g=pi();Z.exports=function(I,S,t,e){var r=t.marker.pattern;r&&r.shape?c.pointStyle(I,t,e,S):g.fill(I,S.color)}}),Tg=Dt((Q,Z)=>{var c=pi(),g=kg().castOption,I=w6();Z.exports=function(S,t,e,r){var a=e.marker.line,n=g(a.color,t.pts)||c.defaultLine,o=g(a.width,t.pts)||0;S.call(I,t,e,r).style("stroke-width",o).call(c.stroke,n)}}),Tw=Dt((Q,Z)=>{var c=Wr(),g=Qo(),I=kn(),S=I.strTranslate,t=Vs(),e=pi(),r=Ud().extractOpts,a=Tc(),n=Tg(),o=kg().castOption,i=B_(),l=12,f=5,x=2,y=10,v=5;Z.exports=function(_,P,M){var C=P._fullLayout;M||(M=C.legend);var A=M.itemsizing==="constant",h=M.itemwidth,p=(h+i.itemGap*2)/2,k=S(p,0),w=function(st,tt,pt,rt){var at;if(st+1)at=st;else if(tt&&tt.width>0)at=tt.width;else return 0;return A?rt:Math.min(at,pt)};_.each(function(st){var tt=c.select(this),pt=I.ensureSingle(tt,"g","layers");pt.style("opacity",st[0].trace.opacity);var rt=M.indentation,at=M.valign,vt=st[0].lineHeight,it=st[0].height;if(at==="middle"&&rt===0||!vt||!it)pt.attr("transform",null);else{var K={top:1,bottom:-1}[at],ft=K*(.5*(vt-it+3))||0,ut=M.indentation;pt.attr("transform",S(ut,ft))}var kt=pt.selectAll("g.legendfill").data([st]);kt.enter().append("g").classed("legendfill",!0);var It=pt.selectAll("g.legendlines").data([st]);It.enter().append("g").classed("legendlines",!0);var Pt=pt.selectAll("g.legendsymbols").data([st]);Pt.enter().append("g").classed("legendsymbols",!0),Pt.selectAll("g.legendpoints").data([st]).enter().append("g").classed("legendpoints",!0)}).each(mt).each(j).each(H).each(V).each(U).each(lt).each(J).each(B).each(O).each(W).each(q);function B(st){var tt=u(st),pt=tt.showFill,rt=tt.showLine,at=tt.showGradientLine,vt=tt.showGradientFill,it=tt.anyFill,K=tt.anyLine,ft=st[0],ut=ft.trace,kt,It,Pt=r(ut),qt=Pt.colorscale,Wt=Pt.reversescale,Jt=function(Mt){if(Mt.size())if(pt)t.fillGroupStyle(Mt,P,!0);else{var ee="legendfill-"+ut.uid;t.gradient(Mt,P,ee,T(Wt),qt,"fill")}},ge=function(Mt){if(Mt.size()){var ee="legendline-"+ut.uid;t.lineGroupStyle(Mt),t.gradient(Mt,P,ee,T(Wt),qt,"stroke")}},fe=a.hasMarkers(ut)||!it?"M5,0":K?"M5,-2":"M5,-3",pe=c.select(this),se=pe.select(".legendfill").selectAll("path").data(pt||vt?[st]:[]);if(se.enter().append("path").classed("js-fill",!0),se.exit().remove(),se.attr("d",fe+"h"+h+"v6h-"+h+"z").call(Jt),rt||at){var Tt=w(void 0,ut.line,y,f);It=I.minExtend(ut,{line:{width:Tt}}),kt=[I.minExtend(ft,{trace:It})]}var Lt=pe.select(".legendlines").selectAll("path").data(rt||at?[kt]:[]);Lt.enter().append("path").classed("js-line",!0),Lt.exit().remove(),Lt.attr("d",fe+(at?"l"+h+",0.0001":"h"+h)).call(rt?t.lineGroupStyle:ge)}function O(st){var tt=u(st),pt=tt.anyFill,rt=tt.anyLine,at=tt.showLine,vt=tt.showMarker,it=st[0],K=it.trace,ft=!vt&&!rt&&!pt&&a.hasText(K),ut,kt;function It(se,Tt,Lt,Mt){var ee=I.nestedProperty(K,se).get(),ve=I.isArrayOrTypedArray(ee)&&Tt?Tt(ee):ee;if(A&&ve&&Mt!==void 0&&(ve=Mt),Lt){if(veLt[1])return Lt[1]}return ve}function Pt(se){return it._distinct&&it.index&&se[it.index]?se[it.index]:se[0]}if(vt||ft||at){var qt={},Wt={};if(vt){qt.mc=It("marker.color",Pt),qt.mx=It("marker.symbol",Pt),qt.mo=It("marker.opacity",I.mean,[.2,1]),qt.mlc=It("marker.line.color",Pt),qt.mlw=It("marker.line.width",I.mean,[0,5],x),Wt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Jt=It("marker.size",I.mean,[2,16],l);qt.ms=Jt,Wt.marker.size=Jt}at&&(Wt.line={width:It("line.width",Pt,[0,10],f)}),ft&&(qt.tx="Aa",qt.tp=It("textposition",Pt),qt.ts=10,qt.tc=It("textfont.color",Pt),qt.tf=It("textfont.family",Pt),qt.tw=It("textfont.weight",Pt),qt.ty=It("textfont.style",Pt),qt.tv=It("textfont.variant",Pt),qt.tC=It("textfont.textcase",Pt),qt.tE=It("textfont.lineposition",Pt),qt.tS=It("textfont.shadow",Pt)),ut=[I.minExtend(it,qt)],kt=I.minExtend(K,Wt),kt.selectedpoints=null,kt.texttemplate=null}var ge=c.select(this).select("g.legendpoints"),fe=ge.selectAll("path.scatterpts").data(vt?ut:[]);fe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",k),fe.exit().remove(),fe.call(t.pointStyle,kt,P),vt&&(ut[0].mrc=3);var pe=ge.selectAll("g.pointtext").data(ft?ut:[]);pe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",k),pe.exit().remove(),pe.selectAll("text").call(t.textPointStyle,kt,P)}function j(st){var tt=st[0].trace,pt=tt.type==="waterfall";if(st[0]._distinct&&pt){var rt=st[0].trace[st[0].dir].marker;return st[0].mc=rt.color,st[0].mlw=rt.line.width,st[0].mlc=rt.line.color,F(st,this,"waterfall")}var at=[];tt.visible&&pt&&(at=st[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 vt=c.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(at);vt.enter().append("path").classed("legendwaterfall",!0).attr("transform",k).style("stroke-miterlimit",1),vt.exit().remove(),vt.each(function(it){var K=c.select(this),ft=tt[it[0]].marker,ut=w(void 0,ft.line,v,x);K.attr("d",it[1]).style("stroke-width",ut+"px").call(e.fill,ft.color),ut&&K.call(e.stroke,ft.line.color)})}function V(st){F(st,this)}function H(st){F(st,this,"funnel")}function F(st,tt,pt){var rt=st[0].trace,at=rt.marker||{},vt=at.line||{},it=at.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",K=pt?rt.visible&&rt.type===pt:g.traceIs(rt,"bar"),ft=c.select(tt).select("g.legendpoints").selectAll("path.legend"+pt).data(K?[st]:[]);ft.enter().append("path").classed("legend"+pt,!0).attr("d",it).attr("transform",k),ft.exit().remove(),ft.each(function(ut){var kt=c.select(this),It=ut[0],Pt=w(It.mlw,at.line,v,x);kt.style("stroke-width",Pt+"px");var qt=It.mcc;if(!M._inHover&&"mc"in It){var Wt=r(at),Jt=Wt.mid;Jt===void 0&&(Jt=(Wt.max+Wt.min)/2),qt=t.tryColorscale(at,"")(Jt)}var ge=qt||It.mc||at.color,fe=at.pattern,pe=t.getPatternAttr,se=fe&&(pe(fe.shape,0,"")||pe(fe.path,0,""));if(se){var Tt=pe(fe.bgcolor,0,null),Lt=pe(fe.fgcolor,0,null),Mt=fe.fgopacity,ee=b(fe.size,8,10),ve=b(fe.solidity,.5,1),oe="legend-"+rt.uid;kt.call(t.pattern,"legend",P,oe,se,ee,ve,qt,fe.fillmode,Tt,Lt,Mt)}else kt.call(e.fill,ge);Pt&&e.stroke(kt,It.mlc||vt.color)})}function U(st){var tt=st[0].trace,pt=c.select(this).select("g.legendpoints").selectAll("path.legendbox").data(tt.visible&&g.traceIs(tt,"box-violin")?[st]:[]);pt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),pt.exit().remove(),pt.each(function(){var rt=c.select(this);if((tt.boxpoints==="all"||tt.points==="all")&&e.opacity(tt.fillcolor)===0&&e.opacity((tt.line||{}).color)===0){var at=I.minExtend(tt,{marker:{size:A?l:I.constrain(tt.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});pt.call(t.pointStyle,at,P)}else{var vt=w(void 0,tt.line,v,x);rt.style("stroke-width",vt+"px").call(e.fill,tt.fillcolor),vt&&e.stroke(rt,tt.line.color)}})}function W(st){var tt=st[0].trace,pt=c.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(tt.visible&&tt.type==="candlestick"?[st,st]:[]);pt.enter().append("path").classed("legendcandle",!0).attr("d",function(rt,at){return at?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",k).style("stroke-miterlimit",1),pt.exit().remove(),pt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],K=w(void 0,it.line,v,x);vt.style("stroke-width",K+"px").call(e.fill,it.fillcolor),K&&e.stroke(vt,it.line.color)})}function q(st){var tt=st[0].trace,pt=c.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(tt.visible&&tt.type==="ohlc"?[st,st]:[]);pt.enter().append("path").classed("legendohlc",!0).attr("d",function(rt,at){return at?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",k).style("stroke-miterlimit",1),pt.exit().remove(),pt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],K=w(void 0,it.line,v,x);vt.style("fill","none").call(t.dashLine,it.line.dash,K),K&&e.stroke(vt,it.line.color)})}function J(st){yt(st,this,"pie")}function lt(st){yt(st,this,"funnelarea")}function yt(st,tt,pt){var rt=st[0],at=rt.trace,vt=pt?at.visible&&at.type===pt:g.traceIs(at,pt),it=c.select(tt).select("g.legendpoints").selectAll("path.legend"+pt).data(vt?[st]:[]);if(it.enter().append("path").classed("legend"+pt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),it.exit().remove(),it.size()){var K=at.marker||{},ft=w(o(K.line.width,rt.pts),K.line,v,x),ut="pieLike",kt=I.minExtend(at,{marker:{line:{width:ft}}},ut),It=I.minExtend(rt,{trace:kt},ut);n(it,It,kt,P)}}function mt(st){var tt=st[0].trace,pt,rt=[];if(tt.visible)switch(tt.type){case"histogram2d":case"heatmap":rt=[["M-15,-2V4H15V-2Z"]],pt=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":rt=[["M-6,-6V6H6V-6Z"]],pt=!0;break;case"densitymapbox":case"densitymap":rt=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],pt="radial";break;case"cone":rt=[["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"]],pt=!1;break;case"streamtube":rt=[["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"]],pt=!1;break;case"surface":rt=[["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"]],pt=!0;break;case"mesh3d":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],pt=!1;break;case"volume":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],pt=!0;break;case"isosurface":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],pt=!1;break}var at=c.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(rt);at.enter().append("path").classed("legend3dandfriends",!0).attr("transform",k).style("stroke-miterlimit",1),at.exit().remove(),at.each(function(vt,it){var K=c.select(this),ft=r(tt),ut=ft.colorscale,kt=ft.reversescale,It=function(Jt){if(Jt.size()){var ge="legendfill-"+tt.uid;t.gradient(Jt,P,ge,T(kt,pt==="radial"),ut,"fill")}},Pt;if(ut){if(!pt){var qt=ut.length;Pt=it===0?ut[kt?qt-1:0][1]:it===1?ut[kt?0:qt-1][1]:ut[Math.floor((qt-1)/2)][1]}}else{var Wt=tt.vertexcolor||tt.facecolor||tt.color;Pt=I.isArrayOrTypedArray(Wt)?Wt[it]||Wt[0]:Wt}K.attr("d",vt[0]),Pt?K.call(e.fill,Pt):K.call(It)})}};function T(_,P){var M=P?"radial":"horizontal";return M+(_?"":"reversed")}function u(_){var P=_[0].trace,M=P.contours,C=a.hasLines(P),A=a.hasMarkers(P),h=P.visible&&P.fill&&P.fill!=="none",p=!1,k=!1;if(M){var w=M.coloring;w==="lines"?p=!0:C=w==="none"||w==="heatmap"||M.showlines,M.type==="constraint"?h=M._operation!=="=":(w==="fill"||w==="heatmap")&&(k=!0)}return{showMarker:A,showLine:C,showFill:h,showGradientLine:p,showGradientFill:k,anyLine:C||p,anyFill:h||k}}function b(_,P,M){return _&&I.isArrayOrTypedArray(_)?P:_>M?M:_}}),R_=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=Kc(),S=Qo(),t=Nm(),e=cp(),r=Vs(),a=pi(),n=ec(),o=b6(),i=B_(),l=Af(),f=l.LINE_SPACING,x=l.FROM_TL,y=l.FROM_BR,v=kw(),T=Tw(),u=Vy(),b=1,_=/^legend[0-9]*$/;Z.exports=function(W,q){if(q)M(W,q);else{var J=W._fullLayout,lt=J._legends,yt=J._infolayer.selectAll('[class^="legend"]');yt.each(function(){var pt=c.select(this),rt=pt.attr("class"),at=rt.split(" ")[0];at.match(_)&<.indexOf(at)===-1&&pt.remove()});for(var mt=0;mt1)}var ft=lt.hiddenlabels||[];if(!tt&&(!lt.showlegend||!pt.length))return st.selectAll("."+yt).remove(),lt._topdefs.select("#"+mt).remove(),I.autoMargin(W,yt);var ut=g.ensureSingle(st,"g",yt,function(pe){tt||pe.attr("pointer-events","all")}),kt=g.ensureSingleById(lt._topdefs,"clipPath",mt,function(pe){pe.append("rect")}),It=g.ensureSingle(ut,"rect","bg",function(pe){pe.attr("shape-rendering","crispEdges")});It.call(a.stroke,J.bordercolor).call(a.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px");var Pt=g.ensureSingle(ut,"g","scrollbox"),qt=J.title;J._titleWidth=0,J._titleHeight=0;var Wt;qt.text?(Wt=g.ensureSingle(Pt,"text",yt+"titletext"),Wt.attr("text-anchor","start").call(r.font,qt.font).text(qt.text),w(Wt,Pt,W,J,b)):Pt.selectAll("."+yt+"titletext").remove();var Jt=g.ensureSingle(ut,"rect","scrollbar",function(pe){pe.attr(i.scrollBarEnterAttrs).call(a.fill,i.scrollBarColor)}),ge=Pt.selectAll("g.groups").data(pt);ge.enter().append("g").attr("class","groups"),ge.exit().remove();var fe=ge.selectAll("g.traces").data(g.identity);fe.enter().append("g").attr("class","traces"),fe.exit().remove(),fe.style("opacity",function(pe){var se=pe[0].trace;return S.traceIs(se,"pie-like")?ft.indexOf(pe[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){c.select(this).call(h,W,J)}).call(T,W,J).each(function(){tt||c.select(this).call(k,W,yt)}),g.syncOrAsync([I.previousPromises,function(){return j(W,ge,fe,J)},function(){var pe=lt._size,se=J.borderwidth,Tt=J.xref==="paper",Lt=J.yref==="paper";if(qt.text&&P(Wt,J,se),!tt){var Mt,ee;Tt?Mt=pe.l+pe.w*J.x-x[H(J)]*J._width:Mt=lt.width*J.x-x[H(J)]*J._width,Lt?ee=pe.t+pe.h*(1-J.y)-x[F(J)]*J._effHeight:ee=lt.height*(1-J.y)-x[F(J)]*J._effHeight;var ve=V(W,yt,Mt,ee);if(ve)return;if(lt.margin.autoexpand){var oe=Mt,Ae=ee;Mt=Tt?g.constrain(Mt,0,lt.width-J._width):oe,ee=Lt?g.constrain(ee,0,lt.height-J._effHeight):Ae,Mt!==oe&&g.log("Constrain "+yt+".x to make legend fit inside graph"),ee!==Ae&&g.log("Constrain "+yt+".y to make legend fit inside graph")}r.setTranslate(ut,Mt,ee)}if(Jt.on(".drag",null),ut.on("wheel",null),tt||J._height<=J._maxHeight||W._context.staticPlot){var He=J._effHeight;tt&&(He=J._height),It.attr({width:J._width-se,height:He-se,x:se/2,y:se/2}),r.setTranslate(Pt,0,0),kt.select("rect").attr({width:J._width-2*se,height:He-2*se,x:se,y:se}),r.setClipUrl(Pt,mt,W),r.setRect(Jt,0,0,0,0),delete J._scrollY}else{var Ge=Math.max(i.scrollBarMinHeight,J._effHeight*J._effHeight/J._height),cr=J._effHeight-Ge-2*i.scrollBarMargin,ur=J._height-J._effHeight,jr=cr/ur,qr=Math.min(J._scrollY||0,ur);It.attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-se,x:se/2,y:se/2}),kt.select("rect").attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-2*se,x:se,y:se+qr}),r.setClipUrl(Pt,mt,W),gt(qr,Ge,jr),ut.on("wheel",function(){qr=g.constrain(J._scrollY+c.event.deltaY/ur*cr,0,ur),gt(qr,Ge,jr),qr!==0&&qr!==ur&&c.event.preventDefault()});var br,Xr,nn,Le=function(ke,Ue,qe){var or=(qe-Ue)/jr+ke;return g.constrain(or,0,ur)},Gt=function(ke,Ue,qe){var or=(Ue-qe)/jr+ke;return g.constrain(or,0,ur)},ne=c.behavior.drag().on("dragstart",function(){var ke=c.event.sourceEvent;ke.type==="touchstart"?br=ke.changedTouches[0].clientY:br=ke.clientY,nn=qr}).on("drag",function(){var ke=c.event.sourceEvent;ke.buttons===2||ke.ctrlKey||(ke.type==="touchmove"?Xr=ke.changedTouches[0].clientY:Xr=ke.clientY,qr=Le(nn,br,Xr),gt(qr,Ge,jr))});Jt.call(ne);var Ct=c.behavior.drag().on("dragstart",function(){var ke=c.event.sourceEvent;ke.type==="touchstart"&&(br=ke.changedTouches[0].clientY,nn=qr)}).on("drag",function(){var ke=c.event.sourceEvent;ke.type==="touchmove"&&(Xr=ke.changedTouches[0].clientY,qr=Gt(nn,br,Xr),gt(qr,Ge,jr))});Pt.call(Ct)}function gt(ke,Ue,qe){J._scrollY=W._fullLayout[yt]._scrollY=ke,r.setTranslate(Pt,0,-ke),r.setRect(Jt,J._width,i.scrollBarMargin+ke*qe,i.scrollBarWidth,Ue),kt.select("rect").attr("y",se+ke)}if(W._context.edits.legendPosition){var St,Nt,re,le;ut.classed("cursor-move",!0),e.init({element:ut.node(),gd:W,prepFn:function(ke){if(ke.target!==Jt.node()){var Ue=r.getTranslate(ut);re=Ue.x,le=Ue.y}},moveFn:function(ke,Ue){if(re!==void 0&&le!==void 0){var qe=re+ke,or=le+Ue;r.setTranslate(ut,qe,or),St=e.align(qe,J._width,pe.l,pe.l+pe.w,J.xanchor),Nt=e.align(or+J._height,-J._height,pe.t+pe.h,pe.t,J.yanchor)}},doneFn:function(){if(St!==void 0&&Nt!==void 0){var ke={};ke[yt+".x"]=St,ke[yt+".y"]=Nt,S.call("_guiRelayout",W,ke)}},clickFn:function(ke,Ue){var qe=st.selectAll("g.traces").filter(function(){var or=this.getBoundingClientRect();return Ue.clientX>=or.left&&Ue.clientX<=or.right&&Ue.clientY>=or.top&&Ue.clientY<=or.bottom});qe.size()>0&&A(W,ut,qe,ke,Ue)}})}}],W)}}function C(W,q,J){var lt=W[0],yt=lt.width,mt=q.entrywidthmode,st=lt.trace.legendwidth||q.entrywidth;return mt==="fraction"?q._maxWidth*st:J+(st||yt)}function A(W,q,J,lt,yt){var mt=J.data()[0][0].trace,st={event:yt,node:J.node(),curveNumber:mt.index,expandedIndex:mt.index,data:W.data,layout:W.layout,frames:W._transitionData._frames,config:W._context,fullData:W._fullData,fullLayout:W._fullLayout};mt._group&&(st.group=mt._group),S.traceIs(mt,"pie-like")&&(st.label=J.datum()[0].label);var tt=t.triggerHandler(W,"plotly_legendclick",st);if(lt===1){if(tt===!1)return;q._clickTimeout=setTimeout(function(){W._fullLayout&&o(J,W,lt)},W._context.doubleClickDelay)}else if(lt===2){q._clickTimeout&&clearTimeout(q._clickTimeout),W._legendMouseDownTime=0;var pt=t.triggerHandler(W,"plotly_legenddoubleclick",st);pt!==!1&&tt!==!1&&o(J,W,lt)}}function h(W,q,J){var lt=U(J),yt=W.data()[0][0],mt=yt.trace,st=S.traceIs(mt,"pie-like"),tt=!J._inHover&&q._context.edits.legendText&&!st,pt=J._maxNameLength,rt,at;yt.groupTitle?(rt=yt.groupTitle.text,at=yt.groupTitle.font):(at=J.font,J.entries?rt=yt.text:(rt=st?yt.label:mt.name,mt._meta&&(rt=g.templateString(rt,mt._meta))));var vt=g.ensureSingle(W,"text",lt+"text");vt.attr("text-anchor","start").call(r.font,at).text(tt?p(rt,pt):rt);var it=J.indentation+J.itemwidth+i.itemGap*2;n.positionText(vt,it,0),tt?vt.call(n.makeEditable,{gd:q,text:rt}).call(w,W,q,J).on("edit",function(K){this.text(p(K,pt)).call(w,W,q,J);var ft=yt.trace._fullInput||{},ut={};return ut.name=K,ft._isShape?S.call("_guiRelayout",q,"shapes["+mt.index+"].name",ut.name):S.call("_guiRestyle",q,ut,mt.index)}):w(vt,W,q,J)}function p(W,q){var J=Math.max(4,q);if(W&&W.trim().length>=J/2)return W;W=W||"";for(var lt=J-W.length;lt>0;lt--)W+=" ";return W}function k(W,q,J){var lt=q._context.doubleClickDelay,yt,mt=1,st=g.ensureSingle(W,"rect",J+"toggle",function(tt){q._context.staticPlot||tt.style("cursor","pointer").attr("pointer-events","all"),tt.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(st.on("mousedown",function(){yt=new Date().getTime(),yt-q._legendMouseDownTimelt&&(mt=Math.max(mt-1,1)),A(q,tt,W,mt,c.event)}}))}function w(W,q,J,lt,yt){lt._inHover&&W.attr("data-notex",!0),n.convertToTspans(W,J,function(){B(q,J,lt,yt)})}function B(W,q,J,lt){var yt=W.data()[0][0];if(!J._inHover&&yt&&!yt.trace.showlegend){W.remove();return}var mt=W.select("g[class*=math-group]"),st=mt.node(),tt=U(J);J||(J=q._fullLayout[tt]);var pt=J.borderwidth,rt;lt===b?rt=J.title.font:yt.groupTitle?rt=yt.groupTitle.font:rt=J.font;var at=rt.size*f,vt,it;if(st){var K=r.bBox(st);vt=K.height,it=K.width,lt===b?r.setTranslate(mt,pt,pt+vt*.75):r.setTranslate(mt,0,vt*.25)}else{var ft="."+tt+(lt===b?"title":"")+"text",ut=W.select(ft),kt=n.lineCount(ut),It=ut.node();if(vt=at*kt,it=It?r.bBox(It).width:0,lt===b)J.title.side==="left"&&(it+=i.itemGap*2),n.positionText(ut,pt+i.titlePad,pt+at);else{var Pt=i.itemGap*2+J.indentation+J.itemwidth;yt.groupTitle&&(Pt=i.itemGap,it-=J.indentation+J.itemwidth),n.positionText(ut,Pt,-at*((kt-1)/2-.3))}}lt===b?(J._titleWidth=it,J._titleHeight=vt):(yt.lineHeight=at,yt.height=Math.max(vt,16)+3,yt.width=it)}function O(W){var q=0,J=0,lt=W.title.side;return lt&&(lt.indexOf("left")!==-1&&(q=W._titleWidth),lt.indexOf("top")!==-1&&(J=W._titleHeight)),[q,J]}function j(W,q,J,lt){var yt=W._fullLayout,mt=U(lt);lt||(lt=yt[mt]);var st=yt._size,tt=u.isVertical(lt),pt=u.isGrouped(lt),rt=lt.entrywidthmode==="fraction",at=lt.borderwidth,vt=2*at,it=i.itemGap,K=lt.indentation+lt.itemwidth+it*2,ft=2*(at+it),ut=F(lt),kt=lt.y<0||lt.y===0&&ut==="top",It=lt.y>1||lt.y===1&&ut==="bottom",Pt=lt.tracegroupgap,qt={};let{orientation:Wt,yref:Jt}=lt,{maxheight:ge}=lt,fe=kt||It||Wt!=="v"||Jt!=="paper";ge||(ge=fe?.5:1);let pe=fe?yt.height:st.h;lt._maxHeight=Math.max(ge>1?ge:ge*pe,30);var se=0;lt._width=0,lt._height=0;var Tt=O(lt);if(tt)J.each(function(gt){var St=gt[0].height;r.setTranslate(this,at+Tt[0],at+Tt[1]+lt._height+St/2+it),lt._height+=St,lt._width=Math.max(lt._width,gt[0].width)}),se=K+lt._width,lt._width+=it+K+vt,lt._height+=ft,pt&&(q.each(function(gt,St){r.setTranslate(this,0,St*lt.tracegroupgap)}),lt._height+=(lt._lgroupsLength-1)*lt.tracegroupgap);else{var Lt=H(lt),Mt=lt.x<0||lt.x===0&&Lt==="right",ee=lt.x>1||lt.x===1&&Lt==="left",ve=It||kt,oe=yt.width/2;lt._maxWidth=Math.max(Mt?ve&&Lt==="left"?st.l+st.w:oe:ee?ve&&Lt==="right"?st.r+st.w:oe:st.w,2*K);var Ae=0,He=0;J.each(function(gt){var St=C(gt,lt,K);Ae=Math.max(Ae,St),He+=St}),se=null;var Ge=0;if(pt){var cr=0,ur=0,jr=0;q.each(function(){var gt=0,St=0;c.select(this).selectAll("g.traces").each(function(re){var le=C(re,lt,K),ke=re[0].height;r.setTranslate(this,Tt[0],Tt[1]+at+it+ke/2+St),St+=ke,gt=Math.max(gt,le),qt[re[0].trace.legendgroup]=gt});var Nt=gt+it;ur>0&&Nt+at+ur>lt._maxWidth?(Ge=Math.max(Ge,ur),ur=0,jr+=cr+Pt,cr=St):cr=Math.max(cr,St),r.setTranslate(this,ur,jr),ur+=Nt}),lt._width=Math.max(Ge,ur)+at,lt._height=jr+cr+ft}else{var qr=J.size(),br=He+vt+(qr-1)*it=lt._maxWidth&&(Ge=Math.max(Ge,Gt),nn=0,Le+=Xr,lt._height+=Xr,Xr=0),r.setTranslate(this,Tt[0]+at+nn,Tt[1]+at+Le+St/2+it),Gt=nn+Nt+it,nn+=re,Xr=Math.max(Xr,St)}),br?(lt._width=nn+vt,lt._height=Xr+ft):(lt._width=Math.max(Ge,Gt)+vt,lt._height+=Xr+ft)}}lt._width=Math.ceil(Math.max(lt._width+Tt[0],lt._titleWidth+2*(at+i.titlePad))),lt._height=Math.ceil(Math.max(lt._height+Tt[1],lt._titleHeight+2*(at+i.itemGap))),lt._effHeight=Math.min(lt._height,lt._maxHeight);var ne=W._context.edits,Ct=ne.legendText||ne.legendPosition;J.each(function(gt){var St=c.select(this).select("."+mt+"toggle"),Nt=gt[0].height,re=gt[0].trace.legendgroup,le=C(gt,lt,K);pt&&re!==""&&(le=qt[re]);var ke=Ct?K:se||le;!tt&&!rt&&(ke+=it/2),r.setRect(St,0,-Nt/2,ke,Nt)})}function V(W,q,J,lt){var yt=W._fullLayout,mt=yt[q],st=H(mt),tt=F(mt),pt=mt.xref==="paper",rt=mt.yref==="paper";W._fullLayout._reservedMargin[q]={};var at=mt.y<.5?"b":"t",vt=mt.x<.5?"l":"r",it={r:yt.width-J,l:J+mt._width,b:yt.height-lt,t:lt+mt._effHeight};if(pt&&rt)return I.autoMargin(W,q,{x:mt.x,y:mt.y,l:mt._width*x[st],r:mt._width*y[st],b:mt._effHeight*y[tt],t:mt._effHeight*x[tt]});pt?W._fullLayout._reservedMargin[q][at]=it[at]:rt||mt.orientation==="v"?W._fullLayout._reservedMargin[q][vt]=it[vt]:W._fullLayout._reservedMargin[q][at]=it[at]}function H(W){return g.isRightAnchor(W)?"right":g.isCenterAnchor(W)?"center":"left"}function F(W){return g.isBottomAnchor(W)?"bottom":g.isMiddleAnchor(W)?"middle":"top"}function U(W){return W._id||"legend"}}),N_=Dt(Q=>{var Z=Wr(),c=Hn(),g=ro(),I=kn(),S=I.pushUnique,t=I.strTranslate,e=I.strRotate,r=Nm(),a=ec(),n=Um(),o=Vs(),i=pi(),l=cp(),f=Ls(),x=ic().zindexSeparator,y=Qo(),v=Fp(),T=io(),u=Hy(),b=R_(),_=T.YANGLE,P=Math.PI*_/180,M=1/Math.sin(P),C=Math.cos(P),A=Math.sin(P),h=T.HOVERARROWSIZE,p=T.HOVERTEXTPAD,k={box:!0,ohlc:!0,violin:!0,candlestick:!0},w={scatter:!0,scattergl:!0,splom:!0};function B(K,ft){return K.distance-ft.distance}Q.hover=function(K,ft,ut,kt){K=I.getGraphDiv(K);var It=ft.target;I.throttle(K._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){O(K,ft,ut,kt,It)})},Q.loneHover=function(K,ft){var ut=!0;Array.isArray(K)||(ut=!1,K=[K]);var kt=ft.gd,It=at(kt),Pt=vt(kt),qt=K.map(function(Mt){var ee=Mt._x0||Mt.x0||Mt.x||0,ve=Mt._x1||Mt.x1||Mt.x||0,oe=Mt._y0||Mt.y0||Mt.y||0,Ae=Mt._y1||Mt.y1||Mt.y||0,He=Mt.eventData;if(He){var Ge=Math.min(ee,ve),cr=Math.max(ee,ve),ur=Math.min(oe,Ae),jr=Math.max(oe,Ae),qr=Mt.trace;if(y.traceIs(qr,"gl3d")){var br=kt._fullLayout[qr.scene]._scene.container,Xr=br.offsetLeft,nn=br.offsetTop;Ge+=Xr,cr+=Xr,ur+=nn,jr+=nn}He.bbox={x0:Ge+Pt,x1:cr+Pt,y0:ur+It,y1:jr+It},ft.inOut_bbox&&ft.inOut_bbox.push(He.bbox)}else He=!1;return{color:Mt.color||i.defaultLine,x0:Mt.x0||Mt.x||0,x1:Mt.x1||Mt.x||0,y0:Mt.y0||Mt.y||0,y1:Mt.y1||Mt.y||0,xLabel:Mt.xLabel,yLabel:Mt.yLabel,zLabel:Mt.zLabel,text:Mt.text,name:Mt.name,idealAlign:Mt.idealAlign,borderColor:Mt.borderColor,fontFamily:Mt.fontFamily,fontSize:Mt.fontSize,fontColor:Mt.fontColor,fontWeight:Mt.fontWeight,fontStyle:Mt.fontStyle,fontVariant:Mt.fontVariant,nameLength:Mt.nameLength,textAlign:Mt.textAlign,trace:Mt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Mt.hovertemplate||!1,hovertemplateLabels:Mt.hovertemplateLabels||!1,eventData:He}}),Wt=!1,Jt=H(qt,{gd:kt,hovermode:"closest",rotateLabels:Wt,bgColor:ft.bgColor||i.background,container:Z.select(ft.container),outerContainer:ft.outerContainer||ft.container}),ge=Jt.hoverLabels,fe=5,pe=0,se=0;ge.sort(function(Mt,ee){return Mt.y0-ee.y0}).each(function(Mt,ee){var ve=Mt.y0-Mt.by/2;ve-feur[0]._length||ui<0||ui>jr[0]._length)return l.unhoverRaw(K,ft)}if(ft.pointerX=Di+ur[0]._offset,ft.pointerY=ui+jr[0]._offset,"xval"in ft?Ct=v.flat(Pt,ft.xval):Ct=v.p2c(ur,Di),"yval"in ft?gt=v.flat(Pt,ft.yval):gt=v.p2c(jr,ui),!c(Ct[0])||!c(gt[0]))return I.warn("Fx.hover failed",ft,K),l.unhoverRaw(K,ft)}var Yi=1/0;function We(Da,ys){for(Nt=0;Ntmr&&(Gt.splice(0,mr),Yi=Gt[0].distance),pe&&Le!==0&&Gt.length===0){Mr.distance=Le,Mr.index=!1;var ss=le._module.hoverPoints(Mr,or,Sr,"closest",{hoverLayer:Wt._hoverlayer});if(ss&&(ss=ss.filter(function(Po){return Po.spikeDistance<=Le})),ss&&ss.length){var cl,Qs=ss.filter(function(Po){return Po.xa.showspikes&&Po.xa.spikesnap!=="hovered data"});if(Qs.length){var jl=Qs[0];c(jl.x0)&&c(jl.y0)&&(cl=dr(jl),(!Qr.vLinePoint||Qr.vLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.vLinePoint=cl))}var cs=ss.filter(function(Po){return Po.ya.showspikes&&Po.ya.spikesnap!=="hovered data"});if(cs.length){var Ps=cs[0];c(Ps.x0)&&c(Ps.y0)&&(cl=dr(Ps),(!Qr.hLinePoint||Qr.hLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.hLinePoint=cl))}}}}}We();function nr(Da,ys,os){for(var ul=null,Go=1/0,Ks,ss=0;ssDa.trace.index===di.trace.index):Gt=[di];var za=Gt.length,qa=rt("x",di,Wt),Oe=rt("y",di,Wt);We(qa,Oe);var ze=[],Br={},$r=0,Gr=function(Da){var ys=k[Da.trace.type]?j(Da):Da.trace.index;if(!Br[ys])$r++,Br[ys]=$r,ze.push(Da);else{var os=Br[ys]-1,ul=ze[os];os>0&&Math.abs(Da.distance)za-1;Rr--)Gr(Gt[Rr]);Gt=ze,Cn()}var Yr=K._hoverdata,mn=[],on=at(K),Ce=vt(K);for(let Da of Gt){var pr=v.makeEventData(Da,Da.trace,Da.cd);if(Da.hovertemplate!==!1){var Hr=!1;Da.cd[Da.index]&&Da.cd[Da.index].ht&&(Hr=Da.cd[Da.index].ht),Da.hovertemplate=Hr||Da.trace.hovertemplate||!1}if(Da.xa&&Da.ya){var _n=Da.x0+Da.xa._offset,Bn=Da.x1+Da.xa._offset,ri=Da.y0+Da.ya._offset,Pn=Da.y1+Da.ya._offset,En=Math.min(_n,Bn),Yn=Math.max(_n,Bn),La=Math.min(ri,Pn),qi=Math.max(ri,Pn);pr.bbox={x0:En+Ce,x1:Yn+Ce,y0:La+on,y1:qi+on}}Da.eventData=[pr],mn.push(pr)}K._hoverdata=mn;var Qa=se==="y"&&(ne.length>1||Gt.length>1)||se==="closest"&&Wn&&Gt.length>1,Ja=i.combine(Wt.plot_bgcolor||i.background,Wt.paper_bgcolor),Do=H(Gt,{gd:K,hovermode:se,rotateLabels:Qa,bgColor:Ja,container:Wt._hoverlayer,outerContainer:Wt._paper.node(),commonLabelOpts:Wt.hoverlabel,hoverdistance:Wt.hoverdistance}),yo=Do.hoverLabels;if(v.isUnifiedHover(se)||(U(yo,Qa,Wt,Do.commonLabelBoundingBox),J(yo,Qa,Wt._invScaleX,Wt._invScaleY)),It&&It.tagName){var Bo=y.getComponentMethod("annotations","hasClickToShow")(K,mn);n(Z.select(It),Bo?"pointer":"")}!It||kt||!mt(K,ft,Yr)||(Yr&&K.emit("plotly_unhover",{event:ft,points:Yr}),K.emit("plotly_hover",{event:ft,points:K._hoverdata,xaxes:ur,yaxes:jr,xvals:Ct,yvals:gt}))}function j(K){return[K.trace.index,K.index,K.x0,K.y0,K.name,K.attr,K.xa?K.xa._id:"",K.ya?K.ya._id:""].join(",")}var V=/([\s\S]*)<\/extra>/;function H(K,ft){var ut=ft.gd,kt=ut._fullLayout,It=ft.hovermode,Pt=ft.rotateLabels,qt=ft.bgColor,Wt=ft.container,Jt=ft.outerContainer,ge=ft.commonLabelOpts||{};if(K.length===0)return[[]];var fe=ft.fontFamily||T.HOVERFONT,pe=ft.fontSize||T.HOVERFONTSIZE,se=ft.fontWeight||kt.font.weight,Tt=ft.fontStyle||kt.font.style,Lt=ft.fontVariant||kt.font.variant,Mt=ft.fontTextcase||kt.font.textcase,ee=ft.fontLineposition||kt.font.lineposition,ve=ft.fontShadow||kt.font.shadow,oe=K[0],Ae=oe.xa,He=oe.ya,Ge=It.charAt(0),cr=Ge+"Label",ur=oe[cr];if(ur===void 0&&Ae.type==="multicategory")for(var jr=0;jrkt.width-Ce&&(pr=kt.width-Ce),za.attr("d","M"+(Yr-pr)+",0L"+(Yr-pr+h)+","+on+h+"H"+Ce+"v"+on+(p*2+Rr.height)+"H"+-Ce+"V"+on+h+"H"+(Yr-pr-h)+"Z"),Yr=pr,Nt.minX=Yr-Ce,Nt.maxX=Yr+Ce,Ae.side==="top"?(Nt.minY=mn-(p*2+Rr.height),Nt.maxY=mn-p):(Nt.minY=mn+p,Nt.maxY=mn+(p*2+Rr.height))}else{var Hr,_n,Bn;He.side==="right"?(Hr="start",_n=1,Bn="",Yr=Ae._offset+Ae._length):(Hr="end",_n=-1,Bn="-",Yr=Ae._offset),mn=He._offset+(oe.y0+oe.y1)/2,qa.attr("text-anchor",Hr),za.attr("d","M0,0L"+Bn+h+","+h+"V"+(p+Rr.height/2)+"h"+Bn+(p*2+Rr.width)+"V-"+(p+Rr.height/2)+"H"+Bn+h+"V-"+h+"Z"),Nt.minY=mn-(p+Rr.height/2),Nt.maxY=mn+(p+Rr.height/2),He.side==="right"?(Nt.minX=Yr+h,Nt.maxX=Yr+h+(p*2+Rr.width)):(Nt.minX=Yr-h-(p*2+Rr.width),Nt.maxX=Yr-h);var ri=Rr.height/2,Pn=br-Rr.top-ri,En="clip"+kt._uid+"commonlabel"+He._id,Yn;if(Yrza.hoverinfo!=="none");if(di.length===0)return[];var re=kt.hoverlabel,le=re.font,ke=di[0],Ue=((It==="x unified"?ke.xa:ke.ya).unifiedhovertitle||{}).text,qe=Ue?I.hovertemplateString({data:It==="x unified"?[{xa:ke.xa,x:ke.xVal}]:[{ya:ke.ya,y:ke.yVal}],fallback:ke.trace.hovertemplatefallback,locale:kt._d3locale,template:Ue}):ur,or={showlegend:!0,legend:{title:{text:qe,font:le},font:le,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:kt.legend?kt.legend.traceorder:void 0,orientation:"v"}},Sr={font:le};u(or,Sr,ut._fullData);var Mr=Sr.legend;Mr.entries=[];for(var mr=0;mr=0?Ni=Tn:Mn+ua=0?Ni=Mn:mi+ua=0?Hi=tn:Cn+Yi=0?Hi=Cn:Mi+Yi=0,(di.idealAlign==="top"||!Qa)&&Ja?(Bn-=Pn/2,di.anchor="end"):Qa?(Bn+=Pn/2,di.anchor="start"):di.anchor="middle",di.crossPos=Bn;else{if(di.pos=Bn,Qa=_n+ri/2+qi<=Xr,Ja=_n-ri/2-qi>=0,(di.idealAlign==="left"||!Qa)&&Ja)_n-=ri/2,di.anchor="end";else if(Qa)_n+=ri/2,di.anchor="start";else{di.anchor="middle";var Do=qi/2,yo=_n+Do-Xr,Bo=_n-Do;yo>0&&(_n-=yo),Bo<0&&(_n+=-Bo)}di.crossPos=_n}mn.attr("text-anchor",di.anchor),Ce&&on.attr("text-anchor",di.anchor),za.attr("transform",t(_n,Bn)+(Pt?e(_):""))}),{hoverLabels:Ji,commonLabelBoundingBox:Nt}}function F(K,ft,ut,kt,It,Pt){var qt="",Wt="";K.nameOverride!==void 0&&(K.name=K.nameOverride),K.name&&(K.trace._meta&&(K.name=I.templateString(K.name,K.trace._meta)),qt=tt(K.name,K.nameLength));var Jt=ut.charAt(0),ge=Jt==="x"?"y":"x";K.zLabel!==void 0?(K.xLabel!==void 0&&(Wt+="x: "+K.xLabel+"
"),K.yLabel!==void 0&&(Wt+="y: "+K.yLabel+"
"),K.trace.type!=="choropleth"&&K.trace.type!=="choroplethmapbox"&&K.trace.type!=="choroplethmap"&&(Wt+=(Wt?"z: ":"")+K.zLabel)):ft&&K[Jt+"Label"]===It?Wt=K[ge+"Label"]||"":K.xLabel===void 0?K.yLabel!==void 0&&K.trace.type!=="scattercarpet"&&(Wt=K.yLabel):K.yLabel===void 0?Wt=K.xLabel:Wt="("+K.xLabel+", "+K.yLabel+")",(K.text||K.text===0)&&!Array.isArray(K.text)&&(Wt+=(Wt?"
":"")+K.text),K.extraText!==void 0&&(Wt+=(Wt?"
":"")+K.extraText),Pt&&Wt===""&&!K.hovertemplate&&(qt===""&&Pt.remove(),Wt=qt);let{hovertemplate:fe=!1}=K;if(fe){let pe=K.hovertemplateLabels||K;K[Jt+"Label"]!==It&&(pe[Jt+"other"]=pe[Jt+"Val"],pe[Jt+"otherLabel"]=pe[Jt+"Label"]),Wt=I.hovertemplateString({data:[K.eventData[0]||{},K.trace._meta],fallback:K.trace.hovertemplatefallback,labels:pe,locale:kt._d3locale,template:fe}),Wt=Wt.replace(V,(se,Tt)=>(qt=tt(Tt,K.nameLength),""))}return[Wt,qt]}function U(K,ft,ut,kt){var It=ft?"xa":"ya",Pt=ft?"ya":"xa",qt=0,Wt=1,Jt=K.size(),ge=new Array(Jt),fe=0,pe=kt.minX,se=kt.maxX,Tt=kt.minY,Lt=kt.maxY,Mt=function(Ct){return Ct*ut._invScaleX},ee=function(Ct){return Ct*ut._invScaleY};K.each(function(Ct){var gt=Ct[It],St=Ct[Pt],Nt=gt._id.charAt(0)==="x",re=gt.range;fe===0&&re&&re[0]>re[1]!==Nt&&(Wt=-1);var le=0,ke=Nt?ut.width:ut.height;if(ut.hovermode==="x"||ut.hovermode==="y"){var Ue=W(Ct,ft),qe=Ct.anchor,or=qe==="end"?-1:1,Sr,Mr;if(qe==="middle")Sr=Ct.crossPos+(Nt?ee(Ue.y-Ct.by/2):Mt(Ct.bx/2+Ct.tx2width/2)),Mr=Sr+(Nt?ee(Ct.by):Mt(Ct.bx));else if(Nt)Sr=Ct.crossPos+ee(h+Ue.y)-ee(Ct.by/2-h),Mr=Sr+ee(Ct.by);else{var mr=Mt(or*h+Ue.x),Qr=mr+Mt(or*Ct.bx);Sr=Ct.crossPos+Math.min(mr,Qr),Mr=Ct.crossPos+Math.max(mr,Qr)}Nt?Tt!==void 0&&Lt!==void 0&&Math.min(Mr,Lt)-Math.max(Sr,Tt)>1&&(St.side==="left"?(le=St._mainLinePosition,ke=ut.width):ke=St._mainLinePosition):pe!==void 0&&se!==void 0&&Math.min(Mr,se)-Math.max(Sr,pe)>1&&(St.side==="top"?(le=St._mainLinePosition,ke=ut.height):ke=St._mainLinePosition)}ge[fe++]=[{datum:Ct,traceIndex:Ct.trace.index,dp:0,pos:Ct.pos,posref:Ct.posref,size:Ct.by*(Nt?M:1)/2,pmin:le,pmax:ke}]}),ge.sort(function(Ct,gt){return Ct[0].posref-gt[0].posref||Wt*(gt[0].traceIndex-Ct[0].traceIndex)});var ve,oe,Ae,He,Ge,cr,ur;function jr(Ct){var gt=Ct[0],St=Ct[Ct.length-1];if(oe=gt.pmin-gt.pos-gt.dp+gt.size,Ae=St.pos+St.dp+St.size-gt.pmax,oe>.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp+=oe;ve=!1}if(!(Ae<.01)){if(oe<-.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp-=Ae;ve=!1}if(ve){var Nt=0;for(He=0;Hegt.pmax&&Nt++;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos>gt.pmax-1&&(cr.del=!0,Nt--);for(He=0;He=0;Ge--)Ct[Ge].dp-=Ae;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos+cr.dp+cr.size>gt.pmax&&(cr.del=!0,Nt--)}}}for(;!ve&&qt<=Jt;){for(qt++,ve=!0,He=0;He.01){for(Ge=br.length-1;Ge>=0;Ge--)br[Ge].dp+=oe;for(qr.push.apply(qr,br),ge.splice(He+1,1),ur=0,Ge=qr.length-1;Ge>=0;Ge--)ur+=qr[Ge].dp;for(Ae=ur/qr.length,Ge=qr.length-1;Ge>=0;Ge--)qr[Ge].dp-=Ae;ve=!1}else He++}ge.forEach(jr)}for(He=ge.length-1;He>=0;He--){var Le=ge[He];for(Ge=Le.length-1;Ge>=0;Ge--){var Gt=Le[Ge],ne=Gt.datum;ne.offset=Gt.dp,ne.del=Gt.del}}}function W(K,ft){var ut=0,kt=K.offset;return ft&&(kt*=-A,ut=K.offset*C),{x:ut,y:kt}}function q(K){var ft={start:1,end:-1,middle:0}[K.anchor],ut=ft*(h+p),kt=ut+ft*(K.txwidth+p),It=K.anchor==="middle";return It&&(ut-=K.tx2width/2,kt+=K.txwidth/2+p),{alignShift:ft,textShiftX:ut,text2ShiftX:kt}}function J(K,ft,ut,kt){var It=function(qt){return qt*ut},Pt=function(qt){return qt*kt};K.each(function(qt){var Wt=Z.select(this);if(qt.del)return Wt.remove();var Jt=Wt.select("text.nums"),ge=qt.anchor,fe=ge==="end"?-1:1,pe=q(qt),se=W(qt,ft),Tt=se.x,Lt=se.y,Mt=ge==="middle",ee="hoverlabel"in qt.trace?qt.trace.hoverlabel.showarrow:!0,ve;Mt?ve="M-"+It(qt.bx/2+qt.tx2width/2)+","+Pt(Lt-qt.by/2)+"h"+It(qt.bx)+"v"+Pt(qt.by)+"h-"+It(qt.bx)+"Z":ee?ve="M0,0L"+It(fe*h+Tt)+","+Pt(h+Lt)+"v"+Pt(qt.by/2-h)+"h"+It(fe*qt.bx)+"v-"+Pt(qt.by)+"H"+It(fe*h+Tt)+"V"+Pt(Lt-h)+"Z":ve="M"+It(fe*h+Tt)+","+Pt(Lt-qt.by/2)+"h"+It(fe*qt.bx)+"v"+Pt(qt.by)+"h"+It(-fe*qt.bx)+"Z",Wt.select("path").attr("d",ve);var oe=Tt+pe.textShiftX,Ae=Lt+qt.ty0-qt.by/2+p,He=qt.textAlign||"auto";He!=="auto"&&(He==="left"&&ge!=="start"?(Jt.attr("text-anchor","start"),oe=Mt?-qt.bx/2-qt.tx2width/2+p:-qt.bx-p):He==="right"&&ge!=="end"&&(Jt.attr("text-anchor","end"),oe=Mt?qt.bx/2-qt.tx2width/2-p:qt.bx+p)),Jt.call(a.positionText,It(oe),Pt(Ae)),qt.tx2width&&(Wt.select("text.name").call(a.positionText,It(pe.text2ShiftX+pe.alignShift*p+Tt),Pt(Lt+qt.ty0-qt.by/2+p)),Wt.select("rect").call(o.setRect,It(pe.text2ShiftX+(pe.alignShift-1)*qt.tx2width/2+Tt),Pt(Lt-qt.by/2-1),It(qt.tx2width),Pt(qt.by+2)))})}function lt(K,ft){var ut=K.index,kt=K.trace||{},It=K.cd[0],Pt=K.cd[ut]||{};function qt(se){return se||c(se)&&se===0}var Wt=Array.isArray(ut)?function(se,Tt){var Lt=I.castOption(It,ut,se);return qt(Lt)?Lt:I.extractOption({},kt,"",Tt)}:function(se,Tt){return I.extractOption(Pt,kt,se,Tt)};function Jt(se,Tt,Lt){var Mt=Wt(Tt,Lt);qt(Mt)&&(K[se]=Mt)}if(Jt("hoverinfo","hi","hoverinfo"),Jt("bgcolor","hbg","hoverlabel.bgcolor"),Jt("borderColor","hbc","hoverlabel.bordercolor"),Jt("fontFamily","htf","hoverlabel.font.family"),Jt("fontSize","hts","hoverlabel.font.size"),Jt("fontColor","htc","hoverlabel.font.color"),Jt("fontWeight","htw","hoverlabel.font.weight"),Jt("fontStyle","hty","hoverlabel.font.style"),Jt("fontVariant","htv","hoverlabel.font.variant"),Jt("nameLength","hnl","hoverlabel.namelength"),Jt("textAlign","hta","hoverlabel.align"),K.posref=ft==="y"||ft==="closest"&&kt.orientation==="h"?K.xa._offset+(K.x0+K.x1)/2:K.ya._offset+(K.y0+K.y1)/2,K.x0=I.constrain(K.x0,0,K.xa._length),K.x1=I.constrain(K.x1,0,K.xa._length),K.y0=I.constrain(K.y0,0,K.ya._length),K.y1=I.constrain(K.y1,0,K.ya._length),K.xLabelVal!==void 0&&(K.xLabel="xLabel"in K?K.xLabel:f.hoverLabelText(K.xa,K.xLabelVal,kt.xhoverformat),K.xVal=K.xa.c2d(K.xLabelVal)),K.yLabelVal!==void 0&&(K.yLabel="yLabel"in K?K.yLabel:f.hoverLabelText(K.ya,K.yLabelVal,kt.yhoverformat),K.yVal=K.ya.c2d(K.yLabelVal)),K.zLabelVal!==void 0&&K.zLabel===void 0&&(K.zLabel=String(K.zLabelVal)),!isNaN(K.xerr)&&!(K.xa.type==="log"&&K.xerr<=0)){var ge=f.tickText(K.xa,K.xa.c2l(K.xerr),"hover").text;K.xerrneg!==void 0?K.xLabel+=" +"+ge+" / -"+f.tickText(K.xa,K.xa.c2l(K.xerrneg),"hover").text:K.xLabel+=" ± "+ge,ft==="x"&&(K.distance+=1)}if(!isNaN(K.yerr)&&!(K.ya.type==="log"&&K.yerr<=0)){var fe=f.tickText(K.ya,K.ya.c2l(K.yerr),"hover").text;K.yerrneg!==void 0?K.yLabel+=" +"+fe+" / -"+f.tickText(K.ya,K.ya.c2l(K.yerrneg),"hover").text:K.yLabel+=" ± "+fe,ft==="y"&&(K.distance+=1)}var pe=K.hoverinfo||K.trace.hoverinfo;return pe&&pe!=="all"&&(pe=Array.isArray(pe)?pe:pe.split("+"),pe.indexOf("x")===-1&&(K.xLabel=void 0),pe.indexOf("y")===-1&&(K.yLabel=void 0),pe.indexOf("z")===-1&&(K.zLabel=void 0),pe.indexOf("text")===-1&&(K.text=void 0),pe.indexOf("name")===-1&&(K.name=void 0)),K}function yt(K,ft,ut){var kt=ut.container,It=ut.fullLayout,Pt=It._size,qt=ut.event,Wt=!!ft.hLinePoint,Jt=!!ft.vLinePoint,ge,fe;if(kt.selectAll(".spikeline").remove(),!!(Jt||Wt)){var pe=i.combine(It.plot_bgcolor,It.paper_bgcolor);if(Wt){var se=ft.hLinePoint,Tt,Lt;ge=se&&se.xa,fe=se&&se.ya;var Mt=fe.spikesnap;Mt==="cursor"?(Tt=qt.pointerX,Lt=qt.pointerY):(Tt=ge._offset+se.x,Lt=fe._offset+se.y);var ee=g.readability(se.color,pe)<1.5?i.contrast(pe):se.color,ve=fe.spikemode,oe=fe.spikethickness,Ae=fe.spikecolor||ee,He=f.getPxPosition(K,fe),Ge,cr;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(Ge=He,cr=Tt),ve.indexOf("across")!==-1){var ur=fe._counterDomainMin,jr=fe._counterDomainMax;fe.anchor==="free"&&(ur=Math.min(ur,fe.position),jr=Math.max(jr,fe.position)),Ge=Pt.l+ur*Pt.w,cr=Pt.l+jr*Pt.w}kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe,stroke:Ae,"stroke-dasharray":o.dashStyle(fe.spikedash,oe)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:He+(fe.side!=="right"?oe:-oe),cy:Lt,r:oe,fill:Ae}).classed("spikeline",!0)}if(Jt){var qr=ft.vLinePoint,br,Xr;ge=qr&&qr.xa,fe=qr&&qr.ya;var nn=ge.spikesnap;nn==="cursor"?(br=qt.pointerX,Xr=qt.pointerY):(br=ge._offset+qr.x,Xr=fe._offset+qr.y);var Le=g.readability(qr.color,pe)<1.5?i.contrast(pe):qr.color,Gt=ge.spikemode,ne=ge.spikethickness,Ct=ge.spikecolor||Le,gt=f.getPxPosition(K,ge),St,Nt;if(Gt.indexOf("toaxis")!==-1||Gt.indexOf("across")!==-1){if(Gt.indexOf("toaxis")!==-1&&(St=gt,Nt=Xr),Gt.indexOf("across")!==-1){var re=ge._counterDomainMin,le=ge._counterDomainMax;ge.anchor==="free"&&(re=Math.min(re,ge.position),le=Math.max(le,ge.position)),St=Pt.t+(1-le)*Pt.h,Nt=Pt.t+(1-re)*Pt.h}kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne,stroke:Ct,"stroke-dasharray":o.dashStyle(ge.spikedash,ne)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}Gt.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:br,cy:gt-(ge.side!=="top"?ne:-ne),r:ne,fill:Ct}).classed("spikeline",!0)}}}function mt(K,ft,ut){if(!ut||ut.length!==K._hoverdata.length)return!0;for(var kt=ut.length-1;kt>=0;kt--){var It=ut[kt],Pt=K._hoverdata[kt];if(It.curveNumber!==Pt.curveNumber||String(It.pointNumber)!==String(Pt.pointNumber)||String(It.pointNumbers)!==String(Pt.pointNumbers)||It.binNumber!==Pt.binNumber)return!0}return!1}function st(K,ft){return!0}function tt(K,ft){return a.plainText(K||"",{len:ft,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function pt(K,ft){for(var ut=ft.charAt(0),kt=[],It=[],Pt=[],qt=0;qtK.offsetTop+K.clientTop,vt=K=>K.offsetLeft+K.clientLeft;function it(K,ft){var ut=K._fullLayout,kt=ft.getBoundingClientRect(),It=kt.left,Pt=kt.top,qt=It+kt.width,Wt=Pt+kt.height,Jt=I.apply3DTransform(ut._invTransform)(It,Pt),ge=I.apply3DTransform(ut._invTransform)(qt,Wt),fe=Jt[0],pe=Jt[1],se=ge[0],Tt=ge[1];return{x:fe,y:pe,width:se-fe,height:Tt-pe,top:Math.min(pe,Tt),left:Math.min(fe,se),right:Math.max(fe,se),bottom:Math.max(pe,Tt)}}}),Ag=Dt((Q,Z)=>{var c=kn(),g=pi(),I=Fp().isUnifiedHover;Z.exports=function(S,t,e,r){r=r||{};var a=t.legend;function n(o){r.font[o]||(r.font[o]=a?t.legend.font[o]:t.font[o])}t&&I(t.hovermode)&&(r.font||(r.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(r.bgcolor||(r.bgcolor=g.combine(t.legend.bgcolor,t.paper_bgcolor)),r.bordercolor||(r.bordercolor=t.legend.bordercolor)):r.bgcolor||(r.bgcolor=t.paper_bgcolor)),e("hoverlabel.bgcolor",r.bgcolor),e("hoverlabel.bordercolor",r.bordercolor),e("hoverlabel.namelength",r.namelength),e("hoverlabel.showarrow",r.showarrow),c.coerceFont(e,"hoverlabel.font",r.font),e("hoverlabel.align",r.align)}}),Mg=Dt((Q,Z)=>{var c=kn(),g=Ag(),I=po();Z.exports=function(S,t){function e(r,a){return c.coerce(S,t,I,r,a)}g(S,t,e)}}),k6=Dt((Q,Z)=>{var c=kn(),g=us(),I=Ag();Z.exports=function(S,t,e,r){function a(o,i){return c.coerce(S,t,g,o,i)}var n=c.extendFlat({},r.hoverlabel);t.hovertemplate&&(n.namelength=-1),I(S,t,a,n)}}),gv=Dt((Q,Z)=>{var c=kn(),g=po();Z.exports=function(I,S){function t(e,r){return S[e]!==void 0?S[e]:c.coerce(I,S,g,e,r)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}),g0=Dt((Q,Z)=>{var c=kn(),g=po(),I=gv(),S=Ag();Z.exports=function(t,e){function r(x,y){return c.coerce(t,e,g,x,y)}var a=I(t,e);a&&(r("hoverdistance"),r("spikedistance"));var n=r("dragmode");n==="select"&&r("selectdirection");var o=e._has("mapbox"),i=e._has("map"),l=e._has("geo"),f=e._basePlotModules.length;e.dragmode==="zoom"&&((o||i||l)&&f===1||(o||i)&&l&&f===2)&&(e.dragmode="pan"),S(t,e,r),c.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}}),Aw=Dt((Q,Z)=>{var c=kn(),g=Qo();Z.exports=function(S){var t=S.calcdata,e=S._fullLayout;function r(l){return function(f){return c.coerceHoverinfo({hoverinfo:f},{_module:l._module},e)}}for(var a=0;a{var c=Qo(),g=N_().hover;Z.exports=function(I,S,t){var e=c.getComponentMethod("annotations","onClick")(I,I._hoverdata);t!==void 0&&g(I,S,t,!0);function r(){I.emit("plotly_click",{points:I._hoverdata,event:S})}I._hoverdata&&S&&S.target&&(e&&e.then?e.then(r):r(),S.stopImmediatePropagation&&S.stopImmediatePropagation())}}),tf=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=cp(),S=Fp(),t=po(),e=N_();Z.exports={moduleType:"component",name:"fx",constants:io(),schema:{layout:t},attributes:us(),layoutAttributes:t,supplyLayoutGlobalDefaults:Mg(),supplyDefaults:k6(),supplyLayoutDefaults:g0(),calc:Aw(),getDistanceFunction:S.getDistanceFunction,getClosest:S.getClosest,inbox:S.inbox,quadrature:S.quadrature,appendArrayPointValue:S.appendArrayPointValue,castHoverOption:a,castHoverinfo:n,hover:e.hover,unhover:I.unhover,loneHover:e.loneHover,loneUnhover:r,click:Mw()};function r(o){var i=g.isD3Selection(o)?o:c.select(o);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function a(o,i,l){return g.castOption(o,i,"hoverlabel."+l)}function n(o,i,l){function f(x){return g.coerceHoverinfo({hoverinfo:x},{_module:o._module},i)}return g.castOption(o,l,"hoverinfo",f)}}),v0=Dt(Q=>{Q.selectMode=function(Z){return Z==="lasso"||Z==="select"},Q.drawMode=function(Z){return Z==="drawclosedpath"||Z==="drawopenpath"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.openMode=function(Z){return Z==="drawline"||Z==="drawopenpath"},Q.rectMode=function(Z){return Z==="select"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.freeMode=function(Z){return Z==="lasso"||Z==="drawclosedpath"||Z==="drawopenpath"},Q.selectingOrDrawing=function(Z){return Q.freeMode(Z)||Q.rectMode(Z)}}),vv=Dt((Q,Z)=>{Z.exports=function(c){var g=c._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(I){I.regl&&I.regl.clear({color:!0,depth:!0})})}}),j_=Dt((Q,Z)=>{Z.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),U_=Dt((Q,Z)=>{var c=32;Z.exports={CIRCLE_SIDES:c,i000:0,i090:c/4,i180:c/2,i270:c/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Wy=Dt((Q,Z)=>{var c=kn().strTranslate;function g(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function I(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function S(e){var r=e._id.charAt(0)==="y"?1:0;return function(a){return g(e,a[r])}}function t(e){return c(e.xaxis._offset,e.yaxis._offset)}Z.exports={p2r:g,r2p:I,axValue:S,getTransform:t}}),Sg=Dt(Q=>{var Z=C1(),c=U_(),g=c.CIRCLE_SIDES,I=c.SQRT2,S=Wy(),t=S.p2r,e=S.r2p,r=[0,3,4,5,6,1,2],a=[0,3,4,1,2];Q.writePaths=function(i){var l=i.length;if(!l)return"M0,0Z";for(var f="",x=0;x0&&b{var c=Bc(),g=v0(),I=g.drawMode,S=g.openMode,t=U_(),e=t.i000,r=t.i090,a=t.i180,n=t.i270,o=t.cos45,i=t.sin45,l=Wy(),f=l.p2r,x=l.r2p,y=L0(),v=y.clearOutline,T=Sg(),u=T.readPaths,b=T.writePaths,_=T.ellipseOver,P=T.fixDatesForPaths;function M(A,h){if(A.length){var p=A[0][0];if(p){var k=h.gd,w=h.isActiveShape,B=h.dragmode,O=(k.layout||{}).shapes||[];if(!I(B)&&w!==void 0){var j=k._fullLayout._activeShapeIndex;if(j{var c=v0(),g=c.selectMode,I=L0(),S=I.clearOutline,t=Sg(),e=t.readPaths,r=t.writePaths,a=t.fixDatesForPaths;Z.exports=function(n,o){if(n.length){var i=n[0][0];if(i){var l=i.getAttribute("d"),f=o.gd,x=f._fullLayout.newselection,y=o.plotinfo,v=y.xaxis,T=y.yaxis,u=o.isActiveSelection,b=o.dragmode,_=(f.layout||{}).selections||[];if(!g(b)&&u!==void 0){var P=f._fullLayout._activeSelectionIndex;if(P<_.length)switch(f._fullLayout.selections[P].type){case"rect":b="select";break;case"path":b="lasso";break}}var M=e(l,f,y,u),C={xref:v._id,yref:T._id,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}},A;M.length===1&&(A=M[0]),A&&A.length===5&&b==="select"?(C.type="rect",C.x0=A[0][1],C.y0=A[0][2],C.x1=A[2][1],C.y1=A[2][2]):(C.type="path",v&&T&&a(M,v,T),C.path=r(M),A=null),S(f);for(var h=o.editHelpers,p=(h||{}).modifyItem,k=[],w=0;w<_.length;w++){var B=f._fullLayout.selections[w];if(!B){k[w]=B;continue}if(k[w]=B._input,u!==void 0&&w===f._fullLayout._activeSelectionIndex){var O=C;switch(B.type){case"rect":p("x0",O.x0),p("x1",O.x1),p("y0",O.y0),p("y1",O.y1);break;case"path":p("path",O.path);break}}}return u===void 0?(k.push(C),k):h?h.getUpdateObj():{}}}}}),qy=Dt((Q,Z)=>{Z.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),wp=Dt(Q=>{var Z=qy(),c=kn(),g=Ls();Q.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(e){return e}},Q.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(e){return e}},Q.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},Q.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},Q.extractPathCoords=function(t,e,r){var a=[],n=t.match(Z.segmentRE);return n.forEach(function(o){var i=e[o.charAt(0)].drawn;if(i!==void 0){var l=o.substr(1).match(Z.paramRE);if(!(!l||l.lengthu&&(_="X"),_});return x>u&&(b=b.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+f)),y+b})}function S(t,e){e=e||0;var r=0;return e&&t&&(t.type==="category"||t.type==="multicategory")&&(r=(t.r2p(1)-t.r2p(0))*e),r}}),Sw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=ec(),S=Vs(),t=Sg().readPaths,e=wp(),r=e.getPathString,a=w1(),n=Af().FROM_TL;Z.exports=function(l,f,x,y){if(y.selectAll(".shape-label").remove(),!!(x.label.text||x.label.texttemplate)){var v;if(x.label.texttemplate){var T={};if(x.type!=="path"){var u=g.getFromId(l,x.xref),b=g.getFromId(l,x.yref);for(var _ in a){var P=a[_](x,u,b);P!==void 0&&(T[_]=P)}}v=c.texttemplateStringForShapes({data:[T],fallback:x.label.texttemplatefallback,locale:l._fullLayout._d3locale,template:x.label.texttemplate})}else v=x.label.text;var M={"data-index":f},C=x.label.font,A={"data-notex":1},h=y.append("g").attr(M).classed("shape-label",!0),p=h.append("text").attr(A).classed("shape-label-text",!0).text(v),k,w,B,O;if(x.path){var j=r(l,x),V=t(j,l);k=1/0,B=1/0,w=-1/0,O=-1/0;for(var H=0;H=l?v=f-y:v=y-f,-180/Math.PI*Math.atan2(v,T)}function i(l,f,x,y,v,T,u){var b=v.label.textposition,_=v.label.textangle,P=v.label.padding,M=v.type,C=Math.PI/180*T,A=Math.sin(C),h=Math.cos(C),p=v.label.xanchor,k=v.label.yanchor,w,B,O,j;if(M==="line"){b==="start"?(w=l,B=f):b==="end"?(w=x,B=y):(w=(l+x)/2,B=(f+y)/2),p==="auto"&&(b==="start"?_==="auto"?x>l?p="left":xl?p="right":xl?p="right":xl?p="left":x{var c=kn(),g=c.strTranslate,I=cp(),S=v0(),t=S.drawMode,e=S.selectMode,r=Qo(),a=pi(),n=U_(),o=n.i000,i=n.i090,l=n.i180,f=n.i270,x=L0(),y=x.clearOutlineControllers,v=Sg(),T=v.pointsOnRectangle,u=v.pointsOnEllipse,b=v.writePaths,_=a0().newShapes,P=a0().createShapeObj,M=Eg(),C=Sw();Z.exports=function k(w,B,O,j){j||(j=0);var V=O.gd;function H(){k(w,B,O,j++),(u(w[0])||O.hasText)&&F({redrawing:!0})}function F(pe){var se={};O.isActiveShape!==void 0&&(O.isActiveShape=!1,se=_(B,O)),O.isActiveSelection!==void 0&&(O.isActiveSelection=!1,se=M(B,O),V._fullLayout._reselect=!0),Object.keys(se).length&&r.call((pe||{}).redrawing?"relayout":"_guiRelayout",V,se)}var U=V._fullLayout,W=U._zoomlayer,q=O.dragmode,J=t(q),lt=e(q);(J||lt)&&(V._fullLayout._outlining=!0),y(V),B.attr("d",b(w));var yt,mt,st,tt,pt;if(!j&&(O.isActiveShape||O.isActiveSelection)){pt=A([],w);var rt=W.append("g").attr("class","outline-controllers");It(rt),fe()}if(J&&O.hasText){var at=W.select(".label-temp"),vt=P(B,O,O.dragmode);C(V,"label-temp",vt,at)}function it(pe){st=+pe.srcElement.getAttribute("data-i"),tt=+pe.srcElement.getAttribute("data-j"),yt[st][tt].moveFn=K}function K(pe,se){if(w.length){var Tt=pt[st][tt][1],Lt=pt[st][tt][2],Mt=w[st],ee=Mt.length;if(T(Mt)){var ve=pe,oe=se;if(O.isActiveSelection){var Ae=h(Mt,tt);Ae[1]===Mt[tt][1]?oe=0:ve=0}for(var He=0;He1&&!(pe.length===2&&pe[1][0]==="Z")&&(tt===0&&(pe[0][0]="M"),w[st]=pe,H(),F())}}function kt(pe,se){if(pe===2){st=+se.srcElement.getAttribute("data-i"),tt=+se.srcElement.getAttribute("data-j");var Tt=w[st];!T(Tt)&&!u(Tt)&&ut()}}function It(pe){yt=[];for(var se=0;se{var c=Wr(),g=Qo(),I=kn(),S=Ls(),t=Sg().readPaths,e=Vm(),r=Sw(),a=L0().clearOutlineControllers,n=pi(),o=Vs(),i=mu().arrayEditor,l=cp(),f=I0(),x=qy(),y=wp(),v=y.getPathString;Z.exports={draw:T,drawOne:_,eraseActiveShape:p,drawLabel:r};function T(k){var w=k._fullLayout;w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._shapeUpperLayer.selectAll("text").remove(),w._shapeLowerLayer.selectAll("text").remove();for(var B in w._plots){var O=w._plots[B].shapelayer;O&&(O.selectAll("path").remove(),O.selectAll("text").remove())}for(var j=0;jH&&re>F&&!gt.shiftKey?l.getCursor(le/Nt,1-ke/re):"move";f(w,Ue),Ge=Ue.split("-")[0]}}function qr(gt){u(k)||(U&&(pt=Mt(B.xanchor)),W&&(rt=ee(B.yanchor)),B.type==="path"?Pt=B.path:(yt=U?B.x0:Mt(B.x0),mt=W?B.y0:ee(B.y0),st=U?B.x1:Mt(B.x1),tt=W?B.y1:ee(B.y1)),yttt?(at=mt,ft="y0",vt=tt,ut="y1"):(at=tt,ft="y1",vt=mt,ut="y0"),jr(gt),Gt(j,B),Ct(w,B,k),He.moveFn=Ge==="move"?nn:Le,He.altKey=gt.altKey)}function br(){u(k)||(f(w),ne(j),P(w,k,B),g.call("_guiRelayout",k,V.getUpdateObj()))}function Xr(){u(k)||ne(j)}function nn(gt,St){if(B.type==="path"){var Nt=function(ke){return ke},re=Nt,le=Nt;U?lt("xanchor",B.xanchor=ve(pt+gt)):(re=function(ke){return ve(Mt(ke)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",B.yanchor=oe(rt+St)):(le=function(ke){return oe(ee(ke)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",B.path=C(Pt,re,le))}else U?lt("xanchor",B.xanchor=ve(pt+gt)):(lt("x0",B.x0=ve(yt+gt)),lt("x1",B.x1=ve(st+gt))),W?lt("yanchor",B.yanchor=oe(rt+St)):(lt("y0",B.y0=oe(mt+St)),lt("y1",B.y1=oe(tt+St)));w.attr("d",v(k,B)),Gt(j,B),r(k,O,B,qt)}function Le(gt,St){if(J){var Nt=function(Gn){return Gn},re=Nt,le=Nt;U?lt("xanchor",B.xanchor=ve(pt+gt)):(re=function(Gn){return ve(Mt(Gn)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",B.yanchor=oe(rt+St)):(le=function(Gn){return oe(ee(Gn)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",B.path=C(Pt,re,le))}else if(q){if(Ge==="resize-over-start-point"){var ke=yt+gt,Ue=W?mt-St:mt+St;lt("x0",B.x0=U?ke:ve(ke)),lt("y0",B.y0=W?Ue:oe(Ue))}else if(Ge==="resize-over-end-point"){var qe=st+gt,or=W?tt-St:tt+St;lt("x1",B.x1=U?qe:ve(qe)),lt("y1",B.y1=W?or:oe(or))}}else{var Sr=function(Gn){return Ge.indexOf(Gn)!==-1},Mr=Sr("n"),mr=Sr("s"),Qr=Sr("w"),Wn=Sr("e"),qn=Mr?at+St:at,ei=mr?vt+St:vt,Di=Qr?it+gt:it,ui=Wn?K+gt:K;W&&(Mr&&(qn=at-St),mr&&(ei=vt-St)),(!W&&ei-qn>F||W&&qn-ei>F)&&(lt(ft,B[ft]=W?qn:oe(qn)),lt(ut,B[ut]=W?ei:oe(ei))),ui-Di>H&&(lt(kt,B[kt]=U?Di:ve(Di)),lt(It,B[It]=U?ui:ve(ui)))}w.attr("d",v(k,B)),Gt(j,B),r(k,O,B,qt)}function Gt(gt,St){(U||W)&&Nt();function Nt(){var re=St.type!=="path",le=gt.selectAll(".visual-cue").data([0]),ke=1;le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ke}).classed("visual-cue",!0);var Ue=Mt(U?St.xanchor:I.midRange(re?[St.x0,St.x1]:y.extractPathCoords(St.path,x.paramIsX))),qe=ee(W?St.yanchor:I.midRange(re?[St.y0,St.y1]:y.extractPathCoords(St.path,x.paramIsY)));if(Ue=y.roundPositionForSharpStrokeRendering(Ue,ke),qe=y.roundPositionForSharpStrokeRendering(qe,ke),U&&W){var or="M"+(Ue-1-ke)+","+(qe-1-ke)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";le.attr("d",or)}else if(U){var Sr="M"+(Ue-1-ke)+","+(qe-9-ke)+"v18 h2 v-18 Z";le.attr("d",Sr)}else{var Mr="M"+(Ue-9-ke)+","+(qe-1-ke)+"h18 v2 h-18 Z";le.attr("d",Mr)}}}function ne(gt){gt.selectAll(".visual-cue").remove()}function Ct(gt,St,Nt){var re=St.xref,le=St.yref,ke=S.getFromId(Nt,re),Ue=S.getFromId(Nt,le),qe="";re!=="paper"&&!ke.autorange&&(qe+=re),le!=="paper"&&!Ue.autorange&&(qe+=le),o.setClipUrl(gt,qe?"clip"+Nt._fullLayout._uid+qe:null,Nt)}}function C(k,w,B){return k.replace(x.segmentRE,function(O){var j=0,V=O.charAt(0),H=x.paramIsX[V],F=x.paramIsY[V],U=x.numParams[V],W=O.substr(1).replace(x.paramRE,function(q){return j>=U||(H[j]?q=w(q):F[j]&&(q=B(q)),j++),q});return V+W})}function A(k,w){if(b(k)){var B=w.node(),O=+B.getAttribute("data-index");if(O>=0){if(O===k._fullLayout._activeShapeIndex){h(k);return}k._fullLayout._activeShapeIndex=O,k._fullLayout._deactivateShape=h,T(k)}}}function h(k){if(b(k)){var w=k._fullLayout._activeShapeIndex;w>=0&&(a(k),delete k._fullLayout._activeShapeIndex,T(k))}}function p(k){if(b(k)){a(k);var w=k._fullLayout._activeShapeIndex,B=(k.layout||{}).shapes||[];if(w{var c=Qo(),g=Kc(),I=Bc(),S=j_(),t=V_().eraseActiveShape,e=kn(),r=e._,a=Z.exports={};a.toImage={name:"toImage",title:function(M){var C=M._context.toImageButtonOptions||{},A=C.format||"png";return A==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:S.camera,click:function(M){var C=M._context.toImageButtonOptions,A={format:C.format||"png"};e.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(h){h in C&&(A[h]=C[h])}),c.call("downloadImage",M,A).then(function(h){e.notifier(r(M,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){e.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},a.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.disk,click:function(M){g.sendDataToCloud(M)}},a.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.pencil,click:function(M){g.sendDataToCloud(M)}},a.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:n},a.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:n},a.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:n},a.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:n},a.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:n},a.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:n},a.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:n},a.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:n},a.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:n},a.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:S.eraseshape,click:t},a.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:n},a.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:n},a.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:n},a.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:n},a.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:n},a.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:n};function n(M,C){var A=C.currentTarget,h=A.getAttribute("data-attr"),p=A.getAttribute("data-val")||!0,k=M._fullLayout,w={},B=I.list(M,null,!0),O=k._cartesianSpikesEnabled,j,V;if(h==="zoom"){var H=p==="in"?.5:2,F=(1+H)/2,U=(1-H)/2,W,q;for(V=0;V{var c=yv(),g=Object.keys(c),I=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],S=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(I),t=[],e=function(r){if(S.indexOf(r._cat||r.name)===-1){var a=r.name,n=(r._cat||r.name).toLowerCase();t.indexOf(a)===-1&&t.push(a),t.indexOf(n)===-1&&t.push(n)}};g.forEach(function(r){e(c[r])}),t.sort(),Z.exports={DRAW_MODES:I,backButtons:S,foreButtons:t}}),L1=Dt((Q,Z)=>{H_(),Z.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),T6=Dt((Q,Z)=>{var c=kn(),g=pi(),I=mu(),S=L1();Z.exports=function(t,e){var r=t.modebar||{},a=I.newContainer(e,"modebar");function n(i,l){return c.coerce(r,a,S,i,l)}n("orientation"),n("bgcolor",g.addOpacity(e.paper_bgcolor,.5));var o=g.contrast(g.rgb(e.modebar.bgcolor));n("color",g.addOpacity(o,.3)),n("activecolor",g.addOpacity(o,.7)),n("uirevision",e.uirevision),n("add"),n("remove")}}),Hm=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=kn(),S=j_(),t=Vi().version,e=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=r.prototype;a.update=function(i,l){this.graphInfo=i;var f=this.graphInfo._context,x=this.graphInfo._fullLayout,y="modebar-"+x._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",f.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",l=l.reverse());var v=x.modebar,T="#"+y+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=v.bgcolor});var u=!this.hasButtons(l),b=this.hasLogo!==f.displaylogo,_=this.locale!==f.locale;if(this.locale=f.locale,(u||b||_)&&(this.removeAllButtons(),this.updateButtons(l),f.watermark||f.displaylogo)){var P=this.getLogo();f.watermark&&(P.className=P.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(P,this.element.childNodes[0]):this.element.appendChild(P),this.hasLogo=!0}this.updateActiveButton(),I.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},a.updateButtons=function(i){var l=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(f){var x=l.createGroup();f.forEach(function(y){var v=y.name;if(!v)throw new Error("must provide button 'name' in button config");if(l.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");l.buttonsNames.push(v);var T=l.createButton(y);l.buttonElements.push(T),x.appendChild(T)}),l.element.appendChild(x)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var l=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=l.bgcolor,i},a.createButton=function(i){var l=this,f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("rel","tooltip"),f.className="modebar-btn";var x=i.title;x===void 0?x=i.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(f.setAttribute("data-title",x),f.setAttribute("aria-label",x)),i.attr!==void 0&&f.setAttribute("data-attr",i.attr);var y=i.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),f.setAttribute("data-val",y));var v=i.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");f.addEventListener("click",function(u){i.click(l.graphInfo,u),l.updateActiveButton(u.currentTarget)}),f.setAttribute("data-toggle",i.toggle||!1),i.toggle&&c.select(f).classed("active",!0);var T=i.icon;return typeof T=="function"?f.appendChild(T()):f.appendChild(this.createIcon(T||S.question)),f.setAttribute("data-gravity",i.gravity||"n"),f},a.createIcon=function(i){var l=g(i.height)?Number(i.height):i.ascent-i.descent,f="http://www.w3.org/2000/svg",x;if(i.path){x=document.createElementNS(f,"svg"),x.setAttribute("viewBox",[0,0,i.width,l].join(" ")),x.setAttribute("class","icon");var y=document.createElementNS(f,"path");y.setAttribute("d",i.path),i.transform?y.setAttribute("transform",i.transform):i.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),x.appendChild(y)}if(i.svg){var v=e.parseFromString(i.svg,"application/xml");x=v.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},a.updateActiveButton=function(i){var l=this.graphInfo._fullLayout,f=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var y=x.getAttribute("data-val")||!0,v=x.getAttribute("data-attr"),T=x.getAttribute("data-toggle")==="true",u=c.select(x),b=function(M,C){var A=l.modebar,h=M.querySelector(".icon path");h&&(C||M.matches(":hover")?h.style.fill=A.activecolor:h.style.fill=A.color)};if(T){if(v===f){var _=!u.classed("active");u.classed("active",_),b(x,_)}}else{var P=v===null?v:I.nestedProperty(l,v).get();u.classed("active",P===y),b(x,P===y)}})},a.hasButtons=function(i){var l=this.buttons;if(!l||i.length!==l.length)return!1;for(var f=0;f{var c=Bc(),g=Tc(),I=Qo(),S=Fp().isUnifiedHover,t=Hm(),e=yv(),r=H_().DRAW_MODES,a=kn().extendDeep;Z.exports=function(y){var v=y._fullLayout,T=y._context,u=v._modeBar;if(!T.displayModeBar&&!T.watermark){u&&(u.destroy(),delete v._modeBar);return}if(!Array.isArray(T.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(T.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var b=T.modeBarButtons,_;Array.isArray(b)&&b.length?_=x(b):!T.displayModeBar&&T.watermark?_=[]:_=n(y),u?u.update(y,_):v._modeBar=t(y,_)};function n(y){var v=y._fullLayout,T=y._fullData,u=y._context;function b(K,ft){if(typeof ft=="string"){if(ft.toLowerCase()===K.toLowerCase())return!0}else{var ut=ft.name,kt=ft._cat||ft.name;if(ut===K||kt===K.toLowerCase())return!0}return!1}var _=v.modebar.add;typeof _=="string"&&(_=[_]);var P=v.modebar.remove;typeof P=="string"&&(P=[P]);var M=u.modeBarButtonsToAdd.concat(_.filter(function(K){for(var ft=0;ft1?(mt=["toggleHover"],st=["resetViews"]):p?(yt=["zoomInGeo","zoomOutGeo"],mt=["hoverClosestGeo"],st=["resetGeo"]):h?(mt=["hoverClosest3d"],st=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(yt=["zoomInMapbox","zoomOutMapbox"],mt=["toggleHover"],st=["resetViewMapbox"]):j?(yt=["zoomInMap","zoomOutMap"],mt=["toggleHover"],st=["resetViewMap"]):k?mt=["hoverClosestPie"]:F?(mt=["hoverClosestCartesian","hoverCompareCartesian"],st=["resetViewSankey"]):mt=["toggleHover"],A&&mt.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(l(T)||W)&&(mt=[]),A&&!U&&(yt=["zoomIn2d","zoomOut2d","autoScale2d"],st[0]!=="resetViews"&&(st=["resetScale2d"])),h?tt=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!U||B?tt=["zoom2d","pan2d"]:O||j||p?tt=["pan2d"]:V&&(tt=["zoom2d"]),i(T)&&tt.push("select2d","lasso2d");var pt=[],rt=function(K){pt.indexOf(K)===-1&&mt.indexOf(K)!==-1&&pt.push(K)};if(Array.isArray(M)){for(var at=[],vt=0;vt{Z.exports={moduleType:"component",name:"modebar",layoutAttributes:L1(),supplyLayoutDefaults:T6(),manage:$y()}}),Zy=Dt((Q,Z)=>{var c=Af().FROM_BL;Z.exports=function(g,I,S){S===void 0&&(S=c[g.constraintoward||"center"]);var t=[g.r2l(g.range[0]),g.r2l(g.range[1])],e=t[0]+(t[1]-t[0])*S;g.range=g._input.range=[g.l2r(e+(t[0]-e)*I),g.l2r(e+(t[1]-e)*I)],g.setScale()}}),xv=Dt(Q=>{var Z=kn(),c=K0(),g=Bc().id2name,I=Td(),S=Zy(),t=i0(),e=sa().ALMOST_EQUAL,r=Af().FROM_BL;Q.handleDefaults=function(y,v,T){var u=T.axIds,b=T.axHasImage,_=v._axisConstraintGroups=[],P=v._axisMatchGroups=[],M,C,A,h,p,k,w,B;for(M=0;M_?T.substr(_):u.substr(b))+P}function f(y,v){for(var T=v._size,u=T.h/T.w,b={},_=Object.keys(y),P=0;P<_.length;P++){var M=_[P],C=y[M];if(typeof C=="string"){var A=C.match(/^[xy]*/)[0],h=A.length;C=+C.substr(h);for(var p=A.charAt(0)==="y"?u:1/u,k=0;ke*w&&!V)){for(b=0;bst&&ftyt&&(yt=ft);var kt=(yt-lt)/(2*mt);h/=kt,lt=M.l2r(lt),yt=M.l2r(yt),M.range=M._input.range=W{var Z=Wr(),c=Qo(),g=Kc(),I=kn(),S=ec(),t=vv(),e=pi(),r=Vs(),a=up(),n=Ew(),o=Ls(),i=Af(),l=xv(),f=l.enforce,x=l.clean,y=K0().doAutoRange,v="start",T="middle",u="end",b=ic().zindexSeparator;Q.layoutStyles=function(F){return I.syncOrAsync([g.doAutoMargin,P],F)};function _(F,U,W){for(var q=0;q=F[1]||J[1]<=F[0])&<[0]U[0])return!0}return!1}function P(F){var U=F._fullLayout,W=U._size,q=W.p,J=o.list(F,"",!0),lt,yt,mt,st,tt,pt;if(U._paperdiv.style({width:F._context.responsive&&U.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":U.width+"px",height:F._context.responsive&&U.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":U.height+"px"}).selectAll(".main-svg").call(r.setSize,U.width,U.height),F._context.setBackground(F,U.paper_bgcolor),Q.drawMainTitle(F),n.manage(F),!U._has("cartesian"))return g.previousPromises(F);function rt(Ct,gt,St){var Nt=Ct._lw/2;if(Ct._id.charAt(0)==="x"){if(gt){if(St==="top")return gt._offset-q-Nt}else return W.t+W.h*(1-(Ct.position||0))+Nt%1;return gt._offset+gt._length+q+Nt}if(gt){if(St==="right")return gt._offset+gt._length+q+Nt}else return W.l+W.w*(Ct.position||0)+Nt%1;return gt._offset-q-Nt}for(lt=0;lt0){w(F,lt,tt,st),mt.attr({x:yt,y:lt,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,lt);var pt=(U.text.match(S.BR_TAG_ALL)||[]).length;if(pt){var rt=i.LINE_SPACING*pt+i.MID_SHIFT;U.y===0&&(rt=-rt),mt.selectAll(".line").each(function(){var ft=+this.getAttribute("dy").slice(0,-2)-rt+"em";this.setAttribute("dy",ft)})}var at=Z.select(F).selectAll(".gtitle-subtitle");if(at.node()){var vt=mt.node().getBBox(),it=vt.y+vt.height,K=it+a.SUBTITLE_PADDING_EM*U.subtitle.font.size;at.attr({x:yt,y:K,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,K)}}}};function h(F,U,W,q,J){var lt=U.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,yt=I.isTopAnchor(U)?q:q-J,mt=W==="b"?lt-yt:yt;return I.isTopAnchor(U)&&W==="t"||I.isBottomAnchor(U)&&W==="b"?!1:mt.5?"t":"b",yt=F._fullLayout.margin[lt],mt=0;return U.yref==="paper"?mt=W+U.pad.t+U.pad.b:U.yref==="container"&&(mt=p(lt,q,J,F._fullLayout.height,W)+U.pad.t+U.pad.b),mt>yt?mt:0}function w(F,U,W,q){var J="title.automargin",lt=F._fullLayout.title,yt=lt.y>.5?"t":"b",mt={x:lt.x,y:lt.y,t:0,b:0},st={};lt.yref==="paper"&&h(F,lt,yt,U,q)?mt[yt]=W:lt.yref==="container"&&(st[yt]=W,F._fullLayout._reservedMargin[J]=st),g.allowAutoMargin(F,J),g.autoMargin(F,J,mt)}function B(F,U){var W=F.title,q=F._size,J=0;switch(U===v?J=W.pad.l:U===u&&(J=-W.pad.r),W.xref){case"paper":return q.l+q.w*W.x+J;case"container":default:return F.width*W.x+J}}function O(F,U){var W=F.title,q=F._size,J=0;if(U==="0em"||!U?J=-W.pad.b:U===i.CAP_SHIFT+"em"&&(J=W.pad.t),W.y==="auto")return q.t/2;switch(W.yref){case"paper":return q.t+q.h-q.h*W.y+J;case"container":default:return F.height-F.height*W.y+J}}function j(F){return F==="top"?i.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function V(F){var U=F.title,W=T;return I.isRightAnchor(U)?W=u:I.isLeftAnchor(U)&&(W=v),W}function H(F){var U=F.title,W="0em";return I.isTopAnchor(U)?W=i.CAP_SHIFT+"em":I.isMiddleAnchor(U)&&(W=i.MID_SHIFT+"em"),W}Q.doTraceStyle=function(F){var U=F.calcdata,W=[],q;for(q=0;q{var c=Sg().readPaths,g=Vm(),I=L0().clearOutlineControllers,S=pi(),t=Vs(),e=mu().arrayEditor,r=wp(),a=r.getPathString;Z.exports={draw:n,drawOne:i,activateLastSelection:x};function n(v){var T=v._fullLayout;I(v),T._selectionLayer.selectAll("path").remove();for(var u in T._plots){var b=T._plots[u].selectionLayer;b&&b.selectAll("path").remove()}for(var _=0;_=0;V--){var H=M.append("path").attr(A).style("opacity",V?.1:h).call(S.stroke,k).call(S.fill,p).call(t.dashLine,V?"solid":B,V?4+w:w);if(l(H,v,b),O){var F=e(v.layout,"selections",b);H.style({cursor:"move"});var U={element:H.node(),plotinfo:_,gd:v,editHelpers:F,isActiveSelection:!0},W=c(C,v);g(W,H,U)}else H.style("pointer-events",V?"all":"none");j[V]=H}var q=j[0],J=j[1];J.node().addEventListener("click",function(){return f(v,q)})}}function l(v,T,u){var b=u.xref+u.yref;t.setClipUrl(v,"clip"+T._fullLayout._uid+b,T)}function f(v,T){if(o(v)){var u=T.node(),b=+u.getAttribute("data-index");if(b>=0){if(b===v._fullLayout._activeSelectionIndex){y(v);return}v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=y,n(v)}}}function x(v){if(o(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=y,n(v)}}function y(v){if(o(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(I(v),delete v._fullLayout._activeSelectionIndex,n(v))}}}),_v=Dt((Q,Z)=>{function c(){var g,I=0,S=!1;function t(e,r){return g.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),g}return g={list:[],segmentId:function(){return I++},checkIntersection:function(e,r){return t("check",{seg1:e,seg2:r})},segmentChop:function(e,r){return t("div_seg",{seg:e,pt:r}),t("chop",{seg:e,pt:r})},statusRemove:function(e){return t("pop_seg",{seg:e})},segmentUpdate:function(e){return t("seg_update",{seg:e})},segmentNew:function(e,r){return t("new_seg",{seg:e,primary:r})},segmentRemove:function(e){return t("rem_seg",{seg:e})},tempStatus:function(e,r,a){return t("temp_status",{seg:e,above:r,below:a})},rewind:function(e){return t("rewind",{seg:e})},status:function(e,r,a){return t("status",{seg:e,above:r,below:a})},vert:function(e){return e===S?g:(S=e,t("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),t("log",{txt:e})},reset:function(){return t("reset")},selected:function(e){return t("selected",{segs:e})},chainStart:function(e){return t("chain_start",{seg:e})},chainRemoveHead:function(e,r){return t("chain_rem_head",{index:e,pt:r})},chainRemoveTail:function(e,r){return t("chain_rem_tail",{index:e,pt:r})},chainNew:function(e,r){return t("chain_new",{pt1:e,pt2:r})},chainMatch:function(e){return t("chain_match",{index:e})},chainClose:function(e){return t("chain_close",{index:e})},chainAddHead:function(e,r){return t("chain_add_head",{index:e,pt:r})},chainAddTail:function(e,r){return t("chain_add_tail",{index:e,pt:r})},chainConnect:function(e,r){return t("chain_con",{index1:e,index2:r})},chainReverse:function(e){return t("chain_rev",{index:e})},chainJoin:function(e,r){return t("chain_join",{index1:e,index2:r})},done:function(){return t("done")}},g}Z.exports=c}),A6=Dt((Q,Z)=>{function c(g){typeof g!="number"&&(g=1e-10);var I={epsilon:function(S){return typeof S=="number"&&(g=S),g},pointAboveOrOnLine:function(S,t,e){var r=t[0],a=t[1],n=e[0],o=e[1],i=S[0],l=S[1];return(n-r)*(l-a)-(o-a)*(i-r)>=-g},pointBetween:function(S,t,e){var r=S[1]-t[1],a=e[0]-t[0],n=S[0]-t[0],o=e[1]-t[1],i=n*a+r*o;if(i-g)},pointsSameX:function(S,t){return Math.abs(S[0]-t[0])g!=n-r>g&&(a-l)*(r-f)/(n-f)+l-e>g&&(o=!o),a=l,n=f}return o}};return I}Z.exports=c}),pm=Dt((Q,Z)=>{var c={create:function(){var g={root:{root:!0,next:null},exists:function(I){return!(I===null||I===g.root)},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(I,S){for(var t=g.root,e=g.root.next;e!==null;){if(S(e)){I.prev=e.prev,I.next=e,e.prev.next=I,e.prev=I;return}t=e,e=e.next}t.next=I,I.prev=t,I.next=null},findTransition:function(I){for(var S=g.root,t=g.root.next;t!==null&&!I(t);)S=t,t=t.next;return{before:S===g.root?null:S,after:t,insert:function(e){return e.prev=S,e.next=t,S.next=e,t!==null&&(t.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}};Z.exports=c}),Gy=Dt((Q,Z)=>{var c=pm();function g(I,S,t){function e(T,u){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:null,below:null},otherFill:null}}function r(T,u,b){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=c.create();function n(T,u,b,_,P,M){var C=S.pointsCompare(u,P);return C!==0?C:S.pointsSame(b,M)?0:T!==_?T?1:-1:S.pointAboveOrOnLine(b,_?P:M,_?M:P)?1:-1}function o(T,u){a.insertBefore(T,function(b){var _=n(T.isStart,T.pt,u,b.isStart,b.pt,b.other.pt);return _<0})}function i(T,u){var b=c.node({isStart:!0,pt:T.start,seg:T,primary:u,other:null,status:null});return o(b,T.end),b}function l(T,u,b){var _=c.node({isStart:!1,pt:u.end,seg:u,primary:b,other:T,status:null});T.other=_,o(_,T.pt)}function f(T,u){var b=i(T,u);return l(b,T,u),b}function x(T,u){t&&t.segmentChop(T.seg,u),T.other.remove(),T.seg.end=u,T.other.pt=u,o(T.other,T.pt)}function y(T,u){var b=r(u,T.seg.end,T.seg);return x(T,u),f(b,T.primary)}function v(T,u){var b=c.create();function _(H,F){var U=H.seg.start,W=H.seg.end,q=F.seg.start,J=F.seg.end;return S.pointsCollinear(U,q,J)?S.pointsCollinear(W,q,J)||S.pointAboveOrOnLine(W,q,J)?1:-1:S.pointAboveOrOnLine(U,q,J)?1:-1}function P(H){return b.findTransition(function(F){var U=_(H,F.ev);return U>0})}function M(H,F){var U=H.seg,W=F.seg,q=U.start,J=U.end,lt=W.start,yt=W.end;t&&t.checkIntersection(U,W);var mt=S.linesIntersect(q,J,lt,yt);if(mt===!1){if(!S.pointsCollinear(q,J,lt)||S.pointsSame(q,yt)||S.pointsSame(J,lt))return!1;var st=S.pointsSame(q,lt),tt=S.pointsSame(J,yt);if(st&&tt)return F;var pt=!st&&S.pointBetween(q,lt,yt),rt=!tt&&S.pointBetween(J,lt,yt);if(st)return rt?y(F,J):y(H,yt),F;pt&&(tt||(rt?y(F,J):y(H,yt)),y(F,q))}else mt.alongA===0&&(mt.alongB===-1?y(H,lt):mt.alongB===0?y(H,mt.pt):mt.alongB===1&&y(H,yt)),mt.alongB===0&&(mt.alongA===-1?y(F,q):mt.alongA===0?y(F,mt.pt):mt.alongA===1&&y(F,J));return!1}for(var C=[];!a.isEmpty();){var A=a.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let H=function(){if(p){var F=M(A,p);if(F)return F}return k?M(A,k):!1};t&&t.segmentNew(A.seg,A.primary);var h=P(A),p=h.before?h.before.ev:null,k=h.after?h.after.ev:null;t&&t.tempStatus(A.seg,p?p.seg:!1,k?k.seg:!1);var w=H();if(w){if(I){var B;A.seg.myFill.below===null?B=!0:B=A.seg.myFill.above!==A.seg.myFill.below,B&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(w.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){t&&t.rewind(A.seg);continue}if(I){var B;A.seg.myFill.below===null?B=!0:B=A.seg.myFill.above!==A.seg.myFill.below,k?A.seg.myFill.below=k.seg.myFill.above:A.seg.myFill.below=T,B?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;k?A.primary===k.primary?O=k.seg.otherFill.above:O=k.seg.myFill.above:O=A.primary?u:T,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,p?p.seg:!1,k?k.seg:!1),A.other.status=h.insert(c.node({ev:A}))}else{var j=A.status;if(j===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(j.prev)&&b.exists(j.next)&&M(j.prev.ev,j.next.ev),t&&t.statusRemove(j.ev.seg),j.remove(),!A.primary){var V=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=V}C.push(A.seg)}a.getHead().remove()}return t&&t.done(),C}return I?{addRegion:function(T){for(var u,b=T[T.length-1],_=0;_{function c(g,I,S){var t=[],e=[];return g.forEach(function(r){var a=r.start,n=r.end;if(I.pointsSame(a,n)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}S&&S.chainStart(r);var o={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},l=o;function f(O,j,V){return l.index=O,l.matches_head=j,l.matches_pt1=V,l===o?(l=i,!1):(l=null,!0)}for(var x=0;x{function c(I,S,t){var e=[];return I.forEach(function(r){var a=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);S[a]!==0&&e.push({id:t?t.segmentId():-1,start:r.start,end:r.end,myFill:{above:S[a]===1,below:S[a]===2},otherFill:null})}),t&&t.selected(e),e}var g={union:function(I,S){return c(I,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],S)},intersect:function(I,S){return c(I,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],S)},difference:function(I,S){return c(I,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],S)},differenceRev:function(I,S){return c(I,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],S)},xor:function(I,S){return c(I,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],S)}};Z.exports=g}),Yy=Dt((Q,Z)=>{var c={toPolygon:function(g,I){function S(r){if(r.length<=0)return g.segments({inverted:!1,regions:[]});function a(i){var l=i.slice(0,i.length-1);return g.segments({inverted:!1,regions:[l]})}for(var n=a(r[0]),o=1;o{var c=_v(),g=A6(),I=Gy(),S=Lw(),t=W_(),e=Yy(),r=!1,a=g(),n;n={buildLog:function(i){return i===!0?r=c():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return a.epsilon(i)},segments:function(i){var l=I(!0,a,r);return i.regions.forEach(l.addRegion),{segments:l.calculate(i.inverted),inverted:i.inverted}},combine:function(i,l){var f=I(!1,a,r);return{combined:f.calculate(i.segments,i.inverted,l.segments,l.inverted),inverted1:i.inverted,inverted2:l.inverted}},selectUnion:function(i){return{segments:t.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:t.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:t.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:t.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:t.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:S(i.segments,a,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return e.toPolygon(n,i)},polygonToGeoJSON:function(i){return e.fromPolygon(n,a,i)},union:function(i,l){return o(i,l,n.selectUnion)},intersect:function(i,l){return o(i,l,n.selectIntersect)},difference:function(i,l){return o(i,l,n.selectDifference)},differenceRev:function(i,l){return o(i,l,n.selectDifferenceRev)},xor:function(i,l){return o(i,l,n.selectXor)}};function o(i,l,f){var x=n.segments(i),y=n.segments(l),v=n.combine(x,y),T=f(v);return n.polygon(T)}typeof window=="object"&&(window.PolyBool=n),Z.exports=n}),Ky=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=c[0],e=c[1],r=!1;I===void 0&&(I=0),S===void 0&&(S=g.length);for(var a=S-I,n=0,o=a-1;ne!=x>e&&t<(f-i)*(e-l)/(x-l)+i;y&&(r=!r)}return r}}),mm=Dt((Q,Z)=>{var c=S_().dot,g=sa().BADNUM,I=Z.exports={};I.tester=function(S){var t=S.slice(),e=t[0][0],r=e,a=t[0][1],n=a,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;or||_===g||_n||u&&l(T))}function x(T,u){var b=T[0],_=T[1];if(b===g||br||_===g||_n)return!1;var P=t.length,M=t[0][0],C=t[0][1],A=0,h,p,k,w,B;for(h=1;hMath.max(p,M)||_>Math.max(k,C)))if(_o||Math.abs(c(x,l))>r)return!0;return!1},I.filter=function(S,t){var e=[S[0]],r=0,a=0;function n(i){S.push(i);var l=e.length,f=r;e.splice(a+1);for(var x=f+1;x1){var o=S.pop();n(o)}return{addPt:n,raw:S,filtered:e}}}),Xy=Dt((Q,Z)=>{Z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),$_=Dt((Q,Z)=>{var c=q_(),g=Ky(),I=Qo(),S=Vs().dashStyle,t=pi(),e=tf(),r=Fp().makeEventData,a=v0(),n=a.freeMode,o=a.rectMode,i=a.drawMode,l=a.openMode,f=a.selectMode,x=wp(),y=qy(),v=Vm(),T=L0().clearOutline,u=Sg(),b=u.handleEllipse,_=u.readPaths,P=a0().newShapes,M=Eg(),C=Cw().activateLastSelection,A=kn(),h=A.sorterAsc,p=mm(),k=L_(),w=Bc().getFromId,B=vv(),O=y0().redrawReglTraces,j=Xy(),V=j.MINSELECT,H=p.filter,F=p.tester,U=Wy(),W=U.p2r,q=U.axValue,J=U.getTransform;function lt(Gt){return Gt.subplot!==void 0}function yt(Gt,ne,Ct,gt,St){var Nt=!lt(gt),re=n(St),le=o(St),ke=l(St),Ue=i(St),qe=f(St),or=St==="drawline",Sr=St==="drawcircle",Mr=or||Sr,mr=gt.gd,Qr=mr._fullLayout,Wn=qe&&Qr.newselection.mode==="immediate"&&Nt,qn=Qr._zoomlayer,ei=gt.element.getBoundingClientRect(),Di=gt.plotinfo,ui=J(Di),Gn=ne-ei.left,ua=Ct-ei.top;Qr._calcInverseTransform(mr);var Yi=A.apply3DTransform(Qr._invTransform)(Gn,ua);Gn=Yi[0],ua=Yi[1];var We=Qr._invScaleX,nr=Qr._invScaleY,dr=Gn,_r=ua,tn="M"+Gn+","+ua,Cn=gt.xaxes[0],Tn=gt.yaxes[0],Mn=Cn._length,mi=Tn._length,Mi=Gt.altKey&&!(i(St)&&ke),Ni,Hi,Ji,di,za,qa,Oe;at(Gt,mr,gt),re&&(Ni=H([[Gn,ua]],j.BENDPX));var ze=qn.selectAll("path.select-outline-"+Di.id).data([1]),Br=Ue?Qr.newshape:Qr.newselection;Ue&&(gt.hasText=Br.label.text||Br.label.texttemplate);var $r=Ue&&!ke?Br.fillcolor:"rgba(0,0,0,0)",Gr=Br.line.color||(Nt?t.contrast(mr._fullLayout.plot_bgcolor):"#7f7f7f");ze.enter().append("path").attr("class","select-outline select-outline-"+Di.id).style({opacity:Ue?Br.opacity/2:1,"stroke-dasharray":S(Br.line.dash,Br.line.width),"stroke-width":Br.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,Gr).call(t.fill,$r).attr("fill-rule","evenodd").classed("cursor-move",!!Ue).attr("transform",ui).attr("d",tn+"Z");var Rr=qn.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",ui).attr("d","M0,0Z");if(Ue&>.hasText){var Yr=qn.select(".label-temp");Yr.empty()&&(Yr=qn.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var mn=Qr._uid+j.SELECTID,on=[],Ce=ut(mr,gt.xaxes,gt.yaxes,gt.subplot);Wn&&!Gt.shiftKey&&(gt._clearSubplotSelections=function(){if(Nt){var Hr=Cn._id,_n=Tn._id;oe(mr,Hr,_n,Ce);for(var Bn=(mr.layout||{}).selections||[],ri=[],Pn=!1,En=0;En=0){mr._fullLayout._deactivateShape(mr);return}if(!Ue){var Bn=Qr.clickmode;k.done(mn).then(function(){if(k.clear(mn),Hr===2){for(ze.remove(),za=0;za-1&&mt(_n,mr,gt.xaxes,gt.yaxes,gt.subplot,gt,ze),Bn==="event"&&nn(mr,void 0);e.click(mr,_n,Di.id)}).catch(A.error)}},gt.doneFn=function(){Rr.remove(),k.done(mn).then(function(){k.clear(mn),!Wn&&di&>.selectionDefs&&(di.subtract=Mi,gt.selectionDefs.push(di),gt.mergedPolygons.length=0,[].push.apply(gt.mergedPolygons,Ji)),(Wn||Ue)&&K(gt,Wn),gt.doneFnCompleted&>.doneFnCompleted(on),qe&&nn(mr,Oe)}).catch(A.error)}}function mt(Gt,ne,Ct,gt,St,Nt,re){var le=ne._hoverdata,ke=ne._fullLayout,Ue=ke.clickmode,qe=Ue.indexOf("event")>-1,or=[],Sr,Mr,mr,Qr,Wn,qn,ei,Di,ui,Gn;if(It(le)){at(Gt,ne,Nt),Sr=ut(ne,Ct,gt,St);var ua=Pt(le,Sr),Yi=ua.pointNumbers.length>0;if(Yi?Wt(Sr,ua):Jt(Sr)&&(ei=qt(ua))){for(re&&re.remove(),Gn=0;Gn=0}function it(Gt){return Gt._fullLayout._activeSelectionIndex>=0}function K(Gt,ne){var Ct=Gt.dragmode,gt=Gt.plotinfo,St=Gt.gd;vt(St)&&St._fullLayout._deactivateShape(St),it(St)&&St._fullLayout._deactivateSelection(St);var Nt=St._fullLayout,re=Nt._zoomlayer,le=i(Ct),ke=f(Ct);if(le||ke){var Ue=re.selectAll(".select-outline-"+gt.id);if(Ue&&St._fullLayout._outlining){var qe;le&&(qe=P(Ue,Gt)),qe&&I.call("_guiRelayout",St,{shapes:qe});var or;ke&&!lt(Gt)&&(or=M(Ue,Gt)),or&&(St._fullLayout._noEmitSelectedAtStart=!0,I.call("_guiRelayout",St,{selections:or}).then(function(){ne&&C(St)})),St._fullLayout._outlining=!1}}gt.selection={},gt.selection.selectionDefs=Gt.selectionDefs=[],gt.selection.mergedPolygons=Gt.mergedPolygons=[]}function ft(Gt){return Gt._id}function ut(Gt,ne,Ct,gt){if(!Gt.calcdata)return[];var St=[],Nt=ne.map(ft),re=Ct.map(ft),le,ke,Ue;for(Ue=0;Ue0,Nt=St?gt[0]:Ct;return ne.selectedpoints?ne.selectedpoints.indexOf(Nt)>-1:!1}function Wt(Gt,ne){var Ct=[],gt,St,Nt,re;for(re=0;re0&&Ct.push(gt);if(Ct.length===1&&(Nt=Ct[0]===ne.searchInfo,Nt&&(St=ne.searchInfo.cd[0].trace,St.selectedpoints.length===ne.pointNumbers.length))){for(re=0;re1||(ne+=gt.selectedpoints.length,ne>1)))return!1;return ne===1}function ge(Gt,ne,Ct){var gt;for(gt=0;gt-1&≠if(!re&&ne){var Hr=He(Gt,!0);if(Hr.length){var _n=Hr[0].xref,Bn=Hr[0].yref;if(_n&&Bn){var ri=ur(Hr),Pn=qr([w(Gt,_n,"x"),w(Gt,Bn,"y")]);Pn(on,ri)}}Gt._fullLayout._noEmitSelectedAtStart?Gt._fullLayout._noEmitSelectedAtStart=!1:pr&&nn(Gt,on),Sr._reselect=!1}if(!re&&Sr._deselect){var En=Sr._deselect;le=En.xref,ke=En.yref,ve(le,ke,qe)||oe(Gt,le,ke,gt),pr&&(on.points.length?nn(Gt,on):Le(Gt)),Sr._deselect=!1}return{eventData:on,selectionTesters:Ct}}function ee(Gt){var ne=Gt.calcdata;if(ne)for(var Ct=0;Ct{Z.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}]}),Jy=Dt((Q,Z)=>{Z.exports={axisRefDescription:function(c,g,I){return["If set to a",c,"axis id (e.g. *"+c+"* or","*"+c+"2*), the `"+c+"` position refers to a",c,"coordinate. If set to *paper*, the `"+c+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+I+"). If set to a",c,"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",g,"of the domain of that axis: e.g.,","*"+c+"2 domain* refers to the domain of the second",c," axis and a",c,"position of 0.5 refers to the","point between the",g,"and the",I,"of the domain of the","second",c,"axis."].join(" ")}}}),gm=Dt((Q,Z)=>{var c=Z_(),g=ma(),I=ic(),S=mu().templatedArray;Jy(),Z.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({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:c.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:c.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",I.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",I.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",I.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",I.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:g({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),vm=Dt((Q,Z)=>{Z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),z0=Dt((Q,Z)=>{Z.exports=function(c){return{valType:"color",editType:"style",anim:!0}}}),ef=Dt((Q,Z)=>{var c=ph().axisHoverFormat,{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=ma(),r=kd().dash,a=kd().pattern,n=Vs(),o=vm(),i=Ia().extendFlat,l=z0();function f(v){return{valType:"any",dflt:0,editType:"calc"}}function x(v){return{valType:"any",editType:"calc"}}function y(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Z.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:f(),yperiod:f(),xperiod0:x(),yperiod0:x(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:c("x"),yhoverformat:c("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:I(),texttemplatefallback:S({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:g({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},r,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:l(!0),fillgradient:i({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:a,marker:i({symbol:{valType:"enumerated",values:n.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("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"},t("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:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),G_=Dt((Q,Z)=>{var c=gm(),g=ef().line,I=kd().dash,S=Ia().extendFlat,t=Yc().overrideAll,e=mu().templatedArray;Jy(),Z.exports=t(e("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:S({},c.xref,{}),yref:S({},c.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:g.color,width:S({},g.width,{min:1,dflt:1}),dash:S({},I,{dflt:"dot"})}}),"arraydraw","from-root")}),M6=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=G_(),t=wp();Z.exports=function(r,a){I(r,a,{name:"selections",handleItemDefaults:e});for(var n=a.selections,o=0;o{Z.exports=function(c,g,I){I("newselection.mode");var S=I("newselection.line.width");S&&(I("newselection.line.color"),I("newselection.line.dash")),I("activeselection.fillcolor"),I("activeselection.opacity")}}),Cg=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=Bc();Z.exports=function(S){return function(t,e){var r=t[S];if(Array.isArray(r))for(var a=c.subplotsRegistry.cartesian,n=a.idRegex,o=e._subplots,i=o.xaxis,l=o.yaxis,f=o.cartesian,x=e._has("cartesian"),y=0;y{var c=Cw(),g=$_();Z.exports={moduleType:"component",name:"selections",layoutAttributes:G_(),supplyLayoutDefaults:M6(),supplyDrawNewSelectionDefaults:J0(),includeBasePlot:Cg()("selections"),draw:c.draw,drawOne:c.drawOne,reselect:g.reselect,prepSelect:g.prepSelect,clearOutline:g.clearOutline,clearSelectionsCache:g.clearSelectionsCache,selectOnClick:g.selectOnClick}}),P1=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=g.numberFormat,S=ro(),t=O_(),e=Qo(),r=g.strTranslate,a=ec(),n=pi(),o=Vs(),i=tf(),l=Ls(),f=I0(),x=cp(),y=v0(),v=y.selectingOrDrawing,T=y.freeMode,u=Af().FROM_TL,b=vv(),_=y0().redrawReglTraces,P=Kc(),M=Bc().getFromId,C=vf().prepSelect,A=vf().clearOutline,h=vf().selectOnClick,p=Zy(),k=ic(),w=k.MINDRAG,B=k.MINZOOM,O=!0;function j(kt,It,Pt,qt,Wt,Jt,ge,fe){var pe=kt._fullLayout._zoomlayer,se=ge+fe==="nsew",Tt=(ge+fe).length===1,Lt,Mt,ee,ve,oe,Ae,He,Ge,cr,ur,jr,qr,br,Xr,nn,Le,Gt,ne,Ct,gt,St,Nt,re;Pt+=It.yaxis._shift;function le(){if(Lt=It.xaxis,Mt=It.yaxis,cr=Lt._length,ur=Mt._length,He=Lt._offset,Ge=Mt._offset,ee={},ee[Lt._id]=Lt,ve={},ve[Mt._id]=Mt,ge&&fe)for(var ze=It.overlays,Br=0;Br=0){$r._fullLayout._deactivateShape($r);return}var Gr=$r._fullLayout.clickmode;if(pt($r),ze===2&&!Tt&&Hi(),se)Gr.indexOf("select")>-1&&h(Br,$r,oe,Ae,It.id,qe),Gr.indexOf("event")>-1&&i.click($r,Br,It.id);else if(ze===1&&Tt){var Rr=ge?Mt:Lt,Yr=ge==="s"||fe==="w"?0:1,mn=Rr._name+".range["+Yr+"]",on=U(Rr,Yr),Ce="left",pr="middle";if(Rr.fixedrange)return;ge?(pr=ge==="n"?"top":"bottom",Rr.side==="right"&&(Ce="right")):fe==="e"&&(Ce="right"),$r._context.showAxisRangeEntryBoxes&&c.select(Ue).call(a.makeEditable,{gd:$r,immediate:!0,background:$r._fullLayout.paper_bgcolor,text:String(on),fill:Rr.tickfont?Rr.tickfont.color:"#444",horizontalAlign:Ce,verticalAlign:pr}).on("edit",function(Hr){var _n=Rr.d2r(Hr);_n!==void 0&&e.call("_guiRelayout",$r,mn,_n)})}}x.init(qe);var Mr,mr,Qr,Wn,qn,ei,Di,ui,Gn,ua;function Yi(ze,Br,$r){var Gr=Ue.getBoundingClientRect();Mr=Br-Gr.left,mr=$r-Gr.top,kt._fullLayout._calcInverseTransform(kt);var Rr=g.apply3DTransform(kt._fullLayout._invTransform)(Mr,mr);Mr=Rr[0],mr=Rr[1],Qr={l:Mr,r:Mr,w:0,t:mr,b:mr,h:0},Wn=kt._hmpixcount?kt._hmlumcount/kt._hmpixcount:S(kt._fullLayout.plot_bgcolor).getLuminance(),qn="M0,0H"+cr+"V"+ur+"H0V0",ei=!1,Di="xy",ua=!1,ui=yt(pe,Wn,He,Ge,qn),Gn=mt(pe,He,Ge)}function We(ze,Br){if(kt._transitioningWithDuration)return!1;var $r=Math.max(0,Math.min(cr,Nt*ze+Mr)),Gr=Math.max(0,Math.min(ur,re*Br+mr)),Rr=Math.abs($r-Mr),Yr=Math.abs(Gr-mr);Qr.l=Math.min(Mr,$r),Qr.r=Math.max(Mr,$r),Qr.t=Math.min(mr,Gr),Qr.b=Math.max(mr,Gr);function mn(){Di="",Qr.r=Qr.l,Qr.t=Qr.b,Gn.attr("d","M0,0Z")}if(jr.isSubplotConstrained)Rr>B||Yr>B?(Di="xy",Rr/cr>Yr/ur?(Yr=Rr*ur/cr,mr>Gr?Qr.t=mr-Yr:Qr.b=mr+Yr):(Rr=Yr*cr/ur,Mr>$r?Qr.l=Mr-Rr:Qr.r=Mr+Rr),Gn.attr("d",it(Qr))):mn();else if(qr.isSubplotConstrained)if(Rr>B||Yr>B){Di="xy";var on=Math.min(Qr.l/cr,(ur-Qr.b)/ur),Ce=Math.max(Qr.r/cr,(ur-Qr.t)/ur);Qr.l=on*cr,Qr.r=Ce*cr,Qr.b=(1-on)*ur,Qr.t=(1-Ce)*ur,Gn.attr("d",it(Qr))}else mn();else!Xr||Yr0){var Hr;if(qr.isSubplotConstrained||!br&&Xr.length===1){for(Hr=0;Hr1&&(mn.maxallowed!==void 0&&Le===(mn.range[0]1&&(on.maxallowed!==void 0&&Gt===(on.range[0]=0?Math.min(kt,.9):1/(1/Math.max(kt,-.3)+3.222))}function lt(kt,It,Pt){return kt?kt==="nsew"?Pt?"":It==="pan"?"move":"crosshair":kt.toLowerCase()+"-resize":"pointer"}function yt(kt,It,Pt,qt,Wt){return kt.append("path").attr("class","zoombox").style({fill:It>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Pt,qt)).attr("d",Wt+"Z")}function mt(kt,It,Pt){return kt.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(It,Pt)).attr("d","M0,0Z")}function st(kt,It,Pt,qt,Wt,Jt){kt.attr("d",qt+"M"+Pt.l+","+Pt.t+"v"+Pt.h+"h"+Pt.w+"v-"+Pt.h+"h-"+Pt.w+"Z"),tt(kt,It,Wt,Jt)}function tt(kt,It,Pt,qt){Pt||(kt.transition().style("fill",qt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),It.transition().style("opacity",1).duration(200))}function pt(kt){c.select(kt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rt(kt){O&&kt.data&&kt._context.showTips&&(g.notifier(g._(kt,"Double-click to zoom back out"),"long"),O=!1)}function at(kt,It){return"M"+(kt.l-.5)+","+(It-B-.5)+"h-3v"+(2*B+1)+"h3ZM"+(kt.r+.5)+","+(It-B-.5)+"h3v"+(2*B+1)+"h-3Z"}function vt(kt,It){return"M"+(It-B-.5)+","+(kt.t-.5)+"v-3h"+(2*B+1)+"v3ZM"+(It-B-.5)+","+(kt.b+.5)+"v3h"+(2*B+1)+"v-3Z"}function it(kt){var It=Math.floor(Math.min(kt.b-kt.t,kt.r-kt.l,B)/2);return"M"+(kt.l-3.5)+","+(kt.t-.5+It)+"h3v"+-It+"h"+It+"v-3h-"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.t-.5+It)+"h-3v"+-It+"h"+-It+"v-3h"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.b+.5-It)+"h-3v"+It+"h"+-It+"v3h"+(It+3)+"ZM"+(kt.l-3.5)+","+(kt.b+.5-It)+"h3v"+It+"h"+It+"v3h-"+(It+3)+"Z"}function K(kt,It,Pt,qt,Wt){for(var Jt=!1,ge={},fe={},pe,se,Tt,Lt,Mt=(Wt||{}).xaHash,ee=(Wt||{}).yaHash,ve=0;ve{var Z=Wr(),c=tf(),g=cp(),I=I0(),S=P1().makeDragBox,t=ic().DRAGGERSIZE;Q.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot){Z.select(e).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var a=Object.keys(r._plots||{}).sort(function(o,i){if((r._plots[o].mainplot&&!0)===(r._plots[i].mainplot&&!0)){var l=o.split("y"),f=i.split("y");return l[0]===f[0]?Number(l[1]||1)-Number(f[1]||1):Number(l[0]||1)-Number(f[0]||1)}return r._plots[o].mainplot?1:-1});a.forEach(function(o){var i=r._plots[o],l=i.xaxis,f=i.yaxis;if(!i.mainplot){var x=S(e,i,l._offset,f._offset,l._length,f._length,"ns","ew");x.onmousemove=function(T){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===o&&e._fullLayout._plots[o]&&c.hover(e,T,o)},c.hover(e,T,o),e._fullLayout._lasthover=x,e._fullLayout._hoversubplot=o},x.onmouseout=function(T){e._dragging||(e._fullLayout._hoversubplot=null,g.unhover(e,T))},e._context.showAxisDragHandles&&(S(e,i,l._offset-t,f._offset-t,t,t,"n","w"),S(e,i,l._offset+l._length,f._offset-t,t,t,"n","e"),S(e,i,l._offset-t,f._offset+f._length,t,t,"s","w"),S(e,i,l._offset+l._length,f._offset+f._length,t,t,"s","e"))}if(e._context.showAxisDragHandles){if(o===l._mainSubplot){var y=l._mainLinePosition;l.side==="top"&&(y-=t),S(e,i,l._offset+l._length*.1,y,l._length*.8,t,"","ew"),S(e,i,l._offset,y,l._length*.1,t,"","w"),S(e,i,l._offset+l._length*.9,y,l._length*.1,t,"","e")}if(o===f._mainSubplot){var v=f._mainLinePosition;f.side!=="right"&&(v-=t),S(e,i,v,f._offset+f._length*.1,t,f._length*.8,"ns",""),S(e,i,v,f._offset+f._length*.9,t,f._length*.1,"s",""),S(e,i,v,f._offset,t,f._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(o){o.target=e._fullLayout._lasthover,c.hover(e,o,r._hoversubplot)},n.onclick=function(o){o.target=e._fullLayout._lasthover,c.click(e,o)},n.onmousedown=function(o){e._fullLayout._lasthover.onmousedown(o)},Q.updateFx(e)}},Q.updateFx=function(e){var r=e._fullLayout,a=r.dragmode==="pan"?"move":"crosshair";I(r._draggers,a)}}),Iw=Dt((Q,Z)=>{var c=Qo();Z.exports=function(g){for(var I=c.layoutArrayContainers,S=c.layoutArrayRegexes,t=g.split("[")[0],e,r,a=0;a{var Z=Qn(),c=Ko(),g=as(),I=C_().sorterAsc,S=Qo();Q.containerArrayMatch=Iw();var t=Q.isAddVal=function(r){return r==="add"||Z(r)},e=Q.isRemoveVal=function(r){return r===null||r==="remove"};Q.applyContainerArrayChanges=function(r,a,n,o,i){var l=a.astr,f=S.getComponentMethod(l,"supplyLayoutDefaults"),x=S.getComponentMethod(l,"draw"),y=S.getComponentMethod(l,"drawOne"),v=o.replot||o.recalc||f===c||x===c,T=r.layout,u=r._fullLayout;if(n[""]){Object.keys(n).length>1&&g.warn("Full array edits are incompatible with other edits",l);var b=n[""][""];if(e(b))a.set(null);else if(Array.isArray(b))a.set(b);else return g.warn("Unrecognized full array edit value",l,b),!0;return v?!1:(f(T,u),x(r),!0)}var _=Object.keys(n).map(Number).sort(I),P=a.get(),M=P||[],C=i(u,l).get(),A=[],h=-1,p=M.length,k,w,B,O,j,V,H,F;for(k=0;k<_.length;k++){if(B=_[k],O=n[B],j=Object.keys(O),V=O[""],H=t(V),B<0||B>M.length-(H?0:1)){g.warn("index out of range",l,B);continue}if(V!==void 0)j.length>1&&g.warn("Insertion & removal are incompatible with edits to the same index.",l,B),e(V)?A.push(B):H?(V==="add"&&(V={}),M.splice(B,0,V),C&&C.splice(B,0,{})):g.warn("Unrecognized full object edit value",l,B,V),h===-1&&(h=B);else for(w=0;w=0;k--)M.splice(A[k],1),C&&C.splice(A[k],1);if(M.length?P||a.set(M):a.set(null),v)return!1;if(f(T,u),y!==c){var U;if(h===-1)U=_;else{for(p=Math.max(M.length,p),U=[],k=0;k<_.length&&(B=_[k],!(B>=h));k++)U.push(B);for(k=h;k{var Z=Hn(),c=Qo(),g=kn(),I=Kc(),S=Bc(),t=pi(),e=S.cleanId,r=S.getFromTrace,a=c.traceIs,n=["x","y","z"];Q.clearPromiseQueue=function(u){Array.isArray(u._promises)&&u._promises.length>0&&g.log("Clearing previous rejected promises from queue."),u._promises=[]},Q.cleanLayout=function(u){var b;u||(u={}),u.xaxis1&&(u.xaxis||(u.xaxis=u.xaxis1),delete u.xaxis1),u.yaxis1&&(u.yaxis||(u.yaxis=u.yaxis1),delete u.yaxis1),u.scene1&&(u.scene||(u.scene=u.scene1),delete u.scene1);var _=(I.subplotsRegistry.cartesian||{}).attrRegex;(I.subplotsRegistry.polar||{}).attrRegex,(I.subplotsRegistry.ternary||{}).attrRegex,(I.subplotsRegistry.gl3d||{}).attrRegex;var P=Object.keys(u);for(b=0;b3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),u.dragmode==="rotate"&&(u.dragmode="orbit"),t.clean(u),u.template&&u.template.layout&&Q.cleanLayout(u.template.layout),u};function o(u,b){var _=u[b],P=b.charAt(0);_&&_!=="paper"&&(u[b]=e(_,P,!0))}Q.cleanData=function(u){for(var b=0;b0)return u.substr(0,b)}Q.hasParent=function(u,b){for(var _=v(b);_;){if(_ in u)return!0;_=v(_)}return!1},Q.clearAxisTypes=function(u,b,_){for(var P=0;P{let _=(...P)=>P.every(M=>g.isPlainObject(M))||P.every(M=>Array.isArray(M));if([u,b].every(P=>Array.isArray(P))){if(u.length!==b.length)return!1;for(let P=0;Pg.isPlainObject(P))){if(Object.keys(u).length!==Object.keys(b).length)return!1;for(let P in u){if(P.startsWith("_"))continue;let M=u[P],C=b[P];if(M!==C&&!(_(M,C)&&T(M,C)))return!1}return!0}return!1};Q.collectionsAreEqual=T}),Y_=Dt(Q=>{var Z=Wr(),c=Hn(),g=Rf(),I=kn(),S=I.nestedProperty,t=Nm(),e=m0(),r=Qo(),a=jm(),n=Kc(),o=Ls(),i=z_(),l=Td(),f=Vs(),x=pi(),y=Pw().initInteractions,v=Dp(),T=vf().clearOutline,u=ms().dfltConfig,b=S6(),_=I1(),P=y0(),M=Yc(),C=ic().AX_NAME_PATTERN,A=0,h=5;function p(Ct,gt,St,Nt){var re;if(Ct=I.getGraphDiv(Ct),t.init(Ct),I.isPlainObject(gt)){var le=gt;gt=le.data,St=le.layout,Nt=le.config,re=le.frames}var ke=t.triggerHandler(Ct,"plotly_beforeplot",[gt,St,Nt]);if(ke===!1)return Promise.reject();!gt&&!St&&!I.isPlotDiv(Ct)&&I.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ct);function Ue(){if(re)return Q.addFrames(Ct,re)}j(Ct,Nt),St||(St={}),Z.select(Ct).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(Ct._promises)||(Ct._promises=[]);var qe=(Ct.data||[]).length===0&&Array.isArray(gt);Array.isArray(gt)&&(_.cleanData(gt),qe?Ct.data=gt:Ct.data.push.apply(Ct.data,gt),Ct.empty=!1),(!Ct.layout||qe)&&(Ct.layout=_.cleanLayout(St)),n.supplyDefaults(Ct);var or=Ct._fullLayout,Sr=or._has("cartesian");or._replotting=!0,(qe||or._shouldCreateBgLayer)&&(ne(Ct),or._shouldCreateBgLayer&&delete or._shouldCreateBgLayer),f.initGradients(Ct),f.initPatterns(Ct),qe&&o.saveShowSpikeInitial(Ct);var Mr=!Ct.calcdata||Ct.calcdata.length!==(Ct._fullData||[]).length;Mr&&n.doCalcdata(Ct);for(var mr=0;mr=Ct.data.length||re<-Ct.data.length)throw new Error(St+" must be valid indices for gd.data.");if(gt.indexOf(re,Nt+1)>-1||re>=0&>.indexOf(-Ct.data.length+re)>-1||re<0&>.indexOf(Ct.data.length+re)>-1)throw new Error("each index in "+St+" must be unique.")}}function W(Ct,gt,St){if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"currentIndices"),typeof St<"u"&&!Array.isArray(St)&&(St=[St]),typeof St<"u"&&U(Ct,St,"newIndices"),typeof St<"u"&>.length!==St.length)throw new Error("current and new indices must be of equal length.")}function q(Ct,gt,St){var Nt,re;if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("traces must be defined.");for(Array.isArray(gt)||(gt=[gt]),Nt=0;Nt"u")throw new Error("indices must be an integer or array of integers");U(Ct,St,"indices");for(var le in gt){if(!Array.isArray(gt[le])||gt[le].length!==St.length)throw new Error("attribute "+le+" must be an array of length equal to indices array length");if(re&&(!(le in Nt)||!Array.isArray(Nt[le])||Nt[le].length!==gt[le].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 lt(Ct,gt,St,Nt){var re=I.isPlainObject(Nt),le=[],ke,Ue,qe,or,Sr;Array.isArray(St)||(St=[St]),St=F(St,Ct.data.length-1);for(var Mr in gt)for(var mr=0;mr=0&&Sr=0&&Sr"u")return or=Q.redraw(Ct),e.add(Ct,re,ke,le,Ue),or;Array.isArray(St)||(St=[St]);try{W(Ct,Nt,St)}catch(Sr){throw Ct.data.splice(Ct.data.length-gt.length,gt.length),Sr}return e.startSequence(Ct),e.add(Ct,re,ke,le,Ue),or=Q.moveTraces(Ct,Nt,St),e.stopSequence(Ct),or}function rt(Ct,gt){Ct=I.getGraphDiv(Ct);var St=[],Nt=Q.addTraces,re=rt,le=[Ct,St,gt],ke=[Ct,gt],Ue,qe;if(typeof gt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"indices"),gt=F(gt,Ct.data.length-1),gt.sort(I.sorterDes),Ue=0;Ue"u")for(St=[],or=0;or0&&typeof dr.parts[Cn]!="string";)Cn--;var Tn=dr.parts[Cn],Mn=dr.parts[Cn-1]+"."+Tn,mi=dr.parts.slice(0,Cn).join("."),Mi=S(Ct.layout,mi).get(),Ni=S(Nt,mi).get(),Hi=dr.get();if(_r!==void 0){Di[nr]=_r,ui[nr]=Tn==="reverse"?_r:it(Hi);var Ji=a.getLayoutValObject(Nt,dr.parts);if(Ji&&Ji.impliedEdits&&_r!==null)for(var di in Ji.impliedEdits)Gn(I.relativeAttr(nr,di),Ji.impliedEdits[di]);if(["width","height"].indexOf(nr)!==-1)if(_r){Gn("autosize",null);var za=nr==="height"?"width":"height";Gn(za,Nt[za])}else Nt[nr]=Ct._initialAutoSize[nr];else if(nr==="autosize")Gn("width",_r?null:Nt.width),Gn("height",_r?null:Nt.height);else if(Mn.match(Wt))We(Mn),S(Nt,mi+"._inputRange").set(null);else if(Mn.match(Jt)){We(Mn),S(Nt,mi+"._inputRange").set(null);var qa=S(Nt,mi).get();qa._inputDomain&&(qa._input.domain=qa._inputDomain.slice())}else Mn.match(ge)&&S(Nt,mi+"._inputDomain").set(null);if(Tn==="type"){Yi=Mi;var Oe=Ni.type==="linear"&&_r==="log",ze=Ni.type==="log"&&_r==="linear";if(Oe||ze){if(!Yi||!Yi.range)Gn(mi+".autorange",!0);else if(Ni.autorange)Oe&&(Yi.range=Yi.range[1]>Yi.range[0]?[1,2]:[2,1]);else{var Br=Yi.range[0],$r=Yi.range[1];Oe?(Br<=0&&$r<=0&&Gn(mi+".autorange",!0),Br<=0?Br=$r/1e6:$r<=0&&($r=Br/1e6),Gn(mi+".range[0]",Math.log(Br)/Math.LN10),Gn(mi+".range[1]",Math.log($r)/Math.LN10)):(Gn(mi+".range[0]",Math.pow(10,Br)),Gn(mi+".range[1]",Math.pow(10,$r)))}Array.isArray(Nt._subplots.polar)&&Nt._subplots.polar.length&&Nt[dr.parts[0]]&&dr.parts[1]==="radialaxis"&&delete Nt[dr.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ct,Ni,_r,Gn),r.getComponentMethod("images","convertCoords")(Ct,Ni,_r,Gn)}else Gn(mi+".autorange",!0),Gn(mi+".range",null);S(Nt,mi+"._inputRange").set(null)}else if(Tn.match(C)){var Gr=S(Nt,nr).get(),Rr=(_r||{}).type;(!Rr||Rr==="-")&&(Rr="linear"),r.getComponentMethod("annotations","convertCoords")(Ct,Gr,Rr,Gn),r.getComponentMethod("images","convertCoords")(Ct,Gr,Rr,Gn)}var Yr=b.containerArrayMatch(nr);if(Yr){Sr=Yr.array,Mr=Yr.index;var mn=Yr.property,on=Ji||{editType:"calc"};Mr!==""&&mn===""&&(b.isAddVal(_r)?ui[nr]=null:b.isRemoveVal(_r)?ui[nr]=(S(St,Sr).get()||[])[Mr]:I.warn("unrecognized full object value",gt)),M.update(ei,on),or[Sr]||(or[Sr]={});var Ce=or[Sr][Mr];Ce||(Ce=or[Sr][Mr]={}),Ce[mn]=_r,delete gt[nr]}else Tn==="reverse"?(Mi.range?Mi.range.reverse():(Gn(mi+".autorange",!0),Mi.range=[1,0]),Ni.autorange?ei.calc=!0:ei.plot=!0):(nr==="dragmode"&&(_r===!1&&Hi!==!1||_r!==!1&&Hi===!1)||Nt._has("scatter-like")&&Nt._has("regl")&&nr==="dragmode"&&(_r==="lasso"||_r==="select")&&!(Hi==="lasso"||Hi==="select")?ei.plot=!0:Ji?M.update(ei,Ji):ei.calc=!0,dr.set(_r))}}for(Sr in or){var pr=b.applyContainerArrayChanges(Ct,le(St,Sr),or[Sr],ei,le);pr||(ei.plot=!0)}for(var Hr in ua){Yi=o.getFromId(Ct,Hr);var _n=Yi&&Yi._constraintGroup;if(_n){ei.calc=!0;for(var Bn in _n)ua[Bn]||(o.getFromId(Ct,Bn)._constraintShrinkable=!0)}}(pe(Ct)||gt.height||gt.width)&&(ei.plot=!0);var ri=Nt.shapes;for(Mr=0;Mr1;)if(Nt.pop(),St=S(gt,Nt.join(".")+".uirevision").get(),St!==void 0)return St;return gt.uirevision}function oe(Ct,gt){for(var St=0;St[mi,Ct._ev.listeners(mi)]);le=Q.newPlot(Ct,gt,St,Nt).then(()=>{for(let[mi,Mi]of Mn)Mi.forEach(Ni=>Ct.on(mi,Ni));return Q.react(Ct,gt,St,Nt)})}else{Ct.data=gt||[],_.cleanData(Ct.data),Ct.layout=St||{},_.cleanLayout(Ct.layout),Ge(Ct.data,Ct.layout,Ue,qe),n.supplyDefaults(Ct,{skipUpdateCalc:!0});var Mr=Ct._fullData,mr=Ct._fullLayout,Qr=mr.datarevision===void 0,Wn=mr.transition,qn=jr(Ct,qe,mr,Qr,Wn),ei=qn.newDataRevision,Di=ur(Ct,Ue,Mr,Qr,Wn,ei);if(pe(Ct)&&(qn.layoutReplot=!0),Di.calc||qn.calc){Ct.calcdata=void 0;for(var ui=Object.getOwnPropertyNames(mr),Gn=0;Gn(Sr||Ct.emit("plotly_react",{config:Nt,data:gt,layout:St}),Ct))}function ur(Ct,gt,St,Nt,re,le){var ke=gt.length===St.length;if(!re&&!ke)return{fullReplot:!0,calc:!0};var Ue=M.traceFlags();Ue.arrays={},Ue.nChanges=0,Ue.nChangesAnim=0;var qe,or;function Sr(Qr){var Wn=a.getTraceValObject(or,Qr);return!or._module.animatable&&Wn.anim&&(Wn.anim=!1),Wn}var Mr={getValObject:Sr,flags:Ue,immutable:Nt,transition:re,newDataRevision:le,gd:Ct},mr={};for(qe=0;qe=re.length?re[0]:re[or]:re}function Ue(or){return Array.isArray(le)?or>=le.length?le[0]:le[or]:le}function qe(or,Sr){var Mr=0;return function(){if(or&&++Mr===Sr)return or()}}return new Promise(function(or,Sr){function Mr(){if(Nt._frameQueue.length!==0){for(;Nt._frameQueue.length;){var Tn=Nt._frameQueue.pop();Tn.onInterrupt&&Tn.onInterrupt()}Ct.emit("plotly_animationinterrupted",[])}}function mr(Tn){if(Tn.length!==0){for(var Mn=0;MnNt._timeToNext&&Wn()};Tn()}var ei=0;function Di(Tn){return Array.isArray(re)?ei>=re.length?Tn.transitionOpts=re[ei]:Tn.transitionOpts=re[0]:Tn.transitionOpts=re,ei++,Tn}var ui,Gn,ua=[],Yi=gt==null,We=Array.isArray(gt),nr=!Yi&&!We&&I.isPlainObject(gt);if(nr)ua.push({type:"object",data:Di(I.extendFlat({},gt))});else if(Yi||["string","number"].indexOf(typeof gt)!==-1)for(ui=0;ui0&&tntn)&&Cn.push(Gn);ua=Cn}}ua.length>0?mr(ua):(Ct.emit("plotly_animated"),or())})}function Xr(Ct,gt,St){if(Ct=I.getGraphDiv(Ct),gt==null)return Promise.resolve();if(!I.isPlotDiv(Ct))throw new Error("This element is not a Plotly plot: "+Ct+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Nt,re,le,ke,Ue=Ct._transitionData._frames,qe=Ct._transitionData._frameHash;if(!Array.isArray(gt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+gt);var or=Ue.length+gt.length*2,Sr=[],Mr={};for(Nt=gt.length-1;Nt>=0;Nt--)if(I.isPlainObject(gt[Nt])){var mr=gt[Nt].name,Qr=(qe[mr]||Mr[mr]||{}).name,Wn=gt[Nt].name,qn=qe[Qr]||Mr[Qr];Qr&&Wn&&typeof Wn=="number"&&qn&&Adr.index?-1:nr.index=0;Nt--){if(re=Sr[Nt].frame,typeof re.name=="number"&&I.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!re.name)for(;qe[re.name="frame "+Ct._transitionData._counter++];);if(qe[re.name]){for(le=0;le=0;St--)Nt=gt[St],le.push({type:"delete",index:Nt}),ke.unshift({type:"insert",index:Nt,value:re[Nt]});var Ue=n.modifyFrames,qe=n.modifyFrames,or=[Ct,ke],Sr=[Ct,le];return e&&e.add(Ct,Ue,or,qe,Sr),n.modifyFrames(Ct,le)}function Le(Ct){Ct=I.getGraphDiv(Ct);var gt=Ct._fullLayout||{},St=Ct._fullData||[];return n.cleanPlot([],{},St,gt),n.purge(Ct),t.purge(Ct),gt._container&>._container.remove(),delete Ct._context,Ct}function Gt(Ct){var gt=Ct._fullLayout,St=Ct.getBoundingClientRect();if(!I.equalDomRects(St,gt._lastBBox)){var Nt=gt._invTransform=I.inverseTransformMatrix(I.getFullTransformMatrix(Ct));gt._invScaleX=Math.sqrt(Nt[0][0]*Nt[0][0]+Nt[0][1]*Nt[0][1]+Nt[0][2]*Nt[0][2]),gt._invScaleY=Math.sqrt(Nt[1][0]*Nt[1][0]+Nt[1][1]*Nt[1][1]+Nt[1][2]*Nt[1][2]),gt._lastBBox=St}}function ne(Ct){var gt=Z.select(Ct),St=Ct._fullLayout;if(St._calcInverseTransform=Gt,St._calcInverseTransform(Ct),St._container=gt.selectAll(".plot-container").data([0]),St._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),St._paperdiv=St._container.selectAll(".svg-container").data([0]),St._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),St._glcontainer=St._paperdiv.selectAll(".gl-container").data([{}]),St._glcontainer.enter().append("div").classed("gl-container",!0),St._paperdiv.selectAll(".main-svg").remove(),St._paperdiv.select(".modebar-container").remove(),St._paper=St._paperdiv.insert("svg",":first-child").classed("main-svg",!0),St._toppaper=St._paperdiv.append("svg").classed("main-svg",!0),St._modebardiv=St._paperdiv.append("div"),delete St._modeBar,St._hoverpaper=St._paperdiv.append("svg").classed("main-svg",!0),!St._uid){var Nt={};Z.selectAll("defs").each(function(){this.id&&(Nt[this.id.split("-")[1]]=1)}),St._uid=I.randstr(Nt)}St._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),St._defs=St._paper.append("defs").attr("id","defs-"+St._uid),St._clips=St._defs.append("g").classed("clips",!0),St._topdefs=St._toppaper.append("defs").attr("id","topdefs-"+St._uid),St._topclips=St._topdefs.append("g").classed("clips",!0),St._bgLayer=St._paper.append("g").classed("bglayer",!0),St._draggers=St._paper.append("g").classed("draglayer",!0);var re=St._paper.append("g").classed("layer-below",!0);St._imageLowerLayer=re.append("g").classed("imagelayer",!0),St._shapeLowerLayer=re.append("g").classed("shapelayer",!0),St._cartesianlayer=St._paper.append("g").classed("cartesianlayer",!0),St._polarlayer=St._paper.append("g").classed("polarlayer",!0),St._smithlayer=St._paper.append("g").classed("smithlayer",!0),St._ternarylayer=St._paper.append("g").classed("ternarylayer",!0),St._geolayer=St._paper.append("g").classed("geolayer",!0),St._funnelarealayer=St._paper.append("g").classed("funnelarealayer",!0),St._pielayer=St._paper.append("g").classed("pielayer",!0),St._iciclelayer=St._paper.append("g").classed("iciclelayer",!0),St._treemaplayer=St._paper.append("g").classed("treemaplayer",!0),St._sunburstlayer=St._paper.append("g").classed("sunburstlayer",!0),St._indicatorlayer=St._toppaper.append("g").classed("indicatorlayer",!0),St._glimages=St._paper.append("g").classed("glimages",!0);var le=St._toppaper.append("g").classed("layer-above",!0);St._imageUpperLayer=le.append("g").classed("imagelayer",!0),St._shapeUpperLayer=le.append("g").classed("shapelayer",!0),St._selectionLayer=St._toppaper.append("g").classed("selectionlayer",!0),St._infolayer=St._toppaper.append("g").classed("infolayer",!0),St._menulayer=St._toppaper.append("g").classed("menulayer",!0),St._zoomlayer=St._toppaper.append("g").classed("zoomlayer",!0),St._hoverlayer=St._hoverpaper.append("g").classed("hoverlayer",!0),St._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ct.emit("plotly_framework")}Q.animate=br,Q.addFrames=Xr,Q.deleteFrames=nn,Q.addTraces=pt,Q.deleteTraces=rt,Q.extendTraces=st,Q.moveTraces=at,Q.prependTraces=tt,Q.newPlot=H,Q._doPlot=p,Q.purge=Le,Q.react=cr,Q.redraw=V,Q.relayout=It,Q.restyle=vt,Q.setPlotConfig=w,Q.update=se,Q._guiRelayout=Tt(It),Q._guiRestyle=Tt(vt),Q._guiUpdate=Tt(se),Q._storeDirectGUIEdit=ut}),o0=Dt(Q=>{var Z=Qo();Q.getDelay=function(I){return I._has&&(I._has("gl3d")||I._has("mapbox")||I._has("map"))?500:0},Q.getRedrawFunc=function(I){return function(){Z.getComponentMethod("colorbar","draw")(I)}},Q.encodeSVG=function(I){return"data:image/svg+xml,"+encodeURIComponent(I)},Q.encodeJSON=function(I){return"data:application/json,"+encodeURIComponent(I)};var c=window.URL||window.webkitURL;Q.createObjectURL=function(I){return c.createObjectURL(I)},Q.revokeObjectURL=function(I){return c.revokeObjectURL(I)},Q.createBlob=function(I,S){if(S==="svg")return new window.Blob([I],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([I],{type:"application/json;charset=utf-8"});var t=g(window.atob(I));return new window.Blob([t],{type:"image/"+S})},Q.octetStream=function(I){document.location.href="data:application/octet-stream"+I};function g(I){for(var S=I.length,t=new ArrayBuffer(S),e=new Uint8Array(t),r=0;r{var c=Wr();kn();var g=Vs(),I=pi();Dp();var S=/"/g,t="TOBESTRIPPED",e=new RegExp('("'+t+")|("+t+'")',"g");function r(n){var o=c.select("body").append("div").style({display:"none"}).html(""),i=n.replace(/(&[^;]*;)/gi,function(l){return l==="<"?"<":l==="&rt;"?">":l.indexOf("<")!==-1||l.indexOf(">")!==-1?"":o.html(l).text()});return o.remove(),i}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Z.exports=function(n,o,i){var l=n._fullLayout,f=l._paper,x=l._toppaper,y=l.width,v=l.height,T;f.insert("rect",":first-child").call(g.setRect,0,0,y,v).call(I.fill,l.paper_bgcolor);var u=l._basePlotModules||[];for(T=0;T{var c=kn(),g=Rm().EventEmitter,I=o0();function S(t){var e=t.emitter||new g,r=new Promise(function(a,n){var o=window.Image,i=t.svg,l=t.format||"png",f=t.canvas,x=t.scale||1,y=t.width||300,v=t.height||150,T=x*y,u=x*v,b=f.getContext("2d",{willReadFrequently:!0}),_=new o,P,M;l==="svg"||c.isSafari()?M=I.encodeSVG(i):(P=I.createBlob(i,"svg"),M=I.createObjectURL(P)),f.width=T,f.height=u,_.onload=function(){var C;switch(P=null,I.revokeObjectURL(M),l!=="svg"&&b.drawImage(_,0,0,T,u),l){case"jpeg":C=f.toDataURL("image/jpeg");break;case"png":C=f.toDataURL("image/png");break;case"webp":C=f.toDataURL("image/webp");break;case"svg":C=M;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!t.promise)return e.emit("error",A)}a(C),t.promise||e.emit("success",C)},_.onerror=function(C){if(P=null,I.revokeObjectURL(M),n(C),!t.promise)return e.emit("error",C)},_.src=M});return t.promise?r:e}Z.exports=S}),zw=Dt((Q,Z)=>{var c=Hn(),g=Y_(),I=Kc(),S=kn(),t=o0(),e=Qy(),r=tx(),a=Vi().version,n={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 o(i,l){l=l||{};var f,x,y,v;S.isPlainObject(i)?(f=i.data||[],x=i.layout||{},y=i.config||{},v={}):(i=S.getGraphDiv(i),f=S.extendDeep([],i.data),x=S.extendDeep({},i.layout),y=i._context,v=i._fullLayout||{});function T(H){return!(H in l)||S.validate(l[H],n[H])}if(!T("width")&&l.width!==null||!T("height")&&l.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+S.join2(n.format.values,", "," or ")+".");var u={};function b(H,F){return S.coerce(l,u,n,H,F)}var _=b("format"),P=b("width"),M=b("height"),C=b("scale"),A=b("setBackground"),h=b("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var k=S.extendFlat({},x);P?k.width=P:l.width===null&&c(v.width)&&(k.width=v.width),M?k.height=M:l.height===null&&c(v.height)&&(k.height=v.height);var w=S.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),B=t.getRedrawFunc(p);function O(){return new Promise(function(H){setTimeout(H,t.getDelay(p._fullLayout))})}function j(){return new Promise(function(H,F){var U=e(p,_,C),W=p._fullLayout.width,q=p._fullLayout.height;function J(){g.purge(p),document.body.removeChild(p)}if(_==="full-json"){var lt=I.graphJson(p,!1,"keepdata","object",!0,!0);return lt.version=a,lt=JSON.stringify(lt),J(),H(h?lt:t.encodeJSON(lt))}if(J(),_==="svg")return H(h?U:t.encodeSVG(U));var yt=document.createElement("canvas");yt.id=S.randstr(),r({format:_,width:W,height:q,scale:C,canvas:yt,svg:U,promise:!0}).then(H).catch(F)})}function V(H){return h?H.replace(t.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,F){g.newPlot(p,f,k,w).then(B).then(O).then(j).then(function(U){H(V(U))}).catch(function(U){F(U)})})}Z.exports=o}),ym=Dt((Q,Z)=>{var c=kn(),g=Kc(),I=jm(),S=ms().dfltConfig,t=c.isPlainObject,e=Array.isArray,r=c.isArrayOrTypedArray;Z.exports=function(u,b){u===void 0&&(u=[]),b===void 0&&(b={});var _=I.get(),P=[],M={_context:c.extendFlat({},S)},C,A;e(u)?(M.data=c.extendDeep([],u),C=u):(M.data=[],C=[],P.push(l("array","data"))),t(b)?(M.layout=c.extendDeep({},b),A=b):(M.layout={},A={},arguments.length>1&&P.push(l("object","layout"))),g.supplyDefaults(M);for(var h=M._fullData,p=C.length,k=0;kB.length&&P.push(l("unused",M,k.concat(B.length)));var U=B.length,W=Array.isArray(F);W&&(U=Math.min(U,F.length));var q,J,lt,yt,mt;if(O.dimensions===2)for(J=0;JB[J].length&&P.push(l("unused",M,k.concat(J,B[J].length)));var st=B[J].length;for(q=0;q<(W?Math.min(st,F[J].length):st);q++)lt=W?F[J][q]:F,yt=w[J][q],mt=B[J][q],c.validate(yt,lt)?mt!==yt&&mt!==+yt&&P.push(l("dynamic",M,k.concat(J,q),yt,mt)):P.push(l("value",M,k.concat(J,q),yt))}else P.push(l("array",M,k.concat(J),w[J]));else for(J=0;J{var c=kn(),g=o0();function I(S,t,e){var r=document.createElement("a"),a="download"in r,n=new Promise(function(o,i){var l,f;if(a)return l=g.createBlob(S,e),f=g.createObjectURL(l),r.href=f,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),g.revokeObjectURL(f),l=null,o(t);if(c.isSafari()){var x=e==="svg"?",":";base64,";return g.octetStream(x+encodeURIComponent(S)),o(t)}i(new Error("download error"))});return n}Z.exports=I}),K_=Dt((Q,Z)=>{var c=kn(),g=zw(),I=Ow();o0();function S(t,e){var r;return c.isPlainObject(t)||(r=c.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,n){r&&r._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var o=g(t,e),i=e.filename||t.fn||"newplot";i+="."+e.format.replace("-","."),o.then(function(l){return r&&(r._snapshotInProgress=!1),I(l,i,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Z.exports=S}),z1=Dt(Q=>{var Z=kn(),c=Z.isPlainObject,g=jm(),I=Kc(),S=qo(),t=mu(),e=ms().dfltConfig;Q.makeTemplate=function(y){y=Z.isPlainObject(y)?y:Z.getGraphDiv(y),y=Z.extendDeep({_context:e},{data:y.data,layout:y.layout}),I.supplyDefaults(y);var v=y.data||[],T=y.layout||{};T._basePlotModules=y._fullLayout._basePlotModules,T._modules=y._fullLayout._modules;var u={data:{},layout:{}};v.forEach(function(w){var B={};n(w,B,i.bind(null,w));var O=Z.coerce(w,{},S,"type"),j=u.data[O];j||(j=u.data[O]=[]),j.push(B)}),n(T,u.layout,o.bind(null,T)),delete u.layout.template;var b=T.template;if(c(b)){var _=b.layout,P,M,C,A,h,p;c(_)&&r(_,u.layout);var k=b.data;if(c(k)){for(M in u.data)if(C=k[M],Array.isArray(C)){for(h=u.data[M],p=h.length,A=C.length,P=0;PV?P.push({code:"unused",traceType:w,templateCount:j,dataCount:V}):V>j&&P.push({code:"reused",traceType:w,templateCount:j,dataCount:V})}}function H(F,U){for(var W in F)if(W.charAt(0)!=="_"){var q=F[W],J=l(F,W,U);c(q)?(Array.isArray(F)&&q._template===!1&&q.templateitemname&&P.push({code:"missing",path:J,templateitemname:q.templateitemname}),H(q,J)):Array.isArray(q)&&f(q)&&H(q,J)}}if(H({data:C,layout:M},""),P.length)return P.map(x)};function f(y){for(var v=0;v{var Z=Y_();Q._doPlot=Z._doPlot,Q.newPlot=Z.newPlot,Q.restyle=Z.restyle,Q.relayout=Z.relayout,Q.redraw=Z.redraw,Q.update=Z.update,Q._guiRestyle=Z._guiRestyle,Q._guiRelayout=Z._guiRelayout,Q._guiUpdate=Z._guiUpdate,Q._storeDirectGUIEdit=Z._storeDirectGUIEdit,Q.react=Z.react,Q.extendTraces=Z.extendTraces,Q.prependTraces=Z.prependTraces,Q.addTraces=Z.addTraces,Q.deleteTraces=Z.deleteTraces,Q.moveTraces=Z.moveTraces,Q.purge=Z.purge,Q.addFrames=Z.addFrames,Q.deleteFrames=Z.deleteFrames,Q.animate=Z.animate,Q.setPlotConfig=Z.setPlotConfig;var c=r0().getGraphDiv,g=V_().eraseActiveShape;Q.deleteActiveShape=function(S){return g(c(S))},Q.toImage=zw(),Q.validate=ym(),Q.downloadImage=K_();var I=z1();Q.makeTemplate=I.makeTemplate,Q.validateTemplate=I.validateTemplate}),Wm=Dt((Q,Z)=>{var c=kn(),g=Qo();Z.exports=function(I,S,t,e){var r=e("x"),a=e("y"),n,o=g.getComponentMethod("calendars","handleTraceDefaults");if(o(I,S,["x","y"],t),r){var i=c.minRowLength(r);a?n=Math.min(i,c.minRowLength(a)):(n=i,e("y0"),e("dy"))}else{if(!a)return 0;n=c.minRowLength(a),e("x0"),e("dx")}return S._length=n,n}}),Bp=Dt((Q,Z)=>{var c=kn().dateTick0,g=sa(),I=g.ONEWEEK;function S(t,e){return t%I===0?c(e,1):c(e,0)}Z.exports=function(t,e,r,a,n){if(n||(n={x:!0,y:!0}),n.x){var o=a("xperiod");o&&(a("xperiod0",S(o,e.xcalendar)),a("xperiodalignment"))}if(n.y){var i=a("yperiod");i&&(a("yperiod0",S(i,e.ycalendar)),a("yperiodalignment"))}}}),Dw=Dt((Q,Z)=>{var c=["orientation","groupnorm","stackgaps"];Z.exports=function(g,I,S,t){var e=S._scatterStackOpts,r=t("stackgroup");if(r){var a=I.xaxis+I.yaxis,n=e[a];n||(n=e[a]={});var o=n[r],i=!1;o?o.traces.push(I):(o=n[r]={traceIndices:[],traces:[I]},i=!0);for(var l={orientation:I.x&&!I.y?"h":"v"},f=0;f{var c=pi(),g=Ud().hasColorscale,I=mc(),S=Tc();Z.exports=function(t,e,r,a,n,o){var i=S.isBubble(t),l=(t.line||{}).color,f;if(o=o||{},l&&(r=l),n("marker.symbol"),n("marker.opacity",i?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",r),g(t,"marker")&&I(t,e,a,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&e.marker.color!==l?f=l:i?f=c.background:f=c.defaultLine,n("marker.line.color",f),g(t,"marker.line")&&I(t,e,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",i?1:0)),i&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var x=n("marker.gradient.type");x!=="none"&&n("marker.gradient.color")}}}),O0=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Ud().hasColorscale,I=mc();Z.exports=function(S,t,e,r,a,n){n||(n={});var o=(S.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),a("line.color",e),g(S,"line"))I(S,t,r,a,{prefix:"line.",cLetter:"c"});else{var i=(c(o)?!1:o)||e;a("line.color",i)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}),bv=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("line.shape");S==="spline"&&I("line.smoothing")}}),x0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t,e){e=e||{},t("textposition"),c.coerceFont(t,"textfont",e.font||S.font,e),e.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}),D0=Dt((Q,Z)=>{var c=pi(),g=kn().isArrayOrTypedArray;function I(S){for(var t=c.interpolate(S[0][1],S[1][1],.5),e=2;e{var c=kn(),g=Qo(),I=ef(),S=vm(),t=Tc(),e=Wm(),r=Bp(),a=Dw(),n=s0(),o=O0(),i=bv(),l=x0(),f=D0(),x=kn().coercePattern;Z.exports=function(y,v,T,u){function b(k,w){return c.coerce(y,v,I,k,w)}var _=e(y,v,u,b);if(_||(v.visible=!1),!!v.visible){r(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var P=a(y,v,u,b);u.scattermode==="group"&&v.orientation===void 0&&b("orientation","v");var M=!P&&_{var c=xv().getAxisGroup;Z.exports=function(g,I,S,t,e){var r=I.orientation,a=I[{v:"x",h:"y"}[r]+"axis"],n=c(S,a)+r,o=S._alignmentOpts||{},i=t("alignmentgroup"),l=o[n];l||(l=o[n]={});var f=l[i];f?f.traces.push(I):f=l[i]={traces:[I],alignmentIndex:Object.keys(l).length,offsetGroups:{}};var x=t("offsetgroup")||"",y=f.offsetGroups,v=y[x];I._offsetIndex=0,(e!=="group"||x)&&(v||(v=y[x]={offsetIndex:Object.keys(y).length}),I._offsetIndex=v.offsetIndex)}}),Bw=Dt((Q,Z)=>{var c=kn(),g=Lg(),I=ef();Z.exports=function(S,t){var e,r,a,n=t.scattermode;function o(y){return c.coerce(r._input,r,I,y)}if(t.scattermode==="group")for(a=0;a=0;f--){var x=S[f];if(x.type==="scatter"&&x.xaxis===i.xaxis&&x.yaxis===i.yaxis){x.opacity=void 0;break}}}}}}),Rw=Dt((Q,Z)=>{var c=kn(),g=yg();Z.exports=function(I,S){function t(r,a){return c.coerce(I,S,g,r,a)}var e=S.barmode==="group";S.scattermode==="group"&&t("scattergap",e?S.bargap:.2)}}),F0=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=g.dateTime2ms,S=g.incrementMonth,t=sa(),e=t.ONEAVGMONTH;Z.exports=function(r,a,n,o){if(a.type!=="date")return{vals:o};var i=r[n+"periodalignment"];if(!i)return{vals:o};var l=r[n+"period"],f;if(c(l)){if(l=+l,l<=0)return{vals:o}}else if(typeof l=="string"&&l.charAt(0)==="M"){var x=+l.substring(1);if(x>0&&Math.round(x)===x)f=x;else return{vals:o}}for(var y=a.calendar,v=i==="start",T=i==="end",u=r[n+"period0"],b=I(u,y)||0,_=[],P=[],M=[],C=o.length,A=0;Ah;)w=S(w,-f,y);for(;w<=h;)w=S(w,f,y);k=S(w,-f,y)}else{for(p=Math.round((h-b)/l),w=b+p*l;w>h;)w-=l;for(;w<=h;)w+=l;k=w-l}_[A]=v?k:T?w:(k+w)/2,P[A]=k,M[A]=w}return{vals:_,starts:P,ends:M}}}),B0=Dt((Q,Z)=>{var c=Ud().hasColorscale,g=Xd(),I=Tc();Z.exports=function(S,t){I.hasLines(t)&&c(t,"line")&&g(S,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),I.hasMarkers(t)&&(c(t,"marker")&&g(S,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c(t,"marker.line")&&g(S,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),ct=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=kn();Z.exports=function(g,I){c.isArrayOrTypedArray(I.selectedpoints)&&c.tagSelected(g,I)}}),me=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=Ls(),S=F0(),t=sa().BADNUM,e=Tc(),r=B0(),a=ct(),n=Rt();function o(v,T){var u=v._fullLayout,b=T._xA=I.getFromId(v,T.xaxis||"x","x"),_=T._yA=I.getFromId(v,T.yaxis||"y","y"),P=b.makeCalcdata(T,"x"),M=_.makeCalcdata(T,"y"),C=S(T,b,"x",P),A=S(T,_,"y",M),h=C.vals,p=A.vals,k=T._length,w=new Array(k),B=T.ids,O=y(T,u,b,_),j=!1,V,H,F,U,W,q;f(u,T);var J="x",lt="y",yt;if(O)g.pushUnique(O.traceIndices,T.index),V=O.orientation==="v",V?(lt="s",yt="x"):(J="s",yt="y"),W=O.stackgaps==="interpolate";else{var mt=l(T,k);i(v,T,b,_,h,p,mt)}var st=!!T.xperiodalignment,tt=!!T.yperiodalignment;for(H=0;HH&&w[U].gap;)U--;for(q=w[U].s,F=w.length-1;F>U;F--)w[F].s=q;for(;H{Z.exports=g;var c=kn().distinctVals;function g(I,S){this.traces=I,this.sepNegVal=S.sepNegVal,this.overlapNoMerge=S.overlapNoMerge;for(var t=1/0,e=S.posAxis._id.charAt(0),r=[],a=0;a{var c=Hn(),g=kn().isArrayOrTypedArray,I=sa().BADNUM,S=Qo(),t=Ls(),e=xv().getAxisGroup,r=tr();function a(w,B){for(var O=B.xaxis,j=B.yaxis,V=w._fullLayout,H=w._fullData,F=w.calcdata,U=[],W=[],q=0;qW+F||!c(U))}for(var J=0;J{var c=me(),g=zr().setGroupPositions;function I(e,r){for(var a=r.xaxis,n=r.yaxis,o=e._fullLayout,i=e._fullData,l=e.calcdata,f=[],x=[],y=0;yO[y]&&y{var c=Vs(),g=sa(),I=g.BADNUM,S=g.LOG_CLIP,t=S+.5,e=S-.5,r=kn(),a=r.segmentsIntersect,n=r.constrain,o=vm();Z.exports=function(i,l){var f=l.trace||{},x=l.xaxis,y=l.yaxis,v=x.type==="log",T=y.type==="log",u=x._length,b=y._length,_=l.backoff,P=f.marker,M=l.connectGaps,C=l.baseTolerance,A=l.shape,h=A==="linear",p=f.fill&&f.fill!=="none",k=[],w=o.minTolerance,B=i.length,O=new Array(B),j=0,V,H,F,U,W,q,J,lt,yt,mt,st,tt,pt,rt,at,vt;function it(ke){var Ue=i[ke];if(!Ue)return!1;var qe=l.linearized?x.l2p(Ue.x):x.c2p(Ue.x),or=l.linearized?y.l2p(Ue.y):y.c2p(Ue.y);if(qe===I){if(v&&(qe=x.c2p(Ue.x,!0)),qe===I)return!1;T&&or===I&&(qe*=Math.abs(x._m*b*(x._m>0?t:e)/(y._m*u*(y._m>0?t:e)))),qe*=1e3}if(or===I){if(T&&(or=y.c2p(Ue.y,!0)),or===I)return!1;or*=1e3}return[qe,or]}function K(ke,Ue,qe,or){var Sr=qe-ke,Mr=or-Ue,mr=.5-ke,Qr=.5-Ue,Wn=Sr*Sr+Mr*Mr,qn=Sr*mr+Mr*Qr;if(qn>0&&qn1||Math.abs(mr.y-qe[0][1])>1)&&(mr=[mr.x,mr.y],or&&It(mr,ke)Wt||ke[1]ge)return[n(ke[0],qt,Wt),n(ke[1],Jt,ge)]}function Ae(ke,Ue){if(ke[0]===Ue[0]&&(ke[0]===qt||ke[0]===Wt)||ke[1]===Ue[1]&&(ke[1]===Jt||ke[1]===ge))return!0}function He(ke,Ue){var qe=[],or=oe(ke),Sr=oe(Ue);return or&&Sr&&Ae(or,Sr)||(or&&qe.push(or),Sr&&qe.push(Sr)),qe}function Ge(ke,Ue,qe){return function(or,Sr){var Mr=oe(or),mr=oe(Sr),Qr=[];if(Mr&&mr&&Ae(Mr,mr))return Qr;Mr&&Qr.push(Mr),mr&&Qr.push(mr);var Wn=2*r.constrain((or[ke]+Sr[ke])/2,Ue,qe)-((Mr||or)[ke]+(mr||Sr)[ke]);if(Wn){var qn;Mr&&mr?qn=Wn>0==Mr[ke]>mr[ke]?Mr:mr:qn=Mr||mr,qn[ke]+=Wn}return Qr}}var cr;A==="linear"||A==="spline"?cr=ve:A==="hv"||A==="vh"?cr=He:A==="hvh"?cr=Ge(0,qt,Wt):A==="vhv"&&(cr=Ge(1,Jt,ge));function ur(ke,Ue){var qe=Ue[0]-ke[0],or=(Ue[1]-ke[1])/qe,Sr=(ke[1]*Ue[0]-Ue[1]*ke[0])/qe;return Sr>0?[or>0?qt:Wt,ge]:[or>0?Wt:qt,Jt]}function jr(ke){var Ue=ke[0],qe=ke[1],or=Ue===O[j-1][0],Sr=qe===O[j-1][1];if(!(or&&Sr))if(j>1){var Mr=Ue===O[j-2][0],mr=qe===O[j-2][1];or&&(Ue===qt||Ue===Wt)&&Mr?mr?j--:O[j-1]=ke:Sr&&(qe===Jt||qe===ge)&&mr?Mr?j--:O[j-1]=ke:O[j++]=ke}else O[j++]=ke}function qr(ke){O[j-1][0]!==ke[0]&&O[j-1][1]!==ke[1]&&jr([Tt,Lt]),jr(ke),Mt=null,Tt=Lt=0}var br=r.isArrayOrTypedArray(P);function Xr(ke){if(ke&&_&&(ke.i=V,ke.d=i,ke.trace=f,ke.marker=br?P[ke.i]:P,ke.backoff=_),ft=ke[0]/u,ut=ke[1]/b,pe=ke[0]Wt?Wt:0,se=ke[1]ge?ge:0,pe||se){if(!j)O[j++]=[pe||ke[0],se||ke[1]];else if(Mt){var Ue=cr(Mt,ke);Ue.length>1&&(qr(Ue[0]),O[j++]=Ue[1])}else ee=cr(O[j-1],ke)[0],O[j++]=ee;var qe=O[j-1];pe&&se&&(qe[0]!==pe||qe[1]!==se)?(Mt&&(Tt!==pe&&Lt!==se?jr(Tt&&Lt?ur(Mt,ke):[Tt||pe,Lt||se]):Tt&&Lt&&jr([Tt,Lt])),jr([pe,se])):Tt-pe&&Lt-se&&jr([pe||Tt,se||Lt]),Mt=ke,Tt=pe,Lt=se}else Mt&&qr(cr(Mt,ke)[0]),O[j++]=ke}for(V=0;Vkt(q,nn))break;F=q,pt=yt[0]*lt[0]+yt[1]*lt[1],pt>st?(st=pt,U=q,J=!1):pt=i.length||!q)break;Xr(q),H=q}}Mt&&jr([Tt||Mt[0],Lt||Mt[1]]),k.push(O.slice(0,j))}var Le=A.slice(A.length-1);if(_&&Le!=="h"&&Le!=="v"){for(var Gt=!1,ne=-1,Ct=[],gt=0;gt{var c={tonextx:1,tonexty:1,tonext:1};Z.exports=function(g,I,S){var t,e,r,a,n,o={},i=!1,l=-1,f=0,x=-1;for(e=0;e=0?n=x:(n=x=f,f++),n{var c=Wr(),g=Qo(),I=kn(),S=I.ensureSingle,t=I.identity,e=Vs(),r=Tc(),a=Zi(),n=ja(),o=mm().tester;Z.exports=function(x,y,v,T,u,b){var _,P,M=!u,C=!!u&&u.duration>0,A=n(x,y,v);if(_=T.selectAll("g.trace").data(A,function(p){return p[0].trace.uid}),_.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),_.order(),i(x,_,y),C){b&&(P=b());var h=c.transition().duration(u.duration).ease(u.easing).each("end",function(){P&&P()}).each("interrupt",function(){P&&P()});h.each(function(){T.selectAll("g.trace").each(function(p,k){l(x,k,y,p,A,this,u)})})}else _.each(function(p,k){l(x,k,y,p,A,this,u)});M&&_.exit().remove(),T.selectAll("path:not([d])").remove()};function i(x,y,v){y.each(function(T){var u=S(c.select(this),"g","fills");e.setClipUrl(u,v.layerClipId,x);var b=T[0].trace,_=[];b._ownfill&&_.push("_ownFill"),b._nexttrace&&_.push("_nextFill");var P=u.selectAll("g").data(_,t);P.enter().append("g"),P.exit().each(function(M){b[M]=null}).remove(),P.order().each(function(M){b[M]=S(c.select(this),"path","js-fill")})})}function l(x,y,v,T,u,b,_){var P=x._context.staticPlot,M;f(x,y,v,T,u);var C=!!_&&_.duration>0;function A(qr){return C?qr.transition():qr}var h=v.xaxis,p=v.yaxis,k=T[0].trace,w=k.line,B=c.select(b),O=S(B,"g","errorbars"),j=S(B,"g","lines"),V=S(B,"g","points"),H=S(B,"g","text");if(g.getComponentMethod("errorbars","plot")(x,O,v,_),k.visible!==!0)return;A(B).style("opacity",k.opacity);var F,U,W=k.fill.charAt(k.fill.length-1);W!=="x"&&W!=="y"&&(W="");var q,J;W==="y"?(q=1,J=p.c2p(0,!0)):W==="x"&&(q=0,J=h.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=B;var lt="",yt=[],mt=k._prevtrace,st=null,tt=null;mt&&(lt=mt._prevRevpath||"",U=mt._nextFill,yt=mt._ownPolygons,st=mt._fillsegments,tt=mt._fillElement);var pt,rt,at="",vt="",it,K,ft,ut,kt,It,Pt=[];k._polygons=[];var qt=[],Wt=[],Jt=I.noop;if(F=k._ownFill,r.hasLines(k)||k.fill!=="none"){U&&U.datum(T),["hv","vh","hvh","vhv"].indexOf(w.shape)!==-1?(it=e.steps(w.shape),K=e.steps(w.shape.split("").reverse().join(""))):w.shape==="spline"?it=K=function(qr){var br=qr[qr.length-1];return qr.length>1&&qr[0][0]===br[0]&&qr[0][1]===br[1]?e.smoothclosed(qr.slice(1),w.smoothing):e.smoothopen(qr,w.smoothing)}:it=K=function(qr){return"M"+qr.join("L")},ft=function(qr){return K(qr.reverse())},Wt=a(T,{xaxis:h,yaxis:p,trace:k,connectGaps:k.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:k.fill}),qt=new Array(Wt.length);var ge=0;for(M=0;M=P[0]&&B.x<=P[1]&&B.y>=M[0]&&B.y<=M[1]}),p=Math.ceil(h.length/A),k=0;u.forEach(function(B,O){var j=B[0].trace;r.hasMarkers(j)&&j.marker.maxdisplayed>0&&O{Z.exports={container:"marker",min:"cmin",max:"cmax"}}),Ws=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e={_fullLayout:S},r=c.getFromTrace(e,I,"x"),a=c.getFromTrace(e,I,"y"),n=g.orig_x;n===void 0&&(n=g.x);var o=g.orig_y;return o===void 0&&(o=g.y),t.xLabel=c.tickText(r,r.c2l(n),!0).text,t.yLabel=c.tickText(a,a.c2l(o),!0).text,t}}),_l=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=Qo();function S(a){var n=c.select(a).selectAll("g.trace.scatter");n.style("opacity",function(o){return o[0].trace.opacity}),n.selectAll("g.points").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;t(i,l,a)}),n.selectAll("g.text").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;e(i,l,a)}),n.selectAll("g.trace path.js-line").call(g.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,a,!1),I.getComponentMethod("errorbars","style")(n)}function t(a,n,o){g.pointStyle(a.selectAll("path.point"),n,o)}function e(a,n,o){g.textPointStyle(a.selectAll("text"),n,o)}function r(a,n,o){var i=n[0].trace;i.selectedpoints?(g.selectedPointStyle(o.selectAll("path.point"),i),g.selectedTextStyle(o.selectAll("text"),i)):(t(o,i,a),e(o,i,a))}Z.exports={style:S,stylePoints:t,styleText:e,styleOnSelect:r}}),Bu=Dt((Q,Z)=>{var c=pi(),g=Tc();Z.exports=function(I,S){var t,e;if(I.mode==="lines")return t=I.line.color,t&&c.opacity(t)?t:I.fillcolor;if(I.mode==="none")return I.fill?I.fillcolor:"";var r=S.mcc||(I.marker||{}).color,a=S.mlcc||((I.marker||{}).line||{}).color;return e=r&&c.opacity(r)?r:a&&c.opacity(a)&&(S.mlw||((I.marker||{}).line||{}).width)?a:"",e?c.opacity(e)<.3?c.addOpacity(e,.3):e:(t=(I.line||{}).color,t&&c.opacity(t)&&g.hasLines(I)&&I.line.width?t:I.fillcolor)}}),Md=Dt((Q,Z)=>{var c=kn(),g=tf(),I=Qo(),S=Bu(),t=pi(),e=c.fillText;Z.exports=function(r,a,n,o){var i=r.cd,l=i[0].trace,f=r.xa,x=r.ya,y=f.c2p(a),v=x.c2p(n),T=[y,v],u=l.hoveron||"",b=l.mode.indexOf("markers")!==-1?3:.5,_=!!l.xperiodalignment,P=!!l.yperiodalignment;if(u.indexOf("points")!==-1){var M=function(lt){if(_){var yt=f.c2p(lt.xStart),mt=f.c2p(lt.xEnd);return y>=Math.min(yt,mt)&&y<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,pt=Math.abs(f.c2p(lt.x)-y);return pt=Math.min(yt,mt)&&v<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,pt=Math.abs(x.c2p(lt.y)-v);return ptat!=Pt>=at&&(ut=K[it-1][0],kt=K[it][0],Pt-It&&(ft=ut+(kt-ut)*(at-It)/(Pt-It),st=Math.min(st,ft),tt=Math.max(tt,ft)));return st=Math.max(st,0),tt=Math.min(tt,f._length),{x0:st,x1:tt,y0:at,y1:at}}if(u.indexOf("fills")!==-1&&l._fillElement){var W=F(l._fillElement)&&!F(l._fillExclusionElement);if(W){var q=U(l._polygons);q===null&&(q={x0:T[0],x1:T[0],y0:T[1],y1:T[1]});var J=t.defaultLine;return t.opacity(l.fillcolor)?J=l.fillcolor:t.opacity((l.line||{}).color)&&(J=l.line.color),c.extendFlat(r,{distance:r.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:J,hovertemplate:!1}),delete r.index,l.text&&!c.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}}),Nf=Dt((Q,Z)=>{var c=Tc();Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=[],a=S[0].trace,n,o,i,l,f=!c.hasMarkers(a)&&!c.hasText(a);if(f)return[];if(I===!1)for(n=0;n{Z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),kp=Dt((Q,Z)=>{var c=Qo().traceIs,g=mv();Z.exports=function(r,a,n,o){n("autotypenumbers",o.autotypenumbersDflt);var i=n("type",(o.splomStash||{}).type);i==="-"&&(I(a,o.data),a.type==="-"?a.type="linear":r.type=a.type)};function I(r,a){if(r.type==="-"){var n=r._id,o=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=o);var l=S(a,n,o);if(l){if(l.type==="histogram"&&o==={v:"y",h:"x"}[l.orientation||"v"]){r.type="linear";return}var f=o+"calendar",x=l[f],y={noMultiCategory:!c(l,"cartesian")||c(l,"noMultiCategory")};if(l.type==="box"&&l._hasPreCompStats&&o==={h:"x",v:"y"}[l.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=r.autotypenumbers,e(l,o)){var v=t(l),T=[];for(i=0;i0&&(i["_"+n+"axes"]||{})[a]||(i[n+"axis"]||n)===a&&(e(i,n)||(i[n]||[]).length||i[n+"0"]))return i}}function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function e(r,a){var n=t(r),o=c(r,"box-violin"),i=c(r._fullInput||{},"candlestick");return o&&!i&&a===n&&r[n]===void 0&&r[n+"0"]===void 0}}),qm=Dt((Q,Z)=>{var c=la().isTypedArraySpec;function g(I,S){var t=S.dataAttr||I._id.charAt(0),e={},r,a,n;if(S.axData)r=S.axData;else for(r=[],a=0;a0||c(r),n;a&&(n="array");var o=t("categoryorder",n),i;o==="array"&&(i=t("categoryarray")),!a&&o==="array"&&(o=S.categoryorder="trace"),o==="trace"?S._initialCategories=[]:o==="array"?S._initialCategories=i.slice():(i=g(S,e).sort(),o==="category ascending"?S._initialCategories=i:o==="category descending"&&(S._initialCategories=i.reverse()))}}}),ex=Dt((Q,Z)=>{var c=ro().mix,g=Ai(),I=kn();Z.exports=function(S,t,e,r){r=r||{};var a=r.dfltColor;function n(p,k){return I.coerce2(S,t,r.attributes,p,k)}var o=n("linecolor",a),i=n("linewidth"),l=e("showline",r.showLine||!!o||!!i);l||(delete t.linecolor,delete t.linewidth);var f=c(a,r.bgColor,r.blend||g.lightFraction).toRgbString(),x=n("gridcolor",f),y=n("gridwidth"),v=n("griddash"),T=e("showgrid",r.showGrid||!!x||!!y||!!v);if(T||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),r.hasMinor){var u=c(t.gridcolor,r.bgColor,67).toRgbString(),b=n("minor.gridcolor",u),_=n("minor.gridwidth",t.gridwidth||1),P=n("minor.griddash",t.griddash||"solid"),M=e("minor.showgrid",!!b||!!_||!!P);M||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!r.noZeroLine){n("zerolinelayer");var C=n("zerolinecolor",a),A=n("zerolinewidth"),h=e("zeroline",r.showGrid||!!C||!!A);h||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),rx=Dt((Q,Z)=>{var c=Hn(),g=Qo(),I=kn(),S=mu(),t=Ad(),e=Td(),r=xg(),a=_g(),n=n0(),o=dm(),i=qm(),l=ex(),f=z_(),x=i0(),y=ic().WEEKDAY_PATTERN,v=ic().HOUR_PATTERN;Z.exports=function(_,P,M,C,A){var h=C.letter,p=C.font||{},k=C.splomStash||{},w=M("visible",!C.visibleDflt),B=P._template||{},O=P.type||B.type||"-",j;if(O==="date"){var V=g.getComponentMethod("calendars","handleDefaults");V(_,P,"calendar",C.calendar),C.noTicklabelmode||(j=M("ticklabelmode"))}!C.noTicklabelindex&&(O==="date"||O==="linear")&&M("ticklabelindex");var H="";(!C.noTicklabelposition||O==="multicategory")&&(H=I.coerce(_,P,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:j==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),C.noTicklabeloverflow||M("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),x(P,A),f(_,P,M,C),i(_,P,M,C),C.noHover||(O!=="category"&&M("hoverformat"),C.noUnifiedhovertitle||M("unifiedhovertitle.text"));var F=M("color"),U=F!==e.color.dflt?F:p.color,W=k.label||A._dfltTitle[h];if(o(_,P,M,O,C),!w)return P;M("title.text",W),I.coerceFont(M,"title.font",p,{overrideDflt:{size:I.bigFont(p.size),color:U}}),r(_,P,M,O);var q=C.hasMinor;if(q&&(S.newContainer(P,"minor"),r(_,P,M,O,{isMinor:!0})),n(_,P,M,O,C),a(_,P,M,C),q){var J=C.isMinor;C.isMinor=!0,a(_,P,M,C),C.isMinor=J}l(_,P,M,{dfltColor:F,bgColor:C.bgColor,showGrid:C.showGrid,hasMinor:q,attributes:e}),q&&!P.minor.ticks&&!P.minor.showgrid&&delete P.minor,(P.showline||P.ticks)&&M("mirror");var lt=O==="multicategory";if(!C.noTickson&&(O==="category"||lt)&&(P.ticks||P.showgrid)&&(lt?(M("tickson","boundaries"),delete P.ticklabelposition):M("tickson")),lt){var yt=M("showdividers");yt&&(M("dividercolor"),M("dividerwidth"))}if(O==="date")if(t(_,P,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!P.rangebreaks.length)delete P.rangebreaks;else{for(var mt=0;mt=2){var p="",k,w;if(h.length===2){for(k=0;k<2;k++)if(w=b(h[k]),w){p=y;break}}var B=C("pattern",p);if(B===y)for(k=0;k<2;k++)w=b(h[k]),w&&(P.bounds[k]=h[k]=w-1);if(B)for(k=0;k<2;k++)switch(w=h[k],B){case y:if(!c(w)){P.enabled=!1;return}if(w=+w,w!==Math.floor(w)||w<0||w>=7){P.enabled=!1;return}P.bounds[k]=h[k]=w;break;case v:if(!c(w)){P.enabled=!1;return}if(w=+w,w<0||w>24){P.enabled=!1;return}P.bounds[k]=h[k]=w;break}if(M.autorange===!1){var O=M.range;if(O[0]O[1]){P.enabled=!1;return}}else if(h[0]>O[0]&&h[1]{var c=Hn(),g=kn();Z.exports=function(I,S,t,e){var r=e.counterAxes||[],a=e.overlayableAxes||[],n=e.letter,o=e.grid,i=e.overlayingDomain,l,f,x,y,v,T;o&&(f=o._domains[n][o._axisMap[S._id]],l=o._anchors[S._id],f&&(x=o[n+"side"].split(" ")[0],y=o.domain[n][x==="right"||x==="top"?1:0])),f=f||[0,1],l=l||(c(I.position)?"free":r[0]||"free"),x=x||(n==="x"?"bottom":"left"),y=y||0,v=0,T=!1;var u=g.coerce(I,S,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:l}},"anchor"),b=g.coerce(I,S,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:x}},"side");if(u==="free"){if(n==="y"){var _=t("autoshift");_&&(y=b==="left"?i[0]:i[1],T=S.automargin?S.automargin:!0,v=b==="left"?-3:3),t("shift",v)}t("position",y)}t("automargin",T);var P=!1;if(a.length&&(P=g.coerce(I,S,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!P){var M=t("domain",f);M[0]>M[1]-1/4096&&(S.domain=f),g.noneOrAll(I.domain,S.domain,f),S.tickmode==="sync"&&(S.tickmode="auto")}return t("layer"),S}}),Nw=Dt((Q,Z)=>{var c=kn(),g=pi(),I=Fp().isUnifiedHover,S=gv(),t=mu(),e=k1(),r=Td(),a=kp(),n=rx(),o=xv(),i=X_(),l=Bc(),f=l.id2name,x=l.name2id,y=ic().AX_ID_PATTERN,v=Qo(),T=v.traceIs,u=v.getComponentMethod;function b(_,P,M){Array.isArray(_[P])?_[P].push(M):_[P]=[M]}Z.exports=function(_,P,M){var C=P.autotypenumbers,A={},h={},p={},k={},w={},B={},O={},j={},V={},H={},F,U;for(F=0;F{var c=Wr(),g=Qo(),I=kn(),S=Vs(),t=Ls();Z.exports=function(e,r,a,n){var o=e._fullLayout;if(r.length===0){t.redrawComponents(e);return}function i(P){var M=P.xaxis,C=P.yaxis;o._defs.select("#"+P.clipId+"> rect").call(S.setTranslate,0,0).call(S.setScale,1,1),P.plot.call(S.setTranslate,M._offset,C._offset).call(S.setScale,1,1);var A=P.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(S.setPointGroupScale,1,1),A.selectAll(".textpoint").call(S.setTextPointsScale,1,1),A.call(S.hideOutsideRangePoints,P)}function l(P,M){var C=P.plotinfo,A=C.xaxis,h=C.yaxis,p=A._length,k=h._length,w=!!P.xr1,B=!!P.yr1,O=[];if(w){var j=I.simpleMap(P.xr0,A.r2l),V=I.simpleMap(P.xr1,A.r2l),H=j[1]-j[0],F=V[1]-V[0];O[0]=(j[0]*(1-M)+M*V[0]-j[0])/(j[1]-j[0])*p,O[2]=p*(1-M+M*F/H),A.range[0]=A.l2r(j[0]*(1-M)+M*V[0]),A.range[1]=A.l2r(j[1]*(1-M)+M*V[1])}else O[0]=0,O[2]=p;if(B){var U=I.simpleMap(P.yr0,h.r2l),W=I.simpleMap(P.yr1,h.r2l),q=U[1]-U[0],J=W[1]-W[0];O[1]=(U[1]*(1-M)+M*W[1]-U[1])/(U[0]-U[1])*k,O[3]=k*(1-M+M*J/q),h.range[0]=A.l2r(U[0]*(1-M)+M*W[0]),h.range[1]=h.l2r(U[1]*(1-M)+M*W[1])}else O[1]=0,O[3]=k;t.drawOne(e,A,{skipTitle:!0}),t.drawOne(e,h,{skipTitle:!0}),t.redrawComponents(e,[A._id,h._id]);var lt=w?p/O[2]:1,yt=B?k/O[3]:1,mt=w?O[0]:0,st=B?O[1]:0,tt=w?O[0]/O[2]*p:0,pt=B?O[1]/O[3]*k:0,rt=A._offset-tt,at=h._offset-pt;C.clipRect.call(S.setTranslate,mt,st).call(S.setScale,1/lt,1/yt),C.plot.call(S.setTranslate,rt,at).call(S.setScale,lt,yt),S.setPointGroupScale(C.zoomScalePts,1/lt,1/yt),S.setTextPointsScale(C.zoomScaleTxt,1/lt,1/yt)}var f;n&&(f=n());function x(){for(var P={},M=0;Ma.duration?(x(),u=window.cancelAnimationFrame(_)):u=window.requestAnimationFrame(_)}return v=Date.now(),u=window.requestAnimationFrame(_),Promise.resolve()}}),Mf=Dt(Q=>{var Z=Wr(),c=Qo(),g=kn(),I=Kc(),S=Vs(),t=ud().getModuleCalcData,e=Bc(),r=ic(),a=Dp(),n=g.ensureSingle;function o(T,u,b){return g.ensureSingle(T,u,b,function(_){_.datum(b)})}var i=r.zindexSeparator;Q.name="cartesian",Q.attr=["xaxis","yaxis"],Q.idRoot=["x","y"],Q.idRegex=r.idRegex,Q.attrRegex=r.attrRegex,Q.attributes=_0(),Q.layoutAttributes=Td(),Q.supplyLayoutDefaults=Nw(),Q.transitionAxes=C6(),Q.finalizeSubplots=function(T,u){var b=u._subplots,_=b.xaxis,P=b.yaxis,M=b.cartesian,C=M,A={},h={},p,k,w;for(p=0;p0){var O=B.id;if(O.indexOf(i)!==-1)continue;O+=i+(p+1),B=g.extendFlat({},B,{id:O,plot:P._cartesianlayer.selectAll(".subplot").select("."+O)})}for(var j=[],V,H=0;H1&&(J+=i+q),W.push(A+J),C=0;C1,w=u.mainplotinfo;if(!u.mainplot||k)if(p)u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.xaxislayer=n(_,"g","xaxislayer-above"),u.yaxislayer=n(_,"g","yaxislayer-above");else{if(!C){var B=n(_,"g","layer-subplot");u.shapelayer=n(B,"g","shapelayer"),u.imagelayer=n(B,"g","imagelayer"),w&&k?(u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer):(u.minorGridlayer=n(_,"g","minor-gridlayer"),u.gridlayer=n(_,"g","gridlayer"),u.zerolinelayer=n(_,"g","zerolinelayer"));var O=n(_,"g","layer-between");u.shapelayerBetween=n(O,"g","shapelayer"),u.imagelayerBetween=n(O,"g","imagelayer"),n(_,"path","xlines-below"),n(_,"path","ylines-below"),u.overlinesBelow=n(_,"g","overlines-below"),n(_,"g","xaxislayer-below"),n(_,"g","yaxislayer-below"),u.overaxesBelow=n(_,"g","overaxes-below")}u.overplot=n(_,"g","overplot"),u.plot=n(u.overplot,"g",P),w&&k?u.zerolinelayerAbove=w.zerolinelayerAbove:u.zerolinelayerAbove=n(_,"g","zerolinelayer-above"),C||(u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.overlinesAbove=n(_,"g","overlines-above"),n(_,"g","xaxislayer-above"),n(_,"g","yaxislayer-above"),u.overaxesAbove=n(_,"g","overaxes-above"),u.xlines=_.select(".xlines-"+A),u.ylines=_.select(".ylines-"+h),u.xaxislayer=_.select(".xaxislayer-"+A),u.yaxislayer=_.select(".yaxislayer-"+h))}else{var j=w.plotgroup,V=P+"-x",H=P+"-y";u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer,u.zerolinelayerAbove=w.zerolinelayerAbove,n(w.overlinesBelow,"path",V),n(w.overlinesBelow,"path",H),n(w.overaxesBelow,"g",V),n(w.overaxesBelow,"g",H),u.plot=n(w.overplot,"g",P),n(w.overlinesAbove,"path",V),n(w.overlinesAbove,"path",H),n(w.overaxesAbove,"g",V),n(w.overaxesAbove,"g",H),u.xlines=j.select(".overlines-"+A).select("."+V),u.ylines=j.select(".overlines-"+h).select("."+H),u.xaxislayer=j.select(".overaxes-"+A).select("."+V),u.yaxislayer=j.select(".overaxes-"+h).select("."+H)}C||(p||(o(u.minorGridlayer,"g",u.xaxis._id),o(u.minorGridlayer,"g",u.yaxis._id),u.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),o(u.gridlayer,"g",u.xaxis._id),o(u.gridlayer,"g",u.yaxis._id),u.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),u.xlines.style("fill","none").classed("crisp",!0),u.ylines.style("fill","none").classed("crisp",!0))}function y(T,u){if(T){var b={};T.each(function(h){var p=h[0],k=Z.select(this);k.remove(),v(p,u),b[p]=!0});for(var _ in u._plots)for(var P=u._plots[_],M=P.overlays||[],C=0;C{var c=Tc();Z.exports={hasLines:c.hasLines,hasMarkers:c.hasMarkers,hasText:c.hasText,isBubble:c.isBubble,attributes:ef(),layoutAttributes:yg(),supplyDefaults:Fw(),crossTraceDefaults:Bw(),supplyLayoutDefaults:Rw(),calc:me().calc,crossTraceCalc:An(),arraysToCalcdata:ct(),plot:Ka(),colorbar:xo(),formatLabels:Ws(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:Md(),selectPoints:Nf(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Mf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),nx=Dt((Q,Z)=>{var c=Wr(),g=pi(),I=Z_(),S=kn(),t=S.strScale,e=S.strRotate,r=S.strTranslate;Z.exports=function(a,n,o){var i=a.node(),l=I[o.arrowhead||0],f=I[o.startarrowhead||0],x=(o.arrowwidth||1)*(o.arrowsize||1),y=(o.arrowwidth||1)*(o.startarrowsize||1),v=n.indexOf("start")>=0,T=n.indexOf("end")>=0,u=l.backoff*x+o.standoff,b=f.backoff*y+o.startstandoff,_,P,M,C;if(i.nodeName==="line"){_={x:+a.attr("x1"),y:+a.attr("y1")},P={x:+a.attr("x2"),y:+a.attr("y2")};var A=_.x-P.x,h=_.y-P.y;if(M=Math.atan2(h,A),C=M+Math.PI,u&&b&&u+b>Math.sqrt(A*A+h*h)){q();return}if(u){if(u*u>A*A+h*h){q();return}var p=u*Math.cos(M),k=u*Math.sin(M);P.x+=p,P.y+=k,a.attr({x2:P.x,y2:P.y})}if(b){if(b*b>A*A+h*h){q();return}var w=b*Math.cos(M),B=b*Math.sin(M);_.x-=w,_.y-=B,a.attr({x1:_.x,y1:_.y})}}else if(i.nodeName==="path"){var O=i.getTotalLength(),j="";if(O{var c=Wr(),g=Qo(),I=Kc(),S=kn(),t=S.strTranslate,e=Ls(),r=pi(),a=Vs(),n=tf(),o=ec(),i=I0(),l=cp(),f=mu().arrayEditor,x=nx();Z.exports={draw:y,drawOne:v,drawRaw:u};function y(b){var _=b._fullLayout;_._infolayer.selectAll(".annotation").remove();for(var P=0;P<_.annotations.length;P++)_.annotations[P].visible&&v(b,P);return I.previousPromises(b)}function v(b,_){var P=b._fullLayout,M=P.annotations[_]||{},C=e.getFromId(b,M.xref),A=e.getFromId(b,M.yref);C&&C.setScale(),A&&A.setScale(),u(b,M,_,!1,C,A)}function T(b,_,P,M,C){var A=C[P],h=C[P+"ref"],p=P.indexOf("y")!==-1,k=e.getRefType(h)==="domain",w=p?M.h:M.w;return b?k?A+(p?-_:_)/b._length:b.p2r(b.r2p(A)+_):A+(p?-_:_)/w}function u(b,_,P,M,C,A){var h=b._fullLayout,p=b._fullLayout._size,k=b._context.edits,w,B;M?(w="annotation-"+M,B=M+".annotations"):(w="annotation",B="annotations");var O=f(b.layout,B,_),j=O.modifyBase,V=O.modifyItem,H=O.getUpdateObj;h._infolayer.selectAll("."+w+'[data-index="'+P+'"]').remove();var F="clip"+h._uid+"_ann"+P;if(!_._input||_.visible===!1){c.selectAll("#"+F).remove();return}var U={x:{},y:{}},W=+_.textangle||0,q=h._infolayer.append("g").classed(w,!0).attr("data-index",String(P)).style("opacity",_.opacity),J=q.append("g").classed("annotation-text-g",!0),lt=k[_.showarrow?"annotationTail":"annotationPosition"],yt=_.captureevents||k.annotationText||lt;function mt(Pt){var qt={index:P,annotation:_._input,fullAnnotation:_,event:Pt};return M&&(qt.subplotId=M),qt}var st=J.append("g").style("pointer-events",yt?"all":null).call(i,"pointer").on("click",function(){b._dragging=!1,b.emit("plotly_clickannotation",mt(c.event))});_.hovertext&&st.on("mouseover",function(){var Pt=_.hoverlabel,qt=Pt.font,Wt=this.getBoundingClientRect(),Jt=b.getBoundingClientRect();n.loneHover({x0:Wt.left-Jt.left,x1:Wt.right-Jt.left,y:(Wt.top+Wt.bottom)/2-Jt.top,text:_.hovertext,color:Pt.bgcolor,borderColor:Pt.bordercolor,fontFamily:qt.family,fontSize:qt.size,fontColor:qt.color,fontWeight:qt.weight,fontStyle:qt.style,fontVariant:qt.variant,fontShadow:qt.fontShadow,fontLineposition:qt.fontLineposition,fontTextcase:qt.fontTextcase},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:b})}).on("mouseout",function(){n.loneUnhover(h._hoverlayer.node())});var tt=_.borderwidth,pt=_.borderpad,rt=tt+pt,at=st.append("rect").attr("class","bg").style("stroke-width",tt+"px").call(r.stroke,_.bordercolor).call(r.fill,_.bgcolor),vt=_.width||_.height,it=h._topclips.selectAll("#"+F).data(vt?[0]:[]);it.enter().append("clipPath").classed("annclip",!0).attr("id",F).append("rect"),it.exit().remove();var K=_.font,ft=h._meta?S.templateString(_.text,h._meta):_.text,ut=st.append("text").classed("annotation-text",!0).text(ft);function kt(Pt){return Pt.call(a.font,K).attr({"text-anchor":{left:"start",right:"end"}[_.align]||"middle"}),o.convertToTspans(Pt,b,It),Pt}function It(){var Pt=ut.selectAll("a");if(Pt.size()===1&&Pt.text()===ut.text()){var qt=st.insert("a",":first-child").attr({"xlink:xlink:href":Pt.attr("xlink:href"),"xlink:xlink:show":Pt.attr("xlink:show")}).style({cursor:"pointer"});qt.node().appendChild(at.node())}var Wt=st.select(".annotation-text-math-group"),Jt=!Wt.empty(),ge=a.bBox((Jt?Wt:ut).node()),fe=ge.width,pe=ge.height,se=_.width||fe,Tt=_.height||pe,Lt=Math.round(se+2*rt),Mt=Math.round(Tt+2*rt);function ee(ui,Gn){return Gn==="auto"&&(ui<1/3?Gn="left":ui>2/3?Gn="right":Gn="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Gn]}for(var ve=!1,oe=["x","y"],Ae=0;Ae1)&&(cr===Ge?(le=ur.r2fraction(_["a"+He]),(le<0||le>1)&&(ve=!0)):ve=!0),ne=ur._offset+ur.r2p(_[He]),St=.5}else{var ke=re==="domain";He==="x"?(gt=_[He],ne=ke?ur._offset+ur._length*gt:ne=p.l+p.w*gt):(gt=1-_[He],ne=ke?ur._offset+ur._length*gt:ne=p.t+p.h*gt),St=_.showarrow?.5:gt}if(_.showarrow){Gt.head=ne;var Ue=_["a"+He];if(Nt=qr*ee(.5,_.xanchor)-br*ee(.5,_.yanchor),cr===Ge){var qe=e.getRefType(cr);qe==="domain"?(He==="y"&&(Ue=1-Ue),Gt.tail=ur._offset+ur._length*Ue):qe==="paper"?He==="y"?(Ue=1-Ue,Gt.tail=p.t+p.h*Ue):Gt.tail=p.l+p.w*Ue:Gt.tail=ur._offset+ur.r2p(Ue),Ct=Nt}else Gt.tail=ne+Ue,Ct=Nt+Ue;Gt.text=Gt.tail+Nt;var or=h[He==="x"?"width":"height"];if(Ge==="paper"&&(Gt.head=S.constrain(Gt.head,1,or-1)),cr==="pixel"){var Sr=-Math.max(Gt.tail-3,Gt.text),Mr=Math.min(Gt.tail+3,Gt.text)-or;Sr>0?(Gt.tail+=Sr,Gt.text+=Sr):Mr>0&&(Gt.tail-=Mr,Gt.text-=Mr)}Gt.tail+=Le,Gt.head+=Le}else Nt=Xr*ee(St,nn),Ct=Nt,Gt.text=ne+Nt;Gt.text+=Le,Nt+=Le,Ct+=Le,_["_"+He+"padplus"]=Xr/2+Ct,_["_"+He+"padminus"]=Xr/2-Ct,_["_"+He+"size"]=Xr,_["_"+He+"shift"]=Nt}if(ve){st.remove();return}var mr=0,Qr=0;if(_.align!=="left"&&(mr=(se-fe)*(_.align==="center"?.5:1)),_.valign!=="top"&&(Qr=(Tt-pe)*(_.valign==="middle"?.5:1)),Jt)Wt.select("svg").attr({x:rt+mr-1,y:rt+Qr}).call(a.setClipUrl,vt?F:null,b);else{var Wn=rt+Qr-ge.top,qn=rt+mr-ge.left;ut.call(o.positionText,qn,Wn).call(a.setClipUrl,vt?F:null,b)}it.select("rect").call(a.setRect,rt,rt,se,Tt),at.call(a.setRect,tt/2,tt/2,Lt-tt,Mt-tt),st.call(a.setTranslate,Math.round(U.x.text-Lt/2),Math.round(U.y.text-Mt/2)),J.attr({transform:"rotate("+W+","+U.x.text+","+U.y.text+")"});var ei=function(ui,Gn){q.selectAll(".annotation-arrow-g").remove();var ua=U.x.head,Yi=U.y.head,We=U.x.tail+ui,nr=U.y.tail+Gn,dr=U.x.text+ui,_r=U.y.text+Gn,tn=S.rotationXYMatrix(W,dr,_r),Cn=S.apply2DTransform(tn),Tn=S.apply2DTransform2(tn),Mn=+at.attr("width"),mi=+at.attr("height"),Mi=dr-.5*Mn,Ni=Mi+Mn,Hi=_r-.5*mi,Ji=Hi+mi,di=[[Mi,Hi,Mi,Ji],[Mi,Ji,Ni,Ji],[Ni,Ji,Ni,Hi],[Ni,Hi,Mi,Hi]].map(Tn);if(!di.reduce(function(Ce,pr){return Ce^!!S.segmentsIntersect(ua,Yi,ua+1e6,Yi+1e6,pr[0],pr[1],pr[2],pr[3])},!1)){di.forEach(function(Ce){var pr=S.segmentsIntersect(We,nr,ua,Yi,Ce[0],Ce[1],Ce[2],Ce[3]);pr&&(We=pr.x,nr=pr.y)});var za=_.arrowwidth,qa=_.arrowcolor,Oe=_.arrowside,ze=q.append("g").style({opacity:r.opacity(qa)}).classed("annotation-arrow-g",!0),Br=ze.append("path").attr("d","M"+We+","+nr+"L"+ua+","+Yi).style("stroke-width",za+"px").call(r.stroke,r.rgb(qa));if(x(Br,Oe,_),k.annotationPosition&&Br.node().parentNode&&!M){var $r=ua,Gr=Yi;if(_.standoff){var Rr=Math.sqrt(Math.pow(ua-We,2)+Math.pow(Yi-nr,2));$r+=_.standoff*(We-ua)/Rr,Gr+=_.standoff*(nr-Yi)/Rr}var Yr=ze.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(We-$r)+","+(nr-Gr),transform:t($r,Gr)}).style("stroke-width",za+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),mn,on;l.init({element:Yr.node(),gd:b,prepFn:function(){var Ce=a.getTranslate(st);mn=Ce.x,on=Ce.y,C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0)},moveFn:function(Ce,pr){var Hr=Cn(mn,on),_n=Hr[0]+Ce,Bn=Hr[1]+pr;st.call(a.setTranslate,_n,Bn),V("x",T(C,Ce,"x",p,_)),V("y",T(A,pr,"y",p,_)),_.axref===_.xref&&V("ax",T(C,Ce,"ax",p,_)),_.ayref===_.yref&&V("ay",T(A,pr,"ay",p,_)),ze.attr("transform",t(Ce,pr)),J.attr({transform:"rotate("+W+","+_n+","+Bn+")"})},doneFn:function(){g.call("_guiRelayout",b,H());var Ce=document.querySelector(".js-notes-box-panel");Ce&&Ce.redraw(Ce.selectedObj)}})}}};if(_.showarrow&&ei(0,0),lt){var Di;l.init({element:st.node(),gd:b,prepFn:function(){Di=J.attr("transform")},moveFn:function(ui,Gn){var ua="pointer";if(_.showarrow)_.axref===_.xref?V("ax",T(C,ui,"ax",p,_)):V("ax",_.ax+ui),_.ayref===_.yref?V("ay",T(A,Gn,"ay",p.w,_)):V("ay",_.ay+Gn),ei(ui,Gn);else{if(M)return;var Yi,We;if(C)Yi=T(C,ui,"x",p,_);else{var nr=_._xsize/p.w,dr=_.x+(_._xshift-_.xshift)/p.w-nr/2;Yi=l.align(dr+ui/p.w,nr,0,1,_.xanchor)}if(A)We=T(A,Gn,"y",p,_);else{var _r=_._ysize/p.h,tn=_.y-(_._yshift+_.yshift)/p.h-_r/2;We=l.align(tn-Gn/p.h,_r,0,1,_.yanchor)}V("x",Yi),V("y",We),(!C||!A)&&(ua=l.getCursor(C?.5:Yi,A?.5:We,_.xanchor,_.yanchor))}J.attr({transform:t(ui,Gn)+Di}),i(st,ua)},clickFn:function(ui,Gn){_.captureevents&&b.emit("plotly_clickannotation",mt(Gn))},doneFn:function(){i(st),g.call("_guiRelayout",b,H());var ui=document.querySelector(".js-notes-box-panel");ui&&ui.redraw(ui.selectedObj)}})}}k.annotationText?ut.call(o.makeEditable,{delegate:st,gd:b}).call(kt).on("edit",function(Pt){_.text=Pt,this.call(kt),V("text",Pt),C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0),g.call("_guiRelayout",b,H())}):ut.call(kt)}}),L6=Dt((Q,Z)=>{var c=kn(),g=Qo(),I=mu().arrayEditor;Z.exports={hasClickToShow:S,onClick:t};function S(a,n){var o=e(a,n);return o.on.length>0||o.explicitOff.length>0}function t(a,n){var o=e(a,n),i=o.on,l=o.off.concat(o.explicitOff),f={},x=a._fullLayout.annotations,y,v;if(i.length||l.length){for(y=0;y{var c=kn(),g=pi();Z.exports=function(I,S,t,e){e("opacity");var r=e("bgcolor"),a=e("bordercolor"),n=g.opacity(a);e("borderpad");var o=e("borderwidth"),i=e("showarrow");e("text",i?" ":t._dfltTitle.annotation),e("textangle"),c.coerceFont(e,"font",t.font),e("width"),e("align");var l=e("height");if(l&&e("valign"),i){var f=e("arrowside"),x,y;f.indexOf("end")!==-1&&(x=e("arrowhead"),y=e("arrowsize")),f.indexOf("start")!==-1&&(e("startarrowhead",x),e("startarrowsize",y)),e("arrowcolor",n?S.bordercolor:g.defaultLine),e("arrowwidth",(n&&o||1)*2),e("standoff"),e("startstandoff")}var v=e("hovertext"),T=t.hoverlabel||{};if(v){var u=e("hoverlabel.bgcolor",T.bgcolor||(g.opacity(r)?g.rgb(r):g.defaultLine)),b=e("hoverlabel.bordercolor",T.bordercolor||g.contrast(u)),_=c.extendFlat({},T.font);_.color||(_.color=b),c.coerceFont(e,"hoverlabel.font",_)}e("captureevents",!!v)}}),Q_=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=jw(),t=gm();Z.exports=function(r,a){I(r,a,{name:"annotations",handleItemDefaults:e})};function e(r,a,n){function o(p,k){return c.coerce(r,a,t,p,k)}var i=o("visible"),l=o("clicktoshow");if(i||l){S(r,a,n,o);for(var f=a.showarrow,x=["x","y"],y=[-10,-30],v={_fullLayout:n},T=0;T<2;T++){var u=x[T],b=g.coerceRef(r,a,v,u,"","paper");if(b!=="paper"){var _=g.getFromId(v,b);_._annIndices.push(a._index)}if(g.coercePosition(a,v,o,b,u,.5),f){var P="a"+u,M=g.coerceRef(r,a,v,P,"pixel",["pixel","paper"]);M!=="pixel"&&M!==b&&(M=a[P]="pixel");var C=M==="pixel"?y[T]:.4;g.coercePosition(a,v,o,M,P,C)}o(u+"anchor"),o(u+"shift")}if(c.noneOrAll(r,a,["x","y"]),f&&c.noneOrAll(r,a,["ax","ay"]),l){var A=o("xclick"),h=o("yclick");a._xclick=A===void 0?a.x:g.cleanPosition(A,v,a.xref),a._yclick=h===void 0?a.y:g.cleanPosition(h,v,a.yref)}}}}),Uw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=J_().draw;Z.exports=function(e){var r=e._fullLayout,a=c.filterVisible(r.annotations);if(a.length&&e._fullData.length)return c.syncOrAsync([I,S],e)};function S(e){var r=e._fullLayout;c.filterVisible(r.annotations).forEach(function(a){var n=g.getFromId(e,a.xref),o=g.getFromId(e,a.yref),i=g.getRefType(a.xref),l=g.getRefType(a.yref);a._extremes={},i==="range"&&t(a,n),l==="range"&&t(a,o)})}function t(e,r){var a=r._id,n=a.charAt(0),o=e[n],i=e["a"+n],l=e[n+"ref"],f=e["a"+n+"ref"],x=e["_"+n+"padplus"],y=e["_"+n+"padminus"],v={x:1,y:-1}[n]*e[n+"shift"],T=3*e.arrowsize*e.arrowwidth||0,u=T+v,b=T-v,_=3*e.startarrowsize*e.arrowwidth||0,P=_+v,M=_-v,C;if(f===l){var A=g.findExtremes(r,[r.r2c(o)],{ppadplus:u,ppadminus:b}),h=g.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(x,P),ppadminus:Math.max(y,M)});C={min:[A.min[0],h.min[0]],max:[A.max[0],h.max[0]]}}else P=i?P+i:P,M=i?M-i:M,C=g.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(x,u,P),ppadminus:Math.max(y,b,M)});e._extremes[a]=C}}),P6=Dt((Q,Z)=>{var c=Hn(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(!(r||a))return;var n=I._fullLayout.annotations,o=S._id.charAt(0),i,l;function f(y){var v=i[y],T=null;r?T=g(v,S.range):T=Math.pow(10,v),c(T)||(T=null),e(l+y,T)}for(var x=0;x{var c=J_(),g=L6();Z.exports={moduleType:"component",name:"annotations",layoutAttributes:gm(),supplyLayoutDefaults:Q_(),includeBasePlot:Cg()("annotations"),calcAutorange:Uw(),draw:c.draw,drawOne:c.drawOne,drawRaw:c.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:P6()}}),I6=Dt((Q,Z)=>{var c=gm(),g=Yc().overrideAll,I=mu().templatedArray;Z.exports=g(I("annotation",{visible:c.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:c.xanchor,xshift:c.xshift,yanchor:c.yanchor,yshift:c.yshift,text:c.text,textangle:c.textangle,font:c.font,width:c.width,height:c.height,opacity:c.opacity,align:c.align,valign:c.valign,bgcolor:c.bgcolor,bordercolor:c.bordercolor,borderpad:c.borderpad,borderwidth:c.borderwidth,showarrow:c.showarrow,arrowcolor:c.arrowcolor,arrowhead:c.arrowhead,startarrowhead:c.startarrowhead,arrowside:c.arrowside,arrowsize:c.arrowsize,startarrowsize:c.startarrowsize,arrowwidth:c.arrowwidth,standoff:c.standoff,startstandoff:c.startstandoff,hovertext:c.hovertext,hoverlabel:c.hoverlabel,captureevents:c.captureevents}),"calc","from-root")}),IF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=jw(),t=I6();Z.exports=function(r,a,n){I(r,a,{name:"annotations",handleItemDefaults:e,fullLayout:n.fullLayout})};function e(r,a,n,o){function i(x,y){return c.coerce(r,a,t,x,y)}function l(x){var y=x+"axis",v={_fullLayout:{}};return v._fullLayout[y]=n[y],g.coercePosition(a,v,i,x,x,.5)}var f=i("visible");f&&(S(r,a,o.fullLayout,i),l("x"),l("y"),l("z"),c.noneOrAll(r,a,["x","y","z"]),a.xref="x",a.yref="y",a.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),a.showarrow&&(a.axref="pixel",a.ayref="pixel",i("ax",-10),i("ay",-30),c.noneOrAll(r,a,["ax","ay"])))}}),zF=Dt((Q,Z)=>{var c=kn(),g=Ls();Z.exports=function(S){for(var t=S.fullSceneLayout,e=t.annotations,r=0;r{function c(I,S){var t=[0,0,0,0],e,r;for(e=0;e<4;++e)for(r=0;r<4;++r)t[r]+=I[4*e+r]*S[e];return t}function g(I,S){var t=c(I.projection,c(I.view,c(I.model,[S[0],S[1],S[2],1])));return t}Z.exports=g}),OF=Dt((Q,Z)=>{var c=J_().drawRaw,g=RM(),I=["x","y","z"];Z.exports=function(S){for(var t=S.fullSceneLayout,e=S.dataScale,r=t.annotations,a=0;a1){o=!0;break}}o?S.fullLayout._infolayer.select(".annotation-"+S.id+'[data-index="'+a+'"]').remove():(n._pdata=g(S.glplot.cameraParams,[t.xaxis.r2l(n.x)*e[0],t.yaxis.r2l(n.y)*e[1],t.zaxis.r2l(n.z)*e[2]]),c(S.graphDiv,n,a,S.id,n._xa,n._ya))}}}),DF=Dt((Q,Z)=>{var c=Qo(),g=kn();Z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:I6()}}},layoutAttributes:I6(),handleDefaults:IF(),includeBasePlot:I,convert:zF(),draw:OF()};function I(S,t){var e=c.subplotsRegistry.gl3d;if(e)for(var r=e.attrRegex,a=Object.keys(S),n=0;n{var c=gm(),g=ma(),I=ef().line,S=kd().dash,t=Ia().extendFlat,e=mu().templatedArray;Jy();var r=qo(),{shapeTexttemplateAttrs:a,templatefallbackAttrs:n}=Zu(),o=w1();Z.exports=e("shape",{visible:t({},r.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},r.legend,{editType:"calc+arraydraw"}),legendgroup:t({},r.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},r.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:g({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},r.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},r.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:t({},c.xref,{}),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:t({},c.yref,{}),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:t({},I.color,{editType:"arraydraw"}),width:t({},I.width,{editType:"calc+arraydraw"}),dash:t({},S,{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:a({},{keys:Object.keys(o)}),texttemplatefallback:n({editType:"arraydraw"}),font:g({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"})}),FF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=NM(),t=wp();Z.exports=function(a,n){I(a,n,{name:"shapes",handleItemDefaults:r})};function e(a,n){return a?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function r(a,n,o){function i(tt,pt){return c.coerce(a,n,S,tt,pt)}n._isShape=!0;var l=i("visible");if(l){var f=i("showlegend");f&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),c.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var x=i("path"),y=x?"path":"rect",v=i("type",y),T=v!=="path";T&&delete n.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var u=i("line.width");u&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),_=i("ysizemode"),P=["x","y"],M=0;M<2;M++){var C=P[M],A=C+"anchor",h=C==="x"?b:_,p={_fullLayout:o},k,w,B,O=g.coerceRef(a,n,p,C,void 0,"paper"),j=g.getRefType(O);if(j==="range"?(k=g.getFromId(p,O),k._shapeIndices.push(n._index),B=t.rangeToShapePosition(k),w=t.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(i(C+"0shift"),i(C+"1shift"))):w=B=c.identity,T){var V=.25,H=.75,F=C+"0",U=C+"1",W=a[F],q=a[U];a[F]=w(a[F],!0),a[U]=w(a[U],!0),h==="pixel"?(i(F,0),i(U,10)):(g.coercePosition(n,p,i,O,F,V),g.coercePosition(n,p,i,O,U,H)),n[F]=B(n[F]),n[U]=B(n[U]),a[F]=W,a[U]=q}if(h==="pixel"){var J=a[A];a[A]=w(a[A],!0),g.coercePosition(n,p,i,O,A,.25),n[A]=B(n[A]),a[A]=J}}T&&c.noneOrAll(a,n,["x0","x1","y0","y1"]);var lt=v==="line",yt,mt;if(T&&(yt=i("label.texttemplate"),i("label.texttemplatefallback")),yt||(mt=i("label.text")),mt||yt){i("label.textangle");var st=i("label.textposition",lt?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(lt,st)),i("label.padding"),c.coerceFont(i,"label.font",o.font)}}}}),BF=Dt((Q,Z)=>{var c=pi(),g=kn();function I(S,t){return S?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Z.exports=function(S,t,e){e("newshape.visible"),e("newshape.name"),e("newshape.showlegend"),e("newshape.legend"),e("newshape.legendwidth"),e("newshape.legendgroup"),e("newshape.legendgrouptitle.text"),g.coerceFont(e,"newshape.legendgrouptitle.font"),e("newshape.legendrank"),e("newshape.drawdirection"),e("newshape.layer"),e("newshape.fillcolor"),e("newshape.fillrule"),e("newshape.opacity");var r=e("newshape.line.width");if(r){var a=(S||{}).plot_bgcolor||"#FFF";e("newshape.line.color",c.contrast(a)),e("newshape.line.dash")}var n=S.dragmode==="drawline",o=e("newshape.label.text"),i=e("newshape.label.texttemplate");if(e("newshape.label.texttemplatefallback"),o||i){e("newshape.label.textangle");var l=e("newshape.label.textposition",n?"middle":"middle center");e("newshape.label.xanchor"),e("newshape.label.yanchor",I(n,l)),e("newshape.label.padding"),g.coerceFont(e,"newshape.label.font",t.font)}e("activeshape.fillcolor"),e("activeshape.opacity")}}),RF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=qy(),S=wp();Z.exports=function(n){var o=n._fullLayout,i=c.filterVisible(o.shapes);if(!(!i.length||!n._fullData.length))for(var l=0;l0?u+y:y;return{ppad:y,ppadplus:v?_:P,ppadminus:v?P:_}}else return{ppad:y}}function a(n,o,i){var l=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",x,y,v=0,T=0,u=f?n.r2c:n.d2c,b=o[l+"sizemode"]==="scaled";if(b?(x=o[l+"0"],y=o[l+"1"],f&&(v=o[l+"0shift"],T=o[l+"1shift"])):(x=o[l+"anchor"],y=o[l+"anchor"]),x!==void 0)return[u(x)+v,u(y)+T];if(o.path){var _=1/0,P=-1/0,M=o.path.match(I.segmentRE),C,A,h,p,k;for(n.type==="date"&&(u=S.decodeDate(u)),C=0;CP&&(P=k)));if(P>=_)return[_,P]}}}),NF=Dt((Q,Z)=>{var c=V_();Z.exports={moduleType:"component",name:"shapes",layoutAttributes:NM(),supplyLayoutDefaults:FF(),supplyDrawNewShapeDefaults:BF(),includeBasePlot:Cg()("shapes"),calcAutorange:RF(),draw:c.draw,drawOne:c.drawOne}}),jM=Dt((Q,Z)=>{var c=ic(),g=mu().templatedArray;Jy(),Z.exports=g("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",c.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",c.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),jF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=jM(),t="images";Z.exports=function(r,a){var n={name:t,handleItemDefaults:e};I(r,a,n)};function e(r,a,n){function o(b,_){return c.coerce(r,a,S,b,_)}var i=o("source"),l=o("visible",!!i);if(!l)return a;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var f={_fullLayout:n},x=["x","y"],y=0;y<2;y++){var v=x[y],T=g.coerceRef(r,a,f,v,"paper",void 0);if(T!=="paper"){var u=g.getFromId(f,T);u._imgIndices.push(a._index)}g.coercePosition(a,f,o,T,v,0)}return a}}),UF=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=Ls(),S=Bc(),t=Dp();Z.exports=function(e){var r=e._fullLayout,a=[],n={},o=[],i,l;for(l=0;l{var c=Hn(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(r||a){for(var n=I._fullLayout.images,o=S._id.charAt(0),i,l,f=0;f{Z.exports={moduleType:"component",name:"images",layoutAttributes:jM(),supplyLayoutDefaults:jF(),includeBasePlot:Cg()("images"),draw:UF(),convertCoords:VF()}}),z6=Dt((Q,Z)=>{Z.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),UM=Dt((Q,Z)=>{var c=ma(),g=Ai(),I=Ia().extendFlat,S=Yc().overrideAll,t=Ny(),e=mu().templatedArray,r=e("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}});Z.exports=S(e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:r,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:I(t({editType:"arraydraw"}),{}),font:c({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),WF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=UM(),S=z6(),t=S.name,e=I.buttons;Z.exports=function(n,o){var i={name:t,handleItemDefaults:r};g(n,o,i)};function r(n,o,i){function l(y,v){return c.coerce(n,o,I,y,v)}var f=g(n,o,{name:"buttons",handleItemDefaults:a}),x=l("visible",f.length>0);x&&(l("active"),l("direction"),l("type"),l("showactive"),l("x"),l("y"),c.noneOrAll(n,o,["x","y"]),l("xanchor"),l("yanchor"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),c.coerceFont(l,"font",i.font),l("bgcolor",i.paper_bgcolor),l("bordercolor"),l("borderwidth"))}function a(n,o){function i(f,x){return c.coerce(n,o,e,f,x)}var l=i("visible",n.method==="skip"||Array.isArray(n.args));l&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}),qF=Dt((Q,Z)=>{Z.exports=t;var c=Wr(),g=pi(),I=Vs(),S=kn();function t(e,r,a){this.gd=e,this.container=r,this.id=a,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})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(e,r,a){var n=this.gd._fullLayout,o=n.width,i=n.height;this.position=e;var l=this.position.l,f=this.position.w,x=this.position.t,y=this.position.h,v=this.position.direction,T=v==="down",u=v==="left",b=v==="right",_=v==="up",P=f,M=y,C,A,h,p;!T&&!u&&!b&&!_&&(this.position.direction="down",T=!0);var k=T||_;k?(C=l,A=C+P,T?(h=x,p=Math.min(h+M,i),M=p-h):(p=x+M,h=Math.max(p-M,0),M=p-h)):(h=x,p=h+M,u?(A=l+P,C=Math.max(A-P,0),P=A-C):(C=l,A=Math.min(C+P,o),P=A-C)),this._box={l:C,t:h,w:P,h:M};var w=f>P,B=t.barLength+2*t.barPad,O=t.barWidth+2*t.barPad,j=l,V=x+y;V+O>i&&(V=i-O);var H=this.container.selectAll("rect.scrollbar-horizontal").data(w?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-horizontal",!0).call(g.fill,t.barColor),w?(this.hbar=H.attr({rx:t.barRadius,ry:t.barRadius,x:j,y:V,width:B,height:O}),this._hbarXMin=j+B/2,this._hbarTranslateMax=P-B):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=y>M,U=t.barWidth+2*t.barPad,W=t.barLength+2*t.barPad,q=l+f,J=x;q+U>o&&(q=o-U);var lt=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);lt.exit().on(".drag",null).remove(),lt.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,t.barColor),F?(this.vbar=lt.attr({rx:t.barRadius,ry:t.barRadius,x:q,y:J,width:U,height:W}),this._vbarYMin=J+W/2,this._vbarTranslateMax=M-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var yt=this.id,mt=C-.5,st=F?A+U+.5:A+.5,tt=h-.5,pt=w?p+O+.5:p+.5,rt=n._topdefs.selectAll("#"+yt).data(w||F?[0]:[]);if(rt.exit().remove(),rt.enter().append("clipPath").attr("id",yt).append("rect"),w||F?(this._clipRect=rt.select("rect").attr({x:Math.floor(mt),y:Math.floor(tt),width:Math.ceil(st)-Math.floor(mt),height:Math.ceil(pt)-Math.floor(tt)}),this.container.call(I.setClipUrl,yt,this.gd),this.bg.attr({x:l,y:x,width:f,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.setClipUrl,null),delete this._clipRect),w||F){var at=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(at);var vt=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault(),c.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));w&&this.hbar.on(".drag",null).call(vt),F&&this.vbar.on(".drag",null).call(vt)}this.setTranslate(r,a)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.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)},t.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=c.event.dx),this.vbar&&(r-=c.event.dy),this.setTranslate(e,r)},t.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=c.event.deltaY),this.vbar&&(r+=c.event.deltaY),this.setTranslate(e,r)},t.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,n=a+this._hbarTranslateMax,o=S.constrain(c.event.x,a,n),i=(o-a)/(n-a),l=this.position.w-this._box.w;e=i*l}if(this.vbar){var f=r+this._vbarYMin,x=f+this._vbarTranslateMax,y=S.constrain(c.event.y,f,x),v=(y-f)/(x-f),T=this.position.h-this._box.h;r=v*T}this.setTranslate(e,r)},t.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=S.constrain(e||0,0,a),r=S.constrain(r||0,0,n),this.translateX=e,this.translateY=r,this.container.call(I.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var o=e/a;this.hbar.call(I.setTranslate,e+o*this._hbarTranslateMax,r)}if(this.vbar){var i=r/n;this.vbar.call(I.setTranslate,e,r+i*this._vbarTranslateMax)}}}),$F=Dt((Q,Z)=>{var c=Wr(),g=Kc(),I=pi(),S=Vs(),t=kn(),e=ec(),r=mu().arrayEditor,a=Af().LINE_SPACING,n=z6(),o=qF();Z.exports=function(B){var O=B._fullLayout,j=t.filterVisible(O[n.name]);function V(yt){g.autoMargin(B,p(yt))}var H=O._menulayer.selectAll("g."+n.containerClassName).data(j.length>0?[0]:[]);if(H.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),H.exit().each(function(){c.select(this).selectAll("g."+n.headerGroupClassName).each(V)}).remove(),j.length!==0){var F=H.selectAll("g."+n.headerGroupClassName).data(j,i);F.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=t.ensureSingle(H,"g",n.dropdownButtonGroupClassName,function(yt){yt.style("pointer-events","all")}),W=0;W{var c=z6();Z.exports={moduleType:"component",name:c.name,layoutAttributes:UM(),supplyLayoutDefaults:WF(),draw:$F()}}),Vw=Dt((Q,Z)=>{Z.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}}),VM=Dt((Q,Z)=>{var c=ma(),g=Ny(),I=Ia().extendDeepAll,S=Yc().overrideAll,t=Cl(),e=mu().templatedArray,r=Vw(),a=e("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}});Z.exports=S(e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:a,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:I(g({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:t.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:c({})},font:c({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}),GF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=VM(),S=Vw(),t=S.name,e=I.steps;Z.exports=function(n,o){g(n,o,{name:t,handleItemDefaults:r})};function r(n,o,i){function l(_,P){return c.coerce(n,o,I,_,P)}for(var f=g(n,o,{name:"steps",handleItemDefaults:a}),x=0,y=0;y{var c=Wr(),g=Kc(),I=pi(),S=Vs(),t=kn(),e=t.strTranslate,r=ec(),a=mu().arrayEditor,n=Vw(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR;Z.exports=function(H){var F=H._context.staticPlot,U=H._fullLayout,W=y(U,H),q=U._infolayer.selectAll("g."+n.containerClassName).data(W.length>0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",F?null:"ew-resize");function J(st){st._commandObserver&&(st._commandObserver.remove(),delete st._commandObserver),g.autoMargin(H,x(st))}if(q.exit().each(function(){c.select(this).selectAll("g."+n.groupClassName).each(J)}).remove(),W.length!==0){var lt=q.selectAll("g."+n.groupClassName).data(W,v);lt.enter().append("g").classed(n.groupClassName,!0),lt.exit().each(J).remove();for(var yt=0;yt0&&(yt=yt.transition().duration(F.transition.duration).ease(F.transition.easing)),yt.attr("transform",e(lt-n.gripWidth*.5,F._dims.currentValueTotalHeight))}}function B(H,F){var U=H._dims;return U.inputAreaStart+n.stepInset+(U.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,F))}function O(H,F){var U=H._dims;return Math.min(1,Math.max(0,(F-n.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*n.stepInset-2*U.inputAreaStart)))}function j(H,F,U){var W=U._dims,q=t.ensureSingle(H,"rect",n.railTouchRectClass,function(J){J.call(h,F,H,U).style("pointer-events","all")});q.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,n.tickOffset+U.ticklen+W.labelHeight)}).call(I.fill,U.bgcolor).attr("opacity",0),S.setTranslate(q,0,W.currentValueTotalHeight)}function V(H,F){var U=F._dims,W=U.inputAreaLength-n.railInset*2,q=t.ensureSingle(H,"rect",n.railRectClass);q.attr({width:W,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(I.stroke,F.bordercolor).call(I.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),S.setTranslate(q,n.railInset,(U.inputAreaWidth-n.railWidth)*.5+U.currentValueTotalHeight)}}),KF=Dt((Q,Z)=>{var c=Vw();Z.exports={moduleType:"component",name:c.name,layoutAttributes:VM(),supplyLayoutDefaults:GF(),draw:YF()}}),O6=Dt((Q,Z)=>{var c=Ai();Z.exports={bgcolor:{valType:"color",dflt:c.background,editType:"plot"},bordercolor:{valType:"color",dflt:c.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"}}),HM=Dt((Q,Z)=>{Z.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"}}),D6=Dt((Q,Z)=>{Z.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}}),XF=Dt(Q=>{var Z=Bc(),c=ec(),g=D6(),I=Af().LINE_SPACING,S=g.name;function t(e){var r=e&&e[S];return r&&r.visible}Q.isVisible=t,Q.makeData=function(e){for(var r=Z.list({_fullLayout:e},"x",!0),a=e.margin,n=[],o=0;o{var c=kn(),g=mu(),I=Bc(),S=O6(),t=HM();Z.exports=function(e,r,a){var n=e[a],o=r[a];if(!(n.rangeslider||r._requestRangeslider[o._id]))return;c.isPlainObject(n.rangeslider)||(n.rangeslider={});var i=n.rangeslider,l=g.newContainer(o,"rangeslider");function f(p,k){return c.coerce(i,l,S,p,k)}var x,y;function v(p,k){return c.coerce(x,y,t,p,k)}var T=f("visible");if(T){f("bgcolor",r.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!o.isValidRange(i.range)),f("range");var u=r._subplots;if(u)for(var b=u.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===I.name2id(a)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),_=c.simpleMap(b,I.id2name),P=0;P<_.length;P++){var M=_[P];x=i[M]||{},y=g.newContainer(l,M,"yaxis");var C=r[M],A;x.range&&C.isValidRange(x.range)&&(A="fixed");var h=v("rangemode",A);h!=="match"&&v("range",C.range.slice())}l._input=i}}}),QF=Dt((Q,Z)=>{var c=Bc().list,g=K0().getAutoRange,I=D6();Z.exports=function(S){for(var t=c(S,"x",!0),e=0;e{var c=Wr(),g=Qo(),I=Kc(),S=kn(),t=S.strTranslate,e=Vs(),r=pi(),a=up(),n=Mf(),o=Bc(),i=cp(),l=I0(),f=D6();Z.exports=function(h){for(var p=h._fullLayout,k=p._rangeSliderData,w=0;w=fe.max)Jt=kt[ge+1];else if(Wt=fe.pmax)Jt=kt[ge+1];else if(Wt0?h.touches[0].clientX:0}function y(h,p,k,w){if(p._context.staticPlot)return;var B=h.select("rect."+f.slideBoxClassName).node(),O=h.select("rect."+f.grabAreaMinClassName).node(),j=h.select("rect."+f.grabAreaMaxClassName).node();function V(){var H=c.event,F=H.target,U=x(H),W=U-h.node().getBoundingClientRect().left,q=w.d2p(k._rl[0]),J=w.d2p(k._rl[1]),lt=i.coverSlip();this.addEventListener("touchmove",yt),this.addEventListener("touchend",mt),lt.addEventListener("mousemove",yt),lt.addEventListener("mouseup",mt);function yt(st){var tt=x(st),pt=+tt-U,rt,at,vt;switch(F){case B:if(vt="ew-resize",q+pt>k._length||J+pt<0)return;rt=q+pt,at=J+pt;break;case O:if(vt="col-resize",q+pt>k._length)return;rt=q+pt,at=J;break;case j:if(vt="col-resize",J+pt<0)return;rt=q,at=J+pt;break;default:vt="ew-resize",rt=W,at=W+pt;break}if(at{var c=kn(),g=O6(),I=HM(),S=XF();Z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:c.extendFlat({},g,{yaxis:I})}}},layoutAttributes:O6(),handleDefaults:JF(),calcAutorange:QF(),draw:tB(),isVisible:S.isVisible,makeData:S.makeData,autoMarginOpts:S.autoMarginOpts}}),F6=Dt((Q,Z)=>{var c=ma(),g=Ai(),I=mu().templatedArray,S=I("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"});Z.exports={visible:{valType:"boolean",editType:"plot"},buttons:S,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:c({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),WM=Dt((Q,Z)=>{Z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),rB=Dt((Q,Z)=>{var c=kn(),g=pi(),I=mu(),S=Ad(),t=F6(),e=WM();Z.exports=function(n,o,i,l,f){var x=n.rangeselector||{},y=I.newContainer(o,"rangeselector");function v(P,M){return c.coerce(x,y,t,P,M)}var T=S(x,y,{name:"buttons",handleItemDefaults:r,calendar:f}),u=v("visible",T.length>0);if(u){var b=a(o,i,l);v("x",b[0]),v("y",b[1]),c.noneOrAll(n,o,["x","y"]),v("xanchor"),v("yanchor"),c.coerceFont(v,"font",i.font);var _=v("bgcolor");v("activecolor",g.contrast(_,e.lightAmount,e.darkAmount)),v("bordercolor"),v("borderwidth")}};function r(n,o,i,l){var f=l.calendar;function x(T,u){return c.coerce(n,o,t.buttons,T,u)}var y=x("visible");if(y){var v=x("step");v!=="all"&&(f&&f!=="gregorian"&&(v==="month"||v==="year")?o.stepmode="backward":x("stepmode"),x("count")),x("label")}}function a(n,o,i){for(var l=i.filter(function(v){return o[v].anchor===n._id}),f=0,x=0;x{var c=Bi(),g=kn().titleCase;Z.exports=function(S,t){var e=S._name,r={};if(t.step==="all")r[e+".autorange"]=!0;else{var a=I(S,t);r[e+".range[0]"]=a[0],r[e+".range[1]"]=a[1]}return r};function I(S,t){var e=S.range,r=new Date(S.r2l(e[1])),a=t.step,n=c["utc"+g(a)],o=t.count,i;switch(t.stepmode){case"backward":i=S.l2r(+n.offset(r,-o));break;case"todate":var l=n.offset(r,-o);i=S.l2r(+n.ceil(l));break}var f=e[1];return[i,f]}}),iB=Dt((Q,Z)=>{var c=Wr(),g=Qo(),I=Kc(),S=pi(),t=Vs(),e=kn(),r=e.strTranslate,a=ec(),n=Bc(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR,x=WM(),y=nB();Z.exports=function(A){var h=A._fullLayout,p=h._infolayer.selectAll(".rangeselector").data(v(A),T);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(k){var w=c.select(this),B=k,O=B.rangeselector,j=w.selectAll("g.button").data(e.filterVisible(O.buttons));j.enter().append("g").classed("button",!0),j.exit().remove(),j.each(function(V){var H=c.select(this),F=y(B,V);V._isActive=u(B,V,F),H.call(b,O,V),H.call(P,O,V,A),H.on("click",function(){A._dragged||g.call("_guiRelayout",A,F)}),H.on("mouseover",function(){V._isHovered=!0,H.call(b,O,V)}),H.on("mouseout",function(){V._isHovered=!1,H.call(b,O,V)})}),C(A,j,O,B._name,w)})};function v(A){for(var h=n.list(A,"x",!0),p=[],k=0;k{Z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:F6()}}},layoutAttributes:F6(),handleDefaults:rB(),draw:iB()}}),Uh=Dt(Q=>{var Z=Ia().extendFlat;Q.attributes=function(c,g){c=c||{},g=g||{};var I={valType:"info_array",editType:c.editType,items:[{valType:"number",min:0,max:1,editType:c.editType},{valType:"number",min:0,max:1,editType:c.editType}],dflt:[0,1]};c.name&&c.name+"",c.trace,g.description&&""+g.description;var S={x:Z({},I,{}),y:Z({},I,{}),editType:c.editType};return c.noGridCell||(S.row={valType:"integer",min:0,dflt:0,editType:c.editType},S.column={valType:"integer",min:0,dflt:0,editType:c.editType}),S},Q.defaults=function(c,g,I,S){var t=S&&S.x||[0,1],e=S&&S.y||[0,1],r=g.grid;if(r){var a=I("domain.column");a!==void 0&&(a{var c=kn(),g=Mo().counter,I=Uh().attributes,S=ic().idRegex,t=mu(),e={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:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.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:I({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function r(l,f,x){var y=f[x+"axes"],v=Object.keys((l._splomAxes||{})[x]||{});if(Array.isArray(y))return y;if(v.length)return v}function a(l,f){var x=l.grid||{},y=r(f,x,"x"),v=r(f,x,"y");if(!l.grid&&!y&&!v)return;var T=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),u=Array.isArray(y),b=Array.isArray(v),_=u&&y!==x.xaxes&&b&&v!==x.yaxes,P,M;T?(P=x.subplots.length,M=x.subplots[0].length):(b&&(P=v.length),u&&(M=y.length));var C=t.newContainer(f,"grid");function A(F,U){return c.coerce(x,C,e,F,U)}var h=A("rows",P),p=A("columns",M);if(!(h*p>1)){delete f.grid;return}if(!T&&!u&&!b){var k=A("pattern")==="independent";k&&(T=!0)}C._hasSubplotGrid=T;var w=A("roworder"),B=w==="top to bottom",O=T?.2:.1,j=T?.3:.1,V,H;_&&f._splomGridDflt&&(V=f._splomGridDflt.xside,H=f._splomGridDflt.yside),C._domains={x:n("x",A,O,V,p),y:n("y",A,j,H,h,B)}}function n(l,f,x,y,v,T){var u=f(l+"gap",x),b=f("domain."+l);f(l+"side",y);for(var _=new Array(v),P=b[0],M=(b[1]-P)/(v-u),C=M*(1-u),A=0;A{Z.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"}}),oB=Dt((Q,Z)=>{var c=Hn(),g=Qo(),I=kn(),S=mu(),t=$M();Z.exports=function(e,r,a,n){var o="error_"+n.axis,i=S.newContainer(r,o),l=e[o]||{};function f(_,P){return I.coerce(l,i,t,_,P)}var x=l.array!==void 0||l.value!==void 0||l.type==="sqrt",y=f("visible",x);if(y!==!1){var v=f("type","array"in l?"data":"percent"),T=!0;v!=="sqrt"&&(T=f("symmetric",!((v==="data"?"arrayminus":"valueminus")in l))),v==="data"?(f("array"),f("traceref"),T||(f("arrayminus"),f("tracerefminus"))):(v==="percent"||v==="constant")&&(f("value"),T||f("valueminus"));var u="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&f(u,!(l.color||c(l.thickness)||c(l.width)))}(!n.inherit||!i[u])&&(f("color",a),f("thickness"),f("width",g.traceIs(r,"gl3d")?0:4))}}}),ZM=Dt((Q,Z)=>{Z.exports=function(g){var I=g.type,S=g.symmetric;if(I==="data"){var t=g.array||[];if(S)return function(n,o){var i=+t[o];return[i,i]};var e=g.arrayminus||[];return function(n,o){var i=+t[o],l=+e[o];return!isNaN(i)||!isNaN(l)?[l||0,i||0]:[NaN,NaN]}}else{var r=c(I,g.value),a=c(I,g.valueminus);return S||g.valueminus===void 0?function(n){var o=r(n);return[o,o]}:function(n){return[a(n),r(n)]}}};function c(g,I){if(g==="percent")return function(S){return Math.abs(S*I/100)};if(g==="constant")return function(){return Math.abs(I)};if(g==="sqrt")return function(S){return Math.sqrt(Math.abs(S))}}}),sB=Dt((Q,Z)=>{var c=Hn(),g=Qo(),I=Ls(),S=kn(),t=ZM();Z.exports=function(r){for(var a=r.calcdata,n=0;n{var c=Wr(),g=Hn(),I=Vs(),S=Tc();Z.exports=function(e,r,a,n){var o,i=a.xaxis,l=a.yaxis,f=n&&n.duration>0,x=e._context.staticPlot;r.each(function(y){var v=y[0].trace,T=v.error_x||{},u=v.error_y||{},b;v.ids&&(b=function(C){return C.id});var _=S.hasMarkers(v)&&v.marker.maxdisplayed>0;!u.visible&&!T.visible&&(y=[]);var P=c.select(this).selectAll("g.errorbar").data(y,b);if(P.exit().remove(),!!y.length){T.visible||P.selectAll("path.xerror").remove(),u.visible||P.selectAll("path.yerror").remove(),P.style("opacity",1);var M=P.enter().append("g").classed("errorbar",!0);f&&M.style("opacity",0).transition().duration(n.duration).style("opacity",1),I.setClipUrl(P,a.layerClipId,e),P.each(function(C){var A=c.select(this),h=t(C,i,l);if(!(_&&!C.vis)){var p,k=A.select("path.yerror");if(u.visible&&g(h.x)&&g(h.yh)&&g(h.ys)){var w=u.width;p="M"+(h.x-w)+","+h.yh+"h"+2*w+"m-"+w+",0V"+h.ys,h.noYS||(p+="m-"+w+",0h"+2*w),o=!k.size(),o?k=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("yerror",!0):f&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",p)}else k.remove();var B=A.select("path.xerror");if(T.visible&&g(h.y)&&g(h.xh)&&g(h.xs)){var O=(T.copy_ystyle?u:T).width;p="M"+h.xh+","+(h.y-O)+"v"+2*O+"m0,-"+O+"H"+h.xs,h.noXS||(p+="m0,-"+O+"v"+2*O),o=!B.size(),o?B=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("xerror",!0):f&&(B=B.transition().duration(n.duration).ease(n.easing)),B.attr("d",p)}else B.remove()}})}})};function t(e,r,a){var n={x:r.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(n.yh=a.c2p(e.yh),n.ys=a.c2p(e.ys),g(n.ys)||(n.noYS=!0,n.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),g(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}}),uB=Dt((Q,Z)=>{var c=Wr(),g=pi();Z.exports=function(I){I.each(function(S){var t=S[0].trace,e=t.error_y||{},r=t.error_x||{},a=c.select(this);a.selectAll("path.yerror").style("stroke-width",e.thickness+"px").call(g.stroke,e.color),r.copy_ystyle&&(r=e),a.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(g.stroke,r.color)})}}),cB=Dt((Q,Z)=>{var c=kn(),g=Yc().overrideAll,I=$M(),S={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var t={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I),error_z:c.extendFlat({},I)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,Z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:g(t,"calc","nested"),scattergl:g(S,"calc","nested")}},supplyDefaults:oB(),calc:sB(),makeComputeError:ZM(),plot:lB(),style:uB(),hoverInfo:e};function e(r,a,n){(a.error_y||{}).visible&&(n.yerr=r.yh-r.y,a.error_y.symmetric||(n.yerrneg=r.y-r.ys)),(a.error_x||{}).visible&&(n.xerr=r.xh-r.x,a.error_x.symmetric||(n.xerrneg=r.x-r.xs))}}),hB=Dt((Q,Z)=>{Z.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"}}}),fB=Dt((Q,Z)=>{var c=Wr(),g=ro(),I=Kc(),S=Qo(),t=Ls(),e=cp(),r=kn(),a=r.strTranslate,n=Ia().extendFlat,o=I0(),i=Vs(),l=pi(),f=up(),x=ec(),y=Ud().flipScale,v=rx(),T=X_(),u=Td(),b=Af(),_=b.LINE_SPACING,P=b.FROM_TL,M=b.FROM_BR,C=hB().cn;function A(O){var j=O._fullLayout,V=j._infolayer.selectAll("g."+C.colorbar).data(h(O),function(H){return H._id});V.enter().append("g").attr("class",function(H){return H._id}).classed(C.colorbar,!0),V.each(function(H){var F=c.select(this);r.ensureSingle(F,"rect",C.cbbg),r.ensureSingle(F,"g",C.cbfills),r.ensureSingle(F,"g",C.cblines),r.ensureSingle(F,"g",C.cbaxis,function(W){W.classed(C.crisp,!0)}),r.ensureSingle(F,"g",C.cbtitleunshift,function(W){W.append("g").classed(C.cbtitle,!0)}),r.ensureSingle(F,"rect",C.cboutline);var U=p(F,H,O);U&&U.then&&(O._promises||[]).push(U),O._context.edits.colorbarPosition&&k(F,H,O)}),V.exit().each(function(H){I.autoMargin(O,H._id)}).remove(),V.order()}function h(O){var j=O._fullLayout,V=O.calcdata,H=[],F,U,W,q;function J(K){return n(K,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function lt(){typeof q.calc=="function"?q.calc(O,W,F):(F._fillgradient=U.reversescale?y(U.colorscale):U.colorscale,F._zrange=[U[q.min],U[q.max]])}for(var yt=0;yt1){var Gt=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10));Xr*=Gt*r.roundUp(Le/Gt,[2,5,10]),(Math.abs(ge.start)/ge.size+1e-6)%1<2e-6&&(qr.tick0=0)}qr.dtick=Xr}qr.domain=H?[ur+pt/ft.h,ur+ee-pt/ft.h]:[ur+tt/ft.w,ur+ee-tt/ft.w],qr.setScale(),O.attr("transform",a(Math.round(ft.l),Math.round(ft.t)));var ne=O.select("."+C.cbtitleunshift).attr("transform",a(-Math.round(ft.l),-Math.round(ft.t))),Ct=qr.ticklabelposition,gt=qr.title.font.size,St=O.select("."+C.cbaxis),Nt,re=0,le=0;function ke(Mr,mr){var Qr={propContainer:qr,propName:j._propPrefix+"title.text",traceIndex:j._traceIndex,_meta:j._meta,placeholder:K._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Wn=Mr.charAt(0)==="h"?Mr.substr(1):"h"+Mr;O.selectAll("."+Wn+",."+Wn+"-math-group").remove(),f.draw(V,Mr,n(Qr,mr||{}))}function Ue(){if(H&&br||!H&&!br){var Mr,mr;Pt==="top"&&(Mr=tt+ft.l+ve*rt,mr=pt+ft.t+oe*(1-ur-ee)+3+gt*.75),Pt==="bottom"&&(Mr=tt+ft.l+ve*rt,mr=pt+ft.t+oe*(1-ur)-3-gt*.25),Pt==="right"&&(mr=pt+ft.t+oe*at+3+gt*.75,Mr=tt+ft.l+ve*ur),ke(qr._id+"title",{attributes:{x:Mr,y:mr,"text-anchor":H?"start":"middle"}})}}function qe(){if(H&&!br||!H&&br){var Mr=qr.position||0,mr=qr._offset+qr._length/2,Qr,Wn;if(Pt==="right")Wn=mr,Qr=ft.l+ve*Mr+10+gt*(qr.showticklabels?1:.5);else if(Qr=mr,Pt==="bottom"&&(Wn=ft.t+oe*Mr+10+(Ct.indexOf("inside")===-1?qr.tickfont.size:0)+(qr.ticks!=="inside"&&j.ticklen||0)),Pt==="top"){var qn=It.text.split("
").length;Wn=ft.t+oe*Mr+10-Tt-_*gt*qn}ke((H?"h":"v")+qr._id+"title",{avoid:{selection:c.select(V).selectAll("g."+qr._id+"tick"),side:Pt,offsetTop:H?0:ft.t,offsetLeft:H?ft.l:0,maxShift:H?K.width:K.height},attributes:{x:Qr,y:Wn,"text-anchor":"middle"},transform:{rotate:H?-90:0,offset:0}})}}function or(){if(!H&&!br||H&&br){var Mr=O.select("."+C.cbtitle),mr=Mr.select("text"),Qr=[-J/2,J/2],Wn=Mr.select(".h"+qr._id+"title-math-group").node(),qn=15.6;mr.node()&&(qn=parseInt(mr.node().style.fontSize,10)*_);var ei;if(Wn?(ei=i.bBox(Wn),le=ei.width,re=ei.height,re>qn&&(Qr[1]-=(re-qn)/2)):mr.node()&&!mr.classed(C.jsPlaceholder)&&(ei=i.bBox(mr.node()),le=ei.width,re=ei.height),H){if(re){if(re+=5,Pt==="top")qr.domain[1]-=re/ft.h,Qr[1]*=-1;else{qr.domain[0]+=re/ft.h;var Di=x.lineCount(mr);Qr[1]+=(1-Di)*qn}Mr.attr("transform",a(Qr[0],Qr[1])),qr.setScale()}}else le&&(Pt==="right"&&(qr.domain[0]+=(le+gt/2)/ft.w),Mr.attr("transform",a(Qr[0],Qr[1])),qr.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",H?a(0,Math.round(ft.h*(1-qr.domain[1]))):a(Math.round(ft.w*qr.domain[0]),0)),St.attr("transform",H?a(0,Math.round(-ft.t)):a(Math.round(-ft.l),0));var ui=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(pe);ui.enter().append("rect").classed(C.cbfill,!0).attr("style",""),ui.exit().remove();var Gn=qt.map(qr.c2p).map(Math.round).sort(function(dr,_r){return dr-_r});ui.each(function(dr,_r){var tn=[_r===0?qt[0]:(pe[_r]+pe[_r-1])/2,_r===pe.length-1?qt[1]:(pe[_r]+pe[_r+1])/2].map(qr.c2p).map(Math.round);H&&(tn[1]=r.constrain(tn[1]+(tn[1]>tn[0])?1:-1,Gn[0],Gn[1]));var Cn=c.select(this).attr(H?"x":"y",Ae).attr(H?"y":"x",c.min(tn)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(c.max(tn)-c.min(tn),2));if(j._fillgradient)i.gradient(Cn,V,j._id,H?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var Tn=Jt(dr).replace("e-","");Cn.attr("fill",g(Tn).toHexString())}});var ua=O.select("."+C.cblines).selectAll("path."+C.cbline).data(kt.color&&kt.width?se:[]);ua.enter().append("path").classed(C.cbline,!0),ua.exit().remove(),ua.each(function(dr){var _r=Ae,tn=Math.round(qr.c2p(dr))+kt.width/2%1;c.select(this).attr("d","M"+(H?_r+","+tn:tn+","+_r)+(H?"h":"v")+Tt).call(i.lineGroupStyle,kt.width,Wt(dr),kt.dash)}),St.selectAll("g."+qr._id+"tick,path").remove();var Yi=Ae+Tt+(J||0)/2-(j.ticks==="outside"?1:0),We=t.calcTicks(qr),nr=t.getTickSigns(qr)[2];return t.drawTicks(V,qr,{vals:qr.ticks==="inside"?t.clipEnds(qr,We):We,layer:St,path:t.makeTickPath(qr,Yi,nr),transFn:t.makeTransTickFn(qr)}),t.drawLabels(V,qr,{vals:We,layer:St,transFn:t.makeTransTickLabelFn(qr),labelFns:t.makeLabelFns(qr,Yi)})}function Sr(){var Mr,mr=Tt+J/2;Ct.indexOf("inside")===-1&&(Mr=i.bBox(St.node()),mr+=H?Mr.width:Mr.height),Nt=ne.select("text");var Qr=0,Wn=H&&Pt==="top",qn=!H&&Pt==="right",ei=0;if(Nt.node()&&!Nt.classed(C.jsPlaceholder)){var Di,ui=ne.select(".h"+qr._id+"title-math-group").node();ui&&(H&&br||!H&&!br)?(Mr=i.bBox(ui),Qr=Mr.width,Di=Mr.height):(Mr=i.bBox(ne.node()),Qr=Mr.right-ft.l-(H?Ae:jr),Di=Mr.bottom-ft.t-(H?jr:Ae),!H&&Pt==="top"&&(mr+=Mr.height,ei=Mr.height)),qn&&(Nt.attr("transform",a(Qr/2+gt/2,0)),Qr*=2),mr=Math.max(mr,H?Qr:Di)}var Gn=(H?tt:pt)*2+mr+lt+J/2,ua=0;!H&&It.text&&st==="bottom"&&at<=0&&(ua=Gn/2,Gn+=ua,ei+=ua),K._hColorbarMoveTitle=ua,K._hColorbarMoveCBTitle=ei;var Yi=lt+J,We=(H?Ae:jr)-Yi/2-(H?tt:0),nr=(H?jr:Ae)-(H?Mt:pt+ei-ua);O.select("."+C.cbbg).attr("x",We).attr("y",nr).attr(H?"width":"height",Math.max(Gn-ua,2)).attr(H?"height":"width",Math.max(Mt+Yi,2)).call(l.fill,yt).call(l.stroke,j.bordercolor).style("stroke-width",lt);var dr=qn?Math.max(Qr-10,0):0;O.selectAll("."+C.cboutline).attr("x",(H?Ae:jr+tt)+dr).attr("y",(H?jr+pt-Mt:Ae)+(Wn?re:0)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(Mt-(H?2*pt+re:2*tt+dr),2)).call(l.stroke,j.outlinecolor).style({fill:"none","stroke-width":J});var _r=H?He*Gn:0,tn=H?0:(1-Ge)*Gn-ei;if(_r=it?ft.l-_r:-_r,tn=vt?ft.t-tn:-tn,O.attr("transform",a(_r,tn)),!H&&(lt||g(yt).getAlpha()&&!g.equals(K.paper_bgcolor,yt))){var Cn=St.selectAll("text"),Tn=Cn[0].length,Mn=O.select("."+C.cbbg).node(),mi=i.bBox(Mn),Mi=i.getTranslate(O),Ni=2;Cn.each(function(Gr,Rr){var Yr=0,mn=Tn-1;if(Rr===Yr||Rr===mn){var on=i.bBox(this),Ce=i.getTranslate(this),pr;if(Rr===mn){var Hr=on.right+Ce.x,_n=mi.right+Mi.x+jr-lt-Ni+rt;pr=_n-Hr,pr>0&&(pr=0)}else if(Rr===Yr){var Bn=on.left+Ce.x,ri=mi.left+Mi.x+jr+lt+Ni;pr=ri-Bn,pr<0&&(pr=0)}pr&&(Tn<3?this.setAttribute("transform","translate("+pr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Hi={},Ji=P[mt],di=M[mt],za=P[st],qa=M[st],Oe=Gn-Tt;H?(U==="pixels"?(Hi.y=at,Hi.t=Mt*za,Hi.b=Mt*qa):(Hi.t=Hi.b=0,Hi.yt=at+F*za,Hi.yb=at-F*qa),q==="pixels"?(Hi.x=rt,Hi.l=Gn*Ji,Hi.r=Gn*di):(Hi.l=Oe*Ji,Hi.r=Oe*di,Hi.xl=rt-W*Ji,Hi.xr=rt+W*di)):(U==="pixels"?(Hi.x=rt,Hi.l=Mt*Ji,Hi.r=Mt*di):(Hi.l=Hi.r=0,Hi.xl=rt+F*Ji,Hi.xr=rt-F*di),q==="pixels"?(Hi.y=1-at,Hi.t=Gn*za,Hi.b=Gn*qa):(Hi.t=Oe*za,Hi.b=Oe*qa,Hi.yt=at-W*za,Hi.yb=at+W*qa));var ze=j.y<.5?"b":"t",Br=j.x<.5?"l":"r";V._fullLayout._reservedMargin[j._id]={};var $r={r:K.width-We-_r,l:We+Hi.r,b:K.height-nr-tn,t:nr+Hi.b};it&&vt?I.autoMargin(V,j._id,Hi):it?V._fullLayout._reservedMargin[j._id][ze]=$r[ze]:vt||H?V._fullLayout._reservedMargin[j._id][Br]=$r[Br]:V._fullLayout._reservedMargin[j._id][ze]=$r[ze]}return r.syncOrAsync([I.previousPromises,Ue,or,qe,I.previousPromises,Sr],V)}function k(O,j,V){var H=j.orientation==="v",F=V._fullLayout,U=F._size,W,q,J;e.init({element:O.node(),gd:V,prepFn:function(){W=O.attr("transform"),o(O)},moveFn:function(lt,yt){O.attr("transform",W+a(lt,yt)),q=e.align((H?j._uFrac:j._vFrac)+lt/U.w,H?j._thickFrac:j._lenFrac,0,1,j.xanchor),J=e.align((H?j._vFrac:1-j._uFrac)-yt/U.h,H?j._lenFrac:j._thickFrac,0,1,j.yanchor);var mt=e.getCursor(q,J,j.xanchor,j.yanchor);o(O,mt)},doneFn:function(){if(o(O),q!==void 0&&J!==void 0){var lt={};lt[j._propPrefix+"x"]=q,lt[j._propPrefix+"y"]=J,j._traceIndex!==void 0?S.call("_guiRestyle",V,lt,j._traceIndex):S.call("_guiRelayout",V,lt)}}})}function w(O,j,V){var H=j._levels,F=[],U=[],W,q,J=H.end+H.size/100,lt=H.size,yt=1.001*V[0]-.001*V[1],mt=1.001*V[1]-.001*V[0];for(q=0;q<1e5&&(W=H.start+q*lt,!(lt>0?W>=J:W<=J));q++)W>yt&&W0?W>=J:W<=J));q++)W>V[0]&&W{Z.exports={moduleType:"component",name:"colorbar",attributes:E1(),supplyDefaults:pv(),draw:fB().draw,hasColorbar:P0()}}),pB=Dt((Q,Z)=>{Z.exports={moduleType:"component",name:"legend",layoutAttributes:F_(),supplyLayoutDefaults:Hy(),draw:R_(),style:Tw()}}),mB=Dt((Q,Z)=>{Z.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"}}}),gB=Dt((Q,Z)=>{Z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),GM=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=g.extendFlat,S=g.extendDeep;function t(r){var a;switch(r){case"themes__thumb":a={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":a={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:a={}}return a}function e(r){var a=["xaxis","yaxis","zaxis"];return a.indexOf(r.slice(0,5))>-1}Z.exports=function(r,a){var n,o=r.data,i=r.layout,l=S([],o),f=S({},i,t(a.tileClass)),x=r._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var y=Object.keys(f);for(n=0;n{var c=Rm().EventEmitter,g=Qo(),I=kn(),S=o0(),t=GM(),e=Qy(),r=tx();function a(n,o){var i=new c,l=t(n,{format:"png"}),f=l.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);function x(){var v=S.getDelay(f._fullLayout);setTimeout(function(){var T=e(f),u=document.createElement("canvas");u.id=I.randstr(),i=r({format:o.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:u,emitter:i,svg:T}),i.clean=function(){f&&document.body.removeChild(f)}},v)}var y=S.getRedrawFunc(f);return g.call("_doPlot",f,l.data,l.layout,l.config).then(y).then(x).catch(function(v){i.emit("error",v)}),i}Z.exports=a}),yB=Dt((Q,Z)=>{var c=o0(),g={getDelay:c.getDelay,getRedrawFunc:c.getRedrawFunc,clone:GM(),toSVG:Qy(),svgToImg:tx(),toImage:vB(),downloadImage:K_()};Z.exports=g}),xB=Dt(Q=>{Q.version=Vi().version,Nn(),I_();var Z=Qo(),c=Q.register=Z.register,g=E6(),I=Object.keys(g);for(t=0;t{Z.exports=xB()}),ix=Dt((Q,Z)=>{Z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),Pg=Dt((Q,Z)=>{var c=ef(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=kc(),r=ma(),a=ix(),n=kd().pattern,o=Ia().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),l=c.marker,f=l.line,x=o({},f.width,{dflt:0}),y=o({width:x,editType:"calc"},e("marker.line")),v=o({line:y,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:n,cornerradius:{valType:"any",editType:"calc"}});Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:c.text,texttemplate:S({editType:"plot"},{keys:a.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:c.hovertext,hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),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:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},c.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:v,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:{marker:{opacity:c.selected.marker.opacity,color:c.selected.marker.color,editType:"style"},textfont:c.selected.textfont,editType:"style"},unselected:{marker:{opacity:c.unselected.marker.opacity,color:c.unselected.marker.color,editType:"style"},textfont:c.unselected.textfont,editType:"style"},zorder:c.zorder}}),B6=Dt((Q,Z)=>{Z.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"}}}),R6=Dt((Q,Z)=>{var c=pi(),g=Ud().hasColorscale,I=mc(),S=kn().coercePattern;Z.exports=function(t,e,r,a,n){var o=r("marker.color",a),i=g(t,"marker");i&&I(t,e,n,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",c.defaultLine),g(t,"marker.line")&&I(t,e,n,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",o,i),r("selected.marker.color"),r("unselected.marker.color")}}),Q0=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=pi(),S=Qo(),t=Wm(),e=Bp(),r=R6(),a=Lg(),n=Pg(),o=g.coerceFont;function i(y,v,T,u){function b(A,h){return g.coerce(y,v,n,A,h)}var _=t(y,v,u,b);if(!_){v.visible=!1;return}e(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");x(y,v,u,b,P,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(y,v,b,T,u);var M=(v.marker.line||{}).color,C=S.getComponentMethod("errorbars","supplyDefaults");C(y,v,M||I.defaultLine,{axis:"y"}),C(y,v,M||I.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(v,b)}function l(y,v){var T,u;function b(M,C){return g.coerce(u._input,u,n,M,C)}for(var _=0;_=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&c(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function x(y,v,T,u,b,_){_=_||{};var P=_.moduleHasSelected!==!1,M=_.moduleHasUnselected!==!1,C=_.moduleHasConstrain!==!1,A=_.moduleHasCliponaxis!==!1,h=_.moduleHasTextangle!==!1,p=_.moduleHasInsideanchor!==!1,k=!!_.hasPathbar,w=Array.isArray(b)||b==="auto",B=w||b==="inside",O=w||b==="outside";if(B||O){var j=o(u,"textfont",T.font),V=g.extendFlat({},j),H=y.textfont&&y.textfont.color,F=!H;if(F&&delete V.color,o(u,"insidetextfont",V),k){var U=g.extendFlat({},j);F&&delete U.color,o(u,"pathbar.textfont",U)}O&&o(u,"outsidetextfont",j),P&&u("selected.textfont.color"),M&&u("unselected.textfont.color"),C&&u("constraintext"),A&&u("cliponaxis"),h&&u("textangle"),u("texttemplate"),u("texttemplatefallback")}B&&p&&u("insidetextanchor")}Z.exports={supplyDefaults:i,crossTraceDefaults:l,handleText:x,validateCornerradius:f}}),YM=Dt((Q,Z)=>{var c=Qo(),g=Ls(),I=kn(),S=B6(),t=Q0().validateCornerradius;Z.exports=function(e,r,a){function n(P,M){return I.coerce(e,r,S,P,M)}for(var o=!1,i=!1,l=!1,f={},x=n("barmode"),y=x==="group",v=0;v0&&!f[u]&&(l=!0),f[u]=!0),T.visible&&T.type==="histogram"){var b=g.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!o){delete r.barmode;return}x!=="overlay"&&n("barnorm"),n("bargap",i&&!l?0:.2),n("bargroupgap");var _=n("barcornerradius");r.barcornerradius=t(_)}}),Hw=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=F0(),I=Ud().hasColorscale,S=Xd(),t=Hw(),e=Rt();Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(i=n.makeCalcdata(a,"x",T),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y",T),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;for(var u=Math.min(l.length,i.length),b=new Array(u),_=0;_{var c=Wr(),g=kn();function I(r,a,n){var o=r._fullLayout,i=o["_"+n+"Text_minsize"];if(i){var l=o.uniformtext.mode==="hide",f;switch(n){case"funnelarea":case"pie":case"sunburst":f="g.slice";break;case"treemap":case"icicle":f="g.slice, g.pathbar";break;default:f="g.points > g.point"}a.selectAll(f).each(function(x){var y=x.transform;if(y){y.scale=l&&y.hide?0:i/y.fontSize;var v=c.select(this).select("text");g.setTransormAndDisplay(v,y)}})}}function S(r,a,n){if(n.uniformtext.mode){var o=e(r),i=n.uniformtext.minsize,l=a.scale*a.fontSize;a.hide=l{var Z=Hn(),c=ro(),g=kn().isArrayOrTypedArray;Q.coerceString=function(I,S,t){if(typeof S=="string"){if(S||!I.noBlank)return S}else if((typeof S=="number"||S===!0)&&!I.strict)return String(S);return t!==void 0?t:I.dflt},Q.coerceNumber=function(I,S,t){if(Z(S)){S=+S;var e=I.min,r=I.max,a=e!==void 0&&Sr;if(!a)return S}return t!==void 0?t:I.dflt},Q.coerceColor=function(I,S,t){return c(S).isValid()?S:t!==void 0?t:I.dflt},Q.coerceEnumerated=function(I,S,t){return I.coerceNumber&&(S=+S),I.values.indexOf(S)!==-1?S:t!==void 0?t:I.dflt},Q.getValue=function(I,S){var t;return g(I)?S{var c=Wr(),g=pi(),I=Vs(),S=kn(),t=Qo(),e=Rp().resizeText,r=Pg(),a=r.textfont,n=r.insidetextfont,o=r.outsidetextfont,i=N6();function l(A){var h=c.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");e(A,h,"bar");var p=h.size(),k=A._fullLayout;h.style("opacity",function(w){return w[0].trace.opacity}).each(function(w){(k.barmode==="stack"&&p>1||k.bargap===0&&k.bargroupgap===0&&!w[0].trace.marker.line.width)&&c.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(w){var B=c.select(this),O=w[0].trace;f(B,O,A)}),t.getComponentMethod("errorbars","style")(h)}function f(A,h,p){I.pointStyle(A.selectAll("path"),h,p),x(A,h,p)}function x(A,h,p){A.selectAll("text").each(function(k){var w=c.select(this),B=S.ensureUniformFontSize(p,u(w,k,h,p));I.font(w,B)})}function y(A,h,p){var k=h[0].trace;k.selectedpoints?v(p,k,A):(f(p,k,A),t.getComponentMethod("errorbars","style")(p))}function v(A,h,p){I.selectedPointStyle(A.selectAll("path"),h),T(A.selectAll("text"),h,p)}function T(A,h,p){A.each(function(k){var w=c.select(this),B;if(k.selected){B=S.ensureUniformFontSize(p,u(w,k,h,p));var O=h.selected.textfont&&h.selected.textfont.color;O&&(B.color=O),I.font(w,B)}else I.selectedTextStyle(w,h)})}function u(A,h,p,k){var w=k._fullLayout.font,B=p.textfont;if(A.classed("bartext-inside")){var O=C(h,p);B=_(p,h.i,w,O)}else A.classed("bartext-outside")&&(B=P(p,h.i,w));return B}function b(A,h,p){return M(a,A.textfont,h,p)}function _(A,h,p,k){var w=b(A,h,p),B=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[h]===void 0;return B&&(w={color:g.contrast(k),family:w.family,size:w.size,weight:w.weight,style:w.style,variant:w.variant,textcase:w.textcase,lineposition:w.lineposition,shadow:w.shadow}),M(n,A.insidetextfont,h,w)}function P(A,h,p){var k=b(A,h,p);return M(o,A.outsidetextfont,h,k)}function M(A,h,p,k){h=h||{};var w=i.getValue(h.family,p),B=i.getValue(h.size,p),O=i.getValue(h.color,p),j=i.getValue(h.weight,p),V=i.getValue(h.style,p),H=i.getValue(h.variant,p),F=i.getValue(h.textcase,p),U=i.getValue(h.lineposition,p),W=i.getValue(h.shadow,p);return{family:i.coerceString(A.family,w,k.family),size:i.coerceNumber(A.size,B,k.size),color:i.coerceColor(A.color,O,k.color),weight:i.coerceString(A.weight,j,k.weight),style:i.coerceString(A.style,V,k.style),variant:i.coerceString(A.variant,H,k.variant),textcase:i.coerceString(A.variant,F,k.textcase),lineposition:i.coerceString(A.variant,U,k.lineposition),shadow:i.coerceString(A.variant,W,k.shadow)}}function C(A,h){return h.type==="waterfall"?h[A.dir].marker.color:A.mcc||A.mc||h.marker.color}Z.exports={style:l,styleTextPoints:x,styleOnSelect:y,getInsideTextFont:_,getOutsideTextFont:P,getBarColor:C,resizeText:e}}),ax=Dt((Q,Z)=>{var c=Wr(),g=Hn(),I=kn(),S=ec(),t=pi(),e=Vs(),r=Qo(),a=Ls().tickText,n=Rp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=xm(),f=N6(),x=ix(),y=Pg(),v=y.text,T=y.textposition,u=Fp().appendArrayPointValue,b=x.TEXTPAD;function _(lt){return lt.id}function P(lt){if(lt.ids)return _}function M(lt){return(lt>0)-(lt<0)}function C(lt,yt){return lt0}function k(lt,yt,mt,st,tt,pt){var rt=yt.xaxis,at=yt.yaxis,vt=lt._fullLayout,it=lt._context.staticPlot;tt||(tt={mode:vt.barmode,norm:vt.barmode,gap:vt.bargap,groupgap:vt.bargroupgap},i("bar",vt));var K=I.makeTraceGroups(st,mt,"trace bars").each(function(ft){var ut=c.select(this),kt=ft[0].trace,It=ft[0].t,Pt=kt.type==="waterfall",qt=kt.type==="funnel",Wt=kt.type==="histogram",Jt=kt.type==="bar",ge=Jt||qt,fe=0;Pt&&kt.connector.visible&&kt.connector.mode==="between"&&(fe=kt.connector.line.width/2);var pe=kt.orientation==="h",se=p(tt),Tt=I.ensureSingle(ut,"g","points"),Lt=P(kt),Mt=Tt.selectAll("g.point").data(I.identity,Lt);Mt.enter().append("g").classed("point",!0),Mt.exit().remove(),Mt.each(function(ve,oe){var Ae=c.select(this),He=A(ve,rt,at,pe),Ge=He[0][0],cr=He[0][1],ur=He[1][0],jr=He[1][1],qr=(pe?cr-Ge:jr-ur)===0;qr&&ge&&f.getLineWidth(kt,ve)&&(qr=!1),qr||(qr=!g(Ge)||!g(cr)||!g(ur)||!g(jr)),ve.isBlank=qr,qr&&(pe?cr=Ge:jr=ur),fe&&!qr&&(pe?(Ge-=C(Ge,cr)*fe,cr+=C(Ge,cr)*fe):(ur-=C(ur,jr)*fe,jr+=C(ur,jr)*fe));var br,Xr;if(kt.type==="waterfall"){if(!qr){var nn=kt[ve.dir].marker;br=nn.line.width,Xr=nn.color}}else br=f.getLineWidth(kt,ve),Xr=ve.mc||kt.marker.color;function Le(Yi){var We=c.round(br/2%1,2);return tt.gap===0&&tt.groupgap===0?c.round(Math.round(Yi)-We,2):Yi}function Gt(Yi,We,nr){return nr&&Yi===We?Yi:Math.abs(Yi-We)>=2?Le(Yi):Yi>We?Math.ceil(Yi):Math.floor(Yi)}var ne=t.opacity(Xr),Ct=ne<1||br>.01?Le:Gt;lt._context.staticPlot||(Ge=Ct(Ge,cr,pe),cr=Ct(cr,Ge,pe),ur=Ct(ur,jr,!pe),jr=Ct(jr,ur,!pe));var gt=pe?rt.c2p:at.c2p,St;ve.s0>0?St=ve._sMax:ve.s0<0?St=ve._sMin:St=ve.s1>0?ve._sMax:ve._sMin;function Nt(Yi,We){if(!Yi)return 0;var nr=Math.abs(pe?jr-ur:cr-Ge),dr=Math.abs(pe?cr-Ge:jr-ur),_r=Ct(Math.abs(gt(St,!0)-gt(0,!0))),tn=ve.hasB?Math.min(nr/2,dr/2):Math.min(nr/2,_r),Cn;if(We==="%"){var Tn=Math.min(50,Yi);Cn=nr*(Tn/100)}else Cn=Yi;return Ct(Math.max(Math.min(Cn,tn),0))}var re=Jt||Wt?Nt(It.cornerradiusvalue,It.cornerradiusform):0,le,ke,Ue="M"+Ge+","+ur+"V"+jr+"H"+cr+"V"+ur+"Z",qe=0;if(re&&ve.s){var or=M(ve.s0)===0||M(ve.s)===M(ve.s0)?ve.s1:ve.s0;if(qe=Ct(ve.hasB?0:Math.abs(gt(St,!0)-gt(or,!0))),qe0?Math.sqrt(qe*(2*re-qe)):0,qn=Sr>0?Math.max:Math.min;le="M"+Ge+","+ur+"V"+(jr-Qr*Mr)+"H"+qn(cr-(re-qe)*Sr,Ge)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Mr-Wn)+"V"+(ur+re*Mr+Wn)+"A "+re+","+re+" 0 0 "+mr+" "+qn(cr-(re-qe)*Sr,Ge)+","+(ur+Qr*Mr)+"Z"}else if(ve.hasB)le="M"+(Ge+re*Sr)+","+ur+"A "+re+","+re+" 0 0 "+mr+" "+Ge+","+(ur+re*Mr)+"V"+(jr-re*Mr)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr)+","+jr+"H"+(cr-re*Sr)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Mr)+"V"+(ur+re*Mr)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-re*Sr)+","+ur+"Z";else{ke=Math.abs(jr-ur)+qe;var ei=ke0?Math.sqrt(qe*(2*re-qe)):0,ui=Mr>0?Math.max:Math.min;le="M"+(Ge+ei*Sr)+","+ur+"V"+ui(jr-(re-qe)*Mr,ur)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr-Di)+","+jr+"H"+(cr-re*Sr+Di)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-ei*Sr)+","+ui(jr-(re-qe)*Mr,ur)+"V"+ur+"Z"}}else le=Ue}else le=Ue;var Gn=h(I.ensureSingle(Ae,"path"),vt,tt,pt);if(Gn.style("vector-effect",it?"none":"non-scaling-stroke").attr("d",isNaN((cr-Ge)*(jr-ur))||qr&<._context.staticPlot?"M0,0Z":le).call(e.setClipUrl,yt.layerClipId,lt),!vt.uniformtext.mode&&se){var ua=e.makePointStyleFns(kt);e.singlePointStyle(ve,Gn,kt,ua,lt)}w(lt,yt,Ae,ft,oe,Ge,cr,ur,jr,re,qe,tt,pt),yt.layerClipId&&e.hideOutsideRangePoint(ve,Ae.select("text"),rt,at,kt.xcalendar,kt.ycalendar)});var ee=kt.cliponaxis===!1;e.setClipUrl(ut,ee?null:yt.layerClipId,lt)});r.getComponentMethod("errorbars","plot")(lt,K,yt,tt)}function w(lt,yt,mt,st,tt,pt,rt,at,vt,it,K,ft,ut){var kt=yt.xaxis,It=yt.yaxis,Pt=lt._fullLayout,qt;function Wt(ke,Ue,qe){var or=I.ensureSingle(ke,"text").text(Ue).attr({class:"bartext bartext-"+qt,"text-anchor":"middle","data-notex":1}).call(e.font,qe).call(S.convertToTspans,lt);return or}var Jt=st[0].trace,ge=Jt.orientation==="h",fe=U(Pt,st,tt,kt,It);qt=W(Jt,tt);var pe=ft.mode==="stack"||ft.mode==="relative",se=st[tt],Tt=!pe||se._outmost,Lt=se.hasB,Mt=it&&it-K>b;if(!fe||qt==="none"||(se.isBlank||pt===rt||at===vt)&&(qt==="auto"||qt==="inside")){mt.select("text").remove();return}var ee=Pt.font,ve=l.getBarColor(st[tt],Jt),oe=l.getInsideTextFont(Jt,tt,ee,ve),Ae=l.getOutsideTextFont(Jt,tt,ee),He=Jt.insidetextanchor||"end",Ge=mt.datum();ge?kt.type==="log"&&Ge.s0<=0&&(kt.range[0]0&&Le>0,Ct;Mt?Lt?Ct=B(jr-2*it,qr,nn,Le,ge)||B(jr,qr-2*it,nn,Le,ge):ge?Ct=B(jr-(it-K),qr,nn,Le,ge)||B(jr,qr-2*(it-K),nn,Le,ge):Ct=B(jr,qr-(it-K),nn,Le,ge)||B(jr-2*(it-K),qr,nn,Le,ge):Ct=B(jr,qr,nn,Le,ge),ne&&Ct?qt="inside":(qt="outside",br.remove(),br=null)}else qt="inside";if(!br){Gt=I.ensureUniformFontSize(lt,qt==="outside"?Ae:oe),br=Wt(mt,fe,Gt);var gt=br.attr("transform");if(br.attr("transform",""),Xr=e.bBox(br.node()),nn=Xr.width,Le=Xr.height,br.attr("transform",gt),nn<=0||Le<=0){br.remove();return}}var St=Jt.textangle,Nt,re;qt==="outside"?(re=Jt.constraintext==="both"||Jt.constraintext==="outside",Nt=F(pt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St})):(re=Jt.constraintext==="both"||Jt.constraintext==="inside",Nt=V(pt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St,anchor:He,hasB:Lt,r:it,overhead:K})),Nt.fontSize=Gt.size,o(Jt.type==="histogram"?"bar":Jt.type,Nt,Pt),se.transform=Nt;var le=h(br,Pt,ft,ut);I.setTransormAndDisplay(le,Nt)}function B(lt,yt,mt,st,tt){if(lt<0||yt<0)return!1;var pt=mt<=lt&&st<=yt,rt=mt<=yt&&st<=lt,at=tt?lt>=mt*(yt/st):yt>=st*(lt/mt);return pt||rt||at}function O(lt){return lt==="auto"?0:lt}function j(lt,yt){var mt=Math.PI/180*yt,st=Math.abs(Math.sin(mt)),tt=Math.abs(Math.cos(mt));return{x:lt.width*tt+lt.height*st,y:lt.width*st+lt.height*tt}}function V(lt,yt,mt,st,tt,pt){var rt=!!pt.isHorizontal,at=!!pt.constrained,vt=pt.angle||0,it=pt.anchor,K=it==="end",ft=it==="start",ut=pt.leftToRight||0,kt=(ut+1)/2,It=1-kt,Pt=pt.hasB,qt=pt.r,Wt=pt.overhead,Jt=tt.width,ge=tt.height,fe=Math.abs(yt-lt),pe=Math.abs(st-mt),se=fe>2*b&&pe>2*b?b:0;fe-=2*se,pe-=2*se;var Tt=O(vt);vt==="auto"&&!(Jt<=fe&&ge<=pe)&&(Jt>fe||ge>pe)&&(!(Jt>pe||ge>fe)||Jtb){var ve=H(lt,yt,mt,st,Lt,qt,Wt,rt,Pt);Mt=ve.scale,ee=ve.pad}else Mt=1,at&&(Mt=Math.min(1,fe/Lt.x,pe/Lt.y)),ee=0;var oe=tt.left*It+tt.right*kt,Ae=(tt.top+tt.bottom)/2,He=(lt+b)*It+(yt-b)*kt,Ge=(mt+st)/2,cr=0,ur=0;if(ft||K){var jr=(rt?Lt.x:Lt.y)/2;qt&&(K||Pt)&&(se+=ee);var qr=rt?C(lt,yt):C(mt,st);rt?ft?(He=lt+qr*se,cr=-qr*jr):(He=yt-qr*se,cr=qr*jr):ft?(Ge=mt+qr*se,ur=-qr*jr):(Ge=st-qr*se,ur=qr*jr)}return{textX:oe,textY:Ae,targetX:He,targetY:Ge,anchorX:cr,anchorY:ur,scale:Mt,rotate:Tt}}function H(lt,yt,mt,st,tt,pt,rt,at,vt){var it=Math.max(0,Math.abs(yt-lt)-2*b),K=Math.max(0,Math.abs(st-mt)-2*b),ft=pt-b,ut=rt?ft-Math.sqrt(ft*ft-(ft-rt)*(ft-rt)):ft,kt=vt?ft*2:at?ft-rt:2*ut,It=vt?ft*2:at?2*ut:ft-rt,Pt,qt,Wt,Jt,ge;return tt.y/tt.x>=K/(it-kt)?Jt=K/tt.y:tt.y/tt.x<=(K-It)/it?Jt=it/tt.x:!vt&&at?(Pt=tt.x*tt.x+tt.y*tt.y/4,qt=-2*tt.x*(it-ft)-tt.y*(K/2-ft),Wt=(it-ft)*(it-ft)+(K/2-ft)*(K/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):vt?(Pt=(tt.x*tt.x+tt.y*tt.y)/4,qt=-tt.x*(it/2-ft)-tt.y*(K/2-ft),Wt=(it/2-ft)*(it/2-ft)+(K/2-ft)*(K/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):(Pt=tt.x*tt.x/4+tt.y*tt.y,qt=-tt.x*(it/2-ft)-2*tt.y*(K-ft),Wt=(it/2-ft)*(it/2-ft)+(K-ft)*(K-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)),Jt=Math.min(1,Jt),at?ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(K-tt.y*Jt)/2)*(ft-(K-tt.y*Jt)/2)))-rt):ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(it-tt.x*Jt)/2)*(ft-(it-tt.x*Jt)/2)))-rt),{scale:Jt,pad:ge}}function F(lt,yt,mt,st,tt,pt){var rt=!!pt.isHorizontal,at=!!pt.constrained,vt=pt.angle||0,it=tt.width,K=tt.height,ft=Math.abs(yt-lt),ut=Math.abs(st-mt),kt;rt?kt=ut>2*b?b:0:kt=ft>2*b?b:0;var It=1;at&&(It=rt?Math.min(1,ut/K):Math.min(1,ft/it));var Pt=O(vt),qt=j(tt,Pt),Wt=(rt?qt.x:qt.y)/2,Jt=(tt.left+tt.right)/2,ge=(tt.top+tt.bottom)/2,fe=(lt+yt)/2,pe=(mt+st)/2,se=0,Tt=0,Lt=rt?C(yt,lt):C(mt,st);return rt?(fe=yt-Lt*kt,se=Lt*Wt):(pe=st+Lt*kt,Tt=-Lt*Wt),{textX:Jt,textY:ge,targetX:fe,targetY:pe,anchorX:se,anchorY:Tt,scale:It,rotate:Pt}}function U(lt,yt,mt,st,tt){var pt=yt[0].trace,rt=pt.texttemplate,at;return rt?at=q(lt,yt,mt,st,tt):pt.textinfo?at=J(yt,mt,st,tt):at=f.getValue(pt.text,mt),f.coerceString(v,at)}function W(lt,yt){var mt=f.getValue(lt.textposition,yt);return f.coerceEnumerated(T,mt)}function q(lt,yt,mt,st,tt){var pt=yt[0].trace,rt=I.castOption(pt,mt,"texttemplate");if(!rt)return"";var at=pt.type==="histogram",vt=pt.type==="waterfall",it=pt.type==="funnel",K=pt.orientation==="h",ft,ut,kt,It;K?(ft="y",ut=tt,kt="x",It=st):(ft="x",ut=st,kt="y",It=tt);function Pt(se){return a(ut,ut.c2l(se),!0).text}function qt(se){return a(It,It.c2l(se),!0).text}var Wt=yt[mt],Jt={};Jt.label=Wt.p,Jt.labelLabel=Jt[ft+"Label"]=Pt(Wt.p);var ge=I.castOption(pt,Wt.i,"text");(ge===0||ge)&&(Jt.text=ge),Jt.value=Wt.s,Jt.valueLabel=Jt[kt+"Label"]=qt(Wt.s);var fe={};u(fe,pt,Wt.i),(at||fe.x===void 0)&&(fe.x=K?Jt.value:Jt.label),(at||fe.y===void 0)&&(fe.y=K?Jt.label:Jt.value),(at||fe.xLabel===void 0)&&(fe.xLabel=K?Jt.valueLabel:Jt.labelLabel),(at||fe.yLabel===void 0)&&(fe.yLabel=K?Jt.labelLabel:Jt.valueLabel),vt&&(Jt.delta=+Wt.rawS||Wt.s,Jt.deltaLabel=qt(Jt.delta),Jt.final=Wt.v,Jt.finalLabel=qt(Jt.final),Jt.initial=Jt.final-Jt.delta,Jt.initialLabel=qt(Jt.initial)),it&&(Jt.value=Wt.s,Jt.valueLabel=qt(Jt.value),Jt.percentInitial=Wt.begR,Jt.percentInitialLabel=I.formatPercent(Wt.begR),Jt.percentPrevious=Wt.difR,Jt.percentPreviousLabel=I.formatPercent(Wt.difR),Jt.percentTotal=Wt.sumR,Jt.percenTotalLabel=I.formatPercent(Wt.sumR));var pe=I.castOption(pt,Wt.i,"customdata");return pe&&(Jt.customdata=pe),I.texttemplateString({data:[fe,Jt,pt._meta],fallback:pt.texttemplatefallback,labels:Jt,locale:lt._d3locale,template:rt})}function J(lt,yt,mt,st){var tt=lt[0].trace,pt=tt.orientation==="h",rt=tt.type==="waterfall",at=tt.type==="funnel";function vt(pe){var se=pt?st:mt;return a(se,pe,!0).text}function it(pe){var se=pt?mt:st;return a(se,+pe,!0).text}var K=tt.textinfo,ft=lt[yt],ut=K.split("+"),kt=[],It,Pt=function(pe){return ut.indexOf(pe)!==-1};if(Pt("label")&&kt.push(vt(lt[yt].p)),Pt("text")&&(It=I.castOption(tt,ft.i,"text"),(It===0||It)&&kt.push(It)),rt){var qt=+ft.rawS||ft.s,Wt=ft.v,Jt=Wt-qt;Pt("initial")&&kt.push(it(Jt)),Pt("delta")&&kt.push(it(qt)),Pt("final")&&kt.push(it(Wt))}if(at){Pt("value")&&kt.push(it(ft.s));var ge=0;Pt("percent initial")&&ge++,Pt("percent previous")&&ge++,Pt("percent total")&&ge++;var fe=ge>1;Pt("percent initial")&&(It=I.formatPercent(ft.begR),fe&&(It+=" of initial"),kt.push(It)),Pt("percent previous")&&(It=I.formatPercent(ft.difR),fe&&(It+=" of previous"),kt.push(It)),Pt("percent total")&&(It=I.formatPercent(ft.sumR),fe&&(It+=" of total"),kt.push(It))}return kt.join("
")}Z.exports={plot:k,toMoveInsideBar:V}}),tb=Dt((Q,Z)=>{var c=tf(),g=Qo(),I=pi(),S=kn().fillText,t=N6().getLineWidth,e=Ls().hoverLabelText,r=sa().BADNUM;function a(i,l,f,x,y){var v=n(i,l,f,x,y);if(v){var T=v.cd,u=T[0].trace,b=T[v.index];return v.color=o(u,b),g.getComponentMethod("errorbars","hoverInfo")(b,u,v),[v]}}function n(i,l,f,x,y){var v=i.cd,T=v[0].trace,u=v[0].t,b=x==="closest",_=T.type==="waterfall",P=i.maxHoverDistance,M=i.maxSpikeDistance,C,A,h,p,k,w,B;T.orientation==="h"?(C=f,A=l,h="y",p="x",k=st,w=lt):(C=l,A=f,h="x",p="y",w=st,k=lt);var O=T[h+"period"],j=b||O;function V(It){return F(It,-1)}function H(It){return F(It,1)}function F(It,Pt){var qt=It.w;return It[h]+Pt*qt/2}function U(It){return It[h+"End"]-It[h+"Start"]}var W=b?V:O?function(It){return It.p-U(It)/2}:function(It){return Math.min(V(It),It.p-u.bardelta/2)},q=b?H:O?function(It){return It.p+U(It)/2}:function(It){return Math.max(H(It),It.p+u.bardelta/2)};function J(It,Pt,qt){return y.finiteRange&&(qt=0),c.inbox(It-C,Pt-C,qt+Math.min(1,Math.abs(Pt-It)/B)-1)}function lt(It){return J(W(It),q(It),P)}function yt(It){return J(V(It),H(It),M)}function mt(It){var Pt=It[p];if(_){var qt=Math.abs(It.rawS)||0;A>0?Pt+=qt:A<0&&(Pt-=qt)}return Pt}function st(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,P+(Wt-Pt)/(Wt-qt)-1)}function tt(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,M+(Wt-Pt)/(Wt-qt)-1)}var pt=i[h+"a"],rt=i[p+"a"];B=Math.abs(pt.r2c(pt.range[1])-pt.r2c(pt.range[0]));function at(It){return(k(It)+w(It))/2}var vt=c.getDistanceFunction(x,k,w,at);if(c.getClosest(v,vt,i),i.index!==!1&&v[i.index].p!==r){j||(W=function(It){return Math.min(V(It),It.p-u.bargroupwidth/2)},q=function(It){return Math.max(H(It),It.p+u.bargroupwidth/2)});var it=i.index,K=v[it],ft=T.base?K.b+K.s:K.s;i[p+"0"]=i[p+"1"]=rt.c2p(K[p],!0),i[p+"LabelVal"]=ft;var ut=u.extents[u.extents.round(K.p)];i[h+"0"]=pt.c2p(b?W(K):ut[0],!0),i[h+"1"]=pt.c2p(b?q(K):ut[1],!0);var kt=K.orig_p!==void 0;return i[h+"LabelVal"]=kt?K.orig_p:K.p,i.labelLabel=e(pt,i[h+"LabelVal"],T[h+"hoverformat"]),i.valueLabel=e(rt,i[p+"LabelVal"],T[p+"hoverformat"]),i.baseLabel=e(rt,K.b,T[p+"hoverformat"]),i.spikeDistance=(tt(K)+yt(K))/2,i[h+"Spike"]=pt.c2p(K.p,!0),S(K,T,i),i.hovertemplate=T.hovertemplate,i}}function o(i,l){var f=l.mcc||i.marker.color,x=l.mlcc||i.marker.line.color,y=t(i,l);if(I.opacity(f))return f;if(I.opacity(x)&&y)return x}Z.exports={hoverPoints:a,hoverOnBars:n,getTraceColor:o}}),wB=Dt((Q,Z)=>{Z.exports=function(c,g,I){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),I.orientation==="h"?(c.label=c.y,c.value=c.x):(c.label=c.x,c.value=c.y),c}}),eb=Dt((Q,Z)=>{Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=S[0].trace,a=r.type==="funnel",n=r.orientation==="h",o=[],i;if(I===!1)for(i=0;i{Z.exports={attributes:Pg(),layoutAttributes:B6(),supplyDefaults:Q0().supplyDefaults,crossTraceDefaults:Q0().crossTraceDefaults,supplyLayoutDefaults:YM(),calc:bB(),crossTraceCalc:zr().crossTraceCalc,colorbar:xo(),arraysToCalcdata:Hw(),plot:ax().plot,style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:tb().hoverPoints,eventData:wB(),selectPoints:eb(),moduleType:"trace",name:"bar",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),TB=Dt((Q,Z)=>{Z.exports=kB()}),Ww=Dt((Q,Z)=>{var c=z0(),g=ef(),I=Pg(),S=Ai(),t=ph().axisHoverFormat,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=g.marker,o=n.line;Z.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:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("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:a({},n.symbol,{arrayOk:!1,editType:"plot"}),opacity:a({},n.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:a({},n.angle,{arrayOk:!1,editType:"calc"}),size:a({},n.size,{arrayOk:!1,editType:"calc"}),color:a({},n.color,{arrayOk:!1,editType:"style"}),line:{color:a({},o.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:a({},o.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:c(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:I.offsetgroup,alignmentgroup:I.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:a({},g.text,{}),hovertext:a({},g.hovertext,{}),hovertemplate:e({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:g.zorder}}),qw=Dt((Q,Z)=>{Z.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"}}}),$w=Dt((Q,Z)=>{var c=kn(),g=Qo(),I=pi(),S=Bp(),t=Lg(),e=mv(),r=Ww();function a(l,f,x,y){function v(p,k){return c.coerce(l,f,r,p,k)}if(n(l,f,v,y),f.visible!==!1){S(l,f,y,v),v("xhoverformat"),v("yhoverformat");var T=f._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(l.marker||{}).color||x),v("line.width"),v("fillcolor",I.addOpacity(f.line.color,.5));var u=!1;if(T){var b=v("mean"),_=v("sd");b&&b.length&&(u=!0,_&&_.length&&(u="sd"))}v("whiskerwidth");var P=v("sizemode"),M;P==="quartiles"&&(M=v("boxmean",u)),v("showwhiskers",P==="quartiles"),(P==="sd"||M==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var C=!1;if(T){var A=v("notchspan");A&&A.length&&(C=!0)}else c.validate(l.notchwidth,r.notchwidth)&&(C=!0);var h=v("notched",C);h&&v("notchwidth"),o(l,f,v,{prefix:"box"}),v("zorder")}}function n(l,f,x,y){function v(J){var lt=0;return J&&J.length&&(lt+=1,c.isArrayOrTypedArray(J[0])&&J[0].length&&(lt+=1)),lt}function T(J){return c.validate(l[J],r[J])}var u=x("y"),b=x("x"),_;if(f.type==="box"){var P=x("q1"),M=x("median"),C=x("q3");f._hasPreCompStats=P&&P.length&&M&&M.length&&C&&C.length,_=Math.min(c.minRowLength(P),c.minRowLength(M),c.minRowLength(C))}var A=v(u),h=v(b),p=A&&c.minRowLength(u),k=h&&c.minRowLength(b),w=y.calendar,B={autotypenumbers:y.autotypenumbers},O,j;if(f._hasPreCompStats)switch(String(h)+String(A)){case"00":var V=T("x0")||T("dx"),H=T("y0")||T("dy");H&&!V?O="h":O="v",j=_;break;case"10":O="v",j=Math.min(_,k);break;case"20":O="h",j=Math.min(_,b.length);break;case"01":O="h",j=Math.min(_,p);break;case"02":O="v",j=Math.min(_,u.length);break;case"12":O="v",j=Math.min(_,k,u.length);break;case"21":O="h",j=Math.min(_,b.length,p);break;case"11":j=0;break;case"22":var F=!1,U;for(U=0;U0?(O="v",h>0?j=Math.min(k,p):j=Math.min(p)):h>0?(O="h",j=Math.min(k)):j=0;if(!j){f.visible=!1;return}f._length=j;var W=x("orientation",O);f._hasPreCompStats?W==="v"&&h===0?(x("x0",0),x("dx",1)):W==="h"&&A===0&&(x("y0",0),x("dy",1)):W==="v"&&h===0?x("x0"):W==="h"&&A===0&&x("y0");var q=g.getComponentMethod("calendars","handleTraceDefaults");q(l,f,["x","y"],y)}function o(l,f,x,y){var v=y.prefix,T=c.coerce2(l,f,r,"marker.outliercolor"),u=x("marker.line.outliercolor"),b="outliers";f._hasPreCompStats?b="all":(T||u)&&(b="suspectedoutliers");var _=x(v+"points",b);_?(x("jitter",_==="all"?.3:0),x("pointpos",_==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",f.line.color),x("marker.line.color"),x("marker.line.width"),_==="suspectedoutliers"&&(x("marker.line.outliercolor",f.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete f.marker;var P=x("hoveron");(P==="all"||P.indexOf("points")!==-1)&&(x("hovertemplate"),x("hovertemplatefallback")),c.coerceSelectionMarkerOpacity(f,x)}function i(l,f){var x,y;function v(_){return c.coerce(y._input,y,r,_)}for(var T=0;T{var c=Qo(),g=kn(),I=qw();function S(e,r,a,n,o){for(var i=o+"Layout",l=!1,f=0;f{var c=Hn(),g=Ls(),I=F0(),S=kn(),t=sa().BADNUM,e=S._;Z.exports=function(_,P){var M=_._fullLayout,C=g.getFromId(_,P.xaxis||"x"),A=g.getFromId(_,P.yaxis||"y"),h=[],p=P.type==="violin"?"_numViolins":"_numBoxes",k,w,B,O,j,V,H;P.orientation==="h"?(B=C,O="x",j=A,V="y",H=!!P.yperiodalignment):(B=A,O="y",j=C,V="x",H=!!P.xperiodalignment);var F=r(P,V,j,M[p]),U=F[0],W=F[1],q=S.distinctVals(U,j),J=q.vals,lt=q.minDiff/2,yt,mt,st,tt,pt,rt,at=(P.boxpoints||P.points)==="all"?S.identity:function(jr){return jr.vyt.uf};if(P._hasPreCompStats){var vt=P[O],it=function(jr){return B.d2c((P[jr]||[])[k])},K=1/0,ft=-1/0;for(k=0;k=yt.q1&&yt.q3>=yt.med){var kt=it("lowerfence");yt.lf=kt!==t&&kt<=yt.q1?kt:y(yt,st,tt);var It=it("upperfence");yt.uf=It!==t&&It>=yt.q3?It:v(yt,st,tt);var Pt=it("mean");yt.mean=Pt!==t?Pt:tt?S.mean(st,tt):(yt.q1+yt.q3)/2;var qt=it("sd");yt.sd=Pt!==t&&qt>=0?qt:tt?S.stdev(st,tt,yt.mean):yt.q3-yt.q1,yt.lo=T(yt),yt.uo=u(yt);var Wt=it("notchspan");Wt=Wt!==t&&Wt>0?Wt:b(yt,tt),yt.ln=yt.med-Wt,yt.un=yt.med+Wt;var Jt=yt.lf,ge=yt.uf;P.boxpoints&&st.length&&(Jt=Math.min(Jt,st[0]),ge=Math.max(ge,st[tt-1])),P.notched&&(Jt=Math.min(Jt,yt.ln),ge=Math.max(ge,yt.un)),yt.min=Jt,yt.max=ge}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+yt.q1,"median = "+yt.med,"q3 = "+yt.q3].join(` +`));var fe;yt.med!==t?fe=yt.med:yt.q1!==t?yt.q3!==t?fe=(yt.q1+yt.q3)/2:fe=yt.q1:yt.q3!==t?fe=yt.q3:fe=0,yt.med=fe,yt.q1=yt.q3=fe,yt.lf=yt.uf=fe,yt.mean=yt.sd=fe,yt.ln=yt.un=fe,yt.min=yt.max=fe}K=Math.min(K,yt.min),ft=Math.max(ft,yt.max),yt.pts2=mt.filter(at),h.push(yt)}}P._extremes[B._id]=g.findExtremes(B,[K,ft],{padded:!0})}else{var pe=B.makeCalcdata(P,O),se=a(J,lt),Tt=J.length,Lt=n(Tt);for(k=0;k=0&&Mt0){if(yt={},yt.pos=yt[V]=J[k],mt=yt.pts=Lt[k].sort(f),st=yt[O]=mt.map(x),tt=st.length,yt.min=st[0],yt.max=st[tt-1],yt.mean=S.mean(st,tt),yt.sd=S.stdev(st,tt,yt.mean)*P.sdmultiple,yt.med=S.interp(st,.5),tt%2&&(Ae||He)){var Ge,cr;Ae?(Ge=st.slice(0,tt/2),cr=st.slice(tt/2+1)):He&&(Ge=st.slice(0,tt/2+1),cr=st.slice(tt/2)),yt.q1=S.interp(Ge,.5),yt.q3=S.interp(cr,.5)}else yt.q1=S.interp(st,.25),yt.q3=S.interp(st,.75);yt.lf=y(yt,st,tt),yt.uf=v(yt,st,tt),yt.lo=T(yt),yt.uo=u(yt);var ur=b(yt,tt);yt.ln=yt.med-ur,yt.un=yt.med+ur,ee=Math.min(ee,yt.ln),ve=Math.max(ve,yt.un),yt.pts2=mt.filter(at),h.push(yt)}P.notched&&S.isTypedArray(pe)&&(pe=Array.from(pe)),P._extremes[B._id]=g.findExtremes(B,P.notched?pe.concat([ee,ve]):pe,{padded:!0})}return l(h,P),h.length>0?(h[0].t={num:M[p],dPos:lt,posLetter:V,valLetter:O,labels:{med:e(_,"median:"),min:e(_,"min:"),q1:e(_,"q1:"),q3:e(_,"q3:"),max:e(_,"max:"),mean:P.boxmean==="sd"||P.sizemode==="sd"?e(_,"mean ± σ:").replace("σ",P.sdmultiple===1?"σ":P.sdmultiple+"σ"):e(_,"mean:"),lf:e(_,"lower fence:"),uf:e(_,"upper fence:")}},M[p]++,h):[{t:{empty:!0}}]};function r(_,P,M,C){var A=P in _,h=P+"0"in _,p="d"+P in _;if(A||h&&p){var k=M.makeCalcdata(_,P),w=I(_,M,P,k).vals;return[w,k]}var B;h?B=_[P+"0"]:"name"in _&&(M.type==="category"||c(_.name)&&["linear","log"].indexOf(M.type)!==-1||S.isDateTime(_.name)&&M.type==="date")?B=_.name:B=C;for(var O=M.type==="multicategory"?M.r2c_just_indices(B):M.d2c(B,0,_[P+"calendar"]),j=_._length,V=new Array(j),H=0;H{var c=Ls(),g=kn(),I=xv().getAxisGroup,S=["v","h"];function t(r,a){for(var n=r.calcdata,o=a.xaxis,i=a.yaxis,l=0;l1,h=1-l[r+"gap"],p=1-l[r+"groupgap"];for(y=0;y0;if(O==="positive"?(mt=j*(B?1:.5),pt=tt,st=pt=H):O==="negative"?(mt=pt=H,st=j*(B?1:.5),rt=tt):(mt=st=j,pt=rt=tt),ut){var kt=k.pointpos,It=k.jitter,Pt=k.marker.size/2,qt=0;kt+It>=0&&(qt=tt*(kt+It),qt>mt?(ft=!0,it=Pt,at=qt):qt>pt&&(it=Pt,at=mt)),qt<=mt&&(at=mt);var Wt=0;kt-It<=0&&(Wt=-tt*(kt-It),Wt>st?(ft=!0,K=Pt,vt=Wt):Wt>rt&&(K=Pt,vt=st)),Wt<=st&&(vt=st)}else at=mt,vt=st;var Jt=new Array(T.length);for(v=0;v{var c=Wr(),g=kn(),I=Vs(),S=5,t=.01;function e(o,i,l,f){var x=o._context.staticPlot,y=i.xaxis,v=i.yaxis;g.makeTraceGroups(f,l,"trace boxes").each(function(T){var u=c.select(this),b=T[0],_=b.t,P=b.trace;if(_.wdPos=_.bdPos*P.whiskerwidth,P.visible!==!0||_.empty){u.remove();return}var M,C;P.orientation==="h"?(M=v,C=y):(M=y,C=v),r(u,{pos:M,val:C},P,_,x),a(u,{x:y,y:v},P,_),n(u,{pos:M,val:C},P,_)})}function r(o,i,l,f,x){var y=l.orientation==="h",v=i.val,T=i.pos,u=!!T.rangebreaks,b=f.bPos,_=f.wdPos||0,P=f.bPosPxOffset||0,M=l.whiskerwidth||0,C=l.showwhiskers!==!1,A=l.notched||!1,h=A?1-2*l.notchwidth:1,p,k;Array.isArray(f.bdPos)?(p=f.bdPos[0],k=f.bdPos[1]):(p=f.bdPos,k=f.bdPos);var w=o.selectAll("path.box").data(l.type!=="violin"||l.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(B){if(B.empty)return c.select(this).attr("d","M0,0Z");var O=T.c2l(B.pos+b,!0),j=T.l2p(O-p)+P,V=T.l2p(O+k)+P,H=u?(j+V)/2:T.l2p(O)+P,F=l.whiskerwidth,U=u?j*F+(1-F)*H:T.l2p(O-_)+P,W=u?V*F+(1-F)*H:T.l2p(O+_)+P,q=T.l2p(O-p*h)+P,J=T.l2p(O+k*h)+P,lt=l.sizemode==="sd",yt=v.c2p(lt?B.mean-B.sd:B.q1,!0),mt=lt?v.c2p(B.mean+B.sd,!0):v.c2p(B.q3,!0),st=g.constrain(lt?v.c2p(B.mean,!0):v.c2p(B.med,!0),Math.min(yt,mt)+1,Math.max(yt,mt)-1),tt=B.lf===void 0||l.boxpoints===!1||lt,pt=v.c2p(tt?B.min:B.lf,!0),rt=v.c2p(tt?B.max:B.uf,!0),at=v.c2p(B.ln,!0),vt=v.c2p(B.un,!0);y?c.select(this).attr("d","M"+st+","+q+"V"+J+"M"+yt+","+j+"V"+V+(A?"H"+at+"L"+st+","+J+"L"+vt+","+V:"")+"H"+mt+"V"+j+(A?"H"+vt+"L"+st+","+q+"L"+at+","+j:"")+"Z"+(C?"M"+yt+","+H+"H"+pt+"M"+mt+","+H+"H"+rt+(M===0?"":"M"+pt+","+U+"V"+W+"M"+rt+","+U+"V"+W):"")):c.select(this).attr("d","M"+q+","+st+"H"+J+"M"+j+","+yt+"H"+V+(A?"V"+at+"L"+J+","+st+"L"+V+","+vt:"")+"V"+mt+"H"+j+(A?"V"+vt+"L"+q+","+st+"L"+j+","+at:"")+"Z"+(C?"M"+H+","+yt+"V"+pt+"M"+H+","+mt+"V"+rt+(M===0?"":"M"+U+","+pt+"H"+W+"M"+U+","+rt+"H"+W):""))})}function a(o,i,l,f){var x=i.x,y=i.y,v=f.bdPos,T=f.bPos,u=l.boxpoints||l.points;g.seedPseudoRandom();var b=function(M){return M.forEach(function(C){C.t=f,C.trace=l}),M},_=o.selectAll("g.points").data(u?b:[]);_.enter().append("g").attr("class","points"),_.exit().remove();var P=_.selectAll("path").data(function(M){var C,A=M.pts2,h=Math.max((M.max-M.min)/10,M.q3-M.q1),p=h*1e-9,k=h*t,w=[],B=0,O;if(l.jitter){if(h===0)for(B=1,w=new Array(A.length),C=0;CM.lo&&(W.so=!0)}return A});P.enter().append("path").classed("point",!0),P.exit().remove(),P.call(I.translatePoints,x,y)}function n(o,i,l,f){var x=i.val,y=i.pos,v=!!y.rangebreaks,T=f.bPos,u=f.bPosPxOffset||0,b=l.boxmean||(l.meanline||{}).visible,_,P;Array.isArray(f.bdPos)?(_=f.bdPos[0],P=f.bdPos[1]):(_=f.bdPos,P=f.bdPos);var M=o.selectAll("path.mean").data(l.type==="box"&&l.boxmean||l.type==="violin"&&l.box.visible&&l.meanline.visible?g.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(C){var A=y.c2l(C.pos+T,!0),h=y.l2p(A-_)+u,p=y.l2p(A+P)+u,k=v?(h+p)/2:y.l2p(A)+u,w=x.c2p(C.mean,!0),B=x.c2p(C.mean-C.sd,!0),O=x.c2p(C.mean+C.sd,!0);l.orientation==="h"?c.select(this).attr("d","M"+w+","+h+"V"+p+(b==="sd"?"m0,0L"+B+","+k+"L"+w+","+h+"L"+O+","+k+"Z":"")):c.select(this).attr("d","M"+h+","+w+"H"+p+(b==="sd"?"m0,0L"+k+","+B+"L"+h+","+w+"L"+k+","+O+"Z":""))})}Z.exports={plot:e,plotBoxAndWhiskers:r,plotPoints:a,plotBoxMean:n}}),H6=Dt((Q,Z)=>{var c=Wr(),g=pi(),I=Vs();function S(e,r,a){var n=a||c.select(e).selectAll("g.trace.boxes");n.style("opacity",function(o){return o[0].trace.opacity}),n.each(function(o){var i=c.select(this),l=o[0].trace,f=l.line.width;function x(T,u,b,_){T.style("stroke-width",u+"px").call(g.stroke,b).call(g.fill,_)}var y=i.selectAll("path.box");if(l.type==="candlestick")y.each(function(T){if(!T.empty){var u=c.select(this),b=l[T.dir];x(u,b.line.width,b.line.color,b.fillcolor),u.style("opacity",l.selectedpoints&&!T.selected?.3:1)}});else{x(y,f,l.line.color,l.fillcolor),i.selectAll("path.mean").style({"stroke-width":f,"stroke-dasharray":2*f+"px,"+f+"px"}).call(g.stroke,l.line.color);var v=i.selectAll("path.point");I.pointStyle(v,l,e)}})}function t(e,r,a){var n=r[0].trace,o=a.selectAll("path.point");n.selectedpoints?I.selectedPointStyle(o,n):I.pointStyle(o,n,e)}Z.exports={style:S,styleOnSelect:t}}),XM=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=pi(),t=g.fillText;function e(n,o,i,l){var f=n.cd,x=f[0].trace,y=x.hoveron,v=[],T;return y.indexOf("boxes")!==-1&&(v=v.concat(r(n,o,i,l))),y.indexOf("points")!==-1&&(T=a(n,o,i)),l==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(n,o,i,l){var f=n.cd,x=n.xa,y=n.ya,v=f[0].trace,T=f[0].t,u=v.type==="violin",b,_,P,M,C,A,h,p,k,w,B,O=T.bdPos,j,V,H=T.wHover,F=function(Wt){return P.c2l(Wt.pos)+T.bPos-P.c2l(A)};u&&v.side!=="both"?(v.side==="positive"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt,Jt+H,w)},j=O,V=0),v.side==="negative"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt,w)},j=0,V=O)):(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt+H,w)},j=V=O);var U;u?U=function(Wt){return I.inbox(Wt.span[0]-C,Wt.span[1]-C,w)}:U=function(Wt){return I.inbox(Wt.min-C,Wt.max-C,w)},v.orientation==="h"?(C=o,A=i,h=U,p=k,b="y",P=y,_="x",M=x):(C=i,A=o,h=k,p=U,b="x",P=x,_="y",M=y);var W=Math.min(1,O/Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0])));w=n.maxHoverDistance-W,B=n.maxSpikeDistance-W;function q(Wt){return(h(Wt)+p(Wt))/2}var J=I.getDistanceFunction(l,h,p,q);if(I.getClosest(f,J,n),n.index===!1)return[];var lt=f[n.index],yt=v.line.color,mt=(v.marker||{}).color;S.opacity(yt)&&v.line.width?n.color=yt:S.opacity(mt)&&v.boxpoints?n.color=mt:n.color=v.fillcolor,n[b+"0"]=P.c2p(lt.pos+T.bPos-V,!0),n[b+"1"]=P.c2p(lt.pos+T.bPos+j,!0),n[b+"LabelVal"]=lt.orig_p!==void 0?lt.orig_p:lt.pos;var st=b+"Spike";n.spikeDistance=q(lt)*B/w,n[st]=P.c2p(lt.pos,!0);var tt=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,pt=v.boxpoints||v.points,rt=pt&&tt?["max","uf","q3","med","mean","q1","lf","min"]:pt&&!tt?["max","uf","q3","med","q1","lf","min"]:!pt&&tt?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],at=M.range[1]{Z.exports=function(c,g){return g.hoverOnBox&&(c.hoverOnBox=g.hoverOnBox),"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),JM=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a;if(g===!1)for(r=0;r{Z.exports={attributes:Ww(),layoutAttributes:qw(),supplyDefaults:$w().supplyDefaults,crossTraceDefaults:$w().crossTraceDefaults,supplyLayoutDefaults:j6().supplyLayoutDefaults,calc:KM(),crossTraceCalc:U6().crossTraceCalc,plot:V6().plot,style:H6().style,styleOnSelect:H6().styleOnSelect,hoverPoints:XM().hoverPoints,eventData:AB(),selectPoints:JM(),moduleType:"trace",name:"box",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}),SB=Dt((Q,Z)=>{Z.exports=MB()}),rb=Dt((Q,Z)=>{var c=kc(),{extendFlat:g}=Ia(),I=qo(),{axisHoverFormat:S}=ph(),t=ma(),{hovertemplateAttrs:e,templatefallbackAttrs:r,texttemplateAttrs:a}=Zu(),n=ef();Z.exports=g({z:{valType:"data_array",editType:"calc"},x:g({},n.x,{impliedEdits:{xtype:"array"}}),x0:g({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:g({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:g({},n.y,{impliedEdits:{ytype:"array"}}),y0:g({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:g({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:g({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:g({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:g({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:g({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:g({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:g({},n.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:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:e(),hovertemplatefallback:r(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:g({},I.showlegend,{dflt:!1}),zorder:n.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}),W6=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=Qo();Z.exports=function(e,r,a,n,o,i){var l=a("z");o=o||"x",i=i||"y";var f,x;if(l===void 0||!l.length)return 0;if(g.isArray1D(l)){f=a(o),x=a(i);var y=g.minRowLength(f),v=g.minRowLength(x);if(y===0||v===0)return 0;r._length=Math.min(y,v,l.length)}else{if(f=S(o,a),x=S(i,a),!t(l))return 0;a("transpose"),r._length=null}var T=I.getComponentMethod("calendars","handleTraceDefaults");return T(e,r,[o,i],n),!0};function S(e,r){var a=r(e),n=a?r(e+"type","array"):"scaled";return n==="scaled"&&(r(e+"0"),r("d"+e)),a}function t(e){for(var r=!0,a=!1,n=!1,o,i=0;i0&&(a=!0);for(var l=0;l{var c=kn();Z.exports=function(g,I){g("texttemplate"),g("texttemplatefallback");var S=c.extendFlat({},I.font,{color:"auto",size:"auto"});c.coerceFont(g,"textfont",S)}}),QM=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("zsmooth");S===!1&&(I("xgap"),I("ygap")),I("zhoverformat")}}),EB=Dt((Q,Z)=>{var c=kn(),g=W6(),I=Zw(),S=Bp(),t=QM(),e=mc(),r=rb();Z.exports=function(a,n,o,i){function l(x,y){return c.coerce(a,n,r,x,y)}var f=g(a,n,l,i);if(!f){n.visible=!1;return}S(a,n,i,l),l("xhoverformat"),l("yhoverformat"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),I(l,i),t(a,n,l,i),l("hoverongaps"),l("connectgaps",c.isArray1D(n.z)&&n.zsmooth!==!1),e(a,n,i,l,{prefix:"",cLetter:"z"}),l("zorder")}}),t7=Dt((Q,Z)=>{var c=Hn();Z.exports={count:function(g,I,S){return S[g]++,1},sum:function(g,I,S,t){var e=t[I];return c(e)?(e=Number(e),S[g]+=e,e):0},avg:function(g,I,S,t,e){var r=t[I];return c(r)&&(r=Number(r),S[g]+=r,e[g]++),0},min:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]>e){var r=e-S[g];return S[g]=e,r}}else return S[g]=e,e;return 0},max:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]{Z.exports={percent:function(c,g){for(var I=c.length,S=100/g,t=0;t{Z.exports=function(c,g){for(var I=c.length,S=0,t=0;t{var c=sa(),g=c.ONEAVGYEAR,I=c.ONEAVGMONTH,S=c.ONEDAY,t=c.ONEHOUR,e=c.ONEMIN,r=c.ONESEC,a=Ls().tickIncrement;Z.exports=function(f,x,y,v,T){var u=-1.1*x,b=-.1*x,_=f-b,P=y[0],M=y[1],C=Math.min(n(P+b,P+_,v,T),n(M+b,M+_,v,T)),A=Math.min(n(P+u,P+b,v,T),n(M+u,M+b,v,T)),h,p;if(C>A&&AS){var k=h===g?1:6,w=h===g?"M12":"M1";return function(B,O){var j=v.c2d(B,g,T),V=j.indexOf("-",k);V>0&&(j=j.substr(0,V));var H=v.d2c(j,0,T);if(Hr?f>S?f>g*1.1?g:f>I*1.1?I:S:f>t?t:f>e?e:r:Math.pow(10,Math.floor(Math.log(f)/Math.LN10))}function i(f,x,y,v,T,u){if(v&&f>S){var b=l(x,T,u),_=l(y,T,u),P=f===g?0:1;return b[P]!==_[P]}return Math.floor(y/f)-Math.floor(x/f)>.1}function l(f,x,y){var v=x.c2d(f,g,y).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}),i7=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=Qo(),S=Ls(),{hasColorscale:t}=Ud(),e=Xd(),r=Hw(),a=t7(),n=e7(),o=r7(),i=n7();function l(T,u){var b=[],_=[],P=u.orientation==="h",M=S.getFromId(T,P?u.yaxis:u.xaxis),C=P?"y":"x",A={x:"y",y:"x"}[C],h=u[C+"calendar"],p=u.cumulative,k,w=f(T,u,M,C),B=w[0],O=w[1],j=typeof B.size=="string",V=[],H=j?V:B,F=[],U=[],W=[],q=0,J=u.histnorm,lt=u.histfunc,yt=J.indexOf("density")!==-1,mt,st,tt;p.enabled&&yt&&(J=J.replace(/ ?density$/,""),yt=!1);var pt=lt==="max"||lt==="min",rt=pt?null:0,at=a.count,vt=n[J],it=!1,K=function(ee){return M.r2c(ee,0,h)},ft;for(g.isArrayOrTypedArray(u[A])&<!=="count"&&(ft=u[A],it=lt==="avg",at=a[lt]),k=K(B.start),st=K(B.end)+(k-S.tickIncrement(k,B.size,!1,h))/1e6;k=0&&tt=Tt;k--)if(_[k]){Lt=k;break}for(k=Tt;k<=Lt;k++)if(c(b[k])&&c(_[k])){var Mt={p:b[k],s:_[k],b:0};p.enabled||(Mt.pts=W[k],Pt?Mt.ph0=Mt.ph1=W[k].length?O[W[k][0]]:b[k]:(u._computePh=!0,Mt.ph0=fe(V[k]),Mt.ph1=fe(V[k+1],!0))),se.push(Mt)}return se.length===1&&(se[0].width1=S.tickIncrement(se[0].p,B.size,!1,h)-se[0].p),t(u,"marker")&&e(T,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),t(u,"marker.line")&&e(T,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(se,u),g.isArrayOrTypedArray(u.selectedpoints)&&g.tagSelected(se,u,Jt),se}function f(T,u,b,_,P){var M=_+"bins",C=T._fullLayout,A=u["_"+_+"bingroup"],h=C._histogramBinOpts[A],p=C.barmode==="overlay",k,w,B,O,j,V,H,F=function(ge){return b.r2c(ge,0,O)},U=function(ge){return b.c2r(ge,0,O)},W=b.type==="date"?function(ge){return ge||ge===0?g.cleanDate(ge,null,O):null}:function(ge){return c(ge)?Number(ge):null};function q(ge,fe,pe){fe[ge+"Found"]?(fe[ge]=W(fe[ge]),fe[ge]===null&&(fe[ge]=pe[ge])):(V[ge]=fe[ge]=pe[ge],g.nestedProperty(w[0],M+"."+ge).set(pe[ge]))}if(u["_"+_+"autoBinFinished"])delete u["_"+_+"autoBinFinished"];else{w=h.traces;var J=[],lt=!0,yt=!1,mt=!1;for(k=0;k"u"){if(P)return[tt,j,!0];tt=x(T,u,b,_,M)}H=B.cumulative||{},H.enabled&&H.currentbin!=="include"&&(H.direction==="decreasing"?tt.start=U(S.tickIncrement(F(tt.start),tt.size,!0,O)):tt.end=U(S.tickIncrement(F(tt.end),tt.size,!1,O))),h.size=tt.size,h.sizeFound||(V.size=tt.size,g.nestedProperty(w[0],M+".size").set(tt.size)),q("start",h,tt),q("end",h,tt)}j=u["_"+_+"pos0"],delete u["_"+_+"pos0"];var rt=u._input[M]||{},at=g.extendFlat({},h),vt=h.start,it=b.r2l(rt.start),K=it!==void 0;if((h.startFound||K)&&it!==b.r2l(vt)){var ft=K?it:g.aggNums(Math.min,null,j),ut={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:h.size,tick0:vt,calendar:O,range:[ft,S.tickIncrement(ft,h.size,!1,O)].map(b.l2r)},kt=S.tickFirst(ut);kt>b.r2l(ft)&&(kt=S.tickIncrement(kt,h.size,!0,O)),at.start=b.l2r(kt),K||g.nestedProperty(u,M+".start").set(at.start)}var It=h.end,Pt=b.r2l(rt.end),qt=Pt!==void 0;if((h.endFound||qt)&&Pt!==b.r2l(It)){var Wt=qt?Pt:g.aggNums(Math.max,null,j);at.end=b.l2r(Wt),qt||g.nestedProperty(u,M+".start").set(at.end)}var Jt="autobin"+_;return u._input[Jt]===!1&&(u._input[M]=g.extendFlat({},u[M]||{}),delete u._input[Jt],delete u[Jt]),[at,j]}function x(T,u,b,_,P){var M=T._fullLayout,C=y(T,u),A=!1,h=1/0,p=[u],k,w,B;for(k=0;k=0;_--)A(_);else if(u==="increasing"){for(_=1;_=0;_--)T[_]+=T[_+1];b==="exclude"&&(T.push(0),T.shift())}}Z.exports={calc:l,calcAllAutoBins:f}}),CB=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=t7(),S=e7(),t=r7(),e=n7(),r=i7().calcAllAutoBins;Z.exports=function(i,l){var f=g.getFromId(i,l.xaxis),x=g.getFromId(i,l.yaxis),y=l.xcalendar,v=l.ycalendar,T=function(Le){return f.r2c(Le,0,y)},u=function(Le){return x.r2c(Le,0,v)},b=function(Le){return f.c2r(Le,0,y)},_=function(Le){return x.c2r(Le,0,v)},P,M,C,A,h=r(i,l,f,"x"),p=h[0],k=h[1],w=r(i,l,x,"y"),B=w[0],O=w[1],j=l._length;k.length>j&&k.splice(j,k.length-j),O.length>j&&O.splice(j,O.length-j);var V=[],H=[],F=[],U=typeof p.size=="string",W=typeof B.size=="string",q=[],J=[],lt=U?q:p,yt=W?J:B,mt=0,st=[],tt=[],pt=l.histnorm,rt=l.histfunc,at=pt.indexOf("density")!==-1,vt=rt==="max"||rt==="min",it=vt?null:0,K=I.count,ft=S[pt],ut=!1,kt=[],It=[],Pt="z"in l?l.z:"marker"in l&&Array.isArray(l.marker.color)?l.marker.color:"";Pt&&rt!=="count"&&(ut=rt==="avg",K=I[rt]);var qt=p.size,Wt=T(p.start),Jt=T(p.end)+(Wt-g.tickIncrement(Wt,qt,!1,y))/1e6;for(P=Wt;P=0&&C=0&&A{var c=kn(),g=sa().BADNUM,I=F0();Z.exports=function(S,t,e,r,a,n){var o=S._length,i=t.makeCalcdata(S,r),l=e.makeCalcdata(S,a);i=I(S,t,r,i).vals,l=I(S,e,a,l).vals;var f=S.text,x=f!==void 0&&c.isArray1D(f),y=S.hovertext,v=y!==void 0&&c.isArray1D(y),T,u,b=c.distinctVals(i),_=b.vals,P=c.distinctVals(l),M=P.vals,C=[],A,h,p=M.length,k=_.length;for(T=0;T{var c=Hn(),g=kn(),I=sa().BADNUM;Z.exports=function(S,t,e,r){var a,n,o,i,l,f;function x(_){if(c(_))return+_}if(t&&t.transpose){for(a=0,l=0;l{var c=kn(),g=.01,I=[[-1,0],[1,0],[0,-1],[0,1]];function S(e){return .5-.25*Math.min(1,e*.5)}Z.exports=function(e,r){var a=1,n;for(t(e,r),n=0;ng;n++)a=t(e,r,S(a));return a>g&&c.log("interp2d didn't converge quickly",a),e};function t(e,r,a){var n=0,o,i,l,f,x,y,v,T,u,b,_,P,M;for(f=0;fP&&(n=Math.max(n,Math.abs(e[i][l]-_)/(M-P))))}return n}}),G6=Dt((Q,Z)=>{var c=kn().maxRowLength;Z.exports=function(g){var I=[],S={},t=[],e=g[0],r=[],a=[0,0,0],n=c(g),o,i,l,f,x,y,v,T;for(i=0;i=0;x--)f=t[x],i=f[0],l=f[1],y=((S[[i-1,l]]||a)[2]+(S[[i+1,l]]||a)[2]+(S[[i,l-1]]||a)[2]+(S[[i,l+1]]||a)[2])/20,y&&(v[f]=[i,l,y],t.splice(x,1),T=!0);if(!T)throw"findEmpties iterated with no new neighbors";for(f in v)S[f]=v[f],I.push(v[f])}return I.sort(function(u,b){return b[2]-u[2]})}}),a7=Dt((Q,Z)=>{var c=Qo(),g=kn().isArrayOrTypedArray;Z.exports=function(I,S,t,e,r,a){var n=[],o=c.traceIs(I,"contour"),i=c.traceIs(I,"histogram"),l,f,x,y=g(S)&&S.length>1;if(y&&!i&&a.type!=="category"){var v=S.length;if(v<=r){if(o)n=Array.from(S).slice(0,r);else if(r===1)a.type==="log"?n=[.5*S[0],2*S[0]]:n=[S[0]-.5,S[0]+.5];else if(a.type==="log"){for(n=[Math.pow(S[0],1.5)/Math.pow(S[1],.5)],x=1;x{var c=Qo(),g=kn(),I=Ls(),S=F0(),t=CB(),e=Xd(),r=q6(),a=$6(),n=Z6(),o=G6(),i=a7(),l=sa().BADNUM;Z.exports=function(y,v){var T=I.getFromId(y,v.xaxis||"x"),u=I.getFromId(y,v.yaxis||"y"),b=c.traceIs(v,"contour"),_=c.traceIs(v,"histogram"),P=b?"best":v.zsmooth,M,C,A,h,p,k,w,B,O,j,V;if(T._minDtick=0,u._minDtick=0,_)V=t(y,v),h=V.orig_x,M=V.x,C=V.x0,A=V.dx,B=V.orig_y,p=V.y,k=V.y0,w=V.dy,O=V.z;else{var H=v.z;g.isArray1D(H)?(r(v,T,u,"x","y",["z"]),M=v._x,p=v._y,H=v._z):(h=v.x?T.makeCalcdata(v,"x"):[],B=v.y?u.makeCalcdata(v,"y"):[],M=S(v,T,"x",h).vals,p=S(v,u,"y",B).vals,v._x=M,v._y=p),C=v.x0,A=v.dx,k=v.y0,w=v.dy,O=a(H,v,T,u)}(T.rangebreaks||u.rangebreaks)&&(O=x(M,p,O),_||(M=f(M),p=f(p),v._x=M,v._y=p)),!_&&(b||v.connectgaps)&&(v._emptypoints=o(O),n(O,v._emptypoints));function F(tt){P=v._input.zsmooth=v.zsmooth=!1,g.warn('cannot use zsmooth: "fast": '+tt)}function U(tt){if(tt.length>1){var pt=(tt[tt.length-1]-tt[0])/(tt.length-1),rt=Math.abs(pt/100);for(j=0;jrt)return!1}return!0}v._islinear=!1,T.type==="log"||u.type==="log"?P==="fast"&&F("log axis found"):U(M)?U(p)?v._islinear=!0:P==="fast"&&F("y scale is not linear"):P==="fast"&&F("x scale is not linear");var W=g.maxRowLength(O),q=v.xtype==="scaled"?"":M,J=i(v,q,C,A,W,T),lt=v.ytype==="scaled"?"":p,yt=i(v,lt,k,w,O.length,u);v._extremes[T._id]=I.findExtremes(T,J),v._extremes[u._id]=I.findExtremes(u,yt);var mt={x:J,y:yt,z:O,text:v._text||v.text,hovertext:v._hovertext||v.hovertext};if(v.xperiodalignment&&h&&(mt.orig_x=h),v.yperiodalignment&&B&&(mt.orig_y=B),q&&q.length===J.length-1&&(mt.xCenter=q),lt&<.length===yt.length-1&&(mt.yCenter=lt),_&&(mt.xRanges=V.xRanges,mt.yRanges=V.yRanges,mt.pts=V.pts),b||e(y,v,{vals:O,cLetter:"z"}),b&&v.contours&&v.contours.coloring==="heatmap"){var st={type:v.type==="contour"?"heatmap":"histogram2d",xcalendar:v.xcalendar,ycalendar:v.ycalendar};mt.xfill=i(st,q,C,A,W,T),mt.yfill=i(st,lt,k,w,O.length,u)}return[mt]};function f(y){for(var v=[],T=y.length,u=0;u{Q.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"]],Q.STYLE=Q.CSS_DECLARATIONS.map(function(Z){return Z.join(": ")+"; "}).join("")}),o7=Dt((Q,Z)=>{var c=K6(),g=Vs(),I=kn(),S=null;function t(){if(S!==null)return S;S=!1;var e=I.isSafari()||I.isMacWKWebView()||I.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(c.CSS_DECLARATIONS).reverse(),a=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof a=="function")S=r.some(function(l){return a.apply(null,l)});else{var n=g.tester.append("image").attr("style",c.STYLE),o=window.getComputedStyle(n.node()),i=o.imageRendering;S=r.some(function(l){var f=l[1];return i===f||i===f.toLowerCase()}),n.remove()}}return S}Z.exports=t}),X6=Dt((Q,Z)=>{var c=Wr(),g=ro(),I=Qo(),S=Vs(),t=Ls(),e=kn(),r=ec(),a=Ws(),n=pi(),o=Xc().extractOpts,i=Xc().makeColorScaleFuncFromTrace,l=Dp(),f=Af(),x=f.LINE_SPACING,y=o7(),v=K6().STYLE,T="heatmap-label";function u(C){return C.selectAll("g."+T)}function b(C){u(C).remove()}Z.exports=function(C,A,h,p){var k=A.xaxis,w=A.yaxis;e.makeTraceGroups(p,h,"hm").each(function(B){var O=c.select(this),j=B[0],V=j.trace,H=V.xgap||0,F=V.ygap||0,U=j.z,W=j.x,q=j.y,J=j.xCenter,lt=j.yCenter,yt=I.traceIs(V,"contour"),mt=yt?"best":V.zsmooth,st=U.length,tt=e.maxRowLength(U),pt=!1,rt=!1,at,vt,it,K,ft,ut,kt,It;for(ut=0;at===void 0&&ut0;)vt=k.c2p(W[ut]),ut--;for(vt0;)ft=w.c2p(q[ut]),ut--;ft=k._length||vt<=0||K>=w._length||ft<=0;if(ge){var fe=O.selectAll("image").data([]);fe.exit().remove(),b(O);return}var pe,se;Pt==="fast"?(pe=tt,se=st):(pe=Wt,se=Jt);var Tt=document.createElement("canvas");Tt.width=pe,Tt.height=se;var Lt=Tt.getContext("2d",{willReadFrequently:!0}),Mt=i(V,{noNumericCheck:!0,returnArray:!0}),ee,ve;Pt==="fast"?(ee=pt?function(Yn){return tt-1-Yn}:e.identity,ve=rt?function(Yn){return st-1-Yn}:e.identity):(ee=function(Yn){return e.constrain(Math.round(k.c2p(W[Yn])-at),0,Wt)},ve=function(Yn){return e.constrain(Math.round(w.c2p(q[Yn])-K),0,Jt)});var oe=ve(0),Ae=[oe,oe],He=pt?0:1,Ge=rt?0:1,cr=0,ur=0,jr=0,qr=0,br,Xr,nn,Le,Gt;function ne(Yn,La){if(Yn!==void 0){var qi=Mt(Yn);return qi[0]=Math.round(qi[0]),qi[1]=Math.round(qi[1]),qi[2]=Math.round(qi[2]),cr+=La,ur+=qi[0]*La,jr+=qi[1]*La,qr+=qi[2]*La,qi}return[0,0,0,0]}function Ct(Yn,La,qi,Qa){var Ja=Yn[qi.bin0];if(Ja===void 0)return ne(void 0,1);var Do=Yn[qi.bin1],yo=La[qi.bin0],Bo=La[qi.bin1],Da=Do-Ja||0,ys=yo-Ja||0,os;return Do===void 0?Bo===void 0?os=0:yo===void 0?os=2*(Bo-Ja):os=(2*Bo-yo-Ja)*2/3:Bo===void 0?yo===void 0?os=0:os=(2*Ja-Do-yo)*2/3:yo===void 0?os=(2*Bo-Do-Ja)*2/3:os=Bo+Ja-Do-yo,ne(Ja+qi.frac*Da+Qa.frac*(ys+qi.frac*os))}if(Pt!=="default"){var gt=0,St;try{St=new Uint8Array(pe*se*4)}catch{St=new Array(pe*se*4)}if(Pt==="smooth"){var Nt=J||W,re=lt||q,le=new Array(Nt.length),ke=new Array(re.length),Ue=new Array(Wt),qe=J?P:_,or=lt?P:_,Sr,Mr,mr;for(ut=0;utMi||Mi>w._length))for(kt=Cn;ktHi||Hi>k._length)){var Ji=a({x:Ni,y:mi},V,C._fullLayout);Ji.x=Ni,Ji.y=mi;var di=j.z[ut][kt];di===void 0?(Ji.z="",Ji.zLabel=""):(Ji.z=di,Ji.zLabel=t.tickText(We,di,"hover").text);var za=j.text&&j.text[ut]&&j.text[ut][kt];(za===void 0||za===!1)&&(za=""),Ji.text=za;var qa=e.texttemplateString({data:[Ji,V._meta],fallback:V.texttemplatefallback,labels:Ji,locale:C._fullLayout._d3locale,template:ua});if(qa){var Oe=qa.split("
"),ze=Oe.length,Br=0;for(It=0;It{Z.exports={min:"zmin",max:"zmax"}}),J6=Dt((Q,Z)=>{var c=Wr();Z.exports=function(g){c.select(g).selectAll(".hm image").style("opacity",function(I){return I.trace.opacity})}}),Q6=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=Ls(),t=Xc().extractOpts;Z.exports=function(e,r,a,n,o){o||(o={});var i=o.isContour,l=e.cd[0],f=l.trace,x=e.xa,y=e.ya,v=l.x,T=l.y,u=l.z,b=l.xCenter,_=l.yCenter,P=l.zmask,M=f.zhoverformat,C=v,A=T,h,p,k,w;if(e.index!==!1){try{k=Math.round(e.index[1]),w=Math.round(e.index[0])}catch{g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index);return}if(k<0||k>=u[0].length||w<0||w>u.length)return}else{if(c.inbox(r-v[0],r-v[v.length-1],0)>0||c.inbox(a-T[0],a-T[T.length-1],0)>0)return;if(i){var B;for(C=[2*v[0]-v[1]],B=1;B{Z.exports={attributes:rb(),supplyDefaults:EB(),calc:Y6(),plot:X6(),colorbar:O1(),style:J6(),hoverPoints:Q6(),moduleType:"trace",name:"heatmap",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}),PB=Dt((Q,Z)=>{Z.exports=LB()}),s7=Dt((Q,Z)=>{Z.exports=function(c,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}),IB=Dt((Q,Z)=>{Z.exports={eventDataKeys:["binNumber"]}}),tk=Dt((Q,Z)=>{var c=Pg(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=ma(),r=s7(),a=IB(),n=Ia().extendFlat;Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:n({},c.text,{}),hovertext:n({},c.hovertext,{}),orientation:c.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),texttemplate:S({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:n({},c.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:c.insidetextanchor,textangle:c.textangle,cliponaxis:c.cliponaxis,constraintext:c.constraintext,marker:c.marker,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,zorder:c.zorder}}),zB=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=pi(),S=Q0().handleText,t=R6(),e=tk();Z.exports=function(r,a,n,o){function i(A,h){return g.coerce(r,a,e,A,h)}var l=i("x"),f=i("y"),x=i("cumulative.enabled");x&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var y=i("textposition");S(r,a,o,i,y,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var v=i("orientation",f&&!l?"h":"v"),T=v==="v"?"x":"y",u=v==="v"?"y":"x",b=l&&f?Math.min(g.minRowLength(l)&&g.minRowLength(f)):g.minRowLength(a[T]||[]);if(!b){a.visible=!1;return}a._length=b;var _=c.getComponentMethod("calendars","handleTraceDefaults");_(r,a,["x","y"],o);var P=a[u];P&&i("histfunc"),i("histnorm"),i("autobin"+T),t(r,a,i,n,o),g.coerceSelectionMarkerOpacity(a,i);var M=(a.marker.line||{}).color,C=c.getComponentMethod("errorbars","supplyDefaults");C(r,a,M||I.defaultLine,{axis:"y"}),C(r,a,M||I.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}}),ek=Dt((Q,Z)=>{var c=kn(),g=Bc(),I=Qo().traceIs,S=Lg(),t=Q0().validateCornerradius,e=c.nestedProperty,r=xv().getAxisGroup,a=[{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"}],n=["x","y"];Z.exports=function(o,i){var l=i._histogramBinOpts={},f=[],x={},y=[],v,T,u,b,_,P,M;function C(yt,mt){return c.coerce(v._input,v,v._module.attributes,yt,mt)}function A(yt){return yt.orientation==="v"?"x":"y"}function h(yt,mt){var st=g.getFromTrace({_fullLayout:i},yt,mt);return st.type}function p(yt,mt,st){var tt=yt.uid+"__"+st;mt||(mt=tt);var pt=h(yt,st),rt=yt[st+"calendar"]||"",at=l[mt],vt=!0;at&&(pt===at.axType&&rt===at.calendar?(vt=!1,at.traces.push(yt),at.dirs.push(st)):(mt=tt,pt!==at.axType&&c.warn(["Attempted to group the bins of trace",yt.index,"set on a","type:"+pt,"axis","with bins on","type:"+at.axType,"axis."].join(" ")),rt!==at.calendar&&c.warn(["Attempted to group the bins of trace",yt.index,"set with a",rt,"calendar","with bins",at.calendar?"on a "+at.calendar+" calendar":"w/o a set calendar"].join(" ")))),vt&&(l[mt]={traces:[yt],dirs:[st],axType:pt,calendar:yt[st+"calendar"]||""}),yt["_"+st+"bingroup"]=mt}for(_=0;_{var c=tb().hoverPoints,g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.cd[I.index],o=I.cd[0].trace;if(!o.cumulative.enabled){var i=o.orientation==="h"?"y":"x";I[i+"Label"]=g(I[i+"a"],[n.ph0,n.ph1],o[i+"hoverformat"])}return a}}}),l7=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(c.z=g.zLabelVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),!(I.cumulative||{}).enabled){var e=Array.isArray(t)?S[0].pts[t[0]][t[1]]:S[t].pts;c.pointNumbers=e,c.binNumber=c.pointNumber,delete c.pointNumber,delete c.pointIndex;var r;if(I._indexToPoints){r=[];for(var a=0;a{Z.exports={attributes:tk(),layoutAttributes:B6(),supplyDefaults:zB(),crossTraceDefaults:ek(),supplyLayoutDefaults:YM(),calc:i7().calc,crossTraceCalc:zr().crossTraceCalc,plot:ax().plot,layerName:"barlayer",style:xm().style,styleOnSelect:xm().styleOnSelect,colorbar:xo(),hoverPoints:OB(),selectPoints:eb(),eventData:l7(),moduleType:"trace",name:"histogram",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}),FB=Dt((Q,Z)=>{Z.exports=DB()}),rk=Dt((Q,Z)=>{var c=tk(),g=s7(),I=rb(),S=qo(),t=ph().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:r,templatefallbackAttrs:a}=Zu(),n=kc(),o=Ia().extendFlat;Z.exports=o({x:c.x,y:c.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:g("x"),nbinsy:c.nbinsy,ybins:g("y"),autobinx:c.autobinx,autobiny:c.autobiny,bingroup:o({},c.bingroup,{}),xbingroup:o({},c.bingroup,{}),ybingroup:o({},c.bingroup,{}),xgap:I.xgap,ygap:I.ygap,zsmooth:I.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:e({},{keys:["z"]}),hovertemplatefallback:a(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:a({editType:"plot"}),textfont:I.textfont,showlegend:o({},S.showlegend,{dflt:!1})},n("",{cLetter:"z",autoColorDflt:!1}))}),u7=Dt((Q,Z)=>{var c=Qo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("y"),n=g.minRowLength(r),o=g.minRowLength(a);if(!n||!o){S.visible=!1;return}S._length=Math.min(n,o);var i=c.getComponentMethod("calendars","handleTraceDefaults");i(I,S,["x","y"],e);var l=t("z")||t("marker.color");l&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}),BB=Dt((Q,Z)=>{var c=kn(),g=u7(),I=QM(),S=mc(),t=Zw(),e=rk();Z.exports=function(r,a,n,o){function i(l,f){return c.coerce(r,a,e,l,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,o),S(r,a,o,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),t(i,o),i("xhoverformat"),i("yhoverformat"))}}),RB=Dt((Q,Z)=>{var c=Q6(),g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.index,o=n[0],i=n[1],l=I.cd[0],f=l.trace,x=l.xRanges[i],y=l.yRanges[o];return I.xLabel=g(I.xa,[x[0],x[1]],f.xhoverformat),I.yLabel=g(I.ya,[y[0],y[1]],f.yhoverformat),a}}}),NB=Dt((Q,Z)=>{Z.exports={attributes:rk(),supplyDefaults:BB(),crossTraceDefaults:ek(),calc:Y6(),plot:X6(),layerName:"heatmaplayer",colorbar:O1(),style:J6(),hoverPoints:RB(),eventData:l7(),moduleType:"trace",name:"histogram2d",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}),jB=Dt((Q,Z)=>{Z.exports=NB()}),nk=Dt((Q,Z)=>{Z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}),Gw=Dt((Q,Z)=>{var c=rb(),g=ef(),I=ph(),S=I.axisHoverFormat,t=I.descriptionOnlyNumbers,e=kc(),r=kd().dash,a=ma(),n=Ia().extendFlat,o=nk(),i=o.COMPARISON_OPS2,l=o.INTERVAL_OPS,f=g.line;Z.exports=n({z:c.z,x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,text:c.text,hovertext:c.hovertext,transpose:c.transpose,xtype:c.xtype,ytype:c.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:n({},c.texttemplate,{}),texttemplatefallback:c.texttemplatefallback,textfont:n({},c.textfont,{}),hoverongaps:c.hoverongaps,connectgaps:n({},c.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:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(l),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},f.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:n({},f.smoothing,{}),editType:"plot"},zorder:g.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}),c7=Dt((Q,Z)=>{var c=rk(),g=Gw(),I=kc(),S=ph().axisHoverFormat,t=Ia().extendFlat;Z.exports=t({x:c.x,y:c.y,z:c.z,marker:c.marker,histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:c.xbins,nbinsy:c.nbinsy,ybins:c.ybins,autobinx:c.autobinx,autobiny:c.autobiny,bingroup:c.bingroup,xbingroup:c.xbingroup,ybingroup:c.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:t({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:g.texttemplate,texttemplatefallback:g.texttemplatefallback,textfont:g.textfont},I("",{cLetter:"z",editTypeOverride:"calc"}))}),ik=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=S("contours.start"),e=S("contours.end"),r=t===!1||e===!1,a=I("contours.size"),n;r?n=g.autocontour=!0:n=I("autocontour",!1),(n||!a)&&I("ncontours")}}),h7=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t){t||(t={});var e=g("contours.showlabels");if(e){var r=I.font;c.coerceFont(g,"contours.labelfont",r,{overrideDflt:{color:S}}),g("contours.labelformat")}t.hasHover!==!1&&g("zhoverformat")}}),ak=Dt((Q,Z)=>{var c=mc(),g=h7();Z.exports=function(I,S,t,e,r){var a=t("contours.coloring"),n,o="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(o=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(I.showlegend!==!0&&(S.showlegend=!1),S._dfltShowLegend=!1,c(I,S,e,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),g(t,e,o,r)}}),UB=Dt((Q,Z)=>{var c=kn(),g=u7(),I=ik(),S=ak(),t=Zw(),e=c7();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,e,f,x)}function l(f){return c.coerce2(r,a,e,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,l),S(r,a,i,o),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&t(i,o))}}),f7=Dt((Q,Z)=>{var c=Ls(),g=kn();Z.exports=function(S,t){var e=S.contours;if(S.autocontour){var r=S.zmin,a=S.zmax;(S.zauto||r===void 0)&&(r=g.aggNums(Math.min,null,t)),(S.zauto||a===void 0)&&(a=g.aggNums(Math.max,null,t));var n=I(r,a,S.ncontours);e.size=n.dtick,e.start=c.tickFirst(n),n.range.reverse(),e.end=c.tickFirst(n),e.start===r&&(e.start+=e.size),e.end===a&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),S._input.contours||(S._input.contours={}),g.extendFlat(S._input.contours,{start:e.start,end:e.end,size:e.size}),S._input.autocontour=!0}else if(e.type!=="constraint"){var o=e.start,i=e.end,l=S._input.contours;if(o>i&&(e.start=l.start=i,i=e.end=l.end=o,o=e.start),!(e.size>0)){var f;o===i?f=1:f=I(o,i,S.ncontours).dtick,l.size=e.size=f}}};function I(S,t,e){var r={type:"linear",range:[S,t]};return c.autoTicks(r,(t-S)/(e||15)),r}}),Yw=Dt((Q,Z)=>{Z.exports=function(c){return c.end+c.size/1e6}}),d7=Dt((Q,Z)=>{var c=Xc(),g=Y6(),I=f7(),S=Yw();Z.exports=function(t,e){var r=g(t,e),a=r[0].z;I(e,a);var n=e.contours,o=c.extractOpts(e),i;if(n.coloring==="heatmap"&&o.auto&&e.autocontour===!1){var l=n.start,f=S(n),x=n.size||1,y=Math.floor((f-l)/x)+1;isFinite(x)||(x=1,y=1);var v=l-x/2,T=v+y*x;i=[v,T]}else i=a;return c.calc(t,e,{vals:i,cLetter:"z"}),r}}),Kw=Dt((Q,Z)=>{Z.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}}}),p7=Dt((Q,Z)=>{var c=Kw();Z.exports=function(I){var S=I[0].z,t=S.length,e=S[0].length,r=t===2||e===2,a,n,o,i,l,f,x,y,v;for(n=0;nI?0:1)+(S[0][1]>I?0:2)+(S[1][1]>I?0:4)+(S[1][0]>I?0:8);if(t===5||t===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return I>e?t===5?713:1114:t===5?104:208}return t===15?0:t}}),m7=Dt((Q,Z)=>{var c=kn(),g=Kw();Z.exports=function(a,n,o){var i,l,f,x,y;for(n=n||.01,o=o||.01,f=0;f20?(x=g.CHOOSESADDLE[x][(y[0]||y[1])<0?0:1],a.crossings[f]=g.SADDLEREMAINDER[x]):delete a.crossings[f],y=g.NEWDELTA[x],!y){c.log("Found bad marching index:",x,n,a.level);break}v.push(r(a,n,y)),n[0]+=y[0],n[1]+=y[1],f=n.join(","),I(v[v.length-1],v[v.length-2],i,l)&&v.pop();var M=y[0]&&(n[0]<0||n[0]>u-2)||y[1]&&(n[1]<0||n[1]>T-2),C=n[0]===b[0]&&n[1]===b[1]&&y[0]===_[0]&&y[1]===_[1];if(C||o&&M)break;x=a.crossings[f]}P===1e4&&c.log("Infinite loop in contour?");var A=I(v[0],v[v.length-1],i,l),h=0,p=.2*a.smoothing,k=[],w=0,B,O,j,V,H,F,U,W,q,J,lt;for(P=1;P=w;P--)if(B=k[P],B=w&&B+k[O]W&&q--,a.edgepaths[q]=lt.concat(v,J));break}tt||(a.edgepaths[W]=v.concat(J))}for(W=0;W20&&n?a===208||a===1114?i=o[0]===0?1:-1:l=o[1]===0?1:-1:g.BOTTOMSTART.indexOf(a)!==-1?l=1:g.LEFTSTART.indexOf(a)!==-1?i=1:g.TOPSTART.indexOf(a)!==-1?l=-1:i=-1,[i,l]}function r(a,n,o){var i=n[0]+Math.max(o[0],0),l=n[1]+Math.max(o[1],0),f=a.z[l][i],x=a.xaxis,y=a.yaxis;if(o[1]){var v=(a.level-f)/(a.z[l][i+1]-f),T=(v!==1?(1-v)*x.c2l(a.x[i]):0)+(v!==0?v*x.c2l(a.x[i+1]):0);return[x.c2p(x.l2c(T),!0),y.c2p(a.y[l],!0),i+v,l]}else{var u=(a.level-f)/(a.z[l+1][i]-f),b=(u!==1?(1-u)*y.c2l(a.y[l]):0)+(u!==0?u*y.c2l(a.y[l+1]):0);return[x.c2p(a.x[i],!0),y.c2p(y.l2c(b),!0),i,l+u]}}}),VB=Dt((Q,Z)=>{var c=nk(),g=Hn();Z.exports={"[]":S("[]"),"][":S("]["),">":t(">"),"<":t("<"),"=":t("=")};function I(e,r){var a=Array.isArray(r),n;function o(i){return g(i)?+i:null}return c.COMPARISON_OPS2.indexOf(e)!==-1?n=o(a?r[0]:r):c.INTERVAL_OPS.indexOf(e)!==-1?n=a?[o(r[0]),o(r[1])]:[o(r),o(r)]:c.SET_OPS.indexOf(e)!==-1&&(n=a?r.map(o):[o(r)]),n}function S(e){return function(r){r=I(e,r);var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return{start:a,end:n,size:n-a}}}function t(e){return function(r){return r=I(e,r),{start:r,end:1/0,size:1/0}}}}),g7=Dt((Q,Z)=>{var c=kn(),g=VB(),I=Yw();Z.exports=function(S,t,e){for(var r=S.type==="constraint"?g[S._operation](S.value):S,a=r.size,n=[],o=I(r),i=e.trace._carpetTrace,l=i?{xaxis:i.aaxis,yaxis:i.baxis,x:e.a,y:e.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:e.x,y:e.y},f=r.start;f1e3){c.warn("Too many contours, clipping at 1000",S);break}return n}}),v7=Dt((Q,Z)=>{var c=kn();Z.exports=function(I,S){var t,e,r,a=function(i){return i.reverse()},n=function(i){return i};switch(S){case"=":case"<":return I;case">":for(I.length!==1&&c.warn("Contour data invalid for the specified inequality operation."),e=I[0],t=0;t{Z.exports=function(c,g){var I=c[0],S=I.z,t;switch(g.type){case"levels":var e=Math.min(S[0][0],S[0][1]);for(t=0;tr.level||r.starts.length&&e===r.level)}break;case"constraint":if(I.prefixBoundary=!1,I.edgepaths.length)return;var a=I.x.length,n=I.y.length,o=-1/0,i=1/0;for(t=0;t":l>o&&(I.prefixBoundary=!0);break;case"<":(lo||I.starts.length&&x===i)&&(I.prefixBoundary=!0);break;case"][":f=Math.min(l[0],l[1]),x=Math.max(l[0],l[1]),fo&&(I.prefixBoundary=!0);break}break}}}),ok=Dt(Q=>{var Z=Wr(),c=kn(),g=Vs(),I=Xc(),S=ec(),t=Ls(),e=i0(),r=X6(),a=p7(),n=m7(),o=g7(),i=v7(),l=y7(),f=Kw(),x=f.LABELOPTIMIZER;Q.plot=function(M,C,A,h){var p=C.xaxis,k=C.yaxis;c.makeTraceGroups(h,A,"contour").each(function(w){var B=Z.select(this),O=w[0],j=O.trace,V=O.x,H=O.y,F=j.contours,U=o(F,C,O),W=c.ensureSingle(B,"g","heatmapcoloring"),q=[];F.coloring==="heatmap"&&(q=[w]),r(M,C,q,W),a(U),n(U);var J=p.c2p(V[0],!0),lt=p.c2p(V[V.length-1],!0),yt=k.c2p(H[0],!0),mt=k.c2p(H[H.length-1],!0),st=[[J,mt],[lt,mt],[lt,yt],[J,yt]],tt=U;F.type==="constraint"&&(tt=i(U,F._operation)),y(B,st,F),v(B,tt,st,F),u(B,U,M,O,F),_(B,C,M,O,st)})};function y(M,C,A){var h=c.ensureSingle(M,"g","contourbg"),p=h.selectAll("path").data(A.coloring==="fill"?[0]:[]);p.enter().append("path"),p.exit().remove(),p.attr("d","M"+C.join("L")+"Z").style("stroke","none")}function v(M,C,A,h){var p=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",k="M"+A.join("L")+"Z";p&&l(C,h);var w=c.ensureSingle(M,"g","contourfill"),B=w.selectAll("path").data(p?C:[]);B.enter().append("path"),B.exit().remove(),B.each(function(O){var j=(O.prefixBoundary?k:"")+T(O,A);j?Z.select(this).attr("d",j).style("stroke","none"):Z.select(this).remove()})}function T(M,C){var A="",h=0,p=M.edgepaths.map(function(lt,yt){return yt}),k=!0,w,B,O,j,V,H;function F(lt){return Math.abs(lt[1]-C[0][1])<.01}function U(lt){return Math.abs(lt[1]-C[2][1])<.01}function W(lt){return Math.abs(lt[0]-C[0][0])<.01}function q(lt){return Math.abs(lt[0]-C[2][0])<.01}for(;p.length;){for(H=g.smoothopen(M.edgepaths[h],M.smoothing),A+=k?H:H.replace(/^M/,"L"),p.splice(p.indexOf(h),1),w=M.edgepaths[h][M.edgepaths[h].length-1],j=-1,O=0;O<4;O++){if(!w){c.log("Missing end?",h,M);break}for(F(w)&&!q(w)?B=C[1]:W(w)?B=C[0]:U(w)?B=C[3]:q(w)&&(B=C[2]),V=0;V=0&&(B=J,j=V):Math.abs(w[1]-B[1])<.01?Math.abs(w[1]-J[1])<.01&&(J[0]-w[0])*(B[0]-J[0])>=0&&(B=J,j=V):c.log("endpt to newendpt is not vert. or horz.",w,B,J)}if(w=B,j>=0)break;A+="L"+B}if(j===M.edgepaths.length){c.log("unclosed perimeter path");break}h=j,k=p.indexOf(h)===-1,k&&(h=p[0],A+="Z")}for(h=0;hx.MAXCOST*2)break;F&&(B/=2),w=j-B/2,O=w+B*1.5}if(H<=x.MAXCOST)return V};function b(M,C,A,h){var p=C.width/2,k=C.height/2,w=M.x,B=M.y,O=M.theta,j=Math.cos(O)*p,V=Math.sin(O)*p,H=(w>h.center?h.right-w:w-h.left)/(j+Math.abs(Math.sin(O)*k)),F=(B>h.middle?h.bottom-B:B-h.top)/(Math.abs(V)+Math.cos(O)*k);if(H<1||F<1)return 1/0;var U=x.EDGECOST*(1/(H-1)+1/(F-1));U+=x.ANGLECOST*O*O;for(var W=w-j,q=B-V,J=w+j,lt=B+V,yt=0;yt{var c=Wr(),g=Xc(),I=Yw();Z.exports=function(S){var t=S.contours,e=t.start,r=I(t),a=t.size||1,n=Math.floor((r-e)/a)+1,o=t.coloring==="lines"?0:1,i=g.extractOpts(S);isFinite(a)||(a=1,n=1);var l=i.reversescale?g.flipScale(i.colorscale):i.colorscale,f=l.length,x=new Array(f),y=new Array(f),v,T,u=i.min,b=i.max;if(t.coloring==="heatmap"){for(T=0;T=b)&&(e<=u&&(e=u),r>=b&&(r=b),n=Math.floor((r-e)/a)+1,o=0),T=0;Tu&&(x.unshift(u),y.unshift(y[0])),x[x.length-1]{var c=Wr(),g=Vs(),I=J6(),S=x7();Z.exports=function(t){var e=c.select(t).selectAll("g.contour");e.style("opacity",function(r){return r[0].trace.opacity}),e.each(function(r){var a=c.select(this),n=r[0].trace,o=n.contours,i=n.line,l=o.size||1,f=o.start,x=o.type==="constraint",y=!x&&o.coloring==="lines",v=!x&&o.coloring==="fill",T=y||v?S(n):null;a.selectAll("g.contourlevel").each(function(_){c.select(this).selectAll("path").call(g.lineGroupStyle,i.width,y?T(_.level):i.color,i.dash)});var u=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){g.font(c.select(this),{weight:u.weight,style:u.style,variant:u.variant,textcase:u.textcase,lineposition:u.lineposition,shadow:u.shadow,family:u.family,size:u.size,color:u.color||(y?T(_.level):i.color)})}),x)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(v){var b;a.selectAll("g.contourfill path").style("fill",function(_){return b===void 0&&(b=_.level),T(_.level+.5*l)}),b===void 0&&(b=f),a.selectAll("g.contourbg path").style("fill",T(b-.5*l))}}),I(t)}}),lk=Dt((Q,Z)=>{var c=Xc(),g=x7(),I=Yw();function S(t,e,r){var a=e.contours,n=e.line,o=a.size||1,i=a.coloring,l=g(e,{isColorbar:!0});if(i==="heatmap"){var f=c.extractOpts(e);r._fillgradient=f.reversescale?c.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else i==="fill"&&(r._fillcolor=l);r._line={color:i==="lines"?l:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:a.start,end:I(a),size:o}}Z.exports={min:"zmin",max:"zmax",calc:S}}),_7=Dt((Q,Z)=>{var c=pi(),g=Q6();Z.exports=function(I,S,t,e,r){r||(r={}),r.isContour=!0;var a=g(I,S,t,e,r);return a&&a.forEach(function(n){var o=n.trace;o.contours.type==="constraint"&&(o.fillcolor&&c.opacity(o.fillcolor)?n.color=c.addOpacity(o.fillcolor,1):o.contours.showlines&&c.opacity(o.line.color)&&(n.color=c.addOpacity(o.line.color,1)))}),a}}),HB=Dt((Q,Z)=>{Z.exports={attributes:c7(),supplyDefaults:UB(),crossTraceDefaults:ek(),calc:d7(),plot:ok().plot,layerName:"contourlayer",style:sk(),colorbar:lk(),hoverPoints:_7(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}),WB=Dt((Q,Z)=>{Z.exports=HB()}),b7=Dt((Q,Z)=>{var c=Hn(),g=h7(),I=pi(),S=I.addOpacity,t=I.opacity,e=nk(),r=kn().isArrayOrTypedArray,a=e.CONSTRAINT_REDUCTION,n=e.COMPARISON_OPS2;Z.exports=function(i,l,f,x,y,v){var T=l.contours,u,b,_,P=f("contours.operation");if(T._operation=a[P],o(f,T),P==="="?u=T.showlines=!0:(u=f("contours.showlines"),_=f("fillcolor",S((i.line||{}).color||y,.5))),u){var M=_&&t(_)?S(l.fillcolor,1):y;b=f("line.color",M),f("line.width",2),f("line.dash")}f("line.smoothing"),g(f,x,b,v)};function o(i,l){var f;n.indexOf(l.operation)===-1?(i("contours.value",[0,1]),r(l.value)?l.value.length>2?l.value=l.value.slice(2):l.length===0?l.value=[0,1]:l.length<2?(f=parseFloat(l.value[0]),l.value=[f,f+1]):l.value=[parseFloat(l.value[0]),parseFloat(l.value[1])]:c(l.value)&&(f=parseFloat(l.value),l.value=[f,f+1])):(i("contours.value",0),c(l.value)||(r(l.value)?l.value=parseFloat(l.value[0]):l.value=0))}}),qB=Dt((Q,Z)=>{var c=kn(),g=W6(),I=Bp(),S=b7(),t=ik(),e=ak(),r=Zw(),a=Gw();Z.exports=function(n,o,i,l){function f(T,u){return c.coerce(n,o,a,T,u)}function x(T){return c.coerce2(n,o,a,T)}var y=g(n,o,f,l);if(!y){o.visible=!1;return}I(n,o,l,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var v=f("contours.type")==="constraint";f("connectgaps",c.isArray1D(o.z)),v?S(n,o,f,l,i):(t(n,o,f,x),e(n,o,f,l)),o.contours&&o.contours.coloring==="heatmap"&&r(f,l),f("zorder")}}),$B=Dt((Q,Z)=>{Z.exports={attributes:Gw(),supplyDefaults:qB(),calc:d7(),plot:ok().plot,style:sk(),colorbar:lk(),hoverPoints:_7(),moduleType:"trace",name:"contour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}),ZB=Dt((Q,Z)=>{Z.exports=$B()}),w7=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=z0(),t=ef(),e=qo(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=t.marker,i=t.line,l=o.line;Z.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:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:n({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:n({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:o.angleref,standoff:o.standoff,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:n({width:l.width,editType:"calc"},r("marker.line")),gradient:o.gradient,editType:"calc"},r("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:c(),hovertemplatefallback:I()}}),GB=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=O0(),e=bv(),r=x0(),a=D0(),n=w7();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}var y=x("a"),v=x("b"),T=x("c"),u;if(y?(u=y.length,v?(u=Math.min(u,v.length),T&&(u=Math.min(u,T.length))):T?u=Math.min(u,T.length):u=0):v&&T&&(u=Math.min(v.length,T.length)),!u){i.visible=!1;return}i._length=u,x("sum"),x("text"),x("hovertext"),i.hoveron!=="fills"&&(x("hovertemplate"),x("hovertemplatefallback"));var b=u{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.aLabel=c.tickText(e.aaxis,g.a,!0).text,t.bLabel=c.tickText(e.baxis,g.b,!0).text,t.cLabel=c.tickText(e.caxis,g.c,!0).text,t}}),KB=Dt((Q,Z)=>{var c=Hn(),g=B0(),I=ct(),S=Rt(),t=me().calcMarkerSize,e=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};Z.exports=function(a,n){var o=a._fullLayout[n.subplot],i=o.sum,l=n.sum||i,f={a:n.a,b:n.b,c:n.c},x=n.ids,y,v,T,u,b,_;for(y=0;y{var c=Ka();Z.exports=function(g,I,S){var t=I.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var e=I.xaxis,r=I.yaxis,a={xaxis:e,yaxis:r,plot:t,layerClipId:I._hasClipOnAxisFalse?I.clipIdRelative:null},n=I.layers.frontplot.select("g.scatterlayer"),o=0;o{var c=Md();Z.exports=function(g,I,S,t){var e=c(g,I,S,t);if(!e||e[0].index===!1)return;var r=e[0];if(r.index===void 0){var a=1-r.y0/g.ya._length,n=g.xa._length,o=n*a/2,i=n-o;return r.x0=Math.max(Math.min(r.x0,i),o),r.x1=Math.max(Math.min(r.x1,i),o),e}var l=r.cd[r.index],f=r.trace,x=r.subplot;r.a=l.a,r.b=l.b,r.c=l.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var y={};y[f.subplot]={_subplot:x};var v=f._module.formatLabels(l,f,y);r.aLabel=v.aLabel,r.bLabel=v.bLabel,r.cLabel=v.cLabel;var T=l.hi||f.hoverinfo,u=[];function b(P,M){u.push(P._hovertitle+": "+M)}if(!f.hovertemplate){var _=T.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&b(x.aaxis,r.aLabel),_.indexOf("b")!==-1&&b(x.baxis,r.bLabel),_.indexOf("c")!==-1&&b(x.caxis,r.cLabel)}return r.extraText=u.join("
"),r.hovertemplate=f.hovertemplate,e}}),QB=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),S[t]){var e=S[t];c.a=e.a,c.b=e.b,c.c=e.c}else c.a=g.a,c.b=g.b,c.c=g.c;return c}}),tR=Dt((Q,Z)=>{var c=Wr(),g=ro(),I=Qo(),S=kn(),t=S.strTranslate,e=S._,r=pi(),a=Vs(),n=i0(),o=Ia().extendFlat,i=Kc(),l=Ls(),f=cp(),x=tf(),y=v0(),v=y.freeMode,T=y.rectMode,u=up(),b=vf().prepSelect,_=vf().selectOnClick,P=vf().clearOutline,M=vf().clearSelectionsCache,C=ic();function A(U,W){this.id=U.id,this.graphDiv=U.graphDiv,this.init(W),this.makeFramework(W),this.updateFx(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Z.exports=A;var h=A.prototype;h.init=function(U){this.container=U._ternarylayer,this.defs=U._defs,this.layoutId=U._uid,this.traceHash={},this.layers={}},h.plot=function(U,W){var q=this,J=W[q.id],lt=W._size;q._hasClipOnAxisFalse=!1;for(var yt=0;ytp*pt?(kt=pt,ut=kt*p):(ut=tt,kt=ut/p),It=mt*ut/tt,Pt=st*kt/pt,K=W.l+W.w*lt-ut/2,ft=W.t+W.h*(1-yt)-kt/2,q.x0=K,q.y0=ft,q.w=ut,q.h=kt,q.sum=rt,q.xaxis={type:"linear",range:[at+2*it-rt,rt-at-2*vt],domain:[lt-It/2,lt+It/2],_id:"x"},n(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(ee){return ee.a>=q.aaxis.range[0]&&ee.a<=q.aaxis.range[1]&&ee.b>=q.baxis.range[1]&&ee.b<=q.baxis.range[0]&&ee.c>=q.caxis.range[1]&&ee.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[at,rt-vt-it],domain:[yt-Pt/2,yt+Pt/2],_id:"y"},n(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var qt=q.yaxis.domain[0],Wt=q.aaxis=o({},U.aaxis,{range:[at,rt-vt-it],side:"left",tickangle:(+U.aaxis.tickangle||0)-30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(Wt,q.graphDiv._fullLayout),Wt.setScale();var Jt=q.baxis=o({},U.baxis,{range:[rt-at-it,vt],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ut});n(Jt,q.graphDiv._fullLayout),Jt.setScale();var ge=q.caxis=o({},U.caxis,{range:[rt-at-vt,it],side:"right",tickangle:(+U.caxis.tickangle||0)+30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(ge,q.graphDiv._fullLayout),ge.setScale();var fe="M"+K+","+(ft+kt)+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDef.select("path").attr("d",fe),q.layers.plotbg.select("path").attr("d",fe);var pe="M0,"+kt+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDefRelative.select("path").attr("d",pe);var se=t(K,ft);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",se),q.clipDefRelative.select("path").attr("transform",null);var Tt=t(K-Jt._offset,ft+kt);q.layers.baxis.attr("transform",Tt),q.layers.bgrid.attr("transform",Tt);var Lt=t(K+ut/2,ft)+"rotate(30)"+t(0,-Wt._offset);q.layers.aaxis.attr("transform",Lt),q.layers.agrid.attr("transform",Lt);var Mt=t(K+ut/2,ft)+"rotate(-30)"+t(0,-ge._offset);q.layers.caxis.attr("transform",Mt),q.layers.cgrid.attr("transform",Mt),q.drawAxes(!0),q.layers.aline.select("path").attr("d",Wt.showline?"M"+K+","+(ft+kt)+"l"+ut/2+",-"+kt:"M0,0").call(r.stroke,Wt.linecolor||"#000").style("stroke-width",(Wt.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",Jt.showline?"M"+K+","+(ft+kt)+"h"+ut:"M0,0").call(r.stroke,Jt.linecolor||"#000").style("stroke-width",(Jt.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",ge.showline?"M"+(K+ut/2)+","+ft+"l"+ut/2+","+kt:"M0,0").call(r.stroke,ge.linecolor||"#000").style("stroke-width",(ge.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),a.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},h.drawAxes=function(U){var W=this,q=W.graphDiv,J=W.id.substr(7)+"title",lt=W.layers,yt=W.aaxis,mt=W.baxis,st=W.caxis;if(W.drawAx(yt),W.drawAx(mt),W.drawAx(st),U){var tt=Math.max(yt.showticklabels?yt.tickfont.size/2:0,(st.showticklabels?st.tickfont.size*.75:0)+(st.ticks==="outside"?st.ticklen*.87:0)),pt=(mt.showticklabels?mt.tickfont.size:0)+(mt.ticks==="outside"?mt.ticklen:0)+3;lt["a-title"]=u.draw(q,"a"+J,{propContainer:yt,propName:W.id+".aaxis.title.text",placeholder:e(q,"Click to enter Component A title"),attributes:{x:W.x0+W.w/2,y:W.y0-yt.title.font.size/3-tt,"text-anchor":"middle"}}),lt["b-title"]=u.draw(q,"b"+J,{propContainer:mt,propName:W.id+".baxis.title.text",placeholder:e(q,"Click to enter Component B title"),attributes:{x:W.x0-pt,y:W.y0+W.h+mt.title.font.size*.83+pt,"text-anchor":"middle"}}),lt["c-title"]=u.draw(q,"c"+J,{propContainer:st,propName:W.id+".caxis.title.text",placeholder:e(q,"Click to enter Component C title"),attributes:{x:W.x0+W.w+pt,y:W.y0+W.h+st.title.font.size*.83+pt,"text-anchor":"middle"}})}},h.drawAx=function(U){var W=this,q=W.graphDiv,J=U._name,lt=J.charAt(0),yt=U._id,mt=W.layers[J],st=30,tt=lt+"tickLayout",pt=k(U);W[tt]!==pt&&(mt.selectAll("."+yt+"tick").remove(),W[tt]=pt),U.setScale();var rt=l.calcTicks(U),at=l.clipEnds(U,rt),vt=l.makeTransTickFn(U),it=l.getTickSigns(U)[2],K=S.deg2rad(st),ft=it*(U.linewidth||1)/2,ut=it*U.ticklen,kt=W.w,It=W.h,Pt=lt==="b"?"M0,"+ft+"l"+Math.sin(K)*ut+","+Math.cos(K)*ut:"M"+ft+",0l"+Math.cos(K)*ut+","+-Math.sin(K)*ut,qt={a:"M0,0l"+It+",-"+kt/2,b:"M0,0l-"+kt/2+",-"+It,c:"M0,0l-"+It+","+kt/2}[lt];l.drawTicks(q,U,{vals:U.ticks==="inside"?at:rt,layer:mt,path:Pt,transFn:vt,crisp:!1}),l.drawGrid(q,U,{vals:at,layer:W.layers[lt+"grid"],path:qt,transFn:vt,crisp:!1}),l.drawLabels(q,U,{vals:rt,layer:mt,transFn:vt,labelFns:l.makeLabelFns(U,0,st)})};function k(U){return U.ticks+String(U.ticklen)+String(U.showticklabels)}var w=C.MINZOOM/2+.87,B="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(w*.87+4.5)+"l2.6,1.5l-"+w/2+","+w*.87+"Z",O="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-2.6,1.5l"+w/2+","+w*.87+"Z",j="m0,1l"+w/2+","+w*.87+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-"+(w/2+2.6)+","+(w*.87+4.5)+"l2.6,1.5l"+w/2+",-"+w*.87+"Z",V="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",H=!0;h.clearOutline=function(){M(this.dragOptions),P(this.dragOptions.gd)},h.initInteractions=function(){var U=this,W=U.layers.plotbg.select("path").node(),q=U.graphDiv,J=q._fullLayout._zoomlayer,lt,yt;this.dragOptions={element:W,gd:q,plotinfo:{id:U.id,domain:q._fullLayout[U.id].domain,xaxis:U.xaxis,yaxis:U.yaxis},subplot:U.id,prepFn:function(Tt,Lt,Mt){U.dragOptions.xaxes=[U.xaxis],U.dragOptions.yaxes=[U.yaxis],lt=q._fullLayout._invScaleX,yt=q._fullLayout._invScaleY;var ee=U.dragOptions.dragmode=q._fullLayout.dragmode;v(ee)?U.dragOptions.minDrag=1:U.dragOptions.minDrag=void 0,ee==="zoom"?(U.dragOptions.moveFn=Jt,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=ge,It(Tt,Lt,Mt)):ee==="pan"?(U.dragOptions.moveFn=pe,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=se,fe(),U.clearOutline(q)):(T(ee)||v(ee))&&b(Tt,Lt,Mt,U.dragOptions,ee)}};var mt,st,tt,pt,rt,at,vt,it,K,ft;function ut(Tt){var Lt={};return Lt[U.id+".aaxis.min"]=Tt.a,Lt[U.id+".baxis.min"]=Tt.b,Lt[U.id+".caxis.min"]=Tt.c,Lt}function kt(Tt,Lt){var Mt=q._fullLayout.clickmode;F(q),Tt===2&&(q.emit("plotly_doubleclick",null),I.call("_guiRelayout",q,ut({a:0,b:0,c:0}))),Mt.indexOf("select")>-1&&Tt===1&&_(Lt,q,[U.xaxis],[U.yaxis],U.id,U.dragOptions),Mt.indexOf("event")>-1&&x.click(q,Lt,U.id)}function It(Tt,Lt,Mt){var ee=W.getBoundingClientRect();mt=Lt-ee.left,st=Mt-ee.top,q._fullLayout._calcInverseTransform(q);var ve=q._fullLayout._invTransform,oe=S.apply3DTransform(ve)(mt,st);mt=oe[0],st=oe[1],tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt,pt=U.aaxis.range[1]-tt.a,at=g(U.graphDiv._fullLayout[U.id].bgcolor).getLuminance(),vt="M0,"+U.h+"L"+U.w/2+", 0L"+U.w+","+U.h+"Z",it=!1,K=J.append("path").attr("class","zoombox").attr("transform",t(U.x0,U.y0)).style({fill:at>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",vt),ft=J.append("path").attr("class","zoombox-corners").attr("transform",t(U.x0,U.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),U.clearOutline(q)}function Pt(Tt,Lt){return 1-Lt/U.h}function qt(Tt,Lt){return 1-(Tt+(U.h-Lt)/Math.sqrt(3))/U.w}function Wt(Tt,Lt){return(Tt-(U.h-Lt)/Math.sqrt(3))/U.w}function Jt(Tt,Lt){var Mt=mt+Tt*lt,ee=st+Lt*yt,ve=Math.max(0,Math.min(1,Pt(mt,st),Pt(Mt,ee))),oe=Math.max(0,Math.min(1,qt(mt,st),qt(Mt,ee))),Ae=Math.max(0,Math.min(1,Wt(mt,st),Wt(Mt,ee))),He=(ve/2+Ae)*U.w,Ge=(1-ve/2-oe)*U.w,cr=(He+Ge)/2,ur=Ge-He,jr=(1-ve)*U.h,qr=jr-ur/p;ur.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ft.transition().style("opacity",1).duration(200),it=!0),q.emit("plotly_relayouting",ut(rt))}function ge(){F(q),rt!==tt&&(I.call("_guiRelayout",q,ut(rt)),H&&q.data&&q._context.showTips&&(S.notifier(e(q,"Double-click to zoom back out"),"long"),H=!1))}function fe(){tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt}function pe(Tt,Lt){var Mt=Tt/U.xaxis._m,ee=Lt/U.yaxis._m;rt={a:tt.a-ee,b:tt.b+(Mt+ee)/2,c:tt.c-(Mt-ee)/2};var ve=[rt.a,rt.b,rt.c].sort(S.sorterAsc),oe={a:ve.indexOf(rt.a),b:ve.indexOf(rt.b),c:ve.indexOf(rt.c)};ve[0]<0&&(ve[1]+ve[0]/2<0?(ve[2]+=ve[0]+ve[1],ve[0]=ve[1]=0):(ve[2]+=ve[0]/2,ve[1]+=ve[0]/2,ve[0]=0),rt={a:ve[oe.a],b:ve[oe.b],c:ve[oe.c]},Lt=(tt.a-rt.a)*U.yaxis._m,Tt=(tt.c-rt.c-tt.b+rt.b)*U.xaxis._m);var Ae=t(U.x0+Tt,U.y0+Lt);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ae);var He=t(-Tt,-Lt);U.clipDefRelative.select("path").attr("transform",He),U.aaxis.range=[rt.a,U.sum-rt.b-rt.c],U.baxis.range=[U.sum-rt.a-rt.c,rt.b],U.caxis.range=[U.sum-rt.a-rt.b,rt.c],U.drawAxes(!1),U._hasClipOnAxisFalse&&U.plotContainer.select(".scatterlayer").selectAll(".trace").call(a.hideOutsideRangePoints,U),q.emit("plotly_relayouting",ut(rt))}function se(){I.call("_guiRelayout",q,ut(rt))}W.onmousemove=function(Tt){x.hover(q,Tt,U.id),q._fullLayout._lasthover=W,q._fullLayout._hoversubplot=U.id},W.onmouseout=function(Tt){q._dragging||f.unhover(q,Tt)},f.init(this.dragOptions)};function F(U){c.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}),k7=Dt((Q,Z)=>{var c=Ai(),g=Uh().attributes,I=Td(),S=Yc().overrideAll,t=Ia().extendFlat,e={title:{text:I.title.text,font:I.title.font},color:I.color,tickmode:I.minor.tickmode,nticks:t({},I.nticks,{dflt:6,min:1}),tick0:I.tick0,dtick:I.dtick,tickvals:I.tickvals,ticktext:I.ticktext,ticks:I.ticks,ticklen:I.ticklen,tickwidth:I.tickwidth,tickcolor:I.tickcolor,ticklabelstep:I.ticklabelstep,showticklabels:I.showticklabels,labelalias:I.labelalias,showtickprefix:I.showtickprefix,tickprefix:I.tickprefix,showticksuffix:I.showticksuffix,ticksuffix:I.ticksuffix,showexponent:I.showexponent,exponentformat:I.exponentformat,minexponent:I.minexponent,separatethousands:I.separatethousands,tickfont:I.tickfont,tickangle:I.tickangle,tickformat:I.tickformat,tickformatstops:I.tickformatstops,hoverformat:I.hoverformat,showline:t({},I.showline,{dflt:!0}),linecolor:I.linecolor,linewidth:I.linewidth,showgrid:t({},I.showgrid,{dflt:!0}),gridcolor:I.gridcolor,gridwidth:I.gridwidth,griddash:I.griddash,layer:I.layer,min:{valType:"number",dflt:0,min:0}},r=Z.exports=S({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:c.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}),D1=Dt((Q,Z)=>{var c=kn(),g=mu(),I=Uh().defaults;Z.exports=function(S,t,e,r){var a=r.type,n=r.attributes,o=r.handleDefaults,i=r.partition||"x",l=t._subplots[a],f=l.length,x=f&&l[0].replace(/\d+$/,""),y,v;function T(P,M){return c.coerce(y,v,n,P,M)}for(var u=0;u{var c=pi(),g=mu(),I=kn(),S=D1(),t=n0(),e=dm(),r=_g(),a=xg(),n=ex(),o=k7(),i=["aaxis","baxis","caxis"];Z.exports=function(x,y,v){S(x,y,v,{type:"ternary",attributes:o,handleDefaults:l,font:y.font,paper_bgcolor:y.paper_bgcolor})};function l(x,y,v,T){var u=v("bgcolor"),b=v("sum");T.bgColor=c.combine(u,T.paper_bgcolor);for(var _,P,M,C=0;C=b&&(A.min=0,h.min=0,p.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function f(x,y,v,T){var u=o[y._name];function b(k,w){return I.coerce(x,y,u,k,w)}b("uirevision",T.uirevision),y.type="linear";var _=b("color"),P=_!==u.color.dflt?_:v.font.color,M=y._name,C=M.charAt(0).toUpperCase(),A="Component "+C,h=b("title.text",A);y._hovertitle=h===A?h:C,I.coerceFont(b,"title.font",v.font,{overrideDflt:{size:I.bigFont(v.font.size),color:P}}),b("min"),a(x,y,b,"linear"),e(x,y,b,"linear"),t(x,y,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(x,y,b,{outerTicks:!0});var p=b("showticklabels");p&&(I.coerceFont(b,"tickfont",v.font,{overrideDflt:{color:P}}),b("tickangle"),b("tickformat")),n(x,y,b,{dfltColor:_,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),b("hoverformat"),b("layer")}}),rR=Dt(Q=>{var Z=tR(),c=ud().getSubplotCalcData,g=kn().counterRegex,I="ternary";Q.name=I;var S=Q.attr="subplot";Q.idRoot=I,Q.idRegex=Q.attrRegex=g(I);var t=Q.attributes={};t[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},Q.layoutAttributes=k7(),Q.supplyLayoutDefaults=eR(),Q.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,n=r._subplots[I],o=0;o{Z.exports={attributes:w7(),supplyDefaults:GB(),colorbar:xo(),formatLabels:YB(),calc:KB(),plot:XB(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:JB(),selectPoints:Nf(),eventData:QB(),moduleType:"trace",name:"scatterternary",basePlotModule:rR(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}),iR=Dt((Q,Z)=>{Z.exports=nR()}),T7=Dt((Q,Z)=>{var c=Ww(),g=Ia().extendFlat,I=ph().axisHoverFormat;Z.exports={y:c.y,x:c.x,x0:c.x0,y0:c.y0,xhoverformat:I("x"),yhoverformat:I("y"),name:g({},c.name,{}),orientation:g({},c.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:c.fillcolor,points:g({},c.boxpoints,{}),jitter:g({},c.jitter,{}),pointpos:g({},c.pointpos,{}),width:g({},c.width,{}),marker:c.marker,text:c.text,hovertext:c.hovertext,hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,quartilemethod:c.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:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:c.zorder}}),A7=Dt((Q,Z)=>{var c=qw(),g=kn().extendFlat;Z.exports={violinmode:g({},c.boxmode,{}),violingap:g({},c.boxgap,{}),violingroupgap:g({},c.boxgroupgap,{})}}),aR=Dt((Q,Z)=>{var c=kn(),g=pi(),I=$w(),S=T7();Z.exports=function(t,e,r,a){function n(h,p){return c.coerce(t,e,S,h,p)}function o(h,p){return c.coerce2(t,e,S,h,p)}if(I.handleSampleDefaults(t,e,n,a),e.visible!==!1){n("bandwidth"),n("side");var i=n("width");i||(n("scalegroup",e.name),n("scalemode"));var l=n("span"),f;Array.isArray(l)&&(f="manual"),n("spanmode",f);var x=n("line.color",(t.marker||{}).color||r),y=n("line.width"),v=n("fillcolor",g.addOpacity(e.line.color,.5));I.handlePointsDefaults(t,e,n,{prefix:""});var T=o("box.width"),u=o("box.fillcolor",v),b=o("box.line.color",x),_=o("box.line.width",y),P=n("box.visible",!!(T||u||b||_));P||(e.box={visible:!1});var M=o("meanline.color",x),C=o("meanline.width",y),A=n("meanline.visible",!!(M||C));A||(e.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}),oR=Dt((Q,Z)=>{var c=kn(),g=A7(),I=j6();Z.exports=function(S,t,e){function r(a,n){return c.coerce(S,t,g,a,n)}I._supply(S,t,e,r,"violin")}}),uk=Dt(Q=>{var Z=kn(),c={gaussian:function(g){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*g*g)}};Q.makeKDE=function(g,I,S){var t=S.length,e=c.gaussian,r=g.bandwidth,a=1/(t*r);return function(n){for(var o=0,i=0;i{var c=kn(),g=Ls(),I=KM(),S=uk(),t=sa().BADNUM;Z.exports=function(n,o){var i=I(n,o);if(i[0].t.empty)return i;for(var l=n._fullLayout,f=g.getFromId(n,o[o.orientation==="h"?"xaxis":"yaxis"]),x=1/0,y=-1/0,v=0,T=0,u=0;u{var c=U6().setPositionOffset,g=["v","h"];Z.exports=function(I,S){for(var t=I.calcdata,e=S.xaxis,r=S.yaxis,a=0;a{var c=Wr(),g=kn(),I=Vs(),S=V6(),t=Zi(),e=uk();Z.exports=function(r,a,n,o){var i=r._context.staticPlot,l=r._fullLayout,f=a.xaxis,x=a.yaxis;function y(v,T){var u=t(v,{xaxis:f,yaxis:x,trace:T,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return I.smoothopen(u[0],1)}g.makeTraceGroups(o,n,"trace violins").each(function(v){var T=c.select(this),u=v[0],b=u.t,_=u.trace;if(_.visible!==!0||b.empty){T.remove();return}var P=b.bPos,M=b.bdPos,C=a[b.valLetter+"axis"],A=a[b.posLetter+"axis"],h=_.side==="both",p=h||_.side==="positive",k=h||_.side==="negative",w=T.selectAll("path.violin").data(g.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(W){var q=c.select(this),J=W.density,lt=J.length,yt=A.c2l(W.pos+P,!0),mt=A.l2p(yt),st;if(_.width)st=b.maxKDE/M;else{var tt=l._violinScaleGroupStats[_.scalegroup];st=_.scalemode==="count"?tt.maxKDE/M*(tt.maxCount/W.pts.length):tt.maxKDE/M}var pt,rt,at,vt,it,K,ft;if(p){for(K=new Array(lt),vt=0;vt{var c=Wr(),g=pi(),I=_l().stylePoints;Z.exports=function(S){var t=c.select(S).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var r=e[0].trace,a=c.select(this),n=r.box||{},o=n.line||{},i=r.meanline||{},l=i.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(g.stroke,r.line.color).call(g.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",o.width+"px").call(g.stroke,o.color).call(g.fill,n.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(g.stroke,i.color),a.selectAll("path.meanline").style(f).call(g.stroke,i.color),I(a,r,S)})}}),hR=Dt((Q,Z)=>{var c=pi(),g=kn(),I=Ls(),S=XM(),t=uk();Z.exports=function(e,r,a,n,o){o||(o={});var i=o.hoverLayer,l=e.cd,f=l[0].trace,x=f.hoveron,y=x.indexOf("violins")!==-1,v=x.indexOf("kde")!==-1,T=[],u,b;if(y||v){var _=S.hoverOnBoxes(e,r,a,n);if(v&&_.length>0){var P=e.xa,M=e.ya,C,A,h,p,k;f.orientation==="h"?(k=r,C="y",h=M,A="x",p=P):(k=a,C="x",h=P,A="y",p=M);var w=l[e.index];if(k>=w.span[0]&&k<=w.span[1]){var B=g.extendFlat({},e),O=p.c2p(k,!0),j=t.getKdeValue(w,f,k),V=t.getPositionOnKdePath(w,f,O),H=h._offset,F=h._length;B[C+"0"]=V[0],B[C+"1"]=V[1],B[A+"0"]=B[A+"1"]=O,B[A+"Label"]=A+": "+I.hoverLabelText(p,k,f[A+"hoverformat"])+", "+l[0].t.labels.kde+" "+j.toFixed(3);for(var U=0,W=0;W<_.length;W++)if(_[W].attr==="med"){U=W;break}B.spikeDistance=_[U].spikeDistance;var q=C+"Spike";B[q]=_[U][q],_[U].spikeDistance=void 0,_[U][q]=void 0,B.hovertemplate=!1,T.push(B),b={},b[C+"1"]=g.constrain(H+V[0],H,H+F),b[C+"2"]=g.constrain(H+V[1],H,H+F),b[A+"1"]=b[A+"2"]=p._offset+O}}y&&(T=T.concat(_))}x.indexOf("points")!==-1&&(u=S.hoverOnPoints(e,r,a));var J=i.selectAll(".violinline-"+f.uid).data(b?[0]:[]);return J.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),J.exit().remove(),J.attr(b).call(c.stroke,e.color),n==="closest"?u?[u]:T:(u&&T.push(u),T)}}),fR=Dt((Q,Z)=>{Z.exports={attributes:T7(),layoutAttributes:A7(),supplyDefaults:aR(),crossTraceDefaults:$w().crossTraceDefaults,supplyLayoutDefaults:oR(),calc:sR(),crossTraceCalc:lR(),plot:uR(),style:cR(),styleOnSelect:_l().styleOnSelect,hoverPoints:hR(),selectPoints:JM(),moduleType:"trace",name:"violin",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}),dR=Dt((Q,Z)=>{Z.exports=fR()}),pR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}),M7=Dt((Q,Z)=>{var c=Pg(),g=ef().line,I=qo(),S=ph().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=pR(),n=Ia().extendFlat,o=pi();Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.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:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:n({},c.insidetextanchor,{dflt:"middle"}),textangle:n({},c.textangle,{dflt:0}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:n({},c.orientation,{}),offset:n({},c.offset,{arrayOk:!1}),width:n({},c.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{dflt:0,editType:"plot"}),dash:g.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder};function i(){var l=n({},c.marker);return delete l.pattern,delete l.cornerradius,l}}),S7=Dt((Q,Z)=>{Z.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"}}}),E7=Dt((Q,Z)=>{var c=kn(),g=Lg(),I=Q0().handleText,S=Wm(),t=Bp(),e=M7(),r=pi();function a(i,l,f,x){function y(M,C){return c.coerce(i,l,e,M,C)}var v=S(i,l,x,y);if(!v){l.visible=!1;return}t(i,l,x,y),y("xhoverformat"),y("yhoverformat"),y("orientation",l.y&&!l.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var u=y("textposition");I(i,l,x,y,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l.textposition!=="none"&&!l.texttemplate&&y("textinfo",c.isArrayOrTypedArray(T)?"text+value":"value");var b=y("marker.color",f);y("marker.line.color",r.defaultLine),y("marker.line.width");var _=y("connector.visible");if(_){y("connector.fillcolor",n(b));var P=y("connector.line.width");P&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function n(i){var l=c.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(l,.5*r.opacity(l))}function o(i,l){var f,x;function y(T){return c.coerce(x._input,x,e,T)}for(var v=0;v{var c=kn(),g=S7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=F0(),I=gR(),S=Rt(),t=sa().BADNUM;Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T,u;a.orientation==="h"?(i=n.makeCalcdata(a,"x"),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;var b=Math.min(l.length,i.length),_=new Array(b);for(a._base=[],T=0;T{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=Wr(),g=kn(),I=Vs(),S=sa().BADNUM,t=ax(),e=Rp().clearMinTextSize;Z.exports=function(o,i,l,f){var x=o._fullLayout;e("funnel",x),r(o,i,l,f),a(o,i,l,f),t.plot(o,i,l,f,{mode:x.funnelmode,norm:x.funnelmode,gap:x.funnelgap,groupgap:x.funnelgroupgap})};function r(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","regions");if(!u.connector||!u.connector.visible){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.region").data(g.identity);P.enter().append("g").classed("region",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&p[2]!==S&&k[2]!==S&&p[3]!==S&&k[3]!==S&&(_?w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2]+"H"+p[3]+"L"+p[1]+","+k[1]+"Z":w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3]+"V"+k[2]+"L"+p[1]+","+k[0]+"Z"),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function a(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[3]!==void 0&&k[3]!==void 0&&(_?(w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2],w+="M"+p[1]+","+k[1]+"L"+p[3]+","+k[2]):(w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3],w+="M"+p[1]+","+k[0]+"L"+p[2]+","+k[2])),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function n(o,i,l,f){var x=[],y=[],v=f?i:l,T=f?l:i;return x[0]=v.c2p(o.s0,!0),y[0]=T.c2p(o.p0,!0),x[1]=v.c2p(o.s1,!0),y[1]=T.c2p(o.p1,!0),x[2]=v.c2p(o.nextS0,!0),y[2]=T.c2p(o.nextP0,!0),x[3]=v.c2p(o.nextS1,!0),y[3]=T.c2p(o.nextP1,!0),f?[x,y]:[y,x]}}),_R=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=pi(),S=go().DESELECTDIM,t=xm(),e=Rp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="funnellayer"]').selectAll("g.trace");e(n,l,"funnel"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y.marker;c.select(this).call(I.fill,v.mc||T.color).call(I.stroke,v.mlc||T.line.color).call(g.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".regions").each(function(){c.select(this).selectAll("path").style("stroke-width",0).call(I.fill,y.connector.fillcolor)}),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),bR=Dt((Q,Z)=>{var c=pi().opacity,g=tb().hoverOnBars,I=kn().formatPercent;Z.exports=function(t,e,r,a,n){var o=g(t,e,r,a,n);if(o){var i=o.cd,l=i[0].trace,f=l.orientation==="h",x=o.index,y=i[x],v=f?"x":"y";o[v+"LabelVal"]=y.s,o.percentInitial=y.begR,o.percentInitialLabel=I(y.begR,1),o.percentPrevious=y.difR,o.percentPreviousLabel=I(y.difR,1),o.percentTotal=y.sumR,o.percentTotalLabel=I(y.sumR,1);var T=y.hi||l.hoverinfo,u=[];if(T&&T!=="none"&&T!=="skip"){var b=T==="all",_=T.split("+"),P=function(M){return b||_.indexOf(M)!==-1};P("percent initial")&&u.push(o.percentInitialLabel+" of initial"),P("percent previous")&&u.push(o.percentPreviousLabel+" of previous"),P("percent total")&&u.push(o.percentTotalLabel+" of total")}return o.extraText=u.join("
"),o.color=S(l,y),[o]}};function S(t,e){var r=t.marker,a=e.mc||r.color,n=e.mlc||r.line.color,o=e.mlw||r.line.width;if(c(a))return a;if(c(n)&&o)return n}}),wR=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(c.percentInitial=g.percentInitial),"percentPrevious"in g&&(c.percentPrevious=g.percentPrevious),"percentTotal"in g&&(c.percentTotal=g.percentTotal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),kR=Dt((Q,Z)=>{Z.exports={attributes:M7(),layoutAttributes:S7(),supplyDefaults:E7().supplyDefaults,crossTraceDefaults:E7().crossTraceDefaults,supplyLayoutDefaults:mR(),calc:vR(),crossTraceCalc:yR(),plot:xR(),style:_R().style,hoverPoints:bR(),eventData:wR(),selectPoints:eb(),moduleType:"trace",name:"funnel",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),TR=Dt((Q,Z)=>{Z.exports=kR()}),AR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["initial","delta","final"]}}),C7=Dt((Q,Z)=>{var c=Pg(),g=ef().line,I=qo(),S=ph().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=AR(),n=Ia().extendFlat,o=pi();function i(l){return{marker:{color:n({},c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:n({},c.marker.line.color,{arrayOk:!1,editType:"style"}),width:n({},c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.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:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:c.insidetextanchor,textangle:c.textangle,textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:c.orientation,offset:c.offset,width:c.width,increasing:i(),decreasing:i(),totals:i(),connector:{line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder}}),L7=Dt((Q,Z)=>{Z.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"}}}),nb=Dt((Q,Z)=>{Z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}),P7=Dt((Q,Z)=>{var c=kn(),g=Lg(),I=Q0().handleText,S=Wm(),t=Bp(),e=C7(),r=pi(),a=nb(),n=a.INCREASING.COLOR,o=a.DECREASING.COLOR,i="#4499FF";function l(y,v,T){y(v+".marker.color",T),y(v+".marker.line.color",r.defaultLine),y(v+".marker.line.width")}function f(y,v,T,u){function b(A,h){return c.coerce(y,v,e,A,h)}var _=S(y,v,u,b);if(!_){v.visible=!1;return}t(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");I(y,v,u,b,P,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),v.texttemplate||b("textinfo")),l(b,"increasing",n),l(b,"decreasing",o),l(b,"totals",i);var M=b("connector.visible");if(M){b("connector.mode");var C=b("connector.line.width");C&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function x(y,v){var T,u;function b(P){return c.coerce(u._input,u,e,P)}if(v.waterfallmode==="group")for(var _=0;_{var c=kn(),g=L7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=Ls(),g=F0(),I=kn().mergeArray,S=Rt(),t=sa().BADNUM;function e(a){return a==="a"||a==="absolute"}function r(a){return a==="t"||a==="total"}Z.exports=function(a,n){var o=c.getFromId(a,n.xaxis||"x"),i=c.getFromId(a,n.yaxis||"y"),l,f,x,y,v,T;n.orientation==="h"?(l=o.makeCalcdata(n,"x"),x=i.makeCalcdata(n,"y"),y=g(n,i,"y",x),v=!!n.yperiodalignment,T="y"):(l=i.makeCalcdata(n,"y"),x=o.makeCalcdata(n,"x"),y=g(n,o,"x",x),v=!!n.xperiodalignment,T="x"),f=y.vals;for(var u=Math.min(f.length,l.length),b=new Array(u),_=0,P,M=!1,C=0;C{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=Wr(),g=kn(),I=Vs(),S=sa().BADNUM,t=ax(),e=Rp().clearMinTextSize;Z.exports=function(n,o,i,l){var f=n._fullLayout;e("waterfall",f),t.plot(n,o,i,l,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,o,i,l)};function r(n,o,i,l){var f=o.xaxis,x=o.yaxis;g.makeTraceGroups(l,i,"trace bars").each(function(y){var v=c.select(this),T=y[0].trace,u=g.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){u.remove();return}var b=T.orientation==="h",_=T.connector.mode,P=u.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=a(C,f,x,b),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&(_==="spanning"&&!C.isSum&&A>0&&(b?w+="M"+p[0]+","+k[1]+"V"+k[0]:w+="M"+p[1]+","+k[0]+"H"+p[0]),_!=="between"&&(C.isSum||A{var c=Wr(),g=Vs(),I=pi(),S=go().DESELECTDIM,t=xm(),e=Rp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");e(n,l,"waterfall"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y[v.dir].marker;c.select(this).call(I.fill,T.color).call(I.stroke,T.line.color).call(g.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),PR=Dt((Q,Z)=>{var c=Ls().hoverLabelText,g=pi().opacity,I=tb().hoverOnBars,S=nb(),t={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};Z.exports=function(r,a,n,o,i){var l=I(r,a,n,o,i);if(!l)return;var f=l.cd,x=f[0].trace,y=x.orientation==="h",v=y?"x":"y",T=y?r.xa:r.ya;function u(w){return c(T,w,x[v+"hoverformat"])}var b=l.index,_=f[b],P=_.isSum?_.b+_.s:_.rawS;l.initial=_.b+_.s-P,l.delta=P,l.final=l.initial+l.delta;var M=u(Math.abs(l.delta));l.deltaLabel=P<0?"("+M+")":M,l.finalLabel=u(l.final),l.initialLabel=u(l.initial);var C=_.hi||x.hoverinfo,A=[];if(C&&C!=="none"&&C!=="skip"){var h=C==="all",p=C.split("+"),k=function(w){return h||p.indexOf(w)!==-1};_.isSum||(k("final")&&(y?!k("x"):!k("y"))&&A.push(l.finalLabel),k("delta")&&(P<0?A.push(l.deltaLabel+" "+t.decreasing):A.push(l.deltaLabel+" "+t.increasing)),k("initial")&&A.push("Initial: "+l.initialLabel))}return A.length&&(l.extraText=A.join("
")),l.color=e(x,_),[l]};function e(r,a){var n=r[a.dir].marker,o=n.color,i=n.line.color,l=n.line.width;if(g(o))return o;if(g(i)&&l)return i}}),IR=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"initial"in g&&(c.initial=g.initial),"delta"in g&&(c.delta=g.delta),"final"in g&&(c.final=g.final),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),zR=Dt((Q,Z)=>{Z.exports={attributes:C7(),layoutAttributes:L7(),supplyDefaults:P7().supplyDefaults,crossTraceDefaults:P7().crossTraceDefaults,supplyLayoutDefaults:MR(),calc:SR(),crossTraceCalc:ER(),plot:CR(),style:LR().style,hoverPoints:PR(),eventData:IR(),selectPoints:eb(),moduleType:"trace",name:"waterfall",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),OR=Dt((Q,Z)=>{Z.exports=zR()}),ib=Dt((Q,Z)=>{Z.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(c){return c.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.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(c){return c.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(c){var g=c.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(c){var g=c.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%",""]}}}}),I7=Dt((Q,Z)=>{var c=qo(),g=ef().zorder,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ia().extendFlat,e=ib().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],a=[],n=[];for(i=0;i{var c=kn(),g=I7(),I=ib(),S=o0().IMAGE_URL_PREFIX;Z.exports=function(t,e){function r(o,i){return c.coerce(t,e,g,o,i)}r("source"),e.source&&!e.source.match(S)&&delete e.source,e._hasSource=!!e.source;var a=r("z");if(e._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!e._hasZ&&!e._hasSource){e.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var n;e._hasZ?(r("colormodel","rgb"),n=I.colormodel[e.colormodel],r("zmin",n.zminDflt||n.min),r("zmax",n.zmaxDflt||n.max)):e._hasSource&&(e.colormodel="rgba256",n=I.colormodel[e.colormodel],e.zmin=n.zminDflt,e.zmax=n.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),e._length=null,r("zorder")}}),wv=Dt((Q,Z)=>{typeof Object.create=="function"?Z.exports=function(c,g){g&&(c.super_=g,c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(c,g){if(g){c.super_=g;var I=function(){};I.prototype=g.prototype,c.prototype=new I,c.prototype.constructor=c}}}),z7=Dt((Q,Z)=>{Z.exports=Rm().EventEmitter}),FR=Dt(Q=>{Q.byteLength=r,Q.toByteArray=n,Q.fromByteArray=l;var Z=[],c=[],g=typeof Uint8Array<"u"?Uint8Array:Array,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,t=I.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=x);var v=y===x?0:4-y%4;return[y,v]}function r(f){var x=e(f),y=x[0],v=x[1];return(y+v)*3/4-v}function a(f,x,y){return(x+y)*3/4-y}function n(f){var x,y=e(f),v=y[0],T=y[1],u=new g(a(f,v,T)),b=0,_=T>0?v-4:v,P;for(P=0;P<_;P+=4)x=c[f.charCodeAt(P)]<<18|c[f.charCodeAt(P+1)]<<12|c[f.charCodeAt(P+2)]<<6|c[f.charCodeAt(P+3)],u[b++]=x>>16&255,u[b++]=x>>8&255,u[b++]=x&255;return T===2&&(x=c[f.charCodeAt(P)]<<2|c[f.charCodeAt(P+1)]>>4,u[b++]=x&255),T===1&&(x=c[f.charCodeAt(P)]<<10|c[f.charCodeAt(P+1)]<<4|c[f.charCodeAt(P+2)]>>2,u[b++]=x>>8&255,u[b++]=x&255),u}function o(f){return Z[f>>18&63]+Z[f>>12&63]+Z[f>>6&63]+Z[f&63]}function i(f,x,y){for(var v,T=[],u=x;u_?_:b+u));return v===1?(x=f[y-1],T.push(Z[x>>2]+Z[x<<4&63]+"==")):v===2&&(x=(f[y-2]<<8)+f[y-1],T.push(Z[x>>10]+Z[x>>4&63]+Z[x<<2&63]+"=")),T.join("")}}),BR=Dt(Q=>{Q.read=function(Z,c,g,I,S){var t,e,r=S*8-I-1,a=(1<>1,o=-7,i=g?S-1:0,l=g?-1:1,f=Z[c+i];for(i+=l,t=f&(1<<-o)-1,f>>=-o,o+=r;o>0;t=t*256+Z[c+i],i+=l,o-=8);for(e=t&(1<<-o)-1,t>>=-o,o+=I;o>0;e=e*256+Z[c+i],i+=l,o-=8);if(t===0)t=1-n;else{if(t===a)return e?NaN:(f?-1:1)*(1/0);e=e+Math.pow(2,I),t=t-n}return(f?-1:1)*e*Math.pow(2,t-I)},Q.write=function(Z,c,g,I,S,t){var e,r,a,n=t*8-S-1,o=(1<>1,l=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=I?0:t-1,x=I?1:-1,y=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(r=isNaN(c)?1:0,e=o):(e=Math.floor(Math.log(c)/Math.LN2),c*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?c+=l/a:c+=l*Math.pow(2,1-i),c*a>=2&&(e++,a/=2),e+i>=o?(r=0,e=o):e+i>=1?(r=(c*a-1)*Math.pow(2,S),e=e+i):(r=c*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;Z[g+f]=r&255,f+=x,r/=256,S-=8);for(e=e<0;Z[g+f]=e&255,f+=x,e/=256,n-=8);Z[g+f-x]|=y*128}}),ox=Dt(Q=>{var Z=FR(),c=BR(),g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q.Buffer=e,Q.SlowBuffer=T,Q.INSPECT_MAX_BYTES=50;var I=2147483647;Q.kMaxLength=I,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let Tt=new Uint8Array(1),Lt={foo:function(){return 42}};return Object.setPrototypeOf(Lt,Uint8Array.prototype),Object.setPrototypeOf(Tt,Lt),Tt.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(Tt){if(Tt>I)throw new RangeError('The value "'+Tt+'" is invalid for option "size"');let Lt=new Uint8Array(Tt);return Object.setPrototypeOf(Lt,e.prototype),Lt}function e(Tt,Lt,Mt){if(typeof Tt=="number"){if(typeof Lt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(Tt)}return r(Tt,Lt,Mt)}e.poolSize=8192;function r(Tt,Lt,Mt){if(typeof Tt=="string")return i(Tt,Lt);if(ArrayBuffer.isView(Tt))return f(Tt);if(Tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt);if(Jt(Tt,ArrayBuffer)||Tt&&Jt(Tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(Tt,SharedArrayBuffer)||Tt&&Jt(Tt.buffer,SharedArrayBuffer)))return x(Tt,Lt,Mt);if(typeof Tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ee=Tt.valueOf&&Tt.valueOf();if(ee!=null&&ee!==Tt)return e.from(ee,Lt,Mt);let ve=y(Tt);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Tt[Symbol.toPrimitive]=="function")return e.from(Tt[Symbol.toPrimitive]("string"),Lt,Mt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt)}e.from=function(Tt,Lt,Mt){return r(Tt,Lt,Mt)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(Tt){if(typeof Tt!="number")throw new TypeError('"size" argument must be of type number');if(Tt<0)throw new RangeError('The value "'+Tt+'" is invalid for option "size"')}function n(Tt,Lt,Mt){return a(Tt),Tt<=0?t(Tt):Lt!==void 0?typeof Mt=="string"?t(Tt).fill(Lt,Mt):t(Tt).fill(Lt):t(Tt)}e.alloc=function(Tt,Lt,Mt){return n(Tt,Lt,Mt)};function o(Tt){return a(Tt),t(Tt<0?0:v(Tt)|0)}e.allocUnsafe=function(Tt){return o(Tt)},e.allocUnsafeSlow=function(Tt){return o(Tt)};function i(Tt,Lt){if((typeof Lt!="string"||Lt==="")&&(Lt="utf8"),!e.isEncoding(Lt))throw new TypeError("Unknown encoding: "+Lt);let Mt=u(Tt,Lt)|0,ee=t(Mt),ve=ee.write(Tt,Lt);return ve!==Mt&&(ee=ee.slice(0,ve)),ee}function l(Tt){let Lt=Tt.length<0?0:v(Tt.length)|0,Mt=t(Lt);for(let ee=0;ee=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return Tt|0}function T(Tt){return+Tt!=Tt&&(Tt=0),e.alloc(+Tt)}e.isBuffer=function(Tt){return Tt!=null&&Tt._isBuffer===!0&&Tt!==e.prototype},e.compare=function(Tt,Lt){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),Jt(Lt,Uint8Array)&&(Lt=e.from(Lt,Lt.offset,Lt.byteLength)),!e.isBuffer(Tt)||!e.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Tt===Lt)return 0;let Mt=Tt.length,ee=Lt.length;for(let ve=0,oe=Math.min(Mt,ee);veee.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ee,ve)):Uint8Array.prototype.set.call(ee,oe,ve);else if(e.isBuffer(oe))oe.copy(ee,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ee};function u(Tt,Lt){if(e.isBuffer(Tt))return Tt.length;if(ArrayBuffer.isView(Tt)||Jt(Tt,ArrayBuffer))return Tt.byteLength;if(typeof Tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Tt);let Mt=Tt.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&Mt===0)return 0;let ve=!1;for(;;)switch(Lt){case"ascii":case"latin1":case"binary":return Mt;case"utf8":case"utf-8":return kt(Tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt*2;case"hex":return Mt>>>1;case"base64":return qt(Tt).length;default:if(ve)return ee?-1:kt(Tt).length;Lt=(""+Lt).toLowerCase(),ve=!0}}e.byteLength=u;function b(Tt,Lt,Mt){let ee=!1;if((Lt===void 0||Lt<0)&&(Lt=0),Lt>this.length||((Mt===void 0||Mt>this.length)&&(Mt=this.length),Mt<=0)||(Mt>>>=0,Lt>>>=0,Mt<=Lt))return"";for(Tt||(Tt="utf8");;)switch(Tt){case"hex":return F(this,Lt,Mt);case"utf8":case"utf-8":return B(this,Lt,Mt);case"ascii":return V(this,Lt,Mt);case"latin1":case"binary":return H(this,Lt,Mt);case"base64":return w(this,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Lt,Mt);default:if(ee)throw new TypeError("Unknown encoding: "+Tt);Tt=(Tt+"").toLowerCase(),ee=!0}}e.prototype._isBuffer=!0;function _(Tt,Lt,Mt){let ee=Tt[Lt];Tt[Lt]=Tt[Mt],Tt[Mt]=ee}e.prototype.swap16=function(){let Tt=this.length;if(Tt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Lt=0;LtLt&&(Tt+=" ... "),""},g&&(e.prototype[g]=e.prototype.inspect),e.prototype.compare=function(Tt,Lt,Mt,ee,ve){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),!e.isBuffer(Tt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Tt);if(Lt===void 0&&(Lt=0),Mt===void 0&&(Mt=Tt?Tt.length:0),ee===void 0&&(ee=0),ve===void 0&&(ve=this.length),Lt<0||Mt>Tt.length||ee<0||ve>this.length)throw new RangeError("out of range index");if(ee>=ve&&Lt>=Mt)return 0;if(ee>=ve)return-1;if(Lt>=Mt)return 1;if(Lt>>>=0,Mt>>>=0,ee>>>=0,ve>>>=0,this===Tt)return 0;let oe=ve-ee,Ae=Mt-Lt,He=Math.min(oe,Ae),Ge=this.slice(ee,ve),cr=Tt.slice(Lt,Mt);for(let ur=0;ur2147483647?Mt=2147483647:Mt<-2147483648&&(Mt=-2147483648),Mt=+Mt,ge(Mt)&&(Mt=ve?0:Tt.length-1),Mt<0&&(Mt=Tt.length+Mt),Mt>=Tt.length){if(ve)return-1;Mt=Tt.length-1}else if(Mt<0)if(ve)Mt=0;else return-1;if(typeof Lt=="string"&&(Lt=e.from(Lt,ee)),e.isBuffer(Lt))return Lt.length===0?-1:M(Tt,Lt,Mt,ee,ve);if(typeof Lt=="number")return Lt=Lt&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(Tt,Lt,Mt):Uint8Array.prototype.lastIndexOf.call(Tt,Lt,Mt):M(Tt,[Lt],Mt,ee,ve);throw new TypeError("val must be string, number or Buffer")}function M(Tt,Lt,Mt,ee,ve){let oe=1,Ae=Tt.length,He=Lt.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(Tt.length<2||Lt.length<2)return-1;oe=2,Ae/=2,He/=2,Mt/=2}function Ge(ur,jr){return oe===1?ur[jr]:ur.readUInt16BE(jr*oe)}let cr;if(ve){let ur=-1;for(cr=Mt;crAe&&(Mt=Ae-He),cr=Mt;cr>=0;cr--){let ur=!0;for(let jr=0;jrve&&(ee=ve)):ee=ve;let oe=Lt.length;ee>oe/2&&(ee=oe/2);let Ae;for(Ae=0;Ae>>0,isFinite(Mt)?(Mt=Mt>>>0,ee===void 0&&(ee="utf8")):(ee=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ve=this.length-Lt;if((Mt===void 0||Mt>ve)&&(Mt=ve),Tt.length>0&&(Mt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");let oe=!1;for(;;)switch(ee){case"hex":return C(this,Tt,Lt,Mt);case"utf8":case"utf-8":return A(this,Tt,Lt,Mt);case"ascii":case"latin1":case"binary":return h(this,Tt,Lt,Mt);case"base64":return p(this,Tt,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,Tt,Lt,Mt);default:if(oe)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(Tt,Lt,Mt){return Lt===0&&Mt===Tt.length?Z.fromByteArray(Tt):Z.fromByteArray(Tt.slice(Lt,Mt))}function B(Tt,Lt,Mt){Mt=Math.min(Tt.length,Mt);let ee=[],ve=Lt;for(;ve239?4:oe>223?3:oe>191?2:1;if(ve+He<=Mt){let Ge,cr,ur,jr;switch(He){case 1:oe<128&&(Ae=oe);break;case 2:Ge=Tt[ve+1],(Ge&192)===128&&(jr=(oe&31)<<6|Ge&63,jr>127&&(Ae=jr));break;case 3:Ge=Tt[ve+1],cr=Tt[ve+2],(Ge&192)===128&&(cr&192)===128&&(jr=(oe&15)<<12|(Ge&63)<<6|cr&63,jr>2047&&(jr<55296||jr>57343)&&(Ae=jr));break;case 4:Ge=Tt[ve+1],cr=Tt[ve+2],ur=Tt[ve+3],(Ge&192)===128&&(cr&192)===128&&(ur&192)===128&&(jr=(oe&15)<<18|(Ge&63)<<12|(cr&63)<<6|ur&63,jr>65535&&jr<1114112&&(Ae=jr))}}Ae===null?(Ae=65533,He=1):Ae>65535&&(Ae-=65536,ee.push(Ae>>>10&1023|55296),Ae=56320|Ae&1023),ee.push(Ae),ve+=He}return j(ee)}var O=4096;function j(Tt){let Lt=Tt.length;if(Lt<=O)return String.fromCharCode.apply(String,Tt);let Mt="",ee=0;for(;eeee)&&(Mt=ee);let ve="";for(let oe=Lt;oeMt&&(Tt=Mt),Lt<0?(Lt+=Mt,Lt<0&&(Lt=0)):Lt>Mt&&(Lt=Mt),LtMt)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt+--Lt],ve=1;for(;Lt>0&&(ve*=256);)ee+=this[Tt+--Lt]*ve;return ee},e.prototype.readUint8=e.prototype.readUInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]|this[Tt+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]<<8|this[Tt+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),(this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16)+this[Tt+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]*16777216+(this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3])},e.prototype.readBigUInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&K(Tt,this.length-8);let ee=Lt+this[++Tt]*2**8+this[++Tt]*2**16+this[++Tt]*2**24,ve=this[++Tt]+this[++Tt]*2**8+this[++Tt]*2**16+Mt*2**24;return BigInt(ee)+(BigInt(ve)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&K(Tt,this.length-8);let ee=Lt*2**24+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt],ve=this[++Tt]*2**24+this[++Tt]*2**16+this[++Tt]*2**8+Mt;return(BigInt(ee)<>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe=ve&&(ee-=Math.pow(2,8*Lt)),ee},e.prototype.readIntBE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=Lt,ve=1,oe=this[Tt+--ee];for(;ee>0&&(ve*=256);)oe+=this[Tt+--ee]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*Lt)),oe},e.prototype.readInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]&128?(255-this[Tt]+1)*-1:this[Tt]},e.prototype.readInt16LE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt]|this[Tt+1]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt16BE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt+1]|this[Tt]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16|this[Tt+3]<<24},e.prototype.readInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]<<24|this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3]},e.prototype.readBigInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&K(Tt,this.length-8);let ee=this[Tt+4]+this[Tt+5]*2**8+this[Tt+6]*2**16+(Mt<<24);return(BigInt(ee)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&K(Tt,this.length-8);let ee=(Lt<<24)+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt];return(BigInt(ee)<>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!0,23,4)},e.prototype.readFloatBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!1,23,4)},e.prototype.readDoubleLE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!0,52,8)},e.prototype.readDoubleBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!1,52,8)};function q(Tt,Lt,Mt,ee,ve,oe){if(!e.isBuffer(Tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Lt>ve||LtTt.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,Mt=Mt>>>0,!ee){let Ae=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Ae,0)}let ve=1,oe=0;for(this[Lt]=Tt&255;++oe>>0,Mt=Mt>>>0,!ee){let Ae=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Ae,0)}let ve=Mt-1,oe=1;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)this[Lt+ve]=Tt/oe&255;return Lt+Mt},e.prototype.writeUint8=e.prototype.writeUInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,255,0),this[Lt]=Tt&255,Lt+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt+3]=Tt>>>24,this[Lt+2]=Tt>>>16,this[Lt+1]=Tt>>>8,this[Lt]=Tt&255,Lt+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4};function J(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe;let Ae=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt++]=Ae,Ae=Ae>>8,Tt[Mt++]=Ae,Ae=Ae>>8,Tt[Mt++]=Ae,Ae=Ae>>8,Tt[Mt++]=Ae,Mt}function lt(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt+7]=oe,oe=oe>>8,Tt[Mt+6]=oe,oe=oe>>8,Tt[Mt+5]=oe,oe=oe>>8,Tt[Mt+4]=oe;let Ae=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt+3]=Ae,Ae=Ae>>8,Tt[Mt+2]=Ae,Ae=Ae>>8,Tt[Mt+1]=Ae,Ae=Ae>>8,Tt[Mt]=Ae,Mt+8}e.prototype.writeBigUInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=0,oe=1,Ae=0;for(this[Lt]=Tt&255;++ve>0)-Ae&255;return Lt+Mt},e.prototype.writeIntBE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=Mt-1,oe=1,Ae=0;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)Tt<0&&Ae===0&&this[Lt+ve+1]!==0&&(Ae=1),this[Lt+ve]=(Tt/oe>>0)-Ae&255;return Lt+Mt},e.prototype.writeInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,127,-128),Tt<0&&(Tt=255+Tt+1),this[Lt]=Tt&255,Lt+1},e.prototype.writeInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,this[Lt+2]=Tt>>>16,this[Lt+3]=Tt>>>24,Lt+4},e.prototype.writeInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),Tt<0&&(Tt=4294967295+Tt+1),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4},e.prototype.writeBigInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yt(Tt,Lt,Mt,ee,ve,oe){if(Mt+ee>Tt.length)throw new RangeError("Index out of range");if(Mt<0)throw new RangeError("Index out of range")}function mt(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,4),c.write(Tt,Lt,Mt,ee,23,4),Mt+4}e.prototype.writeFloatLE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!0,Mt)},e.prototype.writeFloatBE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!1,Mt)};function st(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,8),c.write(Tt,Lt,Mt,ee,52,8),Mt+8}e.prototype.writeDoubleLE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!0,Mt)},e.prototype.writeDoubleBE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!1,Mt)},e.prototype.copy=function(Tt,Lt,Mt,ee){if(!e.isBuffer(Tt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!ee&&ee!==0&&(ee=this.length),Lt>=Tt.length&&(Lt=Tt.length),Lt||(Lt=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),Tt.length-Lt>>0,Mt=Mt===void 0?this.length:Mt>>>0,Tt||(Tt=0);let ve;if(typeof Tt=="number")for(ve=Lt;ve2**32?ve=rt(String(Mt)):typeof Mt=="bigint"&&(ve=String(Mt),(Mt>BigInt(2)**BigInt(32)||Mt<-(BigInt(2)**BigInt(32)))&&(ve=rt(ve)),ve+="n"),ee+=` It must be ${Lt}. Received ${ve}`,ee},RangeError);function rt(Tt){let Lt="",Mt=Tt.length,ee=Tt[0]==="-"?1:0;for(;Mt>=ee+4;Mt-=3)Lt=`_${Tt.slice(Mt-3,Mt)}${Lt}`;return`${Tt.slice(0,Mt)}${Lt}`}function at(Tt,Lt,Mt){it(Lt,"offset"),(Tt[Lt]===void 0||Tt[Lt+Mt]===void 0)&&K(Lt,Tt.length-(Mt+1))}function vt(Tt,Lt,Mt,ee,ve,oe){if(Tt>Mt||Tt= 0${Ae} and < 2${Ae} ** ${(oe+1)*8}${Ae}`:He=`>= -(2${Ae} ** ${(oe+1)*8-1}${Ae}) and < 2 ** ${(oe+1)*8-1}${Ae}`,new tt.ERR_OUT_OF_RANGE("value",He,Tt)}at(ee,ve,oe)}function it(Tt,Lt){if(typeof Tt!="number")throw new tt.ERR_INVALID_ARG_TYPE(Lt,"number",Tt)}function K(Tt,Lt,Mt){throw Math.floor(Tt)!==Tt?(it(Tt,Mt),new tt.ERR_OUT_OF_RANGE("offset","an integer",Tt)):Lt<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Lt}`,Tt)}var ft=/[^+/0-9A-Za-z-_]/g;function ut(Tt){if(Tt=Tt.split("=")[0],Tt=Tt.trim().replace(ft,""),Tt.length<2)return"";for(;Tt.length%4!==0;)Tt=Tt+"=";return Tt}function kt(Tt,Lt){Lt=Lt||1/0;let Mt,ee=Tt.length,ve=null,oe=[];for(let Ae=0;Ae55295&&Mt<57344){if(!ve){if(Mt>56319){(Lt-=3)>-1&&oe.push(239,191,189);continue}else if(Ae+1===ee){(Lt-=3)>-1&&oe.push(239,191,189);continue}ve=Mt;continue}if(Mt<56320){(Lt-=3)>-1&&oe.push(239,191,189),ve=Mt;continue}Mt=(ve-55296<<10|Mt-56320)+65536}else ve&&(Lt-=3)>-1&&oe.push(239,191,189);if(ve=null,Mt<128){if((Lt-=1)<0)break;oe.push(Mt)}else if(Mt<2048){if((Lt-=2)<0)break;oe.push(Mt>>6|192,Mt&63|128)}else if(Mt<65536){if((Lt-=3)<0)break;oe.push(Mt>>12|224,Mt>>6&63|128,Mt&63|128)}else if(Mt<1114112){if((Lt-=4)<0)break;oe.push(Mt>>18|240,Mt>>12&63|128,Mt>>6&63|128,Mt&63|128)}else throw new Error("Invalid code point")}return oe}function It(Tt){let Lt=[];for(let Mt=0;Mt>8,ve=Mt%256,oe.push(ve),oe.push(ee);return oe}function qt(Tt){return Z.toByteArray(ut(Tt))}function Wt(Tt,Lt,Mt,ee){let ve;for(ve=0;ve=Lt.length||ve>=Tt.length);++ve)Lt[ve+Mt]=Tt[ve];return ve}function Jt(Tt,Lt){return Tt instanceof Lt||Tt!=null&&Tt.constructor!=null&&Tt.constructor.name!=null&&Tt.constructor.name===Lt.name}function ge(Tt){return Tt!==Tt}var fe=function(){let Tt="0123456789abcdef",Lt=new Array(256);for(let Mt=0;Mt<16;++Mt){let ee=Mt*16;for(let ve=0;ve<16;++ve)Lt[ee+ve]=Tt[Mt]+Tt[ve]}return Lt}();function pe(Tt){return typeof BigInt>"u"?se:Tt}function se(){throw new Error("BigInt not supported")}}),ck=Dt((Q,Z)=>{Z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},g=Symbol("test"),I=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var S=42;c[g]=S;for(var t in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var e=Object.getOwnPropertySymbols(c);if(e.length!==1||e[0]!==g||!Object.prototype.propertyIsEnumerable.call(c,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(c,g);if(r.value!==S||r.enumerable!==!0)return!1}return!0}}),Xw=Dt((Q,Z)=>{var c=ck();Z.exports=function(){return c()&&!!Symbol.toStringTag}}),O7=Dt((Q,Z)=>{Z.exports=Object}),RR=Dt((Q,Z)=>{Z.exports=Error}),NR=Dt((Q,Z)=>{Z.exports=EvalError}),jR=Dt((Q,Z)=>{Z.exports=RangeError}),UR=Dt((Q,Z)=>{Z.exports=ReferenceError}),D7=Dt((Q,Z)=>{Z.exports=SyntaxError}),ab=Dt((Q,Z)=>{Z.exports=TypeError}),VR=Dt((Q,Z)=>{Z.exports=URIError}),HR=Dt((Q,Z)=>{Z.exports=Math.abs}),WR=Dt((Q,Z)=>{Z.exports=Math.floor}),qR=Dt((Q,Z)=>{Z.exports=Math.max}),$R=Dt((Q,Z)=>{Z.exports=Math.min}),ZR=Dt((Q,Z)=>{Z.exports=Math.pow}),GR=Dt((Q,Z)=>{Z.exports=Math.round}),YR=Dt((Q,Z)=>{Z.exports=Number.isNaN||function(c){return c!==c}}),KR=Dt((Q,Z)=>{var c=YR();Z.exports=function(g){return c(g)||g===0?g:g<0?-1:1}}),XR=Dt((Q,Z)=>{Z.exports=Object.getOwnPropertyDescriptor}),sx=Dt((Q,Z)=>{var c=XR();if(c)try{c([],"length")}catch{c=null}Z.exports=c}),Jw=Dt((Q,Z)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch{c=!1}Z.exports=c}),JR=Dt((Q,Z)=>{var c=typeof Symbol<"u"&&Symbol,g=ck();Z.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()}}),F7=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),B7=Dt((Q,Z)=>{var c=O7();Z.exports=c.getPrototypeOf||null}),QR=Dt((Q,Z)=>{var c="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,I=Math.max,S="[object Function]",t=function(a,n){for(var o=[],i=0;i{var c=QR();Z.exports=Function.prototype.bind||c}),hk=Dt((Q,Z)=>{Z.exports=Function.prototype.call}),R7=Dt((Q,Z)=>{Z.exports=Function.prototype.apply}),tN=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),eN=Dt((Q,Z)=>{var c=ob(),g=R7(),I=hk(),S=tN();Z.exports=S||c.call(I,g)}),rN=Dt((Q,Z)=>{var c=ob(),g=ab(),I=hk(),S=eN();Z.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new g("a function is required");return S(c,I,t)}}),nN=Dt((Q,Z)=>{var c=rN(),g=sx(),I;try{I=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var S=!!I&&g&&g(Object.prototype,"__proto__"),t=Object,e=t.getPrototypeOf;Z.exports=S&&typeof S.get=="function"?c([S.get]):typeof e=="function"?function(r){return e(r==null?r:t(r))}:!1}),iN=Dt((Q,Z)=>{var c=F7(),g=B7(),I=nN();Z.exports=c?function(S){return c(S)}:g?function(S){if(!S||typeof S!="object"&&typeof S!="function")throw new TypeError("getProto: not an object");return g(S)}:I?function(S){return I(S)}:null}),aN=Dt((Q,Z)=>{var c=Function.prototype.call,g=Object.prototype.hasOwnProperty,I=ob();Z.exports=I.call(c,g)}),fk=Dt((Q,Z)=>{var c,g=O7(),I=RR(),S=NR(),t=jR(),e=UR(),r=D7(),a=ab(),n=VR(),o=HR(),i=WR(),l=qR(),f=$R(),x=ZR(),y=GR(),v=KR(),T=Function,u=function(at){try{return T('"use strict"; return ('+at+").constructor;")()}catch{}},b=sx(),_=Jw(),P=function(){throw new a},M=b?function(){try{return arguments.callee,P}catch{try{return b(arguments,"callee").get}catch{return P}}}():P,C=JR()(),A=iN(),h=B7(),p=F7(),k=R7(),w=hk(),B={},O=typeof Uint8Array>"u"||!A?c:A(Uint8Array),j={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":B,"%AsyncGenerator%":B,"%AsyncGeneratorFunction%":B,"%AsyncIteratorPrototype%":B,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":B,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!A?c:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":t,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!A?c:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):c,"%Symbol%":C?Symbol:c,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":O,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":w,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":h,"%Math.abs%":o,"%Math.floor%":i,"%Math.max%":l,"%Math.min%":f,"%Math.pow%":x,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":p};if(A)try{null.error}catch(at){V=A(A(at)),j["%Error.prototype%"]=V}var V,H=function at(vt){var it;if(vt==="%AsyncFunction%")it=u("async function () {}");else if(vt==="%GeneratorFunction%")it=u("function* () {}");else if(vt==="%AsyncGeneratorFunction%")it=u("async function* () {}");else if(vt==="%AsyncGenerator%"){var K=at("%AsyncGeneratorFunction%");K&&(it=K.prototype)}else if(vt==="%AsyncIteratorPrototype%"){var ft=at("%AsyncGenerator%");ft&&A&&(it=A(ft.prototype))}return j[vt]=it,it},F={__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"]},U=ob(),W=aN(),q=U.call(w,Array.prototype.concat),J=U.call(k,Array.prototype.splice),lt=U.call(w,String.prototype.replace),yt=U.call(w,String.prototype.slice),mt=U.call(w,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tt=/\\(\\)?/g,pt=function(at){var vt=yt(at,0,1),it=yt(at,-1);if(vt==="%"&&it!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(it==="%"&&vt!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var K=[];return lt(at,st,function(ft,ut,kt,It){K[K.length]=kt?lt(It,tt,"$1"):ut||ft}),K},rt=function(at,vt){var it=at,K;if(W(F,it)&&(K=F[it],it="%"+K[0]+"%"),W(j,it)){var ft=j[it];if(ft===B&&(ft=H(it)),typeof ft>"u"&&!vt)throw new a("intrinsic "+at+" exists, but is not available. Please file an issue!");return{alias:K,name:it,value:ft}}throw new r("intrinsic "+at+" does not exist!")};Z.exports=function(at,vt){if(typeof at!="string"||at.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof vt!="boolean")throw new a('"allowMissing" argument must be a boolean');if(mt(/^%?[^%]*%?$/,at)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var it=pt(at),K=it.length>0?it[0]:"",ft=rt("%"+K+"%",vt),ut=ft.name,kt=ft.value,It=!1,Pt=ft.alias;Pt&&(K=Pt[0],J(it,q([0,1],Pt)));for(var qt=1,Wt=!0;qt=it.length){var pe=b(kt,Jt);Wt=!!pe,Wt&&"get"in pe&&!("originalValue"in pe.get)?kt=pe.get:kt=kt[Jt]}else Wt=W(kt,Jt),kt=kt[Jt];Wt&&!It&&(j[ut]=kt)}}return kt}}),oN=Dt((Q,Z)=>{var c=Jw(),g=D7(),I=ab(),S=sx();Z.exports=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new I("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,l=!!S&&S(t,e);if(c)c(t,e,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:r,writable:n===null&&l?l.writable:!n});else if(i||!a&&!n&&!o)t[e]=r;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),N7=Dt((Q,Z)=>{var c=Jw(),g=function(){return!!c};g.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch{return!0}},Z.exports=g}),sN=Dt((Q,Z)=>{var c=fk(),g=oN(),I=N7()(),S=sx(),t=ab(),e=c("%Math.floor%");Z.exports=function(r,a){if(typeof r!="function")throw new t("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||e(a)!==a)throw new t("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&S){var l=S(r,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(I?g(r,"length",a,!0,!0):g(r,"length",a)),r}}),Qw=Dt((Q,Z)=>{var c=ob(),g=fk(),I=sN(),S=ab(),t=g("%Function.prototype.apply%"),e=g("%Function.prototype.call%"),r=g("%Reflect.apply%",!0)||c.call(e,t),a=Jw(),n=g("%Math.max%");Z.exports=function(i){if(typeof i!="function")throw new S("a function is required");var l=r(c,e,arguments);return I(l,1+n(0,i.length-(arguments.length-1)),!0)};var o=function(){return r(c,t,arguments)};a?a(Z.exports,"apply",{value:o}):Z.exports.apply=o}),sb=Dt((Q,Z)=>{var c=fk(),g=Qw(),I=g(c("String.prototype.indexOf"));Z.exports=function(S,t){var e=c(S,!!t);return typeof e=="function"&&I(S,".prototype.")>-1?g(e):e}}),lN=Dt((Q,Z)=>{var c=Xw()(),g=sb(),I=g("Object.prototype.toString"),S=function(r){return c&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:I(r)==="[object Arguments]"},t=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&I(r)!=="[object Array]"&&I(r.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=t,Z.exports=e?S:t}),uN=Dt((Q,Z)=>{var c=Object.prototype.toString,g=Function.prototype.toString,I=/^\s*(?:function)?\*/,S=Xw()(),t=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},r;Z.exports=function(a){if(typeof a!="function")return!1;if(I.test(g.call(a)))return!0;if(!S){var n=c.call(a);return n==="[object GeneratorFunction]"}if(!t)return!1;if(typeof r>"u"){var o=e();r=o?t(o):!1}return t(a)===r}}),cN=Dt((Q,Z)=>{var c=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,S;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw S}}),S={},g(function(){throw 42},null,I)}catch(b){b!==S&&(g=null)}else g=null;var t=/^\s*class\b/,e=function(b){try{var _=c.call(b);return t.test(_)}catch{return!1}},r=function(b){try{return e(b)?!1:(c.call(b),!0)}catch{return!1}},a=Object.prototype.toString,n="[object Object]",o="[object Function]",i="[object GeneratorFunction]",l="[object HTMLAllCollection]",f="[object HTML document.all class]",x="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(u=document.all,a.call(u)===a.call(document.all)&&(T=function(b){if((v||!b)&&(typeof b>"u"||typeof b=="object"))try{var _=a.call(b);return(_===l||_===f||_===x||_===n)&&b("")==null}catch{}return!1}));var u;Z.exports=g?function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{g(b,null,I)}catch(_){if(_!==S)return!1}return!e(b)&&r(b)}:function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(y)return r(b);if(e(b))return!1;var _=a.call(b);return _!==o&&_!==i&&!/^\[object HTML/.test(_)?!1:r(b)}}),j7=Dt((Q,Z)=>{var c=cN(),g=Object.prototype.toString,I=Object.prototype.hasOwnProperty,S=function(a,n,o){for(var i=0,l=a.length;i=3&&(i=o),g.call(a)==="[object Array]"?S(a,n,i):typeof a=="string"?t(a,n,i):e(a,n,i)};Z.exports=r}),U7=Dt((Q,Z)=>{var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;Z.exports=function(){for(var I=[],S=0;S{var c=j7(),g=U7(),I=Qw(),S=sb(),t=sx(),e=S("Object.prototype.toString"),r=Xw()(),a=typeof globalThis>"u"?window:globalThis,n=g(),o=S("String.prototype.slice"),i=Object.getPrototypeOf,l=S("Array.prototype.indexOf",!0)||function(v,T){for(var u=0;u-1?T:T!=="Object"?!1:y(v)}return t?x(v):null}}),fN=Dt((Q,Z)=>{var c=j7(),g=U7(),I=sb(),S=I("Object.prototype.toString"),t=Xw()(),e=sx(),r=typeof globalThis>"u"?window:globalThis,a=g(),n=I("Array.prototype.indexOf",!0)||function(x,y){for(var v=0;v-1}return e?f(x):!1}}),V7=Dt(Q=>{var Z=lN(),c=uN(),g=hN(),I=fN();function S(Pt){return Pt.call.bind(Pt)}var t=typeof BigInt<"u",e=typeof Symbol<"u",r=S(Object.prototype.toString),a=S(Number.prototype.valueOf),n=S(String.prototype.valueOf),o=S(Boolean.prototype.valueOf);t&&(i=S(BigInt.prototype.valueOf));var i;e&&(l=S(Symbol.prototype.valueOf));var l;function f(Pt,qt){if(typeof Pt!="object")return!1;try{return qt(Pt),!0}catch{return!1}}Q.isArgumentsObject=Z,Q.isGeneratorFunction=c,Q.isTypedArray=I;function x(Pt){return typeof Promise<"u"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Q.isPromise=x;function y(Pt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):I(Pt)||J(Pt)}Q.isArrayBufferView=y;function v(Pt){return g(Pt)==="Uint8Array"}Q.isUint8Array=v;function T(Pt){return g(Pt)==="Uint8ClampedArray"}Q.isUint8ClampedArray=T;function u(Pt){return g(Pt)==="Uint16Array"}Q.isUint16Array=u;function b(Pt){return g(Pt)==="Uint32Array"}Q.isUint32Array=b;function _(Pt){return g(Pt)==="Int8Array"}Q.isInt8Array=_;function P(Pt){return g(Pt)==="Int16Array"}Q.isInt16Array=P;function M(Pt){return g(Pt)==="Int32Array"}Q.isInt32Array=M;function C(Pt){return g(Pt)==="Float32Array"}Q.isFloat32Array=C;function A(Pt){return g(Pt)==="Float64Array"}Q.isFloat64Array=A;function h(Pt){return g(Pt)==="BigInt64Array"}Q.isBigInt64Array=h;function p(Pt){return g(Pt)==="BigUint64Array"}Q.isBigUint64Array=p;function k(Pt){return r(Pt)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function w(Pt){return typeof Map>"u"?!1:k.working?k(Pt):Pt instanceof Map}Q.isMap=w;function B(Pt){return r(Pt)==="[object Set]"}B.working=typeof Set<"u"&&B(new Set);function O(Pt){return typeof Set>"u"?!1:B.working?B(Pt):Pt instanceof Set}Q.isSet=O;function j(Pt){return r(Pt)==="[object WeakMap]"}j.working=typeof WeakMap<"u"&&j(new WeakMap);function V(Pt){return typeof WeakMap>"u"?!1:j.working?j(Pt):Pt instanceof WeakMap}Q.isWeakMap=V;function H(Pt){return r(Pt)==="[object WeakSet]"}H.working=typeof WeakSet<"u"&&H(new WeakSet);function F(Pt){return H(Pt)}Q.isWeakSet=F;function U(Pt){return r(Pt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(Pt){return typeof ArrayBuffer>"u"?!1:U.working?U(Pt):Pt instanceof ArrayBuffer}Q.isArrayBuffer=W;function q(Pt){return r(Pt)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function J(Pt){return typeof DataView>"u"?!1:q.working?q(Pt):Pt instanceof DataView}Q.isDataView=J;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(Pt){return r(Pt)==="[object SharedArrayBuffer]"}function mt(Pt){return typeof lt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new lt)),yt.working?yt(Pt):Pt instanceof lt)}Q.isSharedArrayBuffer=mt;function st(Pt){return r(Pt)==="[object AsyncFunction]"}Q.isAsyncFunction=st;function tt(Pt){return r(Pt)==="[object Map Iterator]"}Q.isMapIterator=tt;function pt(Pt){return r(Pt)==="[object Set Iterator]"}Q.isSetIterator=pt;function rt(Pt){return r(Pt)==="[object Generator]"}Q.isGeneratorObject=rt;function at(Pt){return r(Pt)==="[object WebAssembly.Module]"}Q.isWebAssemblyCompiledModule=at;function vt(Pt){return f(Pt,a)}Q.isNumberObject=vt;function it(Pt){return f(Pt,n)}Q.isStringObject=it;function K(Pt){return f(Pt,o)}Q.isBooleanObject=K;function ft(Pt){return t&&f(Pt,i)}Q.isBigIntObject=ft;function ut(Pt){return e&&f(Pt,l)}Q.isSymbolObject=ut;function kt(Pt){return vt(Pt)||it(Pt)||K(Pt)||ft(Pt)||ut(Pt)}Q.isBoxedPrimitive=kt;function It(Pt){return typeof Uint8Array<"u"&&(W(Pt)||mt(Pt))}Q.isAnyArrayBuffer=It,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Q,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})}),H7=Dt((Q,Z)=>{Z.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}}),W7=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var pt=J.name?": "+J.name:"";return q.stylize("[Function"+pt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var K;return at?K=l(q,J,lt,tt,st):K=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(K,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,pt=J.length;tt-1&&(st?pt=pt.split(` `).map(function(at){return" "+at}).join(` -`).slice(2):dt=` -`+dt.split(` +`).slice(2):pt=` +`+pt.split(` `).map(function(at){return" "+at}).join(` -`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return dt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`))):pt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return pt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+pt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` `)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?lt[0]+(J===""?"":J+` `)+" "+q.join(`, - `)+" "+lt[1]:lt[0]+J+" "+q.join(", ")+" "+lt[1]}Q.types=j7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function P(q){return typeof q=="symbol"}Q.isSymbol=P;function M(q){return q===void 0}Q.isUndefined=M;function C(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=C,Q.types.isRegExp=C;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=U7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(f,x){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);x&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),y.push.apply(y,v)}return y}function g(f){for(var x=1;x0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(x){var y={data:x,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=x+y.data;return v}},{key:"concat",value:function(x){if(this.length===0)return a.alloc(0);for(var y=a.allocUnsafe(x>>>0),v=this.head,T=0;v;)l(v.data,y,T),T+=v.data.length,v=v.next;return y}},{key:"consume",value:function(x,y){var v;return xu.length?u.length:x;if(b===u.length?T+=u:T+=u.slice(0,x),x-=b,x===0){b===u.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=u.slice(b));break}++v}return this.length-=v,T}},{key:"_getBuffer",value:function(x){var y=a.allocUnsafe(x),v=this.head,T=1;for(v.data.copy(y),x-=v.data.length;v=v.next;){var u=v.data,b=x>u.length?u.length:x;if(u.copy(y,y.length-x,0,b),x-=b,x===0){b===u.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=u.slice(b));break}++T}return this.length-=T,y}},{key:i,value:function(x,y){return o(this,g({},y,{depth:0,customInspect:!1}))}}]),f}()}),H7=Dt((Q,Z)=>{function c(r,a){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(a?a(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,r)):process.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(l){!a&&l?n._writableState?n._writableState.errorEmitted?process.nextTick(I,n):(n._writableState.errorEmitted=!0,process.nextTick(g,n,l)):process.nextTick(g,n,l):a?(process.nextTick(I,n),a(l)):process.nextTick(I,n)}),this)}function g(r,a){t(r,a),I(r)}function I(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function S(){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 t(r,a){r.emit("error",a)}function e(r,a){var n=r._readableState,o=r._writableState;n&&n.autoDestroy||o&&o.autoDestroy?r.destroy(a):r.emit("error",a)}Z.exports={destroy:c,undestroy:S,errorOrDestroy:e}}),ox=Dt((Q,Z)=>{function c(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n}var g={};function I(a,n,o){o||(o=Error);function i(f,x,y){return typeof n=="string"?n:n(f,x,y)}var l=function(f){c(x,f);function x(y,v,T){return f.call(this,i(y,v,T))||this}return x}(o);l.prototype.name=o.name,l.prototype.code=a,g[a]=l}function S(a,n){if(Array.isArray(a)){var o=a.length;return a=a.map(function(i){return String(i)}),o>2?"one of ".concat(n," ").concat(a.slice(0,o-1).join(", "),", or ")+a[o-1]:o===2?"one of ".concat(n," ").concat(a[0]," or ").concat(a[1]):"of ".concat(n," ").concat(a[0])}else return"of ".concat(n," ").concat(String(a))}function t(a,n,o){return a.substr(0,n.length)===n}function e(a,n,o){return(o===void 0||o>a.length)&&(o=a.length),a.substring(o-n.length,o)===n}function r(a,n,o){return typeof o!="number"&&(o=0),o+n.length>a.length?!1:a.indexOf(n,o)!==-1}I("ERR_INVALID_OPT_VALUE",function(a,n){return'The value "'+n+'" is invalid for option "'+a+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(a,n,o){var i;typeof n=="string"&&t(n,"not ")?(i="must not be",n=n.replace(/^not /,"")):i="must be";var l;if(e(a," argument"))l="The ".concat(a," ").concat(i," ").concat(S(n,"type"));else{var f=r(a,".")?"property":"argument";l='The "'.concat(a,'" ').concat(f," ").concat(i," ").concat(S(n,"type"))}return l+=". Received type ".concat(typeof o),l},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Z.exports.codes=g}),W7=Dt((Q,Z)=>{var c=ox().codes.ERR_INVALID_OPT_VALUE;function g(S,t,e){return S.highWaterMark!=null?S.highWaterMark:t?S[e]:null}function I(S,t,e,r){var a=g(t,r,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=r?e:"highWaterMark";throw new c(n,a)}return Math.floor(a)}return S.objectMode?16:16*1024}Z.exports={getHighWaterMark:I}}),XB=Dt((Q,Z)=>{Z.exports=c;function c(I,S){if(g("noDeprecation"))return I;var t=!1;function e(){if(!t){if(g("throwDeprecation"))throw new Error(S);g("traceDeprecation")?console.trace(S):console.warn(S),t=!0}return I.apply(this,arguments)}return e}function g(I){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[I];return S==null?!1:String(S).toLowerCase()==="true"}}),q7=Dt((Q,Z)=>{Z.exports=h;function c(tt){var dt=this;this.next=null,this.entry=null,this.finish=function(){st(dt,tt)}}var g;h.WritableState=C;var I={deprecate:XB()},S=P7(),t=ix().Buffer,e=window.Uint8Array||function(){};function r(tt){return t.from(tt)}function a(tt){return t.isBuffer(tt)||tt instanceof e}var n=H7(),o=W7(),i=o.getHighWaterMark,l=ox().codes,f=l.ERR_INVALID_ARG_TYPE,x=l.ERR_METHOD_NOT_IMPLEMENTED,y=l.ERR_MULTIPLE_CALLBACK,v=l.ERR_STREAM_CANNOT_PIPE,T=l.ERR_STREAM_DESTROYED,u=l.ERR_STREAM_NULL_VALUES,b=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,P=n.errorOrDestroy;_v()(h,S);function M(){}function C(tt,dt,rt){g=g||sx(),tt=tt||{},typeof rt!="boolean"&&(rt=dt instanceof g),this.objectMode=!!tt.objectMode,rt&&(this.objectMode=this.objectMode||!!tt.writableObjectMode),this.highWaterMark=i(this,tt,"writableHighWaterMark",rt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var at=tt.decodeStrings===!1;this.decodeStrings=!at,this.defaultEncoding=tt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){H(dt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}C.prototype.getBuffer=function(){for(var tt=this.bufferedRequest,dt=[];tt;)dt.push(tt),tt=tt.next;return dt},function(){try{Object.defineProperty(C.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(tt){return A.call(this,tt)?!0:this!==h?!1:tt&&tt._writableState instanceof C}})):A=function(tt){return tt instanceof this};function h(tt){g=g||sx();var dt=this instanceof g;if(!dt&&!A.call(h,this))return new h(tt);this._writableState=new C(tt,this,dt),this.writable=!0,tt&&(typeof tt.write=="function"&&(this._write=tt.write),typeof tt.writev=="function"&&(this._writev=tt.writev),typeof tt.destroy=="function"&&(this._destroy=tt.destroy),typeof tt.final=="function"&&(this._final=tt.final)),S.call(this)}h.prototype.pipe=function(){P(this,new v)};function p(tt,dt){var rt=new b;P(tt,rt),process.nextTick(dt,rt)}function k(tt,dt,rt,at){var vt;return rt===null?vt=new u:typeof rt!="string"&&!dt.objectMode&&(vt=new f("chunk",["string","Buffer"],rt)),vt?(P(tt,vt),process.nextTick(at,vt),!1):!0}h.prototype.write=function(tt,dt,rt){var at=this._writableState,vt=!1,it=!at.objectMode&&a(tt);return it&&!t.isBuffer(tt)&&(tt=r(tt)),typeof dt=="function"&&(rt=dt,dt=null),it?dt="buffer":dt||(dt=at.defaultEncoding),typeof rt!="function"&&(rt=M),at.ending?p(this,rt):(it||k(this,at,tt,rt))&&(at.pendingcb++,vt=R(this,at,it,tt,dt,rt)),vt},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var tt=this._writableState;tt.corked&&(tt.corked--,!tt.writing&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&W(this,tt))},h.prototype.setDefaultEncoding=function(tt){if(typeof tt=="string"&&(tt=tt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((tt+"").toLowerCase())>-1))throw new _(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function w(tt,dt,rt){return!tt.objectMode&&tt.decodeStrings!==!1&&typeof dt=="string"&&(dt=t.from(dt,rt)),dt}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(tt,dt,rt,at,vt,it){if(!rt){var Y=w(dt,at,vt);at!==Y&&(rt=!0,vt="buffer",at=Y)}var ft=dt.objectMode?1:at.length;dt.length+=ft;var ut=dt.length{var c=Object.keys||function(o){var i=[];for(var l in o)i.push(l);return i};Z.exports=r;var g=Z7(),I=q7();for(_v()(r,g),S=c(I.prototype),e=0;e{var c=ix(),g=c.Buffer;function I(t,e){for(var r in t)e[r]=t[r]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Z.exports=c:(I(c,Q),Q.Buffer=S);function S(t,e,r){return g(t,e,r)}S.prototype=Object.create(g.prototype),I(g,S),S.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return g(t,e,r)},S.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var a=g(t);return e!==void 0?typeof r=="string"?a.fill(e,r):a.fill(e):a.fill(0),a},S.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return g(t)},S.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}),$7=Dt(Q=>{var Z=JB().Buffer,c=Z.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(T){if(!T)return"utf8";for(var u;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(u)return;T=(""+T).toLowerCase(),u=!0}}function I(T){var u=g(T);if(typeof u!="string"&&(Z.isEncoding===c||!c(T)))throw new Error("Unknown encoding: "+T);return u||T}Q.StringDecoder=S;function S(T){this.encoding=I(T);var u;switch(this.encoding){case"utf16le":this.text=i,this.end=l,u=4;break;case"utf8":this.fillLast=a,u=4;break;case"base64":this.text=f,this.end=x,u=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Z.allocUnsafe(u)}S.prototype.write=function(T){if(T.length===0)return"";var u,b;if(this.lastNeed){if(u=this.fillLast(T),u===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function e(T,u,b){var _=u.length-1;if(_=0?(P>0&&(T.lastNeed=P-1),P):--_=0?(P>0&&(T.lastNeed=P-2),P):--_=0?(P>0&&(P===2?P=0:T.lastNeed=P-3),P):0))}function r(T,u,b){if((u[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return T.lastNeed=2,"�"}}function a(T){var u=this.lastTotal-this.lastNeed,b=r(this,T);if(b!==void 0)return b;if(this.lastNeed<=T.length)return T.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,u,0,T.length),this.lastNeed-=T.length}function n(T,u){var b=e(this,T,u);if(!this.lastNeed)return T.toString("utf8",u);this.lastTotal=b;var _=T.length-(b-this.lastNeed);return T.copy(this.lastChar,0,_),T.toString("utf8",u,_)}function o(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+"�":u}function i(T,u){if((T.length-u)%2===0){var b=T.toString("utf16le",u);if(b){var _=b.charCodeAt(b.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",u,T.length-1)}function l(T){var u=T&&T.length?this.write(T):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,b)}return u}function f(T,u){var b=(T.length-u)%3;return b===0?T.toString("base64",u):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",u,T.length-b))}function x(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function y(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}),fk=Dt((Q,Z)=>{var c=ox().codes.ERR_STREAM_PREMATURE_CLOSE;function g(e){var r=!1;return function(){if(!r){r=!0;for(var a=arguments.length,n=new Array(a),o=0;o{var c;function g(u,b,_){return b in u?Object.defineProperty(u,b,{value:_,enumerable:!0,configurable:!0,writable:!0}):u[b]=_,u}var I=fk(),S=Symbol("lastResolve"),t=Symbol("lastReject"),e=Symbol("error"),r=Symbol("ended"),a=Symbol("lastPromise"),n=Symbol("handlePromise"),o=Symbol("stream");function i(u,b){return{value:u,done:b}}function l(u){var b=u[S];if(b!==null){var _=u[o].read();_!==null&&(u[a]=null,u[S]=null,u[t]=null,b(i(_,!1)))}}function f(u){process.nextTick(l,u)}function x(u,b){return function(_,P){u.then(function(){if(b[r]){_(i(void 0,!0));return}b[n](_,P)},P)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((c={get stream(){return this[o]},next:function(){var u=this,b=this[e];if(b!==null)return Promise.reject(b);if(this[r])return Promise.resolve(i(void 0,!0));if(this[o].destroyed)return new Promise(function(C,A){process.nextTick(function(){u[e]?A(u[e]):C(i(void 0,!0))})});var _=this[a],P;if(_)P=new Promise(x(_,this));else{var M=this[o].read();if(M!==null)return Promise.resolve(i(M,!1));P=new Promise(this[n])}return this[a]=P,P}},g(c,Symbol.asyncIterator,function(){return this}),g(c,"return",function(){var u=this;return new Promise(function(b,_){u[o].destroy(null,function(P){if(P){_(P);return}b(i(void 0,!0))})})}),c),y),T=function(u){var b,_=Object.create(v,(b={},g(b,o,{value:u,writable:!0}),g(b,S,{value:null,writable:!0}),g(b,t,{value:null,writable:!0}),g(b,e,{value:null,writable:!0}),g(b,r,{value:u._readableState.endEmitted,writable:!0}),g(b,n,{value:function(P,M){var C=_[o].read();C?(_[a]=null,_[S]=null,_[t]=null,P(i(C,!1))):(_[S]=P,_[t]=M)},writable:!0}),b));return _[a]=null,I(u,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=_[t];M!==null&&(_[a]=null,_[S]=null,_[t]=null,M(P)),_[e]=P;return}var C=_[S];C!==null&&(_[a]=null,_[S]=null,_[t]=null,C(i(void 0,!0))),_[r]=!0}),u.on("readable",f.bind(null,_)),_};Z.exports=T}),tN=Dt((Q,Z)=>{Z.exports=function(){throw new Error("Readable.from is not available in the browser")}}),Z7=Dt((Q,Z)=>{Z.exports=p;var c;p.ReadableState=h,Rm().EventEmitter;var g=function(it,Y){return it.listeners(Y).length},I=P7(),S=ix().Buffer,t=window.Uint8Array||function(){};function e(it){return S.from(it)}function r(it){return S.isBuffer(it)||it instanceof t}var a=V7(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var o=KB(),i=H7(),l=W7(),f=l.getHighWaterMark,x=ox().codes,y=x.ERR_INVALID_ARG_TYPE,v=x.ERR_STREAM_PUSH_AFTER_EOF,T=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,_,P;_v()(p,I);var M=i.errorOrDestroy,C=["error","close","destroy","pause","resume"];function A(it,Y,ft){if(typeof it.prependListener=="function")return it.prependListener(Y,ft);!it._events||!it._events[Y]?it.on(Y,ft):Array.isArray(it._events[Y])?it._events[Y].unshift(ft):it._events[Y]=[ft,it._events[Y]]}function h(it,Y,ft){c=c||sx(),it=it||{},typeof ft!="boolean"&&(ft=Y instanceof c),this.objectMode=!!it.objectMode,ft&&(this.objectMode=this.objectMode||!!it.readableObjectMode),this.highWaterMark=f(this,it,"readableHighWaterMark",ft),this.buffer=new o,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=it.emitClose!==!1,this.autoDestroy=!!it.autoDestroy,this.destroyed=!1,this.defaultEncoding=it.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,it.encoding&&(b||(b=$7().StringDecoder),this.decoder=new b(it.encoding),this.encoding=it.encoding)}function p(it){if(c=c||sx(),!(this instanceof p))return new p(it);var Y=this instanceof c;this._readableState=new h(it,this,Y),this.readable=!0,it&&(typeof it.read=="function"&&(this._read=it.read),typeof it.destroy=="function"&&(this._destroy=it.destroy)),I.call(this)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(it){this._readableState&&(this._readableState.destroyed=it)}}),p.prototype.destroy=i.destroy,p.prototype._undestroy=i.undestroy,p.prototype._destroy=function(it,Y){Y(it)},p.prototype.push=function(it,Y){var ft=this._readableState,ut;return ft.objectMode?ut=!0:typeof it=="string"&&(Y=Y||ft.defaultEncoding,Y!==ft.encoding&&(it=S.from(it,Y),Y=""),ut=!0),k(this,it,Y,!1,ut)},p.prototype.unshift=function(it){return k(this,it,null,!0,!1)};function k(it,Y,ft,ut,kt){n("readableAddChunk",Y);var It=it._readableState;if(Y===null)It.reading=!1,H(it,It);else{var Pt;if(kt||(Pt=R(It,Y)),Pt)M(it,Pt);else if(It.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!It.objectMode&&Object.getPrototypeOf(Y)!==S.prototype&&(Y=e(Y)),ut)It.endEmitted?M(it,new u):w(it,It,Y,!0);else if(It.ended)M(it,new v);else{if(It.destroyed)return!1;It.reading=!1,It.decoder&&!ft?(Y=It.decoder.write(Y),It.objectMode||Y.length!==0?w(it,It,Y,!1):W(it,It)):w(it,It,Y,!1)}else ut||(It.reading=!1,W(it,It))}return!It.ended&&(It.length=O?it=O:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}function V(it,Y){return it<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:it!==it?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(it>Y.highWaterMark&&(Y.highWaterMark=j(it)),it<=Y.length?it:Y.ended?Y.length:(Y.needReadable=!0,0))}p.prototype.read=function(it){n("read",it),it=parseInt(it,10);var Y=this._readableState,ft=it;if(it!==0&&(Y.emittedReadable=!1),it===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return n("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?rt(this):F(this),null;if(it=V(it,Y),it===0&&Y.ended)return Y.length===0&&rt(this),null;var ut=Y.needReadable;n("need readable",ut),(Y.length===0||Y.length-it0?kt=dt(it,Y):kt=null,kt===null?(Y.needReadable=Y.length<=Y.highWaterMark,it=0):(Y.length-=it,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ft!==it&&Y.ended&&rt(this)),kt!==null&&this.emit("data",kt),kt};function H(it,Y){if(n("onEofChunk"),!Y.ended){if(Y.decoder){var ft=Y.decoder.end();ft&&ft.length&&(Y.buffer.push(ft),Y.length+=Y.objectMode?1:ft.length)}Y.ended=!0,Y.sync?F(it):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,U(it)))}}function F(it){var Y=it._readableState;n("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(n("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(U,it))}function U(it){var Y=it._readableState;n("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(it.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,tt(it)}function W(it,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(q,it,Y))}function q(it,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&vt(ut.pipes,it)!==-1)&&!Jt&&(n("false write response, pause",ut.awaitDrain),ut.awaitDrain++),ft.pause())}function pe(Mt){n("onerror",Mt),Lt(),it.removeListener("error",pe),g(it,"error")===0&&M(it,Mt)}A(it,"error",pe);function se(){it.removeListener("finish",Tt),Lt()}it.once("close",se);function Tt(){n("onfinish"),it.removeListener("close",se),Lt()}it.once("finish",Tt);function Lt(){n("unpipe"),ft.unpipe(it)}return it.emit("pipe",ft),ut.flowing||(n("pipe resume"),ft.resume()),it};function J(it){return function(){var Y=it._readableState;n("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&g(it,"data")&&(Y.flowing=!0,tt(it))}}p.prototype.unpipe=function(it){var Y=this._readableState,ft={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return it&&it!==Y.pipes?this:(it||(it=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,it&&it.emit("unpipe",this,ft),this);if(!it){var ut=Y.pipes,kt=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var It=0;It0,ut.flowing!==!1&&this.resume()):it==="readable"&&!ut.endEmitted&&!ut.readableListening&&(ut.readableListening=ut.needReadable=!0,ut.flowing=!1,ut.emittedReadable=!1,n("on readable",ut.length,ut.reading),ut.length?F(this):ut.reading||process.nextTick(yt,this)),ft},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(it,Y){var ft=I.prototype.removeListener.call(this,it,Y);return it==="readable"&&process.nextTick(lt,this),ft},p.prototype.removeAllListeners=function(it){var Y=I.prototype.removeAllListeners.apply(this,arguments);return(it==="readable"||it===void 0)&&process.nextTick(lt,this),Y};function lt(it){var Y=it._readableState;Y.readableListening=it.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:it.listenerCount("data")>0&&it.resume()}function yt(it){n("readable nexttick read 0"),it.read(0)}p.prototype.resume=function(){var it=this._readableState;return it.flowing||(n("resume"),it.flowing=!it.readableListening,mt(this,it)),it.paused=!1,this};function mt(it,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(st,it,Y))}function st(it,Y){n("resume",Y.reading),Y.reading||it.read(0),Y.resumeScheduled=!1,it.emit("resume"),tt(it),Y.flowing&&!Y.reading&&it.read(0)}p.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function tt(it){var Y=it._readableState;for(n("flow",Y.flowing);Y.flowing&&it.read()!==null;);}p.prototype.wrap=function(it){var Y=this,ft=this._readableState,ut=!1;it.on("end",function(){if(n("wrapped end"),ft.decoder&&!ft.ended){var Pt=ft.decoder.end();Pt&&Pt.length&&Y.push(Pt)}Y.push(null)}),it.on("data",function(Pt){if(n("wrapped data"),ft.decoder&&(Pt=ft.decoder.write(Pt)),!(ft.objectMode&&Pt==null)&&!(!ft.objectMode&&(!Pt||!Pt.length))){var qt=Y.push(Pt);qt||(ut=!0,it.pause())}});for(var kt in it)this[kt]===void 0&&typeof it[kt]=="function"&&(this[kt]=function(Pt){return function(){return it[Pt].apply(it,arguments)}}(kt));for(var It=0;It=Y.length?(Y.decoder?ft=Y.buffer.join(""):Y.buffer.length===1?ft=Y.buffer.first():ft=Y.buffer.concat(Y.length),Y.buffer.clear()):ft=Y.buffer.consume(it,Y.decoder),ft}function rt(it){var Y=it._readableState;n("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(at,Y,it))}function at(it,Y){if(n("endReadableNT",it.endEmitted,it.length),!it.endEmitted&&it.length===0&&(it.endEmitted=!0,Y.readable=!1,Y.emit("end"),it.autoDestroy)){var ft=Y._writableState;(!ft||ft.autoDestroy&&ft.finished)&&Y.destroy()}}typeof Symbol=="function"&&(p.from=function(it,Y){return P===void 0&&(P=tN()),P(p,it,Y)});function vt(it,Y){for(var ft=0,ut=it.length;ft{Z.exports=a;var c=ox().codes,g=c.ERR_METHOD_NOT_IMPLEMENTED,I=c.ERR_MULTIPLE_CALLBACK,S=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=sx();_v()(a,e);function r(i,l){var f=this._transformState;f.transforming=!1;var x=f.writecb;if(x===null)return this.emit("error",new I);f.writechunk=null,f.writecb=null,l!=null&&this.push(l),x(i);var y=this._readableState;y.reading=!1,(y.needReadable||y.length{Z.exports=g;var c=G7();_v()(g,c);function g(I){if(!(this instanceof g))return new g(I);c.call(this,I)}g.prototype._transform=function(I,S,t){t(null,I)}}),rN=Dt((Q,Z)=>{var c;function g(f){var x=!1;return function(){x||(x=!0,f.apply(void 0,arguments))}}var I=ox().codes,S=I.ERR_MISSING_ARGS,t=I.ERR_STREAM_DESTROYED;function e(f){if(f)throw f}function r(f){return f.setHeader&&typeof f.abort=="function"}function a(f,x,y,v){v=g(v);var T=!1;f.on("close",function(){T=!0}),c===void 0&&(c=fk()),c(f,{readable:x,writable:y},function(b){if(b)return v(b);T=!0,v()});var u=!1;return function(b){if(!T&&!u){if(u=!0,r(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();v(b||new t("pipe"))}}}function n(f){f()}function o(f,x){return f.pipe(x)}function i(f){return!f.length||typeof f[f.length-1]!="function"?e:f.pop()}function l(){for(var f=arguments.length,x=new Array(f),y=0;y0;return a(b,P,M,function(C){T||(T=C),C&&u.forEach(n),!P&&(u.forEach(n),v(T))})});return x.reduce(o)}Z.exports=l}),nN=Dt((Q,Z)=>{Z.exports=I;var c=Rm().EventEmitter,g=_v();g(I,c),I.Readable=Z7(),I.Writable=q7(),I.Duplex=sx(),I.Transform=G7(),I.PassThrough=eN(),I.finished=fk(),I.pipeline=rN(),I.Stream=I;function I(){c.call(this)}I.prototype.pipe=function(S,t){var e=this;function r(x){S.writable&&S.write(x)===!1&&e.pause&&e.pause()}e.on("data",r);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",i));var n=!1;function o(){n||(n=!0,S.end())}function i(){n||(n=!0,typeof S.destroy=="function"&&S.destroy())}function l(x){if(f(),c.listenerCount(this,"error")===0)throw x}e.on("error",l),S.on("error",l);function f(){e.removeListener("data",r),S.removeListener("drain",a),e.removeListener("end",o),e.removeListener("close",i),e.removeListener("error",l),S.removeListener("error",l),e.removeListener("end",f),e.removeListener("close",f),S.removeListener("close",f)}return e.on("end",f),e.on("close",f),S.on("close",f),S.emit("pipe",e),S}}),sb=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var dt=J.name?": "+J.name:"";return q.stylize("[Function"+dt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var Y;return at?Y=l(q,J,lt,tt,st):Y=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,dt=J.length;tt-1&&(st?dt=dt.split(` + `)+" "+lt[1]:lt[0]+J+" "+q.join(", ")+" "+lt[1]}Q.types=V7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function P(q){return typeof q=="symbol"}Q.isSymbol=P;function M(q){return q===void 0}Q.isUndefined=M;function C(q){return A(q)&&B(q)==="[object RegExp]"}Q.isRegExp=C,Q.types.isRegExp=C;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&B(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(B(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=H7();function B(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=wv(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(pt,rt){lt=pt,yt=rt}),st=[],tt=0;tt{function c(f,x){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);x&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),y.push.apply(y,v)}return y}function g(f){for(var x=1;x0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(x){var y={data:x,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=x+y.data;return v}},{key:"concat",value:function(x){if(this.length===0)return a.alloc(0);for(var y=a.allocUnsafe(x>>>0),v=this.head,T=0;v;)l(v.data,y,T),T+=v.data.length,v=v.next;return y}},{key:"consume",value:function(x,y){var v;return xu.length?u.length:x;if(b===u.length?T+=u:T+=u.slice(0,x),x-=b,x===0){b===u.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=u.slice(b));break}++v}return this.length-=v,T}},{key:"_getBuffer",value:function(x){var y=a.allocUnsafe(x),v=this.head,T=1;for(v.data.copy(y),x-=v.data.length;v=v.next;){var u=v.data,b=x>u.length?u.length:x;if(u.copy(y,y.length-x,0,b),x-=b,x===0){b===u.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=u.slice(b));break}++T}return this.length-=T,y}},{key:i,value:function(x,y){return o(this,g({},y,{depth:0,customInspect:!1}))}}]),f}()}),q7=Dt((Q,Z)=>{function c(r,a){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(a?a(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,r)):process.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(l){!a&&l?n._writableState?n._writableState.errorEmitted?process.nextTick(I,n):(n._writableState.errorEmitted=!0,process.nextTick(g,n,l)):process.nextTick(g,n,l):a?(process.nextTick(I,n),a(l)):process.nextTick(I,n)}),this)}function g(r,a){t(r,a),I(r)}function I(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function S(){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 t(r,a){r.emit("error",a)}function e(r,a){var n=r._readableState,o=r._writableState;n&&n.autoDestroy||o&&o.autoDestroy?r.destroy(a):r.emit("error",a)}Z.exports={destroy:c,undestroy:S,errorOrDestroy:e}}),lx=Dt((Q,Z)=>{function c(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n}var g={};function I(a,n,o){o||(o=Error);function i(f,x,y){return typeof n=="string"?n:n(f,x,y)}var l=function(f){c(x,f);function x(y,v,T){return f.call(this,i(y,v,T))||this}return x}(o);l.prototype.name=o.name,l.prototype.code=a,g[a]=l}function S(a,n){if(Array.isArray(a)){var o=a.length;return a=a.map(function(i){return String(i)}),o>2?"one of ".concat(n," ").concat(a.slice(0,o-1).join(", "),", or ")+a[o-1]:o===2?"one of ".concat(n," ").concat(a[0]," or ").concat(a[1]):"of ".concat(n," ").concat(a[0])}else return"of ".concat(n," ").concat(String(a))}function t(a,n,o){return a.substr(0,n.length)===n}function e(a,n,o){return(o===void 0||o>a.length)&&(o=a.length),a.substring(o-n.length,o)===n}function r(a,n,o){return typeof o!="number"&&(o=0),o+n.length>a.length?!1:a.indexOf(n,o)!==-1}I("ERR_INVALID_OPT_VALUE",function(a,n){return'The value "'+n+'" is invalid for option "'+a+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(a,n,o){var i;typeof n=="string"&&t(n,"not ")?(i="must not be",n=n.replace(/^not /,"")):i="must be";var l;if(e(a," argument"))l="The ".concat(a," ").concat(i," ").concat(S(n,"type"));else{var f=r(a,".")?"property":"argument";l='The "'.concat(a,'" ').concat(f," ").concat(i," ").concat(S(n,"type"))}return l+=". Received type ".concat(typeof o),l},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Z.exports.codes=g}),$7=Dt((Q,Z)=>{var c=lx().codes.ERR_INVALID_OPT_VALUE;function g(S,t,e){return S.highWaterMark!=null?S.highWaterMark:t?S[e]:null}function I(S,t,e,r){var a=g(t,r,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=r?e:"highWaterMark";throw new c(n,a)}return Math.floor(a)}return S.objectMode?16:16*1024}Z.exports={getHighWaterMark:I}}),pN=Dt((Q,Z)=>{Z.exports=c;function c(I,S){if(g("noDeprecation"))return I;var t=!1;function e(){if(!t){if(g("throwDeprecation"))throw new Error(S);g("traceDeprecation")?console.trace(S):console.warn(S),t=!0}return I.apply(this,arguments)}return e}function g(I){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[I];return S==null?!1:String(S).toLowerCase()==="true"}}),Z7=Dt((Q,Z)=>{Z.exports=h;function c(tt){var pt=this;this.next=null,this.entry=null,this.finish=function(){st(pt,tt)}}var g;h.WritableState=C;var I={deprecate:pN()},S=z7(),t=ox().Buffer,e=window.Uint8Array||function(){};function r(tt){return t.from(tt)}function a(tt){return t.isBuffer(tt)||tt instanceof e}var n=q7(),o=$7(),i=o.getHighWaterMark,l=lx().codes,f=l.ERR_INVALID_ARG_TYPE,x=l.ERR_METHOD_NOT_IMPLEMENTED,y=l.ERR_MULTIPLE_CALLBACK,v=l.ERR_STREAM_CANNOT_PIPE,T=l.ERR_STREAM_DESTROYED,u=l.ERR_STREAM_NULL_VALUES,b=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,P=n.errorOrDestroy;wv()(h,S);function M(){}function C(tt,pt,rt){g=g||ux(),tt=tt||{},typeof rt!="boolean"&&(rt=pt instanceof g),this.objectMode=!!tt.objectMode,rt&&(this.objectMode=this.objectMode||!!tt.writableObjectMode),this.highWaterMark=i(this,tt,"writableHighWaterMark",rt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var at=tt.decodeStrings===!1;this.decodeStrings=!at,this.defaultEncoding=tt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){H(pt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}C.prototype.getBuffer=function(){for(var tt=this.bufferedRequest,pt=[];tt;)pt.push(tt),tt=tt.next;return pt},function(){try{Object.defineProperty(C.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(tt){return A.call(this,tt)?!0:this!==h?!1:tt&&tt._writableState instanceof C}})):A=function(tt){return tt instanceof this};function h(tt){g=g||ux();var pt=this instanceof g;if(!pt&&!A.call(h,this))return new h(tt);this._writableState=new C(tt,this,pt),this.writable=!0,tt&&(typeof tt.write=="function"&&(this._write=tt.write),typeof tt.writev=="function"&&(this._writev=tt.writev),typeof tt.destroy=="function"&&(this._destroy=tt.destroy),typeof tt.final=="function"&&(this._final=tt.final)),S.call(this)}h.prototype.pipe=function(){P(this,new v)};function p(tt,pt){var rt=new b;P(tt,rt),process.nextTick(pt,rt)}function k(tt,pt,rt,at){var vt;return rt===null?vt=new u:typeof rt!="string"&&!pt.objectMode&&(vt=new f("chunk",["string","Buffer"],rt)),vt?(P(tt,vt),process.nextTick(at,vt),!1):!0}h.prototype.write=function(tt,pt,rt){var at=this._writableState,vt=!1,it=!at.objectMode&&a(tt);return it&&!t.isBuffer(tt)&&(tt=r(tt)),typeof pt=="function"&&(rt=pt,pt=null),it?pt="buffer":pt||(pt=at.defaultEncoding),typeof rt!="function"&&(rt=M),at.ending?p(this,rt):(it||k(this,at,tt,rt))&&(at.pendingcb++,vt=B(this,at,it,tt,pt,rt)),vt},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var tt=this._writableState;tt.corked&&(tt.corked--,!tt.writing&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&W(this,tt))},h.prototype.setDefaultEncoding=function(tt){if(typeof tt=="string"&&(tt=tt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((tt+"").toLowerCase())>-1))throw new _(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function w(tt,pt,rt){return!tt.objectMode&&tt.decodeStrings!==!1&&typeof pt=="string"&&(pt=t.from(pt,rt)),pt}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function B(tt,pt,rt,at,vt,it){if(!rt){var K=w(pt,at,vt);at!==K&&(rt=!0,vt="buffer",at=K)}var ft=pt.objectMode?1:at.length;pt.length+=ft;var ut=pt.length{var c=Object.keys||function(o){var i=[];for(var l in o)i.push(l);return i};Z.exports=r;var g=Y7(),I=Z7();for(wv()(r,g),S=c(I.prototype),e=0;e{var c=ox(),g=c.Buffer;function I(t,e){for(var r in t)e[r]=t[r]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Z.exports=c:(I(c,Q),Q.Buffer=S);function S(t,e,r){return g(t,e,r)}S.prototype=Object.create(g.prototype),I(g,S),S.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return g(t,e,r)},S.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var a=g(t);return e!==void 0?typeof r=="string"?a.fill(e,r):a.fill(e):a.fill(0),a},S.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return g(t)},S.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}),G7=Dt(Q=>{var Z=mN().Buffer,c=Z.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(T){if(!T)return"utf8";for(var u;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(u)return;T=(""+T).toLowerCase(),u=!0}}function I(T){var u=g(T);if(typeof u!="string"&&(Z.isEncoding===c||!c(T)))throw new Error("Unknown encoding: "+T);return u||T}Q.StringDecoder=S;function S(T){this.encoding=I(T);var u;switch(this.encoding){case"utf16le":this.text=i,this.end=l,u=4;break;case"utf8":this.fillLast=a,u=4;break;case"base64":this.text=f,this.end=x,u=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Z.allocUnsafe(u)}S.prototype.write=function(T){if(T.length===0)return"";var u,b;if(this.lastNeed){if(u=this.fillLast(T),u===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function e(T,u,b){var _=u.length-1;if(_=0?(P>0&&(T.lastNeed=P-1),P):--_=0?(P>0&&(T.lastNeed=P-2),P):--_=0?(P>0&&(P===2?P=0:T.lastNeed=P-3),P):0))}function r(T,u,b){if((u[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return T.lastNeed=2,"�"}}function a(T){var u=this.lastTotal-this.lastNeed,b=r(this,T);if(b!==void 0)return b;if(this.lastNeed<=T.length)return T.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,u,0,T.length),this.lastNeed-=T.length}function n(T,u){var b=e(this,T,u);if(!this.lastNeed)return T.toString("utf8",u);this.lastTotal=b;var _=T.length-(b-this.lastNeed);return T.copy(this.lastChar,0,_),T.toString("utf8",u,_)}function o(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+"�":u}function i(T,u){if((T.length-u)%2===0){var b=T.toString("utf16le",u);if(b){var _=b.charCodeAt(b.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",u,T.length-1)}function l(T){var u=T&&T.length?this.write(T):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,b)}return u}function f(T,u){var b=(T.length-u)%3;return b===0?T.toString("base64",u):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",u,T.length-b))}function x(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function y(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}),dk=Dt((Q,Z)=>{var c=lx().codes.ERR_STREAM_PREMATURE_CLOSE;function g(e){var r=!1;return function(){if(!r){r=!0;for(var a=arguments.length,n=new Array(a),o=0;o{var c;function g(u,b,_){return b in u?Object.defineProperty(u,b,{value:_,enumerable:!0,configurable:!0,writable:!0}):u[b]=_,u}var I=dk(),S=Symbol("lastResolve"),t=Symbol("lastReject"),e=Symbol("error"),r=Symbol("ended"),a=Symbol("lastPromise"),n=Symbol("handlePromise"),o=Symbol("stream");function i(u,b){return{value:u,done:b}}function l(u){var b=u[S];if(b!==null){var _=u[o].read();_!==null&&(u[a]=null,u[S]=null,u[t]=null,b(i(_,!1)))}}function f(u){process.nextTick(l,u)}function x(u,b){return function(_,P){u.then(function(){if(b[r]){_(i(void 0,!0));return}b[n](_,P)},P)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((c={get stream(){return this[o]},next:function(){var u=this,b=this[e];if(b!==null)return Promise.reject(b);if(this[r])return Promise.resolve(i(void 0,!0));if(this[o].destroyed)return new Promise(function(C,A){process.nextTick(function(){u[e]?A(u[e]):C(i(void 0,!0))})});var _=this[a],P;if(_)P=new Promise(x(_,this));else{var M=this[o].read();if(M!==null)return Promise.resolve(i(M,!1));P=new Promise(this[n])}return this[a]=P,P}},g(c,Symbol.asyncIterator,function(){return this}),g(c,"return",function(){var u=this;return new Promise(function(b,_){u[o].destroy(null,function(P){if(P){_(P);return}b(i(void 0,!0))})})}),c),y),T=function(u){var b,_=Object.create(v,(b={},g(b,o,{value:u,writable:!0}),g(b,S,{value:null,writable:!0}),g(b,t,{value:null,writable:!0}),g(b,e,{value:null,writable:!0}),g(b,r,{value:u._readableState.endEmitted,writable:!0}),g(b,n,{value:function(P,M){var C=_[o].read();C?(_[a]=null,_[S]=null,_[t]=null,P(i(C,!1))):(_[S]=P,_[t]=M)},writable:!0}),b));return _[a]=null,I(u,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=_[t];M!==null&&(_[a]=null,_[S]=null,_[t]=null,M(P)),_[e]=P;return}var C=_[S];C!==null&&(_[a]=null,_[S]=null,_[t]=null,C(i(void 0,!0))),_[r]=!0}),u.on("readable",f.bind(null,_)),_};Z.exports=T}),vN=Dt((Q,Z)=>{Z.exports=function(){throw new Error("Readable.from is not available in the browser")}}),Y7=Dt((Q,Z)=>{Z.exports=p;var c;p.ReadableState=h,Rm().EventEmitter;var g=function(it,K){return it.listeners(K).length},I=z7(),S=ox().Buffer,t=window.Uint8Array||function(){};function e(it){return S.from(it)}function r(it){return S.isBuffer(it)||it instanceof t}var a=W7(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var o=dN(),i=q7(),l=$7(),f=l.getHighWaterMark,x=lx().codes,y=x.ERR_INVALID_ARG_TYPE,v=x.ERR_STREAM_PUSH_AFTER_EOF,T=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,_,P;wv()(p,I);var M=i.errorOrDestroy,C=["error","close","destroy","pause","resume"];function A(it,K,ft){if(typeof it.prependListener=="function")return it.prependListener(K,ft);!it._events||!it._events[K]?it.on(K,ft):Array.isArray(it._events[K])?it._events[K].unshift(ft):it._events[K]=[ft,it._events[K]]}function h(it,K,ft){c=c||ux(),it=it||{},typeof ft!="boolean"&&(ft=K instanceof c),this.objectMode=!!it.objectMode,ft&&(this.objectMode=this.objectMode||!!it.readableObjectMode),this.highWaterMark=f(this,it,"readableHighWaterMark",ft),this.buffer=new o,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=it.emitClose!==!1,this.autoDestroy=!!it.autoDestroy,this.destroyed=!1,this.defaultEncoding=it.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,it.encoding&&(b||(b=G7().StringDecoder),this.decoder=new b(it.encoding),this.encoding=it.encoding)}function p(it){if(c=c||ux(),!(this instanceof p))return new p(it);var K=this instanceof c;this._readableState=new h(it,this,K),this.readable=!0,it&&(typeof it.read=="function"&&(this._read=it.read),typeof it.destroy=="function"&&(this._destroy=it.destroy)),I.call(this)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(it){this._readableState&&(this._readableState.destroyed=it)}}),p.prototype.destroy=i.destroy,p.prototype._undestroy=i.undestroy,p.prototype._destroy=function(it,K){K(it)},p.prototype.push=function(it,K){var ft=this._readableState,ut;return ft.objectMode?ut=!0:typeof it=="string"&&(K=K||ft.defaultEncoding,K!==ft.encoding&&(it=S.from(it,K),K=""),ut=!0),k(this,it,K,!1,ut)},p.prototype.unshift=function(it){return k(this,it,null,!0,!1)};function k(it,K,ft,ut,kt){n("readableAddChunk",K);var It=it._readableState;if(K===null)It.reading=!1,H(it,It);else{var Pt;if(kt||(Pt=B(It,K)),Pt)M(it,Pt);else if(It.objectMode||K&&K.length>0)if(typeof K!="string"&&!It.objectMode&&Object.getPrototypeOf(K)!==S.prototype&&(K=e(K)),ut)It.endEmitted?M(it,new u):w(it,It,K,!0);else if(It.ended)M(it,new v);else{if(It.destroyed)return!1;It.reading=!1,It.decoder&&!ft?(K=It.decoder.write(K),It.objectMode||K.length!==0?w(it,It,K,!1):W(it,It)):w(it,It,K,!1)}else ut||(It.reading=!1,W(it,It))}return!It.ended&&(It.length=O?it=O:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}function V(it,K){return it<=0||K.length===0&&K.ended?0:K.objectMode?1:it!==it?K.flowing&&K.length?K.buffer.head.data.length:K.length:(it>K.highWaterMark&&(K.highWaterMark=j(it)),it<=K.length?it:K.ended?K.length:(K.needReadable=!0,0))}p.prototype.read=function(it){n("read",it),it=parseInt(it,10);var K=this._readableState,ft=it;if(it!==0&&(K.emittedReadable=!1),it===0&&K.needReadable&&((K.highWaterMark!==0?K.length>=K.highWaterMark:K.length>0)||K.ended))return n("read: emitReadable",K.length,K.ended),K.length===0&&K.ended?rt(this):F(this),null;if(it=V(it,K),it===0&&K.ended)return K.length===0&&rt(this),null;var ut=K.needReadable;n("need readable",ut),(K.length===0||K.length-it0?kt=pt(it,K):kt=null,kt===null?(K.needReadable=K.length<=K.highWaterMark,it=0):(K.length-=it,K.awaitDrain=0),K.length===0&&(K.ended||(K.needReadable=!0),ft!==it&&K.ended&&rt(this)),kt!==null&&this.emit("data",kt),kt};function H(it,K){if(n("onEofChunk"),!K.ended){if(K.decoder){var ft=K.decoder.end();ft&&ft.length&&(K.buffer.push(ft),K.length+=K.objectMode?1:ft.length)}K.ended=!0,K.sync?F(it):(K.needReadable=!1,K.emittedReadable||(K.emittedReadable=!0,U(it)))}}function F(it){var K=it._readableState;n("emitReadable",K.needReadable,K.emittedReadable),K.needReadable=!1,K.emittedReadable||(n("emitReadable",K.flowing),K.emittedReadable=!0,process.nextTick(U,it))}function U(it){var K=it._readableState;n("emitReadable_",K.destroyed,K.length,K.ended),!K.destroyed&&(K.length||K.ended)&&(it.emit("readable"),K.emittedReadable=!1),K.needReadable=!K.flowing&&!K.ended&&K.length<=K.highWaterMark,tt(it)}function W(it,K){K.readingMore||(K.readingMore=!0,process.nextTick(q,it,K))}function q(it,K){for(;!K.reading&&!K.ended&&(K.length1&&vt(ut.pipes,it)!==-1)&&!Jt&&(n("false write response, pause",ut.awaitDrain),ut.awaitDrain++),ft.pause())}function pe(Mt){n("onerror",Mt),Lt(),it.removeListener("error",pe),g(it,"error")===0&&M(it,Mt)}A(it,"error",pe);function se(){it.removeListener("finish",Tt),Lt()}it.once("close",se);function Tt(){n("onfinish"),it.removeListener("close",se),Lt()}it.once("finish",Tt);function Lt(){n("unpipe"),ft.unpipe(it)}return it.emit("pipe",ft),ut.flowing||(n("pipe resume"),ft.resume()),it};function J(it){return function(){var K=it._readableState;n("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&g(it,"data")&&(K.flowing=!0,tt(it))}}p.prototype.unpipe=function(it){var K=this._readableState,ft={hasUnpiped:!1};if(K.pipesCount===0)return this;if(K.pipesCount===1)return it&&it!==K.pipes?this:(it||(it=K.pipes),K.pipes=null,K.pipesCount=0,K.flowing=!1,it&&it.emit("unpipe",this,ft),this);if(!it){var ut=K.pipes,kt=K.pipesCount;K.pipes=null,K.pipesCount=0,K.flowing=!1;for(var It=0;It0,ut.flowing!==!1&&this.resume()):it==="readable"&&!ut.endEmitted&&!ut.readableListening&&(ut.readableListening=ut.needReadable=!0,ut.flowing=!1,ut.emittedReadable=!1,n("on readable",ut.length,ut.reading),ut.length?F(this):ut.reading||process.nextTick(yt,this)),ft},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(it,K){var ft=I.prototype.removeListener.call(this,it,K);return it==="readable"&&process.nextTick(lt,this),ft},p.prototype.removeAllListeners=function(it){var K=I.prototype.removeAllListeners.apply(this,arguments);return(it==="readable"||it===void 0)&&process.nextTick(lt,this),K};function lt(it){var K=it._readableState;K.readableListening=it.listenerCount("readable")>0,K.resumeScheduled&&!K.paused?K.flowing=!0:it.listenerCount("data")>0&&it.resume()}function yt(it){n("readable nexttick read 0"),it.read(0)}p.prototype.resume=function(){var it=this._readableState;return it.flowing||(n("resume"),it.flowing=!it.readableListening,mt(this,it)),it.paused=!1,this};function mt(it,K){K.resumeScheduled||(K.resumeScheduled=!0,process.nextTick(st,it,K))}function st(it,K){n("resume",K.reading),K.reading||it.read(0),K.resumeScheduled=!1,it.emit("resume"),tt(it),K.flowing&&!K.reading&&it.read(0)}p.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function tt(it){var K=it._readableState;for(n("flow",K.flowing);K.flowing&&it.read()!==null;);}p.prototype.wrap=function(it){var K=this,ft=this._readableState,ut=!1;it.on("end",function(){if(n("wrapped end"),ft.decoder&&!ft.ended){var Pt=ft.decoder.end();Pt&&Pt.length&&K.push(Pt)}K.push(null)}),it.on("data",function(Pt){if(n("wrapped data"),ft.decoder&&(Pt=ft.decoder.write(Pt)),!(ft.objectMode&&Pt==null)&&!(!ft.objectMode&&(!Pt||!Pt.length))){var qt=K.push(Pt);qt||(ut=!0,it.pause())}});for(var kt in it)this[kt]===void 0&&typeof it[kt]=="function"&&(this[kt]=function(Pt){return function(){return it[Pt].apply(it,arguments)}}(kt));for(var It=0;It=K.length?(K.decoder?ft=K.buffer.join(""):K.buffer.length===1?ft=K.buffer.first():ft=K.buffer.concat(K.length),K.buffer.clear()):ft=K.buffer.consume(it,K.decoder),ft}function rt(it){var K=it._readableState;n("endReadable",K.endEmitted),K.endEmitted||(K.ended=!0,process.nextTick(at,K,it))}function at(it,K){if(n("endReadableNT",it.endEmitted,it.length),!it.endEmitted&&it.length===0&&(it.endEmitted=!0,K.readable=!1,K.emit("end"),it.autoDestroy)){var ft=K._writableState;(!ft||ft.autoDestroy&&ft.finished)&&K.destroy()}}typeof Symbol=="function"&&(p.from=function(it,K){return P===void 0&&(P=vN()),P(p,it,K)});function vt(it,K){for(var ft=0,ut=it.length;ft{Z.exports=a;var c=lx().codes,g=c.ERR_METHOD_NOT_IMPLEMENTED,I=c.ERR_MULTIPLE_CALLBACK,S=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=ux();wv()(a,e);function r(i,l){var f=this._transformState;f.transforming=!1;var x=f.writecb;if(x===null)return this.emit("error",new I);f.writechunk=null,f.writecb=null,l!=null&&this.push(l),x(i);var y=this._readableState;y.reading=!1,(y.needReadable||y.length{Z.exports=g;var c=K7();wv()(g,c);function g(I){if(!(this instanceof g))return new g(I);c.call(this,I)}g.prototype._transform=function(I,S,t){t(null,I)}}),xN=Dt((Q,Z)=>{var c;function g(f){var x=!1;return function(){x||(x=!0,f.apply(void 0,arguments))}}var I=lx().codes,S=I.ERR_MISSING_ARGS,t=I.ERR_STREAM_DESTROYED;function e(f){if(f)throw f}function r(f){return f.setHeader&&typeof f.abort=="function"}function a(f,x,y,v){v=g(v);var T=!1;f.on("close",function(){T=!0}),c===void 0&&(c=dk()),c(f,{readable:x,writable:y},function(b){if(b)return v(b);T=!0,v()});var u=!1;return function(b){if(!T&&!u){if(u=!0,r(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();v(b||new t("pipe"))}}}function n(f){f()}function o(f,x){return f.pipe(x)}function i(f){return!f.length||typeof f[f.length-1]!="function"?e:f.pop()}function l(){for(var f=arguments.length,x=new Array(f),y=0;y0;return a(b,P,M,function(C){T||(T=C),C&&u.forEach(n),!P&&(u.forEach(n),v(T))})});return x.reduce(o)}Z.exports=l}),_N=Dt((Q,Z)=>{Z.exports=I;var c=Rm().EventEmitter,g=wv();g(I,c),I.Readable=Y7(),I.Writable=Z7(),I.Duplex=ux(),I.Transform=K7(),I.PassThrough=yN(),I.finished=dk(),I.pipeline=xN(),I.Stream=I;function I(){c.call(this)}I.prototype.pipe=function(S,t){var e=this;function r(x){S.writable&&S.write(x)===!1&&e.pause&&e.pause()}e.on("data",r);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",i));var n=!1;function o(){n||(n=!0,S.end())}function i(){n||(n=!0,typeof S.destroy=="function"&&S.destroy())}function l(x){if(f(),c.listenerCount(this,"error")===0)throw x}e.on("error",l),S.on("error",l);function f(){e.removeListener("data",r),S.removeListener("drain",a),e.removeListener("end",o),e.removeListener("close",i),e.removeListener("error",l),S.removeListener("error",l),e.removeListener("end",f),e.removeListener("close",f),S.removeListener("close",f)}return e.on("end",f),e.on("close",f),S.on("close",f),S.emit("pipe",e),S}}),lb=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var pt=J.name?": "+J.name:"";return q.stylize("[Function"+pt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var K;return at?K=l(q,J,lt,tt,st):K=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(K,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,pt=J.length;tt-1&&(st?pt=pt.split(` `).map(function(at){return" "+at}).join(` -`).slice(2):dt=` -`+dt.split(` +`).slice(2):pt=` +`+pt.split(` `).map(function(at){return" "+at}).join(` -`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return dt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`))):pt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return pt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+pt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` `)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?lt[0]+(J===""?"":J+` `)+" "+q.join(`, - `)+" "+lt[1]:lt[0]+J+" "+q.join(", ")+" "+lt[1]}Q.types=j7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function P(q){return typeof q=="symbol"}Q.isSymbol=P;function M(q){return q===void 0}Q.isUndefined=M;function C(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=C,Q.types.isRegExp=C;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=U7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(b){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},c(b)}function g(b,_,P){return Object.defineProperty(b,"prototype",{writable:!1}),b}function I(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function S(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&t(b,_)}function t(b,_){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,M){return P.__proto__=M,P},t(b,_)}function e(b){var _=n();return function(){var P=o(b),M;if(_){var C=o(this).constructor;M=Reflect.construct(P,arguments,C)}else M=P.apply(this,arguments);return r(this,M)}}function r(b,_){if(_&&(c(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(b)}function a(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function o(b){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},o(b)}var i={},l,f;function x(b,_,P){P||(P=Error);function M(A,h,p){return typeof _=="string"?_:_(A,h,p)}var C=function(A){S(p,A);var h=e(p);function p(k,w,R){var O;return I(this,p),O=h.call(this,M(k,w,R)),O.code=b,O}return g(p)}(P);i[b]=C}function y(b,_){if(Array.isArray(b)){var P=b.length;return b=b.map(function(M){return String(M)}),P>2?"one of ".concat(_," ").concat(b.slice(0,P-1).join(", "),", or ")+b[P-1]:P===2?"one of ".concat(_," ").concat(b[0]," or ").concat(b[1]):"of ".concat(_," ").concat(b[0])}else return"of ".concat(_," ").concat(String(b))}function v(b,_,P){return b.substr(0,_.length)===_}function T(b,_,P){return(P===void 0||P>b.length)&&(P=b.length),b.substring(P-_.length,P)===_}function u(b,_,P){return typeof P!="number"&&(P=0),P+_.length>b.length?!1:b.indexOf(_,P)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(b,_,P){l===void 0&&(l=t3()),l(typeof b=="string","'name' must be a string");var M;typeof _=="string"&&v(_,"not ")?(M="must not be",_=_.replace(/^not /,"")):M="must be";var C;if(T(b," argument"))C="The ".concat(b," ").concat(M," ").concat(y(_,"type"));else{var A=u(b,".")?"property":"argument";C='The "'.concat(b,'" ').concat(A," ").concat(M," ").concat(y(_,"type"))}return C+=". Received type ".concat(c(P)),C},TypeError),x("ERR_INVALID_ARG_VALUE",function(b,_){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=sb());var M=f.inspect(_);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(P,". Received ").concat(M)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(b,_,P){var M;return P&&P.constructor&&P.constructor.name?M="instance of ".concat(P.constructor.name):M="type ".concat(c(P)),"Expected ".concat(b,' to be returned from the "').concat(_,'"')+" function but got ".concat(M,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var b=arguments.length,_=new Array(b),P=0;P0,"At least one arg needs to be specified");var M="The ",C=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),C){case 1:M+="".concat(_[0]," argument");break;case 2:M+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:M+=_.slice(0,C-1).join(", "),M+=", and ".concat(_[C-1]," arguments");break}return"".concat(M," must be specified")},TypeError),Z.exports.codes=i}),iN=Dt((Q,Z)=>{function c(W,q){var J=Object.keys(W);if(Object.getOwnPropertySymbols){var lt=Object.getOwnPropertySymbols(W);q&&(lt=lt.filter(function(yt){return Object.getOwnPropertyDescriptor(W,yt).enumerable})),J.push.apply(J,lt)}return J}function g(W){for(var q=1;q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(W){return Function.toString.call(W).indexOf("[native code]")!==-1}function T(W,q){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,lt){return J.__proto__=lt,J},T(W,q)}function u(W){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},u(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},b(W)}var _=sb(),P=_.inspect,M=Y7(),C=M.codes.ERR_INVALID_ARG_TYPE;function A(W,q,J){return(J===void 0||J>W.length)&&(J=W.length),W.substring(J-q.length,J)===q}function h(W,q){if(q=Math.floor(q),W.length==0||q==0)return"";var J=W.length*q;for(q=Math.floor(Math.log(q)/Math.log(2));q;)W+=W,q--;return W+=W.substring(0,J-W.length),W}var p="",k="",w="",R="",O={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:"},j=10;function V(W){var q=Object.keys(W),J=Object.create(Object.getPrototypeOf(W));return q.forEach(function(lt){J[lt]=W[lt]}),Object.defineProperty(J,"message",{value:W.message}),J}function H(W){return P(W,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(W,q,J){var lt="",yt="",mt=0,st="",tt=!1,dt=H(W),rt=dt.split(` + `)+" "+lt[1]:lt[0]+J+" "+q.join(", ")+" "+lt[1]}Q.types=V7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function P(q){return typeof q=="symbol"}Q.isSymbol=P;function M(q){return q===void 0}Q.isUndefined=M;function C(q){return A(q)&&B(q)==="[object RegExp]"}Q.isRegExp=C,Q.types.isRegExp=C;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&B(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(B(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=H7();function B(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=wv(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(pt,rt){lt=pt,yt=rt}),st=[],tt=0;tt{function c(b){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},c(b)}function g(b,_,P){return Object.defineProperty(b,"prototype",{writable:!1}),b}function I(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function S(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&t(b,_)}function t(b,_){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,M){return P.__proto__=M,P},t(b,_)}function e(b){var _=n();return function(){var P=o(b),M;if(_){var C=o(this).constructor;M=Reflect.construct(P,arguments,C)}else M=P.apply(this,arguments);return r(this,M)}}function r(b,_){if(_&&(c(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(b)}function a(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function o(b){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},o(b)}var i={},l,f;function x(b,_,P){P||(P=Error);function M(A,h,p){return typeof _=="string"?_:_(A,h,p)}var C=function(A){S(p,A);var h=e(p);function p(k,w,B){var O;return I(this,p),O=h.call(this,M(k,w,B)),O.code=b,O}return g(p)}(P);i[b]=C}function y(b,_){if(Array.isArray(b)){var P=b.length;return b=b.map(function(M){return String(M)}),P>2?"one of ".concat(_," ").concat(b.slice(0,P-1).join(", "),", or ")+b[P-1]:P===2?"one of ".concat(_," ").concat(b[0]," or ").concat(b[1]):"of ".concat(_," ").concat(b[0])}else return"of ".concat(_," ").concat(String(b))}function v(b,_,P){return b.substr(0,_.length)===_}function T(b,_,P){return(P===void 0||P>b.length)&&(P=b.length),b.substring(P-_.length,P)===_}function u(b,_,P){return typeof P!="number"&&(P=0),P+_.length>b.length?!1:b.indexOf(_,P)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(b,_,P){l===void 0&&(l=e3()),l(typeof b=="string","'name' must be a string");var M;typeof _=="string"&&v(_,"not ")?(M="must not be",_=_.replace(/^not /,"")):M="must be";var C;if(T(b," argument"))C="The ".concat(b," ").concat(M," ").concat(y(_,"type"));else{var A=u(b,".")?"property":"argument";C='The "'.concat(b,'" ').concat(A," ").concat(M," ").concat(y(_,"type"))}return C+=". Received type ".concat(c(P)),C},TypeError),x("ERR_INVALID_ARG_VALUE",function(b,_){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=lb());var M=f.inspect(_);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(P,". Received ").concat(M)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(b,_,P){var M;return P&&P.constructor&&P.constructor.name?M="instance of ".concat(P.constructor.name):M="type ".concat(c(P)),"Expected ".concat(b,' to be returned from the "').concat(_,'"')+" function but got ".concat(M,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var b=arguments.length,_=new Array(b),P=0;P0,"At least one arg needs to be specified");var M="The ",C=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),C){case 1:M+="".concat(_[0]," argument");break;case 2:M+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:M+=_.slice(0,C-1).join(", "),M+=", and ".concat(_[C-1]," arguments");break}return"".concat(M," must be specified")},TypeError),Z.exports.codes=i}),bN=Dt((Q,Z)=>{function c(W,q){var J=Object.keys(W);if(Object.getOwnPropertySymbols){var lt=Object.getOwnPropertySymbols(W);q&&(lt=lt.filter(function(yt){return Object.getOwnPropertyDescriptor(W,yt).enumerable})),J.push.apply(J,lt)}return J}function g(W){for(var q=1;q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(W){return Function.toString.call(W).indexOf("[native code]")!==-1}function T(W,q){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,lt){return J.__proto__=lt,J},T(W,q)}function u(W){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},u(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},b(W)}var _=lb(),P=_.inspect,M=X7(),C=M.codes.ERR_INVALID_ARG_TYPE;function A(W,q,J){return(J===void 0||J>W.length)&&(J=W.length),W.substring(J-q.length,J)===q}function h(W,q){if(q=Math.floor(q),W.length==0||q==0)return"";var J=W.length*q;for(q=Math.floor(Math.log(q)/Math.log(2));q;)W+=W,q--;return W+=W.substring(0,J-W.length),W}var p="",k="",w="",B="",O={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:"},j=10;function V(W){var q=Object.keys(W),J=Object.create(Object.getPrototypeOf(W));return q.forEach(function(lt){J[lt]=W[lt]}),Object.defineProperty(J,"message",{value:W.message}),J}function H(W){return P(W,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(W,q,J){var lt="",yt="",mt=0,st="",tt=!1,pt=H(W),rt=pt.split(` `),at=H(q).split(` -`),vt=0,it="";if(J==="strictEqual"&&b(W)==="object"&&b(q)==="object"&&W!==null&&q!==null&&(J="strictEqualObject"),rt.length===1&&at.length===1&&rt[0]!==at[0]){var Y=rt[0].length+at[0].length;if(Y<=j){if((b(W)!=="object"||W===null)&&(b(q)!=="object"||q===null)&&(W!==0||q!==0))return"".concat(O[J],` +`),vt=0,it="";if(J==="strictEqual"&&b(W)==="object"&&b(q)==="object"&&W!==null&&q!==null&&(J="strictEqualObject"),rt.length===1&&at.length===1&&rt[0]!==at[0]){var K=rt[0].length+at[0].length;if(K<=j){if((b(W)!=="object"||W===null)&&(b(q)!=="object"||q===null)&&(W!==0||q!==0))return"".concat(O[J],` `)+"".concat(rt[0]," !== ").concat(at[0],` -`)}else if(J!=="strictEqualObject"){var ft=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y2&&(it=` +`)}else if(J!=="strictEqualObject"){var ft=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(K2&&(it=` `.concat(h(" ",vt),"^"),vt=0)}}}for(var ut=rt[rt.length-1],kt=at[at.length-1];ut===kt&&(vt++<2?st=` - `.concat(ut).concat(st):lt=ut,rt.pop(),at.pop(),!(rt.length===0||at.length===0));)ut=rt[rt.length-1],kt=at[at.length-1];var It=Math.max(rt.length,at.length);if(It===0){var Pt=dt.split(` -`);if(Pt.length>30)for(Pt[26]="".concat(p,"...").concat(R);Pt.length>27;)Pt.pop();return"".concat(O.notIdentical,` + `.concat(ut).concat(st):lt=ut,rt.pop(),at.pop(),!(rt.length===0||at.length===0));)ut=rt[rt.length-1],kt=at[at.length-1];var It=Math.max(rt.length,at.length);if(It===0){var Pt=pt.split(` +`);if(Pt.length>30)for(Pt[26]="".concat(p,"...").concat(B);Pt.length>27;)Pt.pop();return"".concat(O.notIdentical,` `).concat(Pt.join(` `),` `)}vt>3&&(st=` -`.concat(p,"...").concat(R).concat(st),tt=!0),lt!==""&&(st=` +`.concat(p,"...").concat(B).concat(st),tt=!0),lt!==""&&(st=` `.concat(lt).concat(st),lt="");var qt=0,Wt=O[J]+` -`.concat(k,"+ actual").concat(R," ").concat(w,"- expected").concat(R),Jt=" ".concat(p,"...").concat(R," Lines skipped");for(vt=0;vt1&&vt>2&&(ge>4?(yt+=` -`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` +`.concat(k,"+ actual").concat(B," ").concat(w,"- expected").concat(B),Jt=" ".concat(p,"...").concat(B," Lines skipped");for(vt=0;vt1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(B),tt=!0):ge>3&&(yt+=` `.concat(at[vt-2]),qt++),yt+=` `.concat(at[vt-1]),qt++),mt=vt,lt+=` -`.concat(w,"-").concat(R," ").concat(at[vt]),qt++;else if(at.length1&&vt>2&&(ge>4?(yt+=` -`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` +`.concat(w,"-").concat(B," ").concat(at[vt]),qt++;else if(at.length1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(B),tt=!0):ge>3&&(yt+=` `.concat(rt[vt-2]),qt++),yt+=` `.concat(rt[vt-1]),qt++),mt=vt,yt+=` -`.concat(k,"+").concat(R," ").concat(rt[vt]),qt++;else{var fe=at[vt],pe=rt[vt],se=pe!==fe&&(!A(pe,",")||pe.slice(0,-1)!==fe);se&&A(fe,",")&&fe.slice(0,-1)===pe&&(se=!1,pe+=","),se?(ge>1&&vt>2&&(ge>4?(yt+=` -`.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` +`.concat(k,"+").concat(B," ").concat(rt[vt]),qt++;else{var fe=at[vt],pe=rt[vt],se=pe!==fe&&(!A(pe,",")||pe.slice(0,-1)!==fe);se&&A(fe,",")&&fe.slice(0,-1)===pe&&(se=!1,pe+=","),se?(ge>1&&vt>2&&(ge>4?(yt+=` +`.concat(p,"...").concat(B),tt=!0):ge>3&&(yt+=` `.concat(rt[vt-2]),qt++),yt+=` `.concat(rt[vt-1]),qt++),mt=vt,yt+=` -`.concat(k,"+").concat(R," ").concat(pe),lt+=` -`.concat(w,"-").concat(R," ").concat(fe),qt+=2):(yt+=lt,lt="",(ge===1||vt===0)&&(yt+=` +`.concat(k,"+").concat(B," ").concat(pe),lt+=` +`.concat(w,"-").concat(B," ").concat(fe),qt+=2):(yt+=lt,lt="",(ge===1||vt===0)&&(yt+=` `.concat(pe),qt++))}if(qt>20&&vt30)for(Y[26]="".concat(p,"...").concat(R);Y.length>27;)Y.pop();Y.length===1?mt=J.call(this,"".concat(it," ").concat(Y[0])):mt=J.call(this,"".concat(it,` +`).concat(p,"...").concat(B).concat(lt,` +`)+"".concat(p,"...").concat(B)}return"".concat(Wt).concat(tt?Jt:"",` +`).concat(yt).concat(lt).concat(st).concat(it)}var U=function(W,q){n(lt,W);var J=o(lt);function lt(yt){var mt;if(S(this,lt),b(yt)!=="object"||yt===null)throw new C("options","Object",yt);var st=yt.message,tt=yt.operator,pt=yt.stackStartFn,rt=yt.actual,at=yt.expected,vt=Error.stackTraceLimit;if(Error.stackTraceLimit=0,st!=null)mt=J.call(this,String(st));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(p="\x1B[34m",k="\x1B[32m",B="\x1B[39m",w="\x1B[31m"):(p="",k="",B="",w="")),b(rt)==="object"&&rt!==null&&b(at)==="object"&&at!==null&&"stack"in rt&&rt instanceof Error&&"stack"in at&&at instanceof Error&&(rt=V(rt),at=V(at)),tt==="deepStrictEqual"||tt==="strictEqual")mt=J.call(this,F(rt,at,tt));else if(tt==="notDeepStrictEqual"||tt==="notStrictEqual"){var it=O[tt],K=H(rt).split(` +`);if(tt==="notStrictEqual"&&b(rt)==="object"&&rt!==null&&(it=O.notStrictEqualObject),K.length>30)for(K[26]="".concat(p,"...").concat(B);K.length>27;)K.pop();K.length===1?mt=J.call(this,"".concat(it," ").concat(K[0])):mt=J.call(this,"".concat(it,` -`).concat(Y.join(` +`).concat(K.join(` `),` `))}else{var ft=H(rt),ut="",kt=O[tt];tt==="notDeepEqual"||tt==="notEqual"?(ft="".concat(O[tt],` @@ -202,21 +202,21 @@ should equal -`):ut=" ".concat(tt," ").concat(ut)),mt=J.call(this,"".concat(ft).concat(ut))}return Error.stackTraceLimit=vt,mt.generatedMessage=!st,Object.defineProperty(l(mt),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),mt.code="ERR_ASSERTION",mt.actual=rt,mt.expected=at,mt.operator=tt,Error.captureStackTrace&&Error.captureStackTrace(l(mt),dt),mt.stack,mt.name="AssertionError",i(mt)}return e(lt,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:q,value:function(yt,mt){return P(this,g(g({},mt),{},{customInspect:!1,depth:0}))}}]),lt}(f(Error),P.custom);Z.exports=U}),K7=Dt((Q,Z)=>{var c=Object.prototype.toString;Z.exports=function(g){var I=c.call(g),S=I==="[object Arguments]";return S||(S=I!=="[object Array]"&&g!==null&&typeof g=="object"&&typeof g.length=="number"&&g.length>=0&&c.call(g.callee)==="[object Function]"),S}}),aN=Dt((Q,Z)=>{var c;Object.keys||(g=Object.prototype.hasOwnProperty,I=Object.prototype.toString,S=K7(),t=Object.prototype.propertyIsEnumerable,e=!t.call({toString:null},"toString"),r=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(f){var x=f.constructor;return x&&x.prototype===f},o={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!o["$"+f]&&g.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{n(window[f])}catch{return!0}}catch{return!0}return!1}(),l=function(f){if(typeof window>"u"||!i)return n(f);try{return n(f)}catch{return!1}},c=function(f){var x=f!==null&&typeof f=="object",y=I.call(f)==="[object Function]",v=S(f),T=x&&I.call(f)==="[object String]",u=[];if(!x&&!y&&!v)throw new TypeError("Object.keys called on a non-object");var b=r&&y;if(T&&f.length>0&&!g.call(f,0))for(var _=0;_0)for(var P=0;P{var c=Array.prototype.slice,g=K7(),I=Object.keys,S=I?function(e){return I(e)}:aN(),t=Object.keys;S.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(r){return g(r)?t(c.call(r)):t(r)})}else Object.keys=S;return Object.keys||S},Z.exports=S}),oN=Dt((Q,Z)=>{var c=X7(),g=uk()(),I=ob(),S=Object,t=I("Array.prototype.push"),e=I("Object.prototype.propertyIsEnumerable"),r=g?Object.getOwnPropertySymbols:null;Z.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var o=S(a);if(arguments.length===1)return o;for(var i=1;i{var c=oN(),g=function(){if(!Object.assign)return!1;for(var S="abcdefghijklmnopqrst",t=S.split(""),e={},r=0;r{var c=function(g){return g!==g};Z.exports=function(g,I){return g===0&&I===0?1/g===1/I:!!(g===I||c(g)&&c(I))}}),dk=Dt((Q,Z)=>{var c=J7();Z.exports=function(){return typeof Object.is=="function"?Object.is:c}}),Qw=Dt((Q,Z)=>{var c=X7(),g=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",I=Object.prototype.toString,S=Array.prototype.concat,t=Object.defineProperty,e=function(i){return typeof i=="function"&&I.call(i)==="[object Function]"},r=R7()(),a=t&&r,n=function(i,l,f,x){if(l in i){if(x===!0){if(i[l]===f)return}else if(!e(x)||!x())return}a?t(i,l,{configurable:!0,enumerable:!1,value:f,writable:!0}):i[l]=f},o=function(i,l){var f=arguments.length>2?arguments[2]:{},x=c(l);g&&(x=S.call(x,Object.getOwnPropertySymbols(l)));for(var y=0;y{var c=dk(),g=Qw();Z.exports=function(){var I=c();return g(Object,{is:I},{is:function(){return Object.is!==I}}),I}}),uN=Dt((Q,Z)=>{var c=Qw(),g=Jw(),I=J7(),S=dk(),t=lN(),e=g(S(),Object);c(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),Q7=Dt((Q,Z)=>{Z.exports=function(c){return c!==c}}),t9=Dt((Q,Z)=>{var c=Q7();Z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}}),cN=Dt((Q,Z)=>{var c=Qw(),g=t9();Z.exports=function(){var I=g();return c(Number,{isNaN:I},{isNaN:function(){return Number.isNaN!==I}}),I}}),hN=Dt((Q,Z)=>{var c=Jw(),g=Qw(),I=Q7(),S=t9(),t=cN(),e=c(S(),Number);g(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),fN=Dt((Q,Z)=>{function c(se,Tt){return e(se)||t(se,Tt)||I(se,Tt)||g()}function g(){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 I(se,Tt){if(se){if(typeof se=="string")return S(se,Tt);var Lt=Object.prototype.toString.call(se).slice(8,-1);if(Lt==="Object"&&se.constructor&&(Lt=se.constructor.name),Lt==="Map"||Lt==="Set")return Array.from(se);if(Lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Lt))return S(se,Tt)}}function S(se,Tt){(Tt==null||Tt>se.length)&&(Tt=se.length);for(var Lt=0,Mt=new Array(Tt);Lt10)return!0;for(var Tt=0;Tt57)return!0}return se.length===10&&se>=Math.pow(2,32)}function U(se){return Object.keys(se).filter(F).concat(l(se).filter(Object.prototype.propertyIsEnumerable.bind(se)))}function W(se,Tt){if(se===Tt)return 0;for(var Lt=se.length,Mt=Tt.length,ee=0,ve=Math.min(Lt,Mt);ee{function c(mt){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(mt)}function g(mt,st,tt){return Object.defineProperty(mt,"prototype",{writable:!1}),mt}function I(mt,st){if(!(mt instanceof st))throw new TypeError("Cannot call a class as a function")}var S=Y7(),t=S.codes,e=t.ERR_AMBIGUOUS_ARGUMENT,r=t.ERR_INVALID_ARG_TYPE,a=t.ERR_INVALID_ARG_VALUE,n=t.ERR_INVALID_RETURN_VALUE,o=t.ERR_MISSING_ARGS,i=iN(),l=sb(),f=l.inspect,x=sb().types,y=x.isPromise,v=x.isRegExp,T=sN()(),u=dk()(),b=ob()("RegExp.prototype.test"),_,P;function M(){var mt=fN();_=mt.isDeepEqual,P=mt.isDeepStrictEqual}var C=!1,A=Z.exports=R,h={};function p(mt){throw mt.message instanceof Error?mt.message:new i(mt)}function k(mt,st,tt,dt,rt){var at=arguments.length,vt;if(at===0)vt="Failed";else if(at===1)tt=mt,mt=void 0;else{if(C===!1){C=!0;var it=process.emitWarning?process.emitWarning:console.warn.bind(console);it("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}at===2&&(dt="!=")}if(tt instanceof Error)throw tt;var Y={actual:mt,expected:st,operator:dt===void 0?"fail":dt,stackStartFn:rt||k};tt!==void 0&&(Y.message=tt);var ft=new i(Y);throw vt&&(ft.message=vt,ft.generatedMessage=!0),ft}A.fail=k,A.AssertionError=i;function w(mt,st,tt,dt){if(!tt){var rt=!1;if(st===0)rt=!0,dt="No value argument passed to `assert.ok()`";else if(dt instanceof Error)throw dt;var at=new i({actual:tt,expected:!0,message:dt,operator:"==",stackStartFn:mt});throw at.generatedMessage=rt,at}}function R(){for(var mt=arguments.length,st=new Array(mt),tt=0;tt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt{var c=Object.prototype.toString;Z.exports=function(g){var I=c.call(g),S=I==="[object Arguments]";return S||(S=I!=="[object Array]"&&g!==null&&typeof g=="object"&&typeof g.length=="number"&&g.length>=0&&c.call(g.callee)==="[object Function]"),S}}),wN=Dt((Q,Z)=>{var c;Object.keys||(g=Object.prototype.hasOwnProperty,I=Object.prototype.toString,S=J7(),t=Object.prototype.propertyIsEnumerable,e=!t.call({toString:null},"toString"),r=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(f){var x=f.constructor;return x&&x.prototype===f},o={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!o["$"+f]&&g.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{n(window[f])}catch{return!0}}catch{return!0}return!1}(),l=function(f){if(typeof window>"u"||!i)return n(f);try{return n(f)}catch{return!1}},c=function(f){var x=f!==null&&typeof f=="object",y=I.call(f)==="[object Function]",v=S(f),T=x&&I.call(f)==="[object String]",u=[];if(!x&&!y&&!v)throw new TypeError("Object.keys called on a non-object");var b=r&&y;if(T&&f.length>0&&!g.call(f,0))for(var _=0;_0)for(var P=0;P{var c=Array.prototype.slice,g=J7(),I=Object.keys,S=I?function(e){return I(e)}:wN(),t=Object.keys;S.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(r){return g(r)?t(c.call(r)):t(r)})}else Object.keys=S;return Object.keys||S},Z.exports=S}),kN=Dt((Q,Z)=>{var c=Q7(),g=ck()(),I=sb(),S=Object,t=I("Array.prototype.push"),e=I("Object.prototype.propertyIsEnumerable"),r=g?Object.getOwnPropertySymbols:null;Z.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var o=S(a);if(arguments.length===1)return o;for(var i=1;i{var c=kN(),g=function(){if(!Object.assign)return!1;for(var S="abcdefghijklmnopqrst",t=S.split(""),e={},r=0;r{var c=function(g){return g!==g};Z.exports=function(g,I){return g===0&&I===0?1/g===1/I:!!(g===I||c(g)&&c(I))}}),pk=Dt((Q,Z)=>{var c=t9();Z.exports=function(){return typeof Object.is=="function"?Object.is:c}}),t3=Dt((Q,Z)=>{var c=Q7(),g=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",I=Object.prototype.toString,S=Array.prototype.concat,t=Object.defineProperty,e=function(i){return typeof i=="function"&&I.call(i)==="[object Function]"},r=N7()(),a=t&&r,n=function(i,l,f,x){if(l in i){if(x===!0){if(i[l]===f)return}else if(!e(x)||!x())return}a?t(i,l,{configurable:!0,enumerable:!1,value:f,writable:!0}):i[l]=f},o=function(i,l){var f=arguments.length>2?arguments[2]:{},x=c(l);g&&(x=S.call(x,Object.getOwnPropertySymbols(l)));for(var y=0;y{var c=pk(),g=t3();Z.exports=function(){var I=c();return g(Object,{is:I},{is:function(){return Object.is!==I}}),I}}),MN=Dt((Q,Z)=>{var c=t3(),g=Qw(),I=t9(),S=pk(),t=AN(),e=g(S(),Object);c(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),e9=Dt((Q,Z)=>{Z.exports=function(c){return c!==c}}),r9=Dt((Q,Z)=>{var c=e9();Z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}}),SN=Dt((Q,Z)=>{var c=t3(),g=r9();Z.exports=function(){var I=g();return c(Number,{isNaN:I},{isNaN:function(){return Number.isNaN!==I}}),I}}),EN=Dt((Q,Z)=>{var c=Qw(),g=t3(),I=e9(),S=r9(),t=SN(),e=c(S(),Number);g(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),CN=Dt((Q,Z)=>{function c(se,Tt){return e(se)||t(se,Tt)||I(se,Tt)||g()}function g(){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 I(se,Tt){if(se){if(typeof se=="string")return S(se,Tt);var Lt=Object.prototype.toString.call(se).slice(8,-1);if(Lt==="Object"&&se.constructor&&(Lt=se.constructor.name),Lt==="Map"||Lt==="Set")return Array.from(se);if(Lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Lt))return S(se,Tt)}}function S(se,Tt){(Tt==null||Tt>se.length)&&(Tt=se.length);for(var Lt=0,Mt=new Array(Tt);Lt10)return!0;for(var Tt=0;Tt57)return!0}return se.length===10&&se>=Math.pow(2,32)}function U(se){return Object.keys(se).filter(F).concat(l(se).filter(Object.prototype.propertyIsEnumerable.bind(se)))}function W(se,Tt){if(se===Tt)return 0;for(var Lt=se.length,Mt=Tt.length,ee=0,ve=Math.min(Lt,Mt);ee{function c(mt){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(mt)}function g(mt,st,tt){return Object.defineProperty(mt,"prototype",{writable:!1}),mt}function I(mt,st){if(!(mt instanceof st))throw new TypeError("Cannot call a class as a function")}var S=X7(),t=S.codes,e=t.ERR_AMBIGUOUS_ARGUMENT,r=t.ERR_INVALID_ARG_TYPE,a=t.ERR_INVALID_ARG_VALUE,n=t.ERR_INVALID_RETURN_VALUE,o=t.ERR_MISSING_ARGS,i=bN(),l=lb(),f=l.inspect,x=lb().types,y=x.isPromise,v=x.isRegExp,T=TN()(),u=pk()(),b=sb()("RegExp.prototype.test"),_,P;function M(){var mt=CN();_=mt.isDeepEqual,P=mt.isDeepStrictEqual}var C=!1,A=Z.exports=B,h={};function p(mt){throw mt.message instanceof Error?mt.message:new i(mt)}function k(mt,st,tt,pt,rt){var at=arguments.length,vt;if(at===0)vt="Failed";else if(at===1)tt=mt,mt=void 0;else{if(C===!1){C=!0;var it=process.emitWarning?process.emitWarning:console.warn.bind(console);it("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}at===2&&(pt="!=")}if(tt instanceof Error)throw tt;var K={actual:mt,expected:st,operator:pt===void 0?"fail":pt,stackStartFn:rt||k};tt!==void 0&&(K.message=tt);var ft=new i(K);throw vt&&(ft.message=vt,ft.generatedMessage=!0),ft}A.fail=k,A.AssertionError=i;function w(mt,st,tt,pt){if(!tt){var rt=!1;if(st===0)rt=!0,pt="No value argument passed to `assert.ok()`";else if(pt instanceof Error)throw pt;var at=new i({actual:tt,expected:!0,message:pt,operator:"==",stackStartFn:mt});throw at.generatedMessage=rt,at}}function B(){for(var mt=arguments.length,st=new Array(mt),tt=0;tt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt{var c=1e3,g=c*60,I=g*60,S=I*24,t=S*365.25;Z.exports=function(o,i){i=i||{};var l=typeof o;if(l==="string"&&o.length>0)return e(o);if(l==="number"&&isNaN(o)===!1)return i.long?a(o):r(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function e(o){if(o=String(o),!(o.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var l=parseFloat(i[1]),f=(i[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return l*t;case"days":case"day":case"d":return l*S;case"hours":case"hour":case"hrs":case"hr":case"h":return l*I;case"minutes":case"minute":case"mins":case"min":case"m":return l*g;case"seconds":case"second":case"secs":case"sec":case"s":return l*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function r(o){return o>=S?Math.round(o/S)+"d":o>=I?Math.round(o/I)+"h":o>=g?Math.round(o/g)+"m":o>=c?Math.round(o/c)+"s":o+"ms"}function a(o){return n(o,S,"day")||n(o,I,"hour")||n(o,g,"minute")||n(o,c,"second")||o+" ms"}function n(o,i,l){if(!(o{Q=Z.exports=I.debug=I.default=I,Q.coerce=r,Q.disable=t,Q.enable=S,Q.enabled=e,Q.humanize=dN(),Q.names=[],Q.skips=[],Q.formatters={};var c;function g(a){var n=0,o;for(o in a)n=(n<<5)-n+a.charCodeAt(o),n|=0;return Q.colors[Math.abs(n)%Q.colors.length]}function I(a){function n(){if(n.enabled){var o=n,i=+new Date,l=i-(c||i);o.diff=l,o.prev=c,o.curr=i,c=i;for(var f=new Array(arguments.length),x=0;x{Q=Z.exports=pN(),Q.log=I,Q.formatArgs=g,Q.save=S,Q.load=t,Q.useColors=c,Q.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:e(),Q.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function c(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Q.formatters.j=function(r){try{return JSON.stringify(r)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function g(r){var a=this.useColors;if(r[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+r[0]+(a?"%c ":" ")+"+"+Q.humanize(this.diff),!!a){var n="color: "+this.color;r.splice(1,0,n,"color: inherit");var o=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(l){l!=="%%"&&(o++,l==="%c"&&(i=o))}),r.splice(i,0,n)}}function I(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(r){try{r==null?Q.storage.removeItem("debug"):Q.storage.debug=r}catch{}}function t(){var r;try{r=Q.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=s.DEBUG),r}Q.enable(t());function e(){try{return window.localStorage}catch{}}}),gN=Dt((Q,Z)=>{var c=t3(),g=mN()("stream-parser");Z.exports=r;var I=-1,S=0,t=1,e=2;function r(u){var b=u&&typeof u._transform=="function",_=u&&typeof u._write=="function";if(!b&&!_)throw new Error("must pass a Writable or Transform stream in");g("extending Parser into stream"),u._bytes=n,u._skipBytes=o,b&&(u._passthrough=i),b?u._transform=f:u._write=l}function a(u){g("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=I,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function n(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||a(this),g("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=S}function o(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=t}function i(u,b){c(!this._parserCallback,'There is already a "callback" set!'),c(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=e}function l(u,b,_){this._parserInit||a(this),g("write(%o bytes)",u.length),typeof b=="function"&&(_=b),v(this,u,null,_)}function f(u,b,_){this._parserInit||a(this),g("transform(%o bytes)",u.length),typeof b!="function"&&(b=this._parserOutput),v(this,u,b,_)}function x(u,b,_,P){return u._parserBytesLeft<=0?P(new Error("got data but not currently parsing anything")):b.length<=u._parserBytesLeft?function(){return y(u,b,_,P)}:function(){var M=b.slice(0,u._parserBytesLeft);return y(u,M,_,function(C){if(C)return P(C);if(b.length>M.length)return function(){return x(u,b.slice(M.length),_,P)}})}}function y(u,b,_,P){if(u._parserBytesLeft-=b.length,g("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(b),u._parserBuffered+=b.length):u._parserState===e&&_(b),u._parserBytesLeft===0){var M=u._parserCallback;if(M&&u._parserState===S&&u._parserBuffers.length>1&&(b=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(b=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=I,u._parserBuffers.splice(0),M){var C=[];b&&C.push(b),_&&C.push(_);var A=M.length>C.length;A&&C.push(T(P));var h=M.apply(u,C);if(!A||P===h)return P}}else return P}var v=T(x);function T(u){return function(){for(var b=u.apply(this,arguments);typeof b=="function";)b=b();return b}}}),ph=Dt(Q=>{var Z=nN().Transform,c=gN();function g(){Z.call(this,{readableObjectMode:!0})}g.prototype=Object.create(Z.prototype),g.prototype.constructor=g,c(g.prototype),Q.ParserStream=g,Q.sliceEq=function(S,t,e){for(var r=t,a=0;a{var c=ph().readUInt16BE,g=ph().readUInt32BE;function I(i,l){if(i.length<4+l)return null;var f=g(i,l);return i.length>4&15,x=i[4]&15,y=i[5]>>4&15,v=c(i,6),T=8,u=0;uv.width||y.width===v.width&&y.height>v.height?y:v}),f=i.reduce(function(y,v){return y.height>v.height||y.height===v.height&&y.width>v.width?y:v}),x;return l.width>f.height||l.width===f.height&&l.height>f.width?x=l:x=f,x}Z.exports.readSizeFromMeta=function(i){var l={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,l),!!l.sizes.length){var f=o(l.sizes),x=1;l.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?x=u[x]:(x=u[x],x=T[x],x=T[x])),v.type==="irot")for(var b=0;b{function c(S,t){var e=new Error(S);return e.code=t,e}function g(S){try{return decodeURIComponent(escape(S))}catch{return S}}function I(S,t,e){this.input=S.subarray(t,e),this.start=t;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw c("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}I.prototype.each=function(S){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 e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},I.prototype.read_uint16=function(S){var t=this.input;if(S+2>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*256+t[S+1]:t[S]+t[S+1]*256},I.prototype.read_uint32=function(S){var t=this.input;if(S+4>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*16777216+t[S+1]*65536+t[S+2]*256+t[S+3]:t[S]+t[S+1]*256+t[S+2]*65536+t[S+3]*16777216},I.prototype.is_subifd_link=function(S,t){return S===0&&t===34665||S===0&&t===34853||S===34665&&t===40965},I.prototype.exif_format_length=function(S){switch(S){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}},I.prototype.exif_format_read=function(S,t){var e;switch(S){case 1:case 2:return e=this.input[t],e;case 6:return e=this.input[t],e|(e&128)*33554430;case 3:return e=this.read_uint16(t),e;case 8:return e=this.read_uint16(t),e|(e&32768)*131070;case 4:return e=this.read_uint32(t),e;case 9:return e=this.read_uint32(t),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},I.prototype.scan_ifd=function(S,t,e){var r=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw c("unexpected EOF","EBADDATA");for(var v=[],T=x,u=0;u0&&(this.ifds_to_read.push({id:n,offset:v[0]}),y=!0);var _={is_big_endian:this.big_endian,ifd:S,tag:n,format:o,count:i,entry_offset:t+this.start,data_length:f,data_offset:x+this.start,value:v,is_subifd_link:y};if(e(_)===!1){this.aborted=!0;return}t+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},Z.exports.ExifParser=I,Z.exports.get_orientation=function(S){var t=0;try{return new I(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),yN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=vN(),t=pk(),e=c("ftyp");Z.exports=function(r){if(g(r,4,e)){var a=S.unbox(r,0);if(a){var n=S.getMimeType(a.data);if(n){for(var o,i=a.end;;){var l=S.unbox(r,i);if(!l)break;if(i=l.end,l.boxtype==="mdat")return;if(l.boxtype==="meta"){o=l.data;break}}if(o){var f=S.readSizeFromMeta(o);if(f){var x={width:f.width,height:f.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(x.variants=f.variants),f.orientation&&(x.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=r.length){var y=I(r,f.exif_location.offset),v=r.slice(f.exif_location.offset+y+4,f.exif_location.offset+f.exif_location.length),T=t.get_orientation(v);T>0&&(x.orientation=T)}return x}}}}}}}),xN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=c("BM");Z.exports=function(t){if(!(t.length<26)&&g(t,0,S))return{width:I(t,18),height:I(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}),_N=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=c("GIF87a"),t=c("GIF89a");Z.exports=function(e){if(!(e.length<10)&&!(!g(e,0,S)&&!g(e,0,t)))return{width:I(e,6),height:I(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}),bN=Dt((Q,Z)=>{var c=ph().readUInt16LE,g=0,I=1,S=16;Z.exports=function(t){var e=c(t,0),r=c(t,2),a=c(t,4);if(!(e!==g||r!==I||!a)){for(var n=[],o={width:0,height:0},i=0;io.width||f>o.height)&&(o=x)}return{width:o.width,height:o.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}),wN=Dt((Q,Z)=>{var c=ph().readUInt16BE,g=ph().str2arr,I=ph().sliceEq,S=pk(),t=g("Exif\0\0");Z.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var a=e[r++],n;a===255;)a=e[r++];if(208<=a&&a<=217||a===1)n=0;else if(192<=a&&a<=254){if(e.length-r<2)return;n=c(e,r)-2,r+=2}else return;if(a===217||a===218)return;var o;if(a===225&&n>=10&&I(e,r,t)&&(o=S.get_orientation(e.slice(r+6,r+n))),n>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-r0&&(i.orientation=o),i}r+=n}}}),kN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=c(`‰PNG\r +`));var it=new i({actual:mt,expected:st,message:tt,operator:rt,stackStartFn:pt});throw it.generatedMessage=vt,it}}A.match=function mt(st,tt,pt){lt(st,tt,pt,mt,"match")},A.doesNotMatch=function mt(st,tt,pt){lt(st,tt,pt,mt,"doesNotMatch")};function yt(){for(var mt=arguments.length,st=new Array(mt),tt=0;tt{var c=1e3,g=c*60,I=g*60,S=I*24,t=S*365.25;Z.exports=function(o,i){i=i||{};var l=typeof o;if(l==="string"&&o.length>0)return e(o);if(l==="number"&&isNaN(o)===!1)return i.long?a(o):r(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function e(o){if(o=String(o),!(o.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var l=parseFloat(i[1]),f=(i[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return l*t;case"days":case"day":case"d":return l*S;case"hours":case"hour":case"hrs":case"hr":case"h":return l*I;case"minutes":case"minute":case"mins":case"min":case"m":return l*g;case"seconds":case"second":case"secs":case"sec":case"s":return l*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function r(o){return o>=S?Math.round(o/S)+"d":o>=I?Math.round(o/I)+"h":o>=g?Math.round(o/g)+"m":o>=c?Math.round(o/c)+"s":o+"ms"}function a(o){return n(o,S,"day")||n(o,I,"hour")||n(o,g,"minute")||n(o,c,"second")||o+" ms"}function n(o,i,l){if(!(o{Q=Z.exports=I.debug=I.default=I,Q.coerce=r,Q.disable=t,Q.enable=S,Q.enabled=e,Q.humanize=LN(),Q.names=[],Q.skips=[],Q.formatters={};var c;function g(a){var n=0,o;for(o in a)n=(n<<5)-n+a.charCodeAt(o),n|=0;return Q.colors[Math.abs(n)%Q.colors.length]}function I(a){function n(){if(n.enabled){var o=n,i=+new Date,l=i-(c||i);o.diff=l,o.prev=c,o.curr=i,c=i;for(var f=new Array(arguments.length),x=0;x{Q=Z.exports=PN(),Q.log=I,Q.formatArgs=g,Q.save=S,Q.load=t,Q.useColors=c,Q.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:e(),Q.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function c(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Q.formatters.j=function(r){try{return JSON.stringify(r)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function g(r){var a=this.useColors;if(r[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+r[0]+(a?"%c ":" ")+"+"+Q.humanize(this.diff),!!a){var n="color: "+this.color;r.splice(1,0,n,"color: inherit");var o=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(l){l!=="%%"&&(o++,l==="%c"&&(i=o))}),r.splice(i,0,n)}}function I(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(r){try{r==null?Q.storage.removeItem("debug"):Q.storage.debug=r}catch{}}function t(){var r;try{r=Q.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=s.DEBUG),r}Q.enable(t());function e(){try{return window.localStorage}catch{}}}),zN=Dt((Q,Z)=>{var c=e3(),g=IN()("stream-parser");Z.exports=r;var I=-1,S=0,t=1,e=2;function r(u){var b=u&&typeof u._transform=="function",_=u&&typeof u._write=="function";if(!b&&!_)throw new Error("must pass a Writable or Transform stream in");g("extending Parser into stream"),u._bytes=n,u._skipBytes=o,b&&(u._passthrough=i),b?u._transform=f:u._write=l}function a(u){g("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=I,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function n(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||a(this),g("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=S}function o(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=t}function i(u,b){c(!this._parserCallback,'There is already a "callback" set!'),c(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=e}function l(u,b,_){this._parserInit||a(this),g("write(%o bytes)",u.length),typeof b=="function"&&(_=b),v(this,u,null,_)}function f(u,b,_){this._parserInit||a(this),g("transform(%o bytes)",u.length),typeof b!="function"&&(b=this._parserOutput),v(this,u,b,_)}function x(u,b,_,P){return u._parserBytesLeft<=0?P(new Error("got data but not currently parsing anything")):b.length<=u._parserBytesLeft?function(){return y(u,b,_,P)}:function(){var M=b.slice(0,u._parserBytesLeft);return y(u,M,_,function(C){if(C)return P(C);if(b.length>M.length)return function(){return x(u,b.slice(M.length),_,P)}})}}function y(u,b,_,P){if(u._parserBytesLeft-=b.length,g("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(b),u._parserBuffered+=b.length):u._parserState===e&&_(b),u._parserBytesLeft===0){var M=u._parserCallback;if(M&&u._parserState===S&&u._parserBuffers.length>1&&(b=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(b=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=I,u._parserBuffers.splice(0),M){var C=[];b&&C.push(b),_&&C.push(_);var A=M.length>C.length;A&&C.push(T(P));var h=M.apply(u,C);if(!A||P===h)return P}}else return P}var v=T(x);function T(u){return function(){for(var b=u.apply(this,arguments);typeof b=="function";)b=b();return b}}}),mh=Dt(Q=>{var Z=_N().Transform,c=zN();function g(){Z.call(this,{readableObjectMode:!0})}g.prototype=Object.create(Z.prototype),g.prototype.constructor=g,c(g.prototype),Q.ParserStream=g,Q.sliceEq=function(S,t,e){for(var r=t,a=0;a{var c=mh().readUInt16BE,g=mh().readUInt32BE;function I(i,l){if(i.length<4+l)return null;var f=g(i,l);return i.length>4&15,x=i[4]&15,y=i[5]>>4&15,v=c(i,6),T=8,u=0;uv.width||y.width===v.width&&y.height>v.height?y:v}),f=i.reduce(function(y,v){return y.height>v.height||y.height===v.height&&y.width>v.width?y:v}),x;return l.width>f.height||l.width===f.height&&l.height>f.width?x=l:x=f,x}Z.exports.readSizeFromMeta=function(i){var l={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,l),!!l.sizes.length){var f=o(l.sizes),x=1;l.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?x=u[x]:(x=u[x],x=T[x],x=T[x])),v.type==="irot")for(var b=0;b{function c(S,t){var e=new Error(S);return e.code=t,e}function g(S){try{return decodeURIComponent(escape(S))}catch{return S}}function I(S,t,e){this.input=S.subarray(t,e),this.start=t;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw c("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}I.prototype.each=function(S){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 e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},I.prototype.read_uint16=function(S){var t=this.input;if(S+2>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*256+t[S+1]:t[S]+t[S+1]*256},I.prototype.read_uint32=function(S){var t=this.input;if(S+4>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*16777216+t[S+1]*65536+t[S+2]*256+t[S+3]:t[S]+t[S+1]*256+t[S+2]*65536+t[S+3]*16777216},I.prototype.is_subifd_link=function(S,t){return S===0&&t===34665||S===0&&t===34853||S===34665&&t===40965},I.prototype.exif_format_length=function(S){switch(S){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}},I.prototype.exif_format_read=function(S,t){var e;switch(S){case 1:case 2:return e=this.input[t],e;case 6:return e=this.input[t],e|(e&128)*33554430;case 3:return e=this.read_uint16(t),e;case 8:return e=this.read_uint16(t),e|(e&32768)*131070;case 4:return e=this.read_uint32(t),e;case 9:return e=this.read_uint32(t),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},I.prototype.scan_ifd=function(S,t,e){var r=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw c("unexpected EOF","EBADDATA");for(var v=[],T=x,u=0;u0&&(this.ifds_to_read.push({id:n,offset:v[0]}),y=!0);var _={is_big_endian:this.big_endian,ifd:S,tag:n,format:o,count:i,entry_offset:t+this.start,data_length:f,data_offset:x+this.start,value:v,is_subifd_link:y};if(e(_)===!1){this.aborted=!0;return}t+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},Z.exports.ExifParser=I,Z.exports.get_orientation=function(S){var t=0;try{return new I(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),DN=Dt((Q,Z)=>{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt32BE,S=ON(),t=mk(),e=c("ftyp");Z.exports=function(r){if(g(r,4,e)){var a=S.unbox(r,0);if(a){var n=S.getMimeType(a.data);if(n){for(var o,i=a.end;;){var l=S.unbox(r,i);if(!l)break;if(i=l.end,l.boxtype==="mdat")return;if(l.boxtype==="meta"){o=l.data;break}}if(o){var f=S.readSizeFromMeta(o);if(f){var x={width:f.width,height:f.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(x.variants=f.variants),f.orientation&&(x.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=r.length){var y=I(r,f.exif_location.offset),v=r.slice(f.exif_location.offset+y+4,f.exif_location.offset+f.exif_location.length),T=t.get_orientation(v);T>0&&(x.orientation=T)}return x}}}}}}}),FN=Dt((Q,Z)=>{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt16LE,S=c("BM");Z.exports=function(t){if(!(t.length<26)&&g(t,0,S))return{width:I(t,18),height:I(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}),BN=Dt((Q,Z)=>{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt16LE,S=c("GIF87a"),t=c("GIF89a");Z.exports=function(e){if(!(e.length<10)&&!(!g(e,0,S)&&!g(e,0,t)))return{width:I(e,6),height:I(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}),RN=Dt((Q,Z)=>{var c=mh().readUInt16LE,g=0,I=1,S=16;Z.exports=function(t){var e=c(t,0),r=c(t,2),a=c(t,4);if(!(e!==g||r!==I||!a)){for(var n=[],o={width:0,height:0},i=0;io.width||f>o.height)&&(o=x)}return{width:o.width,height:o.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}),NN=Dt((Q,Z)=>{var c=mh().readUInt16BE,g=mh().str2arr,I=mh().sliceEq,S=mk(),t=g("Exif\0\0");Z.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var a=e[r++],n;a===255;)a=e[r++];if(208<=a&&a<=217||a===1)n=0;else if(192<=a&&a<=254){if(e.length-r<2)return;n=c(e,r)-2,r+=2}else return;if(a===217||a===218)return;var o;if(a===225&&n>=10&&I(e,r,t)&&(o=S.get_orientation(e.slice(r+6,r+n))),n>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-r0&&(i.orientation=o),i}r+=n}}}),jN=Dt((Q,Z)=>{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt32BE,S=c(`‰PNG\r  -`),t=c("IHDR");Z.exports=function(e){if(!(e.length<24)&&g(e,0,S)&&g(e,12,t))return{width:I(e,16),height:I(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}),TN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=c("8BPS\0");Z.exports=function(t){if(!(t.length<22)&&g(t,0,S))return{width:I(t,18),height:I(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}),AN=Dt((Q,Z)=>{function c(l){return l===32||l===9||l===13||l===10}function g(l){return typeof l=="number"&&isFinite(l)&&l>0}function I(l){var f=0,x=l.length;for(l[0]===239&&l[1]===187&&l[2]===191&&(f=3);f]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,n=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(l){var f=l.match(e),x=l.match(r),y=l.match(a);return{width:f&&(f[1]||f[2]),height:x&&(x[1]||x[2]),viewbox:y&&(y[1]||y[2])}}function i(l){return n.test(l)?l.match(n)[0]:"px"}Z.exports=function(l){if(I(l)){for(var f="",x=0;x{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=ph().readUInt16BE,t=ph().readUInt32LE,e=ph().readUInt32BE,r=c("II*\0"),a=c("MM\0*");function n(l,f,x){return x?S(l,f):I(l,f)}function o(l,f,x){return x?e(l,f):t(l,f)}function i(l,f,x){var y=n(l,f+2,x),v=o(l,f+4,x);return v!==1||y!==3&&y!==4?null:y===3?n(l,f+8,x):o(l,f+8,x)}Z.exports=function(l){if(!(l.length<8)&&!(!g(l,0,r)&&!g(l,0,a))){var f=l[0]===77,x=o(l,4,f)-8;if(!(x<0)){var y=x+8;if(!(l.length-y<2)){var v=n(l,y+0,f)*12;if(!(v<=0)&&(y+=2,!(l.length-y{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=ph().readUInt32LE,t=pk(),e=c("RIFF"),r=c("WEBP");function a(i,l){if(!(i[l+3]!==157||i[l+4]!==1||i[l+5]!==42))return{width:I(i,l+6)&16383,height:I(i,l+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,l){if(i[l]===47){var f=S(i,l+1);return{width:(f&16383)+1,height:(f>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function o(i,l){return{width:(i[l+6]<<16|i[l+5]<<8|i[l+4])+1,height:(i[l+9]<i.length)){for(;l+8=10?f=f||a(i,l+8):v==="VP8L"&&T>=9?f=f||n(i,l+8):v==="VP8X"&&T>=10?f=f||o(i,l+8):v==="EXIF"&&(x=t.get_orientation(i.slice(l+8,l+8+T)),l=1/0),l+=8+T}if(f)return x>0&&(f.orientation=x),f}}}}),EN=Dt((Q,Z)=>{Z.exports={avif:yN(),bmp:xN(),gif:_N(),ico:bN(),jpeg:wN(),png:kN(),psd:TN(),svg:AN(),tiff:MN(),webp:SN()}}),CN=Dt((Q,Z)=>{var c=EN();function g(I){for(var S=Object.keys(c),t=0;t{var Z=CN(),c=o0().IMAGE_URL_PREFIX,g=ix().Buffer;Q.getImageSize=function(I){var S=I.replace(c,""),t=new g(S,"base64");return Z(t)}}),PN=Dt((Q,Z)=>{var c=kn(),g=nb(),I=Yi(),S=Ls(),t=kn().maxRowLength,e=LN().getImageSize;Z.exports=function(o,i){var l,f;if(i._hasZ)l=i.z.length,f=t(i.z);else if(i._hasSource){var x=e(i.source);l=x.height,f=x.width}var y=S.getFromId(o,i.xaxis||"x"),v=S.getFromId(o,i.yaxis||"y"),T=y.d2c(i.x0)-i.dx/2,u=v.d2c(i.y0)-i.dy/2,b,_=[T,T+f*i.dx],P=[u,u+l*i.dy];if(y&&y.type==="log")for(b=0;b{var c=qr(),g=kn(),I=g.strTranslate,S=Dp(),t=nb(),e=i7(),r=Y6().STYLE;Z.exports=function(a,n,o,i){var l=n.xaxis,f=n.yaxis,x=!a._context._exportedPlot&&e();g.makeTraceGroups(i,o,"im").each(function(y){var v=c.select(this),T=y[0],u=T.trace,b=(u.zsmooth==="fast"||u.zsmooth===!1&&x)&&!u._hasZ&&u._hasSource&&l.type==="linear"&&f.type==="linear";u._realImage=b;var _=T.z,P=T.x0,M=T.y0,C=T.w,A=T.h,h=u.dx,p=u.dy,k,w,R,O,j,V;for(V=0;k===void 0&&V0;)w=l.c2p(P+V*h),V--;for(V=0;O===void 0&&V0;)j=f.c2p(M+V*p),V--;if(wst[0];if(tt||dt){var rt=k+F/2,at=O+U/2;yt+="transform:"+I(rt+"px",at+"px")+"scale("+(tt?-1:1)+","+(dt?-1:1)+")"+I(-rt+"px",-at+"px")+";"}}lt.attr("style",yt);var vt=new Promise(function(it){if(u._hasZ)it();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===C&&u._canvas.el.height===A&&u._canvas.source===u.source)it();else{var Y=document.createElement("canvas");Y.width=C,Y.height=A;var ft=Y.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var ut=u._image;ut.onload=function(){ft.drawImage(ut,0,0),u._canvas={el:Y,source:u.source},it()},ut.setAttribute("src",u.source)}}).then(function(){var it,Y;if(u._hasZ)Y=J(function(kt,It){var Pt=_[It][kt];return g.isTypedArray(Pt)&&(Pt=Array.from(Pt)),Pt}),it=Y.toDataURL("image/png");else if(u._hasSource)if(b)it=u.source;else{var ft=u._canvas.el.getContext("2d",{willReadFrequently:!0}),ut=ft.getImageData(0,0,C,A).data;Y=J(function(kt,It){var Pt=4*(It*C+kt);return[ut[Pt],ut[Pt+1],ut[Pt+2],ut[Pt+3]]}),it=Y.toDataURL("image/png")}lt.attr({"xlink:href":it,height:U,width:F,x:k,y:O})});a._promises.push(vt)})}}),zN=Dt((Q,Z)=>{var c=qr();Z.exports=function(g){c.select(g).selectAll(".im image").style("opacity",function(I){return I[0].trace.opacity})}}),ON=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=nb();Z.exports=function(t,e,r){var a=t.cd[0],n=a.trace,o=t.xa,i=t.ya;if(!(c.inbox(e-a.x0,e-(a.x0+a.w*n.dx),0)>0||c.inbox(r-a.y0,r-(a.y0+a.h*n.dy),0)>0)){var l=Math.floor((e-a.x0)/n.dx),f=Math.floor(Math.abs(r-a.y0)/n.dy),x;if(n._hasZ?x=a.z[f][l]:n._hasSource&&(x=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,f,1,1).data),!!x){var y=a.hi||n.hoverinfo,v;if(y){var T=y.split("+");T.indexOf("all")!==-1&&(T=["color"]),T.indexOf("color")!==-1&&(v=!0)}var u=S.colormodel[n.colormodel],b=u.colormodel||n.colormodel,_=b.length,P=n._scaler(x),M=u.suffix,C=[];(n.hovertemplate||v)&&(C.push("["+[P[0]+M[0],P[1]+M[1],P[2]+M[2]].join(", ")),_===4&&C.push(", "+P[3]+M[3]),C.push("]"),C=C.join(""),t.extraText=b.toUpperCase()+": "+C);var A;I(n.hovertext)&&I(n.hovertext[f])?A=n.hovertext[f][l]:I(n.text)&&I(n.text[f])&&(A=n.text[f][l]);var h=i.c2p(a.y0+(f+.5)*n.dy),p=a.x0+(l+.5)*n.dx,k=a.y0+(f+.5)*n.dy,w="["+x.slice(0,n.colormodel.length).join(", ")+"]";return[g.extendFlat(t,{index:[f,l],x0:o.c2p(a.x0+l*n.dx),x1:o.c2p(a.x0+(l+1)*n.dx),y0:h,y1:h,color:P,xVal:p,xLabelVal:p,yVal:k,yLabelVal:k,zLabelVal:w,text:A,hovertemplateLabels:{zLabel:w,colorLabel:C,"color[0]Label":P[0]+M[0],"color[1]Label":P[1]+M[1],"color[2]Label":P[2]+M[2],"color[3]Label":P[3]+M[3]}})]}}}}),DN=Dt((Q,Z)=>{Z.exports=function(c,g){return"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c.color=g.color,c.colormodel=g.trace.colormodel,c.z||(c.z=g.color),c}}),FN=Dt((Q,Z)=>{Z.exports={attributes:L7(),supplyDefaults:yB(),calc:PN(),plot:IN(),style:zN(),hoverPoints:ON(),eventData:DN(),moduleType:"trace",name:"image",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}),RN=Dt((Q,Z)=>{Z.exports=FN()}),lx=Dt((Q,Z)=>{var c=Ho(),g=jh().attributes,I=da(),S=wi(),{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=kd().pattern,o=I({editType:"plot",arrayOk:!0,colorEditType:"plot"});Z.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:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:n,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:a({},c.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},o,{}),outsidetextfont:a({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({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"}}}),ux=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=lx(),S=jh().defaults,t=J0().handleText,e=kn().coercePattern;function r(o,i){var l=g.isArrayOrTypedArray(o),f=g.isArrayOrTypedArray(i),x=Math.min(l?o.length:1/0,f?i.length:1/0);if(isFinite(x)||(x=0),x&&f){for(var y,v=0;v0){y=!0;break}}y||(x=0)}return{hasLabels:l,hasValues:f,len:x}}function a(o,i,l,f,x){var y=f("marker.line.width");y&&f("marker.line.color",x?void 0:l.paper_bgcolor);var v=f("marker.colors");e(f,"marker.pattern",v),o.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=o.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=l.paper_bgcolor)}function n(o,i,l,f){function x(w,R){return g.coerce(o,i,I,w,R)}var y=x("labels"),v=x("values"),T=r(y,v),u=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(x("label0"),x("dlabel")),!u){i.visible=!1;return}i._length=u,a(o,i,f,x,!0),x("scalegroup");var b=x("text"),_=x("texttemplate");x("texttemplatefallback");var P;if(_||(P=x("textinfo",g.isArrayOrTypedArray(b)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),_||P&&P!=="none"){var M=x("textposition");t(o,i,f,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var C=Array.isArray(M)||M==="auto",A=C||M==="outside";A&&x("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&x("insidetextorientation")}else P==="none"&&x("textposition","none");S(i,f,x);var h=x("hole"),p=x("title.text");if(p){var k=x("title.position",h?"middle center":"top center");!h&&k==="middle center"&&(i.title.position="top center"),g.coerceFont(x,"title.font",f.font)}x("sort"),x("direction"),x("rotation"),x("pull")}Z.exports={handleLabelsAndValues:r,handleMarkerDefaults:a,supplyDefaults:n}}),mk=Dt((Q,Z)=>{Z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),BN=Dt((Q,Z)=>{var c=kn(),g=mk();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("piecolorway",S.colorway),t("extendpiecolors")}}),lb=Dt((Q,Z)=>{var c=Yi(),g=ro(),I=hi(),S={};function t(n,o){var i=[],l=n._fullLayout,f=l.hiddenlabels||[],x=o.labels,y=o.marker.colors||[],v=o.values,T=o._length,u=o._hasValues&&T,b,_;if(o.dlabel)for(x=new Array(T),b=0;b=0});var R=o.type==="funnelarea"?A:o.sort;return R&&i.sort(function(O,j){return j.v-O.v}),i[0]&&(i[0].vTotal=C),i}function e(n){return function(o,i){return!o||(o=g(o),!o.isValid())?!1:(o=I.addOpacity(o,o.getAlpha()),n[i]||(n[i]=o),o)}}function r(n,o){var i=(o||{}).type;i||(i="pie");var l=n._fullLayout,f=n.calcdata,x=l[i+"colorway"],y=l["_"+i+"colormap"];l["extend"+i+"colors"]&&(x=a(x,S));for(var v=0,T=0;T{var c=Fp().appendArrayMultiPointValues;Z.exports=function(g,I){var S={curveNumber:I.index,pointNumbers:g.pts,data:I._input,fullData:I,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(S.pointNumber=S.i=g.pts[0]),c(S,I,g.pts),I.type==="funnelarea"&&(delete S.v,delete S.i),S}}),gk=Dt((Q,Z)=>{var c=qr(),g=Kc(),I=tf(),S=hi(),t=Vs(),e=kn(),r=e.strScale,a=e.strTranslate,n=ec(),o=Bp(),i=o.recordMinTextSize,l=o.clearMinTextSize,f=rx().TEXTPAD,x=wg(),y=NN(),v=kn().isValidTextValue;function T(dt,rt){var at=dt._context.staticPlot,vt=dt._fullLayout,it=vt._size;l("pie",vt),M(rt,dt),J(rt,it);var Y=e.makeTraceGroups(vt._pielayer,rt,"trace").each(function(ft){var ut=c.select(this),kt=ft[0],It=kt.trace;yt(ft),ut.attr("stroke-linejoin","round"),ut.each(function(){var Pt=c.select(this).selectAll("g.slice").data(ft);Pt.enter().append("g").classed("slice",!0),Pt.exit().remove();var qt=[[[],[]],[[],[]]],Wt=!1;Pt.each(function(Mt,ee){if(Mt.hidden){c.select(this).selectAll("path,g").remove();return}Mt.pointNumber=Mt.i,Mt.curveNumber=It.index,qt[Mt.pxmid[1]<0?0:1][Mt.pxmid[0]<0?0:1].push(Mt);var ve=kt.cx,oe=kt.cy,Te=c.select(this),He=Te.selectAll("path.surface").data([Mt]);if(He.enter().append("path").classed("surface",!0).style({"pointer-events":at?"none":"all"}),Te.call(b,dt,ft),It.pull){var Ge=+x.castOption(It.pull,Mt.pts)||0;Ge>0&&(ve+=Ge*Mt.pxmid[0],oe+=Ge*Mt.pxmid[1])}Mt.cxFinal=ve,Mt.cyFinal=oe;function cr(Le,Gt,ne,Ct){var gt=Ct*(Gt[0]-Le[0]),St=Ct*(Gt[1]-Le[1]);return"a"+Ct*kt.r+","+Ct*kt.r+" 0 "+Mt.largeArc+(ne?" 1 ":" 0 ")+gt+","+St}var ur=It.hole;if(Mt.v===kt.vTotal){var jr="M"+(ve+Mt.px0[0])+","+(oe+Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!0,1)+cr(Mt.pxmid,Mt.px0,!0,1)+"Z";ur?He.attr("d","M"+(ve+ur*Mt.px0[0])+","+(oe+ur*Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!1,ur)+cr(Mt.pxmid,Mt.px0,!1,ur)+"Z"+jr):He.attr("d",jr)}else{var Wr=cr(Mt.px0,Mt.px1,!0,1);if(ur){var br=1-ur;He.attr("d","M"+(ve+ur*Mt.px1[0])+","+(oe+ur*Mt.px1[1])+cr(Mt.px1,Mt.px0,!1,ur)+"l"+br*Mt.px0[0]+","+br*Mt.px0[1]+Wr+"Z")}else He.attr("d","M"+ve+","+oe+"l"+Mt.px0[0]+","+Mt.px0[1]+Wr+"Z")}st(dt,Mt,kt);var Xr=x.castOption(It.textposition,Mt.pts),nn=Te.selectAll("g.slicetext").data(Mt.text&&Xr!=="none"?[0]:[]);nn.enter().append("g").classed("slicetext",!0),nn.exit().remove(),nn.each(function(){var Le=e.ensureSingle(c.select(this),"text","",function(le){le.attr("data-notex",1)}),Gt=e.ensureUniformFontSize(dt,Xr==="outside"?_(It,Mt,vt.font):P(It,Mt,vt.font));Le.text(Mt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,Gt).call(n.convertToTspans,dt);var ne=t.bBox(Le.node()),Ct;if(Xr==="outside")Ct=j(ne,Mt);else if(Ct=C(ne,Mt,kt),Xr==="auto"&&Ct.scale<1){var gt=e.ensureUniformFontSize(dt,It.outsidetextfont);Le.call(t.font,gt),ne=t.bBox(Le.node()),Ct=j(ne,Mt)}var St=Ct.textPosAngle,Nt=St===void 0?Mt.pxmid:mt(kt.r,St);if(Ct.targetX=ve+Nt[0]*Ct.rCenter+(Ct.x||0),Ct.targetY=oe+Nt[1]*Ct.rCenter+(Ct.y||0),tt(Ct,ne),Ct.outside){var re=Ct.targetY;Mt.yLabelMin=re-ne.height/2,Mt.yLabelMid=re,Mt.yLabelMax=re+ne.height/2,Mt.labelExtraX=0,Mt.labelExtraY=0,Wt=!0}Ct.fontSize=Gt.size,i(It.type,Ct,vt),ft[ee].transform=Ct,e.setTransormAndDisplay(Le,Ct)})});var Jt=c.select(this).selectAll("g.titletext").data(It.title.text?[0]:[]);if(Jt.enter().append("g").classed("titletext",!0),Jt.exit().remove(),Jt.each(function(){var Mt=e.ensureSingle(c.select(this),"text","",function(oe){oe.attr("data-notex",1)}),ee=It.title.text;It._meta&&(ee=e.templateString(ee,It._meta)),Mt.text(ee).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,It.title.font).call(n.convertToTspans,dt);var ve;It.title.position==="middle center"?ve=V(kt):ve=H(kt,it),Mt.attr("transform",a(ve.x,ve.y)+r(Math.min(1,ve.scale))+a(ve.tx,ve.ty))}),Wt&&q(qt,It),u(Pt,It),Wt&&It.automargin){var ge=t.bBox(ut.node()),fe=It.domain,pe=it.w*(fe.x[1]-fe.x[0]),se=it.h*(fe.y[1]-fe.y[0]),Tt=(.5*pe-kt.r)/it.w,Lt=(.5*se-kt.r)/it.h;g.autoMargin(dt,"pie."+It.uid+".automargin",{xl:fe.x[0]-Tt,xr:fe.x[1]+Tt,yb:fe.y[0]-Lt,yt:fe.y[1]+Lt,l:Math.max(kt.cx-kt.r-ge.left,0),r:Math.max(ge.right-(kt.cx+kt.r),0),b:Math.max(ge.bottom-(kt.cy+kt.r),0),t:Math.max(kt.cy-kt.r-ge.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ft=c.select(this);ft.attr("dy")&&ft.attr("dy",ft.attr("dy"))})},0)}function u(dt,rt){dt.each(function(at){var vt=c.select(this);if(!at.labelExtraX&&!at.labelExtraY){vt.select("path.textline").remove();return}var it=vt.select("g.slicetext text");at.transform.targetX+=at.labelExtraX,at.transform.targetY+=at.labelExtraY,e.setTransormAndDisplay(it,at.transform);var Y=at.cxFinal+at.pxmid[0],ft=at.cyFinal+at.pxmid[1],ut="M"+Y+","+ft,kt=(at.yLabelMax-at.yLabelMin)*(at.pxmid[0]<0?-1:1)/4;if(at.labelExtraX){var It=at.labelExtraX*at.pxmid[1]/at.pxmid[0],Pt=at.yLabelMid+at.labelExtraY-(at.cyFinal+at.pxmid[1]);Math.abs(It)>Math.abs(Pt)?ut+="l"+Pt*at.pxmid[0]/at.pxmid[1]+","+Pt+"H"+(Y+at.labelExtraX+kt):ut+="l"+at.labelExtraX+","+It+"v"+(Pt-It)+"h"+kt}else ut+="V"+(at.yLabelMid+at.labelExtraY)+"h"+kt;e.ensureSingle(vt,"path","textline").call(S.stroke,rt.outsidetextfont.color).attr({"stroke-width":Math.min(2,rt.outsidetextfont.size/8),d:ut,fill:"none"})})}function b(dt,rt,at){var vt=at[0],it=vt.cx,Y=vt.cy,ft=vt.trace,ut=ft.type==="funnelarea";"_hasHoverLabel"in ft||(ft._hasHoverLabel=!1),"_hasHoverEvent"in ft||(ft._hasHoverEvent=!1),dt.on("mouseover",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];if(!(rt._dragging||It.hovermode===!1)){var qt=Pt.hoverinfo;if(Array.isArray(qt)&&(qt=I.castHoverinfo({hoverinfo:[x.castOption(qt,kt.pts)],_module:ft._module},It,0)),qt==="all"&&(qt="label+text+value+percent+name"),Pt.hovertemplate||qt!=="none"&&qt!=="skip"&&qt){var Wt=kt.rInscribed||0,Jt=it+kt.pxmid[0]*(1-Wt),ge=Y+kt.pxmid[1]*(1-Wt),fe=It.separators,pe=[];if(qt&&qt.indexOf("label")!==-1&&pe.push(kt.label),kt.text=x.castOption(Pt.hovertext||Pt.text,kt.pts),qt&&qt.indexOf("text")!==-1){var se=kt.text;e.isValidTextValue(se)&&pe.push(se)}kt.value=kt.v,kt.valueLabel=x.formatPieValue(kt.v,fe),qt&&qt.indexOf("value")!==-1&&pe.push(kt.valueLabel),kt.percent=kt.v/vt.vTotal,kt.percentLabel=x.formatPiePercent(kt.percent,fe),qt&&qt.indexOf("percent")!==-1&&pe.push(kt.percentLabel);var Tt=Pt.hoverlabel,Lt=Tt.font,Mt=[];I.loneHover({trace:ft,x0:Jt-Wt*vt.r,x1:Jt+Wt*vt.r,y:ge,_x0:ut?it+kt.TL[0]:Jt-Wt*vt.r,_x1:ut?it+kt.TR[0]:Jt+Wt*vt.r,_y0:ut?Y+kt.TL[1]:ge-Wt*vt.r,_y1:ut?Y+kt.BL[1]:ge+Wt*vt.r,text:pe.join("
"),name:Pt.hovertemplate||qt.indexOf("name")!==-1?Pt.name:void 0,idealAlign:kt.pxmid[0]<0?"left":"right",color:x.castOption(Tt.bgcolor,kt.pts)||kt.color,borderColor:x.castOption(Tt.bordercolor,kt.pts),fontFamily:x.castOption(Lt.family,kt.pts),fontSize:x.castOption(Lt.size,kt.pts),fontColor:x.castOption(Lt.color,kt.pts),nameLength:x.castOption(Tt.namelength,kt.pts),textAlign:x.castOption(Tt.align,kt.pts),hovertemplate:x.castOption(Pt.hovertemplate,kt.pts),hovertemplateLabels:kt,eventData:[y(kt,Pt)]},{container:It._hoverlayer.node(),outerContainer:It._paper.node(),gd:rt,inOut_bbox:Mt}),kt.bbox=Mt[0],ft._hasHoverLabel=!0}ft._hasHoverEvent=!0,rt.emit("plotly_hover",{points:[y(kt,Pt)],event:c.event})}}),dt.on("mouseout",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index],qt=c.select(this).datum();ft._hasHoverEvent&&(kt.originalEvent=c.event,rt.emit("plotly_unhover",{points:[y(qt,Pt)],event:c.event}),ft._hasHoverEvent=!1),ft._hasHoverLabel&&(I.loneUnhover(It._hoverlayer.node()),ft._hasHoverLabel=!1)}),dt.on("click",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];rt._dragging||It.hovermode===!1||(rt._hoverdata=[y(kt,Pt)],I.click(rt,c.event))})}function _(dt,rt,at){var vt=x.castOption(dt.outsidetextfont.color,rt.pts)||x.castOption(dt.textfont.color,rt.pts)||at.color,it=x.castOption(dt.outsidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.outsidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.outsidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.outsidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,kt=x.castOption(dt.outsidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,It=x.castOption(dt.outsidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.outsidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(dt.outsidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt,family:it,size:Y,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function P(dt,rt,at){var vt=x.castOption(dt.insidetextfont.color,rt.pts);!vt&&dt._input.textfont&&(vt=x.castOption(dt._input.textfont.color,rt.pts));var it=x.castOption(dt.insidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.insidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.insidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.insidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,kt=x.castOption(dt.insidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,It=x.castOption(dt.insidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.insidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(dt.insidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt||S.contrast(rt.color),family:it,size:Y,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function M(dt,rt){for(var at,vt,it=0;it=-4;Tt-=2)se(Math.PI*Tt,"tan");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1),"tan")}if(qt||Jt){for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1.5),"rad");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+.5),"rad")}}if(ut||ge||qt){var Lt=Math.sqrt(dt.width*dt.width+dt.height*dt.height);if(pe={scale:it*vt*2/Lt,rCenter:1-it,rotate:0},pe.textPosAngle=(rt.startangle+rt.stopangle)/2,pe.scale>=1)return pe;fe.push(pe)}(ge||Jt)&&(pe=h(dt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe)),(ge||Wt)&&(pe=p(dt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe));for(var Mt=0,ee=0,ve=0;ve=1)break}return fe[Mt]}function A(dt,rt){var at=dt.startangle,vt=dt.stopangle;return at>rt&&rt>vt||at0?1:-1)/2,y:Y/(1+at*at/(vt*vt)),outside:!0}}function V(dt){var rt=Math.sqrt(dt.titleBox.width*dt.titleBox.width+dt.titleBox.height*dt.titleBox.height);return{x:dt.cx,y:dt.cy,scale:dt.trace.hole*dt.r*2/rt,tx:0,ty:-dt.titleBox.height/2+dt.trace.title.font.size}}function H(dt,rt){var at=1,vt=1,it,Y=dt.trace,ft={x:dt.cx,y:dt.cy},ut={tx:0,ty:0};ut.ty+=Y.title.font.size,it=W(Y),Y.title.position.indexOf("top")!==-1?(ft.y-=(1+it)*dt.r,ut.ty-=dt.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ft.y+=(1+it)*dt.r);var kt=F(dt.r,dt.trace.aspectratio),It=rt.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(It=It+kt,ft.x-=(1+it)*kt,ut.tx+=dt.titleBox.width/2):Y.title.position.indexOf("center")!==-1?It*=2:Y.title.position.indexOf("right")!==-1&&(It=It+kt,ft.x+=(1+it)*kt,ut.tx-=dt.titleBox.width/2),at=It/dt.titleBox.width,vt=U(dt,rt)/dt.titleBox.height,{x:ft.x,y:ft.y,scale:Math.min(at,vt),tx:ut.tx,ty:ut.ty}}function F(dt,rt){return dt/(rt===void 0?1:rt)}function U(dt,rt){var at=dt.trace,vt=rt.h*(at.domain.y[1]-at.domain.y[0]);return Math.min(dt.titleBox.height,vt/2)}function W(dt){var rt=dt.pull;if(!rt)return 0;var at;if(e.isArrayOrTypedArray(rt))for(rt=0,at=0;atrt&&(rt=dt.pull[at]);return rt}function q(dt,rt){var at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge;function fe(Lt,Mt){return Lt.pxmid[1]-Mt.pxmid[1]}function pe(Lt,Mt){return Mt.pxmid[1]-Lt.pxmid[1]}function se(Lt,Mt){Mt||(Mt={});var ee=Mt.labelExtraY+(vt?Mt.yLabelMax:Mt.yLabelMin),ve=vt?Lt.yLabelMin:Lt.yLabelMax,oe=vt?Lt.yLabelMax:Lt.yLabelMin,Te=Lt.cyFinal+ft(Lt.px0[1],Lt.px1[1]),He=ee-ve,Ge,cr,ur,jr,Wr,br;if(He*kt>0&&(Lt.labelExtraY=He),!!e.isArrayOrTypedArray(rt.pull))for(cr=0;cr=(x.castOption(rt.pull,ur.pts)||0))&&((Lt.pxmid[1]-ur.pxmid[1])*kt>0?(jr=ur.cyFinal+ft(ur.px0[1],ur.px1[1]),He=jr-ve-Lt.labelExtraY,He*kt>0&&(Lt.labelExtraY+=He)):(oe+Lt.labelExtraY-Te)*kt>0&&(Ge=3*ut*Math.abs(cr-qt.indexOf(Lt)),Wr=ur.cxFinal+Y(ur.px0[0],ur.px1[0]),br=Wr+Ge-(Lt.cxFinal+Lt.pxmid[0])-Lt.labelExtraX,br*ut>0&&(Lt.labelExtraX+=br)))}for(vt=0;vt<2;vt++)for(it=vt?fe:pe,ft=vt?Math.max:Math.min,kt=vt?1:-1,at=0;at<2;at++){for(Y=at?Math.max:Math.min,ut=at?1:-1,It=dt[vt][at],It.sort(it),Pt=dt[1-vt][at],qt=Pt.concat(It),Jt=[],Wt=0;Wt1?(It=at.r,Pt=It/it.aspectratio):(Pt=at.r,It=Pt*it.aspectratio),It*=(1+it.baseratio)/2,kt=It*Pt}ft=Math.min(ft,kt/at.vTotal)}for(vt=0;vtrt.vTotal/2?1:0,It.halfangle=Math.PI*Math.min(It.v/rt.vTotal,.5),It.ring=1-vt.hole,It.rInscribed=O(It,rt))}function mt(dt,rt){return[dt*Math.sin(rt),-dt*Math.cos(rt)]}function st(dt,rt,at){var vt=dt._fullLayout,it=at.trace,Y=it.texttemplate,ft=it.textinfo;if(!Y&&ft&&ft!=="none"){var ut=ft.split("+"),kt=function(Mt){return ut.indexOf(Mt)!==-1},It=kt("label"),Pt=kt("text"),qt=kt("value"),Wt=kt("percent"),Jt=vt.separators,ge;if(ge=It?[rt.label]:[],Pt){var fe=x.getFirstFilled(it.text,rt.pts);v(fe)&&ge.push(fe)}qt&&ge.push(x.formatPieValue(rt.v,Jt)),Wt&&ge.push(x.formatPiePercent(rt.v/at.vTotal,Jt)),rt.text=ge.join("
")}function pe(Mt){return{label:Mt.label,value:Mt.v,valueLabel:x.formatPieValue(Mt.v,vt.separators),percent:Mt.v/at.vTotal,percentLabel:x.formatPiePercent(Mt.v/at.vTotal,vt.separators),color:Mt.color,text:Mt.text,customdata:e.castOption(it,Mt.i,"customdata")}}if(Y){var se=e.castOption(it,rt.i,"texttemplate");if(!se)rt.text="";else{var Tt=pe(rt),Lt=x.getFirstFilled(it.text,rt.pts);(v(Lt)||Lt==="")&&(Tt.text=Lt),rt.text=e.texttemplateString({data:[Tt,it._meta],fallback:it.texttemplatefallback,labels:Tt,locale:dt._fullLayout._d3locale,template:se})}}}function tt(dt,rt){var at=dt.rotate*Math.PI/180,vt=Math.cos(at),it=Math.sin(at),Y=(rt.left+rt.right)/2,ft=(rt.top+rt.bottom)/2;dt.textX=Y*vt-ft*it,dt.textY=Y*it+ft*vt,dt.noCenter=!0}Z.exports={plot:T,formatSliceLabel:st,transformInsideText:C,determineInsideTextFont:P,positionTitleOutside:H,prerenderTitles:M,layoutAreas:J,attachFxHandlers:b,computeTransform:tt}}),jN=Dt((Q,Z)=>{var c=qr(),g=kg(),I=Bp().resizeText;Z.exports=function(S){var t=S._fullLayout._pielayer.selectAll(".trace");I(S,t,"pie"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),UN=Dt(Q=>{var Z=Kc();Q.name="pie",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),VN=Dt((Q,Z)=>{Z.exports={attributes:lx(),supplyDefaults:ux().supplyDefaults,supplyLayoutDefaults:BN(),layoutAttributes:mk(),calc:lb().calc,crossTraceCalc:lb().crossTraceCalc,plot:gk().plot,style:jN(),styleOne:kg(),moduleType:"trace",name:"pie",basePlotModule:UN(),categories:["pie-like","pie","showLegend"],meta:{}}}),HN=Dt((Q,Z)=>{Z.exports=VN()}),WN=Dt(Q=>{var Z=Kc();Q.name="sunburst",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),e9=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}),e3=Dt((Q,Z)=>{var c=Ho(),{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=jh().attributes,r=lx(),a=e9(),n=Ia().extendFlat,o=kd().pattern;Z.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:n({colors:{valType:"data_array",editType:"calc"},line:{color:n({},r.marker.line.color,{dflt:null}),width:n({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:o,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:I({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:r.hovertext,hoverinfo:n({},c.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:n({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}),r9=Dt((Q,Z)=>{Z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),qN=Dt((Q,Z)=>{var c=kn(),g=e3(),I=jh().defaults,S=J0().handleText,t=ux().handleMarkerDefaults,e=Xc(),r=e.hasColorscale,a=e.handleDefaults;Z.exports=function(n,o,i,l){function f(_,P){return c.coerce(n,o,g,_,P)}var x=f("labels"),y=f("parents");if(!x||!x.length||!y||!y.length){o.visible=!1;return}var v=f("values");v&&v.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),t(n,o,l,f);var T=o._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;T&&a(n,o,l,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",T?1:.7);var u=f("text");f("texttemplate"),f("texttemplatefallback"),o.texttemplate||f("textinfo",c.isArrayOrTypedArray(u)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var b="auto";S(n,o,l,f,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),I(o,l,f),o._length=null}}),$N=Dt((Q,Z)=>{var c=kn(),g=r9();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("sunburstcolorway",S.colorway),t("extendsunburstcolors")}}),r3=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(Ct,gt){return Ct.parent===gt.parent?1:2}function I(Ct){return Ct.reduce(S,0)/Ct.length}function S(Ct,gt){return Ct+gt.x}function t(Ct){return 1+Ct.reduce(e,0)}function e(Ct,gt){return Math.max(Ct,gt.y)}function r(Ct){for(var gt;gt=Ct.children;)Ct=gt[0];return Ct}function a(Ct){for(var gt;gt=Ct.children;)Ct=gt[gt.length-1];return Ct}function n(){var Ct=g,gt=1,St=1,Nt=!1;function re(le){var we,Ue=0;le.eachAfter(function(mr){var Qr=mr.children;Qr?(mr.x=I(Qr),mr.y=t(Qr)):(mr.x=we?Ue+=Ct(mr,we):0,mr.y=0,we=mr)});var qe=r(le),or=a(le),Sr=qe.x-Ct(qe,or)/2,Ar=or.x+Ct(or,qe)/2;return le.eachAfter(Nt?function(mr){mr.x=(mr.x-le.x)*gt,mr.y=(le.y-mr.y)*St}:function(mr){mr.x=(mr.x-Sr)/(Ar-Sr)*gt,mr.y=(1-(le.y?mr.y/le.y:1))*St})}return re.separation=function(le){return arguments.length?(Ct=le,re):Ct},re.size=function(le){return arguments.length?(Nt=!1,gt=+le[0],St=+le[1],re):Nt?null:[gt,St]},re.nodeSize=function(le){return arguments.length?(Nt=!0,gt=+le[0],St=+le[1],re):Nt?[gt,St]:null},re}function o(Ct){var gt=0,St=Ct.children,Nt=St&&St.length;if(!Nt)gt=1;else for(;--Nt>=0;)gt+=St[Nt].value;Ct.value=gt}function i(){return this.eachAfter(o)}function l(Ct){var gt=this,St,Nt=[gt],re,le,we;do for(St=Nt.reverse(),Nt=[];gt=St.pop();)if(Ct(gt),re=gt.children,re)for(le=0,we=re.length;le=0;--re)St.push(Nt[re]);return this}function x(Ct){for(var gt=this,St=[gt],Nt=[],re,le,we;gt=St.pop();)if(Nt.push(gt),re=gt.children,re)for(le=0,we=re.length;le=0;)St+=Nt[re].value;gt.value=St})}function v(Ct){return this.eachBefore(function(gt){gt.children&>.children.sort(Ct)})}function T(Ct){for(var gt=this,St=u(gt,Ct),Nt=[gt];gt!==St;)gt=gt.parent,Nt.push(gt);for(var re=Nt.length;Ct!==St;)Nt.splice(re,0,Ct),Ct=Ct.parent;return Nt}function u(Ct,gt){if(Ct===gt)return Ct;var St=Ct.ancestors(),Nt=gt.ancestors(),re=null;for(Ct=St.pop(),gt=Nt.pop();Ct===gt;)re=Ct,Ct=St.pop(),gt=Nt.pop();return re}function b(){for(var Ct=this,gt=[Ct];Ct=Ct.parent;)gt.push(Ct);return gt}function _(){var Ct=[];return this.each(function(gt){Ct.push(gt)}),Ct}function P(){var Ct=[];return this.eachBefore(function(gt){gt.children||Ct.push(gt)}),Ct}function M(){var Ct=this,gt=[];return Ct.each(function(St){St!==Ct&>.push({source:St.parent,target:St})}),gt}function C(Ct,gt){var St=new w(Ct),Nt=+Ct.value&&(St.value=Ct.value),re,le=[St],we,Ue,qe,or;for(gt==null&&(gt=h);re=le.pop();)if(Nt&&(re.value=+re.data.value),(Ue=gt(re.data))&&(or=Ue.length))for(re.children=new Array(or),qe=or-1;qe>=0;--qe)le.push(we=re.children[qe]=new w(Ue[qe])),we.parent=re,we.depth=re.depth+1;return St.eachBefore(k)}function A(){return C(this).eachBefore(p)}function h(Ct){return Ct.children}function p(Ct){Ct.data=Ct.data.data}function k(Ct){var gt=0;do Ct.height=gt;while((Ct=Ct.parent)&&Ct.height<++gt)}function w(Ct){this.data=Ct,this.depth=this.height=0,this.parent=null}w.prototype=C.prototype={constructor:w,count:i,each:l,eachAfter:x,eachBefore:f,sum:y,sort:v,path:T,ancestors:b,descendants:_,leaves:P,links:M,copy:A};var R=Array.prototype.slice;function O(Ct){for(var gt=Ct.length,St,Nt;gt;)Nt=Math.random()*gt--|0,St=Ct[gt],Ct[gt]=Ct[Nt],Ct[Nt]=St;return Ct}function j(Ct){for(var gt=0,St=(Ct=O(R.call(Ct))).length,Nt=[],re,le;gt0&&St*St>Nt*Nt+re*re}function U(Ct,gt){for(var St=0;Stqe?(re=(or+qe-le)/(2*or),Ue=Math.sqrt(Math.max(0,qe/or-re*re)),St.x=Ct.x-re*Nt-Ue*we,St.y=Ct.y-re*we+Ue*Nt):(re=(or+le-qe)/(2*or),Ue=Math.sqrt(Math.max(0,le/or-re*re)),St.x=gt.x+re*Nt-Ue*we,St.y=gt.y+re*we+Ue*Nt)):(St.x=gt.x+St.r,St.y=gt.y)}function mt(Ct,gt){var St=Ct.r+gt.r-1e-6,Nt=gt.x-Ct.x,re=gt.y-Ct.y;return St>0&&St*St>Nt*Nt+re*re}function st(Ct){var gt=Ct._,St=Ct.next._,Nt=gt.r+St.r,re=(gt.x*St.r+St.x*gt.r)/Nt,le=(gt.y*St.r+St.y*gt.r)/Nt;return re*re+le*le}function tt(Ct){this._=Ct,this.next=null,this.previous=null}function dt(Ct){if(!(re=Ct.length))return 0;var gt,St,Nt,re,le,we,Ue,qe,or,Sr,Ar;if(gt=Ct[0],gt.x=0,gt.y=0,!(re>1))return gt.r;if(St=Ct[1],gt.x=-St.r,St.x=gt.r,St.y=0,!(re>2))return gt.r+St.r;yt(St,gt,Nt=Ct[2]),gt=new tt(gt),St=new tt(St),Nt=new tt(Nt),gt.next=Nt.previous=St,St.next=gt.previous=Nt,Nt.next=St.previous=gt;t:for(Ue=3;Ue0)throw new Error("cycle");return Ue}return St.id=function(Nt){return arguments.length?(Ct=vt(Nt),St):Ct},St.parentId=function(Nt){return arguments.length?(gt=vt(Nt),St):gt},St}function Mt(Ct,gt){return Ct.parent===gt.parent?1:2}function ee(Ct){var gt=Ct.children;return gt?gt[0]:Ct.t}function ve(Ct){var gt=Ct.children;return gt?gt[gt.length-1]:Ct.t}function oe(Ct,gt,St){var Nt=St/(gt.i-Ct.i);gt.c-=Nt,gt.s+=St,Ct.c+=Nt,gt.z+=St,gt.m+=St}function Te(Ct){for(var gt=0,St=0,Nt=Ct.children,re=Nt.length,le;--re>=0;)le=Nt[re],le.z+=gt,le.m+=gt,gt+=le.s+(St+=le.c)}function He(Ct,gt,St){return Ct.a.parent===gt.parent?Ct.a:St}function Ge(Ct,gt){this._=Ct,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=gt}Ge.prototype=Object.create(w.prototype);function cr(Ct){for(var gt=new Ge(Ct,0),St,Nt=[gt],re,le,we,Ue;St=Nt.pop();)if(le=St._.children)for(St.children=new Array(Ue=le.length),we=Ue-1;we>=0;--we)Nt.push(re=St.children[we]=new Ge(le[we],we)),re.parent=St;return(gt.parent=new Ge(null,0)).children=[gt],gt}function ur(){var Ct=Mt,gt=1,St=1,Nt=null;function re(or){var Sr=cr(or);if(Sr.eachAfter(le),Sr.parent.m=-Sr.z,Sr.eachBefore(we),Nt)or.eachBefore(qe);else{var Ar=or,mr=or,Qr=or;or.eachBefore(function(oi){oi.xmr.x&&(mr=oi),oi.depth>Qr.depth&&(Qr=oi)});var Hn=Ar===mr?1:Ct(Ar,mr)/2,Wn=Hn-Ar.x,Xn=gt/(mr.x+Hn+Wn),Ii=St/(Qr.depth||1);or.eachBefore(function(oi){oi.x=(oi.x+Wn)*Xn,oi.y=oi.depth*Ii})}return or}function le(or){var Sr=or.children,Ar=or.parent.children,mr=or.i?Ar[or.i-1]:null;if(Sr){Te(or);var Qr=(Sr[0].z+Sr[Sr.length-1].z)/2;mr?(or.z=mr.z+Ct(or._,mr._),or.m=or.z-Qr):or.z=Qr}else mr&&(or.z=mr.z+Ct(or._,mr._));or.parent.A=Ue(or,mr,or.parent.A||Ar[0])}function we(or){or._.x=or.z+or.parent.m,or.m+=or.parent.m}function Ue(or,Sr,Ar){if(Sr){for(var mr=or,Qr=or,Hn=Sr,Wn=mr.parent.children[0],Xn=mr.m,Ii=Qr.m,oi=Hn.m,$n=Wn.m,sa;Hn=ve(Hn),mr=ee(mr),Hn&&mr;)Wn=ee(Wn),Qr=ve(Qr),Qr.a=or,sa=Hn.z+oi-mr.z-Xn+Ct(Hn._,mr._),sa>0&&(oe(He(Hn,or,Ar),or,sa),Xn+=sa,Ii+=sa),oi+=Hn.m,Xn+=mr.m,$n+=Wn.m,Ii+=Qr.m;Hn&&!ve(Qr)&&(Qr.t=Hn,Qr.m+=oi-Ii),mr&&!ee(Wn)&&(Wn.t=mr,Wn.m+=Xn-$n,Ar=or)}return Ar}function qe(or){or.x*=gt,or.y=or.depth*St}return re.separation=function(or){return arguments.length?(Ct=or,re):Ct},re.size=function(or){return arguments.length?(Nt=!1,gt=+or[0],St=+or[1],re):Nt?null:[gt,St]},re.nodeSize=function(or){return arguments.length?(Nt=!0,gt=+or[0],St=+or[1],re):Nt?[gt,St]:null},re}function jr(Ct,gt,St,Nt,re){for(var le=Ct.children,we,Ue=-1,qe=le.length,or=Ct.value&&(re-St)/Ct.value;++Ueoi&&(oi=or),We=Xn*Xn*Zi,$n=Math.max(oi/We,We/Ii),$n>sa){Xn-=or;break}sa=$n}we.push(qe={value:Xn,dice:Qr1?Nt:1)},St}(Wr);function nn(){var Ct=Xr,gt=!1,St=1,Nt=1,re=[0],le=it,we=it,Ue=it,qe=it,or=it;function Sr(mr){return mr.x0=mr.y0=0,mr.x1=St,mr.y1=Nt,mr.eachBefore(Ar),re=[0],gt&&mr.eachBefore(qt),mr}function Ar(mr){var Qr=re[mr.depth],Hn=mr.x0+Qr,Wn=mr.y0+Qr,Xn=mr.x1-Qr,Ii=mr.y1-Qr;Xn=mr-1){var oi=le[Ar];oi.x0=Hn,oi.y0=Wn,oi.x1=Xn,oi.y1=Ii;return}for(var $n=or[Ar],sa=Qr/2+$n,Zi=Ar+1,We=mr-1;Zi>>1;or[nr]Ii-Wn){var tn=(Hn*_r+Xn*fr)/Qr;Sr(Ar,Zi,fr,Hn,Wn,tn,Ii),Sr(Zi,mr,_r,tn,Wn,Xn,Ii)}else{var Cn=(Wn*_r+Ii*fr)/Qr;Sr(Ar,Zi,fr,Hn,Wn,Xn,Cn),Sr(Zi,mr,_r,Hn,Cn,Xn,Ii)}}}function Gt(Ct,gt,St,Nt,re){(Ct.depth&1?jr:Wt)(Ct,gt,St,Nt,re)}var ne=function Ct(gt){function St(Nt,re,le,we,Ue){if((qe=Nt._squarify)&&qe.ratio===gt)for(var qe,or,Sr,Ar,mr=-1,Qr,Hn=qe.length,Wn=Nt.value;++mr1?Nt:1)},St}(Wr);c.cluster=n,c.hierarchy=C,c.pack=ut,c.packEnclose=j,c.packSiblings=rt,c.partition=Jt,c.stratify=Lt,c.tree=ur,c.treemap=nn,c.treemapBinary=Le,c.treemapDice=Wt,c.treemapResquarify=ne,c.treemapSlice=jr,c.treemapSliceDice=Gt,c.treemapSquarify=Xr,Object.defineProperty(c,"__esModule",{value:!0})})}),n3=Dt(Q=>{var Z=r3(),c=Yi(),g=kn(),I=Xc().makeColorScaleFuncFromTrace,S=lb().makePullColorFn,t=lb().generateExtendedColors,e=Xc().calc,r=Ca().ALMOST_EQUAL,a={},n={},o={};Q.calc=function(l,f){var x=l._fullLayout,y=f.ids,v=g.isArrayOrTypedArray(y),T=f.labels,u=f.parents,b=f.values,_=g.isArrayOrTypedArray(b),P=[],M={},C={},A=function(rt,at){M[rt]?M[rt].push(at):M[rt]=[at],C[at]=1},h=function(rt){return rt||typeof rt=="number"},p=function(rt){return!_||c(b[rt])&&b[rt]>=0},k,w,R;v?(k=Math.min(y.length,u.length),w=function(rt){return h(y[rt])&&p(rt)},R=function(rt){return String(y[rt])}):(k=Math.min(T.length,u.length),w=function(rt){return h(T[rt])&&p(rt)},R=function(rt){return String(T[rt])}),_&&(k=Math.min(k,b.length));for(var O=0;O1){for(var F=g.randstr(),U=0;U{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt32BE,S=c("8BPS\0");Z.exports=function(t){if(!(t.length<22)&&g(t,0,S))return{width:I(t,18),height:I(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}),VN=Dt((Q,Z)=>{function c(l){return l===32||l===9||l===13||l===10}function g(l){return typeof l=="number"&&isFinite(l)&&l>0}function I(l){var f=0,x=l.length;for(l[0]===239&&l[1]===187&&l[2]===191&&(f=3);f]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,n=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(l){var f=l.match(e),x=l.match(r),y=l.match(a);return{width:f&&(f[1]||f[2]),height:x&&(x[1]||x[2]),viewbox:y&&(y[1]||y[2])}}function i(l){return n.test(l)?l.match(n)[0]:"px"}Z.exports=function(l){if(I(l)){for(var f="",x=0;x{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt16LE,S=mh().readUInt16BE,t=mh().readUInt32LE,e=mh().readUInt32BE,r=c("II*\0"),a=c("MM\0*");function n(l,f,x){return x?S(l,f):I(l,f)}function o(l,f,x){return x?e(l,f):t(l,f)}function i(l,f,x){var y=n(l,f+2,x),v=o(l,f+4,x);return v!==1||y!==3&&y!==4?null:y===3?n(l,f+8,x):o(l,f+8,x)}Z.exports=function(l){if(!(l.length<8)&&!(!g(l,0,r)&&!g(l,0,a))){var f=l[0]===77,x=o(l,4,f)-8;if(!(x<0)){var y=x+8;if(!(l.length-y<2)){var v=n(l,y+0,f)*12;if(!(v<=0)&&(y+=2,!(l.length-y{var c=mh().str2arr,g=mh().sliceEq,I=mh().readUInt16LE,S=mh().readUInt32LE,t=mk(),e=c("RIFF"),r=c("WEBP");function a(i,l){if(!(i[l+3]!==157||i[l+4]!==1||i[l+5]!==42))return{width:I(i,l+6)&16383,height:I(i,l+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,l){if(i[l]===47){var f=S(i,l+1);return{width:(f&16383)+1,height:(f>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function o(i,l){return{width:(i[l+6]<<16|i[l+5]<<8|i[l+4])+1,height:(i[l+9]<i.length)){for(;l+8=10?f=f||a(i,l+8):v==="VP8L"&&T>=9?f=f||n(i,l+8):v==="VP8X"&&T>=10?f=f||o(i,l+8):v==="EXIF"&&(x=t.get_orientation(i.slice(l+8,l+8+T)),l=1/0),l+=8+T}if(f)return x>0&&(f.orientation=x),f}}}}),qN=Dt((Q,Z)=>{Z.exports={avif:DN(),bmp:FN(),gif:BN(),ico:RN(),jpeg:NN(),png:jN(),psd:UN(),svg:VN(),tiff:HN(),webp:WN()}}),$N=Dt((Q,Z)=>{var c=qN();function g(I){for(var S=Object.keys(c),t=0;t{var Z=$N(),c=o0().IMAGE_URL_PREFIX,g=ox().Buffer;Q.getImageSize=function(I){var S=I.replace(c,""),t=new g(S,"base64");return Z(t)}}),GN=Dt((Q,Z)=>{var c=kn(),g=ib(),I=Hn(),S=Ls(),t=kn().maxRowLength,e=ZN().getImageSize;Z.exports=function(o,i){var l,f;if(i._hasZ)l=i.z.length,f=t(i.z);else if(i._hasSource){var x=e(i.source);l=x.height,f=x.width}var y=S.getFromId(o,i.xaxis||"x"),v=S.getFromId(o,i.yaxis||"y"),T=y.d2c(i.x0)-i.dx/2,u=v.d2c(i.y0)-i.dy/2,b,_=[T,T+f*i.dx],P=[u,u+l*i.dy];if(y&&y.type==="log")for(b=0;b{var c=Wr(),g=kn(),I=g.strTranslate,S=Dp(),t=ib(),e=o7(),r=K6().STYLE;Z.exports=function(a,n,o,i){var l=n.xaxis,f=n.yaxis,x=!a._context._exportedPlot&&e();g.makeTraceGroups(i,o,"im").each(function(y){var v=c.select(this),T=y[0],u=T.trace,b=(u.zsmooth==="fast"||u.zsmooth===!1&&x)&&!u._hasZ&&u._hasSource&&l.type==="linear"&&f.type==="linear";u._realImage=b;var _=T.z,P=T.x0,M=T.y0,C=T.w,A=T.h,h=u.dx,p=u.dy,k,w,B,O,j,V;for(V=0;k===void 0&&V0;)w=l.c2p(P+V*h),V--;for(V=0;O===void 0&&V0;)j=f.c2p(M+V*p),V--;if(wst[0];if(tt||pt){var rt=k+F/2,at=O+U/2;yt+="transform:"+I(rt+"px",at+"px")+"scale("+(tt?-1:1)+","+(pt?-1:1)+")"+I(-rt+"px",-at+"px")+";"}}lt.attr("style",yt);var vt=new Promise(function(it){if(u._hasZ)it();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===C&&u._canvas.el.height===A&&u._canvas.source===u.source)it();else{var K=document.createElement("canvas");K.width=C,K.height=A;var ft=K.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var ut=u._image;ut.onload=function(){ft.drawImage(ut,0,0),u._canvas={el:K,source:u.source},it()},ut.setAttribute("src",u.source)}}).then(function(){var it,K;if(u._hasZ)K=J(function(kt,It){var Pt=_[It][kt];return g.isTypedArray(Pt)&&(Pt=Array.from(Pt)),Pt}),it=K.toDataURL("image/png");else if(u._hasSource)if(b)it=u.source;else{var ft=u._canvas.el.getContext("2d",{willReadFrequently:!0}),ut=ft.getImageData(0,0,C,A).data;K=J(function(kt,It){var Pt=4*(It*C+kt);return[ut[Pt],ut[Pt+1],ut[Pt+2],ut[Pt+3]]}),it=K.toDataURL("image/png")}lt.attr({"xlink:href":it,height:U,width:F,x:k,y:O})});a._promises.push(vt)})}}),KN=Dt((Q,Z)=>{var c=Wr();Z.exports=function(g){c.select(g).selectAll(".im image").style("opacity",function(I){return I[0].trace.opacity})}}),XN=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=ib();Z.exports=function(t,e,r){var a=t.cd[0],n=a.trace,o=t.xa,i=t.ya;if(!(c.inbox(e-a.x0,e-(a.x0+a.w*n.dx),0)>0||c.inbox(r-a.y0,r-(a.y0+a.h*n.dy),0)>0)){var l=Math.floor((e-a.x0)/n.dx),f=Math.floor(Math.abs(r-a.y0)/n.dy),x;if(n._hasZ?x=a.z[f][l]:n._hasSource&&(x=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,f,1,1).data),!!x){var y=a.hi||n.hoverinfo,v;if(y){var T=y.split("+");T.indexOf("all")!==-1&&(T=["color"]),T.indexOf("color")!==-1&&(v=!0)}var u=S.colormodel[n.colormodel],b=u.colormodel||n.colormodel,_=b.length,P=n._scaler(x),M=u.suffix,C=[];(n.hovertemplate||v)&&(C.push("["+[P[0]+M[0],P[1]+M[1],P[2]+M[2]].join(", ")),_===4&&C.push(", "+P[3]+M[3]),C.push("]"),C=C.join(""),t.extraText=b.toUpperCase()+": "+C);var A;I(n.hovertext)&&I(n.hovertext[f])?A=n.hovertext[f][l]:I(n.text)&&I(n.text[f])&&(A=n.text[f][l]);var h=i.c2p(a.y0+(f+.5)*n.dy),p=a.x0+(l+.5)*n.dx,k=a.y0+(f+.5)*n.dy,w="["+x.slice(0,n.colormodel.length).join(", ")+"]";return[g.extendFlat(t,{index:[f,l],x0:o.c2p(a.x0+l*n.dx),x1:o.c2p(a.x0+(l+1)*n.dx),y0:h,y1:h,color:P,xVal:p,xLabelVal:p,yVal:k,yLabelVal:k,zLabelVal:w,text:A,hovertemplateLabels:{zLabel:w,colorLabel:C,"color[0]Label":P[0]+M[0],"color[1]Label":P[1]+M[1],"color[2]Label":P[2]+M[2],"color[3]Label":P[3]+M[3]}})]}}}}),JN=Dt((Q,Z)=>{Z.exports=function(c,g){return"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c.color=g.color,c.colormodel=g.trace.colormodel,c.z||(c.z=g.color),c}}),QN=Dt((Q,Z)=>{Z.exports={attributes:I7(),supplyDefaults:DR(),calc:GN(),plot:YN(),style:KN(),hoverPoints:XN(),eventData:JN(),moduleType:"trace",name:"image",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}),tj=Dt((Q,Z)=>{Z.exports=QN()}),cx=Dt((Q,Z)=>{var c=qo(),g=Uh().attributes,I=ma(),S=Ai(),{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=kd().pattern,o=I({editType:"plot",arrayOk:!0,colorEditType:"plot"});Z.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:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:n,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:a({},c.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},o,{}),outsidetextfont:a({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({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"}}}),hx=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=cx(),S=Uh().defaults,t=Q0().handleText,e=kn().coercePattern;function r(o,i){var l=g.isArrayOrTypedArray(o),f=g.isArrayOrTypedArray(i),x=Math.min(l?o.length:1/0,f?i.length:1/0);if(isFinite(x)||(x=0),x&&f){for(var y,v=0;v0){y=!0;break}}y||(x=0)}return{hasLabels:l,hasValues:f,len:x}}function a(o,i,l,f,x){var y=f("marker.line.width");y&&f("marker.line.color",x?void 0:l.paper_bgcolor);var v=f("marker.colors");e(f,"marker.pattern",v),o.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=o.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=l.paper_bgcolor)}function n(o,i,l,f){function x(w,B){return g.coerce(o,i,I,w,B)}var y=x("labels"),v=x("values"),T=r(y,v),u=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(x("label0"),x("dlabel")),!u){i.visible=!1;return}i._length=u,a(o,i,f,x,!0),x("scalegroup");var b=x("text"),_=x("texttemplate");x("texttemplatefallback");var P;if(_||(P=x("textinfo",g.isArrayOrTypedArray(b)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),_||P&&P!=="none"){var M=x("textposition");t(o,i,f,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var C=Array.isArray(M)||M==="auto",A=C||M==="outside";A&&x("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&x("insidetextorientation")}else P==="none"&&x("textposition","none");S(i,f,x);var h=x("hole"),p=x("title.text");if(p){var k=x("title.position",h?"middle center":"top center");!h&&k==="middle center"&&(i.title.position="top center"),g.coerceFont(x,"title.font",f.font)}x("sort"),x("direction"),x("rotation"),x("pull")}Z.exports={handleLabelsAndValues:r,handleMarkerDefaults:a,supplyDefaults:n}}),gk=Dt((Q,Z)=>{Z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),ej=Dt((Q,Z)=>{var c=kn(),g=gk();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("piecolorway",S.colorway),t("extendpiecolors")}}),ub=Dt((Q,Z)=>{var c=Hn(),g=ro(),I=pi(),S={};function t(n,o){var i=[],l=n._fullLayout,f=l.hiddenlabels||[],x=o.labels,y=o.marker.colors||[],v=o.values,T=o._length,u=o._hasValues&&T,b,_;if(o.dlabel)for(x=new Array(T),b=0;b=0});var B=o.type==="funnelarea"?A:o.sort;return B&&i.sort(function(O,j){return j.v-O.v}),i[0]&&(i[0].vTotal=C),i}function e(n){return function(o,i){return!o||(o=g(o),!o.isValid())?!1:(o=I.addOpacity(o,o.getAlpha()),n[i]||(n[i]=o),o)}}function r(n,o){var i=(o||{}).type;i||(i="pie");var l=n._fullLayout,f=n.calcdata,x=l[i+"colorway"],y=l["_"+i+"colormap"];l["extend"+i+"colors"]&&(x=a(x,S));for(var v=0,T=0;T{var c=Fp().appendArrayMultiPointValues;Z.exports=function(g,I){var S={curveNumber:I.index,pointNumbers:g.pts,data:I._input,fullData:I,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(S.pointNumber=S.i=g.pts[0]),c(S,I,g.pts),I.type==="funnelarea"&&(delete S.v,delete S.i),S}}),vk=Dt((Q,Z)=>{var c=Wr(),g=Kc(),I=tf(),S=pi(),t=Vs(),e=kn(),r=e.strScale,a=e.strTranslate,n=ec(),o=Rp(),i=o.recordMinTextSize,l=o.clearMinTextSize,f=ix().TEXTPAD,x=kg(),y=rj(),v=kn().isValidTextValue;function T(pt,rt){var at=pt._context.staticPlot,vt=pt._fullLayout,it=vt._size;l("pie",vt),M(rt,pt),J(rt,it);var K=e.makeTraceGroups(vt._pielayer,rt,"trace").each(function(ft){var ut=c.select(this),kt=ft[0],It=kt.trace;yt(ft),ut.attr("stroke-linejoin","round"),ut.each(function(){var Pt=c.select(this).selectAll("g.slice").data(ft);Pt.enter().append("g").classed("slice",!0),Pt.exit().remove();var qt=[[[],[]],[[],[]]],Wt=!1;Pt.each(function(Mt,ee){if(Mt.hidden){c.select(this).selectAll("path,g").remove();return}Mt.pointNumber=Mt.i,Mt.curveNumber=It.index,qt[Mt.pxmid[1]<0?0:1][Mt.pxmid[0]<0?0:1].push(Mt);var ve=kt.cx,oe=kt.cy,Ae=c.select(this),He=Ae.selectAll("path.surface").data([Mt]);if(He.enter().append("path").classed("surface",!0).style({"pointer-events":at?"none":"all"}),Ae.call(b,pt,ft),It.pull){var Ge=+x.castOption(It.pull,Mt.pts)||0;Ge>0&&(ve+=Ge*Mt.pxmid[0],oe+=Ge*Mt.pxmid[1])}Mt.cxFinal=ve,Mt.cyFinal=oe;function cr(Le,Gt,ne,Ct){var gt=Ct*(Gt[0]-Le[0]),St=Ct*(Gt[1]-Le[1]);return"a"+Ct*kt.r+","+Ct*kt.r+" 0 "+Mt.largeArc+(ne?" 1 ":" 0 ")+gt+","+St}var ur=It.hole;if(Mt.v===kt.vTotal){var jr="M"+(ve+Mt.px0[0])+","+(oe+Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!0,1)+cr(Mt.pxmid,Mt.px0,!0,1)+"Z";ur?He.attr("d","M"+(ve+ur*Mt.px0[0])+","+(oe+ur*Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!1,ur)+cr(Mt.pxmid,Mt.px0,!1,ur)+"Z"+jr):He.attr("d",jr)}else{var qr=cr(Mt.px0,Mt.px1,!0,1);if(ur){var br=1-ur;He.attr("d","M"+(ve+ur*Mt.px1[0])+","+(oe+ur*Mt.px1[1])+cr(Mt.px1,Mt.px0,!1,ur)+"l"+br*Mt.px0[0]+","+br*Mt.px0[1]+qr+"Z")}else He.attr("d","M"+ve+","+oe+"l"+Mt.px0[0]+","+Mt.px0[1]+qr+"Z")}st(pt,Mt,kt);var Xr=x.castOption(It.textposition,Mt.pts),nn=Ae.selectAll("g.slicetext").data(Mt.text&&Xr!=="none"?[0]:[]);nn.enter().append("g").classed("slicetext",!0),nn.exit().remove(),nn.each(function(){var Le=e.ensureSingle(c.select(this),"text","",function(le){le.attr("data-notex",1)}),Gt=e.ensureUniformFontSize(pt,Xr==="outside"?_(It,Mt,vt.font):P(It,Mt,vt.font));Le.text(Mt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,Gt).call(n.convertToTspans,pt);var ne=t.bBox(Le.node()),Ct;if(Xr==="outside")Ct=j(ne,Mt);else if(Ct=C(ne,Mt,kt),Xr==="auto"&&Ct.scale<1){var gt=e.ensureUniformFontSize(pt,It.outsidetextfont);Le.call(t.font,gt),ne=t.bBox(Le.node()),Ct=j(ne,Mt)}var St=Ct.textPosAngle,Nt=St===void 0?Mt.pxmid:mt(kt.r,St);if(Ct.targetX=ve+Nt[0]*Ct.rCenter+(Ct.x||0),Ct.targetY=oe+Nt[1]*Ct.rCenter+(Ct.y||0),tt(Ct,ne),Ct.outside){var re=Ct.targetY;Mt.yLabelMin=re-ne.height/2,Mt.yLabelMid=re,Mt.yLabelMax=re+ne.height/2,Mt.labelExtraX=0,Mt.labelExtraY=0,Wt=!0}Ct.fontSize=Gt.size,i(It.type,Ct,vt),ft[ee].transform=Ct,e.setTransormAndDisplay(Le,Ct)})});var Jt=c.select(this).selectAll("g.titletext").data(It.title.text?[0]:[]);if(Jt.enter().append("g").classed("titletext",!0),Jt.exit().remove(),Jt.each(function(){var Mt=e.ensureSingle(c.select(this),"text","",function(oe){oe.attr("data-notex",1)}),ee=It.title.text;It._meta&&(ee=e.templateString(ee,It._meta)),Mt.text(ee).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,It.title.font).call(n.convertToTspans,pt);var ve;It.title.position==="middle center"?ve=V(kt):ve=H(kt,it),Mt.attr("transform",a(ve.x,ve.y)+r(Math.min(1,ve.scale))+a(ve.tx,ve.ty))}),Wt&&q(qt,It),u(Pt,It),Wt&&It.automargin){var ge=t.bBox(ut.node()),fe=It.domain,pe=it.w*(fe.x[1]-fe.x[0]),se=it.h*(fe.y[1]-fe.y[0]),Tt=(.5*pe-kt.r)/it.w,Lt=(.5*se-kt.r)/it.h;g.autoMargin(pt,"pie."+It.uid+".automargin",{xl:fe.x[0]-Tt,xr:fe.x[1]+Tt,yb:fe.y[0]-Lt,yt:fe.y[1]+Lt,l:Math.max(kt.cx-kt.r-ge.left,0),r:Math.max(ge.right-(kt.cx+kt.r),0),b:Math.max(ge.bottom-(kt.cy+kt.r),0),t:Math.max(kt.cy-kt.r-ge.top,0),pad:5})}})});setTimeout(function(){K.selectAll("tspan").each(function(){var ft=c.select(this);ft.attr("dy")&&ft.attr("dy",ft.attr("dy"))})},0)}function u(pt,rt){pt.each(function(at){var vt=c.select(this);if(!at.labelExtraX&&!at.labelExtraY){vt.select("path.textline").remove();return}var it=vt.select("g.slicetext text");at.transform.targetX+=at.labelExtraX,at.transform.targetY+=at.labelExtraY,e.setTransormAndDisplay(it,at.transform);var K=at.cxFinal+at.pxmid[0],ft=at.cyFinal+at.pxmid[1],ut="M"+K+","+ft,kt=(at.yLabelMax-at.yLabelMin)*(at.pxmid[0]<0?-1:1)/4;if(at.labelExtraX){var It=at.labelExtraX*at.pxmid[1]/at.pxmid[0],Pt=at.yLabelMid+at.labelExtraY-(at.cyFinal+at.pxmid[1]);Math.abs(It)>Math.abs(Pt)?ut+="l"+Pt*at.pxmid[0]/at.pxmid[1]+","+Pt+"H"+(K+at.labelExtraX+kt):ut+="l"+at.labelExtraX+","+It+"v"+(Pt-It)+"h"+kt}else ut+="V"+(at.yLabelMid+at.labelExtraY)+"h"+kt;e.ensureSingle(vt,"path","textline").call(S.stroke,rt.outsidetextfont.color).attr({"stroke-width":Math.min(2,rt.outsidetextfont.size/8),d:ut,fill:"none"})})}function b(pt,rt,at){var vt=at[0],it=vt.cx,K=vt.cy,ft=vt.trace,ut=ft.type==="funnelarea";"_hasHoverLabel"in ft||(ft._hasHoverLabel=!1),"_hasHoverEvent"in ft||(ft._hasHoverEvent=!1),pt.on("mouseover",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];if(!(rt._dragging||It.hovermode===!1)){var qt=Pt.hoverinfo;if(Array.isArray(qt)&&(qt=I.castHoverinfo({hoverinfo:[x.castOption(qt,kt.pts)],_module:ft._module},It,0)),qt==="all"&&(qt="label+text+value+percent+name"),Pt.hovertemplate||qt!=="none"&&qt!=="skip"&&qt){var Wt=kt.rInscribed||0,Jt=it+kt.pxmid[0]*(1-Wt),ge=K+kt.pxmid[1]*(1-Wt),fe=It.separators,pe=[];if(qt&&qt.indexOf("label")!==-1&&pe.push(kt.label),kt.text=x.castOption(Pt.hovertext||Pt.text,kt.pts),qt&&qt.indexOf("text")!==-1){var se=kt.text;e.isValidTextValue(se)&&pe.push(se)}kt.value=kt.v,kt.valueLabel=x.formatPieValue(kt.v,fe),qt&&qt.indexOf("value")!==-1&&pe.push(kt.valueLabel),kt.percent=kt.v/vt.vTotal,kt.percentLabel=x.formatPiePercent(kt.percent,fe),qt&&qt.indexOf("percent")!==-1&&pe.push(kt.percentLabel);var Tt=Pt.hoverlabel,Lt=Tt.font,Mt=[];I.loneHover({trace:ft,x0:Jt-Wt*vt.r,x1:Jt+Wt*vt.r,y:ge,_x0:ut?it+kt.TL[0]:Jt-Wt*vt.r,_x1:ut?it+kt.TR[0]:Jt+Wt*vt.r,_y0:ut?K+kt.TL[1]:ge-Wt*vt.r,_y1:ut?K+kt.BL[1]:ge+Wt*vt.r,text:pe.join("
"),name:Pt.hovertemplate||qt.indexOf("name")!==-1?Pt.name:void 0,idealAlign:kt.pxmid[0]<0?"left":"right",color:x.castOption(Tt.bgcolor,kt.pts)||kt.color,borderColor:x.castOption(Tt.bordercolor,kt.pts),fontFamily:x.castOption(Lt.family,kt.pts),fontSize:x.castOption(Lt.size,kt.pts),fontColor:x.castOption(Lt.color,kt.pts),nameLength:x.castOption(Tt.namelength,kt.pts),textAlign:x.castOption(Tt.align,kt.pts),hovertemplate:x.castOption(Pt.hovertemplate,kt.pts),hovertemplateLabels:kt,eventData:[y(kt,Pt)]},{container:It._hoverlayer.node(),outerContainer:It._paper.node(),gd:rt,inOut_bbox:Mt}),kt.bbox=Mt[0],ft._hasHoverLabel=!0}ft._hasHoverEvent=!0,rt.emit("plotly_hover",{points:[y(kt,Pt)],event:c.event})}}),pt.on("mouseout",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index],qt=c.select(this).datum();ft._hasHoverEvent&&(kt.originalEvent=c.event,rt.emit("plotly_unhover",{points:[y(qt,Pt)],event:c.event}),ft._hasHoverEvent=!1),ft._hasHoverLabel&&(I.loneUnhover(It._hoverlayer.node()),ft._hasHoverLabel=!1)}),pt.on("click",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];rt._dragging||It.hovermode===!1||(rt._hoverdata=[y(kt,Pt)],I.click(rt,c.event))})}function _(pt,rt,at){var vt=x.castOption(pt.outsidetextfont.color,rt.pts)||x.castOption(pt.textfont.color,rt.pts)||at.color,it=x.castOption(pt.outsidetextfont.family,rt.pts)||x.castOption(pt.textfont.family,rt.pts)||at.family,K=x.castOption(pt.outsidetextfont.size,rt.pts)||x.castOption(pt.textfont.size,rt.pts)||at.size,ft=x.castOption(pt.outsidetextfont.weight,rt.pts)||x.castOption(pt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(pt.outsidetextfont.style,rt.pts)||x.castOption(pt.textfont.style,rt.pts)||at.style,kt=x.castOption(pt.outsidetextfont.variant,rt.pts)||x.castOption(pt.textfont.variant,rt.pts)||at.variant,It=x.castOption(pt.outsidetextfont.textcase,rt.pts)||x.castOption(pt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(pt.outsidetextfont.lineposition,rt.pts)||x.castOption(pt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(pt.outsidetextfont.shadow,rt.pts)||x.castOption(pt.textfont.shadow,rt.pts)||at.shadow;return{color:vt,family:it,size:K,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function P(pt,rt,at){var vt=x.castOption(pt.insidetextfont.color,rt.pts);!vt&&pt._input.textfont&&(vt=x.castOption(pt._input.textfont.color,rt.pts));var it=x.castOption(pt.insidetextfont.family,rt.pts)||x.castOption(pt.textfont.family,rt.pts)||at.family,K=x.castOption(pt.insidetextfont.size,rt.pts)||x.castOption(pt.textfont.size,rt.pts)||at.size,ft=x.castOption(pt.insidetextfont.weight,rt.pts)||x.castOption(pt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(pt.insidetextfont.style,rt.pts)||x.castOption(pt.textfont.style,rt.pts)||at.style,kt=x.castOption(pt.insidetextfont.variant,rt.pts)||x.castOption(pt.textfont.variant,rt.pts)||at.variant,It=x.castOption(pt.insidetextfont.textcase,rt.pts)||x.castOption(pt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(pt.insidetextfont.lineposition,rt.pts)||x.castOption(pt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(pt.insidetextfont.shadow,rt.pts)||x.castOption(pt.textfont.shadow,rt.pts)||at.shadow;return{color:vt||S.contrast(rt.color),family:it,size:K,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function M(pt,rt){for(var at,vt,it=0;it=-4;Tt-=2)se(Math.PI*Tt,"tan");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1),"tan")}if(qt||Jt){for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1.5),"rad");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+.5),"rad")}}if(ut||ge||qt){var Lt=Math.sqrt(pt.width*pt.width+pt.height*pt.height);if(pe={scale:it*vt*2/Lt,rCenter:1-it,rotate:0},pe.textPosAngle=(rt.startangle+rt.stopangle)/2,pe.scale>=1)return pe;fe.push(pe)}(ge||Jt)&&(pe=h(pt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe)),(ge||Wt)&&(pe=p(pt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe));for(var Mt=0,ee=0,ve=0;ve=1)break}return fe[Mt]}function A(pt,rt){var at=pt.startangle,vt=pt.stopangle;return at>rt&&rt>vt||at0?1:-1)/2,y:K/(1+at*at/(vt*vt)),outside:!0}}function V(pt){var rt=Math.sqrt(pt.titleBox.width*pt.titleBox.width+pt.titleBox.height*pt.titleBox.height);return{x:pt.cx,y:pt.cy,scale:pt.trace.hole*pt.r*2/rt,tx:0,ty:-pt.titleBox.height/2+pt.trace.title.font.size}}function H(pt,rt){var at=1,vt=1,it,K=pt.trace,ft={x:pt.cx,y:pt.cy},ut={tx:0,ty:0};ut.ty+=K.title.font.size,it=W(K),K.title.position.indexOf("top")!==-1?(ft.y-=(1+it)*pt.r,ut.ty-=pt.titleBox.height):K.title.position.indexOf("bottom")!==-1&&(ft.y+=(1+it)*pt.r);var kt=F(pt.r,pt.trace.aspectratio),It=rt.w*(K.domain.x[1]-K.domain.x[0])/2;return K.title.position.indexOf("left")!==-1?(It=It+kt,ft.x-=(1+it)*kt,ut.tx+=pt.titleBox.width/2):K.title.position.indexOf("center")!==-1?It*=2:K.title.position.indexOf("right")!==-1&&(It=It+kt,ft.x+=(1+it)*kt,ut.tx-=pt.titleBox.width/2),at=It/pt.titleBox.width,vt=U(pt,rt)/pt.titleBox.height,{x:ft.x,y:ft.y,scale:Math.min(at,vt),tx:ut.tx,ty:ut.ty}}function F(pt,rt){return pt/(rt===void 0?1:rt)}function U(pt,rt){var at=pt.trace,vt=rt.h*(at.domain.y[1]-at.domain.y[0]);return Math.min(pt.titleBox.height,vt/2)}function W(pt){var rt=pt.pull;if(!rt)return 0;var at;if(e.isArrayOrTypedArray(rt))for(rt=0,at=0;atrt&&(rt=pt.pull[at]);return rt}function q(pt,rt){var at,vt,it,K,ft,ut,kt,It,Pt,qt,Wt,Jt,ge;function fe(Lt,Mt){return Lt.pxmid[1]-Mt.pxmid[1]}function pe(Lt,Mt){return Mt.pxmid[1]-Lt.pxmid[1]}function se(Lt,Mt){Mt||(Mt={});var ee=Mt.labelExtraY+(vt?Mt.yLabelMax:Mt.yLabelMin),ve=vt?Lt.yLabelMin:Lt.yLabelMax,oe=vt?Lt.yLabelMax:Lt.yLabelMin,Ae=Lt.cyFinal+ft(Lt.px0[1],Lt.px1[1]),He=ee-ve,Ge,cr,ur,jr,qr,br;if(He*kt>0&&(Lt.labelExtraY=He),!!e.isArrayOrTypedArray(rt.pull))for(cr=0;cr=(x.castOption(rt.pull,ur.pts)||0))&&((Lt.pxmid[1]-ur.pxmid[1])*kt>0?(jr=ur.cyFinal+ft(ur.px0[1],ur.px1[1]),He=jr-ve-Lt.labelExtraY,He*kt>0&&(Lt.labelExtraY+=He)):(oe+Lt.labelExtraY-Ae)*kt>0&&(Ge=3*ut*Math.abs(cr-qt.indexOf(Lt)),qr=ur.cxFinal+K(ur.px0[0],ur.px1[0]),br=qr+Ge-(Lt.cxFinal+Lt.pxmid[0])-Lt.labelExtraX,br*ut>0&&(Lt.labelExtraX+=br)))}for(vt=0;vt<2;vt++)for(it=vt?fe:pe,ft=vt?Math.max:Math.min,kt=vt?1:-1,at=0;at<2;at++){for(K=at?Math.max:Math.min,ut=at?1:-1,It=pt[vt][at],It.sort(it),Pt=pt[1-vt][at],qt=Pt.concat(It),Jt=[],Wt=0;Wt1?(It=at.r,Pt=It/it.aspectratio):(Pt=at.r,It=Pt*it.aspectratio),It*=(1+it.baseratio)/2,kt=It*Pt}ft=Math.min(ft,kt/at.vTotal)}for(vt=0;vtrt.vTotal/2?1:0,It.halfangle=Math.PI*Math.min(It.v/rt.vTotal,.5),It.ring=1-vt.hole,It.rInscribed=O(It,rt))}function mt(pt,rt){return[pt*Math.sin(rt),-pt*Math.cos(rt)]}function st(pt,rt,at){var vt=pt._fullLayout,it=at.trace,K=it.texttemplate,ft=it.textinfo;if(!K&&ft&&ft!=="none"){var ut=ft.split("+"),kt=function(Mt){return ut.indexOf(Mt)!==-1},It=kt("label"),Pt=kt("text"),qt=kt("value"),Wt=kt("percent"),Jt=vt.separators,ge;if(ge=It?[rt.label]:[],Pt){var fe=x.getFirstFilled(it.text,rt.pts);v(fe)&&ge.push(fe)}qt&&ge.push(x.formatPieValue(rt.v,Jt)),Wt&&ge.push(x.formatPiePercent(rt.v/at.vTotal,Jt)),rt.text=ge.join("
")}function pe(Mt){return{label:Mt.label,value:Mt.v,valueLabel:x.formatPieValue(Mt.v,vt.separators),percent:Mt.v/at.vTotal,percentLabel:x.formatPiePercent(Mt.v/at.vTotal,vt.separators),color:Mt.color,text:Mt.text,customdata:e.castOption(it,Mt.i,"customdata")}}if(K){var se=e.castOption(it,rt.i,"texttemplate");if(!se)rt.text="";else{var Tt=pe(rt),Lt=x.getFirstFilled(it.text,rt.pts);(v(Lt)||Lt==="")&&(Tt.text=Lt),rt.text=e.texttemplateString({data:[Tt,it._meta],fallback:it.texttemplatefallback,labels:Tt,locale:pt._fullLayout._d3locale,template:se})}}}function tt(pt,rt){var at=pt.rotate*Math.PI/180,vt=Math.cos(at),it=Math.sin(at),K=(rt.left+rt.right)/2,ft=(rt.top+rt.bottom)/2;pt.textX=K*vt-ft*it,pt.textY=K*it+ft*vt,pt.noCenter=!0}Z.exports={plot:T,formatSliceLabel:st,transformInsideText:C,determineInsideTextFont:P,positionTitleOutside:H,prerenderTitles:M,layoutAreas:J,attachFxHandlers:b,computeTransform:tt}}),nj=Dt((Q,Z)=>{var c=Wr(),g=Tg(),I=Rp().resizeText;Z.exports=function(S){var t=S._fullLayout._pielayer.selectAll(".trace");I(S,t,"pie"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),ij=Dt(Q=>{var Z=Kc();Q.name="pie",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),aj=Dt((Q,Z)=>{Z.exports={attributes:cx(),supplyDefaults:hx().supplyDefaults,supplyLayoutDefaults:ej(),layoutAttributes:gk(),calc:ub().calc,crossTraceCalc:ub().crossTraceCalc,plot:vk().plot,style:nj(),styleOne:Tg(),moduleType:"trace",name:"pie",basePlotModule:ij(),categories:["pie-like","pie","showLegend"],meta:{}}}),oj=Dt((Q,Z)=>{Z.exports=aj()}),sj=Dt(Q=>{var Z=Kc();Q.name="sunburst",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),n9=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}),r3=Dt((Q,Z)=>{var c=qo(),{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=Uh().attributes,r=cx(),a=n9(),n=Ia().extendFlat,o=kd().pattern;Z.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:n({colors:{valType:"data_array",editType:"calc"},line:{color:n({},r.marker.line.color,{dflt:null}),width:n({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:o,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:I({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:r.hovertext,hoverinfo:n({},c.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:n({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}),i9=Dt((Q,Z)=>{Z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),lj=Dt((Q,Z)=>{var c=kn(),g=r3(),I=Uh().defaults,S=Q0().handleText,t=hx().handleMarkerDefaults,e=Xc(),r=e.hasColorscale,a=e.handleDefaults;Z.exports=function(n,o,i,l){function f(_,P){return c.coerce(n,o,g,_,P)}var x=f("labels"),y=f("parents");if(!x||!x.length||!y||!y.length){o.visible=!1;return}var v=f("values");v&&v.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),t(n,o,l,f);var T=o._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;T&&a(n,o,l,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",T?1:.7);var u=f("text");f("texttemplate"),f("texttemplatefallback"),o.texttemplate||f("textinfo",c.isArrayOrTypedArray(u)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var b="auto";S(n,o,l,f,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),I(o,l,f),o._length=null}}),uj=Dt((Q,Z)=>{var c=kn(),g=i9();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("sunburstcolorway",S.colorway),t("extendsunburstcolors")}}),n3=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(Ct,gt){return Ct.parent===gt.parent?1:2}function I(Ct){return Ct.reduce(S,0)/Ct.length}function S(Ct,gt){return Ct+gt.x}function t(Ct){return 1+Ct.reduce(e,0)}function e(Ct,gt){return Math.max(Ct,gt.y)}function r(Ct){for(var gt;gt=Ct.children;)Ct=gt[0];return Ct}function a(Ct){for(var gt;gt=Ct.children;)Ct=gt[gt.length-1];return Ct}function n(){var Ct=g,gt=1,St=1,Nt=!1;function re(le){var ke,Ue=0;le.eachAfter(function(mr){var Qr=mr.children;Qr?(mr.x=I(Qr),mr.y=t(Qr)):(mr.x=ke?Ue+=Ct(mr,ke):0,mr.y=0,ke=mr)});var qe=r(le),or=a(le),Sr=qe.x-Ct(qe,or)/2,Mr=or.x+Ct(or,qe)/2;return le.eachAfter(Nt?function(mr){mr.x=(mr.x-le.x)*gt,mr.y=(le.y-mr.y)*St}:function(mr){mr.x=(mr.x-Sr)/(Mr-Sr)*gt,mr.y=(1-(le.y?mr.y/le.y:1))*St})}return re.separation=function(le){return arguments.length?(Ct=le,re):Ct},re.size=function(le){return arguments.length?(Nt=!1,gt=+le[0],St=+le[1],re):Nt?null:[gt,St]},re.nodeSize=function(le){return arguments.length?(Nt=!0,gt=+le[0],St=+le[1],re):Nt?[gt,St]:null},re}function o(Ct){var gt=0,St=Ct.children,Nt=St&&St.length;if(!Nt)gt=1;else for(;--Nt>=0;)gt+=St[Nt].value;Ct.value=gt}function i(){return this.eachAfter(o)}function l(Ct){var gt=this,St,Nt=[gt],re,le,ke;do for(St=Nt.reverse(),Nt=[];gt=St.pop();)if(Ct(gt),re=gt.children,re)for(le=0,ke=re.length;le=0;--re)St.push(Nt[re]);return this}function x(Ct){for(var gt=this,St=[gt],Nt=[],re,le,ke;gt=St.pop();)if(Nt.push(gt),re=gt.children,re)for(le=0,ke=re.length;le=0;)St+=Nt[re].value;gt.value=St})}function v(Ct){return this.eachBefore(function(gt){gt.children&>.children.sort(Ct)})}function T(Ct){for(var gt=this,St=u(gt,Ct),Nt=[gt];gt!==St;)gt=gt.parent,Nt.push(gt);for(var re=Nt.length;Ct!==St;)Nt.splice(re,0,Ct),Ct=Ct.parent;return Nt}function u(Ct,gt){if(Ct===gt)return Ct;var St=Ct.ancestors(),Nt=gt.ancestors(),re=null;for(Ct=St.pop(),gt=Nt.pop();Ct===gt;)re=Ct,Ct=St.pop(),gt=Nt.pop();return re}function b(){for(var Ct=this,gt=[Ct];Ct=Ct.parent;)gt.push(Ct);return gt}function _(){var Ct=[];return this.each(function(gt){Ct.push(gt)}),Ct}function P(){var Ct=[];return this.eachBefore(function(gt){gt.children||Ct.push(gt)}),Ct}function M(){var Ct=this,gt=[];return Ct.each(function(St){St!==Ct&>.push({source:St.parent,target:St})}),gt}function C(Ct,gt){var St=new w(Ct),Nt=+Ct.value&&(St.value=Ct.value),re,le=[St],ke,Ue,qe,or;for(gt==null&&(gt=h);re=le.pop();)if(Nt&&(re.value=+re.data.value),(Ue=gt(re.data))&&(or=Ue.length))for(re.children=new Array(or),qe=or-1;qe>=0;--qe)le.push(ke=re.children[qe]=new w(Ue[qe])),ke.parent=re,ke.depth=re.depth+1;return St.eachBefore(k)}function A(){return C(this).eachBefore(p)}function h(Ct){return Ct.children}function p(Ct){Ct.data=Ct.data.data}function k(Ct){var gt=0;do Ct.height=gt;while((Ct=Ct.parent)&&Ct.height<++gt)}function w(Ct){this.data=Ct,this.depth=this.height=0,this.parent=null}w.prototype=C.prototype={constructor:w,count:i,each:l,eachAfter:x,eachBefore:f,sum:y,sort:v,path:T,ancestors:b,descendants:_,leaves:P,links:M,copy:A};var B=Array.prototype.slice;function O(Ct){for(var gt=Ct.length,St,Nt;gt;)Nt=Math.random()*gt--|0,St=Ct[gt],Ct[gt]=Ct[Nt],Ct[Nt]=St;return Ct}function j(Ct){for(var gt=0,St=(Ct=O(B.call(Ct))).length,Nt=[],re,le;gt0&&St*St>Nt*Nt+re*re}function U(Ct,gt){for(var St=0;Stqe?(re=(or+qe-le)/(2*or),Ue=Math.sqrt(Math.max(0,qe/or-re*re)),St.x=Ct.x-re*Nt-Ue*ke,St.y=Ct.y-re*ke+Ue*Nt):(re=(or+le-qe)/(2*or),Ue=Math.sqrt(Math.max(0,le/or-re*re)),St.x=gt.x+re*Nt-Ue*ke,St.y=gt.y+re*ke+Ue*Nt)):(St.x=gt.x+St.r,St.y=gt.y)}function mt(Ct,gt){var St=Ct.r+gt.r-1e-6,Nt=gt.x-Ct.x,re=gt.y-Ct.y;return St>0&&St*St>Nt*Nt+re*re}function st(Ct){var gt=Ct._,St=Ct.next._,Nt=gt.r+St.r,re=(gt.x*St.r+St.x*gt.r)/Nt,le=(gt.y*St.r+St.y*gt.r)/Nt;return re*re+le*le}function tt(Ct){this._=Ct,this.next=null,this.previous=null}function pt(Ct){if(!(re=Ct.length))return 0;var gt,St,Nt,re,le,ke,Ue,qe,or,Sr,Mr;if(gt=Ct[0],gt.x=0,gt.y=0,!(re>1))return gt.r;if(St=Ct[1],gt.x=-St.r,St.x=gt.r,St.y=0,!(re>2))return gt.r+St.r;yt(St,gt,Nt=Ct[2]),gt=new tt(gt),St=new tt(St),Nt=new tt(Nt),gt.next=Nt.previous=St,St.next=gt.previous=Nt,Nt.next=St.previous=gt;t:for(Ue=3;Ue0)throw new Error("cycle");return Ue}return St.id=function(Nt){return arguments.length?(Ct=vt(Nt),St):Ct},St.parentId=function(Nt){return arguments.length?(gt=vt(Nt),St):gt},St}function Mt(Ct,gt){return Ct.parent===gt.parent?1:2}function ee(Ct){var gt=Ct.children;return gt?gt[0]:Ct.t}function ve(Ct){var gt=Ct.children;return gt?gt[gt.length-1]:Ct.t}function oe(Ct,gt,St){var Nt=St/(gt.i-Ct.i);gt.c-=Nt,gt.s+=St,Ct.c+=Nt,gt.z+=St,gt.m+=St}function Ae(Ct){for(var gt=0,St=0,Nt=Ct.children,re=Nt.length,le;--re>=0;)le=Nt[re],le.z+=gt,le.m+=gt,gt+=le.s+(St+=le.c)}function He(Ct,gt,St){return Ct.a.parent===gt.parent?Ct.a:St}function Ge(Ct,gt){this._=Ct,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=gt}Ge.prototype=Object.create(w.prototype);function cr(Ct){for(var gt=new Ge(Ct,0),St,Nt=[gt],re,le,ke,Ue;St=Nt.pop();)if(le=St._.children)for(St.children=new Array(Ue=le.length),ke=Ue-1;ke>=0;--ke)Nt.push(re=St.children[ke]=new Ge(le[ke],ke)),re.parent=St;return(gt.parent=new Ge(null,0)).children=[gt],gt}function ur(){var Ct=Mt,gt=1,St=1,Nt=null;function re(or){var Sr=cr(or);if(Sr.eachAfter(le),Sr.parent.m=-Sr.z,Sr.eachBefore(ke),Nt)or.eachBefore(qe);else{var Mr=or,mr=or,Qr=or;or.eachBefore(function(ui){ui.xmr.x&&(mr=ui),ui.depth>Qr.depth&&(Qr=ui)});var Wn=Mr===mr?1:Ct(Mr,mr)/2,qn=Wn-Mr.x,ei=gt/(mr.x+Wn+qn),Di=St/(Qr.depth||1);or.eachBefore(function(ui){ui.x=(ui.x+qn)*ei,ui.y=ui.depth*Di})}return or}function le(or){var Sr=or.children,Mr=or.parent.children,mr=or.i?Mr[or.i-1]:null;if(Sr){Ae(or);var Qr=(Sr[0].z+Sr[Sr.length-1].z)/2;mr?(or.z=mr.z+Ct(or._,mr._),or.m=or.z-Qr):or.z=Qr}else mr&&(or.z=mr.z+Ct(or._,mr._));or.parent.A=Ue(or,mr,or.parent.A||Mr[0])}function ke(or){or._.x=or.z+or.parent.m,or.m+=or.parent.m}function Ue(or,Sr,Mr){if(Sr){for(var mr=or,Qr=or,Wn=Sr,qn=mr.parent.children[0],ei=mr.m,Di=Qr.m,ui=Wn.m,Gn=qn.m,ua;Wn=ve(Wn),mr=ee(mr),Wn&&mr;)qn=ee(qn),Qr=ve(Qr),Qr.a=or,ua=Wn.z+ui-mr.z-ei+Ct(Wn._,mr._),ua>0&&(oe(He(Wn,or,Mr),or,ua),ei+=ua,Di+=ua),ui+=Wn.m,ei+=mr.m,Gn+=qn.m,Di+=Qr.m;Wn&&!ve(Qr)&&(Qr.t=Wn,Qr.m+=ui-Di),mr&&!ee(qn)&&(qn.t=mr,qn.m+=ei-Gn,Mr=or)}return Mr}function qe(or){or.x*=gt,or.y=or.depth*St}return re.separation=function(or){return arguments.length?(Ct=or,re):Ct},re.size=function(or){return arguments.length?(Nt=!1,gt=+or[0],St=+or[1],re):Nt?null:[gt,St]},re.nodeSize=function(or){return arguments.length?(Nt=!0,gt=+or[0],St=+or[1],re):Nt?[gt,St]:null},re}function jr(Ct,gt,St,Nt,re){for(var le=Ct.children,ke,Ue=-1,qe=le.length,or=Ct.value&&(re-St)/Ct.value;++Ueui&&(ui=or),We=ei*ei*Yi,Gn=Math.max(ui/We,We/Di),Gn>ua){ei-=or;break}ua=Gn}ke.push(qe={value:ei,dice:Qr1?Nt:1)},St}(qr);function nn(){var Ct=Xr,gt=!1,St=1,Nt=1,re=[0],le=it,ke=it,Ue=it,qe=it,or=it;function Sr(mr){return mr.x0=mr.y0=0,mr.x1=St,mr.y1=Nt,mr.eachBefore(Mr),re=[0],gt&&mr.eachBefore(qt),mr}function Mr(mr){var Qr=re[mr.depth],Wn=mr.x0+Qr,qn=mr.y0+Qr,ei=mr.x1-Qr,Di=mr.y1-Qr;ei=mr-1){var ui=le[Mr];ui.x0=Wn,ui.y0=qn,ui.x1=ei,ui.y1=Di;return}for(var Gn=or[Mr],ua=Qr/2+Gn,Yi=Mr+1,We=mr-1;Yi>>1;or[nr]Di-qn){var tn=(Wn*_r+ei*dr)/Qr;Sr(Mr,Yi,dr,Wn,qn,tn,Di),Sr(Yi,mr,_r,tn,qn,ei,Di)}else{var Cn=(qn*_r+Di*dr)/Qr;Sr(Mr,Yi,dr,Wn,qn,ei,Cn),Sr(Yi,mr,_r,Wn,Cn,ei,Di)}}}function Gt(Ct,gt,St,Nt,re){(Ct.depth&1?jr:Wt)(Ct,gt,St,Nt,re)}var ne=function Ct(gt){function St(Nt,re,le,ke,Ue){if((qe=Nt._squarify)&&qe.ratio===gt)for(var qe,or,Sr,Mr,mr=-1,Qr,Wn=qe.length,qn=Nt.value;++mr1?Nt:1)},St}(qr);c.cluster=n,c.hierarchy=C,c.pack=ut,c.packEnclose=j,c.packSiblings=rt,c.partition=Jt,c.stratify=Lt,c.tree=ur,c.treemap=nn,c.treemapBinary=Le,c.treemapDice=Wt,c.treemapResquarify=ne,c.treemapSlice=jr,c.treemapSliceDice=Gt,c.treemapSquarify=Xr,Object.defineProperty(c,"__esModule",{value:!0})})}),i3=Dt(Q=>{var Z=n3(),c=Hn(),g=kn(),I=Xc().makeColorScaleFuncFromTrace,S=ub().makePullColorFn,t=ub().generateExtendedColors,e=Xc().calc,r=sa().ALMOST_EQUAL,a={},n={},o={};Q.calc=function(l,f){var x=l._fullLayout,y=f.ids,v=g.isArrayOrTypedArray(y),T=f.labels,u=f.parents,b=f.values,_=g.isArrayOrTypedArray(b),P=[],M={},C={},A=function(rt,at){M[rt]?M[rt].push(at):M[rt]=[at],C[at]=1},h=function(rt){return rt||typeof rt=="number"},p=function(rt){return!_||c(b[rt])&&b[rt]>=0},k,w,B;v?(k=Math.min(y.length,u.length),w=function(rt){return h(y[rt])&&p(rt)},B=function(rt){return String(y[rt])}):(k=Math.min(T.length,u.length),w=function(rt){return h(T[rt])&&p(rt)},B=function(rt){return String(T[rt])}),_&&(k=Math.min(k,b.length));for(var O=0;O1){for(var F=g.randstr(),U=0;U{});function bv(){}function n9(){return this.rgb().formatHex()}function ZN(){return this.rgb().formatHex8()}function GN(){return u9(this).formatHsl()}function i9(){return this.rgb().formatRgb()}function cb(Q){var Z,c;return Q=(Q+"").trim().toLowerCase(),(Z=h9.exec(Q))?(c=Z[1].length,Z=parseInt(Z[1],16),c===6?a9(Z):c===3?new cp(Z>>8&15|Z>>4&240,Z>>4&15|Z&240,(Z&15)<<4|Z&15,1):c===8?i3(Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255):c===4?i3(Z>>12&15|Z>>8&240,Z>>8&15|Z>>4&240,Z>>4&15|Z&240,((Z&15)<<4|Z&15)/255):null):(Z=f9.exec(Q))?new cp(Z[1],Z[2],Z[3],1):(Z=d9.exec(Q))?new cp(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,1):(Z=p9.exec(Q))?i3(Z[1],Z[2],Z[3],Z[4]):(Z=m9.exec(Q))?i3(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,Z[4]):(Z=g9.exec(Q))?l9(Z[1],Z[2]/100,Z[3]/100,1):(Z=v9.exec(Q))?l9(Z[1],Z[2]/100,Z[3]/100,Z[4]):bk.hasOwnProperty(Q)?a9(bk[Q]):Q==="transparent"?new cp(NaN,NaN,NaN,0):null}function a9(Q){return new cp(Q>>16&255,Q>>8&255,Q&255,1)}function i3(Q,Z,c,g){return g<=0&&(Q=Z=c=NaN),new cp(Q,Z,c,g)}function yk(Q){return Q instanceof bv||(Q=cb(Q)),Q?(Q=Q.rgb(),new cp(Q.r,Q.g,Q.b,Q.opacity)):new cp}function a3(Q,Z,c,g){return arguments.length===1?yk(Q):new cp(Q,Z,c,g??1)}function cp(Q,Z,c,g){this.r=+Q,this.g=+Z,this.b=+c,this.opacity=+g}function o9(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}`}function YN(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}${D1((isNaN(this.opacity)?1:this.opacity)*255)}`}function s9(){let Q=o3(this.opacity);return`${Q===1?"rgb(":"rgba("}${O1(this.r)}, ${O1(this.g)}, ${O1(this.b)}${Q===1?")":`, ${Q})`}`}function o3(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function O1(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function D1(Q){return Q=O1(Q),(Q<16?"0":"")+Q.toString(16)}function l9(Q,Z,c,g){return g<=0?Q=Z=c=NaN:c<=0||c>=1?Q=Z=NaN:Z<=0&&(Q=NaN),new _m(Q,Z,c,g)}function u9(Q){if(Q instanceof _m)return new _m(Q.h,Q.s,Q.l,Q.opacity);if(Q instanceof bv||(Q=cb(Q)),!Q)return new _m;if(Q instanceof _m)return Q;Q=Q.rgb();var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=NaN,e=S-I,r=(S+I)/2;return e?(Z===S?t=(c-g)/e+(c0&&r<1?0:t,new _m(t,e,r,Q.opacity)}function xk(Q,Z,c,g){return arguments.length===1?u9(Q):new _m(Q,Z,c,g??1)}function _m(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}function c9(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function s3(Q){return Math.max(0,Math.min(1,Q||0))}function _k(Q,Z,c){return(Q<60?Z+(c-Z)*Q/60:Q<180?c:Q<240?Z+(c-Z)*(240-Q)/60:Z)*255}var wv,F1,R1,hx,bm,h9,f9,d9,p9,m9,g9,v9,bk,wk=mn(()=>{vk(),wv=.7,F1=1/wv,R1="\\s*([+-]?\\d+)\\s*",hx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h9=/^#([0-9a-f]{3,8})$/,f9=new RegExp(`^rgb\\(${R1},${R1},${R1}\\)$`),d9=new RegExp(`^rgb\\(${bm},${bm},${bm}\\)$`),p9=new RegExp(`^rgba\\(${R1},${R1},${R1},${hx}\\)$`),m9=new RegExp(`^rgba\\(${bm},${bm},${bm},${hx}\\)$`),g9=new RegExp(`^hsl\\(${hx},${bm},${bm}\\)$`),v9=new RegExp(`^hsla\\(${hx},${bm},${bm},${hx}\\)$`),bk={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},cx(bv,cb,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:n9,formatHex:n9,formatHex8:ZN,formatHsl:GN,formatRgb:i9,toString:i9}),cx(cp,a3,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new cp(O1(this.r),O1(this.g),O1(this.b),o3(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:o9,formatHex:o9,formatHex8:YN,formatRgb:s9,toString:s9})),cx(_m,xk,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,Z=isNaN(Q)||isNaN(this.s)?0:this.s,c=this.l,g=c+(c<.5?c:1-c)*Z,I=2*c-g;return new cp(_k(Q>=240?Q-240:Q+120,I,g),_k(Q,I,g),_k(Q<120?Q+240:Q-120,I,g),this.opacity)},clamp(){return new _m(c9(this.h),s3(this.s),s3(this.l),o3(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 Q=o3(this.opacity);return`${Q===1?"hsl(":"hsla("}${c9(this.h)}, ${s3(this.s)*100}%, ${s3(this.l)*100}%${Q===1?")":`, ${Q})`}`}}))}),kk,Tk,y9=mn(()=>{kk=Math.PI/180,Tk=180/Math.PI});function x9(Q){if(Q instanceof qm)return new qm(Q.l,Q.a,Q.b,Q.opacity);if(Q instanceof Pg)return _9(Q);Q instanceof cp||(Q=yk(Q));var Z=Ck(Q.r),c=Ck(Q.g),g=Ck(Q.b),I=Mk((.2225045*Z+.7168786*c+.0606169*g)/Ik),S,t;return Z===c&&c===g?S=t=I:(S=Mk((.4360747*Z+.3850649*c+.1430804*g)/Pk),t=Mk((.0139322*Z+.0971045*c+.7141733*g)/zk)),new qm(116*I-16,500*(S-I),200*(I-t),Q.opacity)}function Ak(Q,Z,c,g){return arguments.length===1?x9(Q):new qm(Q,Z,c,g??1)}function qm(Q,Z,c,g){this.l=+Q,this.a=+Z,this.b=+c,this.opacity=+g}function Mk(Q){return Q>b9?Math.pow(Q,.3333333333333333):Q/Dk+Ok}function Sk(Q){return Q>B1?Q*Q*Q:Dk*(Q-Ok)}function Ek(Q){return 255*(Q<=.0031308?12.92*Q:1.055*Math.pow(Q,.4166666666666667)-.055)}function Ck(Q){return(Q/=255)<=.04045?Q/12.92:Math.pow((Q+.055)/1.055,2.4)}function KN(Q){if(Q instanceof Pg)return new Pg(Q.h,Q.c,Q.l,Q.opacity);if(Q instanceof qm||(Q=x9(Q)),Q.a===0&&Q.b===0)return new Pg(NaN,0{vk(),wk(),y9(),hb=18,Pk=.96422,Ik=1,zk=.82521,Ok=4/29,B1=6/29,Dk=3*B1*B1,b9=B1*B1*B1,cx(qm,Ak,ub(bv,{brighter(Q){return new qm(this.l+hb*(Q??1),this.a,this.b,this.opacity)},darker(Q){return new qm(this.l-hb*(Q??1),this.a,this.b,this.opacity)},rgb(){var Q=(this.l+16)/116,Z=isNaN(this.a)?Q:Q+this.a/500,c=isNaN(this.b)?Q:Q-this.b/200;return Z=Pk*Sk(Z),Q=Ik*Sk(Q),c=zk*Sk(c),new cp(Ek(3.1338561*Z-1.6168667*Q-.4906146*c),Ek(-.9787684*Z+1.9161415*Q+.033454*c),Ek(.0719453*Z-.2289914*Q+1.4052427*c),this.opacity)}})),cx(Pg,Lk,ub(bv,{brighter(Q){return new Pg(this.h,this.c,this.l+hb*(Q??1),this.opacity)},darker(Q){return new Pg(this.h,this.c,this.l-hb*(Q??1),this.opacity)},rgb(){return _9(this).rgb()}}))});function JN(Q){if(Q instanceof N1)return new N1(Q.h,Q.s,Q.l,Q.opacity);Q instanceof cp||(Q=yk(Q));var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=(jk*g+Bk*Z-Nk*c)/(jk+Bk-Nk),S=g-I,t=(fx*(c-I)-u3*S)/fb,e=Math.sqrt(t*t+S*S)/(fx*I*(1-I)),r=e?Math.atan2(t,S)*Tk-120:NaN;return new N1(r<0?r+360:r,e,I,Q.opacity)}function Fk(Q,Z,c,g){return arguments.length===1?JN(Q):new N1(Q,Z,c,g??1)}function N1(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}var Rk,l3,u3,fb,fx,Bk,Nk,jk,QN=mn(()=>{vk(),wk(),y9(),Rk=-.14861,l3=1.78277,u3=-.29227,fb=-.90649,fx=1.97294,Bk=fx*fb,Nk=fx*l3,jk=l3*u3-fb*Rk,cx(N1,Fk,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=isNaN(this.h)?0:(this.h+120)*kk,Z=+this.l,c=isNaN(this.s)?0:this.s*Z*(1-Z),g=Math.cos(Q),I=Math.sin(Q);return new cp(255*(Z+c*(Rk*g+l3*I)),255*(Z+c*(u3*g+fb*I)),255*(Z+c*(fx*g)),this.opacity)}}))}),dx=mn(()=>{wk(),XN(),QN()});function w9(Q,Z,c,g,I){var S=Q*Q,t=S*Q;return((1-3*Q+3*S-t)*Z+(4-6*S+3*t)*c+(1+3*Q+3*S-3*t)*g+t*I)/6}function k9(Q){var Z=Q.length-1;return function(c){var g=c<=0?c=0:c>=1?(c=1,Z-1):Math.floor(c*Z),I=Q[g],S=Q[g+1],t=g>0?Q[g-1]:2*I-S,e=g{});function T9(Q){var Z=Q.length;return function(c){var g=Math.floor(((c%=1)<0?++c:c)*Z),I=Q[(g+Z-1)%Z],S=Q[g%Z],t=Q[(g+1)%Z],e=Q[(g+2)%Z];return w9((c-g/Z)*Z,I,S,t,e)}}var A9=mn(()=>{Uk()}),db,M9=mn(()=>{db=Q=>()=>Q});function S9(Q,Z){return function(c){return Q+c*Z}}function tj(Q,Z,c){return Q=Math.pow(Q,c),Z=Math.pow(Z,c)-Q,c=1/c,function(g){return Math.pow(Q+g*Z,c)}}function c3(Q,Z){var c=Z-Q;return c?S9(Q,c>180||c<-180?c-360*Math.round(c/360):c):db(isNaN(Q)?Z:Q)}function ej(Q){return(Q=+Q)==1?hp:function(Z,c){return c-Z?tj(Z,c,Q):db(isNaN(Z)?c:Z)}}function hp(Q,Z){var c=Z-Q;return c?S9(Q,c):db(isNaN(Q)?Z:Q)}var px=mn(()=>{M9()});function E9(Q){return function(Z){var c=Z.length,g=new Array(c),I=new Array(c),S=new Array(c),t,e;for(t=0;t{dx(),Uk(),A9(),px(),h3=function Q(Z){var c=ej(Z);function g(I,S){var t=c((I=a3(I)).r,(S=a3(S)).r),e=c(I.g,S.g),r=c(I.b,S.b),a=hp(I.opacity,S.opacity);return function(n){return I.r=t(n),I.g=e(n),I.b=r(n),I.opacity=a(n),I+""}}return g.gamma=Q,g}(1),C9=E9(k9),L9=E9(T9)});function Vk(Q,Z){Z||(Z=[]);var c=Q?Math.min(Z.length,Q.length):0,g=Z.slice(),I;return function(S){for(I=0;I{});function rj(Q,Z){return(I9(Z)?Vk:z9)(Q,Z)}function z9(Q,Z){var c=Z?Z.length:0,g=Q?Math.min(c,Q.length):0,I=new Array(g),S=new Array(c),t;for(t=0;t{g3(),Hk()});function D9(Q,Z){var c=new Date;return Q=+Q,Z=+Z,function(g){return c.setTime(Q*(1-g)+Z*g),c}}var F9=mn(()=>{});function $m(Q,Z){return Q=+Q,Z=+Z,function(c){return Q*(1-c)+Z*c}}var f3=mn(()=>{});function R9(Q,Z){var c={},g={},I;(Q===null||typeof Q!="object")&&(Q={}),(Z===null||typeof Z!="object")&&(Z={});for(I in Z)I in Q?c[I]=m3(Q[I],Z[I]):g[I]=Z[I];return function(S){for(I in c)g[I]=c[I](S);return g}}var B9=mn(()=>{g3()});function nj(Q){return function(){return Q}}function ij(Q){return function(Z){return Q(Z)+""}}function N9(Q,Z){var c=d3.lastIndex=p3.lastIndex=0,g,I,S,t=-1,e=[],r=[];for(Q=Q+"",Z=Z+"";(g=d3.exec(Q))&&(I=p3.exec(Z));)(S=I.index)>c&&(S=Z.slice(c,S),e[t]?e[t]+=S:e[++t]=S),(g=g[0])===(I=I[0])?e[t]?e[t]+=I:e[++t]=I:(e[++t]=null,r.push({i:t,x:$m(g,I)})),c=p3.lastIndex;return c{f3(),d3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,p3=new RegExp(d3.source,"g")});function m3(Q,Z){var c=typeof Z,g;return Z==null||c==="boolean"?db(Z):(c==="number"?$m:c==="string"?(g=cb(Z))?(Z=g,h3):N9:Z instanceof cb?h3:Z instanceof Date?D9:I9(Z)?Vk:Array.isArray(Z)?z9:typeof Z.valueOf!="function"&&typeof Z.toString!="function"||isNaN(Z)?R9:$m)(Q,Z)}var g3=mn(()=>{dx(),P9(),O9(),F9(),f3(),B9(),j9(),M9(),Hk()});function aj(Q){var Z=Q.length;return function(c){return Q[Math.max(0,Math.min(Z-1,Math.floor(c*Z)))]}}var oj=mn(()=>{});function sj(Q,Z){var c=c3(+Q,+Z);return function(g){var I=c(g);return I-360*Math.floor(I/360)}}var lj=mn(()=>{px()});function uj(Q,Z){return Q=+Q,Z=+Z,function(c){return Math.round(Q*(1-c)+Z*c)}}var cj=mn(()=>{});function U9(Q,Z,c,g,I,S){var t,e,r;return(t=Math.sqrt(Q*Q+Z*Z))&&(Q/=t,Z/=t),(r=Q*c+Z*g)&&(c-=Q*r,g-=Z*r),(e=Math.sqrt(c*c+g*g))&&(c/=e,g/=e,r/=e),Q*g{Wk=180/Math.PI,v3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function fj(Q){let Z=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return Z.isIdentity?v3:U9(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f)}function dj(Q){return Q==null?v3:(y3||(y3=document.createElementNS("http://www.w3.org/2000/svg","g")),y3.setAttribute("transform",Q),(Q=y3.transform.baseVal.consolidate())?(Q=Q.matrix,U9(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)):v3)}var y3,pj=mn(()=>{hj()});function V9(Q,Z,c,g){function I(a){return a.length?a.pop()+" ":""}function S(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push("translate(",null,Z,null,c);f.push({i:x-4,x:$m(a,o)},{i:x-2,x:$m(n,i)})}else(o||i)&&l.push("translate("+o+Z+i+c)}function t(a,n,o,i){a!==n?(a-n>180?n+=360:n-a>180&&(a+=360),i.push({i:o.push(I(o)+"rotate(",null,g)-2,x:$m(a,n)})):n&&o.push(I(o)+"rotate("+n+g)}function e(a,n,o,i){a!==n?i.push({i:o.push(I(o)+"skewX(",null,g)-2,x:$m(a,n)}):n&&o.push(I(o)+"skewX("+n+g)}function r(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push(I(l)+"scale(",null,",",null,")");f.push({i:x-4,x:$m(a,o)},{i:x-2,x:$m(n,i)})}else(o!==1||i!==1)&&l.push(I(l)+"scale("+o+","+i+")")}return function(a,n){var o=[],i=[];return a=Q(a),n=Q(n),S(a.translateX,a.translateY,n.translateX,n.translateY,o,i),t(a.rotate,n.rotate,o,i),e(a.skewX,n.skewX,o,i),r(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,i),a=n=null,function(l){for(var f=-1,x=i.length,y;++f{f3(),pj(),H9=V9(fj,"px, ","px)","deg)"),W9=V9(dj,", ",")",")")});function q9(Q){return((Q=Math.exp(Q))+1/Q)/2}function gj(Q){return((Q=Math.exp(Q))-1/Q)/2}function vj(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var $9,Z9,yj=mn(()=>{$9=1e-12,Z9=function Q(Z,c,g){function I(S,t){var e=S[0],r=S[1],a=S[2],n=t[0],o=t[1],i=t[2],l=n-e,f=o-r,x=l*l+f*f,y,v;if(x<$9)v=Math.log(i/a)/Z,y=function(M){return[e+M*l,r+M*f,a*Math.exp(Z*M*v)]};else{var T=Math.sqrt(x),u=(i*i-a*a+g*x)/(2*a*c*T),b=(i*i-a*a-g*x)/(2*i*c*T),_=Math.log(Math.sqrt(u*u+1)-u),P=Math.log(Math.sqrt(b*b+1)-b);v=(P-_)/Z,y=function(M){var C=M*v,A=q9(_),h=a/(c*T)*(A*vj(Z*C+_)-gj(_));return[e+h*l,r+h*f,a*A/q9(Z*C+_)]}}return y.duration=v*1e3*Z/Math.SQRT2,y}return I.rho=function(S){var t=Math.max(.001,+S),e=t*t,r=e*e;return Q(t,e,r)},I}(Math.SQRT2,2,4)});function G9(Q){return function(Z,c){var g=Q((Z=xk(Z)).h,(c=xk(c)).h),I=hp(Z.s,c.s),S=hp(Z.l,c.l),t=hp(Z.opacity,c.opacity);return function(e){return Z.h=g(e),Z.s=I(e),Z.l=S(e),Z.opacity=t(e),Z+""}}}var Y9,K9,xj=mn(()=>{dx(),px(),Y9=G9(c3),K9=G9(hp)});function _j(Q,Z){var c=hp((Q=Ak(Q)).l,(Z=Ak(Z)).l),g=hp(Q.a,Z.a),I=hp(Q.b,Z.b),S=hp(Q.opacity,Z.opacity);return function(t){return Q.l=c(t),Q.a=g(t),Q.b=I(t),Q.opacity=S(t),Q+""}}var bj=mn(()=>{dx(),px()});function X9(Q){return function(Z,c){var g=Q((Z=Lk(Z)).h,(c=Lk(c)).h),I=hp(Z.c,c.c),S=hp(Z.l,c.l),t=hp(Z.opacity,c.opacity);return function(e){return Z.h=g(e),Z.c=I(e),Z.l=S(e),Z.opacity=t(e),Z+""}}}var J9,Q9,wj=mn(()=>{dx(),px(),J9=X9(c3),Q9=X9(hp)});function tS(Q){return function Z(c){c=+c;function g(I,S){var t=Q((I=Fk(I)).h,(S=Fk(S)).h),e=hp(I.s,S.s),r=hp(I.l,S.l),a=hp(I.opacity,S.opacity);return function(n){return I.h=t(n),I.s=e(n),I.l=r(Math.pow(n,c)),I.opacity=a(n),I+""}}return g.gamma=Z,g}(1)}var eS,rS,kj=mn(()=>{dx(),px(),eS=tS(c3),rS=tS(hp)});function Tj(Q,Z){Z===void 0&&(Z=Q,Q=m3);for(var c=0,g=Z.length-1,I=Z[0],S=new Array(g<0?0:g);c{g3()});function Mj(Q,Z){for(var c=new Array(Z),g=0;g{}),j1={};cn(j1,{interpolate:()=>m3,interpolateArray:()=>rj,interpolateBasis:()=>k9,interpolateBasisClosed:()=>T9,interpolateCubehelix:()=>eS,interpolateCubehelixLong:()=>rS,interpolateDate:()=>D9,interpolateDiscrete:()=>aj,interpolateHcl:()=>J9,interpolateHclLong:()=>Q9,interpolateHsl:()=>Y9,interpolateHslLong:()=>K9,interpolateHue:()=>sj,interpolateLab:()=>_j,interpolateNumber:()=>$m,interpolateNumberArray:()=>Vk,interpolateObject:()=>R9,interpolateRgb:()=>h3,interpolateRgbBasis:()=>C9,interpolateRgbBasisClosed:()=>L9,interpolateRound:()=>uj,interpolateString:()=>N9,interpolateTransformCss:()=>H9,interpolateTransformSvg:()=>W9,interpolateZoom:()=>Z9,piecewise:()=>Tj,quantize:()=>Mj});var mx=mn(()=>{g3(),O9(),Uk(),A9(),F9(),oj(),lj(),f3(),Hk(),B9(),cj(),j9(),mj(),yj(),P9(),xj(),bj(),wj(),kj(),Aj(),Sj()}),qk=Dt((Q,Z)=>{var c=Vs(),g=hi();Z.exports=function(I,S,t,e,r){var a=S.data.data,n=a.i,o=r||a.color;if(n>=0){S.i=a.i;var i=t.marker;i.pattern?(!i.colors||!i.pattern.shape)&&(i.color=o,S.color=o):(i.color=o,S.color=o),c.pointStyle(I,t,e,S)}else g.fill(I,o)}}),nS=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=Bp().resizeText,t=qk();function e(a){var n=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,n,"sunburst"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),kv=Dt(Q=>{var Z=kn(),c=hi(),g=P0(),I=wg();Q.findEntryWithLevel=function(r,a){var n;return a&&r.eachAfter(function(o){if(Q.getPtId(o)===a)return n=o.copy()}),n||r},Q.findEntryWithChild=function(r,a){var n;return r.eachAfter(function(o){for(var i=o.children||[],l=0;l0)},Q.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Q.isHeader=function(r,a){return!(Q.isLeaf(r)||r.depth===a._maxDepth-1)};function e(r){return r.data.data.pid}Q.getParent=function(r,a){return Q.findEntryWithLevel(r,e(a))},Q.listPath=function(r,a){var n=r.parent;if(!n)return[];var o=a?[n.data[a]]:[n];return Q.listPath(n,a).concat(o)},Q.getPath=function(r){return Q.listPath(r,"label").join("/")+"/"},Q.formatValue=I.formatPieValue,Q.formatPercent=function(r,a){var n=Z.formatPercent(r,0);return n==="0%"&&(n=I.formatPiePercent(r,a)),n}}),x3=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=Fp().appendArrayPointValue,S=tf(),t=kn(),e=Bm(),r=kv(),a=wg(),n=a.formatPieValue;Z.exports=function(i,l,f,x,y){var v=x[0],T=v.trace,u=v.hierarchy,b=T.type==="sunburst",_=T.type==="treemap"||T.type==="icicle";"_hasHoverLabel"in T||(T._hasHoverLabel=!1),"_hasHoverEvent"in T||(T._hasHoverEvent=!1);var P=function(A){var h=f._fullLayout;if(!(f._dragging||h.hovermode===!1)){var p=f._fullData[T.index],k=A.data.data,w=k.i,R=r.isHierarchyRoot(A),O=r.getParent(u,A),j=r.getValue(A),V=function(Y){return t.castOption(p,w,Y)},H=V("hovertemplate"),F=S.castHoverinfo(p,h,w),U=h.separators,W;if(H||F&&F!=="none"&&F!=="skip"){var q,J;b&&(q=v.cx+A.pxmid[0]*(1-A.rInscribed),J=v.cy+A.pxmid[1]*(1-A.rInscribed)),_&&(q=A._hoverX,J=A._hoverY);var lt={},yt=[],mt=[],st=function(Y){return yt.indexOf(Y)!==-1};F&&(yt=F==="all"?p._module.attributes.hoverinfo.flags:F.split("+")),lt.label=k.label,st("label")&<.label&&mt.push(lt.label),k.hasOwnProperty("v")&&(lt.value=k.v,lt.valueLabel=n(lt.value,U),st("value")&&mt.push(lt.valueLabel)),lt.currentPath=A.currentPath=r.getPath(A.data),st("current path")&&!R&&mt.push(lt.currentPath);var tt,dt=[],rt=function(){dt.indexOf(tt)===-1&&(mt.push(tt),dt.push(tt))};lt.percentParent=A.percentParent=j/r.getValue(O),lt.parent=A.parentString=r.getPtLabel(O),st("percent parent")&&(tt=r.formatPercent(lt.percentParent,U)+" of "+lt.parent,rt()),lt.percentEntry=A.percentEntry=j/r.getValue(l),lt.entry=A.entry=r.getPtLabel(l),st("percent entry")&&!R&&!A.onPathbar&&(tt=r.formatPercent(lt.percentEntry,U)+" of "+lt.entry,rt()),lt.percentRoot=A.percentRoot=j/r.getValue(u),lt.root=A.root=r.getPtLabel(u),st("percent root")&&!R&&(tt=r.formatPercent(lt.percentRoot,U)+" of "+lt.root,rt()),lt.text=V("hovertext")||V("text"),st("text")&&(tt=lt.text,t.isValidTextValue(tt)&&mt.push(tt)),W=[o(A,p,y.eventDataKeys)];var at={trace:p,y:J,_x0:A._x0,_x1:A._x1,_y0:A._y0,_y1:A._y1,text:mt.join("
"),name:H||st("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||k.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:H,hovertemplateLabels:lt,eventData:W};b&&(at.x0=q-A.rInscribed*A.rpx1,at.x1=q+A.rInscribed*A.rpx1,at.idealAlign=A.pxmid[0]<0?"left":"right"),_&&(at.x=q,at.idealAlign=q<0?"left":"right");var vt=[];S.loneHover(at,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f,inOut_bbox:vt}),W[0].bbox=vt[0],T._hasHoverLabel=!0}if(_){var it=i.select("path.surface");y.styleOne(it,A,p,f,{hovered:!0})}T._hasHoverEvent=!0,f.emit("plotly_hover",{points:W||[o(A,p,y.eventDataKeys)],event:c.event})}},M=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=c.select(this).datum();if(T._hasHoverEvent&&(A.originalEvent=c.event,f.emit("plotly_unhover",{points:[o(k,p,y.eventDataKeys)],event:c.event}),T._hasHoverEvent=!1),T._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),T._hasHoverLabel=!1),_){var w=i.select("path.surface");y.styleOne(w,k,p,f,{hovered:!1})}},C=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=b&&(r.isHierarchyRoot(A)||r.isLeaf(A)),w=r.getPtId(A),R=r.isEntry(A)?r.findEntryWithChild(u,w):r.findEntryWithLevel(u,w),O=r.getPtId(R),j={points:[o(A,p,y.eventDataKeys)],event:c.event};k||(j.nextLevel=O);var V=e.triggerHandler(f,"plotly_"+T.type+"click",j);if(V!==!1&&h.hovermode&&(f._hoverdata=[o(A,p,y.eventDataKeys)],S.click(f,c.event)),!k&&V!==!1&&!f._dragging&&!f._transitioning){g.call("_storeDirectGUIEdit",p,h._tracePreGUI[p.uid],{level:p.level});var H={data:[{level:O}],traces:[T.index]},F={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),g.call("animate",f,H,F)}};i.on("mouseover",P),i.on("mouseout",M),i.on("click",C)};function o(i,l,f){for(var x=i.data.data,y={curveNumber:l.index,pointNumber:x.i,data:l._input,fullData:l},v=0;v{var Z=qr(),c=r3(),g=(mx(),ni(j1)).interpolate,I=Vs(),S=kn(),t=ec(),e=Bp(),r=e.recordMinTextSize,a=e.clearMinTextSize,n=gk(),o=wg().getRotationAngle,i=n.computeTransform,l=n.transformInsideText,f=nS().styleOne,x=xm().resizeText,y=x3(),v=e9(),T=kv();Q.plot=function(C,A,h,p){var k=C._fullLayout,w=k._sunburstlayer,R,O,j=!h,V=!k.uniformtext.mode&&T.hasTransition(h);if(a("sunburst",k),R=w.selectAll("g.trace.sunburst").data(A,function(F){return F[0].trace.uid}),R.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),R.order(),V){p&&(O=p());var H=Z.transition().duration(h.duration).ease(h.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});H.each(function(){w.selectAll("g.trace").each(function(F){u(C,F,this,h)})})}else R.each(function(F){u(C,F,this,h)}),k.uniformtext.mode&&x(C,k._sunburstlayer.selectAll(".trace"),"sunburst");j&&R.exit().remove()};function u(C,A,h,p){var k=C._context.staticPlot,w=C._fullLayout,R=!w.uniformtext.mode&&T.hasTransition(p),O=Z.select(h),j=O.selectAll("g.slice"),V=A[0],H=V.trace,F=V.hierarchy,U=T.findEntryWithLevel(F,H.level),W=T.getMaxDepth(H),q=w._size,J=H.domain,lt=q.w*(J.x[1]-J.x[0]),yt=q.h*(J.y[1]-J.y[0]),mt=.5*Math.min(lt,yt),st=V.cx=q.l+q.w*(J.x[1]+J.x[0])/2,tt=V.cy=q.t+q.h*(1-J.y[0])-yt/2;if(!U)return j.remove();var dt=null,rt={};R&&j.each(function(Mt){rt[T.getPtId(Mt)]={rpx0:Mt.rpx0,rpx1:Mt.rpx1,x0:Mt.x0,x1:Mt.x1,transform:Mt.transform},!dt&&T.isEntry(Mt)&&(dt=Mt)});var at=b(U).descendants(),vt=U.height+1,it=0,Y=W;V.hasMultipleRoots&&T.isHierarchyRoot(U)&&(at=at.slice(1),vt-=1,it=1,Y+=1),at=at.filter(function(Mt){return Mt.y1<=Y});var ft=o(H.rotation);ft&&at.forEach(function(Mt){Mt.x0+=ft,Mt.x1+=ft});var ut=Math.min(vt,W),kt=function(Mt){return(Mt-it)/ut*mt},It=function(Mt,ee){return[Mt*Math.cos(ee),-Mt*Math.sin(ee)]},Pt=function(Mt){return S.pathAnnulus(Mt.rpx0,Mt.rpx1,Mt.x0,Mt.x1,st,tt)},qt=function(Mt){return st+P(Mt)[0]*(Mt.transform.rCenter||0)+(Mt.transform.x||0)},Wt=function(Mt){return tt+P(Mt)[1]*(Mt.transform.rCenter||0)+(Mt.transform.y||0)};j=j.data(at,T.getPtId),j.enter().append("g").classed("slice",!0),R?j.exit().transition().each(function(){var Mt=Z.select(this),ee=Mt.select("path.surface");ee.transition().attrTween("d",function(oe){var Te=pe(oe);return function(He){return Pt(Te(He))}});var ve=Mt.select("g.slicetext");ve.attr("opacity",0)}).remove():j.exit().remove(),j.order();var Jt=null;if(R&&dt){var ge=T.getPtId(dt);j.each(function(Mt){Jt===null&&T.getPtId(Mt)===ge&&(Jt=Mt.x1)})}var fe=j;R&&(fe=fe.transition().each("end",function(){var Mt=Z.select(this);T.setSliceCursor(Mt,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),fe.each(function(Mt){var ee=Z.select(this),ve=S.ensureSingle(ee,"path","surface",function(ur){ur.style("pointer-events",k?"none":"all")});Mt.rpx0=kt(Mt.y0),Mt.rpx1=kt(Mt.y1),Mt.xmid=(Mt.x0+Mt.x1)/2,Mt.pxmid=It(Mt.rpx1,Mt.xmid),Mt.midangle=-(Mt.xmid-Math.PI/2),Mt.startangle=-(Mt.x0-Math.PI/2),Mt.stopangle=-(Mt.x1-Math.PI/2),Mt.halfangle=.5*Math.min(S.angleDelta(Mt.x0,Mt.x1)||Math.PI,Math.PI),Mt.ring=1-Mt.rpx0/Mt.rpx1,Mt.rInscribed=_(Mt),R?ve.transition().attrTween("d",function(ur){var jr=se(ur);return function(Wr){return Pt(jr(Wr))}}):ve.attr("d",Pt),ee.call(y,U,C,A,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:C._transitioning}),ve.call(f,Mt,H,C);var oe=S.ensureSingle(ee,"g","slicetext"),Te=S.ensureSingle(oe,"text","",function(ur){ur.attr("data-notex",1)}),He=S.ensureUniformFontSize(C,T.determineTextFont(H,Mt,w.font));Te.text(Q.formatSliceLabel(Mt,U,H,A,w)).classed("slicetext",!0).attr("text-anchor","middle").call(I.font,He).call(t.convertToTspans,C);var Ge=I.bBox(Te.node());Mt.transform=l(Ge,Mt,V),Mt.transform.targetX=qt(Mt),Mt.transform.targetY=Wt(Mt);var cr=function(ur,jr){var Wr=ur.transform;return i(Wr,jr),Wr.fontSize=He.size,r(H.type,Wr,w),S.getTextTransform(Wr)};R?Te.transition().attrTween("transform",function(ur){var jr=Tt(ur);return function(Wr){return cr(jr(Wr),Ge)}}):Te.attr("transform",cr(Mt,Ge))});function pe(Mt){var ee=T.getPtId(Mt),ve=rt[ee],oe=rt[T.getPtId(U)],Te;if(oe){var He=(Mt.x1>oe.x1?2*Math.PI:0)+ft;Te=Mt.rpx1Jt?2*Math.PI:0)+ft;ve={x0:Te,x1:Te}}else ve={rpx0:mt,rpx1:mt},S.extendFlat(ve,Lt(Mt));else ve={rpx0:0,rpx1:0};else ve={x0:ft,x1:ft};return g(ve,oe)}function Tt(Mt){var ee=rt[T.getPtId(Mt)],ve,oe=Mt.transform;if(ee)ve=ee;else if(ve={rpx1:Mt.rpx1,transform:{textPosAngle:oe.textPosAngle,scale:0,rotate:oe.rotate,rCenter:oe.rCenter,x:oe.x,y:oe.y}},dt)if(Mt.parent)if(Jt){var Te=Mt.x1>Jt?2*Math.PI:0;ve.x0=ve.x1=Te}else S.extendFlat(ve,Lt(Mt));else ve.x0=ve.x1=ft;else ve.x0=ve.x1=ft;var He=g(ve.transform.textPosAngle,Mt.transform.textPosAngle),Ge=g(ve.rpx1,Mt.rpx1),cr=g(ve.x0,Mt.x0),ur=g(ve.x1,Mt.x1),jr=g(ve.transform.scale,oe.scale),Wr=g(ve.transform.rotate,oe.rotate),br=oe.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Xr=g(ve.transform.rCenter,oe.rCenter),nn=function(Le){return Xr(Math.pow(Le,br))};return function(Le){var Gt=Ge(Le);cr(Le),ur(Le);var ne=nn(Le),Ct=He(Le),gt={rpx1:Gt,transform:{textPosAngle:Ct,rCenter:ne,x:oe.x,y:oe.y}};return r(H.type,oe,w),{transform:{targetX:qt(gt),targetY:Wt(gt),scale:jr(Le),rotate:Wr(Le),rCenter:ne}}}}function Lt(Mt){var ee=Mt.parent,ve=rt[T.getPtId(ee)],oe={};if(ve){var Te=ee.children,He=Te.indexOf(Mt),Ge=Te.length,cr=g(ve.x0,ve.x1);oe.x0=cr(He/Ge),oe.x1=cr(He/Ge)}else oe.x0=oe.x1=0;return oe}}function b(C){return c.partition().size([2*Math.PI,C.height+1])(C)}Q.formatSliceLabel=function(C,A,h,p,k){var w=h.texttemplate,R=h.textinfo;if(!w&&(!R||R==="none"))return"";var O=k.separators,j=p[0],V=C.data.data,H=j.hierarchy,F=T.isHierarchyRoot(C),U=T.getParent(H,C),W=T.getValue(C);if(!w){var q=R.split("+"),J=function(it){return q.indexOf(it)!==-1},lt=[],yt;if(J("label")&&V.label&<.push(V.label),V.hasOwnProperty("v")&&J("value")&<.push(T.formatValue(V.v,O)),!F){J("current path")&<.push(T.getPath(C.data));var mt=0;J("percent parent")&&mt++,J("percent entry")&&mt++,J("percent root")&&mt++;var st=mt>1;if(mt){var tt,dt=function(it){yt=T.formatPercent(tt,O),st&&(yt+=" of "+it),lt.push(yt)};J("percent parent")&&!F&&(tt=W/T.getValue(U),dt("parent")),J("percent entry")&&(tt=W/T.getValue(A),dt("entry")),J("percent root")&&(tt=W/T.getValue(H),dt("root"))}}return J("text")&&(yt=S.castOption(h,V.i,"text"),S.isValidTextValue(yt)&<.push(yt)),lt.join("
")}var rt=S.castOption(h,V.i,"texttemplate");if(!rt)return"";var at={};V.label&&(at.label=V.label),V.hasOwnProperty("v")&&(at.value=V.v,at.valueLabel=T.formatValue(V.v,O)),at.currentPath=T.getPath(C.data),F||(at.percentParent=W/T.getValue(U),at.percentParentLabel=T.formatPercent(at.percentParent,O),at.parent=T.getPtLabel(U)),at.percentEntry=W/T.getValue(A),at.percentEntryLabel=T.formatPercent(at.percentEntry,O),at.entry=T.getPtLabel(A),at.percentRoot=W/T.getValue(H),at.percentRootLabel=T.formatPercent(at.percentRoot,O),at.root=T.getPtLabel(H),V.hasOwnProperty("color")&&(at.color=V.color);var vt=S.castOption(h,V.i,"text");return(S.isValidTextValue(vt)||vt==="")&&(at.text=vt),at.customdata=S.castOption(h,V.i,"customdata"),S.texttemplateString({data:[at,h._meta],fallback:h.texttemplatefallback,labels:at,locale:k._d3locale,template:rt})};function _(C){return C.rpx0===0&&S.isFullCircle([C.x0,C.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(C.halfangle)),C.ring/2))}function P(C){return M(C.rpx1,C.transform.textPosAngle)}function M(C,A){return[C*Math.sin(A),-C*Math.cos(A)]}}),Ej=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"sunburst",basePlotModule:WN(),categories:[],animatable:!0,attributes:e3(),layoutAttributes:r9(),supplyDefaults:qN(),supplyLayoutDefaults:$N(),calc:n3().calc,crossTraceCalc:n3().crossTraceCalc,plot:$k().plot,style:nS().style,colorbar:xo(),meta:{}}}),Cj=Dt((Q,Z)=>{Z.exports=Ej()}),Lj=Dt(Q=>{var Z=Kc();Q.name="treemap",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),gx=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}),Zk=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=jh().attributes,e=lx(),r=e3(),a=gx(),n=Ia().extendFlat,o=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:n({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:o,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("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:n({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:a.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n({},e.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:e.sort,root:r.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}),iS=Dt((Q,Z)=>{Z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Pj=Dt((Q,Z)=>{var c=kn(),g=Zk(),I=hi(),S=jh().defaults,t=J0().handleText,e=rx().TEXTPAD,r=ux().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(p,k){return c.coerce(i,l,g,p,k)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var b=y("tiling.packing");b==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var _=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(_)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var P=y("pathbar.visible"),M="auto";t(i,l,x,y,M,{hasPathbar:P,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var C=l.textposition.indexOf("bottom")!==-1;r(i,l,x,y);var A=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;A?o(i,l,x,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(l.marker.colors||[]).length);var h=l.textfont.size*2;y("marker.pad.t",C?h/4:h),y("marker.pad.l",h/4),y("marker.pad.r",h/4),y("marker.pad.b",C?h:h/4),y("marker.cornerradius"),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},P&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),Ij=Dt((Q,Z)=>{var c=kn(),g=iS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("treemapcolorway",S.colorway),t("extendtreemapcolors")}}),aS=Dt(Q=>{var Z=n3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("treemap",c)}}),oS=Dt((Q,Z)=>{Z.exports=function c(g,I,S){var t;S.swapXY&&(t=g.x0,g.x0=g.y0,g.y0=t,t=g.x1,g.x1=g.y1,g.y1=t),S.flipX&&(t=g.x0,g.x0=I[0]-g.x1,g.x1=I[0]-t),S.flipY&&(t=g.y0,g.y0=I[1]-g.y1,g.y1=I[1]-t);var e=g.children;if(e)for(var r=0;r{var c=r3(),g=oS();Z.exports=function(S,t,e){var r=e.flipX,a=e.flipY,n=e.packing==="dice-slice",o=e.pad[a?"bottom":"top"],i=e.pad[r?"right":"left"],l=e.pad[r?"left":"right"],f=e.pad[a?"top":"bottom"],x;n&&(x=i,i=o,o=x,x=l,l=f,f=x);var y=c.treemap().tile(I(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(i).paddingRight(l).paddingTop(o).paddingBottom(f).size(n?[t[1],t[0]]:t)(S);return(n||r||a)&&g(y,t,{swapXY:n,flipX:r,flipY:a}),y};function I(S,t){switch(S){case"squarify":return c.treemapSquarify.ratio(t);case"binary":return c.treemapBinary;case"dice":return c.treemapDice;case"slice":return c.treemapSlice;default:return c.treemapSliceDice}}}),Gk=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=kv(),t=Bp().resizeText,e=qk();function r(n){var o=n._fullLayout._treemaplayer.selectAll(".trace");t(n,o,"treemap"),o.each(function(i){var l=c.select(this),f=i[0],x=f.trace;l.style("opacity",x.opacity),l.selectAll("path.surface").each(function(y){c.select(this).call(a,y,x,n,{hovered:!1})})})}function a(n,o,i,l,f){var x=(f||{}).hovered,y=o.data.data,v=y.i,T,u,b=y.color,_=S.isHierarchyRoot(o),P=1;if(x)T=i._hovered.marker.line.color,u=i._hovered.marker.line.width;else if(_&&b===i.root.color)P=100,T="rgba(0,0,0,0)",u=0;else if(T=I.castOption(i,v,"marker.line.color")||g.defaultLine,u=I.castOption(i,v,"marker.line.width")||0,!i._hasColorscale&&!o.onPathbar){var M=i.marker.depthfade;if(M){var C=g.combine(g.addOpacity(i._backgroundColor,.75),b),A;if(M===!0){var h=S.getMaxDepth(i);isFinite(h)?S.isLeaf(o)?A=0:A=i._maxVisibleLayers-(o.data.depth-i._entryDepth):A=o.data.height+1}else A=o.data.depth-i._entryDepth,i._atRootLevel||A++;if(A>0)for(var p=0;p{var c=qr(),g=kn(),I=Vs(),S=ec(),t=sS(),e=Gk().styleOne,r=gx(),a=kv(),n=x3(),o=!0;Z.exports=function(i,l,f,x,y){var v=y.barDifY,T=y.width,u=y.height,b=y.viewX,_=y.viewY,P=y.pathSlice,M=y.toMoveInsideSlice,C=y.strTransform,A=y.hasTransition,h=y.handleSlicesExit,p=y.makeUpdateSliceInterpolator,k=y.makeUpdateTextInterpolator,w={},R=i._context.staticPlot,O=i._fullLayout,j=l[0],V=j.trace,H=j.hierarchy,F=T/V._entryDepth,U=a.listPath(f.data,"id"),W=t(H.copy(),[T,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(J){var lt=U.indexOf(J.data.id);return lt===-1?!1:(J.x0=F*lt,J.x1=F*(lt+1),J.y0=v,J.y1=v+u,J.onPathbar=!0,!0)}),W.reverse(),x=x.data(W,a.getPtId),x.enter().append("g").classed("pathbar",!0),h(x,o,w,[T,u],P),x.order();var q=x;A&&(q=q.transition().each("end",function(){var J=c.select(this);a.setSliceCursor(J,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(J){J._x0=b(J.x0),J._x1=b(J.x1),J._y0=_(J.y0),J._y1=_(J.y1),J._hoverX=b(J.x1-Math.min(T,u)/2),J._hoverY=_(J.y1-u/2);var lt=c.select(this),yt=g.ensureSingle(lt,"path","surface",function(dt){dt.style("pointer-events",R?"none":"all")});A?yt.transition().attrTween("d",function(dt){var rt=p(dt,o,w,[T,u]);return function(at){return P(rt(at))}}):yt.attr("d",P),lt.call(n,f,i,l,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:i._transitioning}),yt.call(e,J,V,i,{hovered:!1}),J._text=(a.getPtLabel(J)||"").split("
").join(" ")||"";var mt=g.ensureSingle(lt,"g","slicetext"),st=g.ensureSingle(mt,"text","",function(dt){dt.attr("data-notex",1)}),tt=g.ensureUniformFontSize(i,a.determineTextFont(V,J,O.font,{onPathbar:!0}));st.text(J._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(I.font,tt).call(S.convertToTspans,i),J.textBB=I.bBox(st.node()),J.transform=M(J,{fontSize:tt.size,onPathbar:!0}),J.transform.fontSize=tt.size,A?st.transition().attrTween("transform",function(dt){var rt=k(dt,o,w,[T,u]);return function(at){return C(rt(at))}}):st.attr("transform",C(J))})}}),Oj=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolate,I=kv(),S=kn(),t=rx().TEXTPAD,e=nx(),r=e.toMoveInsideBar,a=Bp(),n=a.recordMinTextSize,o=gx(),i=zj();function l(f){return I.isHierarchyRoot(f)?"":I.getPtId(f)}Z.exports=function(f,x,y,v,T){var u=f._fullLayout,b=x[0],_=b.trace,P=_.type,M=P==="icicle",C=b.hierarchy,A=I.findEntryWithLevel(C,_.level),h=c.select(y),p=h.selectAll("g.pathbar"),k=h.selectAll("g.slice");if(!A){p.remove(),k.remove();return}var w=I.isHierarchyRoot(A),R=!u.uniformtext.mode&&I.hasTransition(v),O=I.getMaxDepth(_),j=function(br){return br.data.depth-A.data.depth-1?U+J:-(q+J):0,yt={x0:W,x1:W,y0:lt,y1:lt+q},mt=function(br,Xr,nn){var Le=_.tiling.pad,Gt=function(St){return St-Le<=Xr.x0},ne=function(St){return St+Le>=Xr.x1},Ct=function(St){return St-Le<=Xr.y0},gt=function(St){return St+Le>=Xr.y1};return br.x0===Xr.x0&&br.x1===Xr.x1&&br.y0===Xr.y0&&br.y1===Xr.y1?{x0:br.x0,x1:br.x1,y0:br.y0,y1:br.y1}:{x0:Gt(br.x0-Le)?0:ne(br.x0-Le)?nn[0]:br.x0,x1:Gt(br.x1+Le)?0:ne(br.x1+Le)?nn[0]:br.x1,y0:Ct(br.y0-Le)?0:gt(br.y0-Le)?nn[1]:br.y0,y1:Ct(br.y1+Le)?0:gt(br.y1+Le)?nn[1]:br.y1}},st=null,tt={},dt={},rt=null,at=function(br,Xr){return Xr?tt[l(br)]:dt[l(br)]},vt=function(br,Xr,nn,Le){if(Xr)return tt[l(C)]||yt;var Gt=dt[_.level]||nn;return j(br)?mt(br,Gt,Le):{}};b.hasMultipleRoots&&w&&O++,_._maxDepth=O,_._backgroundColor=u.paper_bgcolor,_._entryDepth=A.data.depth,_._atRootLevel=w;var it=-F/2+V.l+V.w*(H.x[1]+H.x[0])/2,Y=-U/2+V.t+V.h*(1-(H.y[1]+H.y[0])/2),ft=function(br){return it+br},ut=function(br){return Y+br},kt=ut(0),It=ft(0),Pt=function(br){return It+br},qt=function(br){return kt+br};function Wt(br,Xr){return br+","+Xr}var Jt=Pt(0),ge=function(br){br.x=Math.max(Jt,br.x)},fe=_.pathbar.edgeshape,pe=function(br){var Xr=Pt(Math.max(Math.min(br.x0,br.x0),0)),nn=Pt(Math.min(Math.max(br.x1,br.x1),W)),Le=qt(br.y0),Gt=qt(br.y1),ne=q/2,Ct={},gt={};Ct.x=Xr,gt.x=nn,Ct.y=gt.y=(Le+Gt)/2;var St={x:Xr,y:Le},Nt={x:nn,y:Le},re={x:nn,y:Gt},le={x:Xr,y:Gt};return fe===">"?(St.x-=ne,Nt.x-=ne,re.x-=ne,le.x-=ne):fe==="/"?(re.x-=ne,le.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="\\"?(St.x-=ne,Nt.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="<"&&(Ct.x-=ne,gt.x-=ne),ge(St),ge(le),ge(Ct),ge(Nt),ge(re),ge(gt),"M"+Wt(St.x,St.y)+"L"+Wt(Nt.x,Nt.y)+"L"+Wt(gt.x,gt.y)+"L"+Wt(re.x,re.y)+"L"+Wt(le.x,le.y)+"L"+Wt(Ct.x,Ct.y)+"Z"},se=_[M?"tiling":"marker"].pad,Tt=function(br){return _.textposition.indexOf(br)!==-1},Lt=Tt("top"),Mt=Tt("left"),ee=Tt("right"),ve=Tt("bottom"),oe=function(br){var Xr=ft(br.x0),nn=ft(br.x1),Le=ut(br.y0),Gt=ut(br.y1),ne=nn-Xr,Ct=Gt-Le;if(!ne||!Ct)return"";var gt=_.marker.cornerradius||0,St=Math.min(gt,ne/2,Ct/2);St&&br.data&&br.data.data&&br.data.data.label&&(Lt&&(St=Math.min(St,se.t)),Mt&&(St=Math.min(St,se.l)),ee&&(St=Math.min(St,se.r)),ve&&(St=Math.min(St,se.b)));var Nt=function(re,le){return St?"a"+Wt(St,St)+" 0 0 1 "+Wt(re,le):""};return"M"+Wt(Xr,Le+St)+Nt(St,-St)+"L"+Wt(nn-St,Le)+Nt(St,St)+"L"+Wt(nn,Gt-St)+Nt(-St,St)+"L"+Wt(Xr+St,Gt)+Nt(-St,-St)+"Z"},Te=function(br,Xr){var nn=br.x0,Le=br.x1,Gt=br.y0,ne=br.y1,Ct=br.textBB,gt=Lt||Xr.isHeader&&!ve,St=gt?"start":ve?"end":"middle",Nt=Tt("right"),re=Tt("left")||Xr.onPathbar,le=re?-1:Nt?1:0;if(Xr.isHeader){if(nn+=(M?se:se.l)-t,Le-=(M?se:se.r)-t,nn>=Le){var we=(nn+Le)/2;nn=we,Le=we}var Ue;ve?(Ue=ne-(M?se:se.b),Gt{var c=qr(),g=kv(),I=Bp(),S=I.clearMinTextSize,t=xm().resizeText,e=Oj();Z.exports=function(r,a,n,o,i){var l=i.type,f=i.drawDescendants,x=r._fullLayout,y=x["_"+l+"layer"],v,T,u=!n;if(S(l,x),v=y.selectAll("g.trace."+l).data(a,function(_){return _[0].trace.uid}),v.enter().append("g").classed("trace",!0).classed(l,!0),v.order(),!x.uniformtext.mode&&g.hasTransition(n)){o&&(T=o());var b=c.transition().duration(n.duration).ease(n.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){y.selectAll("g.trace").each(function(_){e(r,_,this,n,f)})})}else v.each(function(_){e(r,_,this,n,f)}),x.uniformtext.mode&&t(r,y.selectAll(".trace"),l);u&&v.exit().remove()}}),Dj=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Vs(),S=ec(),t=sS(),e=Gk().styleOne,r=gx(),a=kv(),n=x3(),o=$k().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=!W&&!H.marker.pad.t||W&&!H.marker.pad.b,J=t(x,[T,u],{packing:H.tiling.packing,squarifyratio:H.tiling.squarifyratio,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,pad:{inner:H.tiling.pad,top:H.marker.pad.t,left:H.marker.pad.l,right:H.marker.pad.r,bottom:H.marker.pad.b}}),lt=J.descendants(),yt=1/0,mt=-1/0;lt.forEach(function(at){var vt=at.depth;vt>=H._maxDepth?(at.x0=at.x1=(at.x0+at.x1)/2,at.y0=at.y1=(at.y0+at.y1)/2):(yt=Math.min(yt,vt),mt=Math.max(mt,vt))}),y=y.data(lt,a.getPtId),H._maxVisibleLayers=isFinite(mt)?mt-yt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],P),y.order();var st=null;if(A&&w){var tt=a.getPtId(w);y.each(function(at){st===null&&a.getPtId(at)===tt&&(st={x0:at.x0,x1:at.x1,y0:at.y0,y1:at.y1})})}var dt=function(){return st||{x0:0,x1:T,y0:0,y1:u}},rt=y;return A&&(rt=rt.transition().each("end",function(){var at=c.select(this);a.setSliceCursor(at,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),rt.each(function(at){var vt=a.isHeader(at,H);at._x0=b(at.x0),at._x1=b(at.x1),at._y0=_(at.y0),at._y1=_(at.y1),at._hoverX=b(at.x1-H.marker.pad.r),at._hoverY=_(W?at.y1-H.marker.pad.b/2:at.y0+H.marker.pad.t/2);var it=c.select(this),Y=g.ensureSingle(it,"path","surface",function(qt){qt.style("pointer-events",O?"none":"all")});A?Y.transition().attrTween("d",function(qt){var Wt=p(qt,i,dt(),[T,u]);return function(Jt){return P(Wt(Jt))}}):Y.attr("d",P),it.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),Y.call(e,at,H,l,{hovered:!1}),at.x0===at.x1||at.y0===at.y1?at._text="":vt?at._text=q?"":a.getPtLabel(at)||"":at._text=o(at,x,H,f,j)||"";var ft=g.ensureSingle(it,"g","slicetext"),ut=g.ensureSingle(ft,"text","",function(qt){qt.attr("data-notex",1)}),kt=g.ensureUniformFontSize(l,a.determineTextFont(H,at,j.font)),It=at._text||" ",Pt=vt&&It.indexOf("
")===-1;ut.text(It).classed("slicetext",!0).attr("text-anchor",U?"end":F||Pt?"start":"middle").call(I.font,kt).call(S.convertToTspans,l),at.textBB=I.bBox(ut.node()),at.transform=M(at,{fontSize:kt.size,isHeader:vt}),at.transform.fontSize=kt.size,A?ut.transition().attrTween("transform",function(qt){var Wt=k(qt,i,dt(),[T,u]);return function(Jt){return C(Wt(Jt))}}):ut.attr("transform",C(at))}),st}}),Fj=Dt((Q,Z)=>{var c=lS(),g=Dj();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"treemap",drawDescendants:g})}}),Rj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"treemap",basePlotModule:Lj(),categories:[],animatable:!0,attributes:Zk(),layoutAttributes:iS(),supplyDefaults:Pj(),supplyLayoutDefaults:Ij(),calc:aS().calc,crossTraceCalc:aS().crossTraceCalc,plot:Fj(),style:Gk().style,colorbar:xo(),meta:{}}}),Bj=Dt((Q,Z)=>{Z.exports=Rj()}),Nj=Dt(Q=>{var Z=Kc();Q.name="icicle",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),uS=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=jh().attributes,e=lx(),r=e3(),a=Zk(),n=gx(),o=Ia().extendFlat,i=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:a.pathbar,text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:n.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:r.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}),cS=Dt((Q,Z)=>{Z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),jj=Dt((Q,Z)=>{var c=kn(),g=uS(),I=hi(),S=jh().defaults,t=J0().handleText,e=rx().TEXTPAD,r=ux().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(C,A){return c.coerce(i,l,g,C,A)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var _=y("pathbar.visible"),P="auto";t(i,l,x,y,P,{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),r(i,l,x,y);var M=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;M&&o(i,l,x,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",M?1:.7),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},_&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),Uj=Dt((Q,Z)=>{var c=kn(),g=cS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("iciclecolorway",S.colorway),t("extendiciclecolors")}}),hS=Dt(Q=>{var Z=n3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("icicle",c)}}),Vj=Dt((Q,Z)=>{var c=r3(),g=oS();Z.exports=function(I,S,t){var e=t.flipX,r=t.flipY,a=t.orientation==="h",n=t.maxDepth,o=S[0],i=S[1];n&&(o=(I.height+1)*S[0]/Math.min(I.height+1,n),i=(I.height+1)*S[1]/Math.min(I.height+1,n));var l=c.partition().padding(t.pad.inner).size(a?[S[1],o]:[S[0],i])(I);return(a||e||r)&&g(l,S,{swapXY:a,flipX:e,flipY:r}),l}}),fS=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=Bp().resizeText,t=qk();function e(a){var n=a._fullLayout._iciclelayer.selectAll(".trace");S(a,n,"icicle"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),Hj=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Vs(),S=ec(),t=Vj(),e=fS().styleOne,r=gx(),a=kv(),n=x3(),o=$k().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=t(x,[T,u],{flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,orientation:H.tiling.orientation,pad:{inner:H.tiling.pad},maxDepth:H._maxDepth}),J=q.descendants(),lt=1/0,yt=-1/0;J.forEach(function(rt){var at=rt.depth;at>=H._maxDepth?(rt.x0=rt.x1=(rt.x0+rt.x1)/2,rt.y0=rt.y1=(rt.y0+rt.y1)/2):(lt=Math.min(lt,at),yt=Math.max(yt,at))}),y=y.data(J,a.getPtId),H._maxVisibleLayers=isFinite(yt)?yt-lt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],P),y.order();var mt=null;if(A&&w){var st=a.getPtId(w);y.each(function(rt){mt===null&&a.getPtId(rt)===st&&(mt={x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1})})}var tt=function(){return mt||{x0:0,x1:T,y0:0,y1:u}},dt=y;return A&&(dt=dt.transition().each("end",function(){var rt=c.select(this);a.setSliceCursor(rt,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),dt.each(function(rt){rt._x0=b(rt.x0),rt._x1=b(rt.x1),rt._y0=_(rt.y0),rt._y1=_(rt.y1),rt._hoverX=b(rt.x1-H.tiling.pad),rt._hoverY=_(W?rt.y1-H.tiling.pad/2:rt.y0+H.tiling.pad/2);var at=c.select(this),vt=g.ensureSingle(at,"path","surface",function(ut){ut.style("pointer-events",O?"none":"all")});A?vt.transition().attrTween("d",function(ut){var kt=p(ut,i,tt(),[T,u],{orientation:H.tiling.orientation,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1});return function(It){return P(kt(It))}}):vt.attr("d",P),at.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),vt.call(e,rt,H,l,{hovered:!1}),rt.x0===rt.x1||rt.y0===rt.y1?rt._text="":rt._text=o(rt,x,H,f,j)||"";var it=g.ensureSingle(at,"g","slicetext"),Y=g.ensureSingle(it,"text","",function(ut){ut.attr("data-notex",1)}),ft=g.ensureUniformFontSize(l,a.determineTextFont(H,rt,j.font));Y.text(rt._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":F?"start":"middle").call(I.font,ft).call(S.convertToTspans,l),rt.textBB=I.bBox(Y.node()),rt.transform=M(rt,{fontSize:ft.size}),rt.transform.fontSize=ft.size,A?Y.transition().attrTween("transform",function(ut){var kt=k(ut,i,tt(),[T,u]);return function(It){return C(kt(It))}}):Y.attr("transform",C(rt))}),mt}}),Wj=Dt((Q,Z)=>{var c=lS(),g=Hj();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"icicle",drawDescendants:g})}}),qj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"icicle",basePlotModule:Nj(),categories:[],animatable:!0,attributes:uS(),layoutAttributes:cS(),supplyDefaults:jj(),supplyLayoutDefaults:Uj(),calc:hS().calc,crossTraceCalc:hS().crossTraceCalc,plot:Wj(),style:fS().style,colorbar:xo(),meta:{}}}),$j=Dt((Q,Z)=>{Z.exports=qj()}),Zj=Dt(Q=>{var Z=Kc();Q.name="funnelarea",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),dS=Dt((Q,Z)=>{var c=lx(),g=Ho(),I=jh().attributes,{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=Ia().extendFlat;Z.exports={labels:c.labels,label0:c.label0,dlabel:c.dlabel,values:c.values,marker:{colors:c.marker.colors,line:{color:r({},c.marker.line.color,{dflt:null}),width:r({},c.marker.line.width,{dflt:1}),editType:"calc"},pattern:c.marker.pattern,editType:"calc"},text:c.text,hovertext:c.hovertext,scalegroup:r({},c.scalegroup,{}),textinfo:r({},c.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:r({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:r({},c.textposition,{values:["inside","none"],dflt:"inside"}),textfont:c.textfont,insidetextfont:c.insidetextfont,title:{text:c.title.text,font:c.title.font,position:r({},c.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:I({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"}}}),pS=Dt((Q,Z)=>{var c=mk().hiddenlabels;Z.exports={hiddenlabels:c,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Gj=Dt((Q,Z)=>{var c=kn(),g=dS(),I=jh().defaults,S=J0().handleText,t=ux().handleLabelsAndValues,e=ux().handleMarkerDefaults;Z.exports=function(r,a,n,o){function i(P,M){return c.coerce(r,a,g,P,M)}var l=i("labels"),f=i("values"),x=t(l,f),y=x.len;if(a._hasLabels=x.hasLabels,a._hasValues=x.hasValues,!a._hasLabels&&a._hasValues&&(i("label0"),i("dlabel")),!y){a.visible=!1;return}a._length=y,e(r,a,o,i),i("scalegroup");var v=i("text"),T=i("texttemplate");i("texttemplatefallback");var u;if(T||(u=i("textinfo",Array.isArray(v)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),T||u&&u!=="none"){var b=i("textposition");S(r,a,o,i,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else u==="none"&&i("textposition","none");I(a,o,i);var _=i("title.text");_&&(i("title.position"),c.coerceFont(i,"title.font",o.font)),i("aspectratio"),i("baseratio")}}),Yj=Dt((Q,Z)=>{var c=kn(),g=pS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("funnelareacolorway",S.colorway),t("extendfunnelareacolors")}}),mS=Dt((Q,Z)=>{var c=lb();function g(S,t){return c.calc(S,t)}function I(S){c.crossTraceCalc(S,{type:"funnelarea"})}Z.exports={calc:g,crossTraceCalc:I}}),Kj=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=kn(),S=I.strScale,t=I.strTranslate,e=ec(),r=nx(),a=r.toMoveInsideBar,n=Bp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=wg(),f=gk(),x=f.attachFxHandlers,y=f.determineInsideTextFont,v=f.layoutAreas,T=f.prerenderTitles,u=f.positionTitleOutside,b=f.formatSliceLabel;Z.exports=function(C,A){var h=C._context.staticPlot,p=C._fullLayout;i("funnelarea",p),T(A,C),v(A,p._size),I.makeTraceGroups(p._funnelarealayer,A,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace;M(k),w.each(function(){var j=c.select(this).selectAll("g.slice").data(k);j.enter().append("g").classed("slice",!0),j.exit().remove(),j.each(function(H,F){if(H.hidden){c.select(this).selectAll("path,g").remove();return}H.pointNumber=H.i,H.curveNumber=O.index;var U=R.cx,W=R.cy,q=c.select(this),J=q.selectAll("path.surface").data([H]);J.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(x,C,k);var lt="M"+(U+H.TR[0])+","+(W+H.TR[1])+_(H.TR,H.BR)+_(H.BR,H.BL)+_(H.BL,H.TL)+"Z";J.attr("d",lt),b(C,H,R);var yt=l.castOption(O.textposition,H.pts),mt=q.selectAll("g.slicetext").data(H.text&&yt!=="none"?[0]:[]);mt.enter().append("g").classed("slicetext",!0),mt.exit().remove(),mt.each(function(){var st=I.ensureSingle(c.select(this),"text","",function(ft){ft.attr("data-notex",1)}),tt=I.ensureUniformFontSize(C,y(O,H,p.font));st.text(H.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,tt).call(e.convertToTspans,C);var dt=g.bBox(st.node()),rt,at,vt,it=Math.min(H.BL[1],H.BR[1])+W,Y=Math.max(H.TL[1],H.TR[1])+W;at=Math.max(H.TL[0],H.BL[0])+U,vt=Math.min(H.TR[0],H.BR[0])+U,rt=a(at,vt,it,Y,dt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),rt.fontSize=tt.size,o(O.type,rt,p),k[F].transform=rt,I.setTransormAndDisplay(st,rt)})});var V=c.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var H=I.ensureSingle(c.select(this),"text","",function(W){W.attr("data-notex",1)}),F=O.title.text;O._meta&&(F=I.templateString(F,O._meta)),H.text(F).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(g.font,O.title.font).call(e.convertToTspans,C);var U=u(R,p._size);H.attr("transform",t(U.x,U.y)+S(Math.min(1,U.scale))+t(U.tx,U.ty))})})})};function _(C,A){var h=A[0]-C[0],p=A[1]-C[1];return"l"+h+","+p}function P(C,A){return[.5*(C[0]+A[0]),.5*(C[1]+A[1])]}function M(C){if(!C.length)return;var A=C[0],h=A.trace,p=h.aspectratio,k=h.baseratio;k>.999&&(k=.999);var w=Math.pow(k,2),R=A.vTotal,O=R*w/(1-w),j=R,V=O/R;function H(){var kt=Math.sqrt(V);return{x:kt,y:-kt}}function F(){var kt=H();return[kt.x,kt.y]}var U,W=[];W.push(F());var q,J;for(q=C.length-1;q>-1;q--)if(J=C[q],!J.hidden){var lt=J.v/j;V+=lt,W.push(F())}var yt=1/0,mt=-1/0;for(q=0;q-1;q--)if(J=C[q],!J.hidden){Y+=1;var ft=W[Y][0],ut=W[Y][1];J.TL=[-ft,ut],J.TR=[ft,ut],J.BL=vt,J.BR=it,J.pxmid=P(J.TR,J.BR),vt=J.TL,it=J.TR}}}),Xj=Dt((Q,Z)=>{var c=qr(),g=kg(),I=Bp().resizeText;Z.exports=function(S){var t=S._fullLayout._funnelarealayer.selectAll(".trace");I(S,t,"funnelarea"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),Jj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Zj(),categories:["pie-like","funnelarea","showLegend"],attributes:dS(),layoutAttributes:pS(),supplyDefaults:Gj(),supplyLayoutDefaults:Yj(),calc:mS().calc,crossTraceCalc:mS().crossTraceCalc,plot:Kj(),style:Xj(),styleOne:kg(),meta:{}}}),Qj=Dt((Q,Z)=>{Z.exports=Jj()}),fp=Dt((Q,Z)=>{(function(){var c={24:function(t){var e={left:0,top:0};t.exports=r;function r(n,o,i){o=o||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var l=n.clientX||0,f=n.clientY||0,x=a(o);return i[0]=l-x.left,i[1]=f-x.top,i}function a(n){return n===window||n===document||n===document.body?e:n.getBoundingClientRect()}},109:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[2],f=a[0]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+x*y+f*v,r[1]=a[1],r[2]=l+x*v-f*y,r}},160:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r[3]=Math.max(a[3],n[3]),r}},216:function(t){t.exports=e;function e(r,a){for(var n={},o=0;o1){y[0]in f||(f[y[0]]=[]),f=f[y[0]];for(var v=1;v=0;--U){var dt=H[U];W=dt[0];var rt=j[W],at=rt[0],vt=rt[1],it=O[at],Y=O[vt];if((it[0]-Y[0]||it[1]-Y[1])<0){var ft=at;at=vt,vt=ft}rt[0]=at;var ut=rt[1]=dt[1],kt;for(F&&(kt=rt[2]);U>0&&H[U-1][0]===W;){var dt=H[--U],It=dt[1];F?j.push([ut,It,kt]):j.push([ut,It]),ut=It}F?j.push([ut,vt,kt]):j.push([ut,vt])}return q}function C(O,j,V){for(var H=j.length,F=new a(H),U=[],W=0;Wj[2]?1:0)}function p(O,j,V){if(O.length!==0){if(j)for(var H=0;H0||W.length>0}function R(O,j,V){var H;if(V){H=j;for(var F=new Array(j.length),U=0;U{});function kv(){}function a9(){return this.rgb().formatHex()}function cj(){return this.rgb().formatHex8()}function hj(){return h9(this).formatHsl()}function o9(){return this.rgb().formatRgb()}function hb(Q){var Z,c;return Q=(Q+"").trim().toLowerCase(),(Z=d9.exec(Q))?(c=Z[1].length,Z=parseInt(Z[1],16),c===6?s9(Z):c===3?new hp(Z>>8&15|Z>>4&240,Z>>4&15|Z&240,(Z&15)<<4|Z&15,1):c===8?a3(Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255):c===4?a3(Z>>12&15|Z>>8&240,Z>>8&15|Z>>4&240,Z>>4&15|Z&240,((Z&15)<<4|Z&15)/255):null):(Z=p9.exec(Q))?new hp(Z[1],Z[2],Z[3],1):(Z=m9.exec(Q))?new hp(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,1):(Z=g9.exec(Q))?a3(Z[1],Z[2],Z[3],Z[4]):(Z=v9.exec(Q))?a3(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,Z[4]):(Z=y9.exec(Q))?c9(Z[1],Z[2]/100,Z[3]/100,1):(Z=x9.exec(Q))?c9(Z[1],Z[2]/100,Z[3]/100,Z[4]):wk.hasOwnProperty(Q)?s9(wk[Q]):Q==="transparent"?new hp(NaN,NaN,NaN,0):null}function s9(Q){return new hp(Q>>16&255,Q>>8&255,Q&255,1)}function a3(Q,Z,c,g){return g<=0&&(Q=Z=c=NaN),new hp(Q,Z,c,g)}function xk(Q){return Q instanceof kv||(Q=hb(Q)),Q?(Q=Q.rgb(),new hp(Q.r,Q.g,Q.b,Q.opacity)):new hp}function o3(Q,Z,c,g){return arguments.length===1?xk(Q):new hp(Q,Z,c,g??1)}function hp(Q,Z,c,g){this.r=+Q,this.g=+Z,this.b=+c,this.opacity=+g}function l9(){return`#${B1(this.r)}${B1(this.g)}${B1(this.b)}`}function fj(){return`#${B1(this.r)}${B1(this.g)}${B1(this.b)}${B1((isNaN(this.opacity)?1:this.opacity)*255)}`}function u9(){let Q=s3(this.opacity);return`${Q===1?"rgb(":"rgba("}${F1(this.r)}, ${F1(this.g)}, ${F1(this.b)}${Q===1?")":`, ${Q})`}`}function s3(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function F1(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function B1(Q){return Q=F1(Q),(Q<16?"0":"")+Q.toString(16)}function c9(Q,Z,c,g){return g<=0?Q=Z=c=NaN:c<=0||c>=1?Q=Z=NaN:Z<=0&&(Q=NaN),new _m(Q,Z,c,g)}function h9(Q){if(Q instanceof _m)return new _m(Q.h,Q.s,Q.l,Q.opacity);if(Q instanceof kv||(Q=hb(Q)),!Q)return new _m;if(Q instanceof _m)return Q;Q=Q.rgb();var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=NaN,e=S-I,r=(S+I)/2;return e?(Z===S?t=(c-g)/e+(c0&&r<1?0:t,new _m(t,e,r,Q.opacity)}function _k(Q,Z,c,g){return arguments.length===1?h9(Q):new _m(Q,Z,c,g??1)}function _m(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}function f9(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function l3(Q){return Math.max(0,Math.min(1,Q||0))}function bk(Q,Z,c){return(Q<60?Z+(c-Z)*Q/60:Q<180?c:Q<240?Z+(c-Z)*(240-Q)/60:Z)*255}var Tv,R1,N1,dx,bm,d9,p9,m9,g9,v9,y9,x9,wk,kk=fn(()=>{yk(),Tv=.7,R1=1/Tv,N1="\\s*([+-]?\\d+)\\s*",dx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d9=/^#([0-9a-f]{3,8})$/,p9=new RegExp(`^rgb\\(${N1},${N1},${N1}\\)$`),m9=new RegExp(`^rgb\\(${bm},${bm},${bm}\\)$`),g9=new RegExp(`^rgba\\(${N1},${N1},${N1},${dx}\\)$`),v9=new RegExp(`^rgba\\(${bm},${bm},${bm},${dx}\\)$`),y9=new RegExp(`^hsl\\(${dx},${bm},${bm}\\)$`),x9=new RegExp(`^hsla\\(${dx},${bm},${bm},${dx}\\)$`),wk={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},fx(kv,hb,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:a9,formatHex:a9,formatHex8:cj,formatHsl:hj,formatRgb:o9,toString:o9}),fx(hp,o3,cb(kv,{brighter(Q){return Q=Q==null?R1:Math.pow(R1,Q),new hp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?Tv:Math.pow(Tv,Q),new hp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new hp(F1(this.r),F1(this.g),F1(this.b),s3(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:l9,formatHex:l9,formatHex8:fj,formatRgb:u9,toString:u9})),fx(_m,_k,cb(kv,{brighter(Q){return Q=Q==null?R1:Math.pow(R1,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?Tv:Math.pow(Tv,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,Z=isNaN(Q)||isNaN(this.s)?0:this.s,c=this.l,g=c+(c<.5?c:1-c)*Z,I=2*c-g;return new hp(bk(Q>=240?Q-240:Q+120,I,g),bk(Q,I,g),bk(Q<120?Q+240:Q-120,I,g),this.opacity)},clamp(){return new _m(f9(this.h),l3(this.s),l3(this.l),s3(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 Q=s3(this.opacity);return`${Q===1?"hsl(":"hsla("}${f9(this.h)}, ${l3(this.s)*100}%, ${l3(this.l)*100}%${Q===1?")":`, ${Q})`}`}}))}),Tk,Ak,_9=fn(()=>{Tk=Math.PI/180,Ak=180/Math.PI});function b9(Q){if(Q instanceof $m)return new $m(Q.l,Q.a,Q.b,Q.opacity);if(Q instanceof Ig)return w9(Q);Q instanceof hp||(Q=xk(Q));var Z=Lk(Q.r),c=Lk(Q.g),g=Lk(Q.b),I=Sk((.2225045*Z+.7168786*c+.0606169*g)/zk),S,t;return Z===c&&c===g?S=t=I:(S=Sk((.4360747*Z+.3850649*c+.1430804*g)/Ik),t=Sk((.0139322*Z+.0971045*c+.7141733*g)/Ok)),new $m(116*I-16,500*(S-I),200*(I-t),Q.opacity)}function Mk(Q,Z,c,g){return arguments.length===1?b9(Q):new $m(Q,Z,c,g??1)}function $m(Q,Z,c,g){this.l=+Q,this.a=+Z,this.b=+c,this.opacity=+g}function Sk(Q){return Q>k9?Math.pow(Q,.3333333333333333):Q/Fk+Dk}function Ek(Q){return Q>j1?Q*Q*Q:Fk*(Q-Dk)}function Ck(Q){return 255*(Q<=.0031308?12.92*Q:1.055*Math.pow(Q,.4166666666666667)-.055)}function Lk(Q){return(Q/=255)<=.04045?Q/12.92:Math.pow((Q+.055)/1.055,2.4)}function dj(Q){if(Q instanceof Ig)return new Ig(Q.h,Q.c,Q.l,Q.opacity);if(Q instanceof $m||(Q=b9(Q)),Q.a===0&&Q.b===0)return new Ig(NaN,0{yk(),kk(),_9(),fb=18,Ik=.96422,zk=1,Ok=.82521,Dk=4/29,j1=6/29,Fk=3*j1*j1,k9=j1*j1*j1,fx($m,Mk,cb(kv,{brighter(Q){return new $m(this.l+fb*(Q??1),this.a,this.b,this.opacity)},darker(Q){return new $m(this.l-fb*(Q??1),this.a,this.b,this.opacity)},rgb(){var Q=(this.l+16)/116,Z=isNaN(this.a)?Q:Q+this.a/500,c=isNaN(this.b)?Q:Q-this.b/200;return Z=Ik*Ek(Z),Q=zk*Ek(Q),c=Ok*Ek(c),new hp(Ck(3.1338561*Z-1.6168667*Q-.4906146*c),Ck(-.9787684*Z+1.9161415*Q+.033454*c),Ck(.0719453*Z-.2289914*Q+1.4052427*c),this.opacity)}})),fx(Ig,Pk,cb(kv,{brighter(Q){return new Ig(this.h,this.c,this.l+fb*(Q??1),this.opacity)},darker(Q){return new Ig(this.h,this.c,this.l-fb*(Q??1),this.opacity)},rgb(){return w9(this).rgb()}}))});function mj(Q){if(Q instanceof U1)return new U1(Q.h,Q.s,Q.l,Q.opacity);Q instanceof hp||(Q=xk(Q));var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=(Uk*g+Nk*Z-jk*c)/(Uk+Nk-jk),S=g-I,t=(px*(c-I)-c3*S)/db,e=Math.sqrt(t*t+S*S)/(px*I*(1-I)),r=e?Math.atan2(t,S)*Ak-120:NaN;return new U1(r<0?r+360:r,e,I,Q.opacity)}function Bk(Q,Z,c,g){return arguments.length===1?mj(Q):new U1(Q,Z,c,g??1)}function U1(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}var Rk,u3,c3,db,px,Nk,jk,Uk,gj=fn(()=>{yk(),kk(),_9(),Rk=-.14861,u3=1.78277,c3=-.29227,db=-.90649,px=1.97294,Nk=px*db,jk=px*u3,Uk=u3*c3-db*Rk,fx(U1,Bk,cb(kv,{brighter(Q){return Q=Q==null?R1:Math.pow(R1,Q),new U1(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?Tv:Math.pow(Tv,Q),new U1(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=isNaN(this.h)?0:(this.h+120)*Tk,Z=+this.l,c=isNaN(this.s)?0:this.s*Z*(1-Z),g=Math.cos(Q),I=Math.sin(Q);return new hp(255*(Z+c*(Rk*g+u3*I)),255*(Z+c*(c3*g+db*I)),255*(Z+c*(px*g)),this.opacity)}}))}),mx=fn(()=>{kk(),pj(),gj()});function T9(Q,Z,c,g,I){var S=Q*Q,t=S*Q;return((1-3*Q+3*S-t)*Z+(4-6*S+3*t)*c+(1+3*Q+3*S-3*t)*g+t*I)/6}function A9(Q){var Z=Q.length-1;return function(c){var g=c<=0?c=0:c>=1?(c=1,Z-1):Math.floor(c*Z),I=Q[g],S=Q[g+1],t=g>0?Q[g-1]:2*I-S,e=g{});function M9(Q){var Z=Q.length;return function(c){var g=Math.floor(((c%=1)<0?++c:c)*Z),I=Q[(g+Z-1)%Z],S=Q[g%Z],t=Q[(g+1)%Z],e=Q[(g+2)%Z];return T9((c-g/Z)*Z,I,S,t,e)}}var S9=fn(()=>{Vk()}),pb,E9=fn(()=>{pb=Q=>()=>Q});function C9(Q,Z){return function(c){return Q+c*Z}}function vj(Q,Z,c){return Q=Math.pow(Q,c),Z=Math.pow(Z,c)-Q,c=1/c,function(g){return Math.pow(Q+g*Z,c)}}function h3(Q,Z){var c=Z-Q;return c?C9(Q,c>180||c<-180?c-360*Math.round(c/360):c):pb(isNaN(Q)?Z:Q)}function yj(Q){return(Q=+Q)==1?fp:function(Z,c){return c-Z?vj(Z,c,Q):pb(isNaN(Z)?c:Z)}}function fp(Q,Z){var c=Z-Q;return c?C9(Q,c):pb(isNaN(Q)?Z:Q)}var gx=fn(()=>{E9()});function L9(Q){return function(Z){var c=Z.length,g=new Array(c),I=new Array(c),S=new Array(c),t,e;for(t=0;t{mx(),Vk(),S9(),gx(),f3=function Q(Z){var c=yj(Z);function g(I,S){var t=c((I=o3(I)).r,(S=o3(S)).r),e=c(I.g,S.g),r=c(I.b,S.b),a=fp(I.opacity,S.opacity);return function(n){return I.r=t(n),I.g=e(n),I.b=r(n),I.opacity=a(n),I+""}}return g.gamma=Q,g}(1),P9=L9(A9),I9=L9(M9)});function Hk(Q,Z){Z||(Z=[]);var c=Q?Math.min(Z.length,Q.length):0,g=Z.slice(),I;return function(S){for(I=0;I{});function xj(Q,Z){return(O9(Z)?Hk:D9)(Q,Z)}function D9(Q,Z){var c=Z?Z.length:0,g=Q?Math.min(c,Q.length):0,I=new Array(g),S=new Array(c),t;for(t=0;t{v3(),Wk()});function B9(Q,Z){var c=new Date;return Q=+Q,Z=+Z,function(g){return c.setTime(Q*(1-g)+Z*g),c}}var R9=fn(()=>{});function Zm(Q,Z){return Q=+Q,Z=+Z,function(c){return Q*(1-c)+Z*c}}var d3=fn(()=>{});function N9(Q,Z){var c={},g={},I;(Q===null||typeof Q!="object")&&(Q={}),(Z===null||typeof Z!="object")&&(Z={});for(I in Z)I in Q?c[I]=g3(Q[I],Z[I]):g[I]=Z[I];return function(S){for(I in c)g[I]=c[I](S);return g}}var j9=fn(()=>{v3()});function _j(Q){return function(){return Q}}function bj(Q){return function(Z){return Q(Z)+""}}function U9(Q,Z){var c=p3.lastIndex=m3.lastIndex=0,g,I,S,t=-1,e=[],r=[];for(Q=Q+"",Z=Z+"";(g=p3.exec(Q))&&(I=m3.exec(Z));)(S=I.index)>c&&(S=Z.slice(c,S),e[t]?e[t]+=S:e[++t]=S),(g=g[0])===(I=I[0])?e[t]?e[t]+=I:e[++t]=I:(e[++t]=null,r.push({i:t,x:Zm(g,I)})),c=m3.lastIndex;return c{d3(),p3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,m3=new RegExp(p3.source,"g")});function g3(Q,Z){var c=typeof Z,g;return Z==null||c==="boolean"?pb(Z):(c==="number"?Zm:c==="string"?(g=hb(Z))?(Z=g,f3):U9:Z instanceof hb?f3:Z instanceof Date?B9:O9(Z)?Hk:Array.isArray(Z)?D9:typeof Z.valueOf!="function"&&typeof Z.toString!="function"||isNaN(Z)?N9:Zm)(Q,Z)}var v3=fn(()=>{mx(),z9(),F9(),R9(),d3(),j9(),V9(),E9(),Wk()});function wj(Q){var Z=Q.length;return function(c){return Q[Math.max(0,Math.min(Z-1,Math.floor(c*Z)))]}}var kj=fn(()=>{});function Tj(Q,Z){var c=h3(+Q,+Z);return function(g){var I=c(g);return I-360*Math.floor(I/360)}}var Aj=fn(()=>{gx()});function Mj(Q,Z){return Q=+Q,Z=+Z,function(c){return Math.round(Q*(1-c)+Z*c)}}var Sj=fn(()=>{});function H9(Q,Z,c,g,I,S){var t,e,r;return(t=Math.sqrt(Q*Q+Z*Z))&&(Q/=t,Z/=t),(r=Q*c+Z*g)&&(c-=Q*r,g-=Z*r),(e=Math.sqrt(c*c+g*g))&&(c/=e,g/=e,r/=e),Q*g{qk=180/Math.PI,y3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Cj(Q){let Z=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return Z.isIdentity?y3:H9(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f)}function Lj(Q){return Q==null?y3:(x3||(x3=document.createElementNS("http://www.w3.org/2000/svg","g")),x3.setAttribute("transform",Q),(Q=x3.transform.baseVal.consolidate())?(Q=Q.matrix,H9(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)):y3)}var x3,Pj=fn(()=>{Ej()});function W9(Q,Z,c,g){function I(a){return a.length?a.pop()+" ":""}function S(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push("translate(",null,Z,null,c);f.push({i:x-4,x:Zm(a,o)},{i:x-2,x:Zm(n,i)})}else(o||i)&&l.push("translate("+o+Z+i+c)}function t(a,n,o,i){a!==n?(a-n>180?n+=360:n-a>180&&(a+=360),i.push({i:o.push(I(o)+"rotate(",null,g)-2,x:Zm(a,n)})):n&&o.push(I(o)+"rotate("+n+g)}function e(a,n,o,i){a!==n?i.push({i:o.push(I(o)+"skewX(",null,g)-2,x:Zm(a,n)}):n&&o.push(I(o)+"skewX("+n+g)}function r(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push(I(l)+"scale(",null,",",null,")");f.push({i:x-4,x:Zm(a,o)},{i:x-2,x:Zm(n,i)})}else(o!==1||i!==1)&&l.push(I(l)+"scale("+o+","+i+")")}return function(a,n){var o=[],i=[];return a=Q(a),n=Q(n),S(a.translateX,a.translateY,n.translateX,n.translateY,o,i),t(a.rotate,n.rotate,o,i),e(a.skewX,n.skewX,o,i),r(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,i),a=n=null,function(l){for(var f=-1,x=i.length,y;++f{d3(),Pj(),q9=W9(Cj,"px, ","px)","deg)"),$9=W9(Lj,", ",")",")")});function Z9(Q){return((Q=Math.exp(Q))+1/Q)/2}function zj(Q){return((Q=Math.exp(Q))-1/Q)/2}function Oj(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var G9,Y9,Dj=fn(()=>{G9=1e-12,Y9=function Q(Z,c,g){function I(S,t){var e=S[0],r=S[1],a=S[2],n=t[0],o=t[1],i=t[2],l=n-e,f=o-r,x=l*l+f*f,y,v;if(x{mx(),gx(),X9=K9(h3),J9=K9(fp)});function Bj(Q,Z){var c=fp((Q=Mk(Q)).l,(Z=Mk(Z)).l),g=fp(Q.a,Z.a),I=fp(Q.b,Z.b),S=fp(Q.opacity,Z.opacity);return function(t){return Q.l=c(t),Q.a=g(t),Q.b=I(t),Q.opacity=S(t),Q+""}}var Rj=fn(()=>{mx(),gx()});function Q9(Q){return function(Z,c){var g=Q((Z=Pk(Z)).h,(c=Pk(c)).h),I=fp(Z.c,c.c),S=fp(Z.l,c.l),t=fp(Z.opacity,c.opacity);return function(e){return Z.h=g(e),Z.c=I(e),Z.l=S(e),Z.opacity=t(e),Z+""}}}var tS,eS,Nj=fn(()=>{mx(),gx(),tS=Q9(h3),eS=Q9(fp)});function rS(Q){return function Z(c){c=+c;function g(I,S){var t=Q((I=Bk(I)).h,(S=Bk(S)).h),e=fp(I.s,S.s),r=fp(I.l,S.l),a=fp(I.opacity,S.opacity);return function(n){return I.h=t(n),I.s=e(n),I.l=r(Math.pow(n,c)),I.opacity=a(n),I+""}}return g.gamma=Z,g}(1)}var nS,iS,jj=fn(()=>{mx(),gx(),nS=rS(h3),iS=rS(fp)});function Uj(Q,Z){Z===void 0&&(Z=Q,Q=g3);for(var c=0,g=Z.length-1,I=Z[0],S=new Array(g<0?0:g);c{v3()});function Hj(Q,Z){for(var c=new Array(Z),g=0;g{}),V1={};cn(V1,{interpolate:()=>g3,interpolateArray:()=>xj,interpolateBasis:()=>A9,interpolateBasisClosed:()=>M9,interpolateCubehelix:()=>nS,interpolateCubehelixLong:()=>iS,interpolateDate:()=>B9,interpolateDiscrete:()=>wj,interpolateHcl:()=>tS,interpolateHclLong:()=>eS,interpolateHsl:()=>X9,interpolateHslLong:()=>J9,interpolateHue:()=>Tj,interpolateLab:()=>Bj,interpolateNumber:()=>Zm,interpolateNumberArray:()=>Hk,interpolateObject:()=>N9,interpolateRgb:()=>f3,interpolateRgbBasis:()=>P9,interpolateRgbBasisClosed:()=>I9,interpolateRound:()=>Mj,interpolateString:()=>U9,interpolateTransformCss:()=>q9,interpolateTransformSvg:()=>$9,interpolateZoom:()=>Y9,piecewise:()=>Uj,quantize:()=>Hj});var vx=fn(()=>{v3(),F9(),Vk(),S9(),R9(),kj(),Aj(),d3(),Wk(),j9(),Sj(),V9(),Ij(),Dj(),z9(),Fj(),Rj(),Nj(),jj(),Vj(),Wj()}),$k=Dt((Q,Z)=>{var c=Vs(),g=pi();Z.exports=function(I,S,t,e,r){var a=S.data.data,n=a.i,o=r||a.color;if(n>=0){S.i=a.i;var i=t.marker;i.pattern?(!i.colors||!i.pattern.shape)&&(i.color=o,S.color=o):(i.color=o,S.color=o),c.pointStyle(I,t,e,S)}else g.fill(I,o)}}),aS=Dt((Q,Z)=>{var c=Wr(),g=pi(),I=kn(),S=Rp().resizeText,t=$k();function e(a){var n=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,n,"sunburst"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),Av=Dt(Q=>{var Z=kn(),c=pi(),g=I0(),I=kg();Q.findEntryWithLevel=function(r,a){var n;return a&&r.eachAfter(function(o){if(Q.getPtId(o)===a)return n=o.copy()}),n||r},Q.findEntryWithChild=function(r,a){var n;return r.eachAfter(function(o){for(var i=o.children||[],l=0;l0)},Q.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Q.isHeader=function(r,a){return!(Q.isLeaf(r)||r.depth===a._maxDepth-1)};function e(r){return r.data.data.pid}Q.getParent=function(r,a){return Q.findEntryWithLevel(r,e(a))},Q.listPath=function(r,a){var n=r.parent;if(!n)return[];var o=a?[n.data[a]]:[n];return Q.listPath(n,a).concat(o)},Q.getPath=function(r){return Q.listPath(r,"label").join("/")+"/"},Q.formatValue=I.formatPieValue,Q.formatPercent=function(r,a){var n=Z.formatPercent(r,0);return n==="0%"&&(n=I.formatPiePercent(r,a)),n}}),_3=Dt((Q,Z)=>{var c=Wr(),g=Qo(),I=Fp().appendArrayPointValue,S=tf(),t=kn(),e=Nm(),r=Av(),a=kg(),n=a.formatPieValue;Z.exports=function(i,l,f,x,y){var v=x[0],T=v.trace,u=v.hierarchy,b=T.type==="sunburst",_=T.type==="treemap"||T.type==="icicle";"_hasHoverLabel"in T||(T._hasHoverLabel=!1),"_hasHoverEvent"in T||(T._hasHoverEvent=!1);var P=function(A){var h=f._fullLayout;if(!(f._dragging||h.hovermode===!1)){var p=f._fullData[T.index],k=A.data.data,w=k.i,B=r.isHierarchyRoot(A),O=r.getParent(u,A),j=r.getValue(A),V=function(K){return t.castOption(p,w,K)},H=V("hovertemplate"),F=S.castHoverinfo(p,h,w),U=h.separators,W;if(H||F&&F!=="none"&&F!=="skip"){var q,J;b&&(q=v.cx+A.pxmid[0]*(1-A.rInscribed),J=v.cy+A.pxmid[1]*(1-A.rInscribed)),_&&(q=A._hoverX,J=A._hoverY);var lt={},yt=[],mt=[],st=function(K){return yt.indexOf(K)!==-1};F&&(yt=F==="all"?p._module.attributes.hoverinfo.flags:F.split("+")),lt.label=k.label,st("label")&<.label&&mt.push(lt.label),k.hasOwnProperty("v")&&(lt.value=k.v,lt.valueLabel=n(lt.value,U),st("value")&&mt.push(lt.valueLabel)),lt.currentPath=A.currentPath=r.getPath(A.data),st("current path")&&!B&&mt.push(lt.currentPath);var tt,pt=[],rt=function(){pt.indexOf(tt)===-1&&(mt.push(tt),pt.push(tt))};lt.percentParent=A.percentParent=j/r.getValue(O),lt.parent=A.parentString=r.getPtLabel(O),st("percent parent")&&(tt=r.formatPercent(lt.percentParent,U)+" of "+lt.parent,rt()),lt.percentEntry=A.percentEntry=j/r.getValue(l),lt.entry=A.entry=r.getPtLabel(l),st("percent entry")&&!B&&!A.onPathbar&&(tt=r.formatPercent(lt.percentEntry,U)+" of "+lt.entry,rt()),lt.percentRoot=A.percentRoot=j/r.getValue(u),lt.root=A.root=r.getPtLabel(u),st("percent root")&&!B&&(tt=r.formatPercent(lt.percentRoot,U)+" of "+lt.root,rt()),lt.text=V("hovertext")||V("text"),st("text")&&(tt=lt.text,t.isValidTextValue(tt)&&mt.push(tt)),W=[o(A,p,y.eventDataKeys)];var at={trace:p,y:J,_x0:A._x0,_x1:A._x1,_y0:A._y0,_y1:A._y1,text:mt.join("
"),name:H||st("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||k.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:H,hovertemplateLabels:lt,eventData:W};b&&(at.x0=q-A.rInscribed*A.rpx1,at.x1=q+A.rInscribed*A.rpx1,at.idealAlign=A.pxmid[0]<0?"left":"right"),_&&(at.x=q,at.idealAlign=q<0?"left":"right");var vt=[];S.loneHover(at,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f,inOut_bbox:vt}),W[0].bbox=vt[0],T._hasHoverLabel=!0}if(_){var it=i.select("path.surface");y.styleOne(it,A,p,f,{hovered:!0})}T._hasHoverEvent=!0,f.emit("plotly_hover",{points:W||[o(A,p,y.eventDataKeys)],event:c.event})}},M=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=c.select(this).datum();if(T._hasHoverEvent&&(A.originalEvent=c.event,f.emit("plotly_unhover",{points:[o(k,p,y.eventDataKeys)],event:c.event}),T._hasHoverEvent=!1),T._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),T._hasHoverLabel=!1),_){var w=i.select("path.surface");y.styleOne(w,k,p,f,{hovered:!1})}},C=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=b&&(r.isHierarchyRoot(A)||r.isLeaf(A)),w=r.getPtId(A),B=r.isEntry(A)?r.findEntryWithChild(u,w):r.findEntryWithLevel(u,w),O=r.getPtId(B),j={points:[o(A,p,y.eventDataKeys)],event:c.event};k||(j.nextLevel=O);var V=e.triggerHandler(f,"plotly_"+T.type+"click",j);if(V!==!1&&h.hovermode&&(f._hoverdata=[o(A,p,y.eventDataKeys)],S.click(f,c.event)),!k&&V!==!1&&!f._dragging&&!f._transitioning){g.call("_storeDirectGUIEdit",p,h._tracePreGUI[p.uid],{level:p.level});var H={data:[{level:O}],traces:[T.index]},F={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),g.call("animate",f,H,F)}};i.on("mouseover",P),i.on("mouseout",M),i.on("click",C)};function o(i,l,f){for(var x=i.data.data,y={curveNumber:l.index,pointNumber:x.i,data:l._input,fullData:l},v=0;v{var Z=Wr(),c=n3(),g=(vx(),ii(V1)).interpolate,I=Vs(),S=kn(),t=ec(),e=Rp(),r=e.recordMinTextSize,a=e.clearMinTextSize,n=vk(),o=kg().getRotationAngle,i=n.computeTransform,l=n.transformInsideText,f=aS().styleOne,x=xm().resizeText,y=_3(),v=n9(),T=Av();Q.plot=function(C,A,h,p){var k=C._fullLayout,w=k._sunburstlayer,B,O,j=!h,V=!k.uniformtext.mode&&T.hasTransition(h);if(a("sunburst",k),B=w.selectAll("g.trace.sunburst").data(A,function(F){return F[0].trace.uid}),B.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),B.order(),V){p&&(O=p());var H=Z.transition().duration(h.duration).ease(h.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});H.each(function(){w.selectAll("g.trace").each(function(F){u(C,F,this,h)})})}else B.each(function(F){u(C,F,this,h)}),k.uniformtext.mode&&x(C,k._sunburstlayer.selectAll(".trace"),"sunburst");j&&B.exit().remove()};function u(C,A,h,p){var k=C._context.staticPlot,w=C._fullLayout,B=!w.uniformtext.mode&&T.hasTransition(p),O=Z.select(h),j=O.selectAll("g.slice"),V=A[0],H=V.trace,F=V.hierarchy,U=T.findEntryWithLevel(F,H.level),W=T.getMaxDepth(H),q=w._size,J=H.domain,lt=q.w*(J.x[1]-J.x[0]),yt=q.h*(J.y[1]-J.y[0]),mt=.5*Math.min(lt,yt),st=V.cx=q.l+q.w*(J.x[1]+J.x[0])/2,tt=V.cy=q.t+q.h*(1-J.y[0])-yt/2;if(!U)return j.remove();var pt=null,rt={};B&&j.each(function(Mt){rt[T.getPtId(Mt)]={rpx0:Mt.rpx0,rpx1:Mt.rpx1,x0:Mt.x0,x1:Mt.x1,transform:Mt.transform},!pt&&T.isEntry(Mt)&&(pt=Mt)});var at=b(U).descendants(),vt=U.height+1,it=0,K=W;V.hasMultipleRoots&&T.isHierarchyRoot(U)&&(at=at.slice(1),vt-=1,it=1,K+=1),at=at.filter(function(Mt){return Mt.y1<=K});var ft=o(H.rotation);ft&&at.forEach(function(Mt){Mt.x0+=ft,Mt.x1+=ft});var ut=Math.min(vt,W),kt=function(Mt){return(Mt-it)/ut*mt},It=function(Mt,ee){return[Mt*Math.cos(ee),-Mt*Math.sin(ee)]},Pt=function(Mt){return S.pathAnnulus(Mt.rpx0,Mt.rpx1,Mt.x0,Mt.x1,st,tt)},qt=function(Mt){return st+P(Mt)[0]*(Mt.transform.rCenter||0)+(Mt.transform.x||0)},Wt=function(Mt){return tt+P(Mt)[1]*(Mt.transform.rCenter||0)+(Mt.transform.y||0)};j=j.data(at,T.getPtId),j.enter().append("g").classed("slice",!0),B?j.exit().transition().each(function(){var Mt=Z.select(this),ee=Mt.select("path.surface");ee.transition().attrTween("d",function(oe){var Ae=pe(oe);return function(He){return Pt(Ae(He))}});var ve=Mt.select("g.slicetext");ve.attr("opacity",0)}).remove():j.exit().remove(),j.order();var Jt=null;if(B&&pt){var ge=T.getPtId(pt);j.each(function(Mt){Jt===null&&T.getPtId(Mt)===ge&&(Jt=Mt.x1)})}var fe=j;B&&(fe=fe.transition().each("end",function(){var Mt=Z.select(this);T.setSliceCursor(Mt,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),fe.each(function(Mt){var ee=Z.select(this),ve=S.ensureSingle(ee,"path","surface",function(ur){ur.style("pointer-events",k?"none":"all")});Mt.rpx0=kt(Mt.y0),Mt.rpx1=kt(Mt.y1),Mt.xmid=(Mt.x0+Mt.x1)/2,Mt.pxmid=It(Mt.rpx1,Mt.xmid),Mt.midangle=-(Mt.xmid-Math.PI/2),Mt.startangle=-(Mt.x0-Math.PI/2),Mt.stopangle=-(Mt.x1-Math.PI/2),Mt.halfangle=.5*Math.min(S.angleDelta(Mt.x0,Mt.x1)||Math.PI,Math.PI),Mt.ring=1-Mt.rpx0/Mt.rpx1,Mt.rInscribed=_(Mt),B?ve.transition().attrTween("d",function(ur){var jr=se(ur);return function(qr){return Pt(jr(qr))}}):ve.attr("d",Pt),ee.call(y,U,C,A,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:C._transitioning}),ve.call(f,Mt,H,C);var oe=S.ensureSingle(ee,"g","slicetext"),Ae=S.ensureSingle(oe,"text","",function(ur){ur.attr("data-notex",1)}),He=S.ensureUniformFontSize(C,T.determineTextFont(H,Mt,w.font));Ae.text(Q.formatSliceLabel(Mt,U,H,A,w)).classed("slicetext",!0).attr("text-anchor","middle").call(I.font,He).call(t.convertToTspans,C);var Ge=I.bBox(Ae.node());Mt.transform=l(Ge,Mt,V),Mt.transform.targetX=qt(Mt),Mt.transform.targetY=Wt(Mt);var cr=function(ur,jr){var qr=ur.transform;return i(qr,jr),qr.fontSize=He.size,r(H.type,qr,w),S.getTextTransform(qr)};B?Ae.transition().attrTween("transform",function(ur){var jr=Tt(ur);return function(qr){return cr(jr(qr),Ge)}}):Ae.attr("transform",cr(Mt,Ge))});function pe(Mt){var ee=T.getPtId(Mt),ve=rt[ee],oe=rt[T.getPtId(U)],Ae;if(oe){var He=(Mt.x1>oe.x1?2*Math.PI:0)+ft;Ae=Mt.rpx1Jt?2*Math.PI:0)+ft;ve={x0:Ae,x1:Ae}}else ve={rpx0:mt,rpx1:mt},S.extendFlat(ve,Lt(Mt));else ve={rpx0:0,rpx1:0};else ve={x0:ft,x1:ft};return g(ve,oe)}function Tt(Mt){var ee=rt[T.getPtId(Mt)],ve,oe=Mt.transform;if(ee)ve=ee;else if(ve={rpx1:Mt.rpx1,transform:{textPosAngle:oe.textPosAngle,scale:0,rotate:oe.rotate,rCenter:oe.rCenter,x:oe.x,y:oe.y}},pt)if(Mt.parent)if(Jt){var Ae=Mt.x1>Jt?2*Math.PI:0;ve.x0=ve.x1=Ae}else S.extendFlat(ve,Lt(Mt));else ve.x0=ve.x1=ft;else ve.x0=ve.x1=ft;var He=g(ve.transform.textPosAngle,Mt.transform.textPosAngle),Ge=g(ve.rpx1,Mt.rpx1),cr=g(ve.x0,Mt.x0),ur=g(ve.x1,Mt.x1),jr=g(ve.transform.scale,oe.scale),qr=g(ve.transform.rotate,oe.rotate),br=oe.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Xr=g(ve.transform.rCenter,oe.rCenter),nn=function(Le){return Xr(Math.pow(Le,br))};return function(Le){var Gt=Ge(Le);cr(Le),ur(Le);var ne=nn(Le),Ct=He(Le),gt={rpx1:Gt,transform:{textPosAngle:Ct,rCenter:ne,x:oe.x,y:oe.y}};return r(H.type,oe,w),{transform:{targetX:qt(gt),targetY:Wt(gt),scale:jr(Le),rotate:qr(Le),rCenter:ne}}}}function Lt(Mt){var ee=Mt.parent,ve=rt[T.getPtId(ee)],oe={};if(ve){var Ae=ee.children,He=Ae.indexOf(Mt),Ge=Ae.length,cr=g(ve.x0,ve.x1);oe.x0=cr(He/Ge),oe.x1=cr(He/Ge)}else oe.x0=oe.x1=0;return oe}}function b(C){return c.partition().size([2*Math.PI,C.height+1])(C)}Q.formatSliceLabel=function(C,A,h,p,k){var w=h.texttemplate,B=h.textinfo;if(!w&&(!B||B==="none"))return"";var O=k.separators,j=p[0],V=C.data.data,H=j.hierarchy,F=T.isHierarchyRoot(C),U=T.getParent(H,C),W=T.getValue(C);if(!w){var q=B.split("+"),J=function(it){return q.indexOf(it)!==-1},lt=[],yt;if(J("label")&&V.label&<.push(V.label),V.hasOwnProperty("v")&&J("value")&<.push(T.formatValue(V.v,O)),!F){J("current path")&<.push(T.getPath(C.data));var mt=0;J("percent parent")&&mt++,J("percent entry")&&mt++,J("percent root")&&mt++;var st=mt>1;if(mt){var tt,pt=function(it){yt=T.formatPercent(tt,O),st&&(yt+=" of "+it),lt.push(yt)};J("percent parent")&&!F&&(tt=W/T.getValue(U),pt("parent")),J("percent entry")&&(tt=W/T.getValue(A),pt("entry")),J("percent root")&&(tt=W/T.getValue(H),pt("root"))}}return J("text")&&(yt=S.castOption(h,V.i,"text"),S.isValidTextValue(yt)&<.push(yt)),lt.join("
")}var rt=S.castOption(h,V.i,"texttemplate");if(!rt)return"";var at={};V.label&&(at.label=V.label),V.hasOwnProperty("v")&&(at.value=V.v,at.valueLabel=T.formatValue(V.v,O)),at.currentPath=T.getPath(C.data),F||(at.percentParent=W/T.getValue(U),at.percentParentLabel=T.formatPercent(at.percentParent,O),at.parent=T.getPtLabel(U)),at.percentEntry=W/T.getValue(A),at.percentEntryLabel=T.formatPercent(at.percentEntry,O),at.entry=T.getPtLabel(A),at.percentRoot=W/T.getValue(H),at.percentRootLabel=T.formatPercent(at.percentRoot,O),at.root=T.getPtLabel(H),V.hasOwnProperty("color")&&(at.color=V.color);var vt=S.castOption(h,V.i,"text");return(S.isValidTextValue(vt)||vt==="")&&(at.text=vt),at.customdata=S.castOption(h,V.i,"customdata"),S.texttemplateString({data:[at,h._meta],fallback:h.texttemplatefallback,labels:at,locale:k._d3locale,template:rt})};function _(C){return C.rpx0===0&&S.isFullCircle([C.x0,C.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(C.halfangle)),C.ring/2))}function P(C){return M(C.rpx1,C.transform.textPosAngle)}function M(C,A){return[C*Math.sin(A),-C*Math.cos(A)]}}),qj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"sunburst",basePlotModule:sj(),categories:[],animatable:!0,attributes:r3(),layoutAttributes:i9(),supplyDefaults:lj(),supplyLayoutDefaults:uj(),calc:i3().calc,crossTraceCalc:i3().crossTraceCalc,plot:Zk().plot,style:aS().style,colorbar:xo(),meta:{}}}),$j=Dt((Q,Z)=>{Z.exports=qj()}),Zj=Dt(Q=>{var Z=Kc();Q.name="treemap",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),yx=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}),Gk=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=Uh().attributes,e=cx(),r=r3(),a=yx(),n=Ia().extendFlat,o=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:n({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:o,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("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:n({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:a.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n({},e.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:e.sort,root:r.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}),oS=Dt((Q,Z)=>{Z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Gj=Dt((Q,Z)=>{var c=kn(),g=Gk(),I=pi(),S=Uh().defaults,t=Q0().handleText,e=ix().TEXTPAD,r=hx().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(p,k){return c.coerce(i,l,g,p,k)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var b=y("tiling.packing");b==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var _=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(_)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var P=y("pathbar.visible"),M="auto";t(i,l,x,y,M,{hasPathbar:P,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var C=l.textposition.indexOf("bottom")!==-1;r(i,l,x,y);var A=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;A?o(i,l,x,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(l.marker.colors||[]).length);var h=l.textfont.size*2;y("marker.pad.t",C?h/4:h),y("marker.pad.l",h/4),y("marker.pad.r",h/4),y("marker.pad.b",C?h:h/4),y("marker.cornerradius"),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},P&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),Yj=Dt((Q,Z)=>{var c=kn(),g=oS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("treemapcolorway",S.colorway),t("extendtreemapcolors")}}),sS=Dt(Q=>{var Z=i3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("treemap",c)}}),lS=Dt((Q,Z)=>{Z.exports=function c(g,I,S){var t;S.swapXY&&(t=g.x0,g.x0=g.y0,g.y0=t,t=g.x1,g.x1=g.y1,g.y1=t),S.flipX&&(t=g.x0,g.x0=I[0]-g.x1,g.x1=I[0]-t),S.flipY&&(t=g.y0,g.y0=I[1]-g.y1,g.y1=I[1]-t);var e=g.children;if(e)for(var r=0;r{var c=n3(),g=lS();Z.exports=function(S,t,e){var r=e.flipX,a=e.flipY,n=e.packing==="dice-slice",o=e.pad[a?"bottom":"top"],i=e.pad[r?"right":"left"],l=e.pad[r?"left":"right"],f=e.pad[a?"top":"bottom"],x;n&&(x=i,i=o,o=x,x=l,l=f,f=x);var y=c.treemap().tile(I(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(i).paddingRight(l).paddingTop(o).paddingBottom(f).size(n?[t[1],t[0]]:t)(S);return(n||r||a)&&g(y,t,{swapXY:n,flipX:r,flipY:a}),y};function I(S,t){switch(S){case"squarify":return c.treemapSquarify.ratio(t);case"binary":return c.treemapBinary;case"dice":return c.treemapDice;case"slice":return c.treemapSlice;default:return c.treemapSliceDice}}}),Yk=Dt((Q,Z)=>{var c=Wr(),g=pi(),I=kn(),S=Av(),t=Rp().resizeText,e=$k();function r(n){var o=n._fullLayout._treemaplayer.selectAll(".trace");t(n,o,"treemap"),o.each(function(i){var l=c.select(this),f=i[0],x=f.trace;l.style("opacity",x.opacity),l.selectAll("path.surface").each(function(y){c.select(this).call(a,y,x,n,{hovered:!1})})})}function a(n,o,i,l,f){var x=(f||{}).hovered,y=o.data.data,v=y.i,T,u,b=y.color,_=S.isHierarchyRoot(o),P=1;if(x)T=i._hovered.marker.line.color,u=i._hovered.marker.line.width;else if(_&&b===i.root.color)P=100,T="rgba(0,0,0,0)",u=0;else if(T=I.castOption(i,v,"marker.line.color")||g.defaultLine,u=I.castOption(i,v,"marker.line.width")||0,!i._hasColorscale&&!o.onPathbar){var M=i.marker.depthfade;if(M){var C=g.combine(g.addOpacity(i._backgroundColor,.75),b),A;if(M===!0){var h=S.getMaxDepth(i);isFinite(h)?S.isLeaf(o)?A=0:A=i._maxVisibleLayers-(o.data.depth-i._entryDepth):A=o.data.height+1}else A=o.data.depth-i._entryDepth,i._atRootLevel||A++;if(A>0)for(var p=0;p{var c=Wr(),g=kn(),I=Vs(),S=ec(),t=uS(),e=Yk().styleOne,r=yx(),a=Av(),n=_3(),o=!0;Z.exports=function(i,l,f,x,y){var v=y.barDifY,T=y.width,u=y.height,b=y.viewX,_=y.viewY,P=y.pathSlice,M=y.toMoveInsideSlice,C=y.strTransform,A=y.hasTransition,h=y.handleSlicesExit,p=y.makeUpdateSliceInterpolator,k=y.makeUpdateTextInterpolator,w={},B=i._context.staticPlot,O=i._fullLayout,j=l[0],V=j.trace,H=j.hierarchy,F=T/V._entryDepth,U=a.listPath(f.data,"id"),W=t(H.copy(),[T,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(J){var lt=U.indexOf(J.data.id);return lt===-1?!1:(J.x0=F*lt,J.x1=F*(lt+1),J.y0=v,J.y1=v+u,J.onPathbar=!0,!0)}),W.reverse(),x=x.data(W,a.getPtId),x.enter().append("g").classed("pathbar",!0),h(x,o,w,[T,u],P),x.order();var q=x;A&&(q=q.transition().each("end",function(){var J=c.select(this);a.setSliceCursor(J,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(J){J._x0=b(J.x0),J._x1=b(J.x1),J._y0=_(J.y0),J._y1=_(J.y1),J._hoverX=b(J.x1-Math.min(T,u)/2),J._hoverY=_(J.y1-u/2);var lt=c.select(this),yt=g.ensureSingle(lt,"path","surface",function(pt){pt.style("pointer-events",B?"none":"all")});A?yt.transition().attrTween("d",function(pt){var rt=p(pt,o,w,[T,u]);return function(at){return P(rt(at))}}):yt.attr("d",P),lt.call(n,f,i,l,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:i._transitioning}),yt.call(e,J,V,i,{hovered:!1}),J._text=(a.getPtLabel(J)||"").split("
").join(" ")||"";var mt=g.ensureSingle(lt,"g","slicetext"),st=g.ensureSingle(mt,"text","",function(pt){pt.attr("data-notex",1)}),tt=g.ensureUniformFontSize(i,a.determineTextFont(V,J,O.font,{onPathbar:!0}));st.text(J._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(I.font,tt).call(S.convertToTspans,i),J.textBB=I.bBox(st.node()),J.transform=M(J,{fontSize:tt.size,onPathbar:!0}),J.transform.fontSize=tt.size,A?st.transition().attrTween("transform",function(pt){var rt=k(pt,o,w,[T,u]);return function(at){return C(rt(at))}}):st.attr("transform",C(J))})}}),Xj=Dt((Q,Z)=>{var c=Wr(),g=(vx(),ii(V1)).interpolate,I=Av(),S=kn(),t=ix().TEXTPAD,e=ax(),r=e.toMoveInsideBar,a=Rp(),n=a.recordMinTextSize,o=yx(),i=Kj();function l(f){return I.isHierarchyRoot(f)?"":I.getPtId(f)}Z.exports=function(f,x,y,v,T){var u=f._fullLayout,b=x[0],_=b.trace,P=_.type,M=P==="icicle",C=b.hierarchy,A=I.findEntryWithLevel(C,_.level),h=c.select(y),p=h.selectAll("g.pathbar"),k=h.selectAll("g.slice");if(!A){p.remove(),k.remove();return}var w=I.isHierarchyRoot(A),B=!u.uniformtext.mode&&I.hasTransition(v),O=I.getMaxDepth(_),j=function(br){return br.data.depth-A.data.depth-1?U+J:-(q+J):0,yt={x0:W,x1:W,y0:lt,y1:lt+q},mt=function(br,Xr,nn){var Le=_.tiling.pad,Gt=function(St){return St-Le<=Xr.x0},ne=function(St){return St+Le>=Xr.x1},Ct=function(St){return St-Le<=Xr.y0},gt=function(St){return St+Le>=Xr.y1};return br.x0===Xr.x0&&br.x1===Xr.x1&&br.y0===Xr.y0&&br.y1===Xr.y1?{x0:br.x0,x1:br.x1,y0:br.y0,y1:br.y1}:{x0:Gt(br.x0-Le)?0:ne(br.x0-Le)?nn[0]:br.x0,x1:Gt(br.x1+Le)?0:ne(br.x1+Le)?nn[0]:br.x1,y0:Ct(br.y0-Le)?0:gt(br.y0-Le)?nn[1]:br.y0,y1:Ct(br.y1+Le)?0:gt(br.y1+Le)?nn[1]:br.y1}},st=null,tt={},pt={},rt=null,at=function(br,Xr){return Xr?tt[l(br)]:pt[l(br)]},vt=function(br,Xr,nn,Le){if(Xr)return tt[l(C)]||yt;var Gt=pt[_.level]||nn;return j(br)?mt(br,Gt,Le):{}};b.hasMultipleRoots&&w&&O++,_._maxDepth=O,_._backgroundColor=u.paper_bgcolor,_._entryDepth=A.data.depth,_._atRootLevel=w;var it=-F/2+V.l+V.w*(H.x[1]+H.x[0])/2,K=-U/2+V.t+V.h*(1-(H.y[1]+H.y[0])/2),ft=function(br){return it+br},ut=function(br){return K+br},kt=ut(0),It=ft(0),Pt=function(br){return It+br},qt=function(br){return kt+br};function Wt(br,Xr){return br+","+Xr}var Jt=Pt(0),ge=function(br){br.x=Math.max(Jt,br.x)},fe=_.pathbar.edgeshape,pe=function(br){var Xr=Pt(Math.max(Math.min(br.x0,br.x0),0)),nn=Pt(Math.min(Math.max(br.x1,br.x1),W)),Le=qt(br.y0),Gt=qt(br.y1),ne=q/2,Ct={},gt={};Ct.x=Xr,gt.x=nn,Ct.y=gt.y=(Le+Gt)/2;var St={x:Xr,y:Le},Nt={x:nn,y:Le},re={x:nn,y:Gt},le={x:Xr,y:Gt};return fe===">"?(St.x-=ne,Nt.x-=ne,re.x-=ne,le.x-=ne):fe==="/"?(re.x-=ne,le.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="\\"?(St.x-=ne,Nt.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="<"&&(Ct.x-=ne,gt.x-=ne),ge(St),ge(le),ge(Ct),ge(Nt),ge(re),ge(gt),"M"+Wt(St.x,St.y)+"L"+Wt(Nt.x,Nt.y)+"L"+Wt(gt.x,gt.y)+"L"+Wt(re.x,re.y)+"L"+Wt(le.x,le.y)+"L"+Wt(Ct.x,Ct.y)+"Z"},se=_[M?"tiling":"marker"].pad,Tt=function(br){return _.textposition.indexOf(br)!==-1},Lt=Tt("top"),Mt=Tt("left"),ee=Tt("right"),ve=Tt("bottom"),oe=function(br){var Xr=ft(br.x0),nn=ft(br.x1),Le=ut(br.y0),Gt=ut(br.y1),ne=nn-Xr,Ct=Gt-Le;if(!ne||!Ct)return"";var gt=_.marker.cornerradius||0,St=Math.min(gt,ne/2,Ct/2);St&&br.data&&br.data.data&&br.data.data.label&&(Lt&&(St=Math.min(St,se.t)),Mt&&(St=Math.min(St,se.l)),ee&&(St=Math.min(St,se.r)),ve&&(St=Math.min(St,se.b)));var Nt=function(re,le){return St?"a"+Wt(St,St)+" 0 0 1 "+Wt(re,le):""};return"M"+Wt(Xr,Le+St)+Nt(St,-St)+"L"+Wt(nn-St,Le)+Nt(St,St)+"L"+Wt(nn,Gt-St)+Nt(-St,St)+"L"+Wt(Xr+St,Gt)+Nt(-St,-St)+"Z"},Ae=function(br,Xr){var nn=br.x0,Le=br.x1,Gt=br.y0,ne=br.y1,Ct=br.textBB,gt=Lt||Xr.isHeader&&!ve,St=gt?"start":ve?"end":"middle",Nt=Tt("right"),re=Tt("left")||Xr.onPathbar,le=re?-1:Nt?1:0;if(Xr.isHeader){if(nn+=(M?se:se.l)-t,Le-=(M?se:se.r)-t,nn>=Le){var ke=(nn+Le)/2;nn=ke,Le=ke}var Ue;ve?(Ue=ne-(M?se:se.b),Gt{var c=Wr(),g=Av(),I=Rp(),S=I.clearMinTextSize,t=xm().resizeText,e=Xj();Z.exports=function(r,a,n,o,i){var l=i.type,f=i.drawDescendants,x=r._fullLayout,y=x["_"+l+"layer"],v,T,u=!n;if(S(l,x),v=y.selectAll("g.trace."+l).data(a,function(_){return _[0].trace.uid}),v.enter().append("g").classed("trace",!0).classed(l,!0),v.order(),!x.uniformtext.mode&&g.hasTransition(n)){o&&(T=o());var b=c.transition().duration(n.duration).ease(n.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){y.selectAll("g.trace").each(function(_){e(r,_,this,n,f)})})}else v.each(function(_){e(r,_,this,n,f)}),x.uniformtext.mode&&t(r,y.selectAll(".trace"),l);u&&v.exit().remove()}}),Jj=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=Vs(),S=ec(),t=uS(),e=Yk().styleOne,r=yx(),a=Av(),n=_3(),o=Zk().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,B={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=!W&&!H.marker.pad.t||W&&!H.marker.pad.b,J=t(x,[T,u],{packing:H.tiling.packing,squarifyratio:H.tiling.squarifyratio,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,pad:{inner:H.tiling.pad,top:H.marker.pad.t,left:H.marker.pad.l,right:H.marker.pad.r,bottom:H.marker.pad.b}}),lt=J.descendants(),yt=1/0,mt=-1/0;lt.forEach(function(at){var vt=at.depth;vt>=H._maxDepth?(at.x0=at.x1=(at.x0+at.x1)/2,at.y0=at.y1=(at.y0+at.y1)/2):(yt=Math.min(yt,vt),mt=Math.max(mt,vt))}),y=y.data(lt,a.getPtId),H._maxVisibleLayers=isFinite(mt)?mt-yt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,B,[T,u],P),y.order();var st=null;if(A&&w){var tt=a.getPtId(w);y.each(function(at){st===null&&a.getPtId(at)===tt&&(st={x0:at.x0,x1:at.x1,y0:at.y0,y1:at.y1})})}var pt=function(){return st||{x0:0,x1:T,y0:0,y1:u}},rt=y;return A&&(rt=rt.transition().each("end",function(){var at=c.select(this);a.setSliceCursor(at,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),rt.each(function(at){var vt=a.isHeader(at,H);at._x0=b(at.x0),at._x1=b(at.x1),at._y0=_(at.y0),at._y1=_(at.y1),at._hoverX=b(at.x1-H.marker.pad.r),at._hoverY=_(W?at.y1-H.marker.pad.b/2:at.y0+H.marker.pad.t/2);var it=c.select(this),K=g.ensureSingle(it,"path","surface",function(qt){qt.style("pointer-events",O?"none":"all")});A?K.transition().attrTween("d",function(qt){var Wt=p(qt,i,pt(),[T,u]);return function(Jt){return P(Wt(Jt))}}):K.attr("d",P),it.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),K.call(e,at,H,l,{hovered:!1}),at.x0===at.x1||at.y0===at.y1?at._text="":vt?at._text=q?"":a.getPtLabel(at)||"":at._text=o(at,x,H,f,j)||"";var ft=g.ensureSingle(it,"g","slicetext"),ut=g.ensureSingle(ft,"text","",function(qt){qt.attr("data-notex",1)}),kt=g.ensureUniformFontSize(l,a.determineTextFont(H,at,j.font)),It=at._text||" ",Pt=vt&&It.indexOf("
")===-1;ut.text(It).classed("slicetext",!0).attr("text-anchor",U?"end":F||Pt?"start":"middle").call(I.font,kt).call(S.convertToTspans,l),at.textBB=I.bBox(ut.node()),at.transform=M(at,{fontSize:kt.size,isHeader:vt}),at.transform.fontSize=kt.size,A?ut.transition().attrTween("transform",function(qt){var Wt=k(qt,i,pt(),[T,u]);return function(Jt){return C(Wt(Jt))}}):ut.attr("transform",C(at))}),st}}),Qj=Dt((Q,Z)=>{var c=cS(),g=Jj();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"treemap",drawDescendants:g})}}),tU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"treemap",basePlotModule:Zj(),categories:[],animatable:!0,attributes:Gk(),layoutAttributes:oS(),supplyDefaults:Gj(),supplyLayoutDefaults:Yj(),calc:sS().calc,crossTraceCalc:sS().crossTraceCalc,plot:Qj(),style:Yk().style,colorbar:xo(),meta:{}}}),eU=Dt((Q,Z)=>{Z.exports=tU()}),rU=Dt(Q=>{var Z=Kc();Q.name="icicle",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),hS=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=Uh().attributes,e=cx(),r=r3(),a=Gk(),n=yx(),o=Ia().extendFlat,i=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:a.pathbar,text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:n.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:r.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}),fS=Dt((Q,Z)=>{Z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),nU=Dt((Q,Z)=>{var c=kn(),g=hS(),I=pi(),S=Uh().defaults,t=Q0().handleText,e=ix().TEXTPAD,r=hx().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(C,A){return c.coerce(i,l,g,C,A)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var _=y("pathbar.visible"),P="auto";t(i,l,x,y,P,{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),r(i,l,x,y);var M=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;M&&o(i,l,x,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",M?1:.7),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},_&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),iU=Dt((Q,Z)=>{var c=kn(),g=fS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("iciclecolorway",S.colorway),t("extendiciclecolors")}}),dS=Dt(Q=>{var Z=i3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("icicle",c)}}),aU=Dt((Q,Z)=>{var c=n3(),g=lS();Z.exports=function(I,S,t){var e=t.flipX,r=t.flipY,a=t.orientation==="h",n=t.maxDepth,o=S[0],i=S[1];n&&(o=(I.height+1)*S[0]/Math.min(I.height+1,n),i=(I.height+1)*S[1]/Math.min(I.height+1,n));var l=c.partition().padding(t.pad.inner).size(a?[S[1],o]:[S[0],i])(I);return(a||e||r)&&g(l,S,{swapXY:a,flipX:e,flipY:r}),l}}),pS=Dt((Q,Z)=>{var c=Wr(),g=pi(),I=kn(),S=Rp().resizeText,t=$k();function e(a){var n=a._fullLayout._iciclelayer.selectAll(".trace");S(a,n,"icicle"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),oU=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=Vs(),S=ec(),t=aU(),e=pS().styleOne,r=yx(),a=Av(),n=_3(),o=Zk().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,B={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=t(x,[T,u],{flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,orientation:H.tiling.orientation,pad:{inner:H.tiling.pad},maxDepth:H._maxDepth}),J=q.descendants(),lt=1/0,yt=-1/0;J.forEach(function(rt){var at=rt.depth;at>=H._maxDepth?(rt.x0=rt.x1=(rt.x0+rt.x1)/2,rt.y0=rt.y1=(rt.y0+rt.y1)/2):(lt=Math.min(lt,at),yt=Math.max(yt,at))}),y=y.data(J,a.getPtId),H._maxVisibleLayers=isFinite(yt)?yt-lt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,B,[T,u],P),y.order();var mt=null;if(A&&w){var st=a.getPtId(w);y.each(function(rt){mt===null&&a.getPtId(rt)===st&&(mt={x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1})})}var tt=function(){return mt||{x0:0,x1:T,y0:0,y1:u}},pt=y;return A&&(pt=pt.transition().each("end",function(){var rt=c.select(this);a.setSliceCursor(rt,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),pt.each(function(rt){rt._x0=b(rt.x0),rt._x1=b(rt.x1),rt._y0=_(rt.y0),rt._y1=_(rt.y1),rt._hoverX=b(rt.x1-H.tiling.pad),rt._hoverY=_(W?rt.y1-H.tiling.pad/2:rt.y0+H.tiling.pad/2);var at=c.select(this),vt=g.ensureSingle(at,"path","surface",function(ut){ut.style("pointer-events",O?"none":"all")});A?vt.transition().attrTween("d",function(ut){var kt=p(ut,i,tt(),[T,u],{orientation:H.tiling.orientation,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1});return function(It){return P(kt(It))}}):vt.attr("d",P),at.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),vt.call(e,rt,H,l,{hovered:!1}),rt.x0===rt.x1||rt.y0===rt.y1?rt._text="":rt._text=o(rt,x,H,f,j)||"";var it=g.ensureSingle(at,"g","slicetext"),K=g.ensureSingle(it,"text","",function(ut){ut.attr("data-notex",1)}),ft=g.ensureUniformFontSize(l,a.determineTextFont(H,rt,j.font));K.text(rt._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":F?"start":"middle").call(I.font,ft).call(S.convertToTspans,l),rt.textBB=I.bBox(K.node()),rt.transform=M(rt,{fontSize:ft.size}),rt.transform.fontSize=ft.size,A?K.transition().attrTween("transform",function(ut){var kt=k(ut,i,tt(),[T,u]);return function(It){return C(kt(It))}}):K.attr("transform",C(rt))}),mt}}),sU=Dt((Q,Z)=>{var c=cS(),g=oU();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"icicle",drawDescendants:g})}}),lU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"icicle",basePlotModule:rU(),categories:[],animatable:!0,attributes:hS(),layoutAttributes:fS(),supplyDefaults:nU(),supplyLayoutDefaults:iU(),calc:dS().calc,crossTraceCalc:dS().crossTraceCalc,plot:sU(),style:pS().style,colorbar:xo(),meta:{}}}),uU=Dt((Q,Z)=>{Z.exports=lU()}),cU=Dt(Q=>{var Z=Kc();Q.name="funnelarea",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),mS=Dt((Q,Z)=>{var c=cx(),g=qo(),I=Uh().attributes,{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=Ia().extendFlat;Z.exports={labels:c.labels,label0:c.label0,dlabel:c.dlabel,values:c.values,marker:{colors:c.marker.colors,line:{color:r({},c.marker.line.color,{dflt:null}),width:r({},c.marker.line.width,{dflt:1}),editType:"calc"},pattern:c.marker.pattern,editType:"calc"},text:c.text,hovertext:c.hovertext,scalegroup:r({},c.scalegroup,{}),textinfo:r({},c.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:r({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:r({},c.textposition,{values:["inside","none"],dflt:"inside"}),textfont:c.textfont,insidetextfont:c.insidetextfont,title:{text:c.title.text,font:c.title.font,position:r({},c.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:I({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"}}}),gS=Dt((Q,Z)=>{var c=gk().hiddenlabels;Z.exports={hiddenlabels:c,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),hU=Dt((Q,Z)=>{var c=kn(),g=mS(),I=Uh().defaults,S=Q0().handleText,t=hx().handleLabelsAndValues,e=hx().handleMarkerDefaults;Z.exports=function(r,a,n,o){function i(P,M){return c.coerce(r,a,g,P,M)}var l=i("labels"),f=i("values"),x=t(l,f),y=x.len;if(a._hasLabels=x.hasLabels,a._hasValues=x.hasValues,!a._hasLabels&&a._hasValues&&(i("label0"),i("dlabel")),!y){a.visible=!1;return}a._length=y,e(r,a,o,i),i("scalegroup");var v=i("text"),T=i("texttemplate");i("texttemplatefallback");var u;if(T||(u=i("textinfo",Array.isArray(v)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),T||u&&u!=="none"){var b=i("textposition");S(r,a,o,i,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else u==="none"&&i("textposition","none");I(a,o,i);var _=i("title.text");_&&(i("title.position"),c.coerceFont(i,"title.font",o.font)),i("aspectratio"),i("baseratio")}}),fU=Dt((Q,Z)=>{var c=kn(),g=gS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("funnelareacolorway",S.colorway),t("extendfunnelareacolors")}}),vS=Dt((Q,Z)=>{var c=ub();function g(S,t){return c.calc(S,t)}function I(S){c.crossTraceCalc(S,{type:"funnelarea"})}Z.exports={calc:g,crossTraceCalc:I}}),dU=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=kn(),S=I.strScale,t=I.strTranslate,e=ec(),r=ax(),a=r.toMoveInsideBar,n=Rp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=kg(),f=vk(),x=f.attachFxHandlers,y=f.determineInsideTextFont,v=f.layoutAreas,T=f.prerenderTitles,u=f.positionTitleOutside,b=f.formatSliceLabel;Z.exports=function(C,A){var h=C._context.staticPlot,p=C._fullLayout;i("funnelarea",p),T(A,C),v(A,p._size),I.makeTraceGroups(p._funnelarealayer,A,"trace").each(function(k){var w=c.select(this),B=k[0],O=B.trace;M(k),w.each(function(){var j=c.select(this).selectAll("g.slice").data(k);j.enter().append("g").classed("slice",!0),j.exit().remove(),j.each(function(H,F){if(H.hidden){c.select(this).selectAll("path,g").remove();return}H.pointNumber=H.i,H.curveNumber=O.index;var U=B.cx,W=B.cy,q=c.select(this),J=q.selectAll("path.surface").data([H]);J.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(x,C,k);var lt="M"+(U+H.TR[0])+","+(W+H.TR[1])+_(H.TR,H.BR)+_(H.BR,H.BL)+_(H.BL,H.TL)+"Z";J.attr("d",lt),b(C,H,B);var yt=l.castOption(O.textposition,H.pts),mt=q.selectAll("g.slicetext").data(H.text&&yt!=="none"?[0]:[]);mt.enter().append("g").classed("slicetext",!0),mt.exit().remove(),mt.each(function(){var st=I.ensureSingle(c.select(this),"text","",function(ft){ft.attr("data-notex",1)}),tt=I.ensureUniformFontSize(C,y(O,H,p.font));st.text(H.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,tt).call(e.convertToTspans,C);var pt=g.bBox(st.node()),rt,at,vt,it=Math.min(H.BL[1],H.BR[1])+W,K=Math.max(H.TL[1],H.TR[1])+W;at=Math.max(H.TL[0],H.BL[0])+U,vt=Math.min(H.TR[0],H.BR[0])+U,rt=a(at,vt,it,K,pt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),rt.fontSize=tt.size,o(O.type,rt,p),k[F].transform=rt,I.setTransormAndDisplay(st,rt)})});var V=c.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var H=I.ensureSingle(c.select(this),"text","",function(W){W.attr("data-notex",1)}),F=O.title.text;O._meta&&(F=I.templateString(F,O._meta)),H.text(F).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(g.font,O.title.font).call(e.convertToTspans,C);var U=u(B,p._size);H.attr("transform",t(U.x,U.y)+S(Math.min(1,U.scale))+t(U.tx,U.ty))})})})};function _(C,A){var h=A[0]-C[0],p=A[1]-C[1];return"l"+h+","+p}function P(C,A){return[.5*(C[0]+A[0]),.5*(C[1]+A[1])]}function M(C){if(!C.length)return;var A=C[0],h=A.trace,p=h.aspectratio,k=h.baseratio;k>.999&&(k=.999);var w=Math.pow(k,2),B=A.vTotal,O=B*w/(1-w),j=B,V=O/B;function H(){var kt=Math.sqrt(V);return{x:kt,y:-kt}}function F(){var kt=H();return[kt.x,kt.y]}var U,W=[];W.push(F());var q,J;for(q=C.length-1;q>-1;q--)if(J=C[q],!J.hidden){var lt=J.v/j;V+=lt,W.push(F())}var yt=1/0,mt=-1/0;for(q=0;q-1;q--)if(J=C[q],!J.hidden){K+=1;var ft=W[K][0],ut=W[K][1];J.TL=[-ft,ut],J.TR=[ft,ut],J.BL=vt,J.BR=it,J.pxmid=P(J.TR,J.BR),vt=J.TL,it=J.TR}}}),pU=Dt((Q,Z)=>{var c=Wr(),g=Tg(),I=Rp().resizeText;Z.exports=function(S){var t=S._fullLayout._funnelarealayer.selectAll(".trace");I(S,t,"funnelarea"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),mU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:cU(),categories:["pie-like","funnelarea","showLegend"],attributes:mS(),layoutAttributes:gS(),supplyDefaults:hU(),supplyLayoutDefaults:fU(),calc:vS().calc,crossTraceCalc:vS().crossTraceCalc,plot:dU(),style:pU(),styleOne:Tg(),meta:{}}}),gU=Dt((Q,Z)=>{Z.exports=mU()}),dp=Dt((Q,Z)=>{(function(){var c={24:function(t){var e={left:0,top:0};t.exports=r;function r(n,o,i){o=o||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var l=n.clientX||0,f=n.clientY||0,x=a(o);return i[0]=l-x.left,i[1]=f-x.top,i}function a(n){return n===window||n===document||n===document.body?e:n.getBoundingClientRect()}},109:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[2],f=a[0]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+x*y+f*v,r[1]=a[1],r[2]=l+x*v-f*y,r}},160:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r[3]=Math.max(a[3],n[3]),r}},216:function(t){t.exports=e;function e(r,a){for(var n={},o=0;o1){y[0]in f||(f[y[0]]=[]),f=f[y[0]];for(var v=1;v=0;--U){var pt=H[U];W=pt[0];var rt=j[W],at=rt[0],vt=rt[1],it=O[at],K=O[vt];if((it[0]-K[0]||it[1]-K[1])<0){var ft=at;at=vt,vt=ft}rt[0]=at;var ut=rt[1]=pt[1],kt;for(F&&(kt=rt[2]);U>0&&H[U-1][0]===W;){var pt=H[--U],It=pt[1];F?j.push([ut,It,kt]):j.push([ut,It]),ut=It}F?j.push([ut,vt,kt]):j.push([ut,vt])}return q}function C(O,j,V){for(var H=j.length,F=new a(H),U=[],W=0;Wj[2]?1:0)}function p(O,j,V){if(O.length!==0){if(j)for(var H=0;H0||W.length>0}function B(O,j,V){var H;if(V){H=j;for(var F=new Array(j.length),U=0;U1e-6?(b=Math.acos(_),P=Math.sin(b),M=Math.sin((1-o)*b)/P,C=Math.sin(o*b)/P):(M=1-o,C=o),r[0]=M*i+C*y,r[1]=M*l+C*v,r[2]=M*f+C*T,r[3]=M*x+C*u,r}},799:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision mediump float; +}`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:i,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(t,e,r){var a=r(3202);t.exports=l;var n=96;function o(f,x){var y=a(getComputedStyle(f).getPropertyValue(x));return y[0]*l(y[1],f)}function i(f,x){var y=document.createElement("div");y.style["font-size"]="128"+f,x.appendChild(y);var v=o(y,"font-size")/128;return x.removeChild(y),v}function l(f,x){switch(x=x||document.body,f=(f||"px").trim().toLowerCase(),(x===window||x===document)&&(x=document.body),f){case"%":return x.clientHeight/100;case"ch":case"ex":return i(f,x);case"em":return o(x,"font-size");case"rem":return o(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 n;case"cm":return n/2.54;case"mm":return n/25.4;case"pt":return n/72;case"pc":return n/6}return 1}},727:function(t,e,r){var a=r(2962),n=6;function o(P){var M=P===2?f:P===3?x:P===4?y:P===5?v:T;return P<6?M(a[P]):M(a)}function i(){return[[0]]}function l(P,M){return[[M[0]],[P[0][0]]]}function f(P){return function(M,C){return[P([[+C[0],+M[0][1]],[+C[1],+M[1][1]]]),P([[+M[0][0],+C[0]],[+M[1][0],+C[1]]]),P(M)]}}function x(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2]],[+C[1],+M[1][1],+M[1][2]],[+C[2],+M[2][1],+M[2][2]]]),P([[+M[0][0],+C[0],+M[0][2]],[+M[1][0],+C[1],+M[1][2]],[+M[2][0],+C[2],+M[2][2]]]),P([[+M[0][0],+M[0][1],+C[0]],[+M[1][0],+M[1][1],+C[1]],[+M[2][0],+M[2][1],+C[2]]]),P(M)]}}function y(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3]],[+C[1],+M[1][1],+M[1][2],+M[1][3]],[+C[2],+M[2][1],+M[2][2],+M[2][3]],[+C[3],+M[3][1],+M[3][2],+M[3][3]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3]],[+M[1][0],+C[1],+M[1][2],+M[1][3]],[+M[2][0],+C[2],+M[2][2],+M[2][3]],[+M[3][0],+C[3],+M[3][2],+M[3][3]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3]],[+M[1][0],+M[1][1],+C[1],+M[1][3]],[+M[2][0],+M[2][1],+C[2],+M[2][3]],[+M[3][0],+M[3][1],+C[3],+M[3][3]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+C[3]]]),P(M)]}}function v(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4]],[+C[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4]],[+C[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4]],[+C[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4]],[+C[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3],+M[0][4]],[+M[1][0],+C[1],+M[1][2],+M[1][3],+M[1][4]],[+M[2][0],+C[2],+M[2][2],+M[2][3],+M[2][4]],[+M[3][0],+C[3],+M[3][2],+M[3][3],+M[3][4]],[+M[4][0],+C[4],+M[4][2],+M[4][3],+M[4][4]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3],+M[0][4]],[+M[1][0],+M[1][1],+C[1],+M[1][3],+M[1][4]],[+M[2][0],+M[2][1],+C[2],+M[2][3],+M[2][4]],[+M[3][0],+M[3][1],+C[3],+M[3][3],+M[3][4]],[+M[4][0],+M[4][1],+C[4],+M[4][3],+M[4][4]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0],+M[0][4]],[+M[1][0],+M[1][1],+M[1][2],+C[1],+M[1][4]],[+M[2][0],+M[2][1],+M[2][2],+C[2],+M[2][4]],[+M[3][0],+M[3][1],+M[3][2],+C[3],+M[3][4]],[+M[4][0],+M[4][1],+M[4][2],+C[4],+M[4][4]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+C[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+C[4]]]),P(M)]}}function T(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+C[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+C[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+C[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+C[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+C[5],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+C[1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+C[2],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+C[3],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+C[4],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+C[5],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+C[1],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+C[2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+C[3],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+C[4],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+C[5],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+C[1],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+C[2],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+C[3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+C[4],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+C[5],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+C[0],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+C[1],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+C[2],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+C[3],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+C[4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+C[5],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+C[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+C[4]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+C[5]]]),P(M)]}}var u=[i,l];function b(P,M,C,A,h,p,k,w){return function(B,O){switch(B.length){case 0:return P(B,O);case 1:return M(B,O);case 2:return C(B,O);case 3:return A(B,O);case 4:return h(B,O);case 5:return p(B,O)}var j=k[B.length];return j||(j=k[B.length]=w(B.length)),j(B,O)}}function _(){for(;u.length1e-6?(b=Math.acos(_),P=Math.sin(b),M=Math.sin((1-o)*b)/P,C=Math.sin(o*b)/P):(M=1-o,C=o),r[0]=M*i+C*y,r[1]=M*l+C*v,r[2]=M*f+C*T,r[3]=M*x+C*u,r}},799:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -935,7 +935,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:i,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:f,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:y,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:T,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:u,fragment:b,attributes:[{name:"position",type:"vec3"}]}},855:function(t,e,r){t.exports={init:_,sweepBipartite:C,sweepComplete:A,scanBipartite:h,scanComplete:p};var a=r(1888),n=r(8828),o=r(4192),i=1<<28,l=1024,f=a.mallocInt32(l),x=a.mallocInt32(l),y=a.mallocInt32(l),v=a.mallocInt32(l),T=a.mallocInt32(l),u=a.mallocInt32(l),b=a.mallocDouble(l*8);function _(k){var w=n.nextPow2(k);f.length>>1;o(b,rt);for(var at=0,vt=0,mt=0;mt=i)it=it-i|0,P(y,v,vt--,it);else if(it>=0)P(f,x,at--,it);else if(it<=-i){it=-it-i|0;for(var Y=0;Y>>1;o(b,rt);for(var at=0,vt=0,it=0,mt=0;mt>1===b[2*mt+3]>>1&&(ft=2,mt+=1),Y<0){for(var ut=-(Y>>1)-1,kt=0;kt>1)-1;ft===0?P(f,x,at--,ut):ft===1?P(y,v,vt--,ut):ft===2&&P(T,u,it--,ut)}}}function h(k,w,R,O,j,V,H,F,U,W,q,J){var lt=0,yt=2*k,mt=w,st=w+k,tt=1,dt=1;O?dt=i:tt=i;for(var rt=j;rt>>1;o(b,Y);for(var ft=0,rt=0;rt=i?(kt=!O,at-=i):(kt=!!O,at-=1),kt)M(f,x,ft++,at);else{var It=J[at],Pt=yt*at,qt=q[Pt+w+1],Wt=q[Pt+w+1+k];t:for(var Jt=0;Jt>>1;o(b,at);for(var vt=0,st=0;st=i)f[vt++]=tt-i;else{tt-=1;var Y=q[tt],ft=lt*tt,ut=W[ft+w+1],kt=W[ft+w+1+k];t:for(var It=0;It=0;--It)if(f[It]===tt){for(var Jt=It+1;Jt>>1;o(b,rt);for(var at=0,vt=0,mt=0;mt=i)it=it-i|0,P(y,v,vt--,it);else if(it>=0)P(f,x,at--,it);else if(it<=-i){it=-it-i|0;for(var K=0;K>>1;o(b,rt);for(var at=0,vt=0,it=0,mt=0;mt>1===b[2*mt+3]>>1&&(ft=2,mt+=1),K<0){for(var ut=-(K>>1)-1,kt=0;kt>1)-1;ft===0?P(f,x,at--,ut):ft===1?P(y,v,vt--,ut):ft===2&&P(T,u,it--,ut)}}}function h(k,w,B,O,j,V,H,F,U,W,q,J){var lt=0,yt=2*k,mt=w,st=w+k,tt=1,pt=1;O?pt=i:tt=i;for(var rt=j;rt>>1;o(b,K);for(var ft=0,rt=0;rt=i?(kt=!O,at-=i):(kt=!!O,at-=1),kt)M(f,x,ft++,at);else{var It=J[at],Pt=yt*at,qt=q[Pt+w+1],Wt=q[Pt+w+1+k];t:for(var Jt=0;Jt>>1;o(b,at);for(var vt=0,st=0;st=i)f[vt++]=tt-i;else{tt-=1;var K=q[tt],ft=lt*tt,ut=W[ft+w+1],kt=W[ft+w+1+k];t:for(var It=0;It=0;--It)if(f[It]===tt){for(var Jt=It+1;Jt=0?k[U]:F)}function O(H){var F=_(H);return F?w in F:p.indexOf(H)>=0}function j(H,F){var U,W=_(H);return W?W[w]=F:(U=p.indexOf(H),U>=0?k[U]=F:(U=p.length,k[U]=F,p[U]=H)),this}function V(H){var F=_(H),U,W;return F?w in F&&delete F[w]:(U=p.indexOf(H),U<0?!1:(W=p.length-1,p[U]=void 0,k[U]=k[W],p[U]=p[W],p.length=W,k.length=W,!0))}return Object.create(h.prototype,{get___:{value:P(R)},has___:{value:P(O)},set___:{value:P(j)},delete___:{value:P(V)}})};h.prototype=Object.create(Object.prototype,{get:{value:function(p,k){return this.get___(p,k)},writable:!0,configurable:!0},has:{value:function(p){return this.has___(p)},writable:!0,configurable:!0},set:{value:function(p,k){return this.set___(p,k)},writable:!0,configurable:!0},delete:{value:function(p){return this.delete___(p)},writable:!0,configurable:!0}}),typeof a=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof h||C();var k=new a,w=void 0,R=!1;function O(F,U){return w?k.has(F)?k.get(F):w.get___(F,U):k.get(F,U)}function j(F){return k.has(F)||(w?w.has___(F):!1)}var V;r?V=function(F,U){return k.set(F,U),k.has(F)||(w||(w=new h),w.set(F,U)),this}:V=function(F,U){if(R)try{k.set(F,U)}catch{w||(w=new h),w.set___(F,U)}else k.set(F,U);return this};function H(F){var U=!!k.delete(F);return w&&w.delete___(F)||U}return Object.create(h.prototype,{get___:{value:P(O)},has___:{value:P(j)},set___:{value:P(V)},delete___:{value:P(H)},permitHostObjects___:{value:P(function(F){if(F===e)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=h.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=h)})()},1570:function(t){t.exports=r;var e=[function(){function a(n,o,i,l){for(var f=n.length,x=[],y=0;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y=0?k[U]:F)}function O(H){var F=_(H);return F?w in F:p.indexOf(H)>=0}function j(H,F){var U,W=_(H);return W?W[w]=F:(U=p.indexOf(H),U>=0?k[U]=F:(U=p.length,k[U]=F,p[U]=H)),this}function V(H){var F=_(H),U,W;return F?w in F&&delete F[w]:(U=p.indexOf(H),U<0?!1:(W=p.length-1,p[U]=void 0,k[U]=k[W],p[U]=p[W],p.length=W,k.length=W,!0))}return Object.create(h.prototype,{get___:{value:P(B)},has___:{value:P(O)},set___:{value:P(j)},delete___:{value:P(V)}})};h.prototype=Object.create(Object.prototype,{get:{value:function(p,k){return this.get___(p,k)},writable:!0,configurable:!0},has:{value:function(p){return this.has___(p)},writable:!0,configurable:!0},set:{value:function(p,k){return this.set___(p,k)},writable:!0,configurable:!0},delete:{value:function(p){return this.delete___(p)},writable:!0,configurable:!0}}),typeof a=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof h||C();var k=new a,w=void 0,B=!1;function O(F,U){return w?k.has(F)?k.get(F):w.get___(F,U):k.get(F,U)}function j(F){return k.has(F)||(w?w.has___(F):!1)}var V;r?V=function(F,U){return k.set(F,U),k.has(F)||(w||(w=new h),w.set(F,U)),this}:V=function(F,U){if(B)try{k.set(F,U)}catch{w||(w=new h),w.set___(F,U)}else k.set(F,U);return this};function H(F){var U=!!k.delete(F);return w&&w.delete___(F)||U}return Object.create(h.prototype,{get___:{value:P(O)},has___:{value:P(j)},set___:{value:P(V)},delete___:{value:P(H)},permitHostObjects___:{value:P(function(F){if(F===e)B=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=h.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=h)})()},1570:function(t){t.exports=r;var e=[function(){function a(n,o,i,l){for(var f=n.length,x=[],y=0;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y0?W.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=b;function _(H){return new Uint8Array(b(H),0,H)}e.mallocUint8=_;function P(H){return new Uint16Array(b(2*H),0,H)}e.mallocUint16=P;function M(H){return new Uint32Array(b(4*H),0,H)}e.mallocUint32=M;function C(H){return new Int8Array(b(H),0,H)}e.mallocInt8=C;function A(H){return new Int16Array(b(2*H),0,H)}e.mallocInt16=A;function h(H){return new Int32Array(b(4*H),0,H)}e.mallocInt32=h;function p(H){return new Float32Array(b(4*H),0,H)}e.mallocFloat32=e.mallocFloat=p;function k(H){return new Float64Array(b(8*H),0,H)}e.mallocFloat64=e.mallocDouble=k;function w(H){return i?new Uint8ClampedArray(b(H),0,H):_(H)}e.mallocUint8Clamped=w;function R(H){return l?new BigUint64Array(b(8*H),0,H):null}e.mallocBigUint64=R;function O(H){return f?new BigInt64Array(b(8*H),0,H):null}e.mallocBigInt64=O;function j(H){return new DataView(b(H),0,H)}e.mallocDataView=j;function V(H){H=a.nextPow2(H);var F=a.log2(H),U=v[F];return U.length>0?U.pop():new o(H)}e.mallocBuffer=V,e.clearCache=function(){for(var H=0;H<32;++H)x.UINT8[H].length=0,x.UINT16[H].length=0,x.UINT32[H].length=0,x.INT8[H].length=0,x.INT16[H].length=0,x.INT32[H].length=0,x.FLOAT[H].length=0,x.DOUBLE[H].length=0,x.BIGUINT64[H].length=0,x.BIGINT64[H].length=0,x.UINT8C[H].length=0,y[H].length=0,v[H].length=0}},1903:function(t){t.exports=e;function e(r){var a=new Float32Array(16);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],a[9]=r[9],a[10]=r[10],a[11]=r[11],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15],a}},1944:function(t,e,r){var a=r(5250),n=r(8210);t.exports=o;function o(i,l){for(var f=a(i[0],l[0]),x=1;x>1,V=f(p[j],k);V<=0?(V===0&&(O=j),w=j+1):V>0&&(R=j-1)}return O}e.findCell=T;function u(p,k){for(var w=new Array(p.length),R=0,O=w.length;R=p.length||f(p[lt],j)!==0););}return w}e.incidence=u;function b(p,k){if(!k)return u(v(P(p,0)),p);for(var w=new Array(k),R=0;R>>U&1&&F.push(O[U]);k.push(F)}return y(k)}e.explode=_;function P(p,k){if(k<0)return[];for(var w=[],R=(1<0}h=h.filter(p);for(var k=h.length,w=new Array(k),R=new Array(k),A=0;A0;){var ut=Y.pop(),kt=mt[ut];f(kt,function(ge,fe){return ge-fe});var It=kt.length,Pt=ft[ut],qt;if(Pt===0){var U=h[ut];qt=[U]}for(var A=0;A=0)&&(ft[Wt]=Pt^1,Y.push(Wt),Pt===0)){var U=h[Wt];it(U)||(U.reverse(),qt.push(U))}}Pt===0&&_.push(qt)}return _}},2145:function(t,e){e.uniforms=o,e.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function n(l,f){if(!a){var x=Object.keys(r);a={};for(var y=0;y1)for(var b=0;b1&&V.drawBuffersWEBGL(n[j]);var q=k.getExtension("WEBGL_depth_texture");q?H?h.depth=u(k,R,O,q.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=u(k,R,O,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&H?h._depth_rb=b(k,R,O,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=b(k,R,O,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):H&&(h._depth_rb=b(k,R,O,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var J=k.checkFramebufferStatus(k.FRAMEBUFFER);if(J!==k.FRAMEBUFFER_COMPLETE){h._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(k.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var W=0;WR||k<0||k>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=p,h._shape[1]=k;for(var O=x(w),j=0;jO||k<0||k>O)throw new Error("gl-fbo: Parameters are too large for FBO");w=w||{};var j=1;if("color"in w){if(j=Math.max(w.color|0,0),j<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(j>1)if(R){if(j>h.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+j+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var V=h.UNSIGNED_BYTE,H=h.getExtension("OES_texture_float");if(w.float&&j>0){if(!H)throw new Error("gl-fbo: Context does not support floating point textures");V=h.FLOAT}else w.preferFloat&&j>0&&H&&(V=h.FLOAT);var F=!0;"depth"in w&&(F=!!w.depth);var U=!1;return"stencil"in w&&(U=!!w.stencil),new P(h,p,k,V,j,F,U,R)}},2272:function(t,e,r){var a=r(2646)[4];r(2478),t.exports=o;function n(i,l,f,x,y,v){var T=l.opposite(x,y);if(!(T<0)){if(y0;){for(var b=f.pop(),v=f.pop(),_=-1,P=-1,T=y[v],C=1;C=0||(l.flip(v,b),n(i,l,f,_,v,P),n(i,l,f,v,P,_),n(i,l,f,P,b,_),n(i,l,f,b,_,P))}}},2334:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r[3]=Math.min(a[3],n[3]),r}},2335:function(t){t.exports=e;function e(r){var a=new Float32Array(4);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a}},2361:function(t){var e=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),a=new Uint32Array(r.buffer);if(r[0]=1,e=!0,a[1]===1072693248){let o=function(f,x){return a[0]=f,a[1]=x,r[0]},i=function(f){return r[0]=f,a[0]},l=function(f){return r[0]=f,a[1]};t.exports=function(f){return r[0]=f,[a[0],a[1]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else if(a[0]===1072693248){let o=function(f,x){return a[1]=f,a[0]=x,r[0]},i=function(f){return r[0]=f,a[1]},l=function(f){return r[0]=f,a[0]};t.exports=function(f){return r[0]=f,[a[1],a[0]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else e=!1}if(!e){let o=function(f,x){return n.writeUInt32LE(f,0,!0),n.writeUInt32LE(x,4,!0),n.readDoubleLE(0,!0)},i=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(0,!0)},l=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(4,!0)};var n=new Buffer(8);t.exports=function(f){return n.writeDoubleLE(f,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}t.exports.sign=function(o){return t.exports.hi(o)>>>31},t.exports.exponent=function(o){var i=t.exports.hi(o);return(i<<1>>>21)-1023},t.exports.fraction=function(o){var i=t.exports.lo(o),l=t.exports.hi(o),f=l&(1<<20)-1;return l&2146435072&&(f+=1048576),[i,f]},t.exports.denormalized=function(o){var i=t.exports.hi(o);return!(i&2146435072)}},2408:function(t){t.exports=e;function e(r,a,n){var o=Math.sin(n),i=Math.cos(n),l=a[0],f=a[1],x=a[2],y=a[3],v=a[8],T=a[9],u=a[10],b=a[11];return a!==r&&(r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15]),r[0]=l*i-v*o,r[1]=f*i-T*o,r[2]=x*i-u*o,r[3]=y*i-b*o,r[8]=l*o+v*i,r[9]=f*o+T*i,r[10]=x*o+u*i,r[11]=y*o+b*i,r}},2419:function(t){t.exports=e;function e(r){for(var a=1,n=1;nP-_?o(f,x,y,v,T,u,b,_,P,M,C):i(f,x,y,v,T,u,b,_,P,M,C)}return l}function a(){function o(y,v,T,u,b,_,P,M,C,A,h){for(var p=2*y,k=u,w=p*u;kA-C?u?o(y,v,T,b,_,P,M,C,A,h,p):i(y,v,T,b,_,P,M,C,A,h,p):u?l(y,v,T,b,_,P,M,C,A,h,p):f(y,v,T,b,_,P,M,C,A,h,p)}return x}function n(o){return o?r():a()}e.partial=n(!1),e.full=n(!0)},2478:function(t){function e(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>=0?(T=u,v=u-1):y=u+1}return T}function r(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>0?(T=u,v=u-1):y=u+1}return T}function a(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<0?(T=u,y=u+1):v=u-1}return T}function n(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<=0?(T=u,y=u+1):v=u-1}return T}function o(l,f,x,y,v){for(;y<=v;){var T=y+v>>>1,u=l[T],b=x!==void 0?x(u,f):u-f;if(b===0)return T;b<=0?y=T+1:v=T-1}return-1}function i(l,f,x,y,v,T){return typeof x=="function"?T(l,f,x,y===void 0?0:y|0,v===void 0?l.length-1:v|0):T(l,f,void 0,x===void 0?0:x|0,y===void 0?l.length-1:y|0)}t.exports={ge:function(l,f,x,y,v){return i(l,f,x,y,v,e)},gt:function(l,f,x,y,v){return i(l,f,x,y,v,r)},lt:function(l,f,x,y,v){return i(l,f,x,y,v,a)},le:function(l,f,x,y,v){return i(l,f,x,y,v,n)},eq:function(l,f,x,y,v){return i(l,f,x,y,v,o)}}},2504:function(t){t.exports=e;function e(r,a,n){var o=n[0],i=n[1],l=n[2];return r[0]=a[0]*o,r[1]=a[1]*o,r[2]=a[2]*o,r[3]=a[3]*o,r[4]=a[4]*i,r[5]=a[5]*i,r[6]=a[6]*i,r[7]=a[7]*i,r[8]=a[8]*l,r[9]=a[9]*l,r[10]=a[10]*l,r[11]=a[11]*l,r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15],r}},2538:function(t,e,r){var a=r(8902),n=r(5542),o=r(2272),i=r(5023);t.exports=v;function l(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function f(T,u){return T[0]-u[0]||T[1]-u[1]}function x(T){return T.map(l).sort(f)}function y(T,u,b){return u in T?T[u]:b}function v(T,u,b){Array.isArray(u)?(b=b||{},u=u||[]):(b=u||{},u=[]);var _=!!y(b,"delaunay",!0),P=!!y(b,"interior",!0),M=!!y(b,"exterior",!0),C=!!y(b,"infinity",!1);if(!P&&!M||T.length===0)return[];var A=a(T,u);if(_||P!==M||C){for(var h=n(T.length,x(u)),p=0;p0){if(J=1,mt[tt++]=x(C[k],u,b,_),k+=U,P>0)for(q=1,w=C[k],dt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(dt!==vt||dt!==ft||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,vt,ft,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,q=2;q0)for(q=1,w=C[k],dt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(dt!==vt||dt!==ft||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,vt,ft,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,V,F,ft,It,u,b,_)),tt+=1,k+=U,q=2;q0){if(q=1,mt[tt++]=x(C[k],u,b,_),k+=U,M>0)for(J=1,w=C[k],dt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(dt!==ft||dt!==vt||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,ft,vt,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,J=2;J0)for(J=1,w=C[k],dt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(dt!==ft||dt!==vt||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,ft,vt,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,F,O,It,ft,u,b,_)),tt+=1,k+=U,J=2;J 0"),typeof l.vertex!="function"&&f("Must specify vertex creation function"),typeof l.cell!="function"&&f("Must specify cell creation function"),typeof l.phase!="function"&&f("Must specify phase function");for(var T=l.getters||[],u=new Array(y),b=0;b=0?u[b]=!0:u[b]=!1;return o(l.vertex,l.cell,l.phase,v,x,u)}},2642:function(t,e,r){t.exports=o;var a=r(727);function n(i){for(var l=0,f=0;fu[1][2]&&(w[0]=-w[0]),u[0][2]>u[2][0]&&(w[1]=-w[1]),u[1][0]>u[0][1]&&(w[2]=-w[2]),!0};function _(C,A,h){var p=A[0],k=A[1],w=A[2],R=A[3];return C[0]=h[0]*p+h[4]*k+h[8]*w+h[12]*R,C[1]=h[1]*p+h[5]*k+h[9]*w+h[13]*R,C[2]=h[2]*p+h[6]*k+h[10]*w+h[14]*R,C[3]=h[3]*p+h[7]*k+h[11]*w+h[15]*R,C}function P(C,A){C[0][0]=A[0],C[0][1]=A[1],C[0][2]=A[2],C[1][0]=A[4],C[1][1]=A[5],C[1][2]=A[6],C[2][0]=A[8],C[2][1]=A[9],C[2][2]=A[10]}function M(C,A,h,p,k){C[0]=A[0]*p+h[0]*k,C[1]=A[1]*p+h[1]*k,C[2]=A[2]*p+h[2]*k}},2653:function(t,e,r){var a=r(3865);t.exports=n;function n(o,i){for(var l=o.length,f=new Array(l),x=0;x=x[P]&&(_+=1);u[b]=_}}return f}function l(f,x){try{return a(f,!0)}catch{var y=n(f);if(y.length<=x)return[];var v=o(f,y),T=a(v,!0);return i(T,y)}}},2762:function(t,e,r){var a=r(1888),n=r(5298),o=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function l(u,b,_,P,M){this.gl=u,this.type=b,this.handle=_,this.length=P,this.usage=M}var f=l.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(u,b,_,P,M,C){var A=M.length*M.BYTES_PER_ELEMENT;if(C<0)return u.bufferData(b,M,P),A;if(A+C>_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(b,C,M),_}function y(u,b){for(var _=a.malloc(u.length,b),P=u.length,M=0;M=0;--P){if(b[P]!==_)return!1;_*=u[P]}return!0}f.update=function(u,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof u=="object"&&typeof u.shape<"u"){var _=u.dtype;if(i.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var P=gl.getExtension("OES_element_index_uint");P&&_!=="uint16"?_="uint32":_="uint16"}if(_===u.dtype&&v(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,u.data,b):this.length=x(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),b);else{var M=a.malloc(u.size,_),C=o(M,u.shape);n.assign(C,u),b<0?this.length=x(this.gl,this.type,this.length,this.usage,M,b):this.length=x(this.gl,this.type,this.length,this.usage,M.subarray(0,u.size),b),a.free(M)}}else if(Array.isArray(u)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(u,"uint16"):A=y(u,"float32"),b<0?this.length=x(this.gl,this.type,this.length,this.usage,A,b):this.length=x(this.gl,this.type,this.length,this.usage,A.subarray(0,u.length),b),a.free(A)}else if(typeof u=="object"&&typeof u.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,u,b);else if(typeof u=="number"||u===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");u=u|0,u<=0&&(u=1),this.gl.bufferData(this.type,u|0,this.usage),this.length=u}else throw new Error("gl-buffer: Invalid data type")};function T(u,b,_,P){if(_=_||u.ARRAY_BUFFER,P=P||u.DYNAMIC_DRAW,_!==u.ARRAY_BUFFER&&_!==u.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(P!==u.DYNAMIC_DRAW&&P!==u.STATIC_DRAW&&P!==u.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=u.createBuffer(),C=new l(u,_,M,0,P);return C.update(b),C}t.exports=T},2825:function(t){t.exports=e;function e(r,a,n){var o=new Float32Array(3);return o[0]=r,o[1]=a,o[2]=n,o}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(t){t.exports=e;function e(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}},2953:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2];return n*n+o*o+i*i}},2962:function(t,e,r){var a=r(5250),n=r(8210),o=r(3012),i=r(7004),l=6;function f(P,M,C,A){return function(h){return A(P(C(h[0][0],h[1][1]),C(-h[0][1],h[1][0])))}}function x(P,M,C,A){return function(h){return A(P(M(P(C(h[1][1],h[2][2]),C(-h[1][2],h[2][1])),h[0][0]),P(M(P(C(h[1][0],h[2][2]),C(-h[1][2],h[2][0])),-h[0][1]),M(P(C(h[1][0],h[2][1]),C(-h[1][1],h[2][0])),h[0][2]))))}}function y(P,M,C,A){return function(h){return A(P(P(M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][1]),P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),-h[1][2]),M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][3]))),h[0][0]),M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][2]),M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),h[1][3]))),-h[0][1])),P(M(P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][3]))),h[0][2]),M(P(M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][2]))),-h[0][3]))))}}function v(P,M,C,A){return function(h){return A(P(P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][1]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),-h[1][4]))),h[0][0]),M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][4]))),-h[0][1])),P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),-h[1][4]))),h[0][2]),P(M(P(P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][4]))),-h[0][3]),M(P(P(M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][3]))),h[0][4])))))}}function T(P){var M=P===2?f:P===3?x:P===4?y:P===5?v:void 0;return M(n,o,a,i)}var u=[function(){return[0]},function(P){return[P[0][0]]}];function b(P,M,C,A,h,p,k,w){return function(R){switch(R.length){case 0:return P(R);case 1:return M(R);case 2:return C(R);case 3:return A(R);case 4:return h(R);case 5:return p(R)}var O=k[R.length];return O||(O=k[R.length]=w(R.length)),O(R)}}function _(){for(;u.length0?W.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=b;function _(H){return new Uint8Array(b(H),0,H)}e.mallocUint8=_;function P(H){return new Uint16Array(b(2*H),0,H)}e.mallocUint16=P;function M(H){return new Uint32Array(b(4*H),0,H)}e.mallocUint32=M;function C(H){return new Int8Array(b(H),0,H)}e.mallocInt8=C;function A(H){return new Int16Array(b(2*H),0,H)}e.mallocInt16=A;function h(H){return new Int32Array(b(4*H),0,H)}e.mallocInt32=h;function p(H){return new Float32Array(b(4*H),0,H)}e.mallocFloat32=e.mallocFloat=p;function k(H){return new Float64Array(b(8*H),0,H)}e.mallocFloat64=e.mallocDouble=k;function w(H){return i?new Uint8ClampedArray(b(H),0,H):_(H)}e.mallocUint8Clamped=w;function B(H){return l?new BigUint64Array(b(8*H),0,H):null}e.mallocBigUint64=B;function O(H){return f?new BigInt64Array(b(8*H),0,H):null}e.mallocBigInt64=O;function j(H){return new DataView(b(H),0,H)}e.mallocDataView=j;function V(H){H=a.nextPow2(H);var F=a.log2(H),U=v[F];return U.length>0?U.pop():new o(H)}e.mallocBuffer=V,e.clearCache=function(){for(var H=0;H<32;++H)x.UINT8[H].length=0,x.UINT16[H].length=0,x.UINT32[H].length=0,x.INT8[H].length=0,x.INT16[H].length=0,x.INT32[H].length=0,x.FLOAT[H].length=0,x.DOUBLE[H].length=0,x.BIGUINT64[H].length=0,x.BIGINT64[H].length=0,x.UINT8C[H].length=0,y[H].length=0,v[H].length=0}},1903:function(t){t.exports=e;function e(r){var a=new Float32Array(16);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],a[9]=r[9],a[10]=r[10],a[11]=r[11],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15],a}},1944:function(t,e,r){var a=r(5250),n=r(8210);t.exports=o;function o(i,l){for(var f=a(i[0],l[0]),x=1;x>1,V=f(p[j],k);V<=0?(V===0&&(O=j),w=j+1):V>0&&(B=j-1)}return O}e.findCell=T;function u(p,k){for(var w=new Array(p.length),B=0,O=w.length;B=p.length||f(p[lt],j)!==0););}return w}e.incidence=u;function b(p,k){if(!k)return u(v(P(p,0)),p);for(var w=new Array(k),B=0;B>>U&1&&F.push(O[U]);k.push(F)}return y(k)}e.explode=_;function P(p,k){if(k<0)return[];for(var w=[],B=(1<0}h=h.filter(p);for(var k=h.length,w=new Array(k),B=new Array(k),A=0;A0;){var ut=K.pop(),kt=mt[ut];f(kt,function(ge,fe){return ge-fe});var It=kt.length,Pt=ft[ut],qt;if(Pt===0){var U=h[ut];qt=[U]}for(var A=0;A=0)&&(ft[Wt]=Pt^1,K.push(Wt),Pt===0)){var U=h[Wt];it(U)||(U.reverse(),qt.push(U))}}Pt===0&&_.push(qt)}return _}},2145:function(t,e){e.uniforms=o,e.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function n(l,f){if(!a){var x=Object.keys(r);a={};for(var y=0;y1)for(var b=0;b1&&V.drawBuffersWEBGL(n[j]);var q=k.getExtension("WEBGL_depth_texture");q?H?h.depth=u(k,B,O,q.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=u(k,B,O,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&H?h._depth_rb=b(k,B,O,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=b(k,B,O,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):H&&(h._depth_rb=b(k,B,O,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var J=k.checkFramebufferStatus(k.FRAMEBUFFER);if(J!==k.FRAMEBUFFER_COMPLETE){h._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(k.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var W=0;WB||k<0||k>B)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=p,h._shape[1]=k;for(var O=x(w),j=0;jO||k<0||k>O)throw new Error("gl-fbo: Parameters are too large for FBO");w=w||{};var j=1;if("color"in w){if(j=Math.max(w.color|0,0),j<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(j>1)if(B){if(j>h.getParameter(B.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+j+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var V=h.UNSIGNED_BYTE,H=h.getExtension("OES_texture_float");if(w.float&&j>0){if(!H)throw new Error("gl-fbo: Context does not support floating point textures");V=h.FLOAT}else w.preferFloat&&j>0&&H&&(V=h.FLOAT);var F=!0;"depth"in w&&(F=!!w.depth);var U=!1;return"stencil"in w&&(U=!!w.stencil),new P(h,p,k,V,j,F,U,B)}},2272:function(t,e,r){var a=r(2646)[4];r(2478),t.exports=o;function n(i,l,f,x,y,v){var T=l.opposite(x,y);if(!(T<0)){if(y0;){for(var b=f.pop(),v=f.pop(),_=-1,P=-1,T=y[v],C=1;C=0||(l.flip(v,b),n(i,l,f,_,v,P),n(i,l,f,v,P,_),n(i,l,f,P,b,_),n(i,l,f,b,_,P))}}},2334:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r[3]=Math.min(a[3],n[3]),r}},2335:function(t){t.exports=e;function e(r){var a=new Float32Array(4);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a}},2361:function(t){var e=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),a=new Uint32Array(r.buffer);if(r[0]=1,e=!0,a[1]===1072693248){let o=function(f,x){return a[0]=f,a[1]=x,r[0]},i=function(f){return r[0]=f,a[0]},l=function(f){return r[0]=f,a[1]};t.exports=function(f){return r[0]=f,[a[0],a[1]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else if(a[0]===1072693248){let o=function(f,x){return a[1]=f,a[0]=x,r[0]},i=function(f){return r[0]=f,a[1]},l=function(f){return r[0]=f,a[0]};t.exports=function(f){return r[0]=f,[a[1],a[0]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else e=!1}if(!e){let o=function(f,x){return n.writeUInt32LE(f,0,!0),n.writeUInt32LE(x,4,!0),n.readDoubleLE(0,!0)},i=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(0,!0)},l=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(4,!0)};var n=new Buffer(8);t.exports=function(f){return n.writeDoubleLE(f,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}t.exports.sign=function(o){return t.exports.hi(o)>>>31},t.exports.exponent=function(o){var i=t.exports.hi(o);return(i<<1>>>21)-1023},t.exports.fraction=function(o){var i=t.exports.lo(o),l=t.exports.hi(o),f=l&(1<<20)-1;return l&2146435072&&(f+=1048576),[i,f]},t.exports.denormalized=function(o){var i=t.exports.hi(o);return!(i&2146435072)}},2408:function(t){t.exports=e;function e(r,a,n){var o=Math.sin(n),i=Math.cos(n),l=a[0],f=a[1],x=a[2],y=a[3],v=a[8],T=a[9],u=a[10],b=a[11];return a!==r&&(r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15]),r[0]=l*i-v*o,r[1]=f*i-T*o,r[2]=x*i-u*o,r[3]=y*i-b*o,r[8]=l*o+v*i,r[9]=f*o+T*i,r[10]=x*o+u*i,r[11]=y*o+b*i,r}},2419:function(t){t.exports=e;function e(r){for(var a=1,n=1;nP-_?o(f,x,y,v,T,u,b,_,P,M,C):i(f,x,y,v,T,u,b,_,P,M,C)}return l}function a(){function o(y,v,T,u,b,_,P,M,C,A,h){for(var p=2*y,k=u,w=p*u;kA-C?u?o(y,v,T,b,_,P,M,C,A,h,p):i(y,v,T,b,_,P,M,C,A,h,p):u?l(y,v,T,b,_,P,M,C,A,h,p):f(y,v,T,b,_,P,M,C,A,h,p)}return x}function n(o){return o?r():a()}e.partial=n(!1),e.full=n(!0)},2478:function(t){function e(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>=0?(T=u,v=u-1):y=u+1}return T}function r(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>0?(T=u,v=u-1):y=u+1}return T}function a(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<0?(T=u,y=u+1):v=u-1}return T}function n(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<=0?(T=u,y=u+1):v=u-1}return T}function o(l,f,x,y,v){for(;y<=v;){var T=y+v>>>1,u=l[T],b=x!==void 0?x(u,f):u-f;if(b===0)return T;b<=0?y=T+1:v=T-1}return-1}function i(l,f,x,y,v,T){return typeof x=="function"?T(l,f,x,y===void 0?0:y|0,v===void 0?l.length-1:v|0):T(l,f,void 0,x===void 0?0:x|0,y===void 0?l.length-1:y|0)}t.exports={ge:function(l,f,x,y,v){return i(l,f,x,y,v,e)},gt:function(l,f,x,y,v){return i(l,f,x,y,v,r)},lt:function(l,f,x,y,v){return i(l,f,x,y,v,a)},le:function(l,f,x,y,v){return i(l,f,x,y,v,n)},eq:function(l,f,x,y,v){return i(l,f,x,y,v,o)}}},2504:function(t){t.exports=e;function e(r,a,n){var o=n[0],i=n[1],l=n[2];return r[0]=a[0]*o,r[1]=a[1]*o,r[2]=a[2]*o,r[3]=a[3]*o,r[4]=a[4]*i,r[5]=a[5]*i,r[6]=a[6]*i,r[7]=a[7]*i,r[8]=a[8]*l,r[9]=a[9]*l,r[10]=a[10]*l,r[11]=a[11]*l,r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15],r}},2538:function(t,e,r){var a=r(8902),n=r(5542),o=r(2272),i=r(5023);t.exports=v;function l(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function f(T,u){return T[0]-u[0]||T[1]-u[1]}function x(T){return T.map(l).sort(f)}function y(T,u,b){return u in T?T[u]:b}function v(T,u,b){Array.isArray(u)?(b=b||{},u=u||[]):(b=u||{},u=[]);var _=!!y(b,"delaunay",!0),P=!!y(b,"interior",!0),M=!!y(b,"exterior",!0),C=!!y(b,"infinity",!1);if(!P&&!M||T.length===0)return[];var A=a(T,u);if(_||P!==M||C){for(var h=n(T.length,x(u)),p=0;p0){if(J=1,mt[tt++]=x(C[k],u,b,_),k+=U,P>0)for(q=1,w=C[k],pt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(pt!==vt||pt!==ft||pt!==It)&&(O=C[k+B],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,pt,vt,ft,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,q=2;q0)for(q=1,w=C[k],pt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(pt!==vt||pt!==ft||pt!==It)&&(O=C[k+B],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,pt,vt,ft,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,V,F,ft,It,u,b,_)),tt+=1,k+=U,q=2;q0){if(q=1,mt[tt++]=x(C[k],u,b,_),k+=U,M>0)for(J=1,w=C[k],pt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(pt!==ft||pt!==vt||pt!==It)&&(O=C[k+B],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,pt,ft,vt,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,J=2;J0)for(J=1,w=C[k],pt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(pt!==ft||pt!==vt||pt!==It)&&(O=C[k+B],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,pt,ft,vt,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,F,O,It,ft,u,b,_)),tt+=1,k+=U,J=2;J 0"),typeof l.vertex!="function"&&f("Must specify vertex creation function"),typeof l.cell!="function"&&f("Must specify cell creation function"),typeof l.phase!="function"&&f("Must specify phase function");for(var T=l.getters||[],u=new Array(y),b=0;b=0?u[b]=!0:u[b]=!1;return o(l.vertex,l.cell,l.phase,v,x,u)}},2642:function(t,e,r){t.exports=o;var a=r(727);function n(i){for(var l=0,f=0;fu[1][2]&&(w[0]=-w[0]),u[0][2]>u[2][0]&&(w[1]=-w[1]),u[1][0]>u[0][1]&&(w[2]=-w[2]),!0};function _(C,A,h){var p=A[0],k=A[1],w=A[2],B=A[3];return C[0]=h[0]*p+h[4]*k+h[8]*w+h[12]*B,C[1]=h[1]*p+h[5]*k+h[9]*w+h[13]*B,C[2]=h[2]*p+h[6]*k+h[10]*w+h[14]*B,C[3]=h[3]*p+h[7]*k+h[11]*w+h[15]*B,C}function P(C,A){C[0][0]=A[0],C[0][1]=A[1],C[0][2]=A[2],C[1][0]=A[4],C[1][1]=A[5],C[1][2]=A[6],C[2][0]=A[8],C[2][1]=A[9],C[2][2]=A[10]}function M(C,A,h,p,k){C[0]=A[0]*p+h[0]*k,C[1]=A[1]*p+h[1]*k,C[2]=A[2]*p+h[2]*k}},2653:function(t,e,r){var a=r(3865);t.exports=n;function n(o,i){for(var l=o.length,f=new Array(l),x=0;x=x[P]&&(_+=1);u[b]=_}}return f}function l(f,x){try{return a(f,!0)}catch{var y=n(f);if(y.length<=x)return[];var v=o(f,y),T=a(v,!0);return i(T,y)}}},2762:function(t,e,r){var a=r(1888),n=r(5298),o=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function l(u,b,_,P,M){this.gl=u,this.type=b,this.handle=_,this.length=P,this.usage=M}var f=l.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(u,b,_,P,M,C){var A=M.length*M.BYTES_PER_ELEMENT;if(C<0)return u.bufferData(b,M,P),A;if(A+C>_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(b,C,M),_}function y(u,b){for(var _=a.malloc(u.length,b),P=u.length,M=0;M=0;--P){if(b[P]!==_)return!1;_*=u[P]}return!0}f.update=function(u,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof u=="object"&&typeof u.shape<"u"){var _=u.dtype;if(i.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var P=gl.getExtension("OES_element_index_uint");P&&_!=="uint16"?_="uint32":_="uint16"}if(_===u.dtype&&v(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,u.data,b):this.length=x(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),b);else{var M=a.malloc(u.size,_),C=o(M,u.shape);n.assign(C,u),b<0?this.length=x(this.gl,this.type,this.length,this.usage,M,b):this.length=x(this.gl,this.type,this.length,this.usage,M.subarray(0,u.size),b),a.free(M)}}else if(Array.isArray(u)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(u,"uint16"):A=y(u,"float32"),b<0?this.length=x(this.gl,this.type,this.length,this.usage,A,b):this.length=x(this.gl,this.type,this.length,this.usage,A.subarray(0,u.length),b),a.free(A)}else if(typeof u=="object"&&typeof u.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,u,b);else if(typeof u=="number"||u===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");u=u|0,u<=0&&(u=1),this.gl.bufferData(this.type,u|0,this.usage),this.length=u}else throw new Error("gl-buffer: Invalid data type")};function T(u,b,_,P){if(_=_||u.ARRAY_BUFFER,P=P||u.DYNAMIC_DRAW,_!==u.ARRAY_BUFFER&&_!==u.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(P!==u.DYNAMIC_DRAW&&P!==u.STATIC_DRAW&&P!==u.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=u.createBuffer(),C=new l(u,_,M,0,P);return C.update(b),C}t.exports=T},2825:function(t){t.exports=e;function e(r,a,n){var o=new Float32Array(3);return o[0]=r,o[1]=a,o[2]=n,o}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(t){t.exports=e;function e(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}},2953:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2];return n*n+o*o+i*i}},2962:function(t,e,r){var a=r(5250),n=r(8210),o=r(3012),i=r(7004),l=6;function f(P,M,C,A){return function(h){return A(P(C(h[0][0],h[1][1]),C(-h[0][1],h[1][0])))}}function x(P,M,C,A){return function(h){return A(P(M(P(C(h[1][1],h[2][2]),C(-h[1][2],h[2][1])),h[0][0]),P(M(P(C(h[1][0],h[2][2]),C(-h[1][2],h[2][0])),-h[0][1]),M(P(C(h[1][0],h[2][1]),C(-h[1][1],h[2][0])),h[0][2]))))}}function y(P,M,C,A){return function(h){return A(P(P(M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][1]),P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),-h[1][2]),M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][3]))),h[0][0]),M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][2]),M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),h[1][3]))),-h[0][1])),P(M(P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][3]))),h[0][2]),M(P(M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][2]))),-h[0][3]))))}}function v(P,M,C,A){return function(h){return A(P(P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][1]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),-h[1][4]))),h[0][0]),M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][4]))),-h[0][1])),P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),-h[1][4]))),h[0][2]),P(M(P(P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][4]))),-h[0][3]),M(P(P(M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][3]))),h[0][4])))))}}function T(P){var M=P===2?f:P===3?x:P===4?y:P===5?v:void 0;return M(n,o,a,i)}var u=[function(){return[0]},function(P){return[P[0][0]]}];function b(P,M,C,A,h,p,k,w){return function(B){switch(B.length){case 0:return P(B);case 1:return M(B);case 2:return C(B);case 3:return A(B);case 4:return h(B);case 5:return p(B)}var O=k[B.length];return O||(O=k[B.length]=w(B.length)),O(B)}}function _(){for(;u.length0){w=x[j][p][0],O=j;break}R=w[O^1];for(var V=0;V<2;++V)for(var H=x[V][p],F=0;F0&&(w=U,R=W,O=V)}return k||w&&u(w,O),R}function _(h,p){var k=x[p][h][0],w=[h];u(k,p);for(var R=k[p^1],O=p;;){for(;R!==h;)w.push(R),R=b(w[w.length-2],R,!1);if(x[0][h].length+x[1][h].length===0)break;var j=w[w.length-1],V=h,H=w[1],F=b(j,V,!0);if(a(i[j],i[V],i[H],i[F])<0)break;w.push(h),R=b(j,V)}return w}function P(h,p){return p[1]===p[p.length-1]}for(var y=0;y0;){x[0][y].length;var A=_(y,M);P(C,A)?C.push.apply(C,A):(C.length>0&&T.push(C),C=A)}C.length>0&&T.push(C)}return T}},3090:function(t,e,r){t.exports=n;var a=r(3250)[3];function n(o){var i=o.length;if(i<3){for(var l=new Array(i),f=0;f1&&a(o[y[b-2]],o[y[b-1]],u)<=0;)b-=1,y.pop();for(y.push(T),b=v.length;b>1&&a(o[v[b-2]],o[v[b-1]],u)>=0;)b-=1,v.pop();v.push(T)}for(var l=new Array(v.length+y.length-2),_=0,f=0,P=y.length;f0;--M)l[_++]=v[M];return l}},3105:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},3126:function(t){t.exports=e;function e(r){var a=new Float32Array(3);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a}},3134:function(t,e,r){t.exports=n;var a=r(1682);function n(o,i){var l=o.length;if(typeof i!="number"){i=0;for(var f=0;f=0}function x(y,v,T,u){var b=a(v,T,u);if(b===0){var _=n(a(y,v,T)),P=n(a(y,v,u));if(_===P){if(_===0){var M=f(y,v,T),C=f(y,v,u);return M===C?0:M?1:-1}return 0}else{if(P===0)return _>0||f(y,v,u)?-1:1;if(_===0)return P>0||f(y,v,T)?1:-1}return n(P-_)}var A=a(y,v,T);if(A>0)return b>0&&a(y,v,u)>0?1:-1;if(A<0)return b>0||a(y,v,u)>0?1:-1;var h=a(y,v,u);return h>0||f(y,v,T)?1:-1}},3202:function(t){t.exports=function(e,r){r||(r=[0,""]),e=String(e);var a=parseFloat(e,10);return r[0]=a,r[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},3233:function(t){var e="",r;t.exports=a;function a(n,o){if(typeof n!="string")throw new TypeError("expected a string");if(o===1)return n;if(o===2)return n+n;var i=n.length*o;if(r!==n||typeof r>"u")r=n,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&o>1;)o&1&&(e+=n),o>>=1,n+=n;return e+=n,e=e.substr(0,i),e}},3236:function(t){t.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),a=[],n=0;n0){if(O<=0)return j;V=R+O}else if(R<0){if(O>=0)return j;V=-(R+O)}else return j;var H=x*V;return j>=H||j<=-H?j:_(p,k,w)},function(p,k,w,R){var O=p[0]-R[0],j=k[0]-R[0],V=w[0]-R[0],H=p[1]-R[1],F=k[1]-R[1],U=w[1]-R[1],W=p[2]-R[2],q=k[2]-R[2],J=w[2]-R[2],lt=j*U,yt=V*F,mt=V*H,st=O*U,tt=O*F,dt=j*H,rt=W*(lt-yt)+q*(mt-st)+J*(tt-dt),at=(Math.abs(lt)+Math.abs(yt))*Math.abs(W)+(Math.abs(mt)+Math.abs(st))*Math.abs(q)+(Math.abs(tt)+Math.abs(dt))*Math.abs(J),vt=y*at;return rt>vt||-rt>vt?rt:P(p,k,w,R)}];function C(p){var k=M[p.length];return k||(k=M[p.length]=b(p.length)),k.apply(void 0,p)}function A(p,k,w,R,O,j,V){return function(H,F,U,W,q){switch(arguments.length){case 0:case 1:return 0;case 2:return R(H,F);case 3:return O(H,F,U);case 4:return j(H,F,U,W);case 5:return V(H,F,U,W,q)}for(var J=new Array(arguments.length),lt=0;lt4)throw new n("","Invalid data type");switch(W.charAt(0)){case"b":case"i":f["uniform"+q+"iv"](v[O],j);break;case"v":f["uniform"+q+"fv"](v[O],j);break;default:throw new n("","Unrecognized data type for vector "+name+": "+W)}}else if(W.indexOf("mat")===0&&W.length===4){if(q=W.charCodeAt(W.length-1)-48,q<2||q>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+W);f["uniformMatrix"+q+"fv"](v[O],!1,j);break}else throw new n("","Unknown uniform data type for "+name+": "+W)}}}}}function b(A,h){if(typeof h!="object")return[[A,h]];var p=[];for(var k in h){var w=h[k],R=A;parseInt(k)+""===k?R+="["+k+"]":R+="."+k,typeof w=="object"?p.push.apply(p,b(R,w)):p.push([R,w])}return p}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=A.indexOf("vec");if(0<=h&&h<=1&&A.length===4+h){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type");return A.charAt(0)==="b"?i(p,!1):i(p,0)}else if(A.indexOf("mat")===0&&A.length===4){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+A);return i(p*p,0)}else throw new n("","Unknown uniform data type for "+name+": "+A)}}function P(A,h,p){if(typeof p=="object"){var k=M(p);Object.defineProperty(A,h,{get:o(k),set:u(p),enumerable:!0,configurable:!1})}else v[p]?Object.defineProperty(A,h,{get:T(p),set:u(p),enumerable:!0,configurable:!1}):A[h]=_(y[p].type)}function M(A){var h;if(Array.isArray(A)){h=new Array(A.length);for(var p=0;p=0!=h>=0&&v.push(_[0]+.5+.5*(A+h)/(A-h))}y+=C,++_[0]}}}function r(){return e()}var a=r;function n(l){var f={};return function(x,y,v){var T=x.dtype,u=x.order,b=[T,u.join()].join(),_=f[b];return _||(f[b]=_=l([T,u])),_(x.shape.slice(0),x.data,x.stride,x.offset|0,y,v)}}function o(l){return n(a.bind(void 0,l))}function i(l){return o({funcName:l.funcName})}t.exports=i({funcName:"zeroCrossings"})},3352:function(t,e,r){var a=r(2478),n=0,o=1,i=2;t.exports=k;function l(w,R,O,j,V){this.mid=w,this.left=R,this.right=O,this.leftPoints=j,this.rightPoints=V,this.count=(R?R.count:0)+(O?O.count:0)+j.length}var f=l.prototype;function x(w,R){w.mid=R.mid,w.left=R.left,w.right=R.right,w.leftPoints=R.leftPoints,w.rightPoints=R.rightPoints,w.count=R.count}function y(w,R){var O=A(R);w.mid=O.mid,w.left=O.left,w.right=O.right,w.leftPoints=O.leftPoints,w.rightPoints=O.rightPoints,w.count=O.count}function v(w,R){var O=w.intervals([]);O.push(R),y(w,O)}function T(w,R){var O=w.intervals([]),j=O.indexOf(R);return j<0?n:(O.splice(j,1),y(w,O),o)}f.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},f.insert=function(w){var R=this.count-this.leftPoints.length;if(this.count+=1,w[1]3*(R+1)?v(this,w):this.left.insert(w):this.left=A([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?v(this,w):this.right.insert(w):this.right=A([w]);else{var O=a.ge(this.leftPoints,w,M),j=a.ge(this.rightPoints,w,C);this.leftPoints.splice(O,0,w),this.rightPoints.splice(j,0,w)}},f.remove=function(w){var R=this.count-this.leftPoints;if(w[1]3*(R-1))return T(this,w);var j=this.left.remove(w);return j===i?(this.left=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else if(w[0]>this.mid){if(!this.right)return n;var V=this.left?this.left.count:0;if(4*V>3*(R-1))return T(this,w);var j=this.right.remove(w);return j===i?(this.right=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else{if(this.count===1)return this.leftPoints[0]===w?i:n;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var H=this,F=this.left;F.right;)H=F,F=F.right;if(H===this)F.right=this.right;else{var U=this.left,j=this.right;H.count-=F.count,H.right=F.left,F.left=U,F.right=j}x(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return o}for(var U=a.ge(this.leftPoints,w,M);U=0&&w[j][1]>=R;--j){var V=O(w[j]);if(V)return V}}function _(w,R){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(w,R);if(O)return O}return b(this.rightPoints,w,R)}else return _(this.leftPoints,R)},f.queryInterval=function(w,R,O){if(wthis.mid&&this.right){var j=this.right.queryInterval(w,R,O);if(j)return j}return Rthis.mid?b(this.rightPoints,w,O):_(this.leftPoints,O)};function P(w,R){return w-R}function M(w,R){var O=w[0]-R[0];return O||w[1]-R[1]}function C(w,R){var O=w[1]-R[1];return O||w[0]-R[0]}function A(w){if(w.length===0)return null;for(var R=[],O=0;O>1],V=[],H=[],F=[],O=0;O=0),C.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,C.width?parseInt(C.width):0);break;case"e":b=C.precision?parseFloat(b).toExponential(C.precision):parseFloat(b).toExponential();break;case"f":b=C.precision?parseFloat(b).toFixed(C.precision):parseFloat(b);break;case"g":b=C.precision?String(Number(b.toPrecision(C.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=C.precision?b.substring(0,C.precision):b;break;case"t":b=String(!!b),b=C.precision?b.substring(0,C.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=C.precision?b.substring(0,C.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=C.precision?b.substring(0,C.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}n.json.test(C.type)?_+=b:(n.number.test(C.type)&&(!k||C.sign)?(w=k?"+":"-",b=b.toString().replace(n.sign,"")):w="",h=C.pad_char?C.pad_char==="0"?"0":C.pad_char.charAt(1):" ",p=C.width-(w+b).length,A=C.width&&p>0?h.repeat(p):"",_+=C.align?w+b+A:h==="0"?w+A+b:A+w+b)}return _}var f=Object.create(null);function x(y){if(f[y])return f[y];for(var v=y,T,u=[],b=0;v;){if((T=n.text.exec(v))!==null)u.push(T[0]);else if((T=n.modulo.exec(v))!==null)u.push("%");else if((T=n.placeholder.exec(v))!==null){if(T[2]){b|=1;var _=[],P=T[2],M=[];if((M=n.key.exec(P))!==null)for(_.push(M[1]);(P=P.substring(M[0].length))!=="";)if((M=n.key_access.exec(P))!==null)_.push(M[1]);else if((M=n.index_access.exec(P))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=_}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return f[y]=u}e.sprintf=o,e.vsprintf=i,typeof window<"u"&&(window.sprintf=o,window.vsprintf=i,a=(function(){return{sprintf:o,vsprintf:i}}).call(e,r,e,t),a!==void 0&&(t.exports=a))})()},3390:function(t){t.exports=e;function e(r,a,n,o){var i=new Float32Array(4);return i[0]=r,i[1]=a,i[2]=n,i[3]=o,i}},3436:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision highp float; +`,k)}}return{long:u.trim(),short:b.trim()}}},3012:function(t,e,r){var a=r(5250),n=r(9362);t.exports=o;function o(i,l){var f=i.length;if(f===1){var x=a(i[0],l);return x[0]?x:[x[1]]}var y=new Array(2*f),v=[.1,.1],T=[.1,.1],u=0;a(i[0],l,v),v[0]&&(y[u++]=v[0]);for(var b=1;b0){w=x[j][p][0],O=j;break}B=w[O^1];for(var V=0;V<2;++V)for(var H=x[V][p],F=0;F0&&(w=U,B=W,O=V)}return k||w&&u(w,O),B}function _(h,p){var k=x[p][h][0],w=[h];u(k,p);for(var B=k[p^1],O=p;;){for(;B!==h;)w.push(B),B=b(w[w.length-2],B,!1);if(x[0][h].length+x[1][h].length===0)break;var j=w[w.length-1],V=h,H=w[1],F=b(j,V,!0);if(a(i[j],i[V],i[H],i[F])<0)break;w.push(h),B=b(j,V)}return w}function P(h,p){return p[1]===p[p.length-1]}for(var y=0;y0;){x[0][y].length;var A=_(y,M);P(C,A)?C.push.apply(C,A):(C.length>0&&T.push(C),C=A)}C.length>0&&T.push(C)}return T}},3090:function(t,e,r){t.exports=n;var a=r(3250)[3];function n(o){var i=o.length;if(i<3){for(var l=new Array(i),f=0;f1&&a(o[y[b-2]],o[y[b-1]],u)<=0;)b-=1,y.pop();for(y.push(T),b=v.length;b>1&&a(o[v[b-2]],o[v[b-1]],u)>=0;)b-=1,v.pop();v.push(T)}for(var l=new Array(v.length+y.length-2),_=0,f=0,P=y.length;f0;--M)l[_++]=v[M];return l}},3105:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},3126:function(t){t.exports=e;function e(r){var a=new Float32Array(3);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a}},3134:function(t,e,r){t.exports=n;var a=r(1682);function n(o,i){var l=o.length;if(typeof i!="number"){i=0;for(var f=0;f=0}function x(y,v,T,u){var b=a(v,T,u);if(b===0){var _=n(a(y,v,T)),P=n(a(y,v,u));if(_===P){if(_===0){var M=f(y,v,T),C=f(y,v,u);return M===C?0:M?1:-1}return 0}else{if(P===0)return _>0||f(y,v,u)?-1:1;if(_===0)return P>0||f(y,v,T)?1:-1}return n(P-_)}var A=a(y,v,T);if(A>0)return b>0&&a(y,v,u)>0?1:-1;if(A<0)return b>0||a(y,v,u)>0?1:-1;var h=a(y,v,u);return h>0||f(y,v,T)?1:-1}},3202:function(t){t.exports=function(e,r){r||(r=[0,""]),e=String(e);var a=parseFloat(e,10);return r[0]=a,r[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},3233:function(t){var e="",r;t.exports=a;function a(n,o){if(typeof n!="string")throw new TypeError("expected a string");if(o===1)return n;if(o===2)return n+n;var i=n.length*o;if(r!==n||typeof r>"u")r=n,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&o>1;)o&1&&(e+=n),o>>=1,n+=n;return e+=n,e=e.substr(0,i),e}},3236:function(t){t.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),a=[],n=0;n0){if(O<=0)return j;V=B+O}else if(B<0){if(O>=0)return j;V=-(B+O)}else return j;var H=x*V;return j>=H||j<=-H?j:_(p,k,w)},function(p,k,w,B){var O=p[0]-B[0],j=k[0]-B[0],V=w[0]-B[0],H=p[1]-B[1],F=k[1]-B[1],U=w[1]-B[1],W=p[2]-B[2],q=k[2]-B[2],J=w[2]-B[2],lt=j*U,yt=V*F,mt=V*H,st=O*U,tt=O*F,pt=j*H,rt=W*(lt-yt)+q*(mt-st)+J*(tt-pt),at=(Math.abs(lt)+Math.abs(yt))*Math.abs(W)+(Math.abs(mt)+Math.abs(st))*Math.abs(q)+(Math.abs(tt)+Math.abs(pt))*Math.abs(J),vt=y*at;return rt>vt||-rt>vt?rt:P(p,k,w,B)}];function C(p){var k=M[p.length];return k||(k=M[p.length]=b(p.length)),k.apply(void 0,p)}function A(p,k,w,B,O,j,V){return function(H,F,U,W,q){switch(arguments.length){case 0:case 1:return 0;case 2:return B(H,F);case 3:return O(H,F,U);case 4:return j(H,F,U,W);case 5:return V(H,F,U,W,q)}for(var J=new Array(arguments.length),lt=0;lt4)throw new n("","Invalid data type");switch(W.charAt(0)){case"b":case"i":f["uniform"+q+"iv"](v[O],j);break;case"v":f["uniform"+q+"fv"](v[O],j);break;default:throw new n("","Unrecognized data type for vector "+name+": "+W)}}else if(W.indexOf("mat")===0&&W.length===4){if(q=W.charCodeAt(W.length-1)-48,q<2||q>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+W);f["uniformMatrix"+q+"fv"](v[O],!1,j);break}else throw new n("","Unknown uniform data type for "+name+": "+W)}}}}}function b(A,h){if(typeof h!="object")return[[A,h]];var p=[];for(var k in h){var w=h[k],B=A;parseInt(k)+""===k?B+="["+k+"]":B+="."+k,typeof w=="object"?p.push.apply(p,b(B,w)):p.push([B,w])}return p}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=A.indexOf("vec");if(0<=h&&h<=1&&A.length===4+h){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type");return A.charAt(0)==="b"?i(p,!1):i(p,0)}else if(A.indexOf("mat")===0&&A.length===4){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+A);return i(p*p,0)}else throw new n("","Unknown uniform data type for "+name+": "+A)}}function P(A,h,p){if(typeof p=="object"){var k=M(p);Object.defineProperty(A,h,{get:o(k),set:u(p),enumerable:!0,configurable:!1})}else v[p]?Object.defineProperty(A,h,{get:T(p),set:u(p),enumerable:!0,configurable:!1}):A[h]=_(y[p].type)}function M(A){var h;if(Array.isArray(A)){h=new Array(A.length);for(var p=0;p=0!=h>=0&&v.push(_[0]+.5+.5*(A+h)/(A-h))}y+=C,++_[0]}}}function r(){return e()}var a=r;function n(l){var f={};return function(x,y,v){var T=x.dtype,u=x.order,b=[T,u.join()].join(),_=f[b];return _||(f[b]=_=l([T,u])),_(x.shape.slice(0),x.data,x.stride,x.offset|0,y,v)}}function o(l){return n(a.bind(void 0,l))}function i(l){return o({funcName:l.funcName})}t.exports=i({funcName:"zeroCrossings"})},3352:function(t,e,r){var a=r(2478),n=0,o=1,i=2;t.exports=k;function l(w,B,O,j,V){this.mid=w,this.left=B,this.right=O,this.leftPoints=j,this.rightPoints=V,this.count=(B?B.count:0)+(O?O.count:0)+j.length}var f=l.prototype;function x(w,B){w.mid=B.mid,w.left=B.left,w.right=B.right,w.leftPoints=B.leftPoints,w.rightPoints=B.rightPoints,w.count=B.count}function y(w,B){var O=A(B);w.mid=O.mid,w.left=O.left,w.right=O.right,w.leftPoints=O.leftPoints,w.rightPoints=O.rightPoints,w.count=O.count}function v(w,B){var O=w.intervals([]);O.push(B),y(w,O)}function T(w,B){var O=w.intervals([]),j=O.indexOf(B);return j<0?n:(O.splice(j,1),y(w,O),o)}f.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},f.insert=function(w){var B=this.count-this.leftPoints.length;if(this.count+=1,w[1]3*(B+1)?v(this,w):this.left.insert(w):this.left=A([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(B+1)?v(this,w):this.right.insert(w):this.right=A([w]);else{var O=a.ge(this.leftPoints,w,M),j=a.ge(this.rightPoints,w,C);this.leftPoints.splice(O,0,w),this.rightPoints.splice(j,0,w)}},f.remove=function(w){var B=this.count-this.leftPoints;if(w[1]3*(B-1))return T(this,w);var j=this.left.remove(w);return j===i?(this.left=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else if(w[0]>this.mid){if(!this.right)return n;var V=this.left?this.left.count:0;if(4*V>3*(B-1))return T(this,w);var j=this.right.remove(w);return j===i?(this.right=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else{if(this.count===1)return this.leftPoints[0]===w?i:n;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var H=this,F=this.left;F.right;)H=F,F=F.right;if(H===this)F.right=this.right;else{var U=this.left,j=this.right;H.count-=F.count,H.right=F.left,F.left=U,F.right=j}x(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return o}for(var U=a.ge(this.leftPoints,w,M);U=0&&w[j][1]>=B;--j){var V=O(w[j]);if(V)return V}}function _(w,B){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(w,B);if(O)return O}return b(this.rightPoints,w,B)}else return _(this.leftPoints,B)},f.queryInterval=function(w,B,O){if(wthis.mid&&this.right){var j=this.right.queryInterval(w,B,O);if(j)return j}return Bthis.mid?b(this.rightPoints,w,O):_(this.leftPoints,O)};function P(w,B){return w-B}function M(w,B){var O=w[0]-B[0];return O||w[1]-B[1]}function C(w,B){var O=w[1]-B[1];return O||w[0]-B[0]}function A(w){if(w.length===0)return null;for(var B=[],O=0;O>1],V=[],H=[],F=[],O=0;O=0),C.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,C.width?parseInt(C.width):0);break;case"e":b=C.precision?parseFloat(b).toExponential(C.precision):parseFloat(b).toExponential();break;case"f":b=C.precision?parseFloat(b).toFixed(C.precision):parseFloat(b);break;case"g":b=C.precision?String(Number(b.toPrecision(C.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=C.precision?b.substring(0,C.precision):b;break;case"t":b=String(!!b),b=C.precision?b.substring(0,C.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=C.precision?b.substring(0,C.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=C.precision?b.substring(0,C.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}n.json.test(C.type)?_+=b:(n.number.test(C.type)&&(!k||C.sign)?(w=k?"+":"-",b=b.toString().replace(n.sign,"")):w="",h=C.pad_char?C.pad_char==="0"?"0":C.pad_char.charAt(1):" ",p=C.width-(w+b).length,A=C.width&&p>0?h.repeat(p):"",_+=C.align?w+b+A:h==="0"?w+A+b:A+w+b)}return _}var f=Object.create(null);function x(y){if(f[y])return f[y];for(var v=y,T,u=[],b=0;v;){if((T=n.text.exec(v))!==null)u.push(T[0]);else if((T=n.modulo.exec(v))!==null)u.push("%");else if((T=n.placeholder.exec(v))!==null){if(T[2]){b|=1;var _=[],P=T[2],M=[];if((M=n.key.exec(P))!==null)for(_.push(M[1]);(P=P.substring(M[0].length))!=="";)if((M=n.key_access.exec(P))!==null)_.push(M[1]);else if((M=n.index_access.exec(P))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=_}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return f[y]=u}e.sprintf=o,e.vsprintf=i,typeof window<"u"&&(window.sprintf=o,window.vsprintf=i,a=(function(){return{sprintf:o,vsprintf:i}}).call(e,r,e,t),a!==void 0&&(t.exports=a))})()},3390:function(t){t.exports=e;function e(r,a,n,o){var i=new Float32Array(4);return i[0]=r,i[1]=a,i[2]=n,i[3]=o,i}},3436:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -1690,11 +1690,11 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);t.exports=function(l){return n(l,o,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(t,e,r){t.exports=o;var a=r(5995),n=r(9127);function o(i,l){return n(a(i,l))}},3508:function(t,e,r){var a=r(6852);a=a.slice().filter(function(n){return!/^(gl\_|texture)/.test(n)}),t.exports=a.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(t){t.exports=e;function e(r,a){var n=a[0],o=a[1],i=a[2],l=n*n+o*o+i*i;return l>0&&(l=1/Math.sqrt(l),r[0]=a[0]*l,r[1]=a[1]*l,r[2]=a[2]*l),r}},3545:function(t,e,r){t.exports=l;var a=r(8105),n=a("loy&&T[A+x]>M;--C,A-=b){for(var h=A,p=A+b,k=0;k>>1,M=2*f,C=P,A=T[M*P+x];b<_;){if(_-b=R?(C=w,A=R):k>=j?(C=p,A=k):(C=O,A=j):R>=j?(C=w,A=R):j>=k?(C=p,A=k):(C=O,A=j);for(var V=M*(_-1),H=M*C,F=0;Fthis.buffer.length){n.free(this.buffer);for(var _=this.buffer=n.mallocUint8(i(b*u*4)),P=0;PM|0},vertex:function(b,_,P,M,C,A,h,p,k,w,R,O,j){var V=(h<<0)+(p<<1)+(k<<2)+(w<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([b-.5,_-.5]);break;case 1:R.push([b-.25-.25*(M+P-2*j)/(P-M),_-.25-.25*(C+P-2*j)/(P-C)]);break;case 2:R.push([b-.75-.25*(-M-P+2*j)/(M-P),_-.25-.25*(A+M-2*j)/(M-A)]);break;case 3:R.push([b-.5,_-.5-.5*(C+P+A+M-4*j)/(P-C+M-A)]);break;case 4:R.push([b-.25-.25*(A+C-2*j)/(C-A),_-.75-.25*(-C-P+2*j)/(C-P)]);break;case 5:R.push([b-.5-.5*(M+P+A+C-4*j)/(P-M+C-A),_-.5]);break;case 6:R.push([b-.5-.25*(-M-P+A+C)/(M-P+C-A),_-.5-.25*(-C-P+A+M)/(C-P+M-A)]);break;case 7:R.push([b-.75-.25*(A+C-2*j)/(C-A),_-.75-.25*(A+M-2*j)/(M-A)]);break;case 8:R.push([b-.75-.25*(-A-C+2*j)/(A-C),_-.75-.25*(-A-M+2*j)/(A-M)]);break;case 9:R.push([b-.5-.25*(M+P+-A-C)/(P-M+A-C),_-.5-.25*(C+P+-A-M)/(P-C+A-M)]);break;case 10:R.push([b-.5-.5*(-M-P+-A-C+4*j)/(M-P+A-C),_-.5]);break;case 11:R.push([b-.25-.25*(-A-C+2*j)/(A-C),_-.75-.25*(C+P-2*j)/(P-C)]);break;case 12:R.push([b-.5,_-.5-.5*(-C-P+-A-M+4*j)/(C-P+A-M)]);break;case 13:R.push([b-.75-.25*(M+P-2*j)/(P-M),_-.25-.25*(-A-M+2*j)/(A-M)]);break;case 14:R.push([b-.25-.25*(-M-P+2*j)/(M-P),_-.25-.25*(-C-P+2*j)/(C-P)]);break;case 15:R.push([b-.5,_-.5]);break}},cell:function(b,_,P,M,C,A,h,p,k){C?p.push([b,_]):p.push([_,b])}});return function(b,_){var P=[],M=[];return u(b,P,M,_),{positions:P,cells:M}}}};function i(y,v){var T=y.length+"d",u=o[T];if(u)return u(a,y,v)}function l(y,v){for(var T=n(y,v),u=T.length,b=new Array(u),_=new Array(u),P=0;P>1,T=-7,u=n?i-1:0,b=n?-1:1,_=r[a+u];for(u+=b,l=_&(1<<-T)-1,_>>=-T,T+=x;T>0;l=l*256+r[a+u],u+=b,T-=8);for(f=l&(1<<-T)-1,l>>=-T,T+=o;T>0;f=f*256+r[a+u],u+=b,T-=8);if(l===0)l=1-v;else{if(l===y)return f?NaN:(_?-1:1)*(1/0);f=f+Math.pow(2,o),l=l-v}return(_?-1:1)*f*Math.pow(2,l-o)},e.write=function(r,a,n,o,i,l){var f,x,y,v=l*8-i-1,T=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:l-1,P=o?1:-1,M=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(x=isNaN(a)?1:0,f=T):(f=Math.floor(Math.log(a)/Math.LN2),a*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+u>=1?a+=b/y:a+=b*Math.pow(2,1-u),a*y>=2&&(f++,y/=2),f+u>=T?(x=0,f=T):f+u>=1?(x=(a*y-1)*Math.pow(2,i),f=f+u):(x=a*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;r[n+_]=x&255,_+=P,x/=256,i-=8);for(f=f<0;r[n+_]=f&255,_+=P,f/=256,v-=8);r[n+_-P]|=M*128}},3788:function(t,e,r){var a=r(8507),n=r(2419);t.exports=o;function o(i,l){return a(i,l)||n(i)-n(l)}},3837:function(t,e,r){t.exports=O;var a=r(4935),n=r(501),o=r(5304),i=r(6429),l=r(6444),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,y=DataView;function v(j){return x.isView(j)&&!(j instanceof y)}function T(j){return Array.isArray(j)||v(j)}function u(j,V){return j[0]=V[0],j[1]=V[1],j[2]=V[2],j}function b(j){this.gl=j,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=o(j)}var _=b.prototype;_.update=function(j){j=j||{};function V(at,vt,it){if(it in j){var Y=j[it],ft=this[it],ut;(at?T(Y)&&T(Y[0]):T(Y))?this[it]=ut=[vt(Y[0]),vt(Y[1]),vt(Y[2])]:this[it]=ut=[vt(Y),vt(Y),vt(Y)];for(var kt=0;kt<3;++kt)if(ut[kt]!==ft[kt])return!0}return!1}var H=V.bind(this,!1,Number),F=V.bind(this,!1,Boolean),U=V.bind(this,!1,String),W=V.bind(this,!0,function(at){if(T(at)){if(at.length===3)return[+at[0],+at[1],+at[2],1];if(at.length===4)return[+at[0],+at[1],+at[2],+at[3]]}return[0,0,0,1]}),q,J=!1,lt=!1;if("bounds"in j)for(var yt=j.bounds,mt=0;mt<2;++mt)for(var st=0;st<3;++st)yt[mt][st]!==this.bounds[mt][st]&&(lt=!0),this.bounds[mt][st]=yt[mt][st];if("ticks"in j){q=j.ticks,J=!0,this.autoTicks=!1;for(var mt=0;mt<3;++mt)this.tickSpacing[mt]=0}else H("tickSpacing")&&(this.autoTicks=!0,lt=!0);if(this._firstInit&&("ticks"in j||"tickSpacing"in j||(this.autoTicks=!0),lt=!0,J=!0,this._firstInit=!1),lt&&this.autoTicks&&(q=l.create(this.bounds,this.tickSpacing),J=!0),J){for(var mt=0;mt<3;++mt)q[mt].sort(function(vt,it){return vt.x-it.x});l.equal(q,this.ticks)?J=!1:this.ticks=q}F("tickEnable"),U("tickFont")&&(J=!0),U("tickFontStyle")&&(J=!0),U("tickFontWeight")&&(J=!0),U("tickFontVariant")&&(J=!0),H("tickSize"),H("tickAngle"),H("tickPad"),W("tickColor");var tt=U("labels");U("labelFont")&&(tt=!0),U("labelFontStyle")&&(tt=!0),U("labelFontWeight")&&(tt=!0),U("labelFontVariant")&&(tt=!0),F("labelEnable"),H("labelSize"),H("labelPad"),W("labelColor"),F("lineEnable"),F("lineMirror"),H("lineWidth"),W("lineColor"),F("lineTickEnable"),F("lineTickMirror"),H("lineTickLength"),H("lineTickWidth"),W("lineTickColor"),F("gridEnable"),H("gridWidth"),W("gridColor"),F("zeroEnable"),W("zeroLineColor"),H("zeroLineWidth"),F("backgroundEnable"),W("backgroundColor");var dt=[{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]}],rt=[{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&&(tt||J)&&this._text.update(this.bounds,this.labels,dt,this.ticks,rt):this._text=a(this.gl,this.bounds,this.labels,dt,this.ticks,rt),this._lines&&J&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};function P(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new P,new P,new P];function C(j,V,H,F,U){for(var W=j.primalOffset,q=j.primalMinor,J=j.mirrorOffset,lt=j.mirrorMinor,yt=F[V],mt=0;mt<3;++mt)if(V!==mt){var st=W,tt=J,dt=q,rt=lt;yt&1<0?(dt[mt]=-1,rt[mt]=0):(dt[mt]=0,rt[mt]=1)}}var A=[0,0,0],h={model:f,view:f,projection:f,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(j){};var p=0,k=[0,0,0],w=[0,0,0],R=[0,0,0];_.draw=function(j){j=j||h;for(var V=this.gl,H=j.model||f,F=j.view||f,U=j.projection||f,W=this.bounds,q=j._ortho||!1,J=i(H,F,U,W,q),lt=J.cubeEdges,yt=J.axis,mt=F[12],st=F[13],tt=F[14],dt=F[15],rt=q?2:1,at=rt*this.pixelRatio*(U[3]*mt+U[7]*st+U[11]*tt+U[15]*dt)/V.drawingBufferHeight,vt=0;vt<3;++vt)this.lastCubeProps.cubeEdges[vt]=lt[vt],this.lastCubeProps.axis[vt]=yt[vt];for(var it=M,vt=0;vt<3;++vt)C(M[vt],vt,this.bounds,lt,yt);for(var V=this.gl,Y=A,vt=0;vt<3;++vt)this.backgroundEnable[vt]?Y[vt]=yt[vt]:Y[vt]=0;this._background.draw(H,F,U,W,Y,this.backgroundColor),this._lines.bind(H,F,U,this);for(var vt=0;vt<3;++vt){var ft=[0,0,0];yt[vt]>0?ft[vt]=W[1][vt]:ft[vt]=W[0][vt];for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.gridEnable[kt]&&this._lines.drawGrid(kt,It,this.bounds,ft,this.gridColor[kt],this.gridWidth[kt]*this.pixelRatio)}for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.zeroEnable[It]&&Math.min(W[0][It],W[1][It])<=0&&Math.max(W[0][It],W[1][It])>=0&&this._lines.drawZero(kt,It,this.bounds,ft,this.zeroLineColor[It],this.zeroLineWidth[It]*this.pixelRatio)}}for(var vt=0;vt<3;++vt){this.lineEnable[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].primalOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio),this.lineMirror[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].mirrorOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio);for(var Pt=u(k,it[vt].primalMinor),qt=u(w,it[vt].mirrorMinor),Wt=this.lineTickLength,ut=0;ut<3;++ut){var Jt=at/H[5*ut];Pt[ut]*=Wt[ut]*Jt,qt[ut]*=Wt[ut]*Jt}this.lineTickEnable[vt]&&this._lines.drawAxisTicks(vt,it[vt].primalOffset,Pt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio),this.lineTickMirror[vt]&&this._lines.drawAxisTicks(vt,it[vt].mirrorOffset,qt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,F,U,this.pixelRatio);var ge,fe=.5,pe,se;function Tt(Te){se=[0,0,0],se[Te]=1}function Lt(Te,He,Ge){var cr=(Te+1)%3,ur=(Te+2)%3,jr=He[cr],Wr=He[ur],br=Ge[cr],Xr=Ge[ur];if(jr>0&&Xr>0){Tt(cr);return}else if(jr>0&&Xr<0){Tt(cr);return}else if(jr<0&&Xr>0){Tt(cr);return}else if(jr<0&&Xr<0){Tt(cr);return}else if(Wr>0&&br>0){Tt(ur);return}else if(Wr>0&&br<0){Tt(ur);return}else if(Wr<0&&br>0){Tt(ur);return}else if(Wr<0&&br<0){Tt(ur);return}}for(var vt=0;vt<3;++vt){for(var Mt=it[vt].primalMinor,ee=it[vt].mirrorMinor,ve=u(R,it[vt].primalOffset),ut=0;ut<3;++ut)this.lineTickEnable[vt]&&(ve[ut]+=at*Mt[ut]*Math.max(this.lineTickLength[ut],0)/H[5*ut]);var oe=[0,0,0];if(oe[vt]=1,this.tickEnable[vt]){this.tickAngle[vt]===-3600?(this.tickAngle[vt]=0,this.tickAlign[vt]="auto"):this.tickAlign[vt]=-1,pe=1,ge=[this.tickAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]),se=[0,0,0],Lt(vt,Mt,ee);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.tickPad[ut]/H[5*ut];this._text.drawTicks(vt,this.tickSize[vt],this.tickAngle[vt],ve,this.tickColor[vt],oe,se,ge)}if(this.labelEnable[vt]){pe=0,se=[0,0,0],this.labels[vt].length>4&&(Tt(vt),pe=1),ge=[this.labelAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.labelPad[ut]/H[5*ut];ve[vt]+=.5*(W[0][vt]+W[1][vt]),this._text.drawLabel(vt,this.labelSize[vt],this.labelAngle[vt],ve,this.labelColor[vt],[0,0,0],se,ge)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(j,V){var H=new b(j);return H.update(V),H}},3840:function(t){t.exports=M;var e=0,r=1;function a(C,A,h,p,k,w){this._color=C,this.key=A,this.value=h,this.left=p,this.right=k,this._count=w}function n(C){return new a(C._color,C.key,C.value,C.left,C.right,C._count)}function o(C,A){return new a(C,A.key,A.value,A.left,A.right,A._count)}function i(C){C._count=1+(C.left?C.left._count:0)+(C.right?C.right._count:0)}function l(C,A){this._compare=C,this.root=A}var f=l.prototype;Object.defineProperty(f,"keys",{get:function(){var C=[];return this.forEach(function(A,h){C.push(A)}),C}}),Object.defineProperty(f,"values",{get:function(){var C=[];return this.forEach(function(A,h){C.push(h)}),C}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(C,A){for(var h=this._compare,p=this.root,k=[],w=[];p;){var R=h(C,p.key);k.push(p),w.push(R),R<=0?p=p.left:p=p.right}k.push(new a(e,C,A,null,null,1));for(var O=k.length-2;O>=0;--O){var p=k[O];w[O]<=0?k[O]=new a(p._color,p.key,p.value,k[O+1],p.right,p._count+1):k[O]=new a(p._color,p.key,p.value,p.left,k[O+1],p._count+1)}for(var O=k.length-1;O>1;--O){var j=k[O-1],p=k[O];if(j._color===r||p._color===r)break;var V=k[O-2];if(V.left===j)if(j.left===p){var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.left=j.right,j._color=r,j.right=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.left===V?F.left=j:F.right=j}break}}else{var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(j.right=p.left,V._color=e,V.left=p.right,p._color=r,p.left=j,p.right=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.left===V?F.left=p:F.right=p}break}}else if(j.right===p){var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.right=j.left,j._color=r,j.left=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.right===V?F.right=j:F.left=j}break}}else{var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(j.left=p.right,V._color=e,V.right=p.left,p._color=r,p.right=j,p.left=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.right===V?F.right=p:F.left=p}break}}}return k[0]._color=r,new l(h,k[0])};function x(C,A){if(A.left){var h=x(C,A.left);if(h)return h}var h=C(A.key,A.value);if(h)return h;if(A.right)return x(C,A.right)}function y(C,A,h,p){var k=A(C,p.key);if(k<=0){if(p.left){var w=y(C,A,h,p.left);if(w)return w}var w=h(p.key,p.value);if(w)return w}if(p.right)return y(C,A,h,p.right)}function v(C,A,h,p,k){var w=h(C,k.key),R=h(A,k.key),O;if(w<=0&&(k.left&&(O=v(C,A,h,p,k.left),O)||R>0&&(O=p(k.key,k.value),O)))return O;if(R>0&&k.right)return v(C,A,h,p,k.right)}f.forEach=function(C,A,h){if(this.root)switch(arguments.length){case 1:return x(C,this.root);case 2:return y(A,this._compare,C,this.root);case 3:return this._compare(A,h)>=0?void 0:v(A,h,this._compare,C,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.left;return new T(this,C)}}),Object.defineProperty(f,"end",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.right;return new T(this,C)}}),f.at=function(C){if(C<0)return new T(this,[]);for(var A=this.root,h=[];;){if(h.push(A),A.left){if(C=A.right._count)break;A=A.right}else break}return new T(this,[])},f.ge=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<=0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.gt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.lt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.le=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>=0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.find=function(C){for(var A=this._compare,h=this.root,p=[];h;){var k=A(C,h.key);if(p.push(h),k===0)return new T(this,p);k<=0?h=h.left:h=h.right}return new T(this,[])},f.remove=function(C){var A=this.find(C);return A?A.remove():this},f.get=function(C){for(var A=this._compare,h=this.root;h;){var p=A(C,h.key);if(p===0)return h.value;p<=0?h=h.left:h=h.right}};function T(C,A){this.tree=C,this._stack=A}var u=T.prototype;Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new T(this.tree,this._stack.slice())};function b(C,A){C.key=A.key,C.value=A.value,C.left=A.left,C.right=A.right,C._color=A._color,C._count=A._count}function _(C){for(var A,h,p,k,w=C.length-1;w>=0;--w){if(A=C[w],w===0){A._color=r;return}if(h=C[w-1],h.left===A){if(p=h.right,p.right&&p.right._color===e){if(p=h.right=n(p),k=p.right=n(p.right),h.right=p.left,p.left=h,p.right=k,p._color=h._color,A._color=r,h._color=r,k._color=r,i(h),i(p),w>1){var R=C[w-2];R.left===h?R.left=p:R.right=p}C[w-1]=p;return}else if(p.left&&p.left._color===e){if(p=h.right=n(p),k=p.left=n(p.left),h.right=k.left,p.left=k.right,k.left=h,k.right=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=C[w-2];R.left===h?R.left=k:R.right=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.right=o(e,p);return}else{h.right=o(e,p);continue}else{if(p=n(p),h.right=p.left,p.left=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=C[w-2];R.left===h?R.left=p:R.right=p}C[w-1]=p,C[w]=h,w+11){var R=C[w-2];R.right===h?R.right=p:R.left=p}C[w-1]=p;return}else if(p.right&&p.right._color===e){if(p=h.left=n(p),k=p.right=n(p.right),h.left=k.right,p.right=k.left,k.right=h,k.left=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=C[w-2];R.right===h?R.right=k:R.left=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.left=o(e,p);return}else{h.left=o(e,p);continue}else{if(p=n(p),h.left=p.right,p.right=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=C[w-2];R.right===h?R.right=p:R.left=p}C[w-1]=p,C[w]=h,w+1=0;--p){var h=C[p];h.left===C[p+1]?A[p]=new a(h._color,h.key,h.value,A[p+1],h.right,h._count):A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count)}if(h=A[A.length-1],h.left&&h.right){var k=A.length;for(h=h.left;h.right;)A.push(h),h=h.right;var w=A[k-1];A.push(new a(h._color,w.key,w.value,h.left,h.right,h._count)),A[k-1].key=h.key,A[k-1].value=h.value;for(var p=A.length-2;p>=k;--p)h=A[p],A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count);A[k-1].left=A[k]}if(h=A[A.length-1],h._color===e){var R=A[A.length-2];R.left===h?R.left=null:R.right===h&&(R.right=null),A.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var C=0,A=this._stack;if(A.length===0){var h=this.tree.root;return h?h._count:0}else A[A.length-1].left&&(C=A[A.length-1].left._count);for(var p=A.length-2;p>=0;--p)A[p+1]===A[p].right&&(++C,A[p].left&&(C+=A[p].left._count));return C},enumerable:!0}),u.next=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.right)for(A=A.right;A;)C.push(A),A=A.left;else for(C.pop();C.length>0&&C[C.length-1].right===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].right)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].left===C[A])return!0;return!1}}),u.update=function(C){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var h=new Array(A.length),p=A[A.length-1];h[h.length-1]=new a(p._color,p.key,C,p.left,p.right,p._count);for(var k=A.length-2;k>=0;--k)p=A[k],p.left===A[k+1]?h[k]=new a(p._color,p.key,p.value,h[k+1],p.right,p._count):h[k]=new a(p._color,p.key,p.value,p.left,h[k+1],p._count);return new l(this.tree._compare,h[0])},u.prev=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.left)for(A=A.left;A;)C.push(A),A=A.right;else for(C.pop();C.length>0&&C[C.length-1].left===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].left)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].right===C[A])return!0;return!1}});function P(C,A){return CA?1:0}function M(C){return new l(C||P,null)}},3865:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]).add(i[0].mul(o[1])),o[1].mul(i[1]))}},3952:function(t,e,r){t.exports=o;var a=r(3250);function n(i,l){for(var f=new Array(l+1),x=0;x20?52:f+32}},4040:function(t){t.exports=e;function e(r,a,n,o,i,l,f){var x=1/(a-n),y=1/(o-i),v=1/(l-f);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*y,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(a+n)*x,r[13]=(i+o)*y,r[14]=(f+l)*v,r[15]=1,r}},4041:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2],v=n[3],T=v*o+x*l-y*i,u=v*i+y*o-f*l,b=v*l+f*i-x*o,_=-f*o-x*i-y*l;return r[0]=T*v+_*-f+u*-y-b*-x,r[1]=u*v+_*-x+b*-f-T*-y,r[2]=b*v+_*-y+T*-x-u*-f,r[3]=a[3],r}},4081:function(t){t.exports=e;function e(r,a,n,o,i,l,f,x,y,v){var T=a+l+v;if(u>0){var u=Math.sqrt(T+1);r[0]=.5*(f-y)/u,r[1]=.5*(x-o)/u,r[2]=.5*(n-l)/u,r[3]=.5*u}else{var b=Math.max(a,l,v),u=Math.sqrt(2*b-T+1);a>=b?(r[0]=.5*u,r[1]=.5*(i+n)/u,r[2]=.5*(x+o)/u,r[3]=.5*(f-y)/u):l>=b?(r[0]=.5*(n+i)/u,r[1]=.5*u,r[2]=.5*(y+f)/u,r[3]=.5*(x-o)/u):(r[0]=.5*(o+x)/u,r[1]=.5*(f+y)/u,r[2]=.5*u,r[3]=.5*(n-i)/u)}return r}},4100:function(t,e,r){var a=r(4437),n=r(3837),o=r(5445),i=r(4449),l=r(3589),f=r(2260),x=r(7169),y=r(351),v=r(4772),T=r(4040),u=r(799),b=r(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:a};function _(){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 P(p,k){var w=null;try{w=p.getContext("webgl",k),w||(w=p.getContext("experimental-webgl",k))}catch{return null}return w}function M(p){var k=Math.round(Math.log(Math.abs(p))/Math.log(10));if(k<0){var w=Math.round(Math.pow(10,-k));return Math.ceil(p*w)/w}else if(k>0){var w=Math.round(Math.pow(10,k));return Math.ceil(p/w)*w}return Math.ceil(p)}function C(p){return typeof p=="boolean"?p:!0}function A(p){p=p||{},p.camera=p.camera||{};var k=p.canvas;if(!k)if(k=document.createElement("canvas"),p.container){var w=p.container;w.appendChild(k)}else document.body.appendChild(k);var R=p.gl;if(R||(p.glOptions&&(b=!!p.glOptions.preserveDrawingBuffer),R=P(k,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!R)throw new Error("webgl not supported");var O=p.bounds||[[-10,-10,-10],[10,10,10]],j=new _,V=f(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!b}),H=u(R),F=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,U={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:F},W=p.axes||{},q=n(R,W);q.enable=!W.disable;var J=p.spikes||{},lt=i(R,J),yt=[],mt=[],st=[],tt=[],dt=!0,it=!0,rt=new Array(16),at=new Array(16),vt={view:null,projection:rt,model:at,_ortho:!1},it=!0,Y=[R.drawingBufferWidth,R.drawingBufferHeight],ft=p.cameraObject||a(k,U),ut={gl:R,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:k,selection:j,camera:ft,axes:q,axesPixels:null,spikes:lt,bounds:O,objects:yt,shape:Y,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:C(p.autoResize),autoBounds:C(p.autoBounds),autoScale:!!p.autoScale,autoCenter:C(p.autoCenter),clipToBounds:C(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:vt,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(se){this.aspect[0]=se.x,this.aspect[1]=se.y,this.aspect[2]=se.z,it=!0},setBounds:function(se,Tt){this.bounds[0][se]=Tt.min,this.bounds[1][se]=Tt.max},setClearColor:function(se){this.clearColor=se},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)}},kt=[R.drawingBufferWidth/ut.pixelRatio|0,R.drawingBufferHeight/ut.pixelRatio|0];function It(){if(!ut._stopped&&ut.autoResize){var se=k.parentNode,Tt=1,Lt=1;se&&se!==document.body?(Tt=se.clientWidth,Lt=se.clientHeight):(Tt=window.innerWidth,Lt=window.innerHeight);var Mt=Math.ceil(Tt*ut.pixelRatio)|0,ee=Math.ceil(Lt*ut.pixelRatio)|0;if(Mt!==k.width||ee!==k.height){k.width=Mt,k.height=ee;var ve=k.style;ve.position=ve.position||"absolute",ve.left="0px",ve.top="0px",ve.width=Tt+"px",ve.height=Lt+"px",dt=!0}}}ut.autoResize&&It(),window.addEventListener("resize",It);function Pt(){for(var se=yt.length,Tt=tt.length,Lt=0;Lt0&&st[Tt-1]===0;)st.pop(),tt.pop().dispose()}ut.update=function(se){ut._stopped||(dt=!0,it=!0)},ut.add=function(se){ut._stopped||(se.axes=q,yt.push(se),mt.push(-1),dt=!0,it=!0,Pt())},ut.remove=function(se){if(!ut._stopped){var Tt=yt.indexOf(se);Tt<0||(yt.splice(Tt,1),mt.pop(),dt=!0,it=!0,Pt())}},ut.dispose=function(){if(!ut._stopped&&(ut._stopped=!0,window.removeEventListener("resize",It),k.removeEventListener("webglcontextlost",qt),ut.mouseListener.enabled=!1,!ut.contextLost)){q.dispose(),lt.dispose();for(var se=0;sej.distance)continue;for(var Ge=0;Gev;){var h=u[A-2],p=u[A-1];if(hu[T+1]:!0}function x(v,T,u,b){v*=2;var _=b[v];return _>1,C=M-b,A=M+b,h=_,p=C,k=M,w=A,R=P,O=v+1,j=T-1,V=0;f(h,p,u)&&(V=h,h=p,p=V),f(w,R,u)&&(V=w,w=R,R=V),f(h,k,u)&&(V=h,h=k,k=V),f(p,k,u)&&(V=p,p=k,k=V),f(h,w,u)&&(V=h,h=w,w=V),f(k,w,u)&&(V=k,k=w,w=V),f(p,R,u)&&(V=p,p=R,R=V),f(p,k,u)&&(V=p,p=k,k=V),f(w,R,u)&&(V=w,w=R,R=V);for(var H=u[2*p],F=u[2*p+1],U=u[2*w],W=u[2*w+1],q=2*h,J=2*k,lt=2*R,yt=2*_,mt=2*M,st=2*P,tt=0;tt<2;++tt){var dt=u[q+tt],rt=u[J+tt],at=u[lt+tt];u[yt+tt]=dt,u[mt+tt]=rt,u[st+tt]=at}o(C,v,u),o(A,T,u);for(var vt=O;vt<=j;++vt)if(x(vt,H,F,u))vt!==O&&n(vt,O,u),++O;else if(!x(vt,U,W,u))for(;;)if(x(j,U,W,u)){x(j,H,F,u)?(i(vt,O,j,u),++O,--j):(n(vt,j,u),--j);break}else{if(--j0)if(_[0]!==M[1][0])P=b,b=b.right;else{var p=y(b.right,_);if(p)return p;b=b.left}else{if(_[0]!==M[1][0])return b;var p=y(b.right,_);if(p)return p;b=b.left}}return P}f.castUp=function(b){var _=a.le(this.coordinates,b[0]);if(_<0)return-1;this.slabs[_];var P=y(this.slabs[_],b),M=-1;if(P&&(M=P.value),this.coordinates[_]===b[0]){var C=null;if(P&&(C=P.key),_>0){var A=y(this.slabs[_-1],b);A&&(C?i(A.key,C)>0&&(C=A.key,M=A.value):(M=A.value,C=A.key))}var h=this.horizontal[_];if(h.length>0){var p=a.ge(h,b[1],x);if(p=h.length)return M;k=h[p]}}if(k.start)if(C){var w=o(C[0],C[1],[b[0],k.y]);C[0][0]>C[1][0]&&(w=-w),w>0&&(M=k.index)}else M=k.index;else k.y!==b[1]&&(M=k.index)}}}return M};function v(b,_,P,M){this.y=b,this.index=_,this.start=P,this.closed=M}function T(b,_,P,M){this.x=b,this.segment=_,this.create=P,this.index=M}function u(b){for(var _=b.length,P=2*_,M=new Array(P),C=0;C<_;++C){var A=b[C],h=A[0][0]Math.abs(p))u.rotate(R,0,0,-h*k*Math.PI*C.rotateSpeed/window.innerWidth);else if(!C._ortho){var O=-C.zoomSpeed*w*p/window.innerHeight*(R-u.lastT())/20;u.pan(R,0,0,_*(Math.exp(O)-1))}}},!0)},C.enableMouseListeners(),C}},4449:function(t,e,r){var a=r(2762),n=r(8116),o=r(1493);t.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.buffer=b,this.vao=_,this.shader=P,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 f=l.prototype,x=[0,0,0],y=[0,0,0],v=[0,0];f.isTransparent=function(){return!1},f.drawTransparent=function(u){},f.draw=function(u){var b=this.gl,_=this.vao,P=this.shader;_.bind(),P.bind();var M=u.model||i,C=u.view||i,A=u.projection||i,h;this.axes&&(h=this.axes.lastCubeProps.axis);for(var p=x,k=y,w=0;w<3;++w)h&&h[w]<0?(p[w]=this.bounds[0][w],k[w]=this.bounds[1][w]):(p[w]=this.bounds[1][w],k[w]=this.bounds[0][w]);v[0]=b.drawingBufferWidth,v[1]=b.drawingBufferHeight,P.uniforms.model=M,P.uniforms.view=C,P.uniforms.projection=A,P.uniforms.coordinates=[this.position,p,k],P.uniforms.colors=this.colors,P.uniforms.screenShape=v;for(var w=0;w<3;++w)P.uniforms.lineWidth=this.lineWidth[w]*this.pixelRatio,this.enabled[w]&&(_.draw(b.TRIANGLES,6,6*w),this.drawSides[w]&&_.draw(b.TRIANGLES,12,18+12*w));_.unbind()},f.update=function(u){u&&("bounds"in u&&(this.bounds=u.bounds),"position"in u&&(this.position=u.position),"lineWidth"in u&&(this.lineWidth=u.lineWidth),"colors"in u&&(this.colors=u.colors),"enabled"in u&&(this.enabled=u.enabled),"drawSides"in u&&(this.drawSides=u.drawSides))},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(u,b){var _=[];function P(p,k,w,R,O,j){var V=[p,k,w,0,0,0,1];V[R+3]=1,V[R]=O,_.push.apply(_,V),V[6]=-1,_.push.apply(_,V),V[R]=j,_.push.apply(_,V),_.push.apply(_,V),V[6]=1,_.push.apply(_,V),V[R]=O,_.push.apply(_,V)}P(0,0,0,0,0,1),P(0,0,0,1,0,1),P(0,0,0,2,0,1),P(1,0,0,1,-1,1),P(1,0,0,2,-1,1),P(0,1,0,0,-1,1),P(0,1,0,2,-1,1),P(0,0,1,0,-1,1),P(0,0,1,1,-1,1);var M=a(u,_),C=n(u,[{type:u.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:u.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:u.FLOAT,buffer:M,size:1,offset:24,stride:28}]),A=o(u);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var h=new l(u,M,C,A);return h.update(b),h}},4494:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r[3]=1/a[3],r}},4505:function(t,e,r){t.exports=r(5847)},4578:function(t){t.exports=e;function e(r,a,n,o,i){return r[0]=a,r[1]=n,r[2]=o,r[3]=i,r}},4623:function(t){"use restrict";t.exports=e;function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var a=0;a0)return 1<=0)return 1<=0;--u)f[u]=x*a[u]+y*n[u]+v*o[u]+T*i[u];return f}return x*a+y*n+v*o[u]+T*i}function r(a,n,o,i,l,f){var x=l-1,y=l*l,v=x*x,T=(1+2*l)*v,u=l*v,b=y*(3-2*l),_=y*x;if(a.length){f||(f=new Array(a.length));for(var P=a.length-1;P>=0;--P)f[P]=T*a[P]+u*n[P]+b*o[P]+_*i[P];return f}return T*a+u*n+b*o+_*i}t.exports=r,t.exports.derivative=e},4772:function(t){t.exports=e;function e(r,a,n,o,i){var l=1/Math.tan(a/2),f=1/(o-i);return r[0]=l/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=l,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+o)*f,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*o*f,r[15]=0,r}},4793:function(t,e,r){function a(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function n(gt,St){for(var Nt=0;NtA)throw new RangeError('The value "'+gt+'" is invalid for option "size"');var St=new Uint8Array(gt);return Object.setPrototypeOf(St,k.prototype),St}function k(gt,St,Nt){if(typeof gt=="number"){if(typeof St=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(gt)}return w(gt,St,Nt)}k.poolSize=8192;function w(gt,St,Nt){if(typeof gt=="string")return V(gt,St);if(ArrayBuffer.isView(gt))return F(gt);if(gt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt));if(nn(gt,ArrayBuffer)||gt&&nn(gt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nn(gt,SharedArrayBuffer)||gt&&nn(gt.buffer,SharedArrayBuffer)))return U(gt,St,Nt);if(typeof gt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var re=gt.valueOf&>.valueOf();if(re!=null&&re!==gt)return k.from(re,St,Nt);var le=W(gt);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof gt[Symbol.toPrimitive]=="function")return k.from(gt[Symbol.toPrimitive]("string"),St,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt))}k.from=function(gt,St,Nt){return w(gt,St,Nt)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function R(gt){if(typeof gt!="number")throw new TypeError('"size" argument must be of type number');if(gt<0)throw new RangeError('The value "'+gt+'" is invalid for option "size"')}function O(gt,St,Nt){return R(gt),gt<=0?p(gt):St!==void 0?typeof Nt=="string"?p(gt).fill(St,Nt):p(gt).fill(St):p(gt)}k.alloc=function(gt,St,Nt){return O(gt,St,Nt)};function j(gt){return R(gt),p(gt<0?0:q(gt)|0)}k.allocUnsafe=function(gt){return j(gt)},k.allocUnsafeSlow=function(gt){return j(gt)};function V(gt,St){if((typeof St!="string"||St==="")&&(St="utf8"),!k.isEncoding(St))throw new TypeError("Unknown encoding: "+St);var Nt=J(gt,St)|0,re=p(Nt),le=re.write(gt,St);return le!==Nt&&(re=re.slice(0,le)),re}function H(gt){for(var St=gt.length<0?0:q(gt.length)|0,Nt=p(St),re=0;re=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return gt|0}k.isBuffer=function(gt){return gt!=null&>._isBuffer===!0&>!==k.prototype},k.compare=function(gt,St){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),nn(St,Uint8Array)&&(St=k.from(St,St.offset,St.byteLength)),!k.isBuffer(gt)||!k.isBuffer(St))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(gt===St)return 0;for(var Nt=gt.length,re=St.length,le=0,we=Math.min(Nt,re);lere.length?(k.isBuffer(we)||(we=k.from(we)),we.copy(re,le)):Uint8Array.prototype.set.call(re,we,le);else if(k.isBuffer(we))we.copy(re,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=we.length}return re};function J(gt,St){if(k.isBuffer(gt))return gt.length;if(ArrayBuffer.isView(gt)||nn(gt,ArrayBuffer))return gt.byteLength;if(typeof gt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_(gt));var Nt=gt.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&Nt===0)return 0;for(var le=!1;;)switch(St){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(gt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return br(gt).length;default:if(le)return re?-1:ur(gt).length;St=(""+St).toLowerCase(),le=!0}}k.byteLength=J;function lt(gt,St,Nt){var re=!1;if((St===void 0||St<0)&&(St=0),St>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,St>>>=0,Nt<=St))return"";for(gt||(gt="utf8");;)switch(gt){case"hex":return Pt(this,St,Nt);case"utf8":case"utf-8":return Y(this,St,Nt);case"ascii":return kt(this,St,Nt);case"latin1":case"binary":return It(this,St,Nt);case"base64":return it(this,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,St,Nt);default:if(re)throw new TypeError("Unknown encoding: "+gt);gt=(gt+"").toLowerCase(),re=!0}}k.prototype._isBuffer=!0;function yt(gt,St,Nt){var re=gt[St];gt[St]=gt[Nt],gt[Nt]=re}k.prototype.swap16=function(){var gt=this.length;if(gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var St=0;StSt&&(gt+=" ... "),""},C&&(k.prototype[C]=k.prototype.inspect),k.prototype.compare=function(gt,St,Nt,re,le){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),!k.isBuffer(gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_(gt));if(St===void 0&&(St=0),Nt===void 0&&(Nt=gt?gt.length:0),re===void 0&&(re=0),le===void 0&&(le=this.length),St<0||Nt>gt.length||re<0||le>this.length)throw new RangeError("out of range index");if(re>=le&&St>=Nt)return 0;if(re>=le)return-1;if(St>=Nt)return 1;if(St>>>=0,Nt>>>=0,re>>>=0,le>>>=0,this===gt)return 0;for(var we=le-re,Ue=Nt-St,qe=Math.min(we,Ue),or=this.slice(re,le),Sr=gt.slice(St,Nt),Ar=0;Ar2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,Le(Nt)&&(Nt=le?0:gt.length-1),Nt<0&&(Nt=gt.length+Nt),Nt>=gt.length){if(le)return-1;Nt=gt.length-1}else if(Nt<0)if(le)Nt=0;else return-1;if(typeof St=="string"&&(St=k.from(St,re)),k.isBuffer(St))return St.length===0?-1:st(gt,St,Nt,re,le);if(typeof St=="number")return St=St&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(gt,St,Nt):Uint8Array.prototype.lastIndexOf.call(gt,St,Nt):st(gt,[St],Nt,re,le);throw new TypeError("val must be string, number or Buffer")}function st(gt,St,Nt,re,le){var we=1,Ue=gt.length,qe=St.length;if(re!==void 0&&(re=String(re).toLowerCase(),re==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(gt.length<2||St.length<2)return-1;we=2,Ue/=2,qe/=2,Nt/=2}function or(Hn,Wn){return we===1?Hn[Wn]:Hn.readUInt16BE(Wn*we)}var Sr;if(le){var Ar=-1;for(Sr=Nt;SrUe&&(Nt=Ue-qe),Sr=Nt;Sr>=0;Sr--){for(var mr=!0,Qr=0;Qrle&&(re=le)):re=le;var we=St.length;re>we/2&&(re=we/2);var Ue;for(Ue=0;Ue>>0,isFinite(Nt)?(Nt=Nt>>>0,re===void 0&&(re="utf8")):(re=Nt,Nt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-St;if((Nt===void 0||Nt>le)&&(Nt=le),gt.length>0&&(Nt<0||St<0)||St>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var we=!1;;)switch(re){case"hex":return tt(this,gt,St,Nt);case"utf8":case"utf-8":return dt(this,gt,St,Nt);case"ascii":case"latin1":case"binary":return rt(this,gt,St,Nt);case"base64":return at(this,gt,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,gt,St,Nt);default:if(we)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),we=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(gt,St,Nt){return St===0&&Nt===gt.length?P.fromByteArray(gt):P.fromByteArray(gt.slice(St,Nt))}function Y(gt,St,Nt){Nt=Math.min(gt.length,Nt);for(var re=[],le=St;le239?4:we>223?3:we>191?2:1;if(le+qe<=Nt){var or=void 0,Sr=void 0,Ar=void 0,mr=void 0;switch(qe){case 1:we<128&&(Ue=we);break;case 2:or=gt[le+1],(or&192)===128&&(mr=(we&31)<<6|or&63,mr>127&&(Ue=mr));break;case 3:or=gt[le+1],Sr=gt[le+2],(or&192)===128&&(Sr&192)===128&&(mr=(we&15)<<12|(or&63)<<6|Sr&63,mr>2047&&(mr<55296||mr>57343)&&(Ue=mr));break;case 4:or=gt[le+1],Sr=gt[le+2],Ar=gt[le+3],(or&192)===128&&(Sr&192)===128&&(Ar&192)===128&&(mr=(we&15)<<18|(or&63)<<12|(Sr&63)<<6|Ar&63,mr>65535&&mr<1114112&&(Ue=mr))}}Ue===null?(Ue=65533,qe=1):Ue>65535&&(Ue-=65536,re.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),re.push(Ue),le+=qe}return ut(re)}var ft=4096;function ut(gt){var St=gt.length;if(St<=ft)return String.fromCharCode.apply(String,gt);for(var Nt="",re=0;rere)&&(Nt=re);for(var le="",we=St;weNt&&(gt=Nt),St<0?(St+=Nt,St<0&&(St=0)):St>Nt&&(St=Nt),StNt)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt+--St],le=1;St>0&&(le*=256);)re+=this[gt+--St]*le;return re},k.prototype.readUint8=k.prototype.readUInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]|this[gt+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]<<8|this[gt+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),(this[gt]|this[gt+1]<<8|this[gt+2]<<16)+this[gt+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]*16777216+(this[gt+1]<<16|this[gt+2]<<8|this[gt+3])},k.prototype.readBigUInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,24),le=this[++gt]+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+Nt*Math.pow(2,24);return BigInt(re)+(BigInt(le)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt],le=this[++gt]*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+Nt;return(BigInt(re)<>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we=le&&(re-=Math.pow(2,8*St)),re},k.prototype.readIntBE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=St,le=1,we=this[gt+--re];re>0&&(le*=256);)we+=this[gt+--re]*le;return le*=128,we>=le&&(we-=Math.pow(2,8*St)),we},k.prototype.readInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]&128?(255-this[gt]+1)*-1:this[gt]},k.prototype.readInt16LE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt]|this[gt+1]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt16BE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt+1]|this[gt]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]|this[gt+1]<<8|this[gt+2]<<16|this[gt+3]<<24},k.prototype.readInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]<<24|this[gt+1]<<16|this[gt+2]<<8|this[gt+3]},k.prototype.readBigInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=this[gt+4]+this[gt+5]*Math.pow(2,8)+this[gt+6]*Math.pow(2,16)+(Nt<<24);return(BigInt(re)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=(St<<24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt];return(BigInt(re)<>>0,St||Wt(gt,4,this.length),M.read(this,gt,!0,23,4)},k.prototype.readFloatBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),M.read(this,gt,!1,23,4)},k.prototype.readDoubleLE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!0,52,8)},k.prototype.readDoubleBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!1,52,8)};function Jt(gt,St,Nt,re,le,we){if(!k.isBuffer(gt))throw new TypeError('"buffer" argument must be a Buffer instance');if(St>le||Stgt.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=1,Ue=0;for(this[St]=gt&255;++Ue>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=Nt-1,Ue=1;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)this[St+we]=gt/Ue&255;return St+Nt},k.prototype.writeUint8=k.prototype.writeUInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,255,0),this[St]=gt&255,St+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St+3]=gt>>>24,this[St+2]=gt>>>16,this[St+1]=gt>>>8,this[St]=gt&255,St+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4};function ge(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Nt}function fe(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt+7]=we,we=we>>8,gt[Nt+6]=we,we=we>>8,gt[Nt+5]=we,we=we>>8,gt[Nt+4]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt+3]=Ue,Ue=Ue>>8,gt[Nt+2]=Ue,Ue=Ue>>8,gt[Nt+1]=Ue,Ue=Ue>>8,gt[Nt]=Ue,Nt+8}k.prototype.writeBigUInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=0,Ue=1,qe=0;for(this[St]=gt&255;++we>0)-qe&255;return St+Nt},k.prototype.writeIntBE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=Nt-1,Ue=1,qe=0;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)gt<0&&qe===0&&this[St+we+1]!==0&&(qe=1),this[St+we]=(gt/Ue>>0)-qe&255;return St+Nt},k.prototype.writeInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,127,-128),gt<0&&(gt=255+gt+1),this[St]=gt&255,St+1},k.prototype.writeInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),this[St]=gt&255,this[St+1]=gt>>>8,this[St+2]=gt>>>16,this[St+3]=gt>>>24,St+4},k.prototype.writeInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),gt<0&&(gt=4294967295+gt+1),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4},k.prototype.writeBigInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pe(gt,St,Nt,re,le,we){if(Nt+re>gt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function se(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,4),M.write(gt,St,Nt,re,23,4),Nt+4}k.prototype.writeFloatLE=function(gt,St,Nt){return se(this,gt,St,!0,Nt)},k.prototype.writeFloatBE=function(gt,St,Nt){return se(this,gt,St,!1,Nt)};function Tt(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,8),M.write(gt,St,Nt,re,52,8),Nt+8}k.prototype.writeDoubleLE=function(gt,St,Nt){return Tt(this,gt,St,!0,Nt)},k.prototype.writeDoubleBE=function(gt,St,Nt){return Tt(this,gt,St,!1,Nt)},k.prototype.copy=function(gt,St,Nt,re){if(!k.isBuffer(gt))throw new TypeError("argument should be a Buffer");if(Nt||(Nt=0),!re&&re!==0&&(re=this.length),St>=gt.length&&(St=gt.length),St||(St=0),re>0&&re=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),gt.length-St>>0,Nt=Nt===void 0?this.length:Nt>>>0,gt||(gt=0);var we;if(typeof gt=="number")for(we=St;weMath.pow(2,32)?le=ee(String(Nt)):typeof Nt=="bigint"&&(le=String(Nt),(Nt>Math.pow(BigInt(2),BigInt(32))||Nt<-Math.pow(BigInt(2),BigInt(32)))&&(le=ee(le)),le+="n"),re+=" It must be ".concat(St,". Received ").concat(le),re},RangeError);function ee(gt){for(var St="",Nt=gt.length,re=gt[0]==="-"?1:0;Nt>=re+4;Nt-=3)St="_".concat(gt.slice(Nt-3,Nt)).concat(St);return"".concat(gt.slice(0,Nt)).concat(St)}function ve(gt,St,Nt){Te(St,"offset"),(gt[St]===void 0||gt[St+Nt]===void 0)&&He(St,gt.length-(Nt+1))}function oe(gt,St,Nt,re,le,we){if(gt>Nt||gt= 0".concat(Ue," and < 2").concat(Ue," ** ").concat((we+1)*8).concat(Ue):qe=">= -(2".concat(Ue," ** ").concat((we+1)*8-1).concat(Ue,") and < 2 ** ")+"".concat((we+1)*8-1).concat(Ue),new Lt.ERR_OUT_OF_RANGE("value",qe,gt)}ve(re,le,we)}function Te(gt,St){if(typeof gt!="number")throw new Lt.ERR_INVALID_ARG_TYPE(St,"number",gt)}function He(gt,St,Nt){throw Math.floor(gt)!==gt?(Te(gt,Nt),new Lt.ERR_OUT_OF_RANGE("offset","an integer",gt)):St<0?new Lt.ERR_BUFFER_OUT_OF_BOUNDS:new Lt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(St),gt)}var Ge=/[^+/0-9A-Za-z-_]/g;function cr(gt){if(gt=gt.split("=")[0],gt=gt.trim().replace(Ge,""),gt.length<2)return"";for(;gt.length%4!==0;)gt=gt+"=";return gt}function ur(gt,St){St=St||1/0;for(var Nt,re=gt.length,le=null,we=[],Ue=0;Ue55295&&Nt<57344){if(!le){if(Nt>56319){(St-=3)>-1&&we.push(239,191,189);continue}else if(Ue+1===re){(St-=3)>-1&&we.push(239,191,189);continue}le=Nt;continue}if(Nt<56320){(St-=3)>-1&&we.push(239,191,189),le=Nt;continue}Nt=(le-55296<<10|Nt-56320)+65536}else le&&(St-=3)>-1&&we.push(239,191,189);if(le=null,Nt<128){if((St-=1)<0)break;we.push(Nt)}else if(Nt<2048){if((St-=2)<0)break;we.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((St-=3)<0)break;we.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((St-=4)<0)break;we.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return we}function jr(gt){for(var St=[],Nt=0;Nt>8,le=Nt%256,we.push(le),we.push(re);return we}function br(gt){return P.toByteArray(cr(gt))}function Xr(gt,St,Nt,re){var le;for(le=0;le=St.length||le>=gt.length);++le)St[le+Nt]=gt[le];return le}function nn(gt,St){return gt instanceof St||gt!=null&>.constructor!=null&>.constructor.name!=null&>.constructor.name===St.name}function Le(gt){return gt!==gt}var Gt=function(){for(var gt="0123456789abcdef",St=new Array(256),Nt=0;Nt<16;++Nt)for(var re=Nt*16,le=0;le<16;++le)St[re+le]=gt[Nt]+gt[le];return St}();function ne(gt){return typeof BigInt>"u"?Ct:gt}function Ct(){throw new Error("BigInt not supported")}},4844:function(t){t.exports=e;function e(r,a,n,o){return r[0]=a[0]+n[0]*o,r[1]=a[1]+n[1]*o,r[2]=a[2]+n[2]*o,r[3]=a[3]+n[3]*o,r}},4905:function(t,e,r){var a=r(5874);t.exports=n;function n(o,i){var l=a(i),f=[];return f=f.concat(l(o)),f=f.concat(l(null)),f}},4935:function(t,e,r){t.exports=b;var a=r(2762),n=r(8116),o=r(4359),i=r(1879).Q,l=window||process.global||{},f=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};var x=3;function y(_,P,M,C){this.gl=_,this.shader=P,this.buffer=M,this.vao=C,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=y.prototype,T=[0,0];v.bind=function(_,P,M,C){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=P,A.projection=M,A.pixelScale=C,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(_,P,M,C,A){var h=[];function p(W,q,J,lt,yt,mt){var st=[J.style,J.weight,J.variant,J.family].join("_"),tt=f[st];tt||(tt=f[st]={});var dt=tt[q];dt||(dt=tt[q]=u(q,{triangles:!0,font:J.family,fontStyle:J.style,fontWeight:J.weight,fontVariant:J.variant,textAlign:"center",textBaseline:"middle",lineSpacing:yt,styletags:mt}));for(var rt=(lt||12)/12,at=dt.positions,vt=dt.cells,it=0,Y=vt.length;it=0;--ut){var kt=at[ft[ut]];h.push(rt*kt[0],-rt*kt[1],W)}}for(var k=[0,0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0],j=1.25,V={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},H=0;H<3;++H){R[H]=h.length/x|0,p(.5*(_[0][H]+_[1][H]),P[H],M[H],12,j,V),O[H]=(h.length/x|0)-R[H],k[H]=h.length/x|0;for(var F=0;F0||P.length>0;){for(;_.length>0;){var p=_.pop();if(M[p]!==-b){M[p]=b;for(var k=C[p],w=0;w<3;++w){var R=h[3*p+w];R>=0&&M[R]===0&&(A[3*p+w]?P.push(R):(_.push(R),M[R]=b))}}}var O=P;P=_,_=O,P.length=0,b=-b}var j=f(C,M,v);return T?j.concat(u.boundary):j}},5033:function(t){t.exports=e;function e(r,a,n){var o=a||0,i=n||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[o*r[12]+r[8],o*r[13]+r[9],o*r[14]+r[10],o*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(t,e,r){t.exports=b;var a=r(3250)[3],n=r(4209),o=r(3352),i=r(2478);function l(){return!0}function f(_){return function(P,M){var C=_[P];return C?!!C.queryPoint(M,l):!1}}function x(_){for(var P={},M=0;M<_.length;++M){var C=_[M],A=C[0][0],h=C[0][1],p=C[1][1],k=[Math.min(h,p),Math.max(h,p)];A in P?P[A].push(k):P[A]=[k]}for(var w={},R=Object.keys(P),M=0;M0&&P[C]===M[0])A=_[C-1];else return 1;for(var h=1;A;){var p=A.key,k=a(M,p[0],p[1]);if(p[0][0]0)h=-1,A=A.right;else return 0;else if(k>0)A=A.left;else if(k<0)h=1,A=A.right;else return 0}return h}}function v(_){return 1}function T(_){return function(P){return _(P[0],P[1])?0:1}}function u(_,P){return function(M){return _(M[0],M[1])?0:P(M)}}function b(_){for(var P=_.length,M=[],C=[],A=0,h=0;h"u"?r(606):WeakMap,i=new o,l=0;function f(P,M,C,A,h,p,k){this.id=P,this.src=M,this.type=C,this.shader=A,this.count=p,this.programs=[],this.cache=k}f.prototype.dispose=function(){if(--this.count===0){for(var P=this.cache,M=P.gl,C=this.programs,A=0,h=C.length;A0&&(f=1/Math.sqrt(f),r[0]=n*f,r[1]=o*f,r[2]=i*f,r[3]=l*f),r}},5202:function(t,e,r){var a=r(1944),n=r(8210);t.exports=l,t.exports.positive=f,t.exports.negative=x;function o(y,v){var T=n(a(y,v),[v[v.length-1]]);return T[T.length-1]}function i(y,v,T,u){var b=u-v,_=-v/b;_<0?_=0:_>1&&(_=1);for(var P=1-_,M=y.length,C=new Array(M),A=0;A0||b>0&&C<0){var A=i(_,C,P,b);T.push(A),u.push(A.slice())}C<0?u.push(P.slice()):C>0?T.push(P.slice()):(T.push(P.slice()),u.push(P.slice())),b=C}return{positive:T,negative:u}}function f(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M>=0&&T.push(_.slice()),u=M}return T}function x(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M<=0&&T.push(_.slice()),u=M}return T}},5219:function(t){t.exports=function(e){for(var r=e.length,a,n=0;n13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},5250:function(t){t.exports=r;var e=+(Math.pow(2,27)+1);function r(a,n,o){var i=a*n,l=e*a,f=l-a,x=l-f,y=a-x,v=e*n,T=v-n,u=v-T,b=n-u,_=i-x*u,P=_-y*u,M=P-x*b,C=y*b-M;return o?(o[0]=C,o[1]=i,o):[C,i]}},5298:function(t,e){var r={"float64,2,1,0":function(){return function(x,y,v,T,u){var b=x[0],_=x[1],P=x[2],M=v[0],C=v[1],A=v[2];T|=0;var h=0,p=0,k=0,w=A,R=C-P*A,O=M-_*C;for(k=0;k0;){H<64?(M=H,H=0):(M=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64),T=j+H*h+F*p,_=V+H*w+F*R;var U=0,W=0,q=0,J=k,lt=h-A*k,yt=p-M*h,mt=O,st=w-A*O,tt=R-M*w;for(q=0;q0;){R<64?(M=R,R=0):(M=64,R-=64);for(var O=x[0]|0;O>0;){O<64?(P=O,O=0):(P=64,O-=64),T=k+R*A+O*C,_=w+R*p+O*h;var j=0,V=0,H=A,F=C-M*A,U=p,W=h-M*p;for(V=0;V0;){V<64?(C=V,V=0):(C=64,V-=64);for(var H=x[0]|0;H>0;){H<64?(P=H,H=0):(P=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(M=F,F=0):(M=64,F-=64),T=O+V*p+H*A+F*h,_=j+V*R+H*k+F*w;var U=0,W=0,q=0,J=p,lt=A-C*p,yt=h-P*A,mt=R,st=k-C*R,tt=w-P*k;for(q=0;q=0}}(),o.removeTriangle=function(f,x,y){var v=this.stars;i(v[f],x,y),i(v[x],y,f),i(v[y],f,x)},o.addTriangle=function(f,x,y){var v=this.stars;v[f].push(x,y),v[x].push(y,f),v[y].push(f,x)},o.opposite=function(f,x){for(var y=this.stars[x],v=1,T=y.length;v0;){var u=y.pop();f[u]=!1;for(var b=l[u],v=0;v0){for(var st=0;st<24;++st)O.push(O[O.length-12]);F+=2,lt=!0}continue t}U[0][w]=Math.min(U[0][w],yt[w],mt[w]),U[1][w]=Math.max(U[1][w],yt[w],mt[w])}var tt,dt;Array.isArray(q[0])?(tt=q.length>k-1?q[k-1]:q.length>0?q[q.length-1]:[0,0,0,1],dt=q.length>k?q[k]:q.length>0?q[q.length-1]:[0,0,0,1]):tt=dt=q,tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),dt.length===3&&(dt=[dt[0],dt[1],dt[2],1]),!this.hasAlpha&&tt[3]<1&&(this.hasAlpha=!0);var rt;Array.isArray(J)?rt=J.length>k-1?J[k-1]:J.length>0?J[J.length-1]:[0,0,0,1]:rt=J;var at=H;if(H+=_(yt,mt),lt){for(w=0;w<2;++w)O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3]);F+=2,lt=!1}O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3],yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,-rt,tt[0],tt[1],tt[2],tt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,-rt,dt[0],dt[1],dt[2],dt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,rt,dt[0],dt[1],dt[2],dt[3]),F+=4}}if(this.buffer.update(O),j.push(H),V.push(W[W.length-1].slice()),this.bounds=U,this.vertexCount=F,this.points=V,this.arcLength=j,"dashes"in p){var vt=p.dashes,it=vt.slice();for(it.unshift(0),k=1;kr[n][0]&&(n=o);return an?[[n],[a]]:[[a]]}},5771:function(t,e,r){var a=r(8507),n=r(3788),o=r(2419);t.exports=i;function i(l){l.sort(n);for(var f=l.length,x=0,y=0;y0){var u=l[x-1];if(a(v,u)===0&&o(u)!==T){x-=1;continue}}l[x++]=v}}return l.length=x,l}},5838:function(t,e,r){t.exports=n;var a=r(7842);function n(o){for(var i=new Array(o.length),l=0;l0&&(l=1/Math.sqrt(l),r[0]=a[0]*l,r[1]=a[1]*l,r[2]=a[2]*l),r}},3545:function(t,e,r){t.exports=l;var a=r(8105),n=a("loy&&T[A+x]>M;--C,A-=b){for(var h=A,p=A+b,k=0;k>>1,M=2*f,C=P,A=T[M*P+x];b<_;){if(_-b=B?(C=w,A=B):k>=j?(C=p,A=k):(C=O,A=j):B>=j?(C=w,A=B):j>=k?(C=p,A=k):(C=O,A=j);for(var V=M*(_-1),H=M*C,F=0;Fthis.buffer.length){n.free(this.buffer);for(var _=this.buffer=n.mallocUint8(i(b*u*4)),P=0;PM|0},vertex:function(b,_,P,M,C,A,h,p,k,w,B,O,j){var V=(h<<0)+(p<<1)+(k<<2)+(w<<3)|0;if(!(V===0||V===15))switch(V){case 0:B.push([b-.5,_-.5]);break;case 1:B.push([b-.25-.25*(M+P-2*j)/(P-M),_-.25-.25*(C+P-2*j)/(P-C)]);break;case 2:B.push([b-.75-.25*(-M-P+2*j)/(M-P),_-.25-.25*(A+M-2*j)/(M-A)]);break;case 3:B.push([b-.5,_-.5-.5*(C+P+A+M-4*j)/(P-C+M-A)]);break;case 4:B.push([b-.25-.25*(A+C-2*j)/(C-A),_-.75-.25*(-C-P+2*j)/(C-P)]);break;case 5:B.push([b-.5-.5*(M+P+A+C-4*j)/(P-M+C-A),_-.5]);break;case 6:B.push([b-.5-.25*(-M-P+A+C)/(M-P+C-A),_-.5-.25*(-C-P+A+M)/(C-P+M-A)]);break;case 7:B.push([b-.75-.25*(A+C-2*j)/(C-A),_-.75-.25*(A+M-2*j)/(M-A)]);break;case 8:B.push([b-.75-.25*(-A-C+2*j)/(A-C),_-.75-.25*(-A-M+2*j)/(A-M)]);break;case 9:B.push([b-.5-.25*(M+P+-A-C)/(P-M+A-C),_-.5-.25*(C+P+-A-M)/(P-C+A-M)]);break;case 10:B.push([b-.5-.5*(-M-P+-A-C+4*j)/(M-P+A-C),_-.5]);break;case 11:B.push([b-.25-.25*(-A-C+2*j)/(A-C),_-.75-.25*(C+P-2*j)/(P-C)]);break;case 12:B.push([b-.5,_-.5-.5*(-C-P+-A-M+4*j)/(C-P+A-M)]);break;case 13:B.push([b-.75-.25*(M+P-2*j)/(P-M),_-.25-.25*(-A-M+2*j)/(A-M)]);break;case 14:B.push([b-.25-.25*(-M-P+2*j)/(M-P),_-.25-.25*(-C-P+2*j)/(C-P)]);break;case 15:B.push([b-.5,_-.5]);break}},cell:function(b,_,P,M,C,A,h,p,k){C?p.push([b,_]):p.push([_,b])}});return function(b,_){var P=[],M=[];return u(b,P,M,_),{positions:P,cells:M}}}};function i(y,v){var T=y.length+"d",u=o[T];if(u)return u(a,y,v)}function l(y,v){for(var T=n(y,v),u=T.length,b=new Array(u),_=new Array(u),P=0;P>1,T=-7,u=n?i-1:0,b=n?-1:1,_=r[a+u];for(u+=b,l=_&(1<<-T)-1,_>>=-T,T+=x;T>0;l=l*256+r[a+u],u+=b,T-=8);for(f=l&(1<<-T)-1,l>>=-T,T+=o;T>0;f=f*256+r[a+u],u+=b,T-=8);if(l===0)l=1-v;else{if(l===y)return f?NaN:(_?-1:1)*(1/0);f=f+Math.pow(2,o),l=l-v}return(_?-1:1)*f*Math.pow(2,l-o)},e.write=function(r,a,n,o,i,l){var f,x,y,v=l*8-i-1,T=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:l-1,P=o?1:-1,M=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(x=isNaN(a)?1:0,f=T):(f=Math.floor(Math.log(a)/Math.LN2),a*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+u>=1?a+=b/y:a+=b*Math.pow(2,1-u),a*y>=2&&(f++,y/=2),f+u>=T?(x=0,f=T):f+u>=1?(x=(a*y-1)*Math.pow(2,i),f=f+u):(x=a*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;r[n+_]=x&255,_+=P,x/=256,i-=8);for(f=f<0;r[n+_]=f&255,_+=P,f/=256,v-=8);r[n+_-P]|=M*128}},3788:function(t,e,r){var a=r(8507),n=r(2419);t.exports=o;function o(i,l){return a(i,l)||n(i)-n(l)}},3837:function(t,e,r){t.exports=O;var a=r(4935),n=r(501),o=r(5304),i=r(6429),l=r(6444),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,y=DataView;function v(j){return x.isView(j)&&!(j instanceof y)}function T(j){return Array.isArray(j)||v(j)}function u(j,V){return j[0]=V[0],j[1]=V[1],j[2]=V[2],j}function b(j){this.gl=j,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=o(j)}var _=b.prototype;_.update=function(j){j=j||{};function V(at,vt,it){if(it in j){var K=j[it],ft=this[it],ut;(at?T(K)&&T(K[0]):T(K))?this[it]=ut=[vt(K[0]),vt(K[1]),vt(K[2])]:this[it]=ut=[vt(K),vt(K),vt(K)];for(var kt=0;kt<3;++kt)if(ut[kt]!==ft[kt])return!0}return!1}var H=V.bind(this,!1,Number),F=V.bind(this,!1,Boolean),U=V.bind(this,!1,String),W=V.bind(this,!0,function(at){if(T(at)){if(at.length===3)return[+at[0],+at[1],+at[2],1];if(at.length===4)return[+at[0],+at[1],+at[2],+at[3]]}return[0,0,0,1]}),q,J=!1,lt=!1;if("bounds"in j)for(var yt=j.bounds,mt=0;mt<2;++mt)for(var st=0;st<3;++st)yt[mt][st]!==this.bounds[mt][st]&&(lt=!0),this.bounds[mt][st]=yt[mt][st];if("ticks"in j){q=j.ticks,J=!0,this.autoTicks=!1;for(var mt=0;mt<3;++mt)this.tickSpacing[mt]=0}else H("tickSpacing")&&(this.autoTicks=!0,lt=!0);if(this._firstInit&&("ticks"in j||"tickSpacing"in j||(this.autoTicks=!0),lt=!0,J=!0,this._firstInit=!1),lt&&this.autoTicks&&(q=l.create(this.bounds,this.tickSpacing),J=!0),J){for(var mt=0;mt<3;++mt)q[mt].sort(function(vt,it){return vt.x-it.x});l.equal(q,this.ticks)?J=!1:this.ticks=q}F("tickEnable"),U("tickFont")&&(J=!0),U("tickFontStyle")&&(J=!0),U("tickFontWeight")&&(J=!0),U("tickFontVariant")&&(J=!0),H("tickSize"),H("tickAngle"),H("tickPad"),W("tickColor");var tt=U("labels");U("labelFont")&&(tt=!0),U("labelFontStyle")&&(tt=!0),U("labelFontWeight")&&(tt=!0),U("labelFontVariant")&&(tt=!0),F("labelEnable"),H("labelSize"),H("labelPad"),W("labelColor"),F("lineEnable"),F("lineMirror"),H("lineWidth"),W("lineColor"),F("lineTickEnable"),F("lineTickMirror"),H("lineTickLength"),H("lineTickWidth"),W("lineTickColor"),F("gridEnable"),H("gridWidth"),W("gridColor"),F("zeroEnable"),W("zeroLineColor"),H("zeroLineWidth"),F("backgroundEnable"),W("backgroundColor");var pt=[{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]}],rt=[{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&&(tt||J)&&this._text.update(this.bounds,this.labels,pt,this.ticks,rt):this._text=a(this.gl,this.bounds,this.labels,pt,this.ticks,rt),this._lines&&J&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};function P(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new P,new P,new P];function C(j,V,H,F,U){for(var W=j.primalOffset,q=j.primalMinor,J=j.mirrorOffset,lt=j.mirrorMinor,yt=F[V],mt=0;mt<3;++mt)if(V!==mt){var st=W,tt=J,pt=q,rt=lt;yt&1<0?(pt[mt]=-1,rt[mt]=0):(pt[mt]=0,rt[mt]=1)}}var A=[0,0,0],h={model:f,view:f,projection:f,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(j){};var p=0,k=[0,0,0],w=[0,0,0],B=[0,0,0];_.draw=function(j){j=j||h;for(var V=this.gl,H=j.model||f,F=j.view||f,U=j.projection||f,W=this.bounds,q=j._ortho||!1,J=i(H,F,U,W,q),lt=J.cubeEdges,yt=J.axis,mt=F[12],st=F[13],tt=F[14],pt=F[15],rt=q?2:1,at=rt*this.pixelRatio*(U[3]*mt+U[7]*st+U[11]*tt+U[15]*pt)/V.drawingBufferHeight,vt=0;vt<3;++vt)this.lastCubeProps.cubeEdges[vt]=lt[vt],this.lastCubeProps.axis[vt]=yt[vt];for(var it=M,vt=0;vt<3;++vt)C(M[vt],vt,this.bounds,lt,yt);for(var V=this.gl,K=A,vt=0;vt<3;++vt)this.backgroundEnable[vt]?K[vt]=yt[vt]:K[vt]=0;this._background.draw(H,F,U,W,K,this.backgroundColor),this._lines.bind(H,F,U,this);for(var vt=0;vt<3;++vt){var ft=[0,0,0];yt[vt]>0?ft[vt]=W[1][vt]:ft[vt]=W[0][vt];for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.gridEnable[kt]&&this._lines.drawGrid(kt,It,this.bounds,ft,this.gridColor[kt],this.gridWidth[kt]*this.pixelRatio)}for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.zeroEnable[It]&&Math.min(W[0][It],W[1][It])<=0&&Math.max(W[0][It],W[1][It])>=0&&this._lines.drawZero(kt,It,this.bounds,ft,this.zeroLineColor[It],this.zeroLineWidth[It]*this.pixelRatio)}}for(var vt=0;vt<3;++vt){this.lineEnable[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].primalOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio),this.lineMirror[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].mirrorOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio);for(var Pt=u(k,it[vt].primalMinor),qt=u(w,it[vt].mirrorMinor),Wt=this.lineTickLength,ut=0;ut<3;++ut){var Jt=at/H[5*ut];Pt[ut]*=Wt[ut]*Jt,qt[ut]*=Wt[ut]*Jt}this.lineTickEnable[vt]&&this._lines.drawAxisTicks(vt,it[vt].primalOffset,Pt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio),this.lineTickMirror[vt]&&this._lines.drawAxisTicks(vt,it[vt].mirrorOffset,qt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,F,U,this.pixelRatio);var ge,fe=.5,pe,se;function Tt(Ae){se=[0,0,0],se[Ae]=1}function Lt(Ae,He,Ge){var cr=(Ae+1)%3,ur=(Ae+2)%3,jr=He[cr],qr=He[ur],br=Ge[cr],Xr=Ge[ur];if(jr>0&&Xr>0){Tt(cr);return}else if(jr>0&&Xr<0){Tt(cr);return}else if(jr<0&&Xr>0){Tt(cr);return}else if(jr<0&&Xr<0){Tt(cr);return}else if(qr>0&&br>0){Tt(ur);return}else if(qr>0&&br<0){Tt(ur);return}else if(qr<0&&br>0){Tt(ur);return}else if(qr<0&&br<0){Tt(ur);return}}for(var vt=0;vt<3;++vt){for(var Mt=it[vt].primalMinor,ee=it[vt].mirrorMinor,ve=u(B,it[vt].primalOffset),ut=0;ut<3;++ut)this.lineTickEnable[vt]&&(ve[ut]+=at*Mt[ut]*Math.max(this.lineTickLength[ut],0)/H[5*ut]);var oe=[0,0,0];if(oe[vt]=1,this.tickEnable[vt]){this.tickAngle[vt]===-3600?(this.tickAngle[vt]=0,this.tickAlign[vt]="auto"):this.tickAlign[vt]=-1,pe=1,ge=[this.tickAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]),se=[0,0,0],Lt(vt,Mt,ee);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.tickPad[ut]/H[5*ut];this._text.drawTicks(vt,this.tickSize[vt],this.tickAngle[vt],ve,this.tickColor[vt],oe,se,ge)}if(this.labelEnable[vt]){pe=0,se=[0,0,0],this.labels[vt].length>4&&(Tt(vt),pe=1),ge=[this.labelAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.labelPad[ut]/H[5*ut];ve[vt]+=.5*(W[0][vt]+W[1][vt]),this._text.drawLabel(vt,this.labelSize[vt],this.labelAngle[vt],ve,this.labelColor[vt],[0,0,0],se,ge)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(j,V){var H=new b(j);return H.update(V),H}},3840:function(t){t.exports=M;var e=0,r=1;function a(C,A,h,p,k,w){this._color=C,this.key=A,this.value=h,this.left=p,this.right=k,this._count=w}function n(C){return new a(C._color,C.key,C.value,C.left,C.right,C._count)}function o(C,A){return new a(C,A.key,A.value,A.left,A.right,A._count)}function i(C){C._count=1+(C.left?C.left._count:0)+(C.right?C.right._count:0)}function l(C,A){this._compare=C,this.root=A}var f=l.prototype;Object.defineProperty(f,"keys",{get:function(){var C=[];return this.forEach(function(A,h){C.push(A)}),C}}),Object.defineProperty(f,"values",{get:function(){var C=[];return this.forEach(function(A,h){C.push(h)}),C}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(C,A){for(var h=this._compare,p=this.root,k=[],w=[];p;){var B=h(C,p.key);k.push(p),w.push(B),B<=0?p=p.left:p=p.right}k.push(new a(e,C,A,null,null,1));for(var O=k.length-2;O>=0;--O){var p=k[O];w[O]<=0?k[O]=new a(p._color,p.key,p.value,k[O+1],p.right,p._count+1):k[O]=new a(p._color,p.key,p.value,p.left,k[O+1],p._count+1)}for(var O=k.length-1;O>1;--O){var j=k[O-1],p=k[O];if(j._color===r||p._color===r)break;var V=k[O-2];if(V.left===j)if(j.left===p){var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.left=j.right,j._color=r,j.right=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.left===V?F.left=j:F.right=j}break}}else{var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(j.right=p.left,V._color=e,V.left=p.right,p._color=r,p.left=j,p.right=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.left===V?F.left=p:F.right=p}break}}else if(j.right===p){var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.right=j.left,j._color=r,j.left=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.right===V?F.right=j:F.left=j}break}}else{var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(j.left=p.right,V._color=e,V.right=p.left,p._color=r,p.right=j,p.left=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.right===V?F.right=p:F.left=p}break}}}return k[0]._color=r,new l(h,k[0])};function x(C,A){if(A.left){var h=x(C,A.left);if(h)return h}var h=C(A.key,A.value);if(h)return h;if(A.right)return x(C,A.right)}function y(C,A,h,p){var k=A(C,p.key);if(k<=0){if(p.left){var w=y(C,A,h,p.left);if(w)return w}var w=h(p.key,p.value);if(w)return w}if(p.right)return y(C,A,h,p.right)}function v(C,A,h,p,k){var w=h(C,k.key),B=h(A,k.key),O;if(w<=0&&(k.left&&(O=v(C,A,h,p,k.left),O)||B>0&&(O=p(k.key,k.value),O)))return O;if(B>0&&k.right)return v(C,A,h,p,k.right)}f.forEach=function(C,A,h){if(this.root)switch(arguments.length){case 1:return x(C,this.root);case 2:return y(A,this._compare,C,this.root);case 3:return this._compare(A,h)>=0?void 0:v(A,h,this._compare,C,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.left;return new T(this,C)}}),Object.defineProperty(f,"end",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.right;return new T(this,C)}}),f.at=function(C){if(C<0)return new T(this,[]);for(var A=this.root,h=[];;){if(h.push(A),A.left){if(C=A.right._count)break;A=A.right}else break}return new T(this,[])},f.ge=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<=0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.gt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.lt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.le=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>=0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.find=function(C){for(var A=this._compare,h=this.root,p=[];h;){var k=A(C,h.key);if(p.push(h),k===0)return new T(this,p);k<=0?h=h.left:h=h.right}return new T(this,[])},f.remove=function(C){var A=this.find(C);return A?A.remove():this},f.get=function(C){for(var A=this._compare,h=this.root;h;){var p=A(C,h.key);if(p===0)return h.value;p<=0?h=h.left:h=h.right}};function T(C,A){this.tree=C,this._stack=A}var u=T.prototype;Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new T(this.tree,this._stack.slice())};function b(C,A){C.key=A.key,C.value=A.value,C.left=A.left,C.right=A.right,C._color=A._color,C._count=A._count}function _(C){for(var A,h,p,k,w=C.length-1;w>=0;--w){if(A=C[w],w===0){A._color=r;return}if(h=C[w-1],h.left===A){if(p=h.right,p.right&&p.right._color===e){if(p=h.right=n(p),k=p.right=n(p.right),h.right=p.left,p.left=h,p.right=k,p._color=h._color,A._color=r,h._color=r,k._color=r,i(h),i(p),w>1){var B=C[w-2];B.left===h?B.left=p:B.right=p}C[w-1]=p;return}else if(p.left&&p.left._color===e){if(p=h.right=n(p),k=p.left=n(p.left),h.right=k.left,p.left=k.right,k.left=h,k.right=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var B=C[w-2];B.left===h?B.left=k:B.right=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.right=o(e,p);return}else{h.right=o(e,p);continue}else{if(p=n(p),h.right=p.left,p.left=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var B=C[w-2];B.left===h?B.left=p:B.right=p}C[w-1]=p,C[w]=h,w+11){var B=C[w-2];B.right===h?B.right=p:B.left=p}C[w-1]=p;return}else if(p.right&&p.right._color===e){if(p=h.left=n(p),k=p.right=n(p.right),h.left=k.right,p.right=k.left,k.right=h,k.left=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var B=C[w-2];B.right===h?B.right=k:B.left=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.left=o(e,p);return}else{h.left=o(e,p);continue}else{if(p=n(p),h.left=p.right,p.right=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var B=C[w-2];B.right===h?B.right=p:B.left=p}C[w-1]=p,C[w]=h,w+1=0;--p){var h=C[p];h.left===C[p+1]?A[p]=new a(h._color,h.key,h.value,A[p+1],h.right,h._count):A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count)}if(h=A[A.length-1],h.left&&h.right){var k=A.length;for(h=h.left;h.right;)A.push(h),h=h.right;var w=A[k-1];A.push(new a(h._color,w.key,w.value,h.left,h.right,h._count)),A[k-1].key=h.key,A[k-1].value=h.value;for(var p=A.length-2;p>=k;--p)h=A[p],A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count);A[k-1].left=A[k]}if(h=A[A.length-1],h._color===e){var B=A[A.length-2];B.left===h?B.left=null:B.right===h&&(B.right=null),A.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var C=0,A=this._stack;if(A.length===0){var h=this.tree.root;return h?h._count:0}else A[A.length-1].left&&(C=A[A.length-1].left._count);for(var p=A.length-2;p>=0;--p)A[p+1]===A[p].right&&(++C,A[p].left&&(C+=A[p].left._count));return C},enumerable:!0}),u.next=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.right)for(A=A.right;A;)C.push(A),A=A.left;else for(C.pop();C.length>0&&C[C.length-1].right===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].right)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].left===C[A])return!0;return!1}}),u.update=function(C){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var h=new Array(A.length),p=A[A.length-1];h[h.length-1]=new a(p._color,p.key,C,p.left,p.right,p._count);for(var k=A.length-2;k>=0;--k)p=A[k],p.left===A[k+1]?h[k]=new a(p._color,p.key,p.value,h[k+1],p.right,p._count):h[k]=new a(p._color,p.key,p.value,p.left,h[k+1],p._count);return new l(this.tree._compare,h[0])},u.prev=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.left)for(A=A.left;A;)C.push(A),A=A.right;else for(C.pop();C.length>0&&C[C.length-1].left===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].left)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].right===C[A])return!0;return!1}});function P(C,A){return CA?1:0}function M(C){return new l(C||P,null)}},3865:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]).add(i[0].mul(o[1])),o[1].mul(i[1]))}},3952:function(t,e,r){t.exports=o;var a=r(3250);function n(i,l){for(var f=new Array(l+1),x=0;x20?52:f+32}},4040:function(t){t.exports=e;function e(r,a,n,o,i,l,f){var x=1/(a-n),y=1/(o-i),v=1/(l-f);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*y,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(a+n)*x,r[13]=(i+o)*y,r[14]=(f+l)*v,r[15]=1,r}},4041:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2],v=n[3],T=v*o+x*l-y*i,u=v*i+y*o-f*l,b=v*l+f*i-x*o,_=-f*o-x*i-y*l;return r[0]=T*v+_*-f+u*-y-b*-x,r[1]=u*v+_*-x+b*-f-T*-y,r[2]=b*v+_*-y+T*-x-u*-f,r[3]=a[3],r}},4081:function(t){t.exports=e;function e(r,a,n,o,i,l,f,x,y,v){var T=a+l+v;if(u>0){var u=Math.sqrt(T+1);r[0]=.5*(f-y)/u,r[1]=.5*(x-o)/u,r[2]=.5*(n-l)/u,r[3]=.5*u}else{var b=Math.max(a,l,v),u=Math.sqrt(2*b-T+1);a>=b?(r[0]=.5*u,r[1]=.5*(i+n)/u,r[2]=.5*(x+o)/u,r[3]=.5*(f-y)/u):l>=b?(r[0]=.5*(n+i)/u,r[1]=.5*u,r[2]=.5*(y+f)/u,r[3]=.5*(x-o)/u):(r[0]=.5*(o+x)/u,r[1]=.5*(f+y)/u,r[2]=.5*u,r[3]=.5*(n-i)/u)}return r}},4100:function(t,e,r){var a=r(4437),n=r(3837),o=r(5445),i=r(4449),l=r(3589),f=r(2260),x=r(7169),y=r(351),v=r(4772),T=r(4040),u=r(799),b=r(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:a};function _(){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 P(p,k){var w=null;try{w=p.getContext("webgl",k),w||(w=p.getContext("experimental-webgl",k))}catch{return null}return w}function M(p){var k=Math.round(Math.log(Math.abs(p))/Math.log(10));if(k<0){var w=Math.round(Math.pow(10,-k));return Math.ceil(p*w)/w}else if(k>0){var w=Math.round(Math.pow(10,k));return Math.ceil(p/w)*w}return Math.ceil(p)}function C(p){return typeof p=="boolean"?p:!0}function A(p){p=p||{},p.camera=p.camera||{};var k=p.canvas;if(!k)if(k=document.createElement("canvas"),p.container){var w=p.container;w.appendChild(k)}else document.body.appendChild(k);var B=p.gl;if(B||(p.glOptions&&(b=!!p.glOptions.preserveDrawingBuffer),B=P(k,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!B)throw new Error("webgl not supported");var O=p.bounds||[[-10,-10,-10],[10,10,10]],j=new _,V=f(B,B.drawingBufferWidth,B.drawingBufferHeight,{preferFloat:!b}),H=u(B),F=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,U={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:F},W=p.axes||{},q=n(B,W);q.enable=!W.disable;var J=p.spikes||{},lt=i(B,J),yt=[],mt=[],st=[],tt=[],pt=!0,it=!0,rt=new Array(16),at=new Array(16),vt={view:null,projection:rt,model:at,_ortho:!1},it=!0,K=[B.drawingBufferWidth,B.drawingBufferHeight],ft=p.cameraObject||a(k,U),ut={gl:B,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:k,selection:j,camera:ft,axes:q,axesPixels:null,spikes:lt,bounds:O,objects:yt,shape:K,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:C(p.autoResize),autoBounds:C(p.autoBounds),autoScale:!!p.autoScale,autoCenter:C(p.autoCenter),clipToBounds:C(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:vt,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(se){this.aspect[0]=se.x,this.aspect[1]=se.y,this.aspect[2]=se.z,it=!0},setBounds:function(se,Tt){this.bounds[0][se]=Tt.min,this.bounds[1][se]=Tt.max},setClearColor:function(se){this.clearColor=se},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)}},kt=[B.drawingBufferWidth/ut.pixelRatio|0,B.drawingBufferHeight/ut.pixelRatio|0];function It(){if(!ut._stopped&&ut.autoResize){var se=k.parentNode,Tt=1,Lt=1;se&&se!==document.body?(Tt=se.clientWidth,Lt=se.clientHeight):(Tt=window.innerWidth,Lt=window.innerHeight);var Mt=Math.ceil(Tt*ut.pixelRatio)|0,ee=Math.ceil(Lt*ut.pixelRatio)|0;if(Mt!==k.width||ee!==k.height){k.width=Mt,k.height=ee;var ve=k.style;ve.position=ve.position||"absolute",ve.left="0px",ve.top="0px",ve.width=Tt+"px",ve.height=Lt+"px",pt=!0}}}ut.autoResize&&It(),window.addEventListener("resize",It);function Pt(){for(var se=yt.length,Tt=tt.length,Lt=0;Lt0&&st[Tt-1]===0;)st.pop(),tt.pop().dispose()}ut.update=function(se){ut._stopped||(pt=!0,it=!0)},ut.add=function(se){ut._stopped||(se.axes=q,yt.push(se),mt.push(-1),pt=!0,it=!0,Pt())},ut.remove=function(se){if(!ut._stopped){var Tt=yt.indexOf(se);Tt<0||(yt.splice(Tt,1),mt.pop(),pt=!0,it=!0,Pt())}},ut.dispose=function(){if(!ut._stopped&&(ut._stopped=!0,window.removeEventListener("resize",It),k.removeEventListener("webglcontextlost",qt),ut.mouseListener.enabled=!1,!ut.contextLost)){q.dispose(),lt.dispose();for(var se=0;sej.distance)continue;for(var Ge=0;Gev;){var h=u[A-2],p=u[A-1];if(hu[T+1]:!0}function x(v,T,u,b){v*=2;var _=b[v];return _>1,C=M-b,A=M+b,h=_,p=C,k=M,w=A,B=P,O=v+1,j=T-1,V=0;f(h,p,u)&&(V=h,h=p,p=V),f(w,B,u)&&(V=w,w=B,B=V),f(h,k,u)&&(V=h,h=k,k=V),f(p,k,u)&&(V=p,p=k,k=V),f(h,w,u)&&(V=h,h=w,w=V),f(k,w,u)&&(V=k,k=w,w=V),f(p,B,u)&&(V=p,p=B,B=V),f(p,k,u)&&(V=p,p=k,k=V),f(w,B,u)&&(V=w,w=B,B=V);for(var H=u[2*p],F=u[2*p+1],U=u[2*w],W=u[2*w+1],q=2*h,J=2*k,lt=2*B,yt=2*_,mt=2*M,st=2*P,tt=0;tt<2;++tt){var pt=u[q+tt],rt=u[J+tt],at=u[lt+tt];u[yt+tt]=pt,u[mt+tt]=rt,u[st+tt]=at}o(C,v,u),o(A,T,u);for(var vt=O;vt<=j;++vt)if(x(vt,H,F,u))vt!==O&&n(vt,O,u),++O;else if(!x(vt,U,W,u))for(;;)if(x(j,U,W,u)){x(j,H,F,u)?(i(vt,O,j,u),++O,--j):(n(vt,j,u),--j);break}else{if(--j0)if(_[0]!==M[1][0])P=b,b=b.right;else{var p=y(b.right,_);if(p)return p;b=b.left}else{if(_[0]!==M[1][0])return b;var p=y(b.right,_);if(p)return p;b=b.left}}return P}f.castUp=function(b){var _=a.le(this.coordinates,b[0]);if(_<0)return-1;this.slabs[_];var P=y(this.slabs[_],b),M=-1;if(P&&(M=P.value),this.coordinates[_]===b[0]){var C=null;if(P&&(C=P.key),_>0){var A=y(this.slabs[_-1],b);A&&(C?i(A.key,C)>0&&(C=A.key,M=A.value):(M=A.value,C=A.key))}var h=this.horizontal[_];if(h.length>0){var p=a.ge(h,b[1],x);if(p=h.length)return M;k=h[p]}}if(k.start)if(C){var w=o(C[0],C[1],[b[0],k.y]);C[0][0]>C[1][0]&&(w=-w),w>0&&(M=k.index)}else M=k.index;else k.y!==b[1]&&(M=k.index)}}}return M};function v(b,_,P,M){this.y=b,this.index=_,this.start=P,this.closed=M}function T(b,_,P,M){this.x=b,this.segment=_,this.create=P,this.index=M}function u(b){for(var _=b.length,P=2*_,M=new Array(P),C=0;C<_;++C){var A=b[C],h=A[0][0]Math.abs(p))u.rotate(B,0,0,-h*k*Math.PI*C.rotateSpeed/window.innerWidth);else if(!C._ortho){var O=-C.zoomSpeed*w*p/window.innerHeight*(B-u.lastT())/20;u.pan(B,0,0,_*(Math.exp(O)-1))}}},!0)},C.enableMouseListeners(),C}},4449:function(t,e,r){var a=r(2762),n=r(8116),o=r(1493);t.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.buffer=b,this.vao=_,this.shader=P,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 f=l.prototype,x=[0,0,0],y=[0,0,0],v=[0,0];f.isTransparent=function(){return!1},f.drawTransparent=function(u){},f.draw=function(u){var b=this.gl,_=this.vao,P=this.shader;_.bind(),P.bind();var M=u.model||i,C=u.view||i,A=u.projection||i,h;this.axes&&(h=this.axes.lastCubeProps.axis);for(var p=x,k=y,w=0;w<3;++w)h&&h[w]<0?(p[w]=this.bounds[0][w],k[w]=this.bounds[1][w]):(p[w]=this.bounds[1][w],k[w]=this.bounds[0][w]);v[0]=b.drawingBufferWidth,v[1]=b.drawingBufferHeight,P.uniforms.model=M,P.uniforms.view=C,P.uniforms.projection=A,P.uniforms.coordinates=[this.position,p,k],P.uniforms.colors=this.colors,P.uniforms.screenShape=v;for(var w=0;w<3;++w)P.uniforms.lineWidth=this.lineWidth[w]*this.pixelRatio,this.enabled[w]&&(_.draw(b.TRIANGLES,6,6*w),this.drawSides[w]&&_.draw(b.TRIANGLES,12,18+12*w));_.unbind()},f.update=function(u){u&&("bounds"in u&&(this.bounds=u.bounds),"position"in u&&(this.position=u.position),"lineWidth"in u&&(this.lineWidth=u.lineWidth),"colors"in u&&(this.colors=u.colors),"enabled"in u&&(this.enabled=u.enabled),"drawSides"in u&&(this.drawSides=u.drawSides))},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(u,b){var _=[];function P(p,k,w,B,O,j){var V=[p,k,w,0,0,0,1];V[B+3]=1,V[B]=O,_.push.apply(_,V),V[6]=-1,_.push.apply(_,V),V[B]=j,_.push.apply(_,V),_.push.apply(_,V),V[6]=1,_.push.apply(_,V),V[B]=O,_.push.apply(_,V)}P(0,0,0,0,0,1),P(0,0,0,1,0,1),P(0,0,0,2,0,1),P(1,0,0,1,-1,1),P(1,0,0,2,-1,1),P(0,1,0,0,-1,1),P(0,1,0,2,-1,1),P(0,0,1,0,-1,1),P(0,0,1,1,-1,1);var M=a(u,_),C=n(u,[{type:u.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:u.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:u.FLOAT,buffer:M,size:1,offset:24,stride:28}]),A=o(u);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var h=new l(u,M,C,A);return h.update(b),h}},4494:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r[3]=1/a[3],r}},4505:function(t,e,r){t.exports=r(5847)},4578:function(t){t.exports=e;function e(r,a,n,o,i){return r[0]=a,r[1]=n,r[2]=o,r[3]=i,r}},4623:function(t){"use restrict";t.exports=e;function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var a=0;a0)return 1<=0)return 1<=0;--u)f[u]=x*a[u]+y*n[u]+v*o[u]+T*i[u];return f}return x*a+y*n+v*o[u]+T*i}function r(a,n,o,i,l,f){var x=l-1,y=l*l,v=x*x,T=(1+2*l)*v,u=l*v,b=y*(3-2*l),_=y*x;if(a.length){f||(f=new Array(a.length));for(var P=a.length-1;P>=0;--P)f[P]=T*a[P]+u*n[P]+b*o[P]+_*i[P];return f}return T*a+u*n+b*o+_*i}t.exports=r,t.exports.derivative=e},4772:function(t){t.exports=e;function e(r,a,n,o,i){var l=1/Math.tan(a/2),f=1/(o-i);return r[0]=l/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=l,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+o)*f,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*o*f,r[15]=0,r}},4793:function(t,e,r){function a(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function n(gt,St){for(var Nt=0;NtA)throw new RangeError('The value "'+gt+'" is invalid for option "size"');var St=new Uint8Array(gt);return Object.setPrototypeOf(St,k.prototype),St}function k(gt,St,Nt){if(typeof gt=="number"){if(typeof St=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(gt)}return w(gt,St,Nt)}k.poolSize=8192;function w(gt,St,Nt){if(typeof gt=="string")return V(gt,St);if(ArrayBuffer.isView(gt))return F(gt);if(gt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt));if(nn(gt,ArrayBuffer)||gt&&nn(gt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nn(gt,SharedArrayBuffer)||gt&&nn(gt.buffer,SharedArrayBuffer)))return U(gt,St,Nt);if(typeof gt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var re=gt.valueOf&>.valueOf();if(re!=null&&re!==gt)return k.from(re,St,Nt);var le=W(gt);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof gt[Symbol.toPrimitive]=="function")return k.from(gt[Symbol.toPrimitive]("string"),St,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt))}k.from=function(gt,St,Nt){return w(gt,St,Nt)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function B(gt){if(typeof gt!="number")throw new TypeError('"size" argument must be of type number');if(gt<0)throw new RangeError('The value "'+gt+'" is invalid for option "size"')}function O(gt,St,Nt){return B(gt),gt<=0?p(gt):St!==void 0?typeof Nt=="string"?p(gt).fill(St,Nt):p(gt).fill(St):p(gt)}k.alloc=function(gt,St,Nt){return O(gt,St,Nt)};function j(gt){return B(gt),p(gt<0?0:q(gt)|0)}k.allocUnsafe=function(gt){return j(gt)},k.allocUnsafeSlow=function(gt){return j(gt)};function V(gt,St){if((typeof St!="string"||St==="")&&(St="utf8"),!k.isEncoding(St))throw new TypeError("Unknown encoding: "+St);var Nt=J(gt,St)|0,re=p(Nt),le=re.write(gt,St);return le!==Nt&&(re=re.slice(0,le)),re}function H(gt){for(var St=gt.length<0?0:q(gt.length)|0,Nt=p(St),re=0;re=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return gt|0}k.isBuffer=function(gt){return gt!=null&>._isBuffer===!0&>!==k.prototype},k.compare=function(gt,St){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),nn(St,Uint8Array)&&(St=k.from(St,St.offset,St.byteLength)),!k.isBuffer(gt)||!k.isBuffer(St))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(gt===St)return 0;for(var Nt=gt.length,re=St.length,le=0,ke=Math.min(Nt,re);lere.length?(k.isBuffer(ke)||(ke=k.from(ke)),ke.copy(re,le)):Uint8Array.prototype.set.call(re,ke,le);else if(k.isBuffer(ke))ke.copy(re,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=ke.length}return re};function J(gt,St){if(k.isBuffer(gt))return gt.length;if(ArrayBuffer.isView(gt)||nn(gt,ArrayBuffer))return gt.byteLength;if(typeof gt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_(gt));var Nt=gt.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&Nt===0)return 0;for(var le=!1;;)switch(St){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(gt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return br(gt).length;default:if(le)return re?-1:ur(gt).length;St=(""+St).toLowerCase(),le=!0}}k.byteLength=J;function lt(gt,St,Nt){var re=!1;if((St===void 0||St<0)&&(St=0),St>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,St>>>=0,Nt<=St))return"";for(gt||(gt="utf8");;)switch(gt){case"hex":return Pt(this,St,Nt);case"utf8":case"utf-8":return K(this,St,Nt);case"ascii":return kt(this,St,Nt);case"latin1":case"binary":return It(this,St,Nt);case"base64":return it(this,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,St,Nt);default:if(re)throw new TypeError("Unknown encoding: "+gt);gt=(gt+"").toLowerCase(),re=!0}}k.prototype._isBuffer=!0;function yt(gt,St,Nt){var re=gt[St];gt[St]=gt[Nt],gt[Nt]=re}k.prototype.swap16=function(){var gt=this.length;if(gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var St=0;StSt&&(gt+=" ... "),""},C&&(k.prototype[C]=k.prototype.inspect),k.prototype.compare=function(gt,St,Nt,re,le){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),!k.isBuffer(gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_(gt));if(St===void 0&&(St=0),Nt===void 0&&(Nt=gt?gt.length:0),re===void 0&&(re=0),le===void 0&&(le=this.length),St<0||Nt>gt.length||re<0||le>this.length)throw new RangeError("out of range index");if(re>=le&&St>=Nt)return 0;if(re>=le)return-1;if(St>=Nt)return 1;if(St>>>=0,Nt>>>=0,re>>>=0,le>>>=0,this===gt)return 0;for(var ke=le-re,Ue=Nt-St,qe=Math.min(ke,Ue),or=this.slice(re,le),Sr=gt.slice(St,Nt),Mr=0;Mr2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,Le(Nt)&&(Nt=le?0:gt.length-1),Nt<0&&(Nt=gt.length+Nt),Nt>=gt.length){if(le)return-1;Nt=gt.length-1}else if(Nt<0)if(le)Nt=0;else return-1;if(typeof St=="string"&&(St=k.from(St,re)),k.isBuffer(St))return St.length===0?-1:st(gt,St,Nt,re,le);if(typeof St=="number")return St=St&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(gt,St,Nt):Uint8Array.prototype.lastIndexOf.call(gt,St,Nt):st(gt,[St],Nt,re,le);throw new TypeError("val must be string, number or Buffer")}function st(gt,St,Nt,re,le){var ke=1,Ue=gt.length,qe=St.length;if(re!==void 0&&(re=String(re).toLowerCase(),re==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(gt.length<2||St.length<2)return-1;ke=2,Ue/=2,qe/=2,Nt/=2}function or(Wn,qn){return ke===1?Wn[qn]:Wn.readUInt16BE(qn*ke)}var Sr;if(le){var Mr=-1;for(Sr=Nt;SrUe&&(Nt=Ue-qe),Sr=Nt;Sr>=0;Sr--){for(var mr=!0,Qr=0;Qrle&&(re=le)):re=le;var ke=St.length;re>ke/2&&(re=ke/2);var Ue;for(Ue=0;Ue>>0,isFinite(Nt)?(Nt=Nt>>>0,re===void 0&&(re="utf8")):(re=Nt,Nt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-St;if((Nt===void 0||Nt>le)&&(Nt=le),gt.length>0&&(Nt<0||St<0)||St>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var ke=!1;;)switch(re){case"hex":return tt(this,gt,St,Nt);case"utf8":case"utf-8":return pt(this,gt,St,Nt);case"ascii":case"latin1":case"binary":return rt(this,gt,St,Nt);case"base64":return at(this,gt,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,gt,St,Nt);default:if(ke)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),ke=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(gt,St,Nt){return St===0&&Nt===gt.length?P.fromByteArray(gt):P.fromByteArray(gt.slice(St,Nt))}function K(gt,St,Nt){Nt=Math.min(gt.length,Nt);for(var re=[],le=St;le239?4:ke>223?3:ke>191?2:1;if(le+qe<=Nt){var or=void 0,Sr=void 0,Mr=void 0,mr=void 0;switch(qe){case 1:ke<128&&(Ue=ke);break;case 2:or=gt[le+1],(or&192)===128&&(mr=(ke&31)<<6|or&63,mr>127&&(Ue=mr));break;case 3:or=gt[le+1],Sr=gt[le+2],(or&192)===128&&(Sr&192)===128&&(mr=(ke&15)<<12|(or&63)<<6|Sr&63,mr>2047&&(mr<55296||mr>57343)&&(Ue=mr));break;case 4:or=gt[le+1],Sr=gt[le+2],Mr=gt[le+3],(or&192)===128&&(Sr&192)===128&&(Mr&192)===128&&(mr=(ke&15)<<18|(or&63)<<12|(Sr&63)<<6|Mr&63,mr>65535&&mr<1114112&&(Ue=mr))}}Ue===null?(Ue=65533,qe=1):Ue>65535&&(Ue-=65536,re.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),re.push(Ue),le+=qe}return ut(re)}var ft=4096;function ut(gt){var St=gt.length;if(St<=ft)return String.fromCharCode.apply(String,gt);for(var Nt="",re=0;rere)&&(Nt=re);for(var le="",ke=St;keNt&&(gt=Nt),St<0?(St+=Nt,St<0&&(St=0)):St>Nt&&(St=Nt),StNt)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,ke=0;++ke>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt+--St],le=1;St>0&&(le*=256);)re+=this[gt+--St]*le;return re},k.prototype.readUint8=k.prototype.readUInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]|this[gt+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]<<8|this[gt+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),(this[gt]|this[gt+1]<<8|this[gt+2]<<16)+this[gt+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]*16777216+(this[gt+1]<<16|this[gt+2]<<8|this[gt+3])},k.prototype.readBigUInt64LE=ne(function(gt){gt=gt>>>0,Ae(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,24),le=this[++gt]+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+Nt*Math.pow(2,24);return BigInt(re)+(BigInt(le)<>>0,Ae(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt],le=this[++gt]*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+Nt;return(BigInt(re)<>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,ke=0;++ke=le&&(re-=Math.pow(2,8*St)),re},k.prototype.readIntBE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=St,le=1,ke=this[gt+--re];re>0&&(le*=256);)ke+=this[gt+--re]*le;return le*=128,ke>=le&&(ke-=Math.pow(2,8*St)),ke},k.prototype.readInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]&128?(255-this[gt]+1)*-1:this[gt]},k.prototype.readInt16LE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt]|this[gt+1]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt16BE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt+1]|this[gt]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]|this[gt+1]<<8|this[gt+2]<<16|this[gt+3]<<24},k.prototype.readInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]<<24|this[gt+1]<<16|this[gt+2]<<8|this[gt+3]},k.prototype.readBigInt64LE=ne(function(gt){gt=gt>>>0,Ae(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=this[gt+4]+this[gt+5]*Math.pow(2,8)+this[gt+6]*Math.pow(2,16)+(Nt<<24);return(BigInt(re)<>>0,Ae(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=(St<<24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt];return(BigInt(re)<>>0,St||Wt(gt,4,this.length),M.read(this,gt,!0,23,4)},k.prototype.readFloatBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),M.read(this,gt,!1,23,4)},k.prototype.readDoubleLE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!0,52,8)},k.prototype.readDoubleBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!1,52,8)};function Jt(gt,St,Nt,re,le,ke){if(!k.isBuffer(gt))throw new TypeError('"buffer" argument must be a Buffer instance');if(St>le||Stgt.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var ke=1,Ue=0;for(this[St]=gt&255;++Ue>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var ke=Nt-1,Ue=1;for(this[St+ke]=gt&255;--ke>=0&&(Ue*=256);)this[St+ke]=gt/Ue&255;return St+Nt},k.prototype.writeUint8=k.prototype.writeUInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,255,0),this[St]=gt&255,St+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St+3]=gt>>>24,this[St+2]=gt>>>16,this[St+1]=gt>>>8,this[St]=gt&255,St+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4};function ge(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var ke=Number(St&BigInt(4294967295));gt[Nt++]=ke,ke=ke>>8,gt[Nt++]=ke,ke=ke>>8,gt[Nt++]=ke,ke=ke>>8,gt[Nt++]=ke;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Nt}function fe(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var ke=Number(St&BigInt(4294967295));gt[Nt+7]=ke,ke=ke>>8,gt[Nt+6]=ke,ke=ke>>8,gt[Nt+5]=ke,ke=ke>>8,gt[Nt+4]=ke;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt+3]=Ue,Ue=Ue>>8,gt[Nt+2]=Ue,Ue=Ue>>8,gt[Nt+1]=Ue,Ue=Ue>>8,gt[Nt]=Ue,Nt+8}k.prototype.writeBigUInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var ke=0,Ue=1,qe=0;for(this[St]=gt&255;++ke>0)-qe&255;return St+Nt},k.prototype.writeIntBE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var ke=Nt-1,Ue=1,qe=0;for(this[St+ke]=gt&255;--ke>=0&&(Ue*=256);)gt<0&&qe===0&&this[St+ke+1]!==0&&(qe=1),this[St+ke]=(gt/Ue>>0)-qe&255;return St+Nt},k.prototype.writeInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,127,-128),gt<0&&(gt=255+gt+1),this[St]=gt&255,St+1},k.prototype.writeInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),this[St]=gt&255,this[St+1]=gt>>>8,this[St+2]=gt>>>16,this[St+3]=gt>>>24,St+4},k.prototype.writeInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),gt<0&&(gt=4294967295+gt+1),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4},k.prototype.writeBigInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pe(gt,St,Nt,re,le,ke){if(Nt+re>gt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function se(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,4),M.write(gt,St,Nt,re,23,4),Nt+4}k.prototype.writeFloatLE=function(gt,St,Nt){return se(this,gt,St,!0,Nt)},k.prototype.writeFloatBE=function(gt,St,Nt){return se(this,gt,St,!1,Nt)};function Tt(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,8),M.write(gt,St,Nt,re,52,8),Nt+8}k.prototype.writeDoubleLE=function(gt,St,Nt){return Tt(this,gt,St,!0,Nt)},k.prototype.writeDoubleBE=function(gt,St,Nt){return Tt(this,gt,St,!1,Nt)},k.prototype.copy=function(gt,St,Nt,re){if(!k.isBuffer(gt))throw new TypeError("argument should be a Buffer");if(Nt||(Nt=0),!re&&re!==0&&(re=this.length),St>=gt.length&&(St=gt.length),St||(St=0),re>0&&re=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),gt.length-St>>0,Nt=Nt===void 0?this.length:Nt>>>0,gt||(gt=0);var ke;if(typeof gt=="number")for(ke=St;keMath.pow(2,32)?le=ee(String(Nt)):typeof Nt=="bigint"&&(le=String(Nt),(Nt>Math.pow(BigInt(2),BigInt(32))||Nt<-Math.pow(BigInt(2),BigInt(32)))&&(le=ee(le)),le+="n"),re+=" It must be ".concat(St,". Received ").concat(le),re},RangeError);function ee(gt){for(var St="",Nt=gt.length,re=gt[0]==="-"?1:0;Nt>=re+4;Nt-=3)St="_".concat(gt.slice(Nt-3,Nt)).concat(St);return"".concat(gt.slice(0,Nt)).concat(St)}function ve(gt,St,Nt){Ae(St,"offset"),(gt[St]===void 0||gt[St+Nt]===void 0)&&He(St,gt.length-(Nt+1))}function oe(gt,St,Nt,re,le,ke){if(gt>Nt||gt= 0".concat(Ue," and < 2").concat(Ue," ** ").concat((ke+1)*8).concat(Ue):qe=">= -(2".concat(Ue," ** ").concat((ke+1)*8-1).concat(Ue,") and < 2 ** ")+"".concat((ke+1)*8-1).concat(Ue),new Lt.ERR_OUT_OF_RANGE("value",qe,gt)}ve(re,le,ke)}function Ae(gt,St){if(typeof gt!="number")throw new Lt.ERR_INVALID_ARG_TYPE(St,"number",gt)}function He(gt,St,Nt){throw Math.floor(gt)!==gt?(Ae(gt,Nt),new Lt.ERR_OUT_OF_RANGE("offset","an integer",gt)):St<0?new Lt.ERR_BUFFER_OUT_OF_BOUNDS:new Lt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(St),gt)}var Ge=/[^+/0-9A-Za-z-_]/g;function cr(gt){if(gt=gt.split("=")[0],gt=gt.trim().replace(Ge,""),gt.length<2)return"";for(;gt.length%4!==0;)gt=gt+"=";return gt}function ur(gt,St){St=St||1/0;for(var Nt,re=gt.length,le=null,ke=[],Ue=0;Ue55295&&Nt<57344){if(!le){if(Nt>56319){(St-=3)>-1&&ke.push(239,191,189);continue}else if(Ue+1===re){(St-=3)>-1&&ke.push(239,191,189);continue}le=Nt;continue}if(Nt<56320){(St-=3)>-1&&ke.push(239,191,189),le=Nt;continue}Nt=(le-55296<<10|Nt-56320)+65536}else le&&(St-=3)>-1&&ke.push(239,191,189);if(le=null,Nt<128){if((St-=1)<0)break;ke.push(Nt)}else if(Nt<2048){if((St-=2)<0)break;ke.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((St-=3)<0)break;ke.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((St-=4)<0)break;ke.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return ke}function jr(gt){for(var St=[],Nt=0;Nt>8,le=Nt%256,ke.push(le),ke.push(re);return ke}function br(gt){return P.toByteArray(cr(gt))}function Xr(gt,St,Nt,re){var le;for(le=0;le=St.length||le>=gt.length);++le)St[le+Nt]=gt[le];return le}function nn(gt,St){return gt instanceof St||gt!=null&>.constructor!=null&>.constructor.name!=null&>.constructor.name===St.name}function Le(gt){return gt!==gt}var Gt=function(){for(var gt="0123456789abcdef",St=new Array(256),Nt=0;Nt<16;++Nt)for(var re=Nt*16,le=0;le<16;++le)St[re+le]=gt[Nt]+gt[le];return St}();function ne(gt){return typeof BigInt>"u"?Ct:gt}function Ct(){throw new Error("BigInt not supported")}},4844:function(t){t.exports=e;function e(r,a,n,o){return r[0]=a[0]+n[0]*o,r[1]=a[1]+n[1]*o,r[2]=a[2]+n[2]*o,r[3]=a[3]+n[3]*o,r}},4905:function(t,e,r){var a=r(5874);t.exports=n;function n(o,i){var l=a(i),f=[];return f=f.concat(l(o)),f=f.concat(l(null)),f}},4935:function(t,e,r){t.exports=b;var a=r(2762),n=r(8116),o=r(4359),i=r(1879).Q,l=window||process.global||{},f=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};var x=3;function y(_,P,M,C){this.gl=_,this.shader=P,this.buffer=M,this.vao=C,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=y.prototype,T=[0,0];v.bind=function(_,P,M,C){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=P,A.projection=M,A.pixelScale=C,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(_,P,M,C,A){var h=[];function p(W,q,J,lt,yt,mt){var st=[J.style,J.weight,J.variant,J.family].join("_"),tt=f[st];tt||(tt=f[st]={});var pt=tt[q];pt||(pt=tt[q]=u(q,{triangles:!0,font:J.family,fontStyle:J.style,fontWeight:J.weight,fontVariant:J.variant,textAlign:"center",textBaseline:"middle",lineSpacing:yt,styletags:mt}));for(var rt=(lt||12)/12,at=pt.positions,vt=pt.cells,it=0,K=vt.length;it=0;--ut){var kt=at[ft[ut]];h.push(rt*kt[0],-rt*kt[1],W)}}for(var k=[0,0,0],w=[0,0,0],B=[0,0,0],O=[0,0,0],j=1.25,V={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},H=0;H<3;++H){B[H]=h.length/x|0,p(.5*(_[0][H]+_[1][H]),P[H],M[H],12,j,V),O[H]=(h.length/x|0)-B[H],k[H]=h.length/x|0;for(var F=0;F0||P.length>0;){for(;_.length>0;){var p=_.pop();if(M[p]!==-b){M[p]=b;for(var k=C[p],w=0;w<3;++w){var B=h[3*p+w];B>=0&&M[B]===0&&(A[3*p+w]?P.push(B):(_.push(B),M[B]=b))}}}var O=P;P=_,_=O,P.length=0,b=-b}var j=f(C,M,v);return T?j.concat(u.boundary):j}},5033:function(t){t.exports=e;function e(r,a,n){var o=a||0,i=n||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[o*r[12]+r[8],o*r[13]+r[9],o*r[14]+r[10],o*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(t,e,r){t.exports=b;var a=r(3250)[3],n=r(4209),o=r(3352),i=r(2478);function l(){return!0}function f(_){return function(P,M){var C=_[P];return C?!!C.queryPoint(M,l):!1}}function x(_){for(var P={},M=0;M<_.length;++M){var C=_[M],A=C[0][0],h=C[0][1],p=C[1][1],k=[Math.min(h,p),Math.max(h,p)];A in P?P[A].push(k):P[A]=[k]}for(var w={},B=Object.keys(P),M=0;M0&&P[C]===M[0])A=_[C-1];else return 1;for(var h=1;A;){var p=A.key,k=a(M,p[0],p[1]);if(p[0][0]0)h=-1,A=A.right;else return 0;else if(k>0)A=A.left;else if(k<0)h=1,A=A.right;else return 0}return h}}function v(_){return 1}function T(_){return function(P){return _(P[0],P[1])?0:1}}function u(_,P){return function(M){return _(M[0],M[1])?0:P(M)}}function b(_){for(var P=_.length,M=[],C=[],A=0,h=0;h"u"?r(606):WeakMap,i=new o,l=0;function f(P,M,C,A,h,p,k){this.id=P,this.src=M,this.type=C,this.shader=A,this.count=p,this.programs=[],this.cache=k}f.prototype.dispose=function(){if(--this.count===0){for(var P=this.cache,M=P.gl,C=this.programs,A=0,h=C.length;A0&&(f=1/Math.sqrt(f),r[0]=n*f,r[1]=o*f,r[2]=i*f,r[3]=l*f),r}},5202:function(t,e,r){var a=r(1944),n=r(8210);t.exports=l,t.exports.positive=f,t.exports.negative=x;function o(y,v){var T=n(a(y,v),[v[v.length-1]]);return T[T.length-1]}function i(y,v,T,u){var b=u-v,_=-v/b;_<0?_=0:_>1&&(_=1);for(var P=1-_,M=y.length,C=new Array(M),A=0;A0||b>0&&C<0){var A=i(_,C,P,b);T.push(A),u.push(A.slice())}C<0?u.push(P.slice()):C>0?T.push(P.slice()):(T.push(P.slice()),u.push(P.slice())),b=C}return{positive:T,negative:u}}function f(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M>=0&&T.push(_.slice()),u=M}return T}function x(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M<=0&&T.push(_.slice()),u=M}return T}},5219:function(t){t.exports=function(e){for(var r=e.length,a,n=0;n13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},5250:function(t){t.exports=r;var e=+(Math.pow(2,27)+1);function r(a,n,o){var i=a*n,l=e*a,f=l-a,x=l-f,y=a-x,v=e*n,T=v-n,u=v-T,b=n-u,_=i-x*u,P=_-y*u,M=P-x*b,C=y*b-M;return o?(o[0]=C,o[1]=i,o):[C,i]}},5298:function(t,e){var r={"float64,2,1,0":function(){return function(x,y,v,T,u){var b=x[0],_=x[1],P=x[2],M=v[0],C=v[1],A=v[2];T|=0;var h=0,p=0,k=0,w=A,B=C-P*A,O=M-_*C;for(k=0;k0;){H<64?(M=H,H=0):(M=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64),T=j+H*h+F*p,_=V+H*w+F*B;var U=0,W=0,q=0,J=k,lt=h-A*k,yt=p-M*h,mt=O,st=w-A*O,tt=B-M*w;for(q=0;q0;){B<64?(M=B,B=0):(M=64,B-=64);for(var O=x[0]|0;O>0;){O<64?(P=O,O=0):(P=64,O-=64),T=k+B*A+O*C,_=w+B*p+O*h;var j=0,V=0,H=A,F=C-M*A,U=p,W=h-M*p;for(V=0;V0;){V<64?(C=V,V=0):(C=64,V-=64);for(var H=x[0]|0;H>0;){H<64?(P=H,H=0):(P=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(M=F,F=0):(M=64,F-=64),T=O+V*p+H*A+F*h,_=j+V*B+H*k+F*w;var U=0,W=0,q=0,J=p,lt=A-C*p,yt=h-P*A,mt=B,st=k-C*B,tt=w-P*k;for(q=0;q=0}}(),o.removeTriangle=function(f,x,y){var v=this.stars;i(v[f],x,y),i(v[x],y,f),i(v[y],f,x)},o.addTriangle=function(f,x,y){var v=this.stars;v[f].push(x,y),v[x].push(y,f),v[y].push(f,x)},o.opposite=function(f,x){for(var y=this.stars[x],v=1,T=y.length;v0;){var u=y.pop();f[u]=!1;for(var b=l[u],v=0;v0){for(var st=0;st<24;++st)O.push(O[O.length-12]);F+=2,lt=!0}continue t}U[0][w]=Math.min(U[0][w],yt[w],mt[w]),U[1][w]=Math.max(U[1][w],yt[w],mt[w])}var tt,pt;Array.isArray(q[0])?(tt=q.length>k-1?q[k-1]:q.length>0?q[q.length-1]:[0,0,0,1],pt=q.length>k?q[k]:q.length>0?q[q.length-1]:[0,0,0,1]):tt=pt=q,tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),pt.length===3&&(pt=[pt[0],pt[1],pt[2],1]),!this.hasAlpha&&tt[3]<1&&(this.hasAlpha=!0);var rt;Array.isArray(J)?rt=J.length>k-1?J[k-1]:J.length>0?J[J.length-1]:[0,0,0,1]:rt=J;var at=H;if(H+=_(yt,mt),lt){for(w=0;w<2;++w)O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3]);F+=2,lt=!1}O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3],yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,-rt,tt[0],tt[1],tt[2],tt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,-rt,pt[0],pt[1],pt[2],pt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,rt,pt[0],pt[1],pt[2],pt[3]),F+=4}}if(this.buffer.update(O),j.push(H),V.push(W[W.length-1].slice()),this.bounds=U,this.vertexCount=F,this.points=V,this.arcLength=j,"dashes"in p){var vt=p.dashes,it=vt.slice();for(it.unshift(0),k=1;kr[n][0]&&(n=o);return an?[[n],[a]]:[[a]]}},5771:function(t,e,r){var a=r(8507),n=r(3788),o=r(2419);t.exports=i;function i(l){l.sort(n);for(var f=l.length,x=0,y=0;y0){var u=l[x-1];if(a(v,u)===0&&o(u)!==T){x-=1;continue}}l[x++]=v}}return l.length=x,l}},5838:function(t,e,r){t.exports=n;var a=r(7842);function n(o){for(var i=new Array(o.length),l=0;l0)continue;ee=Tt.slice(0,1).join("")}return it(ee),lt+=ee.length,U=U.slice(ee.length),U.length}while(!0)}function ge(){return/[^a-fA-F0-9]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function fe(){return H==="."||/[eE]/.test(H)?(U.push(H),V=_,F=H,O+1):H==="x"&&U.length===1&&U[0]==="0"?(V=p,U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function pe(){return H==="f"&&(U.push(H),F=H,O+=1),/[eE]/.test(H)||(H==="-"||H==="+")&&/[eE]/.test(F)?(U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function se(){if(/[^\d\w_]/.test(H)){var Tt=U.join("");return vt[Tt]?V=C:at[Tt]?V=M:V=P,it(U.join("")),V=f,O}return U.push(H),F=H,O+1}}},5878:function(t,e,r){t.exports=i;var a=r(3250),n=r(2014);function o(l,f,x){var y=Math.abs(a(l,f,x)),v=Math.sqrt(Math.pow(f[0]-x[0],2)+Math.pow(f[1]-x[1],2));return y/v}function i(l,f,x){for(var y=f.length,v=l.length,T=new Array(y),u=new Array(y),b=new Array(y),_=new Array(y),P=0;P>1:(st>>1)-1}function R(st){for(var tt=k(st);;){var dt=tt,rt=2*st+1,at=2*(st+1),vt=st;if(rt0;){var dt=w(st);if(dt>=0){var rt=k(dt);if(tt0){var st=F[0];return p(0,q-1),q-=1,R(0),st}return-1}function V(st,tt){var dt=F[st];return b[dt]===tt?st:(b[dt]=-1/0,O(st),j(),b[dt]=tt,q+=1,O(q-1))}function H(st){if(!_[st]){_[st]=!0;var tt=T[st],dt=u[st];T[dt]>=0&&(T[dt]=tt),u[tt]>=0&&(u[tt]=dt),U[tt]>=0&&V(U[tt],h(tt)),U[dt]>=0&&V(U[dt],h(dt))}}for(var F=[],U=new Array(y),P=0;P>1;P>=0;--P)R(P);for(;;){var J=j();if(J<0||b[J]>x)break;H(J)}for(var lt=[],P=0;P=0&&dt>=0&&tt!==dt){var rt=U[tt],at=U[dt];rt!==at&&mt.push([rt,at])}}),n.unique(n.normalize(mt)),{positions:lt,edges:mt}}},5911:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2];return r[0]=i*y-l*x,r[1]=l*f-o*y,r[2]=o*x-i*f,r}},5964:function(t){t.exports=function(e){return!e&&e!==0?"":e.toString()}},5995:function(t,e,r){t.exports=o;var a=r(7642),n=r(6037);function o(i,l){return a(l).filter(function(f){for(var x=new Array(f.length),y=0;y2&&k[1]>2&&A(p.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(C(p.pick(0,-1).lo(1).hi(k[1]-2),h.pick(0,-1,1).lo(1).hi(k[1]-2)),M(h.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(C(p.pick(k[0]-1,-1).lo(1).hi(k[1]-2),h.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(h.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(C(p.pick(-1,0).lo(1).hi(k[0]-2),h.pick(-1,0,0).lo(1).hi(k[0]-2)),M(h.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(C(p.pick(-1,k[1]-1).lo(1).hi(k[0]-2),h.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(h.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(k[0]-1,0,0,0),h.set(k[0]-1,0,1,0),h.set(0,k[1]-1,0,0),h.set(0,k[1]-1,1,0),h.set(k[0]-1,k[1]-1,0,0),h.set(k[0]-1,k[1]-1,1,0),h}}function _(P){var M=P.join(),k=y[M];if(k)return k;for(var C=P.length,A=[v,T],h=1;h<=C;++h)A.push(u(h));var p=b,k=p.apply(void 0,A);return y[M]=k,k}t.exports=function(P,M,C){if(Array.isArray(C)||(typeof C=="string"?C=a(M.dimension,C):C=a(M.dimension,"clamp")),M.size===0)return P;if(M.dimension===0)return P.set(0),P;var A=_(C);return A(P,M)}},6204:function(t){t.exports=e;function e(r){var a,n,o,i=r.length,l=0;for(a=0;ay&&(y=a.length(O)),w&&!k){var j=2*a.distance(M,R)/(a.length(C)+a.length(O));j?(h=Math.min(h,j),p=!1):p=!0}p||(M=R,C=O),A.push(O)}var V=[v,u,_],H=[T,b,P];i&&(i[0]=V,i[1]=H),y===0&&(y=1);var F=1/y;isFinite(h)||(h=1),x.vectorScale=h;var U=o.coneSize||(k?1:.5);o.absoluteConeSize&&(U=o.absoluteConeSize*F),x.coneScale=U;for(var w=0,W=0;wlt&&(H|=1<lt){H|=1<x[O][1])&&(vt=O);for(var it=-1,O=0;O<3;++O){var Y=vt^1<x[ft][0]&&(ft=Y)}}var ut=_;ut[0]=ut[1]=ut[2]=0,ut[a.log2(it^vt)]=vt&it,ut[a.log2(vt^ft)]=vt&ft;var kt=ft^7;kt===H||kt===at?(kt=it^7,ut[a.log2(ft^kt)]=kt&ft):ut[a.log2(it^kt)]=kt⁢for(var It=P,Pt=H,W=0;W<3;++W)Pt&1<=0&&(x=l.length-f-1);var y=Math.pow(10,x),v=Math.round(o*i*y),T=v+"";if(T.indexOf("e")>=0)return T;var u=v/y,b=v%y;v<0?(u=-Math.ceil(u)|0,b=-b|0):(u=Math.floor(u)|0,b=b|0);var _=""+u;if(v<0&&(_="-"+_),x){for(var P=""+b;P.length=o[0][f];--v)x.push({x:v*i[f],text:r(i[f],v)});l.push(x)}return l}function n(o,i){for(var l=0;l<3;++l){if(o[l].length!==i[l].length)return!1;for(var f=0;fM+1)throw new Error(_+" map requires nshades to be at least size "+b.length);Array.isArray(x.alpha)?x.alpha.length!==2?C=[1,1]:C=x.alpha.slice():typeof x.alpha=="number"?C=[x.alpha,x.alpha]:C=[1,1],y=b.map(function(R){return Math.round(R.index*M)}),C[0]=Math.min(Math.max(C[0],0),1),C[1]=Math.min(Math.max(C[1],0),1);var h=b.map(function(R,O){var j=b[O].index,V=b[O].rgb.slice();return V.length===4&&V[3]>=0&&V[3]<=1||(V[3]=C[0]+(C[1]-C[0])*j),V}),p=[];for(A=0;A0)continue;ee=Tt.slice(0,1).join("")}return it(ee),lt+=ee.length,U=U.slice(ee.length),U.length}while(!0)}function ge(){return/[^a-fA-F0-9]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function fe(){return H==="."||/[eE]/.test(H)?(U.push(H),V=_,F=H,O+1):H==="x"&&U.length===1&&U[0]==="0"?(V=p,U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function pe(){return H==="f"&&(U.push(H),F=H,O+=1),/[eE]/.test(H)||(H==="-"||H==="+")&&/[eE]/.test(F)?(U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function se(){if(/[^\d\w_]/.test(H)){var Tt=U.join("");return vt[Tt]?V=C:at[Tt]?V=M:V=P,it(U.join("")),V=f,O}return U.push(H),F=H,O+1}}},5878:function(t,e,r){t.exports=i;var a=r(3250),n=r(2014);function o(l,f,x){var y=Math.abs(a(l,f,x)),v=Math.sqrt(Math.pow(f[0]-x[0],2)+Math.pow(f[1]-x[1],2));return y/v}function i(l,f,x){for(var y=f.length,v=l.length,T=new Array(y),u=new Array(y),b=new Array(y),_=new Array(y),P=0;P>1:(st>>1)-1}function B(st){for(var tt=k(st);;){var pt=tt,rt=2*st+1,at=2*(st+1),vt=st;if(rt0;){var pt=w(st);if(pt>=0){var rt=k(pt);if(tt0){var st=F[0];return p(0,q-1),q-=1,B(0),st}return-1}function V(st,tt){var pt=F[st];return b[pt]===tt?st:(b[pt]=-1/0,O(st),j(),b[pt]=tt,q+=1,O(q-1))}function H(st){if(!_[st]){_[st]=!0;var tt=T[st],pt=u[st];T[pt]>=0&&(T[pt]=tt),u[tt]>=0&&(u[tt]=pt),U[tt]>=0&&V(U[tt],h(tt)),U[pt]>=0&&V(U[pt],h(pt))}}for(var F=[],U=new Array(y),P=0;P>1;P>=0;--P)B(P);for(;;){var J=j();if(J<0||b[J]>x)break;H(J)}for(var lt=[],P=0;P=0&&pt>=0&&tt!==pt){var rt=U[tt],at=U[pt];rt!==at&&mt.push([rt,at])}}),n.unique(n.normalize(mt)),{positions:lt,edges:mt}}},5911:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2];return r[0]=i*y-l*x,r[1]=l*f-o*y,r[2]=o*x-i*f,r}},5964:function(t){t.exports=function(e){return!e&&e!==0?"":e.toString()}},5995:function(t,e,r){t.exports=o;var a=r(7642),n=r(6037);function o(i,l){return a(l).filter(function(f){for(var x=new Array(f.length),y=0;y2&&k[1]>2&&A(p.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(C(p.pick(0,-1).lo(1).hi(k[1]-2),h.pick(0,-1,1).lo(1).hi(k[1]-2)),M(h.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(C(p.pick(k[0]-1,-1).lo(1).hi(k[1]-2),h.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(h.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(C(p.pick(-1,0).lo(1).hi(k[0]-2),h.pick(-1,0,0).lo(1).hi(k[0]-2)),M(h.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(C(p.pick(-1,k[1]-1).lo(1).hi(k[0]-2),h.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(h.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(k[0]-1,0,0,0),h.set(k[0]-1,0,1,0),h.set(0,k[1]-1,0,0),h.set(0,k[1]-1,1,0),h.set(k[0]-1,k[1]-1,0,0),h.set(k[0]-1,k[1]-1,1,0),h}}function _(P){var M=P.join(),k=y[M];if(k)return k;for(var C=P.length,A=[v,T],h=1;h<=C;++h)A.push(u(h));var p=b,k=p.apply(void 0,A);return y[M]=k,k}t.exports=function(P,M,C){if(Array.isArray(C)||(typeof C=="string"?C=a(M.dimension,C):C=a(M.dimension,"clamp")),M.size===0)return P;if(M.dimension===0)return P.set(0),P;var A=_(C);return A(P,M)}},6204:function(t){t.exports=e;function e(r){var a,n,o,i=r.length,l=0;for(a=0;ay&&(y=a.length(O)),w&&!k){var j=2*a.distance(M,B)/(a.length(C)+a.length(O));j?(h=Math.min(h,j),p=!1):p=!0}p||(M=B,C=O),A.push(O)}var V=[v,u,_],H=[T,b,P];i&&(i[0]=V,i[1]=H),y===0&&(y=1);var F=1/y;isFinite(h)||(h=1),x.vectorScale=h;var U=o.coneSize||(k?1:.5);o.absoluteConeSize&&(U=o.absoluteConeSize*F),x.coneScale=U;for(var w=0,W=0;wlt&&(H|=1<lt){H|=1<x[O][1])&&(vt=O);for(var it=-1,O=0;O<3;++O){var K=vt^1<x[ft][0]&&(ft=K)}}var ut=_;ut[0]=ut[1]=ut[2]=0,ut[a.log2(it^vt)]=vt&it,ut[a.log2(vt^ft)]=vt&ft;var kt=ft^7;kt===H||kt===at?(kt=it^7,ut[a.log2(ft^kt)]=kt&ft):ut[a.log2(it^kt)]=kt⁢for(var It=P,Pt=H,W=0;W<3;++W)Pt&1<=0&&(x=l.length-f-1);var y=Math.pow(10,x),v=Math.round(o*i*y),T=v+"";if(T.indexOf("e")>=0)return T;var u=v/y,b=v%y;v<0?(u=-Math.ceil(u)|0,b=-b|0):(u=Math.floor(u)|0,b=b|0);var _=""+u;if(v<0&&(_="-"+_),x){for(var P=""+b;P.length=o[0][f];--v)x.push({x:v*i[f],text:r(i[f],v)});l.push(x)}return l}function n(o,i){for(var l=0;l<3;++l){if(o[l].length!==i[l].length)return!1;for(var f=0;fM+1)throw new Error(_+" map requires nshades to be at least size "+b.length);Array.isArray(x.alpha)?x.alpha.length!==2?C=[1,1]:C=x.alpha.slice():typeof x.alpha=="number"?C=[x.alpha,x.alpha]:C=[1,1],y=b.map(function(B){return Math.round(B.index*M)}),C[0]=Math.min(Math.max(C[0],0),1),C[1]=Math.min(Math.max(C[1],0),1);var h=b.map(function(B,O){var j=b[O].index,V=b[O].rgb.slice();return V.length===4&&V[3]>=0&&V[3]<=1||(V[3]=C[0]+(C[1]-C[0])*j),V}),p=[];for(A=0;A0?F:U},l.min=function(F,U){return F.cmp(U)<0?F:U},l.prototype._init=function(F,U,W){if(typeof F=="number")return this._initNumber(F,U,W);if(typeof F=="object")return this._initArray(F,U,W);U==="hex"&&(U=16),o(U===(U|0)&&U>=2&&U<=36),F=F.toString().replace(/\s+/g,"");var q=0;F[0]==="-"&&(q++,this.negative=1),q=0;q-=3)lt=F[q]|F[q-1]<<8|F[q-2]<<16,this.words[J]|=lt<>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);else if(W==="le")for(q=0,J=0;q>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);return this.strip()};function x(F,U){var W=F.charCodeAt(U);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function y(F,U,W){var q=x(F,W);return W-1>=U&&(q|=x(F,W-1)<<4),q}l.prototype._parseHex=function(F,U,W){this.length=Math.ceil((F.length-U)/6),this.words=new Array(this.length);for(var q=0;q=U;q-=2)yt=y(F,U,q)<=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8;else{var mt=F.length-U;for(q=mt%2===0?U+1:U;q=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8}this.strip()};function v(F,U,W,q){for(var J=0,lt=Math.min(F.length,W),yt=U;yt=49?J+=mt-49+10:mt>=17?J+=mt-17+10:J+=mt}return J}l.prototype._parseBase=function(F,U,W){this.words=[0],this.length=1;for(var q=0,J=1;J<=67108863;J*=U)q++;q--,J=J/U|0;for(var lt=F.length-W,yt=lt%q,mt=Math.min(lt,lt-yt)+W,st=0,tt=W;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[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],b=[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];l.prototype.toString=function(F,U){F=F||10,U=U|0||1;var W;if(F===16||F==="hex"){W="";for(var q=0,J=0,lt=0;lt>>24-q&16777215,J!==0||lt!==this.length-1?W=T[6-mt.length]+mt+W:W=mt+W,q+=2,q>=26&&(q-=26,lt--)}for(J!==0&&(W=J.toString(16)+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if(F===(F|0)&&F>=2&&F<=36){var st=u[F],tt=b[F];W="";var dt=this.clone();for(dt.negative=0;!dt.isZero();){var rt=dt.modn(tt).toString(F);dt=dt.idivn(tt),dt.isZero()?W=rt+W:W=T[st-rt.length]+rt+W}for(this.isZero()&&(W="0"+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}o(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&o(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(F,U){return o(typeof f<"u"),this.toArrayLike(f,F,U)},l.prototype.toArray=function(F,U){return this.toArrayLike(Array,F,U)},l.prototype.toArrayLike=function(F,U,W){var q=this.byteLength(),J=W||Math.max(1,q);o(q<=J,"byte array longer than desired length"),o(J>0,"Requested array length <= 0"),this.strip();var lt=U==="le",yt=new F(J),mt,st,tt=this.clone();if(lt){for(st=0;!tt.isZero();st++)mt=tt.andln(255),tt.iushrn(8),yt[st]=mt;for(;st=4096&&(W+=13,U>>>=13),U>=64&&(W+=7,U>>>=7),U>=8&&(W+=4,U>>>=4),U>=2&&(W+=2,U>>>=2),W+U},l.prototype._zeroBits=function(F){if(F===0)return 26;var U=F,W=0;return(U&8191)===0&&(W+=13,U>>>=13),(U&127)===0&&(W+=7,U>>>=7),(U&15)===0&&(W+=4,U>>>=4),(U&3)===0&&(W+=2,U>>>=2),(U&1)===0&&W++,W},l.prototype.bitLength=function(){var F=this.words[this.length-1],U=this._countBits(F);return(this.length-1)*26+U};function _(F){for(var U=new Array(F.bitLength()),W=0;W>>J}return U}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,U=0;UF.length?this.clone().ior(F):F.clone().ior(this)},l.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},l.prototype.iuand=function(F){var U;this.length>F.length?U=F:U=this;for(var W=0;WF.length?this.clone().iand(F):F.clone().iand(this)},l.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},l.prototype.iuxor=function(F){var U,W;this.length>F.length?(U=this,W=F):(U=F,W=this);for(var q=0;qF.length?this.clone().ixor(F):F.clone().ixor(this)},l.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},l.prototype.inotn=function(F){o(typeof F=="number"&&F>=0);var U=Math.ceil(F/26)|0,W=F%26;this._expand(U),W>0&&U--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-W),this.strip()},l.prototype.notn=function(F){return this.clone().inotn(F)},l.prototype.setn=function(F,U){o(typeof F=="number"&&F>=0);var W=F/26|0,q=F%26;return this._expand(W+1),U?this.words[W]=this.words[W]|1<F.length?(W=this,q=F):(W=F,q=this);for(var J=0,lt=0;lt>>26;for(;J!==0&<>>26;if(this.length=W.length,J!==0)this.words[this.length]=J,this.length++;else if(W!==this)for(;ltF.length?this.clone().iadd(F):F.clone().iadd(this)},l.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var U=this.iadd(F);return F.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var W=this.cmp(F);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,J;W>0?(q=this,J=F):(q=F,J=this);for(var lt=0,yt=0;yt>26,this.words[yt]=U&67108863;for(;lt!==0&&yt>26,this.words[yt]=U&67108863;if(lt===0&&yt>>26,rt=st&67108863,at=Math.min(tt,U.length-1),vt=Math.max(0,tt-F.length+1);vt<=at;vt++){var it=tt-vt|0;J=F.words[it]|0,lt=U.words[vt]|0,yt=J*lt+rt,dt+=yt/67108864|0,rt=yt&67108863}W.words[tt]=rt|0,st=dt|0}return st!==0?W.words[tt]=st|0:W.length--,W.strip()}var M=function(F,U,W){var q=F.words,J=U.words,lt=W.words,yt=0,mt,st,tt,dt=q[0]|0,rt=dt&8191,at=dt>>>13,vt=q[1]|0,it=vt&8191,Y=vt>>>13,ft=q[2]|0,ut=ft&8191,kt=ft>>>13,It=q[3]|0,Pt=It&8191,qt=It>>>13,Wt=q[4]|0,Jt=Wt&8191,ge=Wt>>>13,fe=q[5]|0,pe=fe&8191,se=fe>>>13,Tt=q[6]|0,Lt=Tt&8191,Mt=Tt>>>13,ee=q[7]|0,ve=ee&8191,oe=ee>>>13,Te=q[8]|0,He=Te&8191,Ge=Te>>>13,cr=q[9]|0,ur=cr&8191,jr=cr>>>13,Wr=J[0]|0,br=Wr&8191,Xr=Wr>>>13,nn=J[1]|0,Le=nn&8191,Gt=nn>>>13,ne=J[2]|0,Ct=ne&8191,gt=ne>>>13,St=J[3]|0,Nt=St&8191,re=St>>>13,le=J[4]|0,we=le&8191,Ue=le>>>13,qe=J[5]|0,or=qe&8191,Sr=qe>>>13,Ar=J[6]|0,mr=Ar&8191,Qr=Ar>>>13,Hn=J[7]|0,Wn=Hn&8191,Xn=Hn>>>13,Ii=J[8]|0,oi=Ii&8191,$n=Ii>>>13,sa=J[9]|0,Zi=sa&8191,We=sa>>>13;W.negative=F.negative^U.negative,W.length=19,mt=Math.imul(rt,br),st=Math.imul(rt,Xr),st=st+Math.imul(at,br)|0,tt=Math.imul(at,Xr);var nr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(nr>>>26)|0,nr&=67108863,mt=Math.imul(it,br),st=Math.imul(it,Xr),st=st+Math.imul(Y,br)|0,tt=Math.imul(Y,Xr),mt=mt+Math.imul(rt,Le)|0,st=st+Math.imul(rt,Gt)|0,st=st+Math.imul(at,Le)|0,tt=tt+Math.imul(at,Gt)|0;var fr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fr>>>26)|0,fr&=67108863,mt=Math.imul(ut,br),st=Math.imul(ut,Xr),st=st+Math.imul(kt,br)|0,tt=Math.imul(kt,Xr),mt=mt+Math.imul(it,Le)|0,st=st+Math.imul(it,Gt)|0,st=st+Math.imul(Y,Le)|0,tt=tt+Math.imul(Y,Gt)|0,mt=mt+Math.imul(rt,Ct)|0,st=st+Math.imul(rt,gt)|0,st=st+Math.imul(at,Ct)|0,tt=tt+Math.imul(at,gt)|0;var _r=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(_r>>>26)|0,_r&=67108863,mt=Math.imul(Pt,br),st=Math.imul(Pt,Xr),st=st+Math.imul(qt,br)|0,tt=Math.imul(qt,Xr),mt=mt+Math.imul(ut,Le)|0,st=st+Math.imul(ut,Gt)|0,st=st+Math.imul(kt,Le)|0,tt=tt+Math.imul(kt,Gt)|0,mt=mt+Math.imul(it,Ct)|0,st=st+Math.imul(it,gt)|0,st=st+Math.imul(Y,Ct)|0,tt=tt+Math.imul(Y,gt)|0,mt=mt+Math.imul(rt,Nt)|0,st=st+Math.imul(rt,re)|0,st=st+Math.imul(at,Nt)|0,tt=tt+Math.imul(at,re)|0;var tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(tn>>>26)|0,tn&=67108863,mt=Math.imul(Jt,br),st=Math.imul(Jt,Xr),st=st+Math.imul(ge,br)|0,tt=Math.imul(ge,Xr),mt=mt+Math.imul(Pt,Le)|0,st=st+Math.imul(Pt,Gt)|0,st=st+Math.imul(qt,Le)|0,tt=tt+Math.imul(qt,Gt)|0,mt=mt+Math.imul(ut,Ct)|0,st=st+Math.imul(ut,gt)|0,st=st+Math.imul(kt,Ct)|0,tt=tt+Math.imul(kt,gt)|0,mt=mt+Math.imul(it,Nt)|0,st=st+Math.imul(it,re)|0,st=st+Math.imul(Y,Nt)|0,tt=tt+Math.imul(Y,re)|0,mt=mt+Math.imul(rt,we)|0,st=st+Math.imul(rt,Ue)|0,st=st+Math.imul(at,we)|0,tt=tt+Math.imul(at,Ue)|0;var Cn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,mt=Math.imul(pe,br),st=Math.imul(pe,Xr),st=st+Math.imul(se,br)|0,tt=Math.imul(se,Xr),mt=mt+Math.imul(Jt,Le)|0,st=st+Math.imul(Jt,Gt)|0,st=st+Math.imul(ge,Le)|0,tt=tt+Math.imul(ge,Gt)|0,mt=mt+Math.imul(Pt,Ct)|0,st=st+Math.imul(Pt,gt)|0,st=st+Math.imul(qt,Ct)|0,tt=tt+Math.imul(qt,gt)|0,mt=mt+Math.imul(ut,Nt)|0,st=st+Math.imul(ut,re)|0,st=st+Math.imul(kt,Nt)|0,tt=tt+Math.imul(kt,re)|0,mt=mt+Math.imul(it,we)|0,st=st+Math.imul(it,Ue)|0,st=st+Math.imul(Y,we)|0,tt=tt+Math.imul(Y,Ue)|0,mt=mt+Math.imul(rt,or)|0,st=st+Math.imul(rt,Sr)|0,st=st+Math.imul(at,or)|0,tt=tt+Math.imul(at,Sr)|0;var Tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,mt=Math.imul(Lt,br),st=Math.imul(Lt,Xr),st=st+Math.imul(Mt,br)|0,tt=Math.imul(Mt,Xr),mt=mt+Math.imul(pe,Le)|0,st=st+Math.imul(pe,Gt)|0,st=st+Math.imul(se,Le)|0,tt=tt+Math.imul(se,Gt)|0,mt=mt+Math.imul(Jt,Ct)|0,st=st+Math.imul(Jt,gt)|0,st=st+Math.imul(ge,Ct)|0,tt=tt+Math.imul(ge,gt)|0,mt=mt+Math.imul(Pt,Nt)|0,st=st+Math.imul(Pt,re)|0,st=st+Math.imul(qt,Nt)|0,tt=tt+Math.imul(qt,re)|0,mt=mt+Math.imul(ut,we)|0,st=st+Math.imul(ut,Ue)|0,st=st+Math.imul(kt,we)|0,tt=tt+Math.imul(kt,Ue)|0,mt=mt+Math.imul(it,or)|0,st=st+Math.imul(it,Sr)|0,st=st+Math.imul(Y,or)|0,tt=tt+Math.imul(Y,Sr)|0,mt=mt+Math.imul(rt,mr)|0,st=st+Math.imul(rt,Qr)|0,st=st+Math.imul(at,mr)|0,tt=tt+Math.imul(at,Qr)|0;var Mn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,mt=Math.imul(ve,br),st=Math.imul(ve,Xr),st=st+Math.imul(oe,br)|0,tt=Math.imul(oe,Xr),mt=mt+Math.imul(Lt,Le)|0,st=st+Math.imul(Lt,Gt)|0,st=st+Math.imul(Mt,Le)|0,tt=tt+Math.imul(Mt,Gt)|0,mt=mt+Math.imul(pe,Ct)|0,st=st+Math.imul(pe,gt)|0,st=st+Math.imul(se,Ct)|0,tt=tt+Math.imul(se,gt)|0,mt=mt+Math.imul(Jt,Nt)|0,st=st+Math.imul(Jt,re)|0,st=st+Math.imul(ge,Nt)|0,tt=tt+Math.imul(ge,re)|0,mt=mt+Math.imul(Pt,we)|0,st=st+Math.imul(Pt,Ue)|0,st=st+Math.imul(qt,we)|0,tt=tt+Math.imul(qt,Ue)|0,mt=mt+Math.imul(ut,or)|0,st=st+Math.imul(ut,Sr)|0,st=st+Math.imul(kt,or)|0,tt=tt+Math.imul(kt,Sr)|0,mt=mt+Math.imul(it,mr)|0,st=st+Math.imul(it,Qr)|0,st=st+Math.imul(Y,mr)|0,tt=tt+Math.imul(Y,Qr)|0,mt=mt+Math.imul(rt,Wn)|0,st=st+Math.imul(rt,Xn)|0,st=st+Math.imul(at,Wn)|0,tt=tt+Math.imul(at,Xn)|0;var fi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fi>>>26)|0,fi&=67108863,mt=Math.imul(He,br),st=Math.imul(He,Xr),st=st+Math.imul(Ge,br)|0,tt=Math.imul(Ge,Xr),mt=mt+Math.imul(ve,Le)|0,st=st+Math.imul(ve,Gt)|0,st=st+Math.imul(oe,Le)|0,tt=tt+Math.imul(oe,Gt)|0,mt=mt+Math.imul(Lt,Ct)|0,st=st+Math.imul(Lt,gt)|0,st=st+Math.imul(Mt,Ct)|0,tt=tt+Math.imul(Mt,gt)|0,mt=mt+Math.imul(pe,Nt)|0,st=st+Math.imul(pe,re)|0,st=st+Math.imul(se,Nt)|0,tt=tt+Math.imul(se,re)|0,mt=mt+Math.imul(Jt,we)|0,st=st+Math.imul(Jt,Ue)|0,st=st+Math.imul(ge,we)|0,tt=tt+Math.imul(ge,Ue)|0,mt=mt+Math.imul(Pt,or)|0,st=st+Math.imul(Pt,Sr)|0,st=st+Math.imul(qt,or)|0,tt=tt+Math.imul(qt,Sr)|0,mt=mt+Math.imul(ut,mr)|0,st=st+Math.imul(ut,Qr)|0,st=st+Math.imul(kt,mr)|0,tt=tt+Math.imul(kt,Qr)|0,mt=mt+Math.imul(it,Wn)|0,st=st+Math.imul(it,Xn)|0,st=st+Math.imul(Y,Wn)|0,tt=tt+Math.imul(Y,Xn)|0,mt=mt+Math.imul(rt,oi)|0,st=st+Math.imul(rt,$n)|0,st=st+Math.imul(at,oi)|0,tt=tt+Math.imul(at,$n)|0;var ki=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ki>>>26)|0,ki&=67108863,mt=Math.imul(ur,br),st=Math.imul(ur,Xr),st=st+Math.imul(jr,br)|0,tt=Math.imul(jr,Xr),mt=mt+Math.imul(He,Le)|0,st=st+Math.imul(He,Gt)|0,st=st+Math.imul(Ge,Le)|0,tt=tt+Math.imul(Ge,Gt)|0,mt=mt+Math.imul(ve,Ct)|0,st=st+Math.imul(ve,gt)|0,st=st+Math.imul(oe,Ct)|0,tt=tt+Math.imul(oe,gt)|0,mt=mt+Math.imul(Lt,Nt)|0,st=st+Math.imul(Lt,re)|0,st=st+Math.imul(Mt,Nt)|0,tt=tt+Math.imul(Mt,re)|0,mt=mt+Math.imul(pe,we)|0,st=st+Math.imul(pe,Ue)|0,st=st+Math.imul(se,we)|0,tt=tt+Math.imul(se,Ue)|0,mt=mt+Math.imul(Jt,or)|0,st=st+Math.imul(Jt,Sr)|0,st=st+Math.imul(ge,or)|0,tt=tt+Math.imul(ge,Sr)|0,mt=mt+Math.imul(Pt,mr)|0,st=st+Math.imul(Pt,Qr)|0,st=st+Math.imul(qt,mr)|0,tt=tt+Math.imul(qt,Qr)|0,mt=mt+Math.imul(ut,Wn)|0,st=st+Math.imul(ut,Xn)|0,st=st+Math.imul(kt,Wn)|0,tt=tt+Math.imul(kt,Xn)|0,mt=mt+Math.imul(it,oi)|0,st=st+Math.imul(it,$n)|0,st=st+Math.imul(Y,oi)|0,tt=tt+Math.imul(Y,$n)|0,mt=mt+Math.imul(rt,Zi)|0,st=st+Math.imul(rt,We)|0,st=st+Math.imul(at,Zi)|0,tt=tt+Math.imul(at,We)|0;var Oi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,mt=Math.imul(ur,Le),st=Math.imul(ur,Gt),st=st+Math.imul(jr,Le)|0,tt=Math.imul(jr,Gt),mt=mt+Math.imul(He,Ct)|0,st=st+Math.imul(He,gt)|0,st=st+Math.imul(Ge,Ct)|0,tt=tt+Math.imul(Ge,gt)|0,mt=mt+Math.imul(ve,Nt)|0,st=st+Math.imul(ve,re)|0,st=st+Math.imul(oe,Nt)|0,tt=tt+Math.imul(oe,re)|0,mt=mt+Math.imul(Lt,we)|0,st=st+Math.imul(Lt,Ue)|0,st=st+Math.imul(Mt,we)|0,tt=tt+Math.imul(Mt,Ue)|0,mt=mt+Math.imul(pe,or)|0,st=st+Math.imul(pe,Sr)|0,st=st+Math.imul(se,or)|0,tt=tt+Math.imul(se,Sr)|0,mt=mt+Math.imul(Jt,mr)|0,st=st+Math.imul(Jt,Qr)|0,st=st+Math.imul(ge,mr)|0,tt=tt+Math.imul(ge,Qr)|0,mt=mt+Math.imul(Pt,Wn)|0,st=st+Math.imul(Pt,Xn)|0,st=st+Math.imul(qt,Wn)|0,tt=tt+Math.imul(qt,Xn)|0,mt=mt+Math.imul(ut,oi)|0,st=st+Math.imul(ut,$n)|0,st=st+Math.imul(kt,oi)|0,tt=tt+Math.imul(kt,$n)|0,mt=mt+Math.imul(it,Zi)|0,st=st+Math.imul(it,We)|0,st=st+Math.imul(Y,Zi)|0,tt=tt+Math.imul(Y,We)|0;var ji=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ji>>>26)|0,ji&=67108863,mt=Math.imul(ur,Ct),st=Math.imul(ur,gt),st=st+Math.imul(jr,Ct)|0,tt=Math.imul(jr,gt),mt=mt+Math.imul(He,Nt)|0,st=st+Math.imul(He,re)|0,st=st+Math.imul(Ge,Nt)|0,tt=tt+Math.imul(Ge,re)|0,mt=mt+Math.imul(ve,we)|0,st=st+Math.imul(ve,Ue)|0,st=st+Math.imul(oe,we)|0,tt=tt+Math.imul(oe,Ue)|0,mt=mt+Math.imul(Lt,or)|0,st=st+Math.imul(Lt,Sr)|0,st=st+Math.imul(Mt,or)|0,tt=tt+Math.imul(Mt,Sr)|0,mt=mt+Math.imul(pe,mr)|0,st=st+Math.imul(pe,Qr)|0,st=st+Math.imul(se,mr)|0,tt=tt+Math.imul(se,Qr)|0,mt=mt+Math.imul(Jt,Wn)|0,st=st+Math.imul(Jt,Xn)|0,st=st+Math.imul(ge,Wn)|0,tt=tt+Math.imul(ge,Xn)|0,mt=mt+Math.imul(Pt,oi)|0,st=st+Math.imul(Pt,$n)|0,st=st+Math.imul(qt,oi)|0,tt=tt+Math.imul(qt,$n)|0,mt=mt+Math.imul(ut,Zi)|0,st=st+Math.imul(ut,We)|0,st=st+Math.imul(kt,Zi)|0,tt=tt+Math.imul(kt,We)|0;var Xi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,mt=Math.imul(ur,Nt),st=Math.imul(ur,re),st=st+Math.imul(jr,Nt)|0,tt=Math.imul(jr,re),mt=mt+Math.imul(He,we)|0,st=st+Math.imul(He,Ue)|0,st=st+Math.imul(Ge,we)|0,tt=tt+Math.imul(Ge,Ue)|0,mt=mt+Math.imul(ve,or)|0,st=st+Math.imul(ve,Sr)|0,st=st+Math.imul(oe,or)|0,tt=tt+Math.imul(oe,Sr)|0,mt=mt+Math.imul(Lt,mr)|0,st=st+Math.imul(Lt,Qr)|0,st=st+Math.imul(Mt,mr)|0,tt=tt+Math.imul(Mt,Qr)|0,mt=mt+Math.imul(pe,Wn)|0,st=st+Math.imul(pe,Xn)|0,st=st+Math.imul(se,Wn)|0,tt=tt+Math.imul(se,Xn)|0,mt=mt+Math.imul(Jt,oi)|0,st=st+Math.imul(Jt,$n)|0,st=st+Math.imul(ge,oi)|0,tt=tt+Math.imul(ge,$n)|0,mt=mt+Math.imul(Pt,Zi)|0,st=st+Math.imul(Pt,We)|0,st=st+Math.imul(qt,Zi)|0,tt=tt+Math.imul(qt,We)|0;var ci=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ci>>>26)|0,ci&=67108863,mt=Math.imul(ur,we),st=Math.imul(ur,Ue),st=st+Math.imul(jr,we)|0,tt=Math.imul(jr,Ue),mt=mt+Math.imul(He,or)|0,st=st+Math.imul(He,Sr)|0,st=st+Math.imul(Ge,or)|0,tt=tt+Math.imul(Ge,Sr)|0,mt=mt+Math.imul(ve,mr)|0,st=st+Math.imul(ve,Qr)|0,st=st+Math.imul(oe,mr)|0,tt=tt+Math.imul(oe,Qr)|0,mt=mt+Math.imul(Lt,Wn)|0,st=st+Math.imul(Lt,Xn)|0,st=st+Math.imul(Mt,Wn)|0,tt=tt+Math.imul(Mt,Xn)|0,mt=mt+Math.imul(pe,oi)|0,st=st+Math.imul(pe,$n)|0,st=st+Math.imul(se,oi)|0,tt=tt+Math.imul(se,$n)|0,mt=mt+Math.imul(Jt,Zi)|0,st=st+Math.imul(Jt,We)|0,st=st+Math.imul(ge,Zi)|0,tt=tt+Math.imul(ge,We)|0;var za=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(za>>>26)|0,za&=67108863,mt=Math.imul(ur,or),st=Math.imul(ur,Sr),st=st+Math.imul(jr,or)|0,tt=Math.imul(jr,Sr),mt=mt+Math.imul(He,mr)|0,st=st+Math.imul(He,Qr)|0,st=st+Math.imul(Ge,mr)|0,tt=tt+Math.imul(Ge,Qr)|0,mt=mt+Math.imul(ve,Wn)|0,st=st+Math.imul(ve,Xn)|0,st=st+Math.imul(oe,Wn)|0,tt=tt+Math.imul(oe,Xn)|0,mt=mt+Math.imul(Lt,oi)|0,st=st+Math.imul(Lt,$n)|0,st=st+Math.imul(Mt,oi)|0,tt=tt+Math.imul(Mt,$n)|0,mt=mt+Math.imul(pe,Zi)|0,st=st+Math.imul(pe,We)|0,st=st+Math.imul(se,Zi)|0,tt=tt+Math.imul(se,We)|0;var Wa=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,mt=Math.imul(ur,mr),st=Math.imul(ur,Qr),st=st+Math.imul(jr,mr)|0,tt=Math.imul(jr,Qr),mt=mt+Math.imul(He,Wn)|0,st=st+Math.imul(He,Xn)|0,st=st+Math.imul(Ge,Wn)|0,tt=tt+Math.imul(Ge,Xn)|0,mt=mt+Math.imul(ve,oi)|0,st=st+Math.imul(ve,$n)|0,st=st+Math.imul(oe,oi)|0,tt=tt+Math.imul(oe,$n)|0,mt=mt+Math.imul(Lt,Zi)|0,st=st+Math.imul(Lt,We)|0,st=st+Math.imul(Mt,Zi)|0,tt=tt+Math.imul(Mt,We)|0;var ze=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ze>>>26)|0,ze&=67108863,mt=Math.imul(ur,Wn),st=Math.imul(ur,Xn),st=st+Math.imul(jr,Wn)|0,tt=Math.imul(jr,Xn),mt=mt+Math.imul(He,oi)|0,st=st+Math.imul(He,$n)|0,st=st+Math.imul(Ge,oi)|0,tt=tt+Math.imul(Ge,$n)|0,mt=mt+Math.imul(ve,Zi)|0,st=st+Math.imul(ve,We)|0,st=st+Math.imul(oe,Zi)|0,tt=tt+Math.imul(oe,We)|0;var Ie=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,mt=Math.imul(ur,oi),st=Math.imul(ur,$n),st=st+Math.imul(jr,oi)|0,tt=Math.imul(jr,$n),mt=mt+Math.imul(He,Zi)|0,st=st+Math.imul(He,We)|0,st=st+Math.imul(Ge,Zi)|0,tt=tt+Math.imul(Ge,We)|0;var Rr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,mt=Math.imul(ur,Zi),st=Math.imul(ur,We),st=st+Math.imul(jr,Zi)|0,tt=Math.imul(jr,We);var $r=(yt+mt|0)+((st&8191)<<13)|0;return yt=(tt+(st>>>13)|0)+($r>>>26)|0,$r&=67108863,lt[0]=nr,lt[1]=fr,lt[2]=_r,lt[3]=tn,lt[4]=Cn,lt[5]=Tn,lt[6]=Mn,lt[7]=fi,lt[8]=ki,lt[9]=Oi,lt[10]=ji,lt[11]=Xi,lt[12]=ci,lt[13]=za,lt[14]=Wa,lt[15]=ze,lt[16]=Ie,lt[17]=Rr,lt[18]=$r,yt!==0&&(lt[19]=yt,W.length++),W};Math.imul||(M=P);function C(F,U,W){W.negative=U.negative^F.negative,W.length=F.length+U.length;for(var q=0,J=0,lt=0;lt>>26)|0,J+=yt>>>26,yt&=67108863}W.words[lt]=mt,q=yt,yt=J}return q!==0?W.words[lt]=q:W.length--,W.strip()}function A(F,U,W){var q=new h;return q.mulp(F,U,W)}l.prototype.mulTo=function(F,U){var W,q=this.length+F.length;return this.length===10&&F.length===10?W=M(this,F,U):q<63?W=P(this,F,U):q<1024?W=C(this,F,U):W=A(this,F,U),W};function h(F,U){this.x=F,this.y=U}h.prototype.makeRBT=function(F){for(var U=new Array(F),W=l.prototype._countBits(F)-1,q=0;q>=1;return q},h.prototype.permute=function(F,U,W,q,J,lt){for(var yt=0;yt>>1)J++;return 1<>>13,W[2*lt+1]=J&8191,J=J>>>13;for(lt=2*U;lt>=26,U+=q/67108864|0,U+=J>>>26,this.words[W]=J&67108863}return U!==0&&(this.words[W]=U,this.length++),this},l.prototype.muln=function(F){return this.clone().imuln(F)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(F){var U=_(F);if(U.length===0)return new l(1);for(var W=this,q=0;q=0);var U=F%26,W=(F-U)/26,q=67108863>>>26-U<<26-U,J;if(U!==0){var lt=0;for(J=0;J>>26-U}lt&&(this.words[J]=lt,this.length++)}if(W!==0){for(J=this.length-1;J>=0;J--)this.words[J+W]=this.words[J];for(J=0;J=0);var q;U?q=(U-U%26)/26:q=0;var J=F%26,lt=Math.min((F-J)/26,this.length),yt=67108863^67108863>>>J<lt)for(this.length-=lt,st=0;st=0&&(tt!==0||st>=q);st--){var dt=this.words[st]|0;this.words[st]=tt<<26-J|dt>>>J,tt=dt&yt}return mt&&tt!==0&&(mt.words[mt.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(F,U,W){return o(this.negative===0),this.iushrn(F,U,W)},l.prototype.shln=function(F){return this.clone().ishln(F)},l.prototype.ushln=function(F){return this.clone().iushln(F)},l.prototype.shrn=function(F){return this.clone().ishrn(F)},l.prototype.ushrn=function(F){return this.clone().iushrn(F)},l.prototype.testn=function(F){o(typeof F=="number"&&F>=0);var U=F%26,W=(F-U)/26,q=1<=0);var U=F%26,W=(F-U)/26;if(o(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(U!==0&&W++,this.length=Math.min(W,this.length),U!==0){var q=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},l.prototype.isubn=function(F){if(o(typeof F=="number"),o(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(mt/67108864|0),this.words[J+W]=lt&67108863}for(;J>26,this.words[J+W]=lt&67108863;if(yt===0)return this.strip();for(o(yt===-1),yt=0,J=0;J>26,this.words[J]=lt&67108863;return this.negative=1,this.strip()},l.prototype._wordDiv=function(F,U){var W=this.length-F.length,q=this.clone(),J=F,lt=J.words[J.length-1]|0,yt=this._countBits(lt);W=26-yt,W!==0&&(J=J.ushln(W),q.iushln(W),lt=J.words[J.length-1]|0);var mt=q.length-J.length,st;if(U!=="mod"){st=new l(null),st.length=mt+1,st.words=new Array(st.length);for(var tt=0;tt=0;rt--){var at=(q.words[J.length+rt]|0)*67108864+(q.words[J.length+rt-1]|0);for(at=Math.min(at/lt|0,67108863),q._ishlnsubmul(J,at,rt);q.negative!==0;)at--,q.negative=0,q._ishlnsubmul(J,1,rt),q.isZero()||(q.negative^=1);st&&(st.words[rt]=at)}return st&&st.strip(),q.strip(),U!=="div"&&W!==0&&q.iushrn(W),{div:st||null,mod:q}},l.prototype.divmod=function(F,U,W){if(o(!F.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var q,J,lt;return this.negative!==0&&F.negative===0?(lt=this.neg().divmod(F,U),U!=="mod"&&(q=lt.div.neg()),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.iadd(F)),{div:q,mod:J}):this.negative===0&&F.negative!==0?(lt=this.divmod(F.neg(),U),U!=="mod"&&(q=lt.div.neg()),{div:q,mod:lt.mod}):(this.negative&F.negative)!==0?(lt=this.neg().divmod(F.neg(),U),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.isub(F)),{div:lt.div,mod:J}):F.length>this.length||this.cmp(F)<0?{div:new l(0),mod:this}:F.length===1?U==="div"?{div:this.divn(F.words[0]),mod:null}:U==="mod"?{div:null,mod:new l(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new l(this.modn(F.words[0]))}:this._wordDiv(F,U)},l.prototype.div=function(F){return this.divmod(F,"div",!1).div},l.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},l.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},l.prototype.divRound=function(F){var U=this.divmod(F);if(U.mod.isZero())return U.div;var W=U.div.negative!==0?U.mod.isub(F):U.mod,q=F.ushrn(1),J=F.andln(1),lt=W.cmp(q);return lt<0||J===1&<===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},l.prototype.modn=function(F){o(F<=67108863);for(var U=67108864%F,W=0,q=this.length-1;q>=0;q--)W=(U*W+(this.words[q]|0))%F;return W},l.prototype.idivn=function(F){o(F<=67108863);for(var U=0,W=this.length-1;W>=0;W--){var q=(this.words[W]|0)+U*67108864;this.words[W]=q/F|0,U=q%F}return this.strip()},l.prototype.divn=function(F){return this.clone().idivn(F)},l.prototype.egcd=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=new l(0),yt=new l(1),mt=0;U.isEven()&&W.isEven();)U.iushrn(1),W.iushrn(1),++mt;for(var st=W.clone(),tt=U.clone();!U.isZero();){for(var dt=0,rt=1;(U.words[0]&rt)===0&&dt<26;++dt,rt<<=1);if(dt>0)for(U.iushrn(dt);dt-- >0;)(q.isOdd()||J.isOdd())&&(q.iadd(st),J.isub(tt)),q.iushrn(1),J.iushrn(1);for(var at=0,vt=1;(W.words[0]&vt)===0&&at<26;++at,vt<<=1);if(at>0)for(W.iushrn(at);at-- >0;)(lt.isOdd()||yt.isOdd())&&(lt.iadd(st),yt.isub(tt)),lt.iushrn(1),yt.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(lt),J.isub(yt)):(W.isub(U),lt.isub(q),yt.isub(J))}return{a:lt,b:yt,gcd:W.iushln(mt)}},l.prototype._invmp=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=W.clone();U.cmpn(1)>0&&W.cmpn(1)>0;){for(var yt=0,mt=1;(U.words[0]&mt)===0&&yt<26;++yt,mt<<=1);if(yt>0)for(U.iushrn(yt);yt-- >0;)q.isOdd()&&q.iadd(lt),q.iushrn(1);for(var st=0,tt=1;(W.words[0]&tt)===0&&st<26;++st,tt<<=1);if(st>0)for(W.iushrn(st);st-- >0;)J.isOdd()&&J.iadd(lt),J.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(J)):(W.isub(U),J.isub(q))}var dt;return U.cmpn(1)===0?dt=q:dt=J,dt.cmpn(0)<0&&dt.iadd(F),dt},l.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var U=this.clone(),W=F.clone();U.negative=0,W.negative=0;for(var q=0;U.isEven()&&W.isEven();q++)U.iushrn(1),W.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;W.isEven();)W.iushrn(1);var J=U.cmp(W);if(J<0){var lt=U;U=W,W=lt}else if(J===0||W.cmpn(1)===0)break;U.isub(W)}while(!0);return W.iushln(q)},l.prototype.invm=function(F){return this.egcd(F).a.umod(F)},l.prototype.isEven=function(){return(this.words[0]&1)===0},l.prototype.isOdd=function(){return(this.words[0]&1)===1},l.prototype.andln=function(F){return this.words[0]&F},l.prototype.bincn=function(F){o(typeof F=="number");var U=F%26,W=(F-U)/26,q=1<>>26,yt&=67108863,this.words[lt]=yt}return J!==0&&(this.words[lt]=J,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(F){var U=F<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var W;if(this.length>1)W=1;else{U&&(F=-F),o(F<=67108863,"Number is too big");var q=this.words[0]|0;W=q===F?0:qF.length)return 1;if(this.length=0;W--){var q=this.words[W]|0,J=F.words[W]|0;if(q!==J){qJ&&(U=1);break}}return U},l.prototype.gtn=function(F){return this.cmpn(F)===1},l.prototype.gt=function(F){return this.cmp(F)===1},l.prototype.gten=function(F){return this.cmpn(F)>=0},l.prototype.gte=function(F){return this.cmp(F)>=0},l.prototype.ltn=function(F){return this.cmpn(F)===-1},l.prototype.lt=function(F){return this.cmp(F)===-1},l.prototype.lten=function(F){return this.cmpn(F)<=0},l.prototype.lte=function(F){return this.cmp(F)<=0},l.prototype.eqn=function(F){return this.cmpn(F)===0},l.prototype.eq=function(F){return this.cmp(F)===0},l.red=function(F){return new V(F)},l.prototype.toRed=function(F){return o(!this.red,"Already a number in reduction context"),o(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},l.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(F){return this.red=F,this},l.prototype.forceRed=function(F){return o(!this.red,"Already a number in reduction context"),this._forceRed(F)},l.prototype.redAdd=function(F){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},l.prototype.redIAdd=function(F){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},l.prototype.redSub=function(F){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},l.prototype.redISub=function(F){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},l.prototype.redShl=function(F){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},l.prototype.redMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},l.prototype.redIMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},l.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(F){return o(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var p={k256:null,p224:null,p192:null,p25519:null};function k(F,U){this.name=F,this.p=new l(U,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var F=new l(null);return F.words=new Array(Math.ceil(this.n/13)),F},k.prototype.ireduce=function(F){var U=F,W;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),W=U.bitLength();while(W>this.n);var q=W0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},k.prototype.split=function(F,U){F.iushrn(this.n,0,U)},k.prototype.imulK=function(F){return F.imul(this.k)};function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,k),w.prototype.split=function(F,U){for(var W=4194303,q=Math.min(F.length,9),J=0;J>>22,lt=yt}lt>>>=22,F.words[J-10]=lt,lt===0&&F.length>10?F.length-=10:F.length-=9},w.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var U=0,W=0;W>>=26,F.words[W]=J,U=q}return U!==0&&(F.words[F.length++]=U),F},l._prime=function(F){if(p[F])return p[F];var U;if(F==="k256")U=new w;else if(F==="p224")U=new R;else if(F==="p192")U=new O;else if(F==="p25519")U=new j;else throw new Error("Unknown prime "+F);return p[F]=U,U};function V(F){if(typeof F=="string"){var U=l._prime(F);this.m=U.p,this.prime=U}else o(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(F){o(F.negative===0,"red works only with positives"),o(F.red,"red works only with red numbers")},V.prototype._verify2=function(F,U){o((F.negative|U.negative)===0,"red works only with positives"),o(F.red&&F.red===U.red,"red works only with red numbers")},V.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},V.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},V.prototype.add=function(F,U){this._verify2(F,U);var W=F.add(U);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},V.prototype.iadd=function(F,U){this._verify2(F,U);var W=F.iadd(U);return W.cmp(this.m)>=0&&W.isub(this.m),W},V.prototype.sub=function(F,U){this._verify2(F,U);var W=F.sub(U);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},V.prototype.isub=function(F,U){this._verify2(F,U);var W=F.isub(U);return W.cmpn(0)<0&&W.iadd(this.m),W},V.prototype.shl=function(F,U){return this._verify1(F),this.imod(F.ushln(U))},V.prototype.imul=function(F,U){return this._verify2(F,U),this.imod(F.imul(U))},V.prototype.mul=function(F,U){return this._verify2(F,U),this.imod(F.mul(U))},V.prototype.isqr=function(F){return this.imul(F,F.clone())},V.prototype.sqr=function(F){return this.mul(F,F)},V.prototype.sqrt=function(F){if(F.isZero())return F.clone();var U=this.m.andln(3);if(o(U%2===1),U===3){var W=this.m.add(new l(1)).iushrn(2);return this.pow(F,W)}for(var q=this.m.subn(1),J=0;!q.isZero()&&q.andln(1)===0;)J++,q.iushrn(1);o(!q.isZero());var lt=new l(1).toRed(this),yt=lt.redNeg(),mt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new l(2*st*st).toRed(this);this.pow(st,mt).cmp(yt)!==0;)st.redIAdd(yt);for(var tt=this.pow(st,q),dt=this.pow(F,q.addn(1).iushrn(1)),rt=this.pow(F,q),at=J;rt.cmp(lt)!==0;){for(var vt=rt,it=0;vt.cmp(lt)!==0;it++)vt=vt.redSqr();o(it=0;J--){for(var tt=U.words[J],dt=st-1;dt>=0;dt--){var rt=tt>>dt&1;if(lt!==q[0]&&(lt=this.sqr(lt)),rt===0&&yt===0){mt=0;continue}yt<<=1,yt|=rt,mt++,!(mt!==W&&(J!==0||dt!==0))&&(lt=this.mul(lt,q[yt]),mt=0,yt=0)}st=26}return lt},V.prototype.convertTo=function(F){var U=F.umod(this.m);return U===F?U.clone():U},V.prototype.convertFrom=function(F){var U=F.clone();return U.red=null,U},l.mont=function(F){return new H(F)};function H(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,V),H.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},H.prototype.convertFrom=function(F){var U=this.imod(F.mul(this.rinv));return U.red=null,U},H.prototype.imul=function(F,U){if(F.isZero()||U.isZero())return F.words[0]=0,F.length=1,F;var W=F.imul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.mul=function(F,U){if(F.isZero()||U.isZero())return new l(0)._forceRed(this);var W=F.mul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.invm=function(F){var U=this.imod(F._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(t,this)},6860:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]-n[0],r[1]=a[1]-n[1],r[2]=a[2]-n[2],r[3]=a[3]-n[3],r}},6864:function(t){t.exports=e;function e(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(t,e,r){t.exports=u;var a=r(1888),n=r(855),o=r(7150);function i(b,_){for(var P=0;P>>1;if(!(h<=0)){var p,k=a.mallocDouble(2*h*C),w=a.mallocInt32(C);if(C=l(b,h,k,w),C>0){if(h===1&&M)n.init(C),p=n.sweepComplete(h,P,0,C,k,w,0,C,k,w);else{var R=a.mallocDouble(2*h*A),O=a.mallocInt32(A);A=l(_,h,R,O),A>0&&(n.init(C+A),h===1?p=n.sweepBipartite(h,P,0,C,k,w,0,A,R,O):p=o(h,P,M,C,k,w,A,R,O),a.free(R),a.free(O))}a.free(k),a.free(w)}return p}}}var x;function y(b,_){x.push([b,_])}function v(b){return x=[],f(b,b,y,!0),x}function T(b,_){return x=[],f(b,_,y,!1),x}function u(b,_,P){switch(arguments.length){case 1:return v(b);case 2:return typeof _=="function"?f(b,b,_,!0):T(b,_);case 3:return f(b,_,P,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(t){t.exports=e;function e(r,a,n,o){var i=n[1],l=n[2],f=a[1]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=a[0],r[1]=i+f*v-x*y,r[2]=l+f*y+x*v,r}},7004:function(t){t.exports=e;function e(r){for(var a=r.length,n=r[r.length-1],o=a,i=a-2;i>=0;--i){var l=n,f=r[i];n=l+f;var x=n-l,y=f-x;y&&(r[--o]=n,n=y)}for(var v=0,i=o;i=p0)&&!(p1>=hi)"),_=y("lo===p0"),P=y("lo0;){dt-=1;var vt=dt*h,it=w[vt],Y=w[vt+1],ft=w[vt+2],ut=w[vt+3],kt=w[vt+4],It=w[vt+5],Pt=dt*p,qt=R[Pt],Wt=R[Pt+1],Jt=It&1,ge=!!(It&16),fe=lt,pe=yt,se=st,Tt=tt;if(Jt&&(fe=st,pe=tt,se=lt,Tt=yt),!(It&2&&(ft=P(U,it,Y,ft,fe,pe,Wt),Y>=ft))&&!(It&4&&(Y=M(U,it,Y,ft,fe,pe,qt),Y>=ft))){var Lt=ft-Y,Mt=kt-ut;if(ge){if(U*Lt*(Lt+Mt)"u"?r(1538):WeakMap,n=r(2762),o=r(8116),i=new a;function l(f){var x=i.get(f),y=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!y||!f.isBuffer(y)){var v=n(f,new Float32Array([-1,-1,-1,4,4,-1]));x=o(f,[{buffer:v,type:f.FLOAT,size:2}]),x._triangleBuffer=v,i.set(f,x)}x.bind(),f.drawArrays(f.TRIANGLES,0,3),x.unbind()}t.exports=l},7182:function(t,e,r){var a={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};a.create();var n=a.create();t.exports=function(o,i,l,f,x,y){return a.identity(o),a.fromRotationTranslation(o,y,i),o[3]=x[0],o[7]=x[1],o[11]=x[2],o[15]=x[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(o,o,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(o,o,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(o,o,n)),a.scale(o,o,l),o}},7201:function(t,e,r){var a=1e-6,n=1e-6,o=r(9405),i=r(2762),l=r(8116),f=r(7766),x=r(8406),y=r(6760),v=r(7608),T=r(9618),u=r(6729),b=r(7765),_=r(1888),P=r(840),M=r(7626),C=P.meshShader,A=P.wireShader,h=P.pointShader,p=P.pickShader,k=P.pointPickShader,w=P.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(st,tt,dt,rt,at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Te){this.gl=st,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=tt,this.dirty=!0,this.triShader=dt,this.lineShader=rt,this.pointShader=at,this.pickShader=vt,this.pointPickShader=it,this.contourShader=Y,this.trianglePositions=ft,this.triangleColors=kt,this.triangleNormals=Pt,this.triangleUVs=It,this.triangleIds=ut,this.triangleVAO=qt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Wt,this.edgeColors=ge,this.edgeUVs=fe,this.edgeIds=Jt,this.edgeVAO=pe,this.edgeCount=0,this.pointPositions=se,this.pointColors=Lt,this.pointUVs=Mt,this.pointSizes=ee,this.pointIds=Tt,this.pointVAO=ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=oe,this.contourVAO=Te,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var j=O.prototype;j.isOpaque=function(){return!this.hasAlpha},j.isTransparent=function(){return this.hasAlpha},j.pickSlots=1,j.setPickBase=function(st){this.pickId=st};function V(st,tt){if(!tt||!tt.length)return 1;for(var dt=0;dtst&&dt>0){var rt=(tt[dt][0]-st)/(tt[dt][0]-tt[dt-1][0]);return tt[dt][1]*(1-rt)+rt*tt[dt-1][1]}}return 1}function H(st,tt){for(var dt=u({colormap:st,nshades:256,format:"rgba"}),rt=new Uint8Array(1024),at=0;at<256;++at){for(var vt=dt[at],it=0;it<3;++it)rt[4*at+it]=vt[it];tt?rt[4*at+3]=255*V(at/255,tt):rt[4*at+3]=255*vt[3]}return T(rt,[256,256,4],[4,0,1])}function F(st){for(var tt=st.length,dt=new Array(tt),rt=0;rt0){var Pt=this.triShader;Pt.bind(),Pt.uniforms=Y,this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Pt=this.lineShader;Pt.bind(),Pt.uniforms=Y,this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Pt=this.pointShader;Pt.bind(),Pt.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Pt=this.contourShader;Pt.bind(),Pt.uniforms=Y,this.contourVAO.bind(),tt.drawArrays(tt.LINES,0,this.contourCount),this.contourVAO.unbind()}},j.drawPick=function(st){st=st||{};for(var tt=this.gl,dt=st.model||R,rt=st.view||R,at=st.projection||R,vt=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],it=0;it<3;++it)vt[0][it]=Math.max(vt[0][it],this.clipBounds[0][it]),vt[1][it]=Math.min(vt[1][it],this.clipBounds[1][it]);this._model=[].slice.call(dt),this._view=[].slice.call(rt),this._projection=[].slice.call(at),this._resolution=[tt.drawingBufferWidth,tt.drawingBufferHeight];var Y={model:dt,view:rt,projection:at,clipBounds:vt,pickId:this.pickId/255},ft=this.pickShader;if(ft.bind(),ft.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ft=this.pointPickShader;ft.bind(),ft.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}},j.pick=function(st){if(!st||st.id!==this.pickId)return null;for(var tt=st.value[0]+256*st.value[1]+65536*st.value[2],dt=this.cells[tt],rt=this.positions,at=new Array(dt.length),vt=0;vtMath.max(C,A)?h[2]=1:C>Math.max(M,A)?h[0]=1:h[1]=1;for(var p=0,k=0,w=0;w<3;++w)p+=P[w]*P[w],k+=h[w]*P[w];for(var w=0;w<3;++w)h[w]-=k/p*P[w];return l(h,h),h}function T(P,M,C,A,h,p,k,w){this.center=a(C),this.up=a(A),this.right=a(h),this.radius=a([p]),this.angle=a([k,w]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(P,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var u=T.prototype;u.setDistanceLimits=function(P,M){P>0?P=Math.log(P):P=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,P),this.radius.bounds[0][0]=P,this.radius.bounds[1][0]=M},u.getDistanceLimits=function(P){var M=this.radius.bounds[0];return P?(P[0]=Math.exp(M[0][0]),P[1]=Math.exp(M[1][0]),P):[Math.exp(M[0][0]),Math.exp(M[1][0])]},u.recalcMatrix=function(P){this.center.curve(P),this.up.curve(P),this.right.curve(P),this.radius.curve(P),this.angle.curve(P);for(var M=this.computedUp,C=this.computedRight,A=0,h=0,p=0;p<3;++p)h+=M[p]*C[p],A+=M[p]*M[p];for(var k=Math.sqrt(A),w=0,p=0;p<3;++p)C[p]-=M[p]*h/A,w+=C[p]*C[p],M[p]/=k;for(var R=Math.sqrt(w),p=0;p<3;++p)C[p]/=R;var O=this.computedToward;i(O,M,C),l(O,O);for(var j=Math.exp(this.computedRadius[0]),V=this.computedAngle[0],H=this.computedAngle[1],F=Math.cos(V),U=Math.sin(V),W=Math.cos(H),q=Math.sin(H),J=this.computedCenter,lt=F*W,yt=U*W,mt=q,st=-F*q,tt=-U*q,dt=W,rt=this.computedEye,at=this.computedMatrix,p=0;p<3;++p){var vt=lt*C[p]+yt*O[p]+mt*M[p];at[4*p+1]=st*C[p]+tt*O[p]+dt*M[p],at[4*p+2]=vt,at[4*p+3]=0}var it=at[1],Y=at[5],ft=at[9],ut=at[2],kt=at[6],It=at[10],Pt=Y*It-ft*kt,qt=ft*ut-it*It,Wt=it*kt-Y*ut,Jt=x(Pt,qt,Wt);Pt/=Jt,qt/=Jt,Wt/=Jt,at[0]=Pt,at[4]=qt,at[8]=Wt;for(var p=0;p<3;++p)rt[p]=J[p]+at[2+4*p]*j;for(var p=0;p<3;++p){for(var w=0,ge=0;ge<3;++ge)w+=at[p+4*ge]*rt[ge];at[12+p]=-w}at[15]=1},u.getMatrix=function(P,M){this.recalcMatrix(P);var C=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=C[A];return M}return C};var b=[0,0,0];u.rotate=function(P,M,C,A){if(this.angle.move(P,M,C),A){this.recalcMatrix(P);var h=this.computedMatrix;b[0]=h[2],b[1]=h[6],b[2]=h[10];for(var p=this.computedUp,k=this.computedRight,w=this.computedToward,R=0;R<3;++R)h[4*R]=p[R],h[4*R+1]=k[R],h[4*R+2]=w[R];o(h,h,A,b);for(var R=0;R<3;++R)p[R]=h[4*R],k[R]=h[4*R+1];this.up.set(P,p[0],p[1],p[2]),this.right.set(P,k[0],k[1],k[2])}},u.pan=function(P,M,C,A){M=M||0,C=C||0,A=A||0,this.recalcMatrix(P);var h=this.computedMatrix;Math.exp(this.computedRadius[0]);var p=h[1],k=h[5],w=h[9],R=x(p,k,w);p/=R,k/=R,w/=R;var O=h[0],j=h[4],V=h[8],H=O*p+j*k+V*w;O-=p*H,j-=k*H,V-=w*H;var F=x(O,j,V);O/=F,j/=F,V/=F;var U=O*M+p*C,W=j*M+k*C,q=V*M+w*C;this.center.move(P,U,W,q);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+A),this.radius.set(P,Math.log(J))},u.translate=function(P,M,C,A){this.center.move(P,M||0,C||0,A||0)},u.setMatrix=function(P,M,C,A){var h=1;typeof C=="number"&&(h=C|0),(h<0||h>3)&&(h=1);var p=(h+2)%3;M||(this.recalcMatrix(P),M=this.computedMatrix);var k=M[h],w=M[h+4],R=M[h+8];if(A){var O=Math.abs(k),j=Math.abs(w),V=Math.abs(R),H=Math.max(O,j,V);O===H?(k=k<0?-1:1,w=R=0):V===H?(R=R<0?-1:1,k=w=0):(w=w<0?-1:1,k=R=0)}else{var F=x(k,w,R);k/=F,w/=F,R/=F}var U=M[p],W=M[p+4],q=M[p+8],J=U*k+W*w+q*R;U-=k*J,W-=w*J,q-=R*J;var lt=x(U,W,q);U/=lt,W/=lt,q/=lt;var yt=w*q-R*W,mt=R*U-k*q,st=k*W-w*U,tt=x(yt,mt,st);yt/=tt,mt/=tt,st/=tt,this.center.jump(P,Tt,Lt,Mt),this.radius.idle(P),this.up.jump(P,k,w,R),this.right.jump(P,U,W,q);var dt,rt;if(h===2){var at=M[1],vt=M[5],it=M[9],Y=at*U+vt*W+it*q,ft=at*yt+vt*mt+it*st;Pt<0?dt=-Math.PI/2:dt=Math.PI/2,rt=Math.atan2(ft,Y)}else{var ut=M[2],kt=M[6],It=M[10],Pt=ut*k+kt*w+It*R,qt=ut*U+kt*W+It*q,Wt=ut*yt+kt*mt+It*st;dt=Math.asin(y(Pt)),rt=Math.atan2(Wt,qt)}this.angle.jump(P,rt,dt),this.recalcMatrix(P);var Jt=M[2],ge=M[6],fe=M[10],pe=this.computedMatrix;n(pe,M);var se=pe[15],Tt=pe[12]/se,Lt=pe[13]/se,Mt=pe[14]/se,ee=Math.exp(this.computedRadius[0]);this.center.jump(P,Tt-Jt*ee,Lt-ge*ee,Mt-fe*ee)},u.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},u.idle=function(P){this.center.idle(P),this.up.idle(P),this.right.idle(P),this.radius.idle(P),this.angle.idle(P)},u.flush=function(P){this.center.flush(P),this.up.flush(P),this.right.flush(P),this.radius.flush(P),this.angle.flush(P)},u.setDistance=function(P,M){M>0&&this.radius.set(P,Math.log(M))},u.lookAt=function(P,M,C,A){this.recalcMatrix(P),M=M||this.computedEye,C=C||this.computedCenter,A=A||this.computedUp;var h=A[0],p=A[1],k=A[2],w=x(h,p,k);if(!(w<1e-6)){h/=w,p/=w,k/=w;var R=M[0]-C[0],O=M[1]-C[1],j=M[2]-C[2],V=x(R,O,j);if(!(V<1e-6)){R/=V,O/=V,j/=V;var H=this.computedRight,F=H[0],U=H[1],W=H[2],q=h*F+p*U+k*W;F-=q*h,U-=q*p,W-=q*k;var J=x(F,U,W);if(!(J<.01&&(F=p*j-k*O,U=k*R-h*j,W=h*O-p*R,J=x(F,U,W),J<1e-6))){F/=J,U/=J,W/=J,this.up.set(P,h,p,k),this.right.set(P,F,U,W),this.center.set(P,C[0],C[1],C[2]),this.radius.set(P,Math.log(V));var lt=p*W-k*U,yt=k*F-h*W,mt=h*U-p*F,st=x(lt,yt,mt);lt/=st,yt/=st,mt/=st;var tt=h*R+p*O+k*j,dt=F*R+U*O+W*j,rt=lt*R+yt*O+mt*j,at=Math.asin(y(tt)),vt=Math.atan2(rt,dt),it=this.angle._state,Y=it[it.length-1],ft=it[it.length-2];Y=Y%(2*Math.PI);var ut=Math.abs(Y+2*Math.PI-vt),kt=Math.abs(Y-vt),It=Math.abs(Y-2*Math.PI-vt);ut0?F:U},l.min=function(F,U){return F.cmp(U)<0?F:U},l.prototype._init=function(F,U,W){if(typeof F=="number")return this._initNumber(F,U,W);if(typeof F=="object")return this._initArray(F,U,W);U==="hex"&&(U=16),o(U===(U|0)&&U>=2&&U<=36),F=F.toString().replace(/\s+/g,"");var q=0;F[0]==="-"&&(q++,this.negative=1),q=0;q-=3)lt=F[q]|F[q-1]<<8|F[q-2]<<16,this.words[J]|=lt<>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);else if(W==="le")for(q=0,J=0;q>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);return this.strip()};function x(F,U){var W=F.charCodeAt(U);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function y(F,U,W){var q=x(F,W);return W-1>=U&&(q|=x(F,W-1)<<4),q}l.prototype._parseHex=function(F,U,W){this.length=Math.ceil((F.length-U)/6),this.words=new Array(this.length);for(var q=0;q=U;q-=2)yt=y(F,U,q)<=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8;else{var mt=F.length-U;for(q=mt%2===0?U+1:U;q=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8}this.strip()};function v(F,U,W,q){for(var J=0,lt=Math.min(F.length,W),yt=U;yt=49?J+=mt-49+10:mt>=17?J+=mt-17+10:J+=mt}return J}l.prototype._parseBase=function(F,U,W){this.words=[0],this.length=1;for(var q=0,J=1;J<=67108863;J*=U)q++;q--,J=J/U|0;for(var lt=F.length-W,yt=lt%q,mt=Math.min(lt,lt-yt)+W,st=0,tt=W;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[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],b=[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];l.prototype.toString=function(F,U){F=F||10,U=U|0||1;var W;if(F===16||F==="hex"){W="";for(var q=0,J=0,lt=0;lt>>24-q&16777215,J!==0||lt!==this.length-1?W=T[6-mt.length]+mt+W:W=mt+W,q+=2,q>=26&&(q-=26,lt--)}for(J!==0&&(W=J.toString(16)+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if(F===(F|0)&&F>=2&&F<=36){var st=u[F],tt=b[F];W="";var pt=this.clone();for(pt.negative=0;!pt.isZero();){var rt=pt.modn(tt).toString(F);pt=pt.idivn(tt),pt.isZero()?W=rt+W:W=T[st-rt.length]+rt+W}for(this.isZero()&&(W="0"+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}o(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&o(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(F,U){return o(typeof f<"u"),this.toArrayLike(f,F,U)},l.prototype.toArray=function(F,U){return this.toArrayLike(Array,F,U)},l.prototype.toArrayLike=function(F,U,W){var q=this.byteLength(),J=W||Math.max(1,q);o(q<=J,"byte array longer than desired length"),o(J>0,"Requested array length <= 0"),this.strip();var lt=U==="le",yt=new F(J),mt,st,tt=this.clone();if(lt){for(st=0;!tt.isZero();st++)mt=tt.andln(255),tt.iushrn(8),yt[st]=mt;for(;st=4096&&(W+=13,U>>>=13),U>=64&&(W+=7,U>>>=7),U>=8&&(W+=4,U>>>=4),U>=2&&(W+=2,U>>>=2),W+U},l.prototype._zeroBits=function(F){if(F===0)return 26;var U=F,W=0;return(U&8191)===0&&(W+=13,U>>>=13),(U&127)===0&&(W+=7,U>>>=7),(U&15)===0&&(W+=4,U>>>=4),(U&3)===0&&(W+=2,U>>>=2),(U&1)===0&&W++,W},l.prototype.bitLength=function(){var F=this.words[this.length-1],U=this._countBits(F);return(this.length-1)*26+U};function _(F){for(var U=new Array(F.bitLength()),W=0;W>>J}return U}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,U=0;UF.length?this.clone().ior(F):F.clone().ior(this)},l.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},l.prototype.iuand=function(F){var U;this.length>F.length?U=F:U=this;for(var W=0;WF.length?this.clone().iand(F):F.clone().iand(this)},l.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},l.prototype.iuxor=function(F){var U,W;this.length>F.length?(U=this,W=F):(U=F,W=this);for(var q=0;qF.length?this.clone().ixor(F):F.clone().ixor(this)},l.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},l.prototype.inotn=function(F){o(typeof F=="number"&&F>=0);var U=Math.ceil(F/26)|0,W=F%26;this._expand(U),W>0&&U--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-W),this.strip()},l.prototype.notn=function(F){return this.clone().inotn(F)},l.prototype.setn=function(F,U){o(typeof F=="number"&&F>=0);var W=F/26|0,q=F%26;return this._expand(W+1),U?this.words[W]=this.words[W]|1<F.length?(W=this,q=F):(W=F,q=this);for(var J=0,lt=0;lt>>26;for(;J!==0&<>>26;if(this.length=W.length,J!==0)this.words[this.length]=J,this.length++;else if(W!==this)for(;ltF.length?this.clone().iadd(F):F.clone().iadd(this)},l.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var U=this.iadd(F);return F.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var W=this.cmp(F);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,J;W>0?(q=this,J=F):(q=F,J=this);for(var lt=0,yt=0;yt>26,this.words[yt]=U&67108863;for(;lt!==0&&yt>26,this.words[yt]=U&67108863;if(lt===0&&yt>>26,rt=st&67108863,at=Math.min(tt,U.length-1),vt=Math.max(0,tt-F.length+1);vt<=at;vt++){var it=tt-vt|0;J=F.words[it]|0,lt=U.words[vt]|0,yt=J*lt+rt,pt+=yt/67108864|0,rt=yt&67108863}W.words[tt]=rt|0,st=pt|0}return st!==0?W.words[tt]=st|0:W.length--,W.strip()}var M=function(F,U,W){var q=F.words,J=U.words,lt=W.words,yt=0,mt,st,tt,pt=q[0]|0,rt=pt&8191,at=pt>>>13,vt=q[1]|0,it=vt&8191,K=vt>>>13,ft=q[2]|0,ut=ft&8191,kt=ft>>>13,It=q[3]|0,Pt=It&8191,qt=It>>>13,Wt=q[4]|0,Jt=Wt&8191,ge=Wt>>>13,fe=q[5]|0,pe=fe&8191,se=fe>>>13,Tt=q[6]|0,Lt=Tt&8191,Mt=Tt>>>13,ee=q[7]|0,ve=ee&8191,oe=ee>>>13,Ae=q[8]|0,He=Ae&8191,Ge=Ae>>>13,cr=q[9]|0,ur=cr&8191,jr=cr>>>13,qr=J[0]|0,br=qr&8191,Xr=qr>>>13,nn=J[1]|0,Le=nn&8191,Gt=nn>>>13,ne=J[2]|0,Ct=ne&8191,gt=ne>>>13,St=J[3]|0,Nt=St&8191,re=St>>>13,le=J[4]|0,ke=le&8191,Ue=le>>>13,qe=J[5]|0,or=qe&8191,Sr=qe>>>13,Mr=J[6]|0,mr=Mr&8191,Qr=Mr>>>13,Wn=J[7]|0,qn=Wn&8191,ei=Wn>>>13,Di=J[8]|0,ui=Di&8191,Gn=Di>>>13,ua=J[9]|0,Yi=ua&8191,We=ua>>>13;W.negative=F.negative^U.negative,W.length=19,mt=Math.imul(rt,br),st=Math.imul(rt,Xr),st=st+Math.imul(at,br)|0,tt=Math.imul(at,Xr);var nr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(nr>>>26)|0,nr&=67108863,mt=Math.imul(it,br),st=Math.imul(it,Xr),st=st+Math.imul(K,br)|0,tt=Math.imul(K,Xr),mt=mt+Math.imul(rt,Le)|0,st=st+Math.imul(rt,Gt)|0,st=st+Math.imul(at,Le)|0,tt=tt+Math.imul(at,Gt)|0;var dr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(dr>>>26)|0,dr&=67108863,mt=Math.imul(ut,br),st=Math.imul(ut,Xr),st=st+Math.imul(kt,br)|0,tt=Math.imul(kt,Xr),mt=mt+Math.imul(it,Le)|0,st=st+Math.imul(it,Gt)|0,st=st+Math.imul(K,Le)|0,tt=tt+Math.imul(K,Gt)|0,mt=mt+Math.imul(rt,Ct)|0,st=st+Math.imul(rt,gt)|0,st=st+Math.imul(at,Ct)|0,tt=tt+Math.imul(at,gt)|0;var _r=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(_r>>>26)|0,_r&=67108863,mt=Math.imul(Pt,br),st=Math.imul(Pt,Xr),st=st+Math.imul(qt,br)|0,tt=Math.imul(qt,Xr),mt=mt+Math.imul(ut,Le)|0,st=st+Math.imul(ut,Gt)|0,st=st+Math.imul(kt,Le)|0,tt=tt+Math.imul(kt,Gt)|0,mt=mt+Math.imul(it,Ct)|0,st=st+Math.imul(it,gt)|0,st=st+Math.imul(K,Ct)|0,tt=tt+Math.imul(K,gt)|0,mt=mt+Math.imul(rt,Nt)|0,st=st+Math.imul(rt,re)|0,st=st+Math.imul(at,Nt)|0,tt=tt+Math.imul(at,re)|0;var tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(tn>>>26)|0,tn&=67108863,mt=Math.imul(Jt,br),st=Math.imul(Jt,Xr),st=st+Math.imul(ge,br)|0,tt=Math.imul(ge,Xr),mt=mt+Math.imul(Pt,Le)|0,st=st+Math.imul(Pt,Gt)|0,st=st+Math.imul(qt,Le)|0,tt=tt+Math.imul(qt,Gt)|0,mt=mt+Math.imul(ut,Ct)|0,st=st+Math.imul(ut,gt)|0,st=st+Math.imul(kt,Ct)|0,tt=tt+Math.imul(kt,gt)|0,mt=mt+Math.imul(it,Nt)|0,st=st+Math.imul(it,re)|0,st=st+Math.imul(K,Nt)|0,tt=tt+Math.imul(K,re)|0,mt=mt+Math.imul(rt,ke)|0,st=st+Math.imul(rt,Ue)|0,st=st+Math.imul(at,ke)|0,tt=tt+Math.imul(at,Ue)|0;var Cn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,mt=Math.imul(pe,br),st=Math.imul(pe,Xr),st=st+Math.imul(se,br)|0,tt=Math.imul(se,Xr),mt=mt+Math.imul(Jt,Le)|0,st=st+Math.imul(Jt,Gt)|0,st=st+Math.imul(ge,Le)|0,tt=tt+Math.imul(ge,Gt)|0,mt=mt+Math.imul(Pt,Ct)|0,st=st+Math.imul(Pt,gt)|0,st=st+Math.imul(qt,Ct)|0,tt=tt+Math.imul(qt,gt)|0,mt=mt+Math.imul(ut,Nt)|0,st=st+Math.imul(ut,re)|0,st=st+Math.imul(kt,Nt)|0,tt=tt+Math.imul(kt,re)|0,mt=mt+Math.imul(it,ke)|0,st=st+Math.imul(it,Ue)|0,st=st+Math.imul(K,ke)|0,tt=tt+Math.imul(K,Ue)|0,mt=mt+Math.imul(rt,or)|0,st=st+Math.imul(rt,Sr)|0,st=st+Math.imul(at,or)|0,tt=tt+Math.imul(at,Sr)|0;var Tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,mt=Math.imul(Lt,br),st=Math.imul(Lt,Xr),st=st+Math.imul(Mt,br)|0,tt=Math.imul(Mt,Xr),mt=mt+Math.imul(pe,Le)|0,st=st+Math.imul(pe,Gt)|0,st=st+Math.imul(se,Le)|0,tt=tt+Math.imul(se,Gt)|0,mt=mt+Math.imul(Jt,Ct)|0,st=st+Math.imul(Jt,gt)|0,st=st+Math.imul(ge,Ct)|0,tt=tt+Math.imul(ge,gt)|0,mt=mt+Math.imul(Pt,Nt)|0,st=st+Math.imul(Pt,re)|0,st=st+Math.imul(qt,Nt)|0,tt=tt+Math.imul(qt,re)|0,mt=mt+Math.imul(ut,ke)|0,st=st+Math.imul(ut,Ue)|0,st=st+Math.imul(kt,ke)|0,tt=tt+Math.imul(kt,Ue)|0,mt=mt+Math.imul(it,or)|0,st=st+Math.imul(it,Sr)|0,st=st+Math.imul(K,or)|0,tt=tt+Math.imul(K,Sr)|0,mt=mt+Math.imul(rt,mr)|0,st=st+Math.imul(rt,Qr)|0,st=st+Math.imul(at,mr)|0,tt=tt+Math.imul(at,Qr)|0;var Mn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,mt=Math.imul(ve,br),st=Math.imul(ve,Xr),st=st+Math.imul(oe,br)|0,tt=Math.imul(oe,Xr),mt=mt+Math.imul(Lt,Le)|0,st=st+Math.imul(Lt,Gt)|0,st=st+Math.imul(Mt,Le)|0,tt=tt+Math.imul(Mt,Gt)|0,mt=mt+Math.imul(pe,Ct)|0,st=st+Math.imul(pe,gt)|0,st=st+Math.imul(se,Ct)|0,tt=tt+Math.imul(se,gt)|0,mt=mt+Math.imul(Jt,Nt)|0,st=st+Math.imul(Jt,re)|0,st=st+Math.imul(ge,Nt)|0,tt=tt+Math.imul(ge,re)|0,mt=mt+Math.imul(Pt,ke)|0,st=st+Math.imul(Pt,Ue)|0,st=st+Math.imul(qt,ke)|0,tt=tt+Math.imul(qt,Ue)|0,mt=mt+Math.imul(ut,or)|0,st=st+Math.imul(ut,Sr)|0,st=st+Math.imul(kt,or)|0,tt=tt+Math.imul(kt,Sr)|0,mt=mt+Math.imul(it,mr)|0,st=st+Math.imul(it,Qr)|0,st=st+Math.imul(K,mr)|0,tt=tt+Math.imul(K,Qr)|0,mt=mt+Math.imul(rt,qn)|0,st=st+Math.imul(rt,ei)|0,st=st+Math.imul(at,qn)|0,tt=tt+Math.imul(at,ei)|0;var mi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(mi>>>26)|0,mi&=67108863,mt=Math.imul(He,br),st=Math.imul(He,Xr),st=st+Math.imul(Ge,br)|0,tt=Math.imul(Ge,Xr),mt=mt+Math.imul(ve,Le)|0,st=st+Math.imul(ve,Gt)|0,st=st+Math.imul(oe,Le)|0,tt=tt+Math.imul(oe,Gt)|0,mt=mt+Math.imul(Lt,Ct)|0,st=st+Math.imul(Lt,gt)|0,st=st+Math.imul(Mt,Ct)|0,tt=tt+Math.imul(Mt,gt)|0,mt=mt+Math.imul(pe,Nt)|0,st=st+Math.imul(pe,re)|0,st=st+Math.imul(se,Nt)|0,tt=tt+Math.imul(se,re)|0,mt=mt+Math.imul(Jt,ke)|0,st=st+Math.imul(Jt,Ue)|0,st=st+Math.imul(ge,ke)|0,tt=tt+Math.imul(ge,Ue)|0,mt=mt+Math.imul(Pt,or)|0,st=st+Math.imul(Pt,Sr)|0,st=st+Math.imul(qt,or)|0,tt=tt+Math.imul(qt,Sr)|0,mt=mt+Math.imul(ut,mr)|0,st=st+Math.imul(ut,Qr)|0,st=st+Math.imul(kt,mr)|0,tt=tt+Math.imul(kt,Qr)|0,mt=mt+Math.imul(it,qn)|0,st=st+Math.imul(it,ei)|0,st=st+Math.imul(K,qn)|0,tt=tt+Math.imul(K,ei)|0,mt=mt+Math.imul(rt,ui)|0,st=st+Math.imul(rt,Gn)|0,st=st+Math.imul(at,ui)|0,tt=tt+Math.imul(at,Gn)|0;var Mi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,mt=Math.imul(ur,br),st=Math.imul(ur,Xr),st=st+Math.imul(jr,br)|0,tt=Math.imul(jr,Xr),mt=mt+Math.imul(He,Le)|0,st=st+Math.imul(He,Gt)|0,st=st+Math.imul(Ge,Le)|0,tt=tt+Math.imul(Ge,Gt)|0,mt=mt+Math.imul(ve,Ct)|0,st=st+Math.imul(ve,gt)|0,st=st+Math.imul(oe,Ct)|0,tt=tt+Math.imul(oe,gt)|0,mt=mt+Math.imul(Lt,Nt)|0,st=st+Math.imul(Lt,re)|0,st=st+Math.imul(Mt,Nt)|0,tt=tt+Math.imul(Mt,re)|0,mt=mt+Math.imul(pe,ke)|0,st=st+Math.imul(pe,Ue)|0,st=st+Math.imul(se,ke)|0,tt=tt+Math.imul(se,Ue)|0,mt=mt+Math.imul(Jt,or)|0,st=st+Math.imul(Jt,Sr)|0,st=st+Math.imul(ge,or)|0,tt=tt+Math.imul(ge,Sr)|0,mt=mt+Math.imul(Pt,mr)|0,st=st+Math.imul(Pt,Qr)|0,st=st+Math.imul(qt,mr)|0,tt=tt+Math.imul(qt,Qr)|0,mt=mt+Math.imul(ut,qn)|0,st=st+Math.imul(ut,ei)|0,st=st+Math.imul(kt,qn)|0,tt=tt+Math.imul(kt,ei)|0,mt=mt+Math.imul(it,ui)|0,st=st+Math.imul(it,Gn)|0,st=st+Math.imul(K,ui)|0,tt=tt+Math.imul(K,Gn)|0,mt=mt+Math.imul(rt,Yi)|0,st=st+Math.imul(rt,We)|0,st=st+Math.imul(at,Yi)|0,tt=tt+Math.imul(at,We)|0;var Ni=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,mt=Math.imul(ur,Le),st=Math.imul(ur,Gt),st=st+Math.imul(jr,Le)|0,tt=Math.imul(jr,Gt),mt=mt+Math.imul(He,Ct)|0,st=st+Math.imul(He,gt)|0,st=st+Math.imul(Ge,Ct)|0,tt=tt+Math.imul(Ge,gt)|0,mt=mt+Math.imul(ve,Nt)|0,st=st+Math.imul(ve,re)|0,st=st+Math.imul(oe,Nt)|0,tt=tt+Math.imul(oe,re)|0,mt=mt+Math.imul(Lt,ke)|0,st=st+Math.imul(Lt,Ue)|0,st=st+Math.imul(Mt,ke)|0,tt=tt+Math.imul(Mt,Ue)|0,mt=mt+Math.imul(pe,or)|0,st=st+Math.imul(pe,Sr)|0,st=st+Math.imul(se,or)|0,tt=tt+Math.imul(se,Sr)|0,mt=mt+Math.imul(Jt,mr)|0,st=st+Math.imul(Jt,Qr)|0,st=st+Math.imul(ge,mr)|0,tt=tt+Math.imul(ge,Qr)|0,mt=mt+Math.imul(Pt,qn)|0,st=st+Math.imul(Pt,ei)|0,st=st+Math.imul(qt,qn)|0,tt=tt+Math.imul(qt,ei)|0,mt=mt+Math.imul(ut,ui)|0,st=st+Math.imul(ut,Gn)|0,st=st+Math.imul(kt,ui)|0,tt=tt+Math.imul(kt,Gn)|0,mt=mt+Math.imul(it,Yi)|0,st=st+Math.imul(it,We)|0,st=st+Math.imul(K,Yi)|0,tt=tt+Math.imul(K,We)|0;var Hi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,mt=Math.imul(ur,Ct),st=Math.imul(ur,gt),st=st+Math.imul(jr,Ct)|0,tt=Math.imul(jr,gt),mt=mt+Math.imul(He,Nt)|0,st=st+Math.imul(He,re)|0,st=st+Math.imul(Ge,Nt)|0,tt=tt+Math.imul(Ge,re)|0,mt=mt+Math.imul(ve,ke)|0,st=st+Math.imul(ve,Ue)|0,st=st+Math.imul(oe,ke)|0,tt=tt+Math.imul(oe,Ue)|0,mt=mt+Math.imul(Lt,or)|0,st=st+Math.imul(Lt,Sr)|0,st=st+Math.imul(Mt,or)|0,tt=tt+Math.imul(Mt,Sr)|0,mt=mt+Math.imul(pe,mr)|0,st=st+Math.imul(pe,Qr)|0,st=st+Math.imul(se,mr)|0,tt=tt+Math.imul(se,Qr)|0,mt=mt+Math.imul(Jt,qn)|0,st=st+Math.imul(Jt,ei)|0,st=st+Math.imul(ge,qn)|0,tt=tt+Math.imul(ge,ei)|0,mt=mt+Math.imul(Pt,ui)|0,st=st+Math.imul(Pt,Gn)|0,st=st+Math.imul(qt,ui)|0,tt=tt+Math.imul(qt,Gn)|0,mt=mt+Math.imul(ut,Yi)|0,st=st+Math.imul(ut,We)|0,st=st+Math.imul(kt,Yi)|0,tt=tt+Math.imul(kt,We)|0;var Ji=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,mt=Math.imul(ur,Nt),st=Math.imul(ur,re),st=st+Math.imul(jr,Nt)|0,tt=Math.imul(jr,re),mt=mt+Math.imul(He,ke)|0,st=st+Math.imul(He,Ue)|0,st=st+Math.imul(Ge,ke)|0,tt=tt+Math.imul(Ge,Ue)|0,mt=mt+Math.imul(ve,or)|0,st=st+Math.imul(ve,Sr)|0,st=st+Math.imul(oe,or)|0,tt=tt+Math.imul(oe,Sr)|0,mt=mt+Math.imul(Lt,mr)|0,st=st+Math.imul(Lt,Qr)|0,st=st+Math.imul(Mt,mr)|0,tt=tt+Math.imul(Mt,Qr)|0,mt=mt+Math.imul(pe,qn)|0,st=st+Math.imul(pe,ei)|0,st=st+Math.imul(se,qn)|0,tt=tt+Math.imul(se,ei)|0,mt=mt+Math.imul(Jt,ui)|0,st=st+Math.imul(Jt,Gn)|0,st=st+Math.imul(ge,ui)|0,tt=tt+Math.imul(ge,Gn)|0,mt=mt+Math.imul(Pt,Yi)|0,st=st+Math.imul(Pt,We)|0,st=st+Math.imul(qt,Yi)|0,tt=tt+Math.imul(qt,We)|0;var di=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(di>>>26)|0,di&=67108863,mt=Math.imul(ur,ke),st=Math.imul(ur,Ue),st=st+Math.imul(jr,ke)|0,tt=Math.imul(jr,Ue),mt=mt+Math.imul(He,or)|0,st=st+Math.imul(He,Sr)|0,st=st+Math.imul(Ge,or)|0,tt=tt+Math.imul(Ge,Sr)|0,mt=mt+Math.imul(ve,mr)|0,st=st+Math.imul(ve,Qr)|0,st=st+Math.imul(oe,mr)|0,tt=tt+Math.imul(oe,Qr)|0,mt=mt+Math.imul(Lt,qn)|0,st=st+Math.imul(Lt,ei)|0,st=st+Math.imul(Mt,qn)|0,tt=tt+Math.imul(Mt,ei)|0,mt=mt+Math.imul(pe,ui)|0,st=st+Math.imul(pe,Gn)|0,st=st+Math.imul(se,ui)|0,tt=tt+Math.imul(se,Gn)|0,mt=mt+Math.imul(Jt,Yi)|0,st=st+Math.imul(Jt,We)|0,st=st+Math.imul(ge,Yi)|0,tt=tt+Math.imul(ge,We)|0;var za=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(za>>>26)|0,za&=67108863,mt=Math.imul(ur,or),st=Math.imul(ur,Sr),st=st+Math.imul(jr,or)|0,tt=Math.imul(jr,Sr),mt=mt+Math.imul(He,mr)|0,st=st+Math.imul(He,Qr)|0,st=st+Math.imul(Ge,mr)|0,tt=tt+Math.imul(Ge,Qr)|0,mt=mt+Math.imul(ve,qn)|0,st=st+Math.imul(ve,ei)|0,st=st+Math.imul(oe,qn)|0,tt=tt+Math.imul(oe,ei)|0,mt=mt+Math.imul(Lt,ui)|0,st=st+Math.imul(Lt,Gn)|0,st=st+Math.imul(Mt,ui)|0,tt=tt+Math.imul(Mt,Gn)|0,mt=mt+Math.imul(pe,Yi)|0,st=st+Math.imul(pe,We)|0,st=st+Math.imul(se,Yi)|0,tt=tt+Math.imul(se,We)|0;var qa=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(qa>>>26)|0,qa&=67108863,mt=Math.imul(ur,mr),st=Math.imul(ur,Qr),st=st+Math.imul(jr,mr)|0,tt=Math.imul(jr,Qr),mt=mt+Math.imul(He,qn)|0,st=st+Math.imul(He,ei)|0,st=st+Math.imul(Ge,qn)|0,tt=tt+Math.imul(Ge,ei)|0,mt=mt+Math.imul(ve,ui)|0,st=st+Math.imul(ve,Gn)|0,st=st+Math.imul(oe,ui)|0,tt=tt+Math.imul(oe,Gn)|0,mt=mt+Math.imul(Lt,Yi)|0,st=st+Math.imul(Lt,We)|0,st=st+Math.imul(Mt,Yi)|0,tt=tt+Math.imul(Mt,We)|0;var Oe=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,mt=Math.imul(ur,qn),st=Math.imul(ur,ei),st=st+Math.imul(jr,qn)|0,tt=Math.imul(jr,ei),mt=mt+Math.imul(He,ui)|0,st=st+Math.imul(He,Gn)|0,st=st+Math.imul(Ge,ui)|0,tt=tt+Math.imul(Ge,Gn)|0,mt=mt+Math.imul(ve,Yi)|0,st=st+Math.imul(ve,We)|0,st=st+Math.imul(oe,Yi)|0,tt=tt+Math.imul(oe,We)|0;var ze=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ze>>>26)|0,ze&=67108863,mt=Math.imul(ur,ui),st=Math.imul(ur,Gn),st=st+Math.imul(jr,ui)|0,tt=Math.imul(jr,Gn),mt=mt+Math.imul(He,Yi)|0,st=st+Math.imul(He,We)|0,st=st+Math.imul(Ge,Yi)|0,tt=tt+Math.imul(Ge,We)|0;var Br=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Br>>>26)|0,Br&=67108863,mt=Math.imul(ur,Yi),st=Math.imul(ur,We),st=st+Math.imul(jr,Yi)|0,tt=Math.imul(jr,We);var $r=(yt+mt|0)+((st&8191)<<13)|0;return yt=(tt+(st>>>13)|0)+($r>>>26)|0,$r&=67108863,lt[0]=nr,lt[1]=dr,lt[2]=_r,lt[3]=tn,lt[4]=Cn,lt[5]=Tn,lt[6]=Mn,lt[7]=mi,lt[8]=Mi,lt[9]=Ni,lt[10]=Hi,lt[11]=Ji,lt[12]=di,lt[13]=za,lt[14]=qa,lt[15]=Oe,lt[16]=ze,lt[17]=Br,lt[18]=$r,yt!==0&&(lt[19]=yt,W.length++),W};Math.imul||(M=P);function C(F,U,W){W.negative=U.negative^F.negative,W.length=F.length+U.length;for(var q=0,J=0,lt=0;lt>>26)|0,J+=yt>>>26,yt&=67108863}W.words[lt]=mt,q=yt,yt=J}return q!==0?W.words[lt]=q:W.length--,W.strip()}function A(F,U,W){var q=new h;return q.mulp(F,U,W)}l.prototype.mulTo=function(F,U){var W,q=this.length+F.length;return this.length===10&&F.length===10?W=M(this,F,U):q<63?W=P(this,F,U):q<1024?W=C(this,F,U):W=A(this,F,U),W};function h(F,U){this.x=F,this.y=U}h.prototype.makeRBT=function(F){for(var U=new Array(F),W=l.prototype._countBits(F)-1,q=0;q>=1;return q},h.prototype.permute=function(F,U,W,q,J,lt){for(var yt=0;yt>>1)J++;return 1<>>13,W[2*lt+1]=J&8191,J=J>>>13;for(lt=2*U;lt>=26,U+=q/67108864|0,U+=J>>>26,this.words[W]=J&67108863}return U!==0&&(this.words[W]=U,this.length++),this},l.prototype.muln=function(F){return this.clone().imuln(F)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(F){var U=_(F);if(U.length===0)return new l(1);for(var W=this,q=0;q=0);var U=F%26,W=(F-U)/26,q=67108863>>>26-U<<26-U,J;if(U!==0){var lt=0;for(J=0;J>>26-U}lt&&(this.words[J]=lt,this.length++)}if(W!==0){for(J=this.length-1;J>=0;J--)this.words[J+W]=this.words[J];for(J=0;J=0);var q;U?q=(U-U%26)/26:q=0;var J=F%26,lt=Math.min((F-J)/26,this.length),yt=67108863^67108863>>>J<lt)for(this.length-=lt,st=0;st=0&&(tt!==0||st>=q);st--){var pt=this.words[st]|0;this.words[st]=tt<<26-J|pt>>>J,tt=pt&yt}return mt&&tt!==0&&(mt.words[mt.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(F,U,W){return o(this.negative===0),this.iushrn(F,U,W)},l.prototype.shln=function(F){return this.clone().ishln(F)},l.prototype.ushln=function(F){return this.clone().iushln(F)},l.prototype.shrn=function(F){return this.clone().ishrn(F)},l.prototype.ushrn=function(F){return this.clone().iushrn(F)},l.prototype.testn=function(F){o(typeof F=="number"&&F>=0);var U=F%26,W=(F-U)/26,q=1<=0);var U=F%26,W=(F-U)/26;if(o(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(U!==0&&W++,this.length=Math.min(W,this.length),U!==0){var q=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},l.prototype.isubn=function(F){if(o(typeof F=="number"),o(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(mt/67108864|0),this.words[J+W]=lt&67108863}for(;J>26,this.words[J+W]=lt&67108863;if(yt===0)return this.strip();for(o(yt===-1),yt=0,J=0;J>26,this.words[J]=lt&67108863;return this.negative=1,this.strip()},l.prototype._wordDiv=function(F,U){var W=this.length-F.length,q=this.clone(),J=F,lt=J.words[J.length-1]|0,yt=this._countBits(lt);W=26-yt,W!==0&&(J=J.ushln(W),q.iushln(W),lt=J.words[J.length-1]|0);var mt=q.length-J.length,st;if(U!=="mod"){st=new l(null),st.length=mt+1,st.words=new Array(st.length);for(var tt=0;tt=0;rt--){var at=(q.words[J.length+rt]|0)*67108864+(q.words[J.length+rt-1]|0);for(at=Math.min(at/lt|0,67108863),q._ishlnsubmul(J,at,rt);q.negative!==0;)at--,q.negative=0,q._ishlnsubmul(J,1,rt),q.isZero()||(q.negative^=1);st&&(st.words[rt]=at)}return st&&st.strip(),q.strip(),U!=="div"&&W!==0&&q.iushrn(W),{div:st||null,mod:q}},l.prototype.divmod=function(F,U,W){if(o(!F.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var q,J,lt;return this.negative!==0&&F.negative===0?(lt=this.neg().divmod(F,U),U!=="mod"&&(q=lt.div.neg()),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.iadd(F)),{div:q,mod:J}):this.negative===0&&F.negative!==0?(lt=this.divmod(F.neg(),U),U!=="mod"&&(q=lt.div.neg()),{div:q,mod:lt.mod}):(this.negative&F.negative)!==0?(lt=this.neg().divmod(F.neg(),U),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.isub(F)),{div:lt.div,mod:J}):F.length>this.length||this.cmp(F)<0?{div:new l(0),mod:this}:F.length===1?U==="div"?{div:this.divn(F.words[0]),mod:null}:U==="mod"?{div:null,mod:new l(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new l(this.modn(F.words[0]))}:this._wordDiv(F,U)},l.prototype.div=function(F){return this.divmod(F,"div",!1).div},l.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},l.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},l.prototype.divRound=function(F){var U=this.divmod(F);if(U.mod.isZero())return U.div;var W=U.div.negative!==0?U.mod.isub(F):U.mod,q=F.ushrn(1),J=F.andln(1),lt=W.cmp(q);return lt<0||J===1&<===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},l.prototype.modn=function(F){o(F<=67108863);for(var U=67108864%F,W=0,q=this.length-1;q>=0;q--)W=(U*W+(this.words[q]|0))%F;return W},l.prototype.idivn=function(F){o(F<=67108863);for(var U=0,W=this.length-1;W>=0;W--){var q=(this.words[W]|0)+U*67108864;this.words[W]=q/F|0,U=q%F}return this.strip()},l.prototype.divn=function(F){return this.clone().idivn(F)},l.prototype.egcd=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=new l(0),yt=new l(1),mt=0;U.isEven()&&W.isEven();)U.iushrn(1),W.iushrn(1),++mt;for(var st=W.clone(),tt=U.clone();!U.isZero();){for(var pt=0,rt=1;(U.words[0]&rt)===0&&pt<26;++pt,rt<<=1);if(pt>0)for(U.iushrn(pt);pt-- >0;)(q.isOdd()||J.isOdd())&&(q.iadd(st),J.isub(tt)),q.iushrn(1),J.iushrn(1);for(var at=0,vt=1;(W.words[0]&vt)===0&&at<26;++at,vt<<=1);if(at>0)for(W.iushrn(at);at-- >0;)(lt.isOdd()||yt.isOdd())&&(lt.iadd(st),yt.isub(tt)),lt.iushrn(1),yt.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(lt),J.isub(yt)):(W.isub(U),lt.isub(q),yt.isub(J))}return{a:lt,b:yt,gcd:W.iushln(mt)}},l.prototype._invmp=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=W.clone();U.cmpn(1)>0&&W.cmpn(1)>0;){for(var yt=0,mt=1;(U.words[0]&mt)===0&&yt<26;++yt,mt<<=1);if(yt>0)for(U.iushrn(yt);yt-- >0;)q.isOdd()&&q.iadd(lt),q.iushrn(1);for(var st=0,tt=1;(W.words[0]&tt)===0&&st<26;++st,tt<<=1);if(st>0)for(W.iushrn(st);st-- >0;)J.isOdd()&&J.iadd(lt),J.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(J)):(W.isub(U),J.isub(q))}var pt;return U.cmpn(1)===0?pt=q:pt=J,pt.cmpn(0)<0&&pt.iadd(F),pt},l.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var U=this.clone(),W=F.clone();U.negative=0,W.negative=0;for(var q=0;U.isEven()&&W.isEven();q++)U.iushrn(1),W.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;W.isEven();)W.iushrn(1);var J=U.cmp(W);if(J<0){var lt=U;U=W,W=lt}else if(J===0||W.cmpn(1)===0)break;U.isub(W)}while(!0);return W.iushln(q)},l.prototype.invm=function(F){return this.egcd(F).a.umod(F)},l.prototype.isEven=function(){return(this.words[0]&1)===0},l.prototype.isOdd=function(){return(this.words[0]&1)===1},l.prototype.andln=function(F){return this.words[0]&F},l.prototype.bincn=function(F){o(typeof F=="number");var U=F%26,W=(F-U)/26,q=1<>>26,yt&=67108863,this.words[lt]=yt}return J!==0&&(this.words[lt]=J,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(F){var U=F<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var W;if(this.length>1)W=1;else{U&&(F=-F),o(F<=67108863,"Number is too big");var q=this.words[0]|0;W=q===F?0:qF.length)return 1;if(this.length=0;W--){var q=this.words[W]|0,J=F.words[W]|0;if(q!==J){qJ&&(U=1);break}}return U},l.prototype.gtn=function(F){return this.cmpn(F)===1},l.prototype.gt=function(F){return this.cmp(F)===1},l.prototype.gten=function(F){return this.cmpn(F)>=0},l.prototype.gte=function(F){return this.cmp(F)>=0},l.prototype.ltn=function(F){return this.cmpn(F)===-1},l.prototype.lt=function(F){return this.cmp(F)===-1},l.prototype.lten=function(F){return this.cmpn(F)<=0},l.prototype.lte=function(F){return this.cmp(F)<=0},l.prototype.eqn=function(F){return this.cmpn(F)===0},l.prototype.eq=function(F){return this.cmp(F)===0},l.red=function(F){return new V(F)},l.prototype.toRed=function(F){return o(!this.red,"Already a number in reduction context"),o(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},l.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(F){return this.red=F,this},l.prototype.forceRed=function(F){return o(!this.red,"Already a number in reduction context"),this._forceRed(F)},l.prototype.redAdd=function(F){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},l.prototype.redIAdd=function(F){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},l.prototype.redSub=function(F){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},l.prototype.redISub=function(F){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},l.prototype.redShl=function(F){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},l.prototype.redMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},l.prototype.redIMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},l.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(F){return o(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var p={k256:null,p224:null,p192:null,p25519:null};function k(F,U){this.name=F,this.p=new l(U,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var F=new l(null);return F.words=new Array(Math.ceil(this.n/13)),F},k.prototype.ireduce=function(F){var U=F,W;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),W=U.bitLength();while(W>this.n);var q=W0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},k.prototype.split=function(F,U){F.iushrn(this.n,0,U)},k.prototype.imulK=function(F){return F.imul(this.k)};function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,k),w.prototype.split=function(F,U){for(var W=4194303,q=Math.min(F.length,9),J=0;J>>22,lt=yt}lt>>>=22,F.words[J-10]=lt,lt===0&&F.length>10?F.length-=10:F.length-=9},w.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var U=0,W=0;W>>=26,F.words[W]=J,U=q}return U!==0&&(F.words[F.length++]=U),F},l._prime=function(F){if(p[F])return p[F];var U;if(F==="k256")U=new w;else if(F==="p224")U=new B;else if(F==="p192")U=new O;else if(F==="p25519")U=new j;else throw new Error("Unknown prime "+F);return p[F]=U,U};function V(F){if(typeof F=="string"){var U=l._prime(F);this.m=U.p,this.prime=U}else o(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(F){o(F.negative===0,"red works only with positives"),o(F.red,"red works only with red numbers")},V.prototype._verify2=function(F,U){o((F.negative|U.negative)===0,"red works only with positives"),o(F.red&&F.red===U.red,"red works only with red numbers")},V.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},V.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},V.prototype.add=function(F,U){this._verify2(F,U);var W=F.add(U);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},V.prototype.iadd=function(F,U){this._verify2(F,U);var W=F.iadd(U);return W.cmp(this.m)>=0&&W.isub(this.m),W},V.prototype.sub=function(F,U){this._verify2(F,U);var W=F.sub(U);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},V.prototype.isub=function(F,U){this._verify2(F,U);var W=F.isub(U);return W.cmpn(0)<0&&W.iadd(this.m),W},V.prototype.shl=function(F,U){return this._verify1(F),this.imod(F.ushln(U))},V.prototype.imul=function(F,U){return this._verify2(F,U),this.imod(F.imul(U))},V.prototype.mul=function(F,U){return this._verify2(F,U),this.imod(F.mul(U))},V.prototype.isqr=function(F){return this.imul(F,F.clone())},V.prototype.sqr=function(F){return this.mul(F,F)},V.prototype.sqrt=function(F){if(F.isZero())return F.clone();var U=this.m.andln(3);if(o(U%2===1),U===3){var W=this.m.add(new l(1)).iushrn(2);return this.pow(F,W)}for(var q=this.m.subn(1),J=0;!q.isZero()&&q.andln(1)===0;)J++,q.iushrn(1);o(!q.isZero());var lt=new l(1).toRed(this),yt=lt.redNeg(),mt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new l(2*st*st).toRed(this);this.pow(st,mt).cmp(yt)!==0;)st.redIAdd(yt);for(var tt=this.pow(st,q),pt=this.pow(F,q.addn(1).iushrn(1)),rt=this.pow(F,q),at=J;rt.cmp(lt)!==0;){for(var vt=rt,it=0;vt.cmp(lt)!==0;it++)vt=vt.redSqr();o(it=0;J--){for(var tt=U.words[J],pt=st-1;pt>=0;pt--){var rt=tt>>pt&1;if(lt!==q[0]&&(lt=this.sqr(lt)),rt===0&&yt===0){mt=0;continue}yt<<=1,yt|=rt,mt++,!(mt!==W&&(J!==0||pt!==0))&&(lt=this.mul(lt,q[yt]),mt=0,yt=0)}st=26}return lt},V.prototype.convertTo=function(F){var U=F.umod(this.m);return U===F?U.clone():U},V.prototype.convertFrom=function(F){var U=F.clone();return U.red=null,U},l.mont=function(F){return new H(F)};function H(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,V),H.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},H.prototype.convertFrom=function(F){var U=this.imod(F.mul(this.rinv));return U.red=null,U},H.prototype.imul=function(F,U){if(F.isZero()||U.isZero())return F.words[0]=0,F.length=1,F;var W=F.imul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.mul=function(F,U){if(F.isZero()||U.isZero())return new l(0)._forceRed(this);var W=F.mul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.invm=function(F){var U=this.imod(F._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(t,this)},6860:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]-n[0],r[1]=a[1]-n[1],r[2]=a[2]-n[2],r[3]=a[3]-n[3],r}},6864:function(t){t.exports=e;function e(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(t,e,r){t.exports=u;var a=r(1888),n=r(855),o=r(7150);function i(b,_){for(var P=0;P>>1;if(!(h<=0)){var p,k=a.mallocDouble(2*h*C),w=a.mallocInt32(C);if(C=l(b,h,k,w),C>0){if(h===1&&M)n.init(C),p=n.sweepComplete(h,P,0,C,k,w,0,C,k,w);else{var B=a.mallocDouble(2*h*A),O=a.mallocInt32(A);A=l(_,h,B,O),A>0&&(n.init(C+A),h===1?p=n.sweepBipartite(h,P,0,C,k,w,0,A,B,O):p=o(h,P,M,C,k,w,A,B,O),a.free(B),a.free(O))}a.free(k),a.free(w)}return p}}}var x;function y(b,_){x.push([b,_])}function v(b){return x=[],f(b,b,y,!0),x}function T(b,_){return x=[],f(b,_,y,!1),x}function u(b,_,P){switch(arguments.length){case 1:return v(b);case 2:return typeof _=="function"?f(b,b,_,!0):T(b,_);case 3:return f(b,_,P,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(t){t.exports=e;function e(r,a,n,o){var i=n[1],l=n[2],f=a[1]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=a[0],r[1]=i+f*v-x*y,r[2]=l+f*y+x*v,r}},7004:function(t){t.exports=e;function e(r){for(var a=r.length,n=r[r.length-1],o=a,i=a-2;i>=0;--i){var l=n,f=r[i];n=l+f;var x=n-l,y=f-x;y&&(r[--o]=n,n=y)}for(var v=0,i=o;i=p0)&&!(p1>=hi)"),_=y("lo===p0"),P=y("lo0;){pt-=1;var vt=pt*h,it=w[vt],K=w[vt+1],ft=w[vt+2],ut=w[vt+3],kt=w[vt+4],It=w[vt+5],Pt=pt*p,qt=B[Pt],Wt=B[Pt+1],Jt=It&1,ge=!!(It&16),fe=lt,pe=yt,se=st,Tt=tt;if(Jt&&(fe=st,pe=tt,se=lt,Tt=yt),!(It&2&&(ft=P(U,it,K,ft,fe,pe,Wt),K>=ft))&&!(It&4&&(K=M(U,it,K,ft,fe,pe,qt),K>=ft))){var Lt=ft-K,Mt=kt-ut;if(ge){if(U*Lt*(Lt+Mt)"u"?r(1538):WeakMap,n=r(2762),o=r(8116),i=new a;function l(f){var x=i.get(f),y=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!y||!f.isBuffer(y)){var v=n(f,new Float32Array([-1,-1,-1,4,4,-1]));x=o(f,[{buffer:v,type:f.FLOAT,size:2}]),x._triangleBuffer=v,i.set(f,x)}x.bind(),f.drawArrays(f.TRIANGLES,0,3),x.unbind()}t.exports=l},7182:function(t,e,r){var a={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};a.create();var n=a.create();t.exports=function(o,i,l,f,x,y){return a.identity(o),a.fromRotationTranslation(o,y,i),o[3]=x[0],o[7]=x[1],o[11]=x[2],o[15]=x[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(o,o,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(o,o,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(o,o,n)),a.scale(o,o,l),o}},7201:function(t,e,r){var a=1e-6,n=1e-6,o=r(9405),i=r(2762),l=r(8116),f=r(7766),x=r(8406),y=r(6760),v=r(7608),T=r(9618),u=r(6729),b=r(7765),_=r(1888),P=r(840),M=r(7626),C=P.meshShader,A=P.wireShader,h=P.pointShader,p=P.pickShader,k=P.pointPickShader,w=P.contourShader,B=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(st,tt,pt,rt,at,vt,it,K,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Ae){this.gl=st,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=tt,this.dirty=!0,this.triShader=pt,this.lineShader=rt,this.pointShader=at,this.pickShader=vt,this.pointPickShader=it,this.contourShader=K,this.trianglePositions=ft,this.triangleColors=kt,this.triangleNormals=Pt,this.triangleUVs=It,this.triangleIds=ut,this.triangleVAO=qt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Wt,this.edgeColors=ge,this.edgeUVs=fe,this.edgeIds=Jt,this.edgeVAO=pe,this.edgeCount=0,this.pointPositions=se,this.pointColors=Lt,this.pointUVs=Mt,this.pointSizes=ee,this.pointIds=Tt,this.pointVAO=ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=oe,this.contourVAO=Ae,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=B,this._view=B,this._projection=B,this._resolution=[1,1]}var j=O.prototype;j.isOpaque=function(){return!this.hasAlpha},j.isTransparent=function(){return this.hasAlpha},j.pickSlots=1,j.setPickBase=function(st){this.pickId=st};function V(st,tt){if(!tt||!tt.length)return 1;for(var pt=0;ptst&&pt>0){var rt=(tt[pt][0]-st)/(tt[pt][0]-tt[pt-1][0]);return tt[pt][1]*(1-rt)+rt*tt[pt-1][1]}}return 1}function H(st,tt){for(var pt=u({colormap:st,nshades:256,format:"rgba"}),rt=new Uint8Array(1024),at=0;at<256;++at){for(var vt=pt[at],it=0;it<3;++it)rt[4*at+it]=vt[it];tt?rt[4*at+3]=255*V(at/255,tt):rt[4*at+3]=255*vt[3]}return T(rt,[256,256,4],[4,0,1])}function F(st){for(var tt=st.length,pt=new Array(tt),rt=0;rt0){var Pt=this.triShader;Pt.bind(),Pt.uniforms=K,this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Pt=this.lineShader;Pt.bind(),Pt.uniforms=K,this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Pt=this.pointShader;Pt.bind(),Pt.uniforms=K,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Pt=this.contourShader;Pt.bind(),Pt.uniforms=K,this.contourVAO.bind(),tt.drawArrays(tt.LINES,0,this.contourCount),this.contourVAO.unbind()}},j.drawPick=function(st){st=st||{};for(var tt=this.gl,pt=st.model||B,rt=st.view||B,at=st.projection||B,vt=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],it=0;it<3;++it)vt[0][it]=Math.max(vt[0][it],this.clipBounds[0][it]),vt[1][it]=Math.min(vt[1][it],this.clipBounds[1][it]);this._model=[].slice.call(pt),this._view=[].slice.call(rt),this._projection=[].slice.call(at),this._resolution=[tt.drawingBufferWidth,tt.drawingBufferHeight];var K={model:pt,view:rt,projection:at,clipBounds:vt,pickId:this.pickId/255},ft=this.pickShader;if(ft.bind(),ft.uniforms=K,this.triangleCount>0&&(this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ft=this.pointPickShader;ft.bind(),ft.uniforms=K,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}},j.pick=function(st){if(!st||st.id!==this.pickId)return null;for(var tt=st.value[0]+256*st.value[1]+65536*st.value[2],pt=this.cells[tt],rt=this.positions,at=new Array(pt.length),vt=0;vtMath.max(C,A)?h[2]=1:C>Math.max(M,A)?h[0]=1:h[1]=1;for(var p=0,k=0,w=0;w<3;++w)p+=P[w]*P[w],k+=h[w]*P[w];for(var w=0;w<3;++w)h[w]-=k/p*P[w];return l(h,h),h}function T(P,M,C,A,h,p,k,w){this.center=a(C),this.up=a(A),this.right=a(h),this.radius=a([p]),this.angle=a([k,w]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(P,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 B=0;B<16;++B)this.computedMatrix[B]=.5;this.recalcMatrix(0)}var u=T.prototype;u.setDistanceLimits=function(P,M){P>0?P=Math.log(P):P=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,P),this.radius.bounds[0][0]=P,this.radius.bounds[1][0]=M},u.getDistanceLimits=function(P){var M=this.radius.bounds[0];return P?(P[0]=Math.exp(M[0][0]),P[1]=Math.exp(M[1][0]),P):[Math.exp(M[0][0]),Math.exp(M[1][0])]},u.recalcMatrix=function(P){this.center.curve(P),this.up.curve(P),this.right.curve(P),this.radius.curve(P),this.angle.curve(P);for(var M=this.computedUp,C=this.computedRight,A=0,h=0,p=0;p<3;++p)h+=M[p]*C[p],A+=M[p]*M[p];for(var k=Math.sqrt(A),w=0,p=0;p<3;++p)C[p]-=M[p]*h/A,w+=C[p]*C[p],M[p]/=k;for(var B=Math.sqrt(w),p=0;p<3;++p)C[p]/=B;var O=this.computedToward;i(O,M,C),l(O,O);for(var j=Math.exp(this.computedRadius[0]),V=this.computedAngle[0],H=this.computedAngle[1],F=Math.cos(V),U=Math.sin(V),W=Math.cos(H),q=Math.sin(H),J=this.computedCenter,lt=F*W,yt=U*W,mt=q,st=-F*q,tt=-U*q,pt=W,rt=this.computedEye,at=this.computedMatrix,p=0;p<3;++p){var vt=lt*C[p]+yt*O[p]+mt*M[p];at[4*p+1]=st*C[p]+tt*O[p]+pt*M[p],at[4*p+2]=vt,at[4*p+3]=0}var it=at[1],K=at[5],ft=at[9],ut=at[2],kt=at[6],It=at[10],Pt=K*It-ft*kt,qt=ft*ut-it*It,Wt=it*kt-K*ut,Jt=x(Pt,qt,Wt);Pt/=Jt,qt/=Jt,Wt/=Jt,at[0]=Pt,at[4]=qt,at[8]=Wt;for(var p=0;p<3;++p)rt[p]=J[p]+at[2+4*p]*j;for(var p=0;p<3;++p){for(var w=0,ge=0;ge<3;++ge)w+=at[p+4*ge]*rt[ge];at[12+p]=-w}at[15]=1},u.getMatrix=function(P,M){this.recalcMatrix(P);var C=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=C[A];return M}return C};var b=[0,0,0];u.rotate=function(P,M,C,A){if(this.angle.move(P,M,C),A){this.recalcMatrix(P);var h=this.computedMatrix;b[0]=h[2],b[1]=h[6],b[2]=h[10];for(var p=this.computedUp,k=this.computedRight,w=this.computedToward,B=0;B<3;++B)h[4*B]=p[B],h[4*B+1]=k[B],h[4*B+2]=w[B];o(h,h,A,b);for(var B=0;B<3;++B)p[B]=h[4*B],k[B]=h[4*B+1];this.up.set(P,p[0],p[1],p[2]),this.right.set(P,k[0],k[1],k[2])}},u.pan=function(P,M,C,A){M=M||0,C=C||0,A=A||0,this.recalcMatrix(P);var h=this.computedMatrix;Math.exp(this.computedRadius[0]);var p=h[1],k=h[5],w=h[9],B=x(p,k,w);p/=B,k/=B,w/=B;var O=h[0],j=h[4],V=h[8],H=O*p+j*k+V*w;O-=p*H,j-=k*H,V-=w*H;var F=x(O,j,V);O/=F,j/=F,V/=F;var U=O*M+p*C,W=j*M+k*C,q=V*M+w*C;this.center.move(P,U,W,q);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+A),this.radius.set(P,Math.log(J))},u.translate=function(P,M,C,A){this.center.move(P,M||0,C||0,A||0)},u.setMatrix=function(P,M,C,A){var h=1;typeof C=="number"&&(h=C|0),(h<0||h>3)&&(h=1);var p=(h+2)%3;M||(this.recalcMatrix(P),M=this.computedMatrix);var k=M[h],w=M[h+4],B=M[h+8];if(A){var O=Math.abs(k),j=Math.abs(w),V=Math.abs(B),H=Math.max(O,j,V);O===H?(k=k<0?-1:1,w=B=0):V===H?(B=B<0?-1:1,k=w=0):(w=w<0?-1:1,k=B=0)}else{var F=x(k,w,B);k/=F,w/=F,B/=F}var U=M[p],W=M[p+4],q=M[p+8],J=U*k+W*w+q*B;U-=k*J,W-=w*J,q-=B*J;var lt=x(U,W,q);U/=lt,W/=lt,q/=lt;var yt=w*q-B*W,mt=B*U-k*q,st=k*W-w*U,tt=x(yt,mt,st);yt/=tt,mt/=tt,st/=tt,this.center.jump(P,Tt,Lt,Mt),this.radius.idle(P),this.up.jump(P,k,w,B),this.right.jump(P,U,W,q);var pt,rt;if(h===2){var at=M[1],vt=M[5],it=M[9],K=at*U+vt*W+it*q,ft=at*yt+vt*mt+it*st;Pt<0?pt=-Math.PI/2:pt=Math.PI/2,rt=Math.atan2(ft,K)}else{var ut=M[2],kt=M[6],It=M[10],Pt=ut*k+kt*w+It*B,qt=ut*U+kt*W+It*q,Wt=ut*yt+kt*mt+It*st;pt=Math.asin(y(Pt)),rt=Math.atan2(Wt,qt)}this.angle.jump(P,rt,pt),this.recalcMatrix(P);var Jt=M[2],ge=M[6],fe=M[10],pe=this.computedMatrix;n(pe,M);var se=pe[15],Tt=pe[12]/se,Lt=pe[13]/se,Mt=pe[14]/se,ee=Math.exp(this.computedRadius[0]);this.center.jump(P,Tt-Jt*ee,Lt-ge*ee,Mt-fe*ee)},u.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},u.idle=function(P){this.center.idle(P),this.up.idle(P),this.right.idle(P),this.radius.idle(P),this.angle.idle(P)},u.flush=function(P){this.center.flush(P),this.up.flush(P),this.right.flush(P),this.radius.flush(P),this.angle.flush(P)},u.setDistance=function(P,M){M>0&&this.radius.set(P,Math.log(M))},u.lookAt=function(P,M,C,A){this.recalcMatrix(P),M=M||this.computedEye,C=C||this.computedCenter,A=A||this.computedUp;var h=A[0],p=A[1],k=A[2],w=x(h,p,k);if(!(w<1e-6)){h/=w,p/=w,k/=w;var B=M[0]-C[0],O=M[1]-C[1],j=M[2]-C[2],V=x(B,O,j);if(!(V<1e-6)){B/=V,O/=V,j/=V;var H=this.computedRight,F=H[0],U=H[1],W=H[2],q=h*F+p*U+k*W;F-=q*h,U-=q*p,W-=q*k;var J=x(F,U,W);if(!(J<.01&&(F=p*j-k*O,U=k*B-h*j,W=h*O-p*B,J=x(F,U,W),J<1e-6))){F/=J,U/=J,W/=J,this.up.set(P,h,p,k),this.right.set(P,F,U,W),this.center.set(P,C[0],C[1],C[2]),this.radius.set(P,Math.log(V));var lt=p*W-k*U,yt=k*F-h*W,mt=h*U-p*F,st=x(lt,yt,mt);lt/=st,yt/=st,mt/=st;var tt=h*B+p*O+k*j,pt=F*B+U*O+W*j,rt=lt*B+yt*O+mt*j,at=Math.asin(y(tt)),vt=Math.atan2(rt,pt),it=this.angle._state,K=it[it.length-1],ft=it[it.length-2];K=K%(2*Math.PI);var ut=Math.abs(K+2*Math.PI-vt),kt=Math.abs(K-vt),It=Math.abs(K-2*Math.PI-vt);ut0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=P);var C=M===P?0:4-M%4;return[M,C]}function x(_){var P=f(_),M=P[0],C=P[1];return(M+C)*3/4-C}function y(_,P,M){return(P+M)*3/4-M}function v(_){var P,M=f(_),C=M[0],A=M[1],h=new n(y(_,C,A)),p=0,k=A>0?C-4:C,w;for(w=0;w>16&255,h[p++]=P>>8&255,h[p++]=P&255;return A===2&&(P=a[_.charCodeAt(w)]<<2|a[_.charCodeAt(w+1)]>>4,h[p++]=P&255),A===1&&(P=a[_.charCodeAt(w)]<<10|a[_.charCodeAt(w+1)]<<4|a[_.charCodeAt(w+2)]>>2,h[p++]=P>>8&255,h[p++]=P&255),h}function T(_){return r[_>>18&63]+r[_>>12&63]+r[_>>6&63]+r[_&63]}function u(_,P,M){for(var C,A=[],h=P;hk?k:p+h));return C===1?(P=_[M-1],A.push(r[P>>2]+r[P<<4&63]+"==")):C===2&&(P=(_[M-2]<<8)+_[M-1],A.push(r[P>>10]+r[P>>4&63]+r[P<<2&63]+"=")),A.join("")}},7518:function(t,e,r){var a=r(1433);function n(l,f,x,y,v,T){this.location=l,this.dimension=f,this.a=x,this.b=y,this.c=v,this.d=T}n.prototype.bind=function(l){switch(this.dimension){case 1:l.vertexAttrib1f(this.location,this.a);break;case 2:l.vertexAttrib2f(this.location,this.a,this.b);break;case 3:l.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:l.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function o(l,f,x){this.gl=l,this._ext=f,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=l.UNSIGNED_SHORT}o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var l=0;l1.0001)return null;w+=k[M]}return Math.abs(w-1)>.001?null:[C,f(y,k),k]}},7636:function(t){t.exports=e;function e(r,a){a=a||1;var n=Math.random()*2*Math.PI,o=Math.random()*2-1,i=Math.sqrt(1-o*o)*a;return r[0]=Math.cos(n)*i,r[1]=Math.sin(n)*i,r[2]=o*a,r}},7640:function(t,e,r){var a=r(1888);function n(v){switch(v){case"uint32":return[a.mallocUint32,a.freeUint32];default:return null}}var o={"uint32,1,0":function(v,T){return function(u,b,_,P,M,C,A,h,p,k,w){var R,O,j,V=u*M+P,H,F=v(h),U,W,q,J;for(R=u+1;R<=b;++R){for(O=R,V+=M,j=V,U=0,W=V,H=0;Hu;){U=0,W=j-M;e:for(H=0;HJ)break e;W+=k,U+=w}for(U=j,W=j-M,H=0;H>1,U=F-j,W=F+j,q=V,J=U,lt=F,yt=W,mt=H,st=_+1,tt=P-1,dt=!0,rt,at,vt,it,Y,ft,ut,kt,It,Pt=0,qt=0,Wt=0,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Te,He,Ge,cr,ur,jr=k,Wr=T(jr),br=T(jr);ge=A*q,fe=A*J,ur=C;t:for(Jt=0;Jt0){at=q,q=J,J=at;break t}if(Wt<0)break t;ur+=R}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=R}ge=A*q,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=q,q=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*q,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=q,q=yt,yt=at;break t}if(Wt<0)break t;ur+=R}ge=A*lt,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=lt,lt=yt,yt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=J,J=mt,mt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=R}for(ge=A*q,fe=A*J,pe=A*lt,se=A*yt,Tt=A*mt,Lt=A*V,Mt=A*F,ee=A*H,cr=0,ur=C,Jt=0;Jt0)tt--;else if(Wt<0){for(ge=A*ft,fe=A*st,pe=A*tt,ur=C,Jt=0;Jt0)for(;;){ut=C+tt*A,cr=0;t:for(Jt=0;Jt0){if(--ttH){t:for(;;){for(ut=C+st*A,cr=0,ur=C,Jt=0;Jt1&&b?P(u,b[0],b[1]):P(u)}var x={"uint32,1,0":function(v,T){return function(u){var b=u.data,_=u.offset|0,P=u.shape,M=u.stride,C=M[0]|0,A=P[0]|0,h=M[1]|0,p=P[1]|0,k=h,w=h,R=1;A<=32?v(0,A-1,b,_,C,h,A,p,k,w,R):T(0,A-1,b,_,C,h,A,p,k,w,R)}}};function y(v,T){var u=[T,v].join(","),b=x[u],_=i(v,T),P=f(v,T,_);return b(_,P)}t.exports=y},7642:function(t,e,r){var a=r(8954),n=r(1682);t.exports=f;function o(x,y){this.point=x,this.index=y}function i(x,y){for(var v=x.point,T=y.point,u=v.length,b=0;b=2)return!1;V[F]=U}return!0}):j=j.filter(function(V){for(var H=0;H<=T;++H){var F=k[V[H]];if(F<0)return!1;V[H]=F}return!0}),T&1)for(var _=0;_",W="",q=U.length,J=W.length,lt=V[0]===b||V[0]===M,yt=0,mt=-J;yt>-1&&(yt=H.indexOf(U,yt),!(yt===-1||(mt=H.indexOf(W,yt+q),mt===-1)||mt<=yt));){for(var st=yt;st=mt)F[st]=null,H=H.substr(0,st)+" "+H.substr(st+1);else if(F[st]!==null){var tt=F[st].indexOf(V[0]);tt===-1?F[st]+=V:lt&&(F[st]=F[st].substr(0,tt+1)+(1+parseInt(F[st][tt+1]))+F[st].substr(tt+2))}var dt=yt+q,rt=H.substr(dt,mt-dt),at=rt.indexOf(U);at!==-1?yt=at:yt=mt+J}return F}function h(j,V,H){for(var F=V.textAlign||"start",U=V.textBaseline||"alphabetic",W=[1073741824,1073741824],q=[0,0],J=j.length,lt=0;lt/g,` -`):H=H.replace(/\/g," ");var q="",J=[];for(Y=0;Y-1?parseInt(Mt[1+oe]):0,Ge=Te>-1?parseInt(ee[1+Te]):0;He!==Ge&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,Ge-He),ve=ve.replace("?px ",Wt())),ut+=.25*tt*(Ge-He)}if(W.superscripts===!0){var cr=Mt.indexOf(b),ur=ee.indexOf(b),jr=cr>-1?parseInt(Mt[1+cr]):0,Wr=ur>-1?parseInt(ee[1+ur]):0;jr!==Wr&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,Wr-jr),ve=ve.replace("?px ",Wt())),ut-=.25*tt*(Wr-jr)}if(W.bolds===!0){var br=Mt.indexOf(y)>-1,Xr=ee.indexOf(y)>-1;!br&&Xr&&(nn?ve=ve.replace("italic ","italic bold "):ve="bold "+ve),br&&!Xr&&(ve=ve.replace("bold ",""))}if(W.italics===!0){var nn=Mt.indexOf(T)>-1,Le=ee.indexOf(T)>-1;!nn&&Le&&(ve="italic "+ve),nn&&!Le&&(ve=ve.replace("italic ",""))}V.font=ve}for(it=0;it0&&(U=F.size),F.lineSpacing&&F.lineSpacing>0&&(W=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(q.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(q.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(q.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(q.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(q.superscripts=!!F.styletags.superscripts)),H.font=[F.fontStyle,F.fontVariant,F.fontWeight,U+"px",F.font].filter(function(lt){return lt}).join(" "),H.textAlign="start",H.textBaseline="alphabetic",H.direction="ltr";var J=p(V,H,j,U,W,q);return R(J,F,U)}},7721:function(t,e,r){var a=r(5716);t.exports=n;function n(o){return a(o[0])*a(o[1])}},7765:function(t,e,r){t.exports=u;var a=r(9618),n=r(1888),o=r(446),i=r(1570);function l(b){for(var _=b.length,P=0,M=0;M<_;++M)P=Math.max(P,b[M].length)|0;return P-1}function f(b,_){for(var P=b.length,M=n.mallocUint8(P),C=0;C"u"&&(M=l(b));var C=b.length;if(C===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=f(_,+P),h=x(b,M),p=y(h,_,A,+P),k=v(h,_.length|0),w=i(M)(b,h.data,k,A),R=T(h),O=[].slice.call(p.data,0,p.shape[0]);return n.free(A),n.free(h.data),n.free(p.data),n.free(k),{cells:w,vertexIds:R,vertexWeights:O}}},7766:function(t,e,r){var a=r(9618),n=r(5298),o=r(1888);t.exports=p;var i=null,l=null,f=null;function x(k){i=[k.LINEAR,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_NEAREST],l=[k.NEAREST,k.LINEAR,k.NEAREST_MIPMAP_NEAREST,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_LINEAR],f=[k.REPEAT,k.CLAMP_TO_EDGE,k.MIRRORED_REPEAT]}function y(k){return typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&k instanceof HTMLVideoElement||typeof ImageData<"u"&&k instanceof ImageData}var v=function(k,w){n.muls(k,w,255)};function T(k,w,R){var O=k.gl,j=O.getParameter(O.MAX_TEXTURE_SIZE);if(w<0||w>j||R<0||R>j)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[w,R],k.bind(),O.texImage2D(O.TEXTURE_2D,0,k.format,w,R,0,k.format,k.type,null),k._mipLevels=[0],k}function u(k,w,R,O,j,V){this.gl=k,this.handle=w,this.format=j,this.type=V,this._shape=[R,O],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var H=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return H._wrapS},set:function(W){return H.wrapS=W}},{get:function(){return H._wrapT},set:function(W){return H.wrapT=W}}]),this._wrapVector=F;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return H._shape[0]},set:function(W){return H.width=W}},{get:function(){return H._shape[1]},set:function(W){return H.height=W}}]),this._shapeVector=U}var b=u.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var w=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,w!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var w=0;w<2;++w)if(f.indexOf(k[w])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,T(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,T(this,this._shape[0],k),k}}}),b.bind=function(k){var w=this.gl;return k!==void 0&&w.activeTexture(w.TEXTURE0+(k|0)),w.bindTexture(w.TEXTURE_2D,this.handle),k!==void 0?k|0:w.getParameter(w.ACTIVE_TEXTURE)-w.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),w=0;k>0;++w,k>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},b.setPixels=function(k,w,R,O){var j=this.gl;this.bind(),Array.isArray(w)?(O=R,R=w[1]|0,w=w[0]|0):(w=w||0,R=R||0),O=O||0;var V=y(k)?k:k.raw;if(V){var H=this._mipLevels.indexOf(O)<0;H?(j.texImage2D(j.TEXTURE_2D,0,this.format,this.format,this.type,V),this._mipLevels.push(O)):j.texSubImage2D(j.TEXTURE_2D,O,w,R,this.format,this.type,V)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||w+k.shape[1]>this._shape[1]>>>O||R+k.shape[0]>this._shape[0]>>>O||w<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");P(j,w,R,O,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function _(k,w){return k.length===3?w[2]===1&&w[1]===k[0]*k[2]&&w[0]===k[2]:w[0]===1&&w[1]===k[0]}function P(k,w,R,O,j,V,H,F){var U=F.dtype,W=F.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,J=0,lt=_(W,F.stride.slice());if(U==="float32"?q=k.FLOAT:U==="float64"?(q=k.FLOAT,lt=!1,U="float32"):U==="uint8"?q=k.UNSIGNED_BYTE:(q=k.UNSIGNED_BYTE,lt=!1,U="uint8"),W.length===2)J=k.LUMINANCE,W=[W[0],W[1],1],F=a(F.data,W,[F.stride[0],F.stride[1],1],F.offset);else if(W.length===3){if(W[2]===1)J=k.ALPHA;else if(W[2]===2)J=k.LUMINANCE_ALPHA;else if(W[2]===3)J=k.RGB;else if(W[2]===4)J=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===k.LUMINANCE||J===k.ALPHA)&&(j===k.LUMINANCE||j===k.ALPHA)&&(J=j),J!==j)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var yt=F.size,mt=H.indexOf(O)<0;if(mt&&H.push(O),q===V&<)F.offset===0&&F.data.length===yt?mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,F.data):mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data.subarray(F.offset,F.offset+yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,F.data.subarray(F.offset,F.offset+yt));else{var st;V===k.FLOAT?st=o.mallocFloat32(yt):st=o.mallocUint8(yt);var tt=a(st,W,[W[2],W[2]*W[0],1]);q===k.FLOAT&&V===k.UNSIGNED_BYTE?v(tt,F):n.assign(tt,F),mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,st.subarray(0,yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,st.subarray(0,yt)),V===k.FLOAT?o.freeFloat32(st):o.freeUint8(st)}}function M(k){var w=k.createTexture();return k.bindTexture(k.TEXTURE_2D,w),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),w}function C(k,w,R,O,j){var V=k.getParameter(k.MAX_TEXTURE_SIZE);if(w<0||w>V||R<0||R>V)throw new Error("gl-texture2d: Invalid texture shape");if(j===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,O,w,R,0,O,j,null),new u(k,H,w,R,O,j)}function A(k,w,R,O,j,V){var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,j,j,V,w),new u(k,H,R,O,j,V)}function h(k,w){var R=w.dtype,O=w.shape.slice(),j=k.getParameter(k.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>j||O[1]<0||O[1]>j)throw new Error("gl-texture2d: Invalid texture size");var V=_(O,w.stride.slice()),H=0;R==="float32"?H=k.FLOAT:R==="float64"?(H=k.FLOAT,V=!1,R="float32"):R==="uint8"?H=k.UNSIGNED_BYTE:(H=k.UNSIGNED_BYTE,V=!1,R="uint8");var F=0;if(O.length===2)F=k.LUMINANCE,O=[O[0],O[1],1],w=a(w.data,O,[w.stride[0],w.stride[1],1],w.offset);else if(O.length===3)if(O[2]===1)F=k.ALPHA;else if(O[2]===2)F=k.LUMINANCE_ALPHA;else if(O[2]===3)F=k.RGB;else if(O[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");H===k.FLOAT&&!k.getExtension("OES_texture_float")&&(H=k.UNSIGNED_BYTE,V=!1);var U,W,q=w.size;if(V)w.offset===0&&w.data.length===q?U=w.data:U=w.data.subarray(w.offset,w.offset+q);else{var J=[O[2],O[2]*O[0],1];W=o.malloc(q,R);var lt=a(W,O,J,0);(R==="float32"||R==="float64")&&H===k.UNSIGNED_BYTE?v(lt,w):n.assign(lt,w),U=W.subarray(0,q)}var yt=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,O[0],O[1],0,F,H,U),V||o.free(W),new u(k,yt,O[0],O[1],F,H)}function p(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||x(k),typeof arguments[1]=="number")return C(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return C(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var w=arguments[1],R=y(w)?w:w.raw;if(R)return A(k,R,w.width|0,w.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return h(k,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(t,e,r){var a=r(2931),n=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(_,P,M,C){for(var A=_.points,h=_.velocities,p=_.divergences,k=[],w=[],R=[],O=[],j=[],V=[],H=0,F=0,U=n.create(),W=n.create(),q=8,J=0;J0)for(var st=0;stP)return C-1}return C},x=function(_,P,M){return _M?M:_},y=function(_,P,M){var C=P.vectors,A=P.meshgrid,h=_[0],p=_[1],k=_[2],w=A[0].length,R=A[1].length,O=A[2].length,j=f(A[0],h),V=f(A[1],p),H=f(A[2],k),F=j+1,U=V+1,W=H+1;if(j=x(j,0,w-1),F=x(F,0,w-1),V=x(V,0,R-1),U=x(U,0,R-1),H=x(H,0,O-1),W=x(W,0,O-1),j<0||V<0||H<0||F>w-1||U>R-1||W>O-1)return a.create();var q=A[0][j],J=A[0][F],lt=A[1][V],yt=A[1][U],mt=A[2][H],st=A[2][W],tt=(h-q)/(J-q),dt=(p-lt)/(yt-lt),rt=(k-mt)/(st-mt);isFinite(tt)||(tt=.5),isFinite(dt)||(dt=.5),isFinite(rt)||(rt=.5);var at,vt,it,Y,ft,ut;switch(M.reversedX&&(j=w-1-j,F=w-1-F),M.reversedY&&(V=R-1-V,U=R-1-U),M.reversedZ&&(H=O-1-H,W=O-1-W),M.filled){case 5:ft=H,ut=W,it=V*O,Y=U*O,at=j*O*R,vt=F*O*R;break;case 4:ft=H,ut=W,at=j*O,vt=F*O,it=V*O*w,Y=U*O*w;break;case 3:it=V,Y=U,ft=H*R,ut=W*R,at=j*R*O,vt=F*R*O;break;case 2:it=V,Y=U,at=j*R,vt=F*R,ft=H*R*w,ut=W*R*w;break;case 1:at=j,vt=F,ft=H*w,ut=W*w,it=V*w*O,Y=U*w*O;break;default:at=j,vt=F,it=V*w,Y=U*w,ft=H*w*R,ut=W*w*R;break}var kt=C[at+it+ft],It=C[at+it+ut],Pt=C[at+Y+ft],qt=C[at+Y+ut],Wt=C[vt+it+ft],Jt=C[vt+it+ut],ge=C[vt+Y+ft],fe=C[vt+Y+ut],pe=a.create(),se=a.create(),Tt=a.create(),Lt=a.create();a.lerp(pe,kt,Wt,tt),a.lerp(se,It,Jt,tt),a.lerp(Tt,Pt,ge,tt),a.lerp(Lt,qt,fe,tt);var Mt=a.create(),ee=a.create();a.lerp(Mt,pe,Tt,dt),a.lerp(ee,se,Lt,dt);var ve=a.create();return a.lerp(ve,Mt,ee,rt),ve},v=function(_){var P=1/0;_.sort(function(h,p){return h-p});for(var M=_.length,C=1;CF||feU||peW)},J=a.distance(P[0],P[1]),lt=10*J/C,yt=lt*lt,mt=1,st=0,tt=M.length;tt>1&&(mt=T(M));for(var dt=0;dtst&&(st=kt),ft.push(kt),O.push({points:at,velocities:vt,divergences:ft});for(var It=0;Ityt&&a.scale(Pt,Pt,lt/Math.sqrt(qt)),a.add(Pt,Pt,rt),it=w(Pt),a.squaredDistance(Y,Pt)-yt>-1e-4*yt){at.push(Pt),Y=Pt,vt.push(it);var ut=R(Pt,it),kt=a.length(ut);isFinite(kt)&&kt>st&&(st=kt),ft.push(kt)}rt=Pt}}var Wt=l(O,_.colormap,st,mt);return h?Wt.tubeScale=h:(st===0&&(st=1),Wt.tubeScale=A*.5*mt/st),Wt};var u=r(6740),b=r(6405).createMesh;t.exports.createTubeMesh=function(_,P){return b(_,P,{shaders:u,traceType:"streamtube"})}},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(t,e,r){var a=r(6330),n=r(1533),o=r(2651),i=r(6768),l=r(869),f=r(8697);t.exports=x;function x(y,v){if(a(y))return v?f(y,x(v)):[y[0].clone(),y[1].clone()];var T=0,u,b;if(n(y))u=y.clone();else if(typeof y=="string")u=i(y);else{if(y===0)return[o(0),o(1)];if(y===Math.floor(y))u=o(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),T-=256;u=o(y)}}if(a(v))u.mul(v[1]),b=v[0].clone();else if(n(v))b=v.clone();else if(typeof v=="string")b=i(v);else if(!v)b=o(1);else if(v===Math.floor(v))b=o(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;b=o(v)}return T>0?u=u.ushln(T):T<0&&(b=b.ushln(-T)),l(u,b)}},7894:function(t){t.exports=e;function e(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7932:function(t,e,r){var a=r(620);t.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2],l=a[3]-r[3];return n*n+o*o+i*i+l*l}},8105:function(t){t.exports=r;var e={"lo===p0":a,"lo=p0)&&!(p1>=hi)":x};function r(y){return e[y]}function a(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p];if(R===P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function n(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p];if(RO;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function o(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+k];if(R<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function i(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+k];if(R<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function l(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p],O=b[C+k];if(R<=P&&P<=O)if(h===w)h+=1,A+=M;else{for(var j=0;M>j;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function f(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p],O=b[C+k];if(Rj;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function x(y,v,T,u,b,_,P,M){for(var C=2*y,A=C*T,h=A,p=T,k=v,w=y+v,R=T;u>R;++R,A+=C){var O=b[A+k],j=b[A+w];if(!(O>=P)&&!(M>=j))if(p===R)p+=1,h+=C;else{for(var V=0;C>V;++V){var H=b[A+V];b[A+V]=b[h],b[h++]=H}var F=_[R];_[R]=_[p],_[p++]=F}}return p}},8107:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r}},8116:function(t,e,r){var a=r(7518),n=r(870);function o(l){this.bindVertexArrayOES=l.bindVertexArray.bind(l),this.createVertexArrayOES=l.createVertexArray.bind(l),this.deleteVertexArrayOES=l.deleteVertexArray.bind(l)}function i(l,f,x,y){var v=l.createVertexArray?new o(l):l.getExtension("OES_vertex_array_object"),T;return v?T=a(l,v):T=n(l),T.update(f,x,y),T}t.exports=i},8192:function(t,e,r){t.exports=i;var a=r(2825),n=r(3536),o=r(244);function i(l,f){var x=a(l[0],l[1],l[2]),y=a(f[0],f[1],f[2]);n(x,x),n(y,y);var v=o(x,y);return v>1?0:Math.acos(v)}},8210:function(t){t.exports=r;function e(a,n){var o=a+n,i=o-a,l=o-i,f=n-i,x=a-l,y=x+f;return y?[y,o]:[o]}function r(a,n){var o=a.length|0,i=n.length|0;if(o===1&&i===1)return e(a[0],n[0]);var l=o+i,f=new Array(l),x=0,y=0,v=0,T=Math.abs,u=a[y],b=T(u),_=n[v],P=T(_),M,C;b=i?(M=u,y+=1,yx)for(var R=f[u],O=1/Math.sqrt(h*k),w=0;w<3;++w){var j=(w+1)%3,V=(w+2)%3;R[w]+=O*(p[j]*A[V]-p[V]*A[j])}}for(var y=0;yx)for(var O=1/Math.sqrt(H),w=0;w<3;++w)R[w]*=O;else for(var w=0;w<3;++w)R[w]=0}return f},e.faceNormals=function(n,o,i){for(var l=n.length,f=new Array(l),x=i===void 0?a:i,y=0;yx?M=1/Math.sqrt(M):M=0;for(var u=0;u<3;++u)P[u]*=M;f[y]=P}return f}},8418:function(t,e,r){var a=r(5219),n=r(2762),o=r(8116),i=r(1888),l=r(6760),f=r(1283),x=r(9366),y=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,u=DataView;function b(at){return T.isView(at)&&!(at instanceof u)}function _(at){return Array.isArray(at)||b(at)}t.exports=rt;function P(at,vt){var it=at[0],Y=at[1],ft=at[2],ut=at[3];return at[0]=vt[0]*it+vt[4]*Y+vt[8]*ft+vt[12]*ut,at[1]=vt[1]*it+vt[5]*Y+vt[9]*ft+vt[13]*ut,at[2]=vt[2]*it+vt[6]*Y+vt[10]*ft+vt[14]*ut,at[3]=vt[3]*it+vt[7]*Y+vt[11]*ft+vt[15]*ut,at}function M(at,vt,it,Y){return P(Y,Y),P(Y,Y),P(Y,Y)}function C(at,vt){this.index=at,this.dataCoordinate=this.position=vt}function A(at){return at===!0||at>1?1:at}function h(at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt){this.gl=at,this.pixelRatio=1,this.shader=vt,this.orthoShader=it,this.projectShader=Y,this.pointBuffer=ft,this.colorBuffer=ut,this.glyphBuffer=kt,this.idBuffer=It,this.vao=Pt,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=qt,this.pickOrthoShader=Wt,this.pickProjectShader=Jt,this.points=[],this._selectResult=new C(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 p=h.prototype;p.pickSlots=1,p.setPickBase=function(at){this.pickId=at},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0,1],j=[0,0,0,1],V=v.slice(),H=[0,0,0],F=[[0,0,0],[0,0,0]];function U(at){return at[0]=at[1]=at[2]=0,at}function W(at,vt){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[3]=1,at}function q(at,vt,it,Y){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[it]=Y,at}function J(at){for(var vt=F,it=0;it<2;++it)for(var Y=0;Y<3;++Y)vt[it][Y]=Math.max(Math.min(at[it][Y],1e8),-1e8);return vt}function lt(at,vt,it,Y){var ft=vt.axesProject,ut=vt.gl,kt=at.uniforms,It=it.model||v,Pt=it.view||v,qt=it.projection||v,Wt=vt.axesBounds,Jt=J(vt.clipBounds),ge;vt.axes&&vt.axes.lastCubeProps?ge=vt.axes.lastCubeProps.axis:ge=[1,1,1],k[0]=2/ut.drawingBufferWidth,k[1]=2/ut.drawingBufferHeight,at.bind(),kt.view=Pt,kt.projection=qt,kt.screenSize=k,kt.highlightId=vt.highlightId,kt.highlightScale=vt.highlightScale,kt.clipBounds=Jt,kt.pickGroup=vt.pickId/255,kt.pixelRatio=Y;for(var fe=0;fe<3;++fe)if(ft[fe]){kt.scale=vt.projectScale[fe],kt.opacity=vt.projectOpacity[fe];for(var pe=V,se=0;se<16;++se)pe[se]=0;for(var se=0;se<4;++se)pe[5*se]=1;pe[5*fe]=0,ge[fe]<0?pe[12+fe]=Wt[0][fe]:pe[12+fe]=Wt[1][fe],l(pe,It,pe),kt.model=pe;var Tt=(fe+1)%3,Lt=(fe+2)%3,Mt=U(w),ee=U(R);Mt[Tt]=1,ee[Lt]=1;var ve=M(qt,Pt,It,W(O,Mt)),oe=M(qt,Pt,It,W(j,ee));if(Math.abs(ve[1])>Math.abs(oe[1])){var Te=ve;ve=oe,oe=Te,Te=Mt,Mt=ee,ee=Te;var He=Tt;Tt=Lt,Lt=He}ve[0]<0&&(Mt[Tt]=-1),oe[1]>0&&(ee[Lt]=-1);for(var Ge=0,cr=0,se=0;se<4;++se)Ge+=Math.pow(It[4*Tt+se],2),cr+=Math.pow(It[4*Lt+se],2);Mt[Tt]/=Math.sqrt(Ge),ee[Lt]/=Math.sqrt(cr),kt.axes[0]=Mt,kt.axes[1]=ee,kt.fragClipBounds[0]=q(H,Jt[0],fe,-1e8),kt.fragClipBounds[1]=q(H,Jt[1],fe,1e8),vt.vao.bind(),vt.vao.draw(ut.TRIANGLES,vt.vertexCount),vt.lineWidth>0&&(ut.lineWidth(vt.lineWidth*Y),vt.vao.draw(ut.LINES,vt.lineVertexCount,vt.vertexCount)),vt.vao.unbind()}}var yt=[-1e8,-1e8,-1e8],mt=[1e8,1e8,1e8],st=[yt,mt];function tt(at,vt,it,Y,ft,ut,kt){var It=it.gl;if((ut===it.projectHasAlpha||kt)&<(vt,it,Y,ft),ut===it.hasAlpha||kt){at.bind();var Pt=at.uniforms;Pt.model=Y.model||v,Pt.view=Y.view||v,Pt.projection=Y.projection||v,k[0]=2/It.drawingBufferWidth,k[1]=2/It.drawingBufferHeight,Pt.screenSize=k,Pt.highlightId=it.highlightId,Pt.highlightScale=it.highlightScale,Pt.fragClipBounds=st,Pt.clipBounds=it.axes.bounds,Pt.opacity=it.opacity,Pt.pickGroup=it.pickId/255,Pt.pixelRatio=ft,it.vao.bind(),it.vao.draw(It.TRIANGLES,it.vertexCount),it.lineWidth>0&&(It.lineWidth(it.lineWidth*ft),it.vao.draw(It.LINES,it.lineVertexCount,it.vertexCount)),it.vao.unbind()}}p.draw=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!1,!1)},p.drawTransparent=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!0,!1)},p.drawPick=function(at){var vt=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;tt(vt,this.pickProjectShader,this,at,1,!0,!0)},p.pick=function(at){if(!at||at.id!==this.pickId)return null;var vt=at.value[2]+(at.value[1]<<8)+(at.value[0]<<16);if(vt>=this.pointCount||vt<0)return null;var it=this.points[vt],Y=this._selectResult;Y.index=vt;for(var ft=0;ft<3;++ft)Y.position[ft]=Y.dataCoordinate[ft]=it[ft];return Y},p.highlight=function(at){if(!at)this.highlightId=[1,1,1,1];else{var vt=at.index,it=vt&255,Y=vt>>8&255,ft=vt>>16&255;this.highlightId=[it/255,Y/255,ft/255,0]}};function dt(at,vt,it,Y){var ft;_(at)?vt0){var nn=0,Le=Lt,Gt=[0,0,0,1],ne=[0,0,0,1],Ct=_(ge)&&_(ge[0]),gt=_(se)&&_(se[0]);t:for(var Y=0;Y0?1-cr[0][0]:qe<0?1+cr[1][0]:1,or*=or>0?1-cr[0][1]:or<0?1+cr[1][1]:1;for(var Sr=[qe,or],Ar=He.cells||[],mr=He.positions||[],oe=0;oe=i?(M=u,y+=1,y0?1:0}},8648:function(t,e,r){t.exports=r(783)},8692:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[1],f=a[0]-i,x=a[1]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+f*v-x*y,r[1]=l+f*y+x*v,r[2]=a[2],r}},8697:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]),o[1].mul(i[0]))}},8731:function(t,e,r){t.exports=x;var a=r(8866);function n(y,v,T,u,b,_){this._gl=y,this._wrapper=v,this._index=T,this._locations=u,this._dimension=b,this._constFunc=_}var o=n.prototype;o.pointer=function(y,v,T,u){var b=this,_=b._gl,P=b._locations[b._index];_.vertexAttribPointer(P,b._dimension,y||_.FLOAT,!!v,T||0,u||0),_.enableVertexAttribArray(P)},o.set=function(y,v,T,u){return this._constFunc(this._locations[this._index],y,v,T,u)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var i=[function(y,v,T){return T.length===void 0?y.vertexAttrib1f(v,T):y.vertexAttrib1fv(v,T)},function(y,v,T,u){return T.length===void 0?y.vertexAttrib2f(v,T,u):y.vertexAttrib2fv(v,T)},function(y,v,T,u,b){return T.length===void 0?y.vertexAttrib3f(v,T,u,b):y.vertexAttrib3fv(v,T)},function(y,v,T,u,b,_){return T.length===void 0?y.vertexAttrib4f(v,T,u,b,_):y.vertexAttrib4fv(v,T)}];function l(y,v,T,u,b,_,P){var M=i[b],C=new n(y,v,T,u,b,M);Object.defineProperty(_,P,{set:function(A){return y.disableVertexAttribArray(u[T]),M(y,u[T],A),A},get:function(){return C},enumerable:!0})}function f(y,v,T,u,b,_,P){for(var M=new Array(b),C=new Array(b),A=0;A=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);l(y,v,h[0],u,p,b,C)}else if(A.indexOf("mat")>=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);f(y,v,h,u,p,b,C)}else throw new a("","Unknown data type for attribute "+C+": "+A);break}}return b}},8828:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},8866:function(t){function e(r,a,n){this.shortMessage=a||"",this.longMessage=n||"",this.rawError=r||"",this.message="gl-shader: "+(a||r||"")+(n?` -`+n:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8902:function(t,e,r){var a=r(2478),n=r(3250)[3],o=0,i=1,l=2;t.exports=P;function f(M,C,A,h,p){this.a=M,this.b=C,this.idx=A,this.lowerIds=h,this.upperIds=p}function x(M,C,A,h){this.a=M,this.b=C,this.type=A,this.idx=h}function y(M,C){var A=M.a[0]-C.a[0]||M.a[1]-C.a[1]||M.type-C.type;return A||M.type!==o&&(A=n(M.a,M.b,C.b),A)?A:M.idx-C.idx}function v(M,C){return n(M.a,M.b,C)}function T(M,C,A,h,p){for(var k=a.lt(C,h,v),w=a.gt(C,h,v),R=k;R1&&n(A[j[V-2]],A[j[V-1]],h)>0;)M.push([j[V-1],j[V-2],p]),V-=1;j.length=V,j.push(p);for(var H=O.upperIds,V=H.length;V>1&&n(A[H[V-2]],A[H[V-1]],h)<0;)M.push([H[V-2],H[V-1],p]),V-=1;H.length=V,H.push(p)}}function u(M,C){var A;return M.a[0]O[0]&&p.push(new x(O,R,l,k),new x(R,O,i,k))}p.sort(y);for(var j=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),V=[new f([j,1],[j,0],-1,[],[])],H=[],k=0,F=p.length;k0;){b=h.pop();for(var p=b.adjacent,k=0;k<=P;++k){var w=p[k];if(!(!w.boundary||w.lastVisited<=-M)){for(var R=w.vertices,O=0;O<=P;++O){var j=R[O];j<0?C[O]=_:C[O]=A[j]}var V=this.orient();if(V>0)return w;w.lastVisited=-M,V===0&&h.push(w)}}}return null},T.walk=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=_?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[h];t:for(;!p.boundary;){for(var k=p.vertices,w=p.adjacent,R=0;R<=M;++R)A[R]=C[k[R]];p.lastVisited=P;for(var R=0;R<=M;++R){var O=w[R];if(!(O.lastVisited>=P)){var j=A[R];A[R]=b;var V=this.orient();if(A[R]=j,V<0){p=O;continue t}else O.boundary?O.lastVisited=-P:O.lastVisited=P}}return}return p},T.addPeaks=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=this.interior,p=this.simplices,k=[_];_.lastVisited=P,_.vertices[_.vertices.indexOf(-1)]=P,_.boundary=!1,h.push(_);for(var w=[];k.length>0;){var _=k.pop(),R=_.vertices,O=_.adjacent,j=R.indexOf(P);if(!(j<0)){for(var V=0;V<=M;++V)if(V!==j){var H=O[V];if(!(!H.boundary||H.lastVisited>=P)){var F=H.vertices;if(H.lastVisited!==-P){for(var U=0,W=0;W<=M;++W)F[W]<0?(U=W,A[W]=b):A[W]=C[F[W]];var q=this.orient();if(q>0){F[U]=P,H.boundary=!1,h.push(H),k.push(H),H.lastVisited=P;continue}else H.lastVisited=-P}var J=H.adjacent,lt=R.slice(),yt=O.slice(),mt=new o(lt,yt,!0);p.push(mt);var st=J.indexOf(_);if(!(st<0)){J[st]=mt,yt[j]=H,lt[V]=-1,yt[V]=_,O[V]=mt,mt.flip();for(var W=0;W<=M;++W){var tt=lt[W];if(!(tt<0||tt===P)){for(var dt=new Array(M-1),rt=0,at=0;at<=M;++at){var vt=lt[at];vt<0||at===W||(dt[rt++]=vt)}w.push(new i(dt,mt,W))}}}}}}}w.sort(l);for(var V=0;V+1=0?h[k++]=p[R]:w=R&1;if(w===(b&1)){var O=h[0];h[0]=h[1],h[1]=O}_.push(h)}}return _};function u(b,_){var P=b.length;if(P===0)throw new Error("Must have at least d+1 points");var M=b[0].length;if(P<=M)throw new Error("Must input at least d+1 points");var C=b.slice(0,M+1),A=a.apply(void 0,C);if(A===0)throw new Error("Input not in general position");for(var h=new Array(M+1),p=0;p<=M;++p)h[p]=p;A<0&&(h[0]=1,h[1]=0);for(var k=new o(h,new Array(M+1),!1),w=k.adjacent,R=new Array(M+2),p=0;p<=M;++p){for(var O=h.slice(),j=0;j<=M;++j)j===p&&(O[j]=-1);var V=O[0];O[0]=O[1],O[1]=V;var H=new o(O,new Array(M+1),!0);w[p]=H,R[p]=H}R[M+1]=k;for(var p=0;p<=M;++p)for(var O=w[p].vertices,F=w[p].adjacent,j=0;j<=M;++j){var U=O[j];if(U<0){F[j]=k;continue}for(var W=0;W<=M;++W)w[W].vertices.indexOf(U)<0&&(F[j]=w[W])}for(var q=new v(M,C,R),J=!!_,p=M+1;p=1},u.isTransparent=function(){return this.opacity<1},u.pickSlots=1,u.setPickBase=function(A){this.pickId=A};function b(A){for(var h=y({colormap:A,nshades:256,format:"rgba"}),p=new Uint8Array(1024),k=0;k<256;++k){for(var w=h[k],R=0;R<3;++R)p[4*k+R]=w[R];p[4*k+3]=w[3]*255}return x(p,[256,256,4],[4,0,1])}function _(A){for(var h=A.length,p=new Array(h),k=0;k0){var W=this.triShader;W.bind(),W.uniforms=j,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},u.drawPick=function(A){A=A||{};for(var h=this.gl,p=A.model||v,k=A.view||v,w=A.projection||v,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)R[0][O]=Math.max(R[0][O],this.clipBounds[0][O]),R[1][O]=Math.min(R[1][O],this.clipBounds[1][O]);this._model=[].slice.call(p),this._view=[].slice.call(k),this._projection=[].slice.call(w),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var j={model:p,view:k,projection:w,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},V=this.pickShader;V.bind(),V.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},u.pick=function(A){if(!A||A.id!==this.pickId)return null;var h=A.value[0]+256*A.value[1]+65536*A.value[2],p=this.cells[h],k=this.positions[p[1]].slice(0,3),w={position:k,dataCoordinate:k,index:Math.floor(p[1]/48)};return this.traceType==="cone"?w.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(w.intensity=this.intensity[p[1]],w.velocity=this.vectors[p[1]].slice(0,3),w.divergence=this.vectors[p[1]][3],w.index=h),w},u.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 P(A,h){var p=a(A,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function M(A,h){var p=a(A,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function C(A,h,p){var k=p.shaders;arguments.length===1&&(h=A,A=h.gl);var w=P(A,k),R=M(A,k),O=i(A,x(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=A.LINEAR_MIPMAP_LINEAR,O.magFilter=A.LINEAR;var j=n(A),V=n(A),H=n(A),F=n(A),U=n(A),W=o(A,[{buffer:j,type:A.FLOAT,size:4},{buffer:U,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:H,type:A.FLOAT,size:4},{buffer:F,type:A.FLOAT,size:2},{buffer:V,type:A.FLOAT,size:4}]),q=new T(A,O,w,R,j,V,U,H,F,W,p.traceType||"cone");return q.update(h),q}t.exports=C},9127:function(t,e,r){t.exports=o;var a=r(6204),n=r(5771);function o(i){return n(a(i))}},9131:function(t,e,r){var a=r(5177),n=r(9288);t.exports=o;function o(i,l){return l=l||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),n(i,i,l),i}},9165:function(t,e,r){t.exports=T;var a=r(2762),n=r(8116),o=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.shader=P,this.buffer=b,this.vao=_,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 f=l.prototype;f.isOpaque=function(){return!this.hasAlpha},f.isTransparent=function(){return this.hasAlpha},f.drawTransparent=f.draw=function(u){var b=this.gl,_=this.shader.uniforms;this.shader.bind();var P=_.view=u.view||i,M=_.projection=u.projection||i;_.model=u.model||i,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var C=P[12],A=P[13],h=P[14],p=P[15],k=u._ortho||!1,w=k?2:1,R=w*this.pixelRatio*(M[3]*C+M[7]*A+M[11]*h+M[15]*p)/b.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)b.lineWidth(this.lineWidth[O]*this.pixelRatio),_.capSize=this.capSize[O]*R,this.lineCount[O]&&b.drawArrays(b.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function x(u,b){for(var _=0;_<3;++_)u[0][_]=Math.min(u[0][_],b[_]),u[1][_]=Math.max(u[1][_],b[_])}var y=function(){for(var u=new Array(3),b=0;b<3;++b){for(var _=[],P=1;P<=2;++P)for(var M=-1;M<=1;M+=2){var C=(P+b)%3,A=[0,0,0];A[C]=M,_.push(A)}u[b]=_}return u}();function v(u,b,_,P){for(var M=y[P],C=0;C0){var j=k.slice();j[h]+=R[1][h],M.push(k[0],k[1],k[2],O[0],O[1],O[2],O[3],0,0,0,j[0],j[1],j[2],O[0],O[1],O[2],O[3],0,0,0),x(this.bounds,j),A+=2+v(M,j,O,h)}}}this.lineCount[h]=A-this.lineOffset[h]}this.buffer.update(M)}},f.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(u){var b=u.gl,_=a(b),P=n(b,[{buffer:_,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:b.FLOAT,size:3,offset:28,stride:40}]),M=o(b);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var C=new l(b,_,P,M);return C.update(u),C}},9215:function(t,e,r){t.exports=x;var a=r(4769),n=r(2478);function o(y,v,T){return Math.min(v,Math.max(y,T))}function i(y,v,T){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var u=0;u=T-1)for(var A=_.length-1,p=y-v[T-1],h=0;h=T-1)for(var C=_.length-1,A=y-v[T-1],h=0;h=0;--T)if(y[--v])return!1;return!0},l.jump=function(y){var v=this.lastT(),T=this.dimension;if(!(y0;--h)u.push(o(M[h-1],C[h-1],arguments[h])),b.push(0)}},l.push=function(y){var v=this.lastT(),T=this.dimension;if(!(y1e-6?1/P:0;this._time.push(y);for(var p=T;p>0;--p){var k=o(C[p-1],A[p-1],arguments[p]);u.push(k),b.push((k-u[_++])*h)}}},l.set=function(y){var v=this.dimension;if(!(y0;--M)T.push(o(_[M-1],P[M-1],arguments[M])),u.push(0)}},l.move=function(y){var v=this.lastT(),T=this.dimension;if(!(y<=v||arguments.length!==T+1)){var u=this._state,b=this._velocity,_=u.length-this.dimension,P=this.bounds,M=P[0],C=P[1],A=y-v,h=A>1e-6?1/A:0;this._time.push(y);for(var p=T;p>0;--p){var k=arguments[p];u.push(o(M[p-1],C[p-1],u[_++]+k)),b.push(k*h)}}},l.idle=function(y){var v=this.lastT();if(!(y=0;--h)u.push(o(M[h],C[h],u[_]+A*b[_])),b.push(0),_+=1}};function f(y){for(var v=new Array(y),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(l=!0),l}},9226:function(t){t.exports=e;function e(r,a){return r[0]=Math.ceil(a[0]),r[1]=Math.ceil(a[1]),r[2]=Math.ceil(a[2]),r}},9265:function(t){t.exports=e;function e(r,a){return r[0]===a[0]&&r[1]===a[1]&&r[2]===a[2]}},9288:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]*n,r[1]=a[1]*n,r[2]=a[2]*n,r[3]=a[3]*n,r}},9346:function(t){var e=new Float64Array(4),r=new Float64Array(4),a=new Float64Array(4);function n(o,i,l,f,x){e.length=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P)):(p=0,_>=0?(k=0,w=P):-_>=u?(k=1,w=u+2*_+P):(k=-_/u,w=_*k+P));else if(k<0)k=0,b>=0?(p=0,w=P):-b>=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P);else{var R=1/h;p*=R,k*=R,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P}else{var O,j,V,H;p<0?(O=T+b,j=u+_,j>O?(V=j-O,H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(p=0,j<=0?(k=1,w=u+2*_+P):_>=0?(k=0,w=P):(k=-_/u,w=_*k+P))):k<0?(O=T+_,j=v+b,j>O?(V=j-O,H=v-2*T+u,V>=H?(k=1,p=0,w=u+2*_+P):(k=V/H,p=1-k,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(k=0,j<=0?(p=1,w=v+2*b+P):b>=0?(p=0,w=P):(p=-b/v,w=b*p+P))):(V=u+_-T-b,V<=0?(p=0,k=1,w=u+2*_+P):(H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)))}for(var F=1-p-k,y=0;y_)for(u=_;ub)for(u=b;u<_;u++)this.gl.disableVertexAttribArray(u);this.gl.lastAttribCount=b,this.gl.useProgram(this.program)},y.dispose=function(){for(var u=this.gl.lastAttribCount,b=0;b=0){for(var F=H.type.charAt(H.type.length-1)|0,U=new Array(F),W=0;W=0;)q+=1;j[V]=q}var J=new Array(_.length);function lt(){C.program=i.program(A,C._vref,C._fref,O,j);for(var yt=0;yt<_.length;++yt)J[yt]=A.getUniformLocation(C.program,_[yt].name)}lt(),C._relink=lt,C.types={uniforms:o(_),attributes:o(P)},C.attributes=n(A,C,R,j),Object.defineProperty(C,"uniforms",a(A,C,_,J))};function T(u,b,_,P,M){var C=new x(u);return C.update(b,_,P,M),C}t.exports=T},9499:function(t,e,r){t.exports=vt;var a=r(8828),n=r(2762),o=r(8116),i=r(7766),l=r(1888),f=r(6729),x=r(5298),y=r(9994),v=r(9618),T=r(3711),u=r(6760),b=r(7608),_=r(2478),P=r(6199),M=r(990),C=M.createShader,A=M.createContourShader,h=M.createPickShader,p=M.createPickContourShader,k=40,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[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 it=0;it<3;++it){var Y=O[it],ft=(it+1)%3,ut=(it+2)%3;Y[ft+0]=1,Y[ut+3]=1,Y[it+6]=1}})();function j(it,Y,ft,ut,kt){this.position=it,this.index=Y,this.uv=ft,this.level=ut,this.dataCoordinate=kt}var V=256;function H(it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt){this.gl=it,this.shape=Y,this.bounds=ft,this.objectOffset=Tt,this.intensityBounds=[],this._shader=ut,this._pickShader=kt,this._coordinateBuffer=It,this._vao=Pt,this._colorMap=qt,this._contourShader=Wt,this._contourPickShader=Jt,this._contourBuffer=ge,this._contourVAO=fe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new j([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=pe,this._dynamicVAO=se,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(l.mallocFloat(1024),[0,0]),v(l.mallocFloat(1024),[0,0]),v(l.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 F=H.prototype;F.genColormap=function(it,Y){var ft=!1,ut=y([f({colormap:it,nshades:V,format:"rgba"}).map(function(kt,It){var Pt=Y?U(It/255,Y):kt[3];return Pt<1&&(ft=!0),[kt[0],kt[1],kt[2],255*Pt]})]);return x.divseq(ut,255),this.hasAlphaScale=ft,ut},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(it){this.pickId=it};function U(it,Y){if(!Y||!Y.length)return 1;for(var ft=0;ftit&&ft>0){var ut=(Y[ft][0]-it)/(Y[ft][0]-Y[ft-1][0]);return Y[ft][1]*(1-ut)+ut*Y[ft-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(it,Y){var ft,ut,kt,It=Y.axes&&Y.axes.lastCubeProps.axis||W,Pt=Y.showSurface,qt=Y.showContour;for(ft=0;ft<3;++ft)for(Pt=Pt||Y.surfaceProject[ft],ut=0;ut<3;++ut)qt=qt||Y.contourProject[ft][ut];for(ft=0;ft<3;++ft){var Wt=q.projections[ft];for(ut=0;ut<16;++ut)Wt[ut]=0;for(ut=0;ut<4;++ut)Wt[5*ut]=1;Wt[5*ft]=0,Wt[12+ft]=Y.axesBounds[+(It[ft]>0)][ft],u(Wt,it.model,Wt);var Jt=q.clipBounds[ft];for(kt=0;kt<2;++kt)for(ut=0;ut<3;++ut)Jt[kt][ut]=it.clipBounds[kt][ut];Jt[0][ft]=-1e8,Jt[1][ft]=1e8}return q.showSurface=Pt,q.showContour=qt,q}var lt={model:w,view:w,projection:w,inverseModel:w.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},yt=w.slice(),mt=[1,0,0,0,1,0,0,0,1];function st(it,Y){it=it||{};var ft=this.gl;ft.disable(ft.CULL_FACE),this._colorMap.bind(0);var ut=lt;ut.model=it.model||w,ut.view=it.view||w,ut.projection=it.projection||w,ut.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ut.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ut.objectOffset=this.objectOffset,ut.contourColor=this.contourColor[0],ut.inverseModel=b(ut.inverseModel,ut.model);for(var kt=0;kt<2;++kt)for(var It=ut.clipBounds[kt],Pt=0;Pt<3;++Pt)It[Pt]=Math.min(Math.max(this.clipBounds[kt][Pt],-1e8),1e8);ut.kambient=this.ambientLight,ut.kdiffuse=this.diffuseLight,ut.kspecular=this.specularLight,ut.roughness=this.roughness,ut.fresnel=this.fresnel,ut.opacity=this.opacity,ut.height=0,ut.permutation=mt,ut.vertexColor=this.vertexColor;var qt=yt;for(u(qt,ut.view,ut.model),u(qt,ut.projection,qt),b(qt,qt),kt=0;kt<3;++kt)ut.eyePosition[kt]=qt[12+kt]/qt[15];var Wt=qt[15];for(kt=0;kt<3;++kt)Wt+=this.lightPosition[kt]*qt[4*kt+3];for(kt=0;kt<3;++kt){var Jt=qt[12+kt];for(Pt=0;Pt<3;++Pt)Jt+=qt[4*Pt+kt]*this.lightPosition[Pt];ut.lightPosition[kt]=Jt/Wt}var ge=J(ut,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ut,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ft.TRIANGLES,this._vertexCount),kt=0;kt<3;++kt)!this.surfaceProject[kt]||!this.vertexCount||(this._shader.uniforms.model=ge.projections[kt],this._shader.uniforms.clipBounds=ge.clipBounds[kt],this._vao.draw(ft.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var fe=this._contourShader;ut.kambient=1,ut.kdiffuse=0,ut.kspecular=0,ut.opacity=1,fe.bind(),fe.uniforms=ut;var pe=this._contourVAO;for(pe.bind(),kt=0;kt<3;++kt)for(fe.uniforms.permutation=O[kt],ft.lineWidth(this.contourWidth[kt]*this.pixelRatio),Pt=0;Pt>4)/16)/255,kt=Math.floor(ut),It=ut-kt,Pt=Y[1]*(it.value[1]+(it.value[2]&15)/16)/255,qt=Math.floor(Pt),Wt=Pt-qt;kt+=1,qt+=1;var Jt=ft.position;Jt[0]=Jt[1]=Jt[2]=0;for(var ge=0;ge<2;++ge)for(var fe=ge?It:1-It,pe=0;pe<2;++pe)for(var se=pe?Wt:1-Wt,Tt=kt+ge,Lt=qt+pe,Mt=fe*se,ee=0;ee<3;++ee)Jt[ee]+=this._field[ee].get(Tt,Lt)*Mt;for(var ve=this._pickResult.level,oe=0;oe<3;++oe)if(ve[oe]=_.le(this.contourLevels[oe],Jt[oe]),ve[oe]<0)this.contourLevels[oe].length>0&&(ve[oe]=0);else if(ve[oe]Math.abs(He-Jt[oe])&&(ve[oe]+=1)}for(ft.index[0]=It<.5?kt:kt+1,ft.index[1]=Wt<.5?qt:qt+1,ft.uv[0]=ut/Y[0],ft.uv[1]=Pt/Y[1],ee=0;ee<3;++ee)ft.dataCoordinate[ee]=this._field[ee].get(ft.index[0],ft.index[1]);return ft},F.padField=function(it,Y){var ft=Y.shape.slice(),ut=it.shape.slice();x.assign(it.lo(1,1).hi(ft[0],ft[1]),Y),x.assign(it.lo(1).hi(ft[0],1),Y.hi(ft[0],1)),x.assign(it.lo(1,ut[1]-1).hi(ft[0],1),Y.lo(0,ft[1]-1).hi(ft[0],1)),x.assign(it.lo(0,1).hi(1,ft[1]),Y.hi(1)),x.assign(it.lo(ut[0]-1,1).hi(1,ft[1]),Y.lo(ft[0]-1)),it.set(0,0,Y.get(0,0)),it.set(0,ut[1]-1,Y.get(0,ft[1]-1)),it.set(ut[0]-1,0,Y.get(ft[0]-1,0)),it.set(ut[0]-1,ut[1]-1,Y.get(ft[0]-1,ft[1]-1))};function dt(it,Y){return Array.isArray(it)?[Y(it[0]),Y(it[1]),Y(it[2])]:[Y(it),Y(it),Y(it)]}function rt(it){return Array.isArray(it)?it.length===3?[it[0],it[1],it[2],1]:[it[0],it[1],it[2],it[3]]:[0,0,0,1]}function at(it){if(Array.isArray(it)){if(Array.isArray(it))return[rt(it[0]),rt(it[1]),rt(it[2])];var Y=rt(it);return[Y.slice(),Y.slice(),Y.slice()]}}F.update=function(it){it=it||{},this.objectOffset=it.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in it&&(this.contourWidth=dt(it.contourWidth,Number)),"showContour"in it&&(this.showContour=dt(it.showContour,Boolean)),"showSurface"in it&&(this.showSurface=!!it.showSurface),"contourTint"in it&&(this.contourTint=dt(it.contourTint,Boolean)),"contourColor"in it&&(this.contourColor=at(it.contourColor)),"contourProject"in it&&(this.contourProject=dt(it.contourProject,function(Xi){return dt(Xi,Boolean)})),"surfaceProject"in it&&(this.surfaceProject=it.surfaceProject),"dynamicColor"in it&&(this.dynamicColor=at(it.dynamicColor)),"dynamicTint"in it&&(this.dynamicTint=dt(it.dynamicTint,Number)),"dynamicWidth"in it&&(this.dynamicWidth=dt(it.dynamicWidth,Number)),"opacity"in it&&(this.opacity=it.opacity),"opacityscale"in it&&(this.opacityscale=it.opacityscale),"colorBounds"in it&&(this.colorBounds=it.colorBounds),"vertexColor"in it&&(this.vertexColor=it.vertexColor?1:0),"colormap"in it&&this._colorMap.setPixels(this.genColormap(it.colormap,this.opacityscale));var Y=it.field||it.coords&&it.coords[2]||null,ft=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in it||"coords"in it){var ut=(Y.shape[0]+2)*(Y.shape[1]+2);ut>this._field[2].data.length&&(l.freeFloat(this._field[2].data),this._field[2].data=l.mallocFloat(a.nextPow2(ut))),this._field[2]=v(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var kt=this.shape,It=0;It<2;++It)this._field[2].size>this._field[It].data.length&&(l.freeFloat(this._field[It].data),this._field[It].data=l.mallocFloat(this._field[2].size)),this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2]);if(it.coords){var Pt=it.coords;if(!Array.isArray(Pt)||Pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(It=0;It<2;++It){var qt=Pt[It];for(pe=0;pe<2;++pe)if(qt.shape[pe]!==kt[pe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[It],qt)}}else if(it.ticks){var Wt=it.ticks;if(!Array.isArray(Wt)||Wt.length!==2)throw new Error("gl-surface: invalid ticks");for(It=0;It<2;++It){var Jt=Wt[It];if((Array.isArray(Jt)||Jt.length)&&(Jt=v(Jt)),Jt.shape[0]!==kt[It])throw new Error("gl-surface: invalid tick length");var ge=v(Jt.data,kt);ge.stride[It]=Jt.stride[0],ge.stride[It^1]=0,this.padField(this._field[It],ge)}}else{for(It=0;It<2;++It){var fe=[0,0];fe[It]=1,this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2],fe,0)}this._field[0].set(0,0,0);for(var pe=0;pe0){for(var Oi=0;Oi<5;++Oi)Ar.pop();Ct-=1}continue t}}}Wn.push(Ct)}this._contourOffsets[mr]=Hn,this._contourCounts[mr]=Wn}var ji=l.mallocFloat(Ar.length);for(It=0;It=0&&(A=M|0,C+=p*A,h-=A),new _(this.data,h,p,C)},P.step=function(M){var C=this.shape[0],A=this.stride[0],h=this.offset,p=0,k=Math.ceil;return typeof M=="number"&&(p=M|0,p<0?(h+=A*(C-1),C=k(-C/p)):C=k(C/p),A*=p),new _(this.data,C,A,h)},P.transpose=function(M){M=M===void 0?0:M|0;var C=this.shape,A=this.stride;return new _(this.data,C[M],A[M],this.offset)},P.pick=function(M){var C=[],A=[],h=this.offset;typeof M=="number"&&M>=0?h=h+this.stride[0]*M|0:(C.push(this.shape[0]),A.push(this.stride[0]));var p=u[C.length+1];return p(this.data,C,A,h)},function(M,C,A,h){return new _(M,C[0],A[0],h)}},2:function(T,u,b){function _(M,C,A,h,p,k){this.data=M,this.shape=[C,A],this.stride=[h,p],this.offset=k|0}var P=_.prototype;return P.dtype=T,P.dimension=2,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(P,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),P.set=function(M,C,A){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C,A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]=A},P.get=function(M,C){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]},P.index=function(M,C){return this.offset+this.stride[0]*M+this.stride[1]*C},P.hi=function(M,C){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},P.lo=function(M,C){var A=this.offset,h=0,p=this.shape[0],k=this.shape[1],w=this.stride[0],R=this.stride[1];return typeof M=="number"&&M>=0&&(h=M|0,A+=w*h,p-=h),typeof C=="number"&&C>=0&&(h=C|0,A+=R*h,k-=h),new _(this.data,p,k,w,R,A)},P.step=function(M,C){var A=this.shape[0],h=this.shape[1],p=this.stride[0],k=this.stride[1],w=this.offset,R=0,O=Math.ceil;return typeof M=="number"&&(R=M|0,R<0?(w+=p*(A-1),A=O(-A/R)):A=O(A/R),p*=R),typeof C=="number"&&(R=C|0,R<0?(w+=k*(h-1),h=O(-h/R)):h=O(h/R),k*=R),new _(this.data,A,h,p,k,w)},P.transpose=function(M,C){M=M===void 0?0:M|0,C=C===void 0?1:C|0;var A=this.shape,h=this.stride;return new _(this.data,A[M],A[C],h[M],h[C],this.offset)},P.pick=function(M,C){var A=[],h=[],p=this.offset;typeof M=="number"&&M>=0?p=p+this.stride[0]*M|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof C=="number"&&C>=0?p=p+this.stride[1]*C|0:(A.push(this.shape[1]),h.push(this.stride[1]));var k=u[A.length+1];return k(this.data,A,h,p)},function(M,C,A,h){return new _(M,C[0],C[1],A[0],A[1],h)}},3:function(T,u,b){function _(M,C,A,h,p,k,w,R){this.data=M,this.shape=[C,A,h],this.stride=[p,k,w],this.offset=R|0}var P=_.prototype;return P.dtype=T,P.dimension=3,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(P,"order",{get:function(){var M=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return M>C?C>A?[2,1,0]:M>A?[1,2,0]:[1,0,2]:M>A?[2,0,1]:A>C?[0,1,2]:[0,2,1]}}),P.set=function(M,C,A,h){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A,h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]=h},P.get=function(M,C,A){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]},P.index=function(M,C,A){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A},P.hi=function(M,C,A){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},P.lo=function(M,C,A){var h=this.offset,p=0,k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.stride[0],j=this.stride[1],V=this.stride[2];return typeof M=="number"&&M>=0&&(p=M|0,h+=O*p,k-=p),typeof C=="number"&&C>=0&&(p=C|0,h+=j*p,w-=p),typeof A=="number"&&A>=0&&(p=A|0,h+=V*p,R-=p),new _(this.data,k,w,R,O,j,V,h)},P.step=function(M,C,A){var h=this.shape[0],p=this.shape[1],k=this.shape[2],w=this.stride[0],R=this.stride[1],O=this.stride[2],j=this.offset,V=0,H=Math.ceil;return typeof M=="number"&&(V=M|0,V<0?(j+=w*(h-1),h=H(-h/V)):h=H(h/V),w*=V),typeof C=="number"&&(V=C|0,V<0?(j+=R*(p-1),p=H(-p/V)):p=H(p/V),R*=V),typeof A=="number"&&(V=A|0,V<0?(j+=O*(k-1),k=H(-k/V)):k=H(k/V),O*=V),new _(this.data,h,p,k,w,R,O,j)},P.transpose=function(M,C,A){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0;var h=this.shape,p=this.stride;return new _(this.data,h[M],h[C],h[A],p[M],p[C],p[A],this.offset)},P.pick=function(M,C,A){var h=[],p=[],k=this.offset;typeof M=="number"&&M>=0?k=k+this.stride[0]*M|0:(h.push(this.shape[0]),p.push(this.stride[0])),typeof C=="number"&&C>=0?k=k+this.stride[1]*C|0:(h.push(this.shape[1]),p.push(this.stride[1])),typeof A=="number"&&A>=0?k=k+this.stride[2]*A|0:(h.push(this.shape[2]),p.push(this.stride[2]));var w=u[h.length+1];return w(this.data,h,p,k)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],A[0],A[1],A[2],h)}},4:function(T,u,b){function _(M,C,A,h,p,k,w,R,O,j){this.data=M,this.shape=[C,A,h,p],this.stride=[k,w,R,O],this.offset=j|0}var P=_.prototype;return P.dtype=T,P.dimension=4,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h,p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]=p},P.get=function(M,C,A,h){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]},P.index=function(M,C,A,h){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h},P.hi=function(M,C,A,h){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},P.lo=function(M,C,A,h){var p=this.offset,k=0,w=this.shape[0],R=this.shape[1],O=this.shape[2],j=this.shape[3],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3];return typeof M=="number"&&M>=0&&(k=M|0,p+=V*k,w-=k),typeof C=="number"&&C>=0&&(k=C|0,p+=H*k,R-=k),typeof A=="number"&&A>=0&&(k=A|0,p+=F*k,O-=k),typeof h=="number"&&h>=0&&(k=h|0,p+=U*k,j-=k),new _(this.data,w,R,O,j,V,H,F,U,p)},P.step=function(M,C,A,h){var p=this.shape[0],k=this.shape[1],w=this.shape[2],R=this.shape[3],O=this.stride[0],j=this.stride[1],V=this.stride[2],H=this.stride[3],F=this.offset,U=0,W=Math.ceil;return typeof M=="number"&&(U=M|0,U<0?(F+=O*(p-1),p=W(-p/U)):p=W(p/U),O*=U),typeof C=="number"&&(U=C|0,U<0?(F+=j*(k-1),k=W(-k/U)):k=W(k/U),j*=U),typeof A=="number"&&(U=A|0,U<0?(F+=V*(w-1),w=W(-w/U)):w=W(w/U),V*=U),typeof h=="number"&&(U=h|0,U<0?(F+=H*(R-1),R=W(-R/U)):R=W(R/U),H*=U),new _(this.data,p,k,w,R,O,j,V,H,F)},P.transpose=function(M,C,A,h){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0;var p=this.shape,k=this.stride;return new _(this.data,p[M],p[C],p[A],p[h],k[M],k[C],k[A],k[h],this.offset)},P.pick=function(M,C,A,h){var p=[],k=[],w=this.offset;typeof M=="number"&&M>=0?w=w+this.stride[0]*M|0:(p.push(this.shape[0]),k.push(this.stride[0])),typeof C=="number"&&C>=0?w=w+this.stride[1]*C|0:(p.push(this.shape[1]),k.push(this.stride[1])),typeof A=="number"&&A>=0?w=w+this.stride[2]*A|0:(p.push(this.shape[2]),k.push(this.stride[2])),typeof h=="number"&&h>=0?w=w+this.stride[3]*h|0:(p.push(this.shape[3]),k.push(this.stride[3]));var R=u[p.length+1];return R(this.data,p,k,w)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],A[0],A[1],A[2],A[3],h)}},5:function(T,u,b){function _(M,C,A,h,p,k,w,R,O,j,V,H){this.data=M,this.shape=[C,A,h,p,k],this.stride=[w,R,O,j,V],this.offset=H|0}var P=_.prototype;return P.dtype=T,P.dimension=5,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p,k){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]=k},P.get=function(M,C,A,h,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]},P.index=function(M,C,A,h,p){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p},P.hi=function(M,C,A,h,p){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,typeof p!="number"||p<0?this.shape[4]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},P.lo=function(M,C,A,h,p){var k=this.offset,w=0,R=this.shape[0],O=this.shape[1],j=this.shape[2],V=this.shape[3],H=this.shape[4],F=this.stride[0],U=this.stride[1],W=this.stride[2],q=this.stride[3],J=this.stride[4];return typeof M=="number"&&M>=0&&(w=M|0,k+=F*w,R-=w),typeof C=="number"&&C>=0&&(w=C|0,k+=U*w,O-=w),typeof A=="number"&&A>=0&&(w=A|0,k+=W*w,j-=w),typeof h=="number"&&h>=0&&(w=h|0,k+=q*w,V-=w),typeof p=="number"&&p>=0&&(w=p|0,k+=J*w,H-=w),new _(this.data,R,O,j,V,H,F,U,W,q,J,k)},P.step=function(M,C,A,h,p){var k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.shape[3],j=this.shape[4],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3],W=this.stride[4],q=this.offset,J=0,lt=Math.ceil;return typeof M=="number"&&(J=M|0,J<0?(q+=V*(k-1),k=lt(-k/J)):k=lt(k/J),V*=J),typeof C=="number"&&(J=C|0,J<0?(q+=H*(w-1),w=lt(-w/J)):w=lt(w/J),H*=J),typeof A=="number"&&(J=A|0,J<0?(q+=F*(R-1),R=lt(-R/J)):R=lt(R/J),F*=J),typeof h=="number"&&(J=h|0,J<0?(q+=U*(O-1),O=lt(-O/J)):O=lt(O/J),U*=J),typeof p=="number"&&(J=p|0,J<0?(q+=W*(j-1),j=lt(-j/J)):j=lt(j/J),W*=J),new _(this.data,k,w,R,O,j,V,H,F,U,W,q)},P.transpose=function(M,C,A,h,p){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0,p=p===void 0?4:p|0;var k=this.shape,w=this.stride;return new _(this.data,k[M],k[C],k[A],k[h],k[p],w[M],w[C],w[A],w[h],w[p],this.offset)},P.pick=function(M,C,A,h,p){var k=[],w=[],R=this.offset;typeof M=="number"&&M>=0?R=R+this.stride[0]*M|0:(k.push(this.shape[0]),w.push(this.stride[0])),typeof C=="number"&&C>=0?R=R+this.stride[1]*C|0:(k.push(this.shape[1]),w.push(this.stride[1])),typeof A=="number"&&A>=0?R=R+this.stride[2]*A|0:(k.push(this.shape[2]),w.push(this.stride[2])),typeof h=="number"&&h>=0?R=R+this.stride[3]*h|0:(k.push(this.shape[3]),w.push(this.stride[3])),typeof p=="number"&&p>=0?R=R+this.stride[4]*p|0:(k.push(this.shape[4]),w.push(this.stride[4]));var O=u[k.length+1];return O(this.data,k,w,R)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],C[4],A[0],A[1],A[2],A[3],A[4],h)}}};function f(T,u){var b=u===-1?"T":String(u),_=l[b];return u===-1?_(T):u===0?_(T,y[T][0]):_(T,y[T],i)}function x(T){if(a(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,u,b,_){if(T===void 0){var p=y.array[0];return p([])}else typeof T=="number"&&(T=[T]);u===void 0&&(u=[T.length]);var P=u.length;if(b===void 0){b=new Array(P);for(var M=P-1,C=1;M>=0;--M)b[M]=C,C*=u[M]}if(_===void 0){_=0;for(var M=0;M1e-6?(b[0]=P/h,b[1]=M/h,b[2]=C/h,b[3]=A/h):(b[0]=b[1]=b[2]=0,b[3]=1)}function v(b,_,P){this.radius=a([P]),this.center=a(_),this.rotation=a(b),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var _=this.computedRotation;y(_,_);var P=this.computedMatrix;o(P,_);var M=this.computedCenter,C=this.computedEye,A=this.computedUp,h=Math.exp(this.computedRadius[0]);C[0]=M[0]+h*P[2],C[1]=M[1]+h*P[6],C[2]=M[2]+h*P[10],A[0]=P[1],A[1]=P[5],A[2]=P[9];for(var p=0;p<3;++p){for(var k=0,w=0;w<3;++w)k+=P[p+4*w]*C[w];P[12+p]=-k}},T.getMatrix=function(b,_){this.recalcMatrix(b);var P=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=P[M];return _}return P},T.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},T.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},T.pan=function(b,_,P,M){_=_||0,P=P||0,M=M||0,this.recalcMatrix(b);var C=this.computedMatrix,A=C[1],h=C[5],p=C[9],k=f(A,h,p);A/=k,h/=k,p/=k;var w=C[0],R=C[4],O=C[8],j=w*A+R*h+O*p;w-=A*j,R-=h*j,O-=p*j;var V=f(w,R,O);w/=V,R/=V,O/=V,C[2],C[6],C[10];var H=w*_+A*P,F=R*_+h*P,U=O*_+p*P;this.center.move(b,H,F,U);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+M),this.radius.set(b,Math.log(W))},T.rotate=function(b,_,P,M){this.recalcMatrix(b),_=_||0,P=P||0;var C=this.computedMatrix,A=C[0],h=C[4],p=C[8],k=C[1],w=C[5],R=C[9],O=C[2],j=C[6],V=C[10],H=_*A+P*k,F=_*h+P*w,U=_*p+P*R,W=-(j*U-V*F),q=-(V*H-O*U),J=-(O*F-j*H),lt=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(J,2))),yt=x(W,q,J,lt);yt>1e-6?(W/=yt,q/=yt,J/=yt,lt/=yt):(W=q=J=0,lt=1);var mt=this.computedRotation,st=mt[0],tt=mt[1],dt=mt[2],rt=mt[3],at=st*lt+rt*W+tt*J-dt*q,vt=tt*lt+rt*q+dt*W-st*J,it=dt*lt+rt*J+st*q-tt*W,Y=rt*lt-st*W-tt*q-dt*J;if(M){W=O,q=j,J=V;var ft=Math.sin(M)/f(W,q,J);W*=ft,q*=ft,J*=ft,lt=Math.cos(_),at=at*lt+Y*W+vt*J-it*q,vt=vt*lt+Y*q+it*W-at*J,it=it*lt+Y*J+at*q-vt*W,Y=Y*lt-at*W-vt*q-it*J}var ut=x(at,vt,it,Y);ut>1e-6?(at/=ut,vt/=ut,it/=ut,Y/=ut):(at=vt=it=0,Y=1),this.rotation.set(b,at,vt,it,Y)},T.lookAt=function(b,_,P,M){this.recalcMatrix(b),P=P||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var C=this.computedMatrix;n(C,_,P,M);var A=this.computedRotation;l(A,C[0],C[1],C[2],C[4],C[5],C[6],C[8],C[9],C[10]),y(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);for(var h=0,p=0;p<3;++p)h+=Math.pow(P[p]-_[p],2);this.radius.set(b,.5*Math.log(Math.max(h,1e-6))),this.center.set(b,P[0],P[1],P[2])},T.translate=function(b,_,P,M){this.center.move(b,_||0,P||0,M||0)},T.setMatrix=function(b,_){var P=this.computedRotation;l(P,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),y(P,P),this.rotation.set(b,P[0],P[1],P[2],P[3]);var M=this.computedMatrix;i(M,_);var C=M[15];if(Math.abs(C)>1e-6){var A=M[12]/C,h=M[13]/C,p=M[14]/C;this.recalcMatrix(b);var k=Math.exp(this.computedRadius[0]);this.center.set(b,A-M[2]*k,h-M[6]*k,p-M[10]*k),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},T.setDistance=function(b,_){_>0&&this.radius.set(b,Math.log(_))},T.setDistanceLimits=function(b,_){b>0?b=Math.log(b):b=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=_},T.getDistanceLimits=function(b){var _=this.radius.bounds;return b?(b[0]=Math.exp(_[0][0]),b[1]=Math.exp(_[1][0]),b):[Math.exp(_[0][0]),Math.exp(_[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(b){var _=this.lastT(),P=b.center;P&&this.center.set(_,P[0],P[1],P[2]);var M=b.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var C=b.distance;C&&C>0&&this.radius.set(_,Math.log(C)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function u(b){b=b||{};var _=b.center||[0,0,0],P=b.rotation||[0,0,0,1],M=b.radius||1;_=[].slice.call(_,0,3),P=[].slice.call(P,0,4),y(P,P);var C=new v(P,_,Math.log(M));return C.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&C.lookAt(0,b.eye,b.center,b.up),C}},9994:function(t,e,r){var a=r(9618),n=r(8277);t.exports=function(o,i){for(var l=[],f=o,x=1;Array.isArray(f);)l.push(f.length),x*=f.length,f=f[0];return l.length===0?a():(i||(i=a(new Float64Array(x),l)),n(i,o),i)}}},g={};function I(t){var e=g[t];if(e!==void 0)return e.exports;var r=g[t]={id:t,loaded:!1,exports:{}};return c[t].call(r.exports,r,r.exports,I),r.loaded=!0,r.exports}(function(){I.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){I.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}();var S=I(1964);Z.exports=S})()}),gS=Dt((Q,Z)=>{Z.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]}}),tU=Dt((Q,Z)=>{var c=gS();Z.exports=I;var g={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function I(S){var t,e=[],r=1,a;if(typeof S=="string")if(S=S.toLowerCase(),c[S])e=c[S].slice(),a="rgb";else if(S==="transparent")r=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var n=S.slice(1),o=n.length,i=o<=4;r=1,i?(e=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],o===4&&(r=parseInt(n[3]+n[3],16)/255)):(e=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],o===8&&(r=parseInt(n[6]+n[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var l=t[1],f=l==="rgb",n=l.replace(/a$/,"");a=n;var o=n==="cmyk"?4:n==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===o?parseFloat(v)/100:n==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(n[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(g[v]!==void 0)return g[v]}return parseFloat(v)}),l===n&&e.push(1),r=f||e[o]===void 0?1:e[o],e=e.slice(0,o)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",r=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),r=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(r/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:r}}}),eU=Dt((Q,Z)=>{var c=tU();Z.exports=function(I){Array.isArray(I)&&I.raw&&(I=String.raw.apply(null,arguments));var S,t=c(I);if(!t.space)return[];var e=[0,0,0],r=t.space[0]==="h"?[360,100,100]:[255,255,255];return S=Array(3),S[0]=Math.min(Math.max(t.values[0],e[0]),r[0]),S[1]=Math.min(Math.max(t.values[1],e[1]),r[1]),S[2]=Math.min(Math.max(t.values[2],e[2]),r[2]),t.space[0]==="h"&&(S=g(S)),S.push(Math.min(Math.max(t.alpha,0),1)),S};function g(I){var S=I[0]/360,t=I[1]/100,e=I[2]/100,r,a,n,o,i,l=0;if(t===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+t):e+t-e*t,r=2*e-a,o=[0,0,0];l<3;)n=S+1/3*-(l-1),n<0?n++:n>1&&n--,i=6*n<1?r+(a-r)*6*n:2*n<1?a:3*n<2?r+(a-r)*(2/3-n)*6:r,o[l++]=i*255;return o}}),_3=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){return IS?S:g:gI?I:g}}),Yk=Dt((Q,Z)=>{Z.exports=function(c){switch(c){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}}}),U1=Dt((Q,Z)=>{var c=eU(),g=_3(),I=Yk();Z.exports=function(t,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var r=I(e),a=new r(4),n=e!=="uint8"&&e!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=c(t),t[0]/=255,t[1]/=255,t[2]/=255),S(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=g(Math.floor(t[0]*255),0,255),a[1]=g(Math.floor(t[1]*255),0,255),a[2]=g(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:g(Math.floor(t[3]*255),0,255)),a)};function S(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}),Tv=Dt((Q,Z)=>{var c=U1();function g(I){return I?c(I):[0,0,0,1]}Z.exports=g}),Av=Dt((Q,Z)=>{var c=Yi(),g=ro(),I=U1(),S=Xc(),t=wi().defaultLine,e=Ma().isArrayOrTypedArray,r=I(t),a=1;function n(x,y){var v=x;return v[3]*=y,v}function o(x){if(c(x))return r;var y=I(x);return y.length?y:r}function i(x){return c(x)?x:a}function l(x,y,v){var T=x.color;T&&T._inputArray&&(T=T._inputArray);var u=e(T),b=e(y),_=S.extractOpts(x),P=[],M,C,A,h,p;if(_.colorscale!==void 0?M=S.makeColorScaleFuncFromTrace(x):M=o,u?C=function(w,R){return w[R]===void 0?r:I(M(w[R]))}:C=o,b?A=function(w,R){return w[R]===void 0?a:i(w[R])}:A=i,u||b)for(var k=0;k{Z.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]}}),Kk=Dt((Q,Z)=>{Z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}),rU=Dt((Q,Z)=>{var c=Jo();function g(t,e,r,a){if(!e||!e.visible)return null;for(var n=c.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),i=0;i0){var v=a.c2l(x);a._lowerLogErrorBound||(a._lowerLogErrorBound=v),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,v)}}else o[i]=[-l[0]*r,l[1]*r]}return o}function I(t){for(var e=0;e{var c=fp().gl_line3d,g=fp().gl_scatter3d,I=fp().gl_error3d,S=fp().gl_mesh3d,t=fp().delaunay_triangulate,e=kn(),r=Tv(),a=Av().formatColor,n=bg(),o=vS(),i=Kk(),l=Ls(),f=Fp().appendArrayPointValue,x=rU();function y(R,O){this.scene=R,this.uid=O,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 v=y.prototype;v.handlePick=function(R){if(R.object&&(R.object===this.linePlot||R.object===this.delaunayMesh||R.object===this.textMarkers||R.object===this.scatterPlot)){var O=R.index=R.data.index;return R.object.highlight&&R.object.highlight(null),this.scatterPlot&&(R.object=this.scatterPlot,this.scatterPlot.highlight(R.data)),R.textLabel="",this.textLabels&&(e.isArrayOrTypedArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(R.textLabel=this.textLabels[O]):R.textLabel=this.textLabels),R.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function T(R,O,j){var V=(j+1)%3,H=(j+2)%3,F=[],U=[],W;for(W=0;W-1?-1:R.indexOf("right")>-1?1:0}function _(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function P(R){var O=0,j=0,V=[O,j];if(Array.isArray(R))for(var H=0;H=0){var J=T(W.position,W.delaunayColor,W.delaunayAxis);J.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(J):(J.gl=O,this.delaunayMesh=S(J),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)},v.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 w(R,O){var j=new y(R,O.uid);return j.update(O),j}Z.exports=w}),yS=Dt((Q,Z)=>{var c=ef(),g=da(),I=kc(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ho(),n=vS(),o=Kk(),i=Ia().extendFlat,l=Yc().overrideAll,f=G0(),x=c.line,y=c.marker,v=y.line,T=i({width:x.width,dash:{valType:"enumerated",values:f(n),dflt:"solid"}},I("line"));function u(_){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 b=Z.exports=l({x:c.x,y:c.y,z:{valType:"data_array"},text:i({},c.text,{}),texttemplate:e(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},c.hovertext,{}),hovertemplate:t(),hovertemplatefallback:r(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},c.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:u(),y:u(),z:u()},connectgaps:c.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:f(o),dflt:"circle",arrayOk:!0},size:i({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:i({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:i({width:i({},v.width,{arrayOk:!1})},I("marker.line"))},I("marker")),textposition:i({},c.textposition,{dflt:"top center"}),textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}),iU=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Tc(),S=s0(),t=z0(),e=x0(),r=yS();Z.exports=function(n,o,i,l){function f(P,M){return g.coerce(n,o,r,P,M)}var x=a(n,o,f,l);if(!x){o.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),I.hasMarkers(o)&&S(n,o,i,l,f,{noSelect:!0,noAngle:!0}),I.hasLines(o)&&(f("connectgaps"),t(n,o,i,l,f)),I.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),e(n,o,l,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(o.line||{}).color,v=(o.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",y||v);for(var T=["x","y","z"],u=0;u<3;++u){var b="projection."+T[u];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=c.getComponentMethod("errorbars","supplyDefaults");_(n,o,y||v||i,{axis:"z"}),_(n,o,y||v||i,{axis:"y",inherit:"z"}),_(n,o,y||v||i,{axis:"x",inherit:"z"})};function a(n,o,i,l){var f=0,x=i("x"),y=i("y"),v=i("z"),T=c.getComponentMethod("calendars","handleTraceDefaults");return T(n,o,["x","y","z"],l),x&&y&&v&&(f=Math.min(x.length,y.length,v.length),o._length=o._xlength=o._ylength=o._zlength=f),f}}),aU=Dt((Q,Z)=>{var c=ct(),g=F0();Z.exports=function(I,S){var t=[{x:!1,y:!1,trace:S,t:{}}];return c(t,S),g(I,S),t}}),oU=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(typeof g!="string")throw new TypeError("must specify type string");if(I=I||{},typeof document>"u"&&!I.canvas)return null;var S=I.canvas||document.createElement("canvas");typeof I.width=="number"&&(S.width=I.width),typeof I.height=="number"&&(S.height=I.height);var t=I,e;try{var r=[g];g.indexOf("webgl")===0&&r.push("experimental-"+g);for(var a=0;a{var c=oU();Z.exports=function(g){return c("webgl",g)}}),xS=Dt((Q,Z)=>{var c=hi(),g=function(){};Z.exports=function(I){for(var S in I)typeof I[S]=="function"&&(I[S]=g);I.destroy=function(){I.container.parentNode.removeChild(I.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=c.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=c.lightLine,t.style["z-index"]=30;var e=document.createElement("p");return e.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",e.style.position="relative",e.style.top="50%",e.style.left="50%",e.style.height="30%",e.style.width="50%",e.style.margin="-15% 0 0 -25%",t.appendChild(e),I.container.appendChild(t),I.container.style.background="#FFFFFF",I.container.onclick=function(){window.open("https://get.webgl.org")},!1}}),lU=Dt((Q,Z)=>{var c=Tv(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(){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 t=S.prototype;t.merge=function(r,a){for(var n=this,o=0;o<3;++o){var i=a[I[o]];if(!i.visible){n.tickEnable[o]=!1,n.labelEnable[o]=!1,n.lineEnable[o]=!1,n.lineTickEnable[o]=!1,n.gridEnable[o]=!1,n.zeroEnable[o]=!1,n.backgroundEnable[o]=!1;continue}n.labels[o]=r._meta?g.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[o]=c(i.title.font.color)),i.title.font.family&&(n.labelFont[o]=i.title.font.family),i.title.font.size&&(n.labelSize[o]=i.title.font.size),i.title.font.weight&&(n.labelFontWeight[o]=i.title.font.weight),i.title.font.style&&(n.labelFontStyle[o]=i.title.font.style),i.title.font.variant&&(n.labelFontVariant[o]=i.title.font.variant)),"showline"in i&&(n.lineEnable[o]=i.showline),"linecolor"in i&&(n.lineColor[o]=c(i.linecolor)),"linewidth"in i&&(n.lineWidth[o]=i.linewidth),"showgrid"in i&&(n.gridEnable[o]=i.showgrid),"gridcolor"in i&&(n.gridColor[o]=c(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[o]=i.gridwidth),i.type==="log"?n.zeroEnable[o]=!1:"zeroline"in i&&(n.zeroEnable[o]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[o]=c(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[o]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[o]=!0:n.lineTickEnable[o]=!1,"ticklen"in i&&(n.lineTickLength[o]=n._defaultLineTickLength[o]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[o]=c(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[o]=i.tickwidth),"tickangle"in i&&(n.tickAngle[o]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[o]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[o]=c(i.tickfont.color)),i.tickfont.family&&(n.tickFont[o]=i.tickfont.family),i.tickfont.size&&(n.tickSize[o]=i.tickfont.size),i.tickfont.weight&&(n.tickFontWeight[o]=i.tickfont.weight),i.tickfont.style&&(n.tickFontStyle[o]=i.tickfont.style),i.tickfont.variant&&(n.tickFontVariant[o]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[o]=!0,n.lineMirror[o]=!0):i.mirror===!0?(n.lineTickMirror[o]=!1,n.lineMirror[o]=!0):(n.lineTickMirror[o]=!1,n.lineMirror[o]=!1):n.lineMirror[o]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[o]=!0,n.backgroundColor[o]=c(i.backgroundcolor)):n.backgroundEnable[o]=!1}};function e(r,a){var n=new S;return n.merge(r,a),n}Z.exports=e}),uU=Dt((Q,Z)=>{var c=Tv(),g=["xaxis","yaxis","zaxis"];function I(){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 S=I.prototype;S.merge=function(e){for(var r=0;r<3;++r){var a=e[g[r]];if(!a.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=a.showspikes,this.colors[r]=c(a.spikecolor),this.drawSides[r]=a.spikesides,this.lineWidth[r]=a.spikethickness}};function t(e){var r=new I;return r.merge(e),r}Z.exports=t}),cU=Dt((Q,Z)=>{Z.exports=t;var c=Ls(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(e){for(var r=new Array(3),a=0;a<3;++a){for(var n=e[a],o=new Array(n.length),i=0;i/g," "));o[i]=y,l.tickmode=f}}r.ticks=o;for(var i=0;i<3;++i){.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var v=0;v<2;++v)r.bounds[v][i]=e.glplot.bounds[v][i]}e.contourLevels=S(o)}}),hU=Dt((Q,Z)=>{var c=fp().gl_plot3d,g=c.createCamera,I=c.createScene,S=sU(),t=z_(),e=Jo(),r=kn(),a=r.preserveDrawingBuffer(),n=Ls(),o=tf(),i=Tv(),l=xS(),f=FM(),x=lU(),y=uU(),v=cU(),T=Y0().applyAutorangeOptions,u,b,_=!1;function P(j,V){var H=document.createElement("div"),F=j.container;this.graphDiv=j.graphDiv;var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.style.position="absolute",U.style.top=U.style.left="0px",U.style.width=U.style.height="100%",U.style["z-index"]=20,U.style["pointer-events"]="none",H.appendChild(U),this.svgContainer=U,H.id=j.id,H.style.position="absolute",H.style.top=H.style.left="0px",H.style.width=H.style.height="100%",F.appendChild(H),this.fullLayout=V,this.id=j.id||"scene",this.fullSceneLayout=V[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(V,V[this.id]),this.spikeOptions=y(V[this.id]),this.container=H,this.staticMode=!!j.staticPlot,this.pixelRatio=this.pixelRatio||j.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=P.prototype;M.prepareOptions=function(){var j=this,V={canvas:j.canvas,gl:j.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:j.container,axes:j.axesOptions,spikes:j.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:j.camera,pixelRatio:j.pixelRatio};if(j.staticMode){if(!b&&(u=document.createElement("canvas"),b=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");V.gl=b,V.canvas=u}return V};var C=!0;M.tryCreatePlot=function(){var j=this,V=j.prepareOptions(),H=!0;try{j.glplot=I(V)}catch{if(j.staticMode||!C||a)H=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=V.glOptions.preserveDrawingBuffer=!0,j.glplot=I(V)}catch{a=V.glOptions.preserveDrawingBuffer=!1,H=!1}}}return C=!1,H},M.initializeGLCamera=function(){var j=this,V=j.fullSceneLayout.camera,H=V.projection.type==="orthographic";j.camera=g(j.container,{center:[V.center.x,V.center.y,V.center.z],eye:[V.eye.x,V.eye.y,V.eye.z],up:[V.up.x,V.up.y,V.up.z],_ortho:H,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var j=this;j.initializeGLCamera();var V=j.tryCreatePlot();if(!V)return l(j);j.traces={},j.make4thDimension();var H=j.graphDiv,F=H.layout,U=function(){var q={};return j.isCameraChanged(F)&&(q[j.id+".camera"]=j.getCamera()),j.isAspectChanged(F)&&(q[j.id+".aspectratio"]=j.glplot.getAspectratio(),F[j.id].aspectmode!=="manual"&&(j.fullSceneLayout.aspectmode=F[j.id].aspectmode=q[j.id+".aspectmode"]="manual")),q},W=function(q){if(q.fullSceneLayout.dragmode!==!1){var J=U();q.saveLayout(F),q.graphDiv.emit("plotly_relayout",J)}};return j.glplot.canvas&&(j.glplot.canvas.addEventListener("mouseup",function(){W(j)}),j.glplot.canvas.addEventListener("touchstart",function(){_=!0}),j.glplot.canvas.addEventListener("wheel",function(q){if(H._context._scrollZoom.gl3d){if(j.camera._ortho){var J=q.deltaX>q.deltaY?1.1:.9090909090909091,lt=j.glplot.getAspectratio();j.glplot.setAspectratio({x:J*lt.x,y:J*lt.y,z:J*lt.z})}W(j)}},t?{passive:!1}:!1),j.glplot.canvas.addEventListener("mousemove",function(){if(j.fullSceneLayout.dragmode!==!1&&j.camera.mouseListener.buttons!==0){var q=U();j.graphDiv.emit("plotly_relayouting",q)}}),j.staticMode||j.glplot.canvas.addEventListener("webglcontextlost",function(q){H&&H.emit&&H.emit("plotly_webglcontextlost",{event:q,layer:j.id})},!1)),j.glplot.oncontextloss=function(){j.recoverContext()},j.glplot.onrender=function(){j.render()},!0},M.render=function(){var j=this,V=j.graphDiv,H,F=j.svgContainer,U=j.container.getBoundingClientRect();V._fullLayout._calcInverseTransform(V);var W=V._fullLayout._invScaleX,q=V._fullLayout._invScaleY,J=U.width*W,lt=U.height*q;F.setAttributeNS(null,"viewBox","0 0 "+J+" "+lt),F.setAttributeNS(null,"width",J),F.setAttributeNS(null,"height",lt),v(j),j.glplot.axes.update(j.axesOptions);for(var yt=Object.keys(j.traces),mt=null,st=j.glplot.selection,tt=0;tt")):H.type==="isosurface"||H.type==="volume"?(it.valueLabel=n.hoverLabelText(j._mockAxis,j._mockAxis.d2l(st.traceCoordinate[3]),H.valuehoverformat),It.push("value: "+it.valueLabel),st.textLabel&&It.push(st.textLabel),kt=It.join("
")):kt=st.textLabel;var Pt={x:st.traceCoordinate[0],y:st.traceCoordinate[1],z:st.traceCoordinate[2],data:at._input,fullData:at,curveNumber:at.index,pointNumber:vt};o.appendArrayPointValue(Pt,at,vt),H._module.eventData&&(Pt=at._module.eventData(Pt,st,at,{},vt));var qt={points:[Pt]};if(j.fullSceneLayout.hovermode){var Wt=[];o.loneHover({trace:at,x:(.5+.5*rt[0]/rt[3])*J,y:(.5-.5*rt[1]/rt[3])*lt,xLabel:it.xLabel,yLabel:it.yLabel,zLabel:it.zLabel,text:kt,name:mt.name,color:o.castHoverOption(at,vt,"bgcolor")||mt.color,borderColor:o.castHoverOption(at,vt,"bordercolor"),fontFamily:o.castHoverOption(at,vt,"font.family"),fontSize:o.castHoverOption(at,vt,"font.size"),fontColor:o.castHoverOption(at,vt,"font.color"),nameLength:o.castHoverOption(at,vt,"namelength"),textAlign:o.castHoverOption(at,vt,"align"),hovertemplate:r.castOption(at,vt,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Pt,it),eventData:[Pt]},{container:F,gd:V,inOut_bbox:Wt}),Pt.bbox=Wt[0]}st.distance<5&&(st.buttons||_)?V.emit("plotly_click",qt):V.emit("plotly_hover",qt),this.oldEventData=qt}else o.loneUnhover(F),this.oldEventData&&V.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;j.drawAnnotations(j)},M.recoverContext=function(){var j=this;j.glplot.dispose();var V=function(){if(j.glplot.gl.isContextLost()){requestAnimationFrame(V);return}if(!j.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}j.plot.apply(j,j.plotArgs)};requestAnimationFrame(V)};var A=["xaxis","yaxis","zaxis"];function h(j,V,H){for(var F=j.fullSceneLayout,U=0;U<3;U++){var W=A[U],q=W.charAt(0),J=F[W],lt=V[q],yt=V[q+"calendar"],mt=V["_"+q+"length"];if(!r.isArrayOrTypedArray(lt))H[0][U]=Math.min(H[0][U],0),H[1][U]=Math.max(H[1][U],mt-1);else for(var st,tt=0;tt<(mt||lt.length);tt++)if(r.isArrayOrTypedArray(lt[tt]))for(var dt=0;dtat[1][q])at[0][q]=-1,at[1][q]=1;else{var ge=at[1][q]-at[0][q];at[0][q]-=ge/32,at[1][q]+=ge/32}if(Y=[at[0][q],at[1][q]],Y=T(Y,lt),at[0][q]=Y[0],at[1][q]=Y[1],lt.isReversed()){var fe=at[0][q];at[0][q]=at[1][q],at[1][q]=fe}}else Y=lt.range,at[0][q]=lt.r2l(Y[0]),at[1][q]=lt.r2l(Y[1]);at[0][q]===at[1][q]&&(at[0][q]-=1,at[1][q]+=1),vt[q]=at[1][q]-at[0][q],lt.range=[at[0][q],at[1][q]],lt.limitRange(),F.glplot.setBounds(q,{min:lt.range[0]*dt[q],max:lt.range[1]*dt[q]})}var pe,se=mt.aspectmode;if(se==="cube")pe=[1,1,1];else if(se==="manual"){var Tt=mt.aspectratio;pe=[Tt.x,Tt.y,Tt.z]}else if(se==="auto"||se==="data"){var Lt=[1,1,1];for(q=0;q<3;++q){lt=mt[A[q]],yt=lt.type;var Mt=it[yt];Lt[q]=Math.pow(Mt.acc,1/Mt.count)/dt[q]}se==="data"||Math.max.apply(null,Lt)/Math.min.apply(null,Lt)<=4?pe=Lt:pe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");mt.aspectratio.x=st.aspectratio.x=pe[0],mt.aspectratio.y=st.aspectratio.y=pe[1],mt.aspectratio.z=st.aspectratio.z=pe[2],F.glplot.setAspectratio(mt.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:mt.aspectratio.x,y:mt.aspectratio.y,z:mt.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=mt.aspectmode);var ee=mt.domain||null,ve=V._size||null;if(ee&&ve){var oe=F.container.style;oe.position="absolute",oe.left=ve.l+ee.x[0]*ve.w+"px",oe.top=ve.t+(1-ee.y[1])*ve.h+"px",oe.width=ve.w*(ee.x[1]-ee.x[0])+"px",oe.height=ve.h*(ee.y[1]-ee.y[0])+"px"}F.glplot.redraw()}},M.destroy=function(){var j=this;j.glplot&&(j.camera.mouseListener.enabled=!1,j.container.removeEventListener("wheel",j.camera.wheelListener),j.camera=null,j.glplot.dispose(),j.container.parentNode.removeChild(j.container),j.glplot=null)};function k(j){return[[j.eye.x,j.eye.y,j.eye.z],[j.center.x,j.center.y,j.center.z],[j.up.x,j.up.y,j.up.z]]}function w(j){return{up:{x:j.up[0],y:j.up[1],z:j.up[2]},center:{x:j.center[0],y:j.center[1],z:j.center[2]},eye:{x:j.eye[0],y:j.eye[1],z:j.eye[2]},projection:{type:j._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var j=this;return j.camera.view.recalcMatrix(j.camera.view.lastT()),w(j.camera)},M.setViewport=function(j){var V=this,H=j.camera;V.camera.lookAt.apply(this,k(H)),V.glplot.setAspectratio(j.aspectratio);var F=H.projection.type==="orthographic",U=V.camera._ortho;F!==U&&(V.glplot.redraw(),V.glplot.clearRGBA(),V.glplot.dispose(),V.initializeGLPlot())},M.isCameraChanged=function(j){var V=this,H=V.getCamera(),F=r.nestedProperty(j,V.id+".camera"),U=F.get();function W(yt,mt,st,tt){var dt=["up","center","eye"],rt=["x","y","z"];return mt[dt[st]]&&yt[dt[st]][rt[tt]]===mt[dt[st]][rt[tt]]}var q=!1;if(U===void 0)q=!0;else{for(var J=0;J<3;J++)for(var lt=0;lt<3;lt++)if(!W(H,U,J,lt)){q=!0;break}(!U.projection||H.projection&&H.projection.type!==U.projection.type)&&(q=!0)}return q},M.isAspectChanged=function(j){var V=this,H=V.glplot.getAspectratio(),F=r.nestedProperty(j,V.id+".aspectratio"),U=F.get();return U===void 0||U.x!==H.x||U.y!==H.y||U.z!==H.z},M.saveLayout=function(j){var V=this,H=V.fullLayout,F,U,W,q,J,lt,yt=V.isCameraChanged(j),mt=V.isAspectChanged(j),st=yt||mt;if(st){var tt={};if(yt&&(F=V.getCamera(),U=r.nestedProperty(j,V.id+".camera"),W=U.get(),tt[V.id+".camera"]=W),mt&&(q=V.glplot.getAspectratio(),J=r.nestedProperty(j,V.id+".aspectratio"),lt=J.get(),tt[V.id+".aspectratio"]=lt),e.call("_storeDirectGUIEdit",j,H._preGUI,tt),yt){U.set(F);var dt=r.nestedProperty(H,V.id+".camera");dt.set(F)}if(mt){J.set(q);var rt=r.nestedProperty(H,V.id+".aspectratio");rt.set(q),V.glplot.redraw()}}return st},M.updateFx=function(j,V){var H=this,F=H.camera;if(F)if(j==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(j==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var U=H.graphDiv,W=U._fullLayout,q=H.fullSceneLayout.camera,J=q.up.x,lt=q.up.y,yt=q.up.z;if(yt/Math.sqrt(J*J+lt*lt+yt*yt)<.999){var mt=H.id+".camera.up",st={x:0,y:0,z:1},tt={};tt[mt]=st;var dt=U.layout;e.call("_storeDirectGUIEdit",dt,W._preGUI,tt),q.up=st,r.nestedProperty(dt,mt).set(st)}}else F.keyBindingMode=j;H.fullSceneLayout.hovermode=V};function R(j,V,H){for(var F=0,U=H-1;F0)for(var J=255/q,lt=0;lt<3;++lt)j[W+lt]=Math.min(J*j[W+lt],255)}}M.toImage=function(j){var V=this;j||(j="png"),V.staticMode&&V.container.appendChild(u),V.glplot.redraw();var H=V.glplot.gl,F=H.drawingBufferWidth,U=H.drawingBufferHeight;H.bindFramebuffer(H.FRAMEBUFFER,null);var W=new Uint8Array(F*U*4);H.readPixels(0,0,F,U,H.RGBA,H.UNSIGNED_BYTE,W),R(W,F,U),O(W,F,U);var q=document.createElement("canvas");q.width=F,q.height=U;var J=q.getContext("2d",{willReadFrequently:!0}),lt=J.createImageData(F,U);lt.data.set(W),J.putImageData(lt,0,0);var yt;switch(j){case"jpeg":yt=q.toDataURL("image/jpeg");break;case"webp":yt=q.toDataURL("image/webp");break;default:yt=q.toDataURL("image/png")}return V.staticMode&&V.container.removeChild(u),yt},M.setConvert=function(){for(var j=this,V=0;V<3;V++){var H=j.fullSceneLayout[A[V]];n.setConvert(H,j.fullLayout),H.setScale=r.noop}},M.make4thDimension=function(){var j=this,V=j.graphDiv,H=V._fullLayout;j._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(j._mockAxis,H)},Z.exports=P}),fU=Dt((Q,Z)=>{Z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}),_S=Dt((Q,Z)=>{var c=hi(),g=Td(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:c.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:I({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},rangemode:g.rangemode,minallowed:g.minallowed,maxallowed:g.maxallowed,range:I({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:I({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth},"plot","from-root")}),bS=Dt((Q,Z)=>{var c=_S(),g=jh().attributes,I=Ia().extendFlat,S=kn().counterRegex;function t(e,r,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}Z.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:I(t(0,0,1),{}),center:I(t(0,0,0),{}),eye:I(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:g({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:c,yaxis:c,zaxis:c,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"}}),dU=Dt((Q,Z)=>{var c=ro().mix,g=kn(),I=mu(),S=_S(),t=kp(),e=tx(),r=["xaxis","yaxis","zaxis"],a=13600/187;Z.exports=function(n,o,i){var l,f;function x(T,u){return g.coerce(l,f,S,T,u)}for(var y=0;y{var c=kn(),g=hi(),I=Jo(),S=z1(),t=dU(),e=bS(),r=ud().getSubplotData,a="gl3d";Z.exports=function(o,i,l){var f=i._basePlotModules.length>1;function x(y){if(!f){var v=c.validate(o[y],e[y]);if(v)return o[y]}}S(o,i,l,{type:a,attributes:e,handleDefaults:n,fullLayout:i,font:i.font,fullData:l,getDfltFromLayout:x,autotypenumbersDflt:i.autotypenumbers,paper_bgcolor:i.paper_bgcolor,calendar:i.calendar})};function n(o,i,l,f){for(var x=l("bgcolor"),y=g.combine(x,f.paper_bgcolor),v=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";l("dragmode",M),l("hovermode",f.getDfltFromLayout("hovermode"))}}),V1=Dt(Q=>{var Z=Yc().overrideAll,c=po(),g=hU(),I=ud().getSubplotData,S=kn(),t=Dp(),e="gl3d",r="scene";Q.name=e,Q.attr=r,Q.idRoot=r,Q.idRegex=Q.attrRegex=S.counterRegex("scene"),Q.attributes=fU(),Q.layoutAttributes=bS(),Q.baseLayoutAttrOverrides=Z({hoverlabel:c.hoverlabel},"plot","nested"),Q.supplyLayoutDefaults=pU(),Q.plot=function(a){for(var n=a._fullLayout,o=a._fullData,i=n._subplots[e],l=0;l{Z.exports={plot:nU(),attributes:yS(),markerSymbols:Kk(),supplyDefaults:iU(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:aU(),moduleType:"trace",name:"scatter3d",basePlotModule:V1(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}),gU=Dt((Q,Z)=>{Z.exports=mU()}),b3=Dt((Q,Z)=>{var c=hi(),g=kc(),I=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=Ho(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{valType:"boolean",dflt:!1}}function o(l){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:n(),y:n(),z:n()},color:{valType:"color",dflt:c.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:c.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=Z.exports=a(r({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),zhoverformat:I("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:r({},e.hoverinfo),showlegend:r({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}),wS=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mc(),S=b3(),t=.1;function e(o,i){for(var l=[],f=32,x=0;x{var c=Xd();Z.exports=function(g,I){I.surfacecolor?c(g,I,{vals:I.surfacecolor,containerStr:"",cLetter:"c"}):c(g,I,{vals:I.z,containerStr:"",cLetter:"c"})}}),yU=Dt((Q,Z)=>{var c=fp().gl_surface3d,g=fp().ndarray,I=fp().ndarray_linear_interpolate.d2,S=$6(),t=Z6(),e=kn().isArrayOrTypedArray,r=Av().parseColorScale,a=Tv(),n=Xc().extractOpts;function o(k,w,R){this.scene=k,this.uid=R,this.surface=w,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=o.prototype;i.getXat=function(k,w,R,O){var j=e(this.data.x)?e(this.data.x[0])?this.data.x[w][k]:this.data.x[k]:k;return R===void 0?j:O.d2l(j,0,R)},i.getYat=function(k,w,R,O){var j=e(this.data.y)?e(this.data.y[0])?this.data.y[w][k]:this.data.y[w]:w;return R===void 0?j:O.d2l(j,0,R)},i.getZat=function(k,w,R,O){var j=this.data.z[w][k];return j===null&&this.data.connectgaps&&this.data._interpolatedZ&&(j=this.data._interpolatedZ[w][k]),R===void 0?j:O.d2l(j,0,R)},i.handlePick=function(k){if(k.object===this.surface){var w=(k.data.index[0]-1)/this.dataScaleX-1,R=(k.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(w),this.data.z[0].length-1),0),j=Math.max(Math.min(Math.round(R),this.data._ylength-1),0);k.index=[O,j],k.traceCoordinate=[this.getXat(O,j),this.getYat(O,j),this.getZat(O,j)],k.dataCoordinate=[this.getXat(O,j,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,j,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,j,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var V=0;V<3;V++){var H=k.dataCoordinate[V];H!=null&&(k.dataCoordinate[V]*=this.scene.dataScale[V])}var F=this.data.hovertext||this.data.text;return e(F)&&F[j]&&F[j][O]!==void 0?k.textLabel=F[j][O]:F?k.textLabel=F:k.textLabel="",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};function l(k){var w=k[0].rgb,R=k[k.length-1].rgb;return w[0]===R[0]&&w[1]===R[1]&&w[2]===R[2]&&w[3]===R[3]}var f=[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 x(k,w){if(k0){R=f[O];break}return R}function T(k,w){if(!(k<1||w<1)){for(var R=y(k),O=y(w),j=1,V=0;VP;)O--,O/=v(O),O++,O<_&&(O=P);var j=Math.round(O/k);return j>1?j:1};function M(k,w,R){var O=R[8]+R[2]*w[0]+R[5]*w[1];return k[0]=(R[6]+R[0]*w[0]+R[3]*w[1])/O,k[1]=(R[7]+R[1]*w[0]+R[4]*w[1])/O,k}function C(k,w,R){return A(k,w,M,R),k}function A(k,w,R,O){for(var j=[0,0],V=k.shape[0],H=k.shape[1],F=0;F0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(w[O]=!0,j=this.contourStart[O];jlt&&(this.minValues[W]=lt),this.maxValues[W]{Z.exports={attributes:b3(),supplyDefaults:wS().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:vU(),plot:yU(),moduleType:"trace",name:"surface",basePlotModule:V1(),categories:["gl3d","2dMap","showLegend"],meta:{}}}),_U=Dt((Q,Z)=>{Z.exports=xU()}),pb=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=b3(),e=Ho(),r=Ia().extendFlat;Z.exports=r({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:I({editType:"calc"}),hovertemplatefallback:S({editType:"calc"}),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("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"}},c("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:r({},t.lightposition.x,{dflt:1e5}),y:r({},t.lightposition.y,{dflt:1e5}),z:r({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:r({},e.hoverinfo,{editType:"calc"}),showlegend:r({},e.showlegend,{dflt:!1})})}),Xk=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function o(l){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=Z.exports=a(r({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:n(),y:n(),z:n()},caps:{x:o(),y:o(),z:o()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:I(),hovertemplatefallback:S(),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:r({},e.showlegend,{dflt:!1})},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:r({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}),kS=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=Xk(),S=mc();function t(r,a,n,o){function i(l,f){return c.coerce(r,a,I,l,f)}e(r,a,n,o,i)}function e(r,a,n,o,i){var l=i("isomin"),f=i("isomax");f!=null&&l!==void 0&&l!==null&&l>f&&(a.isomin=null,a.isomax=null);var x=i("x"),y=i("y"),v=i("z"),T=i("value");if(!x||!x.length||!y||!y.length||!v||!v.length||!T||!T.length){a.visible=!1;return}var u=g.getComponentMethod("calendars","handleTraceDefaults");u(r,a,["x","y","z"],o),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var C="caps."+M,A=i(C+".show");A&&i(C+".fill");var h="slices."+M,p=i(h+".show");p&&(i(h+".fill"),i(h+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var _=i("surface.show");_&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var P=i("contour.show");P&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),S(r,a,o,i,{prefix:"",cLetter:"c"}),a._length=null}Z.exports={supplyDefaults:t,supplyIsoDefaults:e}}),Jk=Dt((Q,Z)=>{var c=kn(),g=Xd();function I(r,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var n=S(a);a._gridFill=n.fill,a._Xs=n.Xs,a._Ys=n.Ys,a._Zs=n.Zs,a._len=n.len;var o=0,i,l,f;a.starts&&(i=e(a.starts.x||[]),l=e(a.starts.y||[]),f=e(a.starts.z||[]),o=Math.min(i.length,l.length,f.length)),a._startsX=i||[],a._startsY=l||[],a._startsZ=f||[];var x=0,y=1/0,v;for(v=0;v1&&(p=a[i-1],w=n[i-1],O=o[i-1]),l=0;lp?"-":"+")+"x"),P=P.replace("y",(k>w?"-":"+")+"y"),P=P.replace("z",(R>O?"-":"+")+"z");var F=function(){i=0,j=[],V=[],H=[]};(!i||i{var c=Xd(),g=Jk().processGrid,I=Jk().filter;Z.exports=function(S,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=I(t.x,t._len),t._y=I(t.y,t._len),t._z=I(t.z,t._len),t._value=I(t.value,t._len);var e=g(t);t._gridFill=e.fill,t._Xs=e.Xs,t._Ys=e.Ys,t._Zs=e.Zs,t._len=e.len;for(var r=1/0,a=-1/0,n=0;n{Z.exports=function(c,g,I,S){S=S||c.length;for(var t=new Array(S),e=0;e{var c=fp().gl_mesh3d,g=Av().parseColorScale,I=kn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=mb(),r=function(f,x){for(var y=x.length-1;y>0;y--){var v=Math.min(x[y],x[y-1]),T=Math.max(x[y],x[y-1]);if(T>v&&v-1}function ft(Le,Gt){return Le===null?Gt:Le}function ut(Le,Gt,ne){yt();var Ct=[Gt],gt=[ne];if(at>=1)Ct=[Gt],gt=[ne];else if(at>0){var St=it(Gt,ne);Ct=St.xyzv,gt=St.abc}for(var Nt=0;Nt-1?ne[le]:lt(we,Ue,qe);Sr>-1?re[le]=Sr:re[le]=st(we,Ue,qe,ft(Le,or))}tt(re[0],re[1],re[2])}}function kt(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(2,3,0)}function It(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(3,0,1),Ct(2,3,0),Ct(1,2,3)}function Pt(Le,Gt,ne,Ct){var gt=Le[3];gtCt&&(gt=Ct);for(var St=(Le[3]-gt)/(Le[3]-Gt[3]+1e-9),Nt=[],re=0;re<4;re++)Nt[re]=(1-St)*Le[re]+St*Gt[re];return Nt}function qt(Le,Gt,ne){return Le>=Gt&&Le<=ne}function Wt(Le){var Gt=.001*(F-H);return Le>=H-Gt&&Le<=F+Gt}function Jt(Le){for(var Gt=[],ne=0;ne<4;ne++){var Ct=Le[ne];Gt.push([f._x[Ct],f._y[Ct],f._z[Ct],f._value[Ct]])}return Gt}var ge=3;function fe(Le,Gt,ne,Ct,gt,St){St||(St=1),ne=[-1,-1,-1];var Nt=!1,re=[qt(Gt[0][3],Ct,gt),qt(Gt[1][3],Ct,gt),qt(Gt[2][3],Ct,gt)];if(!re[0]&&!re[1]&&!re[2])return!1;var le=function(Ue,qe,or){return Wt(qe[0][3])&&Wt(qe[1][3])&&Wt(qe[2][3])?(ut(Ue,qe,or),!0):Stre?[j,St]:[St,V];cr(Gt,le[0],le[1])}}var we=[[Math.min(H,V),Math.max(H,V)],[Math.min(j,F),Math.max(j,F)]];["x","y","z"].forEach(function(Ue){for(var qe=[],or=0;or0&&(Wn.push(oi.id),Ue==="x"?Xn.push([oi.distRatio,0,0]):Ue==="y"?Xn.push([0,oi.distRatio,0]):Xn.push([0,0,oi.distRatio]))}else Ue==="x"?Hn=br(1,p-1):Ue==="y"?Hn=br(1,k-1):Hn=br(1,w-1);Wn.length>0&&(Ue==="x"?qe[Sr]=ur(Le,Wn,Ar,mr,Xn,qe[Sr]):Ue==="y"?qe[Sr]=jr(Le,Wn,Ar,mr,Xn,qe[Sr]):qe[Sr]=Wr(Le,Wn,Ar,mr,Xn,qe[Sr]),Sr++),Hn.length>0&&(Ue==="x"?qe[Sr]=ve(Le,Hn,Ar,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,Hn,Ar,mr,qe[Sr]):qe[Sr]=Te(Le,Hn,Ar,mr,qe[Sr]),Sr++)}var $n=f.caps[Ue];$n.show&&$n.fill&&(vt($n.fill),Ue==="x"?qe[Sr]=ve(Le,[0,p-1],Ar,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,[0,k-1],Ar,mr,qe[Sr]):qe[Sr]=Te(Le,[0,w-1],Ar,mr,qe[Sr]),Sr++)}}),_===0&&mt(),f._meshX=U,f._meshY=W,f._meshZ=q,f._meshIntensity=J,f._Xs=C,f._Ys=A,f._Zs=h}return nn(),f}function l(f,x){var y=f.glplot.gl,v=c({gl:y}),T=new a(f,v,x.uid);return v._trace=T,T.update(x),f.glplot.add(v),T}Z.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:l}}),bU=Dt((Q,Z)=>{Z.exports={attributes:Xk(),supplyDefaults:kS().supplyDefaults,calc:TS(),colorbar:{min:"cmin",max:"cmax"},plot:Qk().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),wU=Dt((Q,Z)=>{Z.exports=bU()}),AS=Dt((Q,Z)=>{var c=kc(),g=Xk(),I=b3(),S=Ho(),t=Ia().extendFlat,e=Yc().overrideAll,r=Z.exports=e(t({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate,hovertemplatefallback:g.hovertemplatefallback},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:I.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:t({},S.hoverinfo),showlegend:t({},S.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}),kU=Dt((Q,Z)=>{var c=kn(),g=AS(),I=kS().supplyIsoDefaults,S=wS().opacityscaleDefaults;Z.exports=function(t,e,r,a){function n(o,i){return c.coerce(t,e,g,o,i)}I(t,e,r,a,n),S(t,e,a,n)}}),TU=Dt((Q,Z)=>{var c=fp().gl_mesh3d,g=Av().parseColorScale,I=kn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=mb(),r=Qk().findNearestOnAxis,a=Qk().generateIsoMeshes;function n(l,f,x){this.scene=l,this.uid=x,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(l){if(l.object===this.mesh){var f=l.data.index,x=this.data._meshX[f],y=this.data._meshY[f],v=this.data._meshZ[f],T=this.data._Ys.length,u=this.data._Zs.length,b=r(x,this.data._Xs).id,_=r(y,this.data._Ys).id,P=r(v,this.data._Zs).id,M=l.index=P+u*_+u*T*b;l.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var C=this.data.hovertext||this.data.text;return I(C)&&C[M]!==void 0?l.textLabel=C[M]:C&&(l.textLabel=C),!0}},o.update=function(l){var f=this.scene,x=f.fullSceneLayout;this.data=a(l);function y(_,P,M,C){return P.map(function(A){return _.d2l(A,0,C)*M})}var v=e(y(x.xaxis,l._meshX,f.dataScale[0],l.xcalendar),y(x.yaxis,l._meshY,f.dataScale[1],l.ycalendar),y(x.zaxis,l._meshZ,f.dataScale[2],l.zcalendar)),T=e(l._meshI,l._meshJ,l._meshK),u={positions:v,cells:T,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,opacityscale:l.opacityscale,contourEnable:l.contour.show,contourColor:S(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading},b=t(l);u.vertexIntensity=l._meshIntensity,u.vertexIntensityBounds=[b.min,b.max],u.colormap=g(l),this.mesh.update(u)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(l,f){var x=l.glplot.gl,y=c({gl:x}),v=new n(l,y,f.uid);return y._trace=v,v.update(f),l.glplot.add(y),v}Z.exports=i}),AU=Dt((Q,Z)=>{Z.exports={attributes:AS(),supplyDefaults:kU(),calc:TS(),colorbar:{min:"cmin",max:"cmax"},plot:TU(),moduleType:"trace",name:"volume",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),MU=Dt((Q,Z)=>{Z.exports=AU()}),SU=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mc(),S=pb();Z.exports=function(t,e,r,a){function n(x,y){return g.coerce(t,e,S,x,y)}function o(x){var y=x.map(function(v){var T=n(v);return T&&g.isArrayOrTypedArray(T)?T:null});return y.every(function(v){return v&&v.length===y[0].length})&&y}var i=o(["x","y","z"]);if(!i){e.visible=!1;return}if(o(["i","j","k"]),e.i&&(!e.j||!e.k)||e.j&&(!e.k||!e.i)||e.k&&(!e.i||!e.j)){e.visible=!1;return}var l=c.getComponentMethod("calendars","handleTraceDefaults");l(t,e,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(x){n(x)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),I(t,e,a,n,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",r)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),e._length=null}}),EU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){I.intensity&&c(g,I,{vals:I.intensity,containerStr:"",cLetter:"c"})}}),CU=Dt((Q,Z)=>{var c=fp().gl_mesh3d,g=fp().delaunay_triangulate,I=fp().alpha_shape,S=fp().convex_hull,t=Av().parseColorScale,e=kn().isArrayOrTypedArray,r=Tv(),a=Xc().extractOpts,n=mb();function o(u,b,_){this.scene=u,this.uid=_,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=o.prototype;i.handlePick=function(u){if(u.object===this.mesh){var b=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var _=this.data.hovertext||this.data.text;return e(_)&&_[b]!==void 0?u.textLabel=_[b]:_&&(u.textLabel=_),!0}};function l(u){for(var b=[],_=u.length,P=0;P<_;P++)b[P]=r(u[P]);return b}function f(u,b,_,P){for(var M=[],C=b.length,A=0;A=b-.5)return!1;return!0}i.update=function(u){var b=this.scene,_=b.fullSceneLayout;this.data=u;var P=u.x.length,M=n(f(_.xaxis,u.x,b.dataScale[0],u.xcalendar),f(_.yaxis,u.y,b.dataScale[1],u.ycalendar),f(_.zaxis,u.z,b.dataScale[2],u.zcalendar)),C;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,P)||!v(u.j,P)||!v(u.k,P))return;C=n(x(u.i),x(u.j),x(u.k))}else u.alphahull===0?C=S(M):u.alphahull>0?C=I(u.alphahull,M):C=y(u.delaunayaxis,M);var A={positions:M,cells:C,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:r(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var h=a(u);this.color="#fff";var p=u.intensitymode;A[p+"Intensity"]=u.intensity,A[p+"IntensityBounds"]=[h.min,h.max],A.colormap=t(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],A.vertexColors=l(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],A.cellColors=l(u.facecolor)):(this.color=u.color,A.meshColor=r(u.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(u,b){var _=u.glplot.gl,P=c({gl:_}),M=new o(u,P,b.uid);return P._trace=M,M.update(b),u.glplot.add(P),M}Z.exports=T}),LU=Dt((Q,Z)=>{Z.exports={attributes:pb(),supplyDefaults:SU(),calc:EU(),colorbar:{min:"cmin",max:"cmax"},plot:CU(),moduleType:"trace",name:"mesh3d",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),PU=Dt((Q,Z)=>{Z.exports=LU()}),MS=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a={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:I({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),IU=Dt((Q,Z)=>{var c=kn(),g=mc(),I=MS();Z.exports=function(S,t,e,r){function a(v,T){return c.coerce(S,t,I,v,T)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}var y=a("sizemode");a("sizeref",y==="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"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),zU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){for(var S=I.u,t=I.v,e=I.w,r=Math.min(I.x.length,I.y.length,I.z.length,S.length,t.length,e.length),a=-1/0,n=1/0,o=0;o{var c=fp().gl_cone3d,g=fp().gl_cone3d.createConeMesh,I=kn().simpleMap,S=Av().parseColorScale,t=Xc().extractOpts,e=kn().isArrayOrTypedArray,r=mb();function a(y,v){this.scene=y,this.uid=v,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(y){if(y.object===this.mesh){var v=y.index=y.data.index,T=this.data.x[v],u=this.data.y[v],b=this.data.z[v],_=this.data.u[v],P=this.data.v[v],M=this.data.w[v];y.traceCoordinate=[T,u,b,_,P,M,Math.sqrt(_*_+P*P+M*M)];var C=this.data.hovertext||this.data.text;return e(C)&&C[v]!==void 0?y.textLabel=C[v]:C&&(y.textLabel=C),!0}};var o={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},l={tip:1,tail:1,cm:.75,center:.5};function f(y,v){var T=y.fullSceneLayout,u=y.dataScale,b={};function _(h,p){var k=T[p],w=u[o[p]];return I(h,function(R){return k.d2l(R)*w})}b.vectors=r(_(v.u,"xaxis"),_(v.v,"yaxis"),_(v.w,"zaxis"),v._len),b.positions=r(_(v.x,"xaxis"),_(v.y,"yaxis"),_(v.z,"zaxis"),v._len);var P=t(v);b.colormap=S(v),b.vertexIntensityBounds=[P.min/v._normMax,P.max/v._normMax],b.coneOffset=i[v.anchor];var M=v.sizemode;M==="scaled"?b.coneSize=v.sizeref||.5:M==="absolute"?b.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:M==="raw"&&(b.coneSize=v.sizeref),b.coneSizemode=M;var C=c(b),A=v.lightposition;return C.lightPosition=[A.x,A.y,A.z],C.ambient=v.lighting.ambient,C.diffuse=v.lighting.diffuse,C.specular=v.lighting.specular,C.roughness=v.lighting.roughness,C.fresnel=v.lighting.fresnel,C.opacity=v.opacity,v._pad=l[v.anchor]*C.vectorScale*C.coneScale*v._normMax,C}n.update=function(y){this.data=y;var v=f(this.scene,y);this.mesh.update(v)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(y,v){var T=y.glplot.gl,u=f(y,v),b=g(T,u),_=new a(y,v.uid);return _.mesh=b,_.data=v,b._trace=_,y.glplot.add(b),_}Z.exports=x}),DU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"cone",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:MS(),supplyDefaults:IU(),colorbar:{min:"cmin",max:"cmax"},calc:zU(),plot:OU(),eventData:function(c,g){return c.norm=g.traceCoordinate[6],c},meta:{}}}),FU=Dt((Q,Z)=>{Z.exports=DU()}),SS=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a={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:I({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),RU=Dt((Q,Z)=>{var c=kn(),g=mc(),I=SS();Z.exports=function(S,t,e,r){function a(y,v){return c.coerce(S,t,I,y,v)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),BU=Dt((Q,Z)=>{var c=fp().gl_streamtube3d,g=c.createTubeMesh,I=kn(),S=Av().parseColorScale,t=Xc().extractOpts,e=mb(),r={xaxis:0,yaxis:1,zaxis:2};function a(x,y){this.scene=x,this.uid=y,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(x){var y=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(_,P){var M=y[P],C=v[r[P]];return M.l2c(_)/C}if(x.object===this.mesh){var u=x.data.position,b=x.data.velocity;return x.traceCoordinate=[T(u[0],"xaxis"),T(u[1],"yaxis"),T(u[2],"zaxis"),T(b[0],"xaxis"),T(b[1],"yaxis"),T(b[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function o(x){var y=x.length,v;return y>2?v=x.slice(1,y-1):y===2?v=[(x[0]+x[1])/2]:v=x,v}function i(x){var y=x.length;return y===1?[.5,.5]:[x[1]-x[0],x[y-1]-x[y-2]]}function l(x,y){var v=x.fullSceneLayout,T=x.dataScale,u=y._len,b={};function _(st,tt){var dt=v[tt],rt=T[r[tt]];return I.simpleMap(st,function(at){return dt.d2l(at)*rt})}if(b.vectors=e(_(y._u,"xaxis"),_(y._v,"yaxis"),_(y._w,"zaxis"),u),!u)return{positions:[],cells:[]};var P=_(y._Xs,"xaxis"),M=_(y._Ys,"yaxis"),C=_(y._Zs,"zaxis");b.meshgrid=[P,M,C],b.gridFill=y._gridFill;var A=y._slen;if(A)b.startingPositions=e(_(y._startsX,"xaxis"),_(y._startsY,"yaxis"),_(y._startsZ,"zaxis"));else{for(var h=M[0],p=o(P),k=o(C),w=new Array(p.length*k.length),R=0,O=0;O{Z.exports={moduleType:"trace",name:"streamtube",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:SS(),supplyDefaults:RU(),colorbar:{min:"cmin",max:"cmax"},calc:Jk().calc,plot:BU(),eventData:function(c,g){return c.tubex=c.x,c.tubey=c.y,c.tubez=c.z,c.tubeu=g.traceCoordinate[3],c.tubev=g.traceCoordinate[4],c.tubew=g.traceCoordinate[5],c.norm=g.traceCoordinate[6],c.divergence=g.traceCoordinate[7],delete c.x,delete c.y,delete c.z,c},meta:{}}}),jU=Dt((Q,Z)=>{Z.exports=NU()}),vx=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=ef(),e=Ho(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=Yc().overrideAll,i=t.marker,l=t.line,f=i.line;Z.exports=o({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:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:l.color,width:l.width,dash:a},connectgaps:t.connectgaps,marker:n({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:n({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:n({width:f.width},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:S(),selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),UU=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=vx(),a=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(n,o,i,l){function f(P,M){return c.coerce(n,o,r,P,M)}var x=f("locations"),y;if(x&&x.length){var v=f("geojson"),T;(typeof v=="string"&&v!==""||c.isPlainObject(v))&&(T="geojson-id");var u=f("locationmode",T);u==="country names"&&c.warn(a),u==="geojson-id"&&f("featureidkey"),y=x.length}else{var b=f("lon")||[],_=f("lat")||[];y=Math.min(b.length,_.length)}if(!y){o.visible=!1;return}o._length=y,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),g.hasMarkers(o)&&I(n,o,i,l,f,{gradient:!0}),g.hasLines(o)&&(S(n,o,i,l,f),f("connectgaps")),g.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),t(n,o,l,f)),f("fill"),o.fill!=="none"&&e(n,o,i,f),c.coerceSelectionMarkerOpacity(o,f)}}),VU=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.geo]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),tT=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=F0(),S=ct(),t=Bt(),e=kn().isArrayOrTypedArray,r=kn()._;function a(n){return n&&typeof n=="string"}Z.exports=function(n,o){var i=e(o.locations),l=i?o.locations.length:o._length,f=new Array(l),x;o.geojson?x=function(_){return a(_)||c(_)}:x=a;for(var y=0;y{Q.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"},Q.axesNames=["lonaxis","lataxis"],Q.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Q.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Q.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]}},Q.clipPad=.001,Q.precision=.1,Q.landColor="#F0DC82",Q.waterColor="#3399FF",Q.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Q.sphereSVG={type:"Sphere"},Q.fillLayers={ocean:1,land:1,lakes:1},Q.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Q.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Q.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Q.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}),ES=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.topojson=c.topojson||{}))})(Q,function(c){function g(_){return _}function I(_){if(_==null)return g;var P,M,C=_.scale[0],A=_.scale[1],h=_.translate[0],p=_.translate[1];return function(k,w){w||(P=M=0);var R=2,O=k.length,j=new Array(O);for(j[0]=(P+=k[0])*C+h,j[1]=(M+=k[1])*A+p;Rh&&(h=R[0]),R[1]p&&(p=R[1])}function w(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(w);break;case"Point":k(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(k);break}}_.arcs.forEach(function(R){for(var O=-1,j=R.length,V;++Oh&&(h=V[0]),V[1]p&&(p=V[1])});for(M in _.objects)w(_.objects[M]);return[C,A,h,p]}function t(_,P){for(var M,C=_.length,A=C-P;A<--C;)M=_[A],_[A++]=_[C],_[C]=M}function e(_,P){return typeof P=="string"&&(P=_.objects[P]),P.type==="GeometryCollection"?{type:"FeatureCollection",features:P.geometries.map(function(M){return r(_,M)})}:r(_,P)}function r(_,P){var M=P.id,C=P.bbox,A=P.properties==null?{}:P.properties,h=a(_,P);return M==null&&C==null?{type:"Feature",properties:A,geometry:h}:C==null?{type:"Feature",id:M,properties:A,geometry:h}:{type:"Feature",id:M,bbox:C,properties:A,geometry:h}}function a(_,P){var M=I(_.transform),C=_.arcs;function A(O,j){j.length&&j.pop();for(var V=C[O<0?~O:O],H=0,F=V.length;H1)C=l(_,P,M);else for(A=0,C=new Array(h=_.arcs.length);A1)for(var j=1,V=k(R[0]),H,F;jV&&(F=R[0],R[0]=R[j],R[j]=F,V=H);return R}).filter(function(w){return w.length>0})}}function v(_,P){for(var M=0,C=_.length;M>>1;_[A]=2))throw new Error("n must be ≥2");w=_.bbox||S(_);var M=w[0],C=w[1],A=w[2],h=w[3],p;P={scale:[A-M?(A-M)/(p-1):1,h-C?(h-C)/(p-1):1],translate:[M,C]}}else w=_.bbox;var k=u(P),w,R,O=_.objects,j={};function V(U){return k(U)}function H(U){var W;switch(U.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:U.geometries.map(H)};break;case"Point":W={type:"Point",coordinates:V(U.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:U.coordinates.map(V)};break;default:return U}return U.id!=null&&(W.id=U.id),U.bbox!=null&&(W.bbox=U.bbox),U.properties!=null&&(W.properties=U.properties),W}function F(U){var W=0,q=1,J=U.length,lt,yt=new Array(J);for(yt[0]=k(U[0],0);++W{var c=Z.exports={},g=w3().locationmodeToLayer,I=ES().feature;c.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},c.getTopojsonPath=function(S,t){return S+=S.endsWith("/")?"":"/",`${S}${t}.json`},c.getTopojsonFeatures=function(S,t){var e=g[S.locationmode],r=t.objects[e];return I(t,r).features}}),H1=Dt(Q=>{var Z=Ca().BADNUM;Q.calcTraceToLineCoords=function(c){for(var g=c[0].trace,I=g.connectgaps,S=[],t=[],e=0;e0&&(S.push(t),t=[])}return t.length>0&&S.push(t),S},Q.makeLine=function(c){return c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}},Q.makePolygon=function(c){if(c.length===1)return{type:"Polygon",coordinates:c};for(var g=new Array(c.length),I=0;I{Z.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}),rT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=63710088e-1,c={centimeters:Z*100,centimetres:Z*100,degrees:360/(2*Math.PI),feet:Z*3.28084,inches:Z*39.37,kilometers:Z/1e3,kilometres:Z/1e3,meters:Z,metres:Z,miles:Z/1609.344,millimeters:Z*1e3,millimetres:Z*1e3,nauticalmiles:Z/1852,radians:1,yards:Z*1.0936},g={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 I(O,j,V={}){let H={type:"Feature"};return(V.id===0||V.id)&&(H.id=V.id),V.bbox&&(H.bbox=V.bbox),H.properties=j||{},H.geometry=O,H}function S(O,j,V={}){switch(O){case"Point":return t(j).geometry;case"LineString":return n(j).geometry;case"Polygon":return r(j).geometry;case"MultiPoint":return f(j).geometry;case"MultiLineString":return l(j).geometry;case"MultiPolygon":return x(j).geometry;default:throw new Error(O+" is invalid")}}function t(O,j,V={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(O[0])||!p(O[1]))throw new Error("coordinates must contain numbers");return I({type:"Point",coordinates:O},j,V)}function e(O,j,V={}){return i(O.map(H=>t(H,j)),V)}function r(O,j,V={}){for(let H of O){if(H.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(H[H.length-1].length!==H[0].length)throw new Error("First and last Position are not equivalent.");for(let F=0;Fr(H,j)),V)}function n(O,j,V={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return I({type:"LineString",coordinates:O},j,V)}function o(O,j,V={}){return i(O.map(H=>n(H,j)),V)}function i(O,j={}){let V={type:"FeatureCollection"};return j.id&&(V.id=j.id),j.bbox&&(V.bbox=j.bbox),V.features=O,V}function l(O,j,V={}){return I({type:"MultiLineString",coordinates:O},j,V)}function f(O,j,V={}){return I({type:"MultiPoint",coordinates:O},j,V)}function x(O,j,V={}){return I({type:"MultiPolygon",coordinates:O},j,V)}function y(O,j,V={}){return I({type:"GeometryCollection",geometries:O},j,V)}function v(O,j=0){if(j&&!(j>=0))throw new Error("precision must be a positive number");let V=Math.pow(10,j||0);return Math.round(O*V)/V}function T(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O*V}function u(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O/V}function b(O,j){return M(u(O,j))}function _(O){let j=O%360;return j<0&&(j+=360),j}function P(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function M(O){return O%(2*Math.PI)*180/Math.PI}function C(O){return O%360*Math.PI/180}function A(O,j="kilometers",V="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return T(u(O,j),V)}function h(O,j="meters",V="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");let H=g[j];if(!H)throw new Error("invalid original units");let F=g[V];if(!F)throw new Error("invalid final units");return O/H*F}function p(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function k(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function w(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(j=>{if(!p(j))throw new Error("bbox must only contain numbers")})}function R(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}Q.areaFactors=g,Q.azimuthToBearing=P,Q.bearingToAzimuth=_,Q.convertArea=h,Q.convertLength=A,Q.degreesToRadians=C,Q.earthRadius=Z,Q.factors=c,Q.feature=I,Q.featureCollection=i,Q.geometry=S,Q.geometryCollection=y,Q.isNumber=p,Q.isObject=k,Q.lengthToDegrees=b,Q.lengthToRadians=u,Q.lineString=n,Q.lineStrings=o,Q.multiLineString=l,Q.multiPoint=f,Q.multiPolygon=x,Q.point=t,Q.points=e,Q.polygon=r,Q.polygons=a,Q.radiansToDegrees=M,Q.radiansToLength=T,Q.round=v,Q.validateBBox=w,Q.validateId=R}),nT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT();function c(u,b,_){if(u!==null)for(var P,M,C,A,h,p,k,w=0,R=0,O,j=u.type,V=j==="FeatureCollection",H=j==="Feature",F=V?u.features.length:1,U=0;Up||V>k||H>w){h=R,p=P,k=V,w=H,C=0;return}var F=Z.lineString.call(void 0,[h,R],_.properties);if(b(F,P,M,H,C)===!1)return!1;C++,h=R})===!1)return!1}}})}function f(u,b,_){var P=_,M=!1;return l(u,function(C,A,h,p,k){M===!1&&_===void 0?P=C:P=b(P,C,A,h,p,k),M=!0}),P}function x(u,b){if(!u)throw new Error("geojson is required");o(u,function(_,P,M){if(_.geometry!==null){var C=_.geometry.type,A=_.geometry.coordinates;switch(C){case"LineString":if(b(_,P,M,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT(),c=nT();function g(n){return c.geomReduce.call(void 0,n,(o,i)=>o+I(i),0)}function I(n){let o=0,i;switch(n.type){case"Polygon":return S(n.coordinates);case"MultiPolygon":for(i=0;i0){o+=Math.abs(r(n[0]));for(let i=1;i=o?(l+2)%o:l+2],v=f[0]*e,T=x[1]*e,u=y[0]*e;i+=(u-v)*Math.sin(T),l++}return i*t}var a=g;Q.area=g,Q.default=a}),qU=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT(),c=nT();function g(S,t={}){let e=0,r=0,a=0;return c.coordEach.call(void 0,S,function(n){e+=n[0],r+=n[1],a++},!0),Z.point.call(void 0,[e/a,r/a],t.properties)}var I=g;Q.centroid=g,Q.default=I}),$U=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=nT();function c(I,S={}){if(I.bbox!=null&&S.recompute!==!0)return I.bbox;let t=[1/0,1/0,-1/0,-1/0];return Z.coordEach.call(void 0,I,e=>{t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{var c=qr(),g=HU(),{area:I}=WU(),{centroid:S}=qU(),{bbox:t}=$U(),e=w1(),r=as(),a=si(),n=zo(),o=mm(),i=Object.keys(g),l={"ISO-3":e,"USA-states":e,"country names":f};function f(P){for(var M=0;M0&&j[V+1][0]<0)return V;return null}switch(A==="RUS"||A==="FJI"?p=function(j){var V;if(O(j)===null)V=j;else for(V=new Array(j.length),R=0;RV?H[F++]=[j[R][0]+360,j[R][1]]:R===V?(H[F++]=j[R],H[F++]=[j[R][0],-90]):H[F++]=j[R];var U=o.tester(H);U.pts.pop(),h.push(U)}:p=function(j){h.push(o.tester(j))},M.type){case"MultiPolygon":for(k=0;k0?U.properties.ct=u(U):U.properties.ct=[NaN,NaN],H.fIn=j,H.fOut=U,h.push(U)}else r.log(["Location",H.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[V]}switch(C.type){case"FeatureCollection":var R=C.features;for(p=0;ph&&(h=w,C=k)}else C=M;return S(C).geometry.coordinates}function b(P){var M=window.PlotlyGeoAssets||{},C=[];function A(R){return new Promise(function(O,j){c.json(R,function(V,H){if(V){delete M[R];var F=V.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return j(new Error(F))}return M[R]=H,O(H)})})}function h(R){return new Promise(function(O,j){var V=0,H=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(H),O(M[R]);if(V>100)return clearInterval(H),j("Unexpected error while fetching from "+R);V++},50)})}for(var p=0;p{var c=qr(),g=Vs(),I=hi(),S=_l(),t=S.stylePoints,e=S.styleText;Z.exports=function(a,n){n&&r(a,n)};function r(a,n){var o=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),t(i,o,a),e(i,o,a),i.selectAll("path.js-line").style("fill","none").each(function(l){var f=c.select(this),x=l.trace,y=x.line||{};f.call(I.stroke,y.color).call(g.dashLine,y.dash||"",y.width||0),x.fill!=="none"&&f.call(I.fill,x.fillcolor)})}}),LS=Dt((Q,Z)=>{var c=qr(),g=kn(),I=eT().getTopojsonFeatures,S=H1(),t=W1(),e=Y0().findExtremes,r=Ca().BADNUM,a=me().calcMarkerSize,n=Tc(),o=CS();function i(f,x,y){var v=x.layers.frontplot.select(".scatterlayer"),T=g.makeTraceGroups(v,y,"trace scattergeo");function u(b,_){b.lonlat[0]===r&&c.select(_).remove()}T.selectAll("*").remove(),T.each(function(b){var _=c.select(this),P=b[0].trace;if(n.hasLines(P)||P.fill!=="none"){var M=S.calcTraceToLineCoords(b),C=P.fill!=="none"?S.makePolygon(M):S.makeLine(M);_.selectAll("path.js-line").data([{geojson:C,trace:P}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(P)&&_.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(A){u(A,this)}),n.hasText(P)&&_.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(A){u(A,this)}),o(f,b)})}function l(f,x){var y=f[0].trace,v=x[y.geo],T=v._subplot,u=y._length,b,_;if(g.isArrayOrTypedArray(y.locations)){var P=y.locationmode,M=P==="geojson-id"?t.extractTraceFeature(f):I(y,T.topojson);for(b=0;b{var c=tf(),g=Ca().BADNUM,I=Fu(),S=kn().fillText,t=vx();Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.xa,f=r.ya,x=r.subplot,y=x.projection.isLonLatOverEdges,v=x.project;function T(A){var h=A.lonlat;if(h[0]===g||y(h))return 1/0;var p=v(h),k=v([a,n]),w=Math.abs(p[0]-k[0]),R=Math.abs(p[1]-k[1]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(w*w+R*R)-O,1-3/O)}if(c.getClosest(o,T,r),r.index!==!1){var u=o[r.index],b=u.lonlat,_=[l.c2p(b),f.c2p(b)],P=u.mrc||1;r.x0=_[0]-P,r.x1=_[0]+P,r.y0=_[1]-P,r.y1=_[1]+P,r.loc=u.loc,r.lon=b[0],r.lat=b[1];var M={};M[i.geo]={_subplot:x};var C=i._module.formatLabels(u,i,M);return r.lonLabel=C.lonLabel,r.latLabel=C.latLabel,r.color=I(i,u),r.extraText=e(i,u,r,o[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function e(r,a,n,o){if(r.hovertemplate)return;var i=a.hi||r.hoverinfo,l=i==="all"?t.hoverinfo.flags:i.split("+"),f=l.indexOf("location")!==-1&&Array.isArray(r.locations),x=l.indexOf("lon")!==-1,y=l.indexOf("lat")!==-1,v=l.indexOf("text")!==-1,T=[];function u(b){return b+"°"}return f?T.push(a.loc):x&&y?T.push("("+u(n.latLabel)+", "+u(n.lonLabel)+")"):x?T.push(o.lon+u(n.lonLabel)):y&&T.push(o.lat+u(n.latLabel)),v&&S(a,r,T),T.join("
")}}),GU=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.lon=g.lon,c.lat=g.lat,c.location=g.loc?g.loc:null;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c}}),YU=Dt((Q,Z)=>{var c=Tc(),g=Ca().BADNUM;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o,i,l,f,x,y=!c.hasMarkers(n)&&!c.hasText(n);if(y)return[];if(S===!1)for(x=0;x{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){function g(rt,at){return rtat?1:rt>=at?0:NaN}function I(rt){return rt.length===1&&(rt=S(rt)),{left:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)<0?it=ft+1:Y=ft}return it},right:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)>0?Y=ft:it=ft+1}return it}}}function S(rt){return function(at,vt){return g(rt(at),vt)}}var t=I(g),e=t.right,r=t.left;function a(rt,at){at==null&&(at=n);for(var vt=0,it=rt.length-1,Y=rt[0],ft=new Array(it<0?0:it);vtrt?1:at>=rt?0:NaN}function l(rt){return rt===null?NaN:+rt}function f(rt,at){var vt=rt.length,it=0,Y=-1,ft=0,ut,kt,It=0;if(at==null)for(;++Y1)return It/(it-1)}function x(rt,at){var vt=f(rt,at);return vt&&Math.sqrt(vt)}function y(rt,at){var vt=rt.length,it=-1,Y,ft,ut;if(at==null){for(;++it=Y)for(ft=ut=Y;++itY&&(ft=Y),ut=Y)for(ft=ut=Y;++itY&&(ft=Y),ut0)return[rt];if((it=at0)for(rt=Math.ceil(rt/kt),at=Math.floor(at/kt),ut=new Array(ft=Math.ceil(at-rt+1));++Y=0?(ft>=M?10:ft>=C?5:ft>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ft>=M?10:ft>=C?5:ft>=A?2:1)}function k(rt,at,vt){var it=Math.abs(at-rt)/Math.max(0,vt),Y=Math.pow(10,Math.floor(Math.log(it)/Math.LN10)),ft=it/Y;return ft>=M?Y*=10:ft>=C?Y*=5:ft>=A&&(Y*=2),atWt;)Jt.pop(),--ge;var fe=new Array(ge+1),pe;for(ft=0;ft<=ge;++ft)pe=fe[ft]=[],pe.x0=ft>0?Jt[ft-1]:qt,pe.x1=ft=1)return+vt(rt[it-1],it-1,rt);var it,Y=(it-1)*at,ft=Math.floor(Y),ut=+vt(rt[ft],ft,rt),kt=+vt(rt[ft+1],ft+1,rt);return ut+(kt-ut)*(Y-ft)}}function j(rt,at,vt){return rt=u.call(rt,l).sort(g),Math.ceil((vt-at)/(2*(O(rt,.75)-O(rt,.25))*Math.pow(rt.length,-1/3)))}function V(rt,at,vt){return Math.ceil((vt-at)/(3.5*x(rt)*Math.pow(rt.length,-1/3)))}function H(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itft&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itft&&(ft=Y);return ft}function F(rt,at){var vt=rt.length,it=vt,Y=-1,ft,ut=0;if(at==null)for(;++Y=0;)for(ut=rt[at],vt=ut.length;--vt>=0;)ft[--Y]=ut[vt];return ft}function q(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itY&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itY&&(ft=Y);return ft}function J(rt,at){for(var vt=at.length,it=new Array(vt);vt--;)it[vt]=rt[at[vt]];return it}function lt(rt,at){if(vt=rt.length){var vt,it=0,Y=0,ft,ut=rt[Y];for(at==null&&(at=g);++it{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(gr){e(t,gr,this.t),e(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new S;function e(gr,Ur,wn){var hn=gr.s=Ur+wn,qn=hn-Ur,di=hn-qn;gr.t=Ur-di+(wn-qn)}var r=1e-6,a=1e-12,n=Math.PI,o=n/2,i=n/4,l=n*2,f=180/n,x=n/180,y=Math.abs,v=Math.atan,T=Math.atan2,u=Math.cos,b=Math.ceil,_=Math.exp,P=Math.log,M=Math.pow,C=Math.sin,A=Math.sign||function(gr){return gr>0?1:gr<0?-1:0},h=Math.sqrt,p=Math.tan;function k(gr){return gr>1?0:gr<-1?n:Math.acos(gr)}function w(gr){return gr>1?o:gr<-1?-o:Math.asin(gr)}function R(gr){return(gr=C(gr/2))*gr}function O(){}function j(gr,Ur){gr&&H.hasOwnProperty(gr.type)&&H[gr.type](gr,Ur)}var V={Feature:function(gr,Ur){j(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,qn=wn.length;++hn=0?1:-1,qn=hn*wn,di=u(Ur),aa=C(Ur),va=tt*aa,Ba=st*di+va*u(qn),Za=va*hn*C(qn);q.add(T(Za,Ba)),mt=gr,st=di,tt=aa}function Y(gr){return J.reset(),W(gr,dt),J*2}function ft(gr){return[T(gr[1],gr[0]),w(gr[2])]}function ut(gr){var Ur=gr[0],wn=gr[1],hn=u(wn);return[hn*u(Ur),hn*C(Ur),C(wn)]}function kt(gr,Ur){return gr[0]*Ur[0]+gr[1]*Ur[1]+gr[2]*Ur[2]}function It(gr,Ur){return[gr[1]*Ur[2]-gr[2]*Ur[1],gr[2]*Ur[0]-gr[0]*Ur[2],gr[0]*Ur[1]-gr[1]*Ur[0]]}function Pt(gr,Ur){gr[0]+=Ur[0],gr[1]+=Ur[1],gr[2]+=Ur[2]}function qt(gr,Ur){return[gr[0]*Ur,gr[1]*Ur,gr[2]*Ur]}function Wt(gr){var Ur=h(gr[0]*gr[0]+gr[1]*gr[1]+gr[2]*gr[2]);gr[0]/=Ur,gr[1]/=Ur,gr[2]/=Ur}var Jt,ge,fe,pe,se,Tt,Lt,Mt,ee=I(),ve,oe,Te={point:He,lineStart:cr,lineEnd:ur,polygonStart:function(){Te.point=jr,Te.lineStart=Wr,Te.lineEnd=br,ee.reset(),dt.polygonStart()},polygonEnd:function(){dt.polygonEnd(),Te.point=He,Te.lineStart=cr,Te.lineEnd=ur,q<0?(Jt=-(fe=180),ge=-(pe=90)):ee>r?pe=90:ee<-r&&(ge=-90),oe[0]=Jt,oe[1]=fe},sphere:function(){Jt=-(fe=180),ge=-(pe=90)}};function He(gr,Ur){ve.push(oe=[Jt=gr,fe=gr]),Urpe&&(pe=Ur)}function Ge(gr,Ur){var wn=ut([gr*x,Ur*x]);if(Mt){var hn=It(Mt,wn),qn=[hn[1],-hn[0],0],di=It(qn,hn);Wt(di),di=ft(di);var aa=gr-se,va=aa>0?1:-1,Ba=di[0]*f*va,Za,ca=y(aa)>180;ca^(va*sepe&&(pe=Za)):(Ba=(Ba+360)%360-180,ca^(va*sepe&&(pe=Ur))),ca?grXr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr):fe>=Jt?(grfe&&(fe=gr)):gr>se?Xr(Jt,gr)>Xr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr)}else ve.push(oe=[Jt=gr,fe=gr]);Urpe&&(pe=Ur),Mt=wn,se=gr}function cr(){Te.point=Ge}function ur(){oe[0]=Jt,oe[1]=fe,Te.point=He,Mt=null}function jr(gr,Ur){if(Mt){var wn=gr-se;ee.add(y(wn)>180?wn+(wn>0?360:-360):wn)}else Tt=gr,Lt=Ur;dt.point(gr,Ur),Ge(gr,Ur)}function Wr(){dt.lineStart()}function br(){jr(Tt,Lt),dt.lineEnd(),y(ee)>r&&(Jt=-(fe=180)),oe[0]=Jt,oe[1]=fe,Mt=null}function Xr(gr,Ur){return(Ur-=gr)<0?Ur+360:Ur}function nn(gr,Ur){return gr[0]-Ur[0]}function Le(gr,Ur){return gr[0]<=gr[1]?gr[0]<=Ur&&Ur<=gr[1]:UrXr(hn[0],hn[1])&&(hn[1]=qn[1]),Xr(qn[0],hn[1])>Xr(hn[0],hn[1])&&(hn[0]=qn[0])):di.push(hn=qn);for(aa=-1/0,wn=di.length-1,Ur=0,hn=di[wn];Ur<=wn;hn=qn,++Ur)qn=di[Ur],(va=Xr(hn[1],qn[0]))>aa&&(aa=va,Jt=qn[0],fe=hn[1])}return ve=oe=null,Jt===1/0||ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Jt,ge],[fe,pe]]}var ne,Ct,gt,St,Nt,re,le,we,Ue,qe,or,Sr,Ar,mr,Qr,Hn,Wn={sphere:O,point:Xn,lineStart:oi,lineEnd:Zi,polygonStart:function(){Wn.lineStart=We,Wn.lineEnd=nr},polygonEnd:function(){Wn.lineStart=oi,Wn.lineEnd=Zi}};function Xn(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);Ii(wn*u(gr),wn*C(gr),C(Ur))}function Ii(gr,Ur,wn){++ne,gt+=(gr-gt)/ne,St+=(Ur-St)/ne,Nt+=(wn-Nt)/ne}function oi(){Wn.point=$n}function $n(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Hn=C(Ur),Wn.point=sa,Ii(mr,Qr,Hn)}function sa(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),qn=wn*C(gr),di=C(Ur),aa=T(h((aa=Qr*di-Hn*qn)*aa+(aa=Hn*hn-mr*di)*aa+(aa=mr*qn-Qr*hn)*aa),mr*hn+Qr*qn+Hn*di);Ct+=aa,re+=aa*(mr+(mr=hn)),le+=aa*(Qr+(Qr=qn)),we+=aa*(Hn+(Hn=di)),Ii(mr,Qr,Hn)}function Zi(){Wn.point=Xn}function We(){Wn.point=fr}function nr(){_r(Sr,Ar),Wn.point=Xn}function fr(gr,Ur){Sr=gr,Ar=Ur,gr*=x,Ur*=x,Wn.point=_r;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Hn=C(Ur),Ii(mr,Qr,Hn)}function _r(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),qn=wn*C(gr),di=C(Ur),aa=Qr*di-Hn*qn,va=Hn*hn-mr*di,Ba=mr*qn-Qr*hn,Za=h(aa*aa+va*va+Ba*Ba),ca=w(Za),Oa=Za&&-ca/Za;Ue+=Oa*aa,qe+=Oa*va,or+=Oa*Ba,Ct+=ca,re+=ca*(mr+(mr=hn)),le+=ca*(Qr+(Qr=qn)),we+=ca*(Hn+(Hn=di)),Ii(mr,Qr,Hn)}function tn(gr){ne=Ct=gt=St=Nt=re=le=we=Ue=qe=or=0,W(gr,Wn);var Ur=Ue,wn=qe,hn=or,qn=Ur*Ur+wn*wn+hn*hn;return qnn?gr+Math.round(-gr/l)*l:gr,Ur]}Mn.invert=Mn;function fi(gr,Ur,wn){return(gr%=l)?Ur||wn?Tn(Oi(gr),ji(Ur,wn)):Oi(gr):Ur||wn?ji(Ur,wn):Mn}function ki(gr){return function(Ur,wn){return Ur+=gr,[Ur>n?Ur-l:Ur<-n?Ur+l:Ur,wn]}}function Oi(gr){var Ur=ki(gr);return Ur.invert=ki(-gr),Ur}function ji(gr,Ur){var wn=u(gr),hn=C(gr),qn=u(Ur),di=C(Ur);function aa(va,Ba){var Za=u(Ba),ca=u(va)*Za,Oa=C(va)*Za,ka=C(Ba),na=ka*wn+ca*hn;return[T(Oa*qn-na*di,ca*wn-ka*hn),w(na*qn+Oa*di)]}return aa.invert=function(va,Ba){var Za=u(Ba),ca=u(va)*Za,Oa=C(va)*Za,ka=C(Ba),na=ka*qn-Oa*di;return[T(Oa*qn+ka*di,ca*wn+na*hn),w(na*wn-ca*hn)]},aa}function Xi(gr){gr=fi(gr[0]*x,gr[1]*x,gr.length>2?gr[2]*x:0);function Ur(wn){return wn=gr(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn}return Ur.invert=function(wn){return wn=gr.invert(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn},Ur}function ci(gr,Ur,wn,hn,qn,di){if(wn){var aa=u(Ur),va=C(Ur),Ba=hn*wn;qn==null?(qn=Ur+hn*l,di=Ur-Ba/2):(qn=za(aa,qn),di=za(aa,di),(hn>0?qndi)&&(qn+=hn*l));for(var Za,ca=qn;hn>0?ca>di:ca1&&gr.push(gr.pop().concat(gr.shift()))},result:function(){var wn=gr;return gr=[],Ur=null,wn}}}function Ie(gr,Ur){return y(gr[0]-Ur[0])=0;--va)qn.point((Oa=ca[va])[0],Oa[1]);else hn(ka.x,ka.p.x,-1,qn);ka=ka.p}ka=ka.o,ca=ka.z,na=!na}while(!ka.v);qn.lineEnd()}}}function Gr(gr){if(Ur=gr.length){for(var Ur,wn=0,hn=gr[0],qn;++wn=0?1:-1,$l=su*Pl,lu=$l>n,ml=ns*gs;if(Br.add(T(ml*su*C($l),Ko*el+ml*u($l))),aa+=lu?Pl+su*l:Pl,lu^na>=wn^oo>=wn){var qu=It(ut(ka),ut(ps));Wt(qu);var Iu=It(di,qu);Wt(Iu);var fu=(lu^Pl>=0?-1:1)*w(Iu[2]);(hn>fu||hn===fu&&(qu[0]||qu[1]))&&(va+=lu^Pl>=0?1:-1)}}return(aa<-r||aa0){for(Ba||(qn.polygonStart(),Ba=!0),qn.lineStart(),el=0;el1&&qa&2&&gs.push(gs.pop().concat(gs.shift())),ca.push(gs.filter(Ce))}}return ka}}function Ce(gr){return gr.length>1}function dr(gr,Ur){return((gr=gr.x)[0]<0?gr[1]-o-r:o-gr[1])-((Ur=Ur.x)[0]<0?Ur[1]-o-r:o-Ur[1])}var Hr=on(function(){return!0},_n,Qn,[-n,-o]);function _n(gr){var Ur=NaN,wn=NaN,hn=NaN,qn;return{lineStart:function(){gr.lineStart(),qn=1},point:function(di,aa){var va=di>0?n:-n,Ba=y(di-Ur);y(Ba-n)0?o:-o),gr.point(hn,wn),gr.lineEnd(),gr.lineStart(),gr.point(va,wn),gr.point(di,wn),qn=0):hn!==va&&Ba>=n&&(y(Ur-hn)r?v((C(Ur)*(di=u(hn))*C(wn)-C(hn)*(qn=u(Ur))*C(gr))/(qn*di*aa)):(Ur+hn)/2}function Qn(gr,Ur,wn,hn){var qn;if(gr==null)qn=wn*o,hn.point(-n,qn),hn.point(0,qn),hn.point(n,qn),hn.point(n,0),hn.point(n,-qn),hn.point(0,-qn),hn.point(-n,-qn),hn.point(-n,0),hn.point(-n,qn);else if(y(gr[0]-Ur[0])>r){var di=gr[0]0,qn=y(Ur)>r;function di(ca,Oa,ka,na){ci(na,gr,wn,ka,ca,Oa)}function aa(ca,Oa){return u(ca)*u(Oa)>Ur}function va(ca){var Oa,ka,na,io,ns;return{lineStart:function(){io=na=!1,ns=1},point:function(Ko,ls){var ps=[Ko,ls],oo,qa=aa(Ko,ls),gs=hn?qa?0:Za(Ko,ls):qa?Za(Ko+(Ko<0?n:-n),ls):0;if(!Oa&&(io=na=qa)&&ca.lineStart(),qa!==na&&(oo=Ba(Oa,ps),(!oo||Ie(Oa,oo)||Ie(ps,oo))&&(ps[2]=1)),qa!==na)ns=0,qa?(ca.lineStart(),oo=Ba(ps,Oa),ca.point(oo[0],oo[1])):(oo=Ba(Oa,ps),ca.point(oo[0],oo[1],2),ca.lineEnd()),Oa=oo;else if(qn&&Oa&&hn^qa){var el;!(gs&ka)&&(el=Ba(ps,Oa,!0))&&(ns=0,hn?(ca.lineStart(),ca.point(el[0][0],el[0][1]),ca.point(el[1][0],el[1][1]),ca.lineEnd()):(ca.point(el[1][0],el[1][1]),ca.lineEnd(),ca.lineStart(),ca.point(el[0][0],el[0][1],3)))}qa&&(!Oa||!Ie(Oa,ps))&&ca.point(ps[0],ps[1]),Oa=ps,na=qa,ka=gs},lineEnd:function(){na&&ca.lineEnd(),Oa=null},clean:function(){return ns|(io&&na)<<1}}}function Ba(ca,Oa,ka){var na=ut(ca),io=ut(Oa),ns=[1,0,0],Ko=It(na,io),ls=kt(Ko,Ko),ps=Ko[0],oo=ls-ps*ps;if(!oo)return!ka&&ca;var qa=Ur*ls/oo,gs=-Ur*ps/oo,el=It(ns,Ko),Pl=qt(ns,qa),su=qt(Ko,gs);Pt(Pl,su);var $l=el,lu=kt(Pl,$l),ml=kt($l,$l),qu=lu*lu-ml*(kt(Pl,Pl)-1);if(!(qu<0)){var Iu=h(qu),fu=qt($l,(-lu-Iu)/ml);if(Pt(fu,Pl),fu=ft(fu),!ka)return fu;var Oo=ca[0],Es=Oa[0],Kl=ca[1],Rl=Oa[1],vc;Es0^fu[1]<(y(fu[0]-Oo)n^(Oo<=fu[0]&&fu[0]<=Es)){var Wc=qt($l,(-lu+Iu)/ml);return Pt(Wc,Pl),[fu,ft(Wc)]}}}function Za(ca,Oa){var ka=hn?gr:n-gr,na=0;return ca<-ka?na|=1:ca>ka&&(na|=2),Oa<-ka?na|=4:Oa>ka&&(na|=8),na}return on(aa,va,di,hn?[0,-gr]:[-n,gr-n])}function En(gr,Ur,wn,hn,qn,di){var aa=gr[0],va=gr[1],Ba=Ur[0],Za=Ur[1],ca=0,Oa=1,ka=Ba-aa,na=Za-va,io;if(io=wn-aa,!(!ka&&io>0)){if(io/=ka,ka<0){if(io0){if(io>Oa)return;io>ca&&(ca=io)}if(io=qn-aa,!(!ka&&io<0)){if(io/=ka,ka<0){if(io>Oa)return;io>ca&&(ca=io)}else if(ka>0){if(io0)){if(io/=na,na<0){if(io0){if(io>Oa)return;io>ca&&(ca=io)}if(io=di-va,!(!na&&io<0)){if(io/=na,na<0){if(io>Oa)return;io>ca&&(ca=io)}else if(na>0){if(io0&&(gr[0]=aa+ca*ka,gr[1]=va+ca*na),Oa<1&&(Ur[0]=aa+Oa*ka,Ur[1]=va+Oa*na),!0}}}}}var Zn=1e9,La=-Zn;function Vi(gr,Ur,wn,hn){function qn(Za,ca){return gr<=Za&&Za<=wn&&Ur<=ca&&ca<=hn}function di(Za,ca,Oa,ka){var na=0,io=0;if(Za==null||(na=aa(Za,Oa))!==(io=aa(ca,Oa))||Ba(Za,ca)<0^Oa>0)do ka.point(na===0||na===3?gr:wn,na>1?hn:Ur);while((na=(na+Oa+4)%4)!==io);else ka.point(ca[0],ca[1])}function aa(Za,ca){return y(Za[0]-gr)0?0:3:y(Za[0]-wn)0?2:1:y(Za[1]-Ur)0?1:0:ca>0?3:2}function va(Za,ca){return Ba(Za.x,ca.x)}function Ba(Za,ca){var Oa=aa(Za,1),ka=aa(ca,1);return Oa!==ka?Oa-ka:Oa===0?ca[1]-Za[1]:Oa===1?Za[0]-ca[0]:Oa===2?Za[1]-ca[1]:ca[0]-Za[0]}return function(Za){var ca=Za,Oa=ze(),ka,na,io,ns,Ko,ls,ps,oo,qa,gs,el,Pl={point:su,lineStart:qu,lineEnd:Iu,polygonStart:lu,polygonEnd:ml};function su(Oo,Es){qn(Oo,Es)&&ca.point(Oo,Es)}function $l(){for(var Oo=0,Es=0,Kl=na.length;Eshn&&(zh-Ih)*(hn-Wc)>(Du-Wc)*(gr-Ih)&&++Oo:Du<=hn&&(zh-Ih)*(hn-Wc)<(Du-Wc)*(gr-Ih)&&--Oo;return Oo}function lu(){ca=Oa,ka=[],na=[],el=!0}function ml(){var Oo=$l(),Es=el&&Oo,Kl=(ka=g.merge(ka)).length;(Es||Kl)&&(Za.polygonStart(),Es&&(Za.lineStart(),di(null,null,1,Za),Za.lineEnd()),Kl&&$r(ka,va,Oo,di,Za),Za.polygonEnd()),ca=Za,ka=na=io=null}function qu(){Pl.point=fu,na&&na.push(io=[]),gs=!0,qa=!1,ps=oo=NaN}function Iu(){ka&&(fu(ns,Ko),ls&&qa&&Oa.rejoin(),ka.push(Oa.result())),Pl.point=su,qa&&ca.lineEnd()}function fu(Oo,Es){var Kl=qn(Oo,Es);if(na&&io.push([Oo,Es]),gs)ns=Oo,Ko=Es,ls=Kl,gs=!1,Kl&&(ca.lineStart(),ca.point(Oo,Es));else if(Kl&&qa)ca.point(Oo,Es);else{var Rl=[ps=Math.max(La,Math.min(Zn,ps)),oo=Math.max(La,Math.min(Zn,oo))],vc=[Oo=Math.max(La,Math.min(Zn,Oo)),Es=Math.max(La,Math.min(Zn,Es))];En(Rl,vc,gr,Ur,wn,hn)?(qa||(ca.lineStart(),ca.point(Rl[0],Rl[1])),ca.point(vc[0],vc[1]),Kl||ca.lineEnd(),el=!1):Kl&&(ca.lineStart(),ca.point(Oo,Es),el=!1)}ps=Oo,oo=Es,qa=Kl}return Pl}}function Qa(){var gr=0,Ur=0,wn=960,hn=500,qn,di,aa;return aa={stream:function(va){return qn&&di===va?qn:qn=Vi(gr,Ur,wn,hn)(di=va)},extent:function(va){return arguments.length?(gr=+va[0][0],Ur=+va[0][1],wn=+va[1][0],hn=+va[1][1],qn=di=null,aa):[[gr,Ur],[wn,hn]]}}}var Ja=I(),Do,yo,Fo,Da={sphere:O,point:O,lineStart:ys,lineEnd:O,polygonStart:O,polygonEnd:O};function ys(){Da.point=ul,Da.lineEnd=os}function os(){Da.point=Da.lineEnd=O}function ul(gr,Ur){gr*=x,Ur*=x,Do=gr,yo=C(Ur),Fo=u(Ur),Da.point=Zo}function Zo(gr,Ur){gr*=x,Ur*=x;var wn=C(Ur),hn=u(Ur),qn=y(gr-Do),di=u(qn),aa=C(qn),va=hn*aa,Ba=Fo*wn-yo*hn*di,Za=yo*wn+Fo*hn*di;Ja.add(T(h(va*va+Ba*Ba),Za)),Do=gr,yo=wn,Fo=hn}function Ks(gr){return Ja.reset(),W(gr,Da),+Ja}var ss=[null,null],cl={type:"LineString",coordinates:ss};function Qs(gr,Ur){return ss[0]=gr,ss[1]=Ur,Ks(cl)}var Nl={Feature:function(gr,Ur){return Ps(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,qn=wn.length;++hn0&&(qn=Qs(gr[di],gr[di-1]),qn>0&&wn<=qn&&hn<=qn&&(wn+hn-qn)*(1-Math.pow((wn-hn)/qn,2))r}).map(ka)).concat(g.range(b(di/Za)*Za,qn,Za).filter(function(oo){return y(oo%Oa)>r}).map(na))}return ls.lines=function(){return ps().map(function(oo){return{type:"LineString",coordinates:oo}})},ls.outline=function(){return{type:"Polygon",coordinates:[io(hn).concat(ns(aa).slice(1),io(wn).reverse().slice(1),ns(va).reverse().slice(1))]}},ls.extent=function(oo){return arguments.length?ls.extentMajor(oo).extentMinor(oo):ls.extentMinor()},ls.extentMajor=function(oo){return arguments.length?(hn=+oo[0][0],wn=+oo[1][0],va=+oo[0][1],aa=+oo[1][1],hn>wn&&(oo=hn,hn=wn,wn=oo),va>aa&&(oo=va,va=aa,aa=oo),ls.precision(Ko)):[[hn,va],[wn,aa]]},ls.extentMinor=function(oo){return arguments.length?(Ur=+oo[0][0],gr=+oo[1][0],di=+oo[0][1],qn=+oo[1][1],Ur>gr&&(oo=Ur,Ur=gr,gr=oo),di>qn&&(oo=di,di=qn,qn=oo),ls.precision(Ko)):[[Ur,di],[gr,qn]]},ls.step=function(oo){return arguments.length?ls.stepMajor(oo).stepMinor(oo):ls.stepMinor()},ls.stepMajor=function(oo){return arguments.length?(ca=+oo[0],Oa=+oo[1],ls):[ca,Oa]},ls.stepMinor=function(oo){return arguments.length?(Ba=+oo[0],Za=+oo[1],ls):[Ba,Za]},ls.precision=function(oo){return arguments.length?(Ko=+oo,ka=Pa(di,qn,90),na=fo(Ur,gr,Ko),io=Pa(va,aa,90),ns=fo(hn,wn,Ko),ls):Ko},ls.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Ql(){return qs()()}function Xo(gr,Ur){var wn=gr[0]*x,hn=gr[1]*x,qn=Ur[0]*x,di=Ur[1]*x,aa=u(hn),va=C(hn),Ba=u(di),Za=C(di),ca=aa*u(wn),Oa=aa*C(wn),ka=Ba*u(qn),na=Ba*C(qn),io=2*w(h(R(di-hn)+aa*Ba*R(qn-wn))),ns=C(io),Ko=io?function(ls){var ps=C(ls*=io)/ns,oo=C(io-ls)/ns,qa=oo*ca+ps*ka,gs=oo*Oa+ps*na,el=oo*va+ps*Za;return[T(gs,qa)*f,T(el,h(qa*qa+gs*gs))*f]}:function(){return[wn*f,hn*f]};return Ko.distance=io,Ko}function Gl(gr){return gr}var al=I(),Cl=I(),Ru,lo,Ms,Is,ou={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ou.lineStart=hl,ou.lineEnd=Gu},polygonEnd:function(){ou.lineStart=ou.lineEnd=ou.point=O,al.add(y(Cl)),Cl.reset()},result:function(){var gr=al/2;return al.reset(),gr}};function hl(){ou.point=ts}function ts(gr,Ur){ou.point=Su,Ru=Ms=gr,lo=Is=Ur}function Su(gr,Ur){Cl.add(Is*gr-Ms*Ur),Ms=gr,Is=Ur}function Gu(){Su(Ru,lo)}var bl=1/0,Dl=bl,tu=-bl,nu=tu,ac={point:mh,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var gr=[[bl,Dl],[tu,nu]];return tu=nu=-(Dl=bl=1/0),gr}};function mh(gr,Ur){grtu&&(tu=gr),Urnu&&(nu=Ur)}var Jc=0,ah=0,Bf=0,Sf=0,Fl=0,Bc=0,Nf=0,hc=0,oc=0,fc,oh,cu,sc,rl={point:Yl,lineStart:Sh,lineEnd:_u,polygonStart:function(){rl.lineStart=Ed,rl.lineEnd=tl},polygonEnd:function(){rl.point=Yl,rl.lineStart=Sh,rl.lineEnd=_u},result:function(){var gr=oc?[Nf/oc,hc/oc]:Bc?[Sf/Bc,Fl/Bc]:Bf?[Jc/Bf,ah/Bf]:[NaN,NaN];return Jc=ah=Bf=Sf=Fl=Bc=Nf=hc=oc=0,gr}};function Yl(gr,Ur){Jc+=gr,ah+=Ur,++Bf}function Sh(){rl.point=Cc}function Cc(gr,Ur){rl.point=Uh,Yl(cu=gr,sc=Ur)}function Uh(gr,Ur){var wn=gr-cu,hn=Ur-sc,qn=h(wn*wn+hn*hn);Sf+=qn*(cu+gr)/2,Fl+=qn*(sc+Ur)/2,Bc+=qn,Yl(cu=gr,sc=Ur)}function _u(){rl.point=Yl}function Ed(){rl.point=Vd}function tl(){Ll(fc,oh)}function Vd(gr,Ur){rl.point=Ll,Yl(fc=cu=gr,oh=sc=Ur)}function Ll(gr,Ur){var wn=gr-cu,hn=Ur-sc,qn=h(wn*wn+hn*hn);Sf+=qn*(cu+gr)/2,Fl+=qn*(sc+Ur)/2,Bc+=qn,qn=sc*gr-cu*Ur,Nf+=qn*(cu+gr),hc+=qn*(sc+Ur),oc+=qn*3,Yl(cu=gr,sc=Ur)}function Qo(gr){this._context=gr}Qo.prototype={_radius:4.5,pointRadius:function(gr){return this._radius=gr,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(gr,Ur){switch(this._point){case 0:{this._context.moveTo(gr,Ur),this._point=1;break}case 1:{this._context.lineTo(gr,Ur);break}default:{this._context.moveTo(gr+this._radius,Ur),this._context.arc(gr,Ur,this._radius,0,l);break}}},result:O};var lf=I(),sh,rc,jf,Vh,yf,lc={point:O,lineStart:function(){lc.point=hd},lineEnd:function(){sh&&Zf(rc,jf),lc.point=O},polygonStart:function(){sh=!0},polygonEnd:function(){sh=null},result:function(){var gr=+lf;return lf.reset(),gr}};function hd(gr,Ur){lc.point=Zf,rc=Vh=gr,jf=yf=Ur}function Zf(gr,Ur){Vh-=gr,yf-=Ur,lf.add(h(Vh*Vh+yf*yf)),Vh=gr,yf=Ur}function xf(){this._string=[]}xf.prototype={_radius:4.5,_circle:Hh(4.5),pointRadius:function(gr){return(gr=+gr)!==this._radius&&(this._radius=gr,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(gr,Ur){switch(this._point){case 0:{this._string.push("M",gr,",",Ur),this._point=1;break}case 1:{this._string.push("L",gr,",",Ur);break}default:{this._circle==null&&(this._circle=Hh(this._radius)),this._string.push("M",gr,",",Ur,this._circle);break}}},result:function(){if(this._string.length){var gr=this._string.join("");return this._string=[],gr}else return null}};function Hh(gr){return"m0,"+gr+"a"+gr+","+gr+" 0 1,1 0,"+-2*gr+"a"+gr+","+gr+" 0 1,1 0,"+2*gr+"z"}function Uf(gr,Ur){var wn=4.5,hn,qn;function di(aa){return aa&&(typeof wn=="function"&&qn.pointRadius(+wn.apply(this,arguments)),W(aa,hn(qn))),qn.result()}return di.area=function(aa){return W(aa,hn(ou)),ou.result()},di.measure=function(aa){return W(aa,hn(lc)),lc.result()},di.bounds=function(aa){return W(aa,hn(ac)),ac.result()},di.centroid=function(aa){return W(aa,hn(rl)),rl.result()},di.projection=function(aa){return arguments.length?(hn=aa==null?(gr=null,Gl):(gr=aa).stream,di):gr},di.context=function(aa){return arguments.length?(qn=aa==null?(Ur=null,new xf):new Qo(Ur=aa),typeof wn!="function"&&qn.pointRadius(wn),di):Ur},di.pointRadius=function(aa){return arguments.length?(wn=typeof aa=="function"?aa:(qn.pointRadius(+aa),+aa),di):wn},di.projection(gr).context(Ur)}function Vf(gr){return{stream:lh(gr)}}function lh(gr){return function(Ur){var wn=new Gf;for(var hn in gr)wn[hn]=gr[hn];return wn.stream=Ur,wn}}function Gf(){}Gf.prototype={constructor:Gf,point:function(gr,Ur){this.stream.point(gr,Ur)},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 Eh(gr,Ur,wn){var hn=gr.clipExtent&&gr.clipExtent();return gr.scale(150).translate([0,0]),hn!=null&&gr.clipExtent(null),W(wn,gr.stream(ac)),Ur(ac.result()),hn!=null&&gr.clipExtent(hn),gr}function gh(gr,Ur,wn){return Eh(gr,function(hn){var qn=Ur[1][0]-Ur[0][0],di=Ur[1][1]-Ur[0][1],aa=Math.min(qn/(hn[1][0]-hn[0][0]),di/(hn[1][1]-hn[0][1])),va=+Ur[0][0]+(qn-aa*(hn[1][0]+hn[0][0]))/2,Ba=+Ur[0][1]+(di-aa*(hn[1][1]+hn[0][1]))/2;gr.scale(150*aa).translate([va,Ba])},wn)}function uc(gr,Ur,wn){return gh(gr,[[0,0],Ur],wn)}function rf(gr,Ur,wn){return Eh(gr,function(hn){var qn=+Ur,di=qn/(hn[1][0]-hn[0][0]),aa=(qn-di*(hn[1][0]+hn[0][0]))/2,va=-di*hn[0][1];gr.scale(150*di).translate([aa,va])},wn)}function Hf(gr,Ur,wn){return Eh(gr,function(hn){var qn=+Ur,di=qn/(hn[1][1]-hn[0][1]),aa=-di*hn[0][0],va=(qn-di*(hn[1][1]+hn[0][1]))/2;gr.scale(150*di).translate([aa,va])},wn)}var eu=16,Ef=u(30*x);function Cd(gr,Ur){return+Ur?_f(gr,Ur):Yf(gr)}function Yf(gr){return lh({point:function(Ur,wn){Ur=gr(Ur,wn),this.stream.point(Ur[0],Ur[1])}})}function _f(gr,Ur){function wn(hn,qn,di,aa,va,Ba,Za,ca,Oa,ka,na,io,ns,Ko){var ls=Za-hn,ps=ca-qn,oo=ls*ls+ps*ps;if(oo>4*Ur&&ns--){var qa=aa+ka,gs=va+na,el=Ba+io,Pl=h(qa*qa+gs*gs+el*el),su=w(el/=Pl),$l=y(y(el)-1)Ur||y((ls*Iu+ps*fu)/oo-.5)>.3||aa*ka+va*na+Ba*io2?Oo[2]%360*x:0,Iu()):[va*f,Ba*f,Za*f]},ml.angle=function(Oo){return arguments.length?(Oa=Oo%360*x,Iu()):Oa*f},ml.reflectX=function(Oo){return arguments.length?(ka=Oo?-1:1,Iu()):ka<0},ml.reflectY=function(Oo){return arguments.length?(na=Oo?-1:1,Iu()):na<0},ml.precision=function(Oo){return arguments.length?(el=Cd(Pl,gs=Oo*Oo),fu()):h(gs)},ml.fitExtent=function(Oo,Es){return gh(ml,Oo,Es)},ml.fitSize=function(Oo,Es){return uc(ml,Oo,Es)},ml.fitWidth=function(Oo,Es){return rf(ml,Oo,Es)},ml.fitHeight=function(Oo,Es){return Hf(ml,Oo,Es)};function Iu(){var Oo=Ou(wn,0,0,ka,na,Oa).apply(null,Ur(di,aa)),Es=(Oa?Ou:Xf)(wn,hn-Oo[0],qn-Oo[1],ka,na,Oa);return ca=fi(va,Ba,Za),Pl=Tn(Ur,Es),su=Tn(ca,Pl),el=Cd(Pl,gs),fu()}function fu(){return $l=lu=null,ml}return function(){return Ur=gr.apply(this,arguments),ml.invert=Ur.invert&&qu,Iu()}}function hu(gr){var Ur=0,wn=n/3,hn=Wh(gr),qn=hn(Ur,wn);return qn.parallels=function(di){return arguments.length?hn(Ur=di[0]*x,wn=di[1]*x):[Ur*f,wn*f]},qn}function Ch(gr){var Ur=u(gr);function wn(hn,qn){return[hn*Ur,C(qn)/Ur]}return wn.invert=function(hn,qn){return[hn/Ur,w(qn*Ur)]},wn}function Mc(gr,Ur){var wn=C(gr),hn=(wn+C(Ur))/2;if(y(hn)=.12&&Ko<.234&&ns>=-.425&&ns<-.214?qn:Ko>=.166&&Ko<.234&&ns>=-.214&&ns<-.115?aa:wn).invert(ka)},ca.stream=function(ka){return gr&&Ur===ka?gr:gr=uf([wn.stream(Ur=ka),qn.stream(ka),aa.stream(ka)])},ca.precision=function(ka){return arguments.length?(wn.precision(ka),qn.precision(ka),aa.precision(ka),Oa()):wn.precision()},ca.scale=function(ka){return arguments.length?(wn.scale(ka),qn.scale(ka*.35),aa.scale(ka),ca.translate(wn.translate())):wn.scale()},ca.translate=function(ka){if(!arguments.length)return wn.translate();var na=wn.scale(),io=+ka[0],ns=+ka[1];return hn=wn.translate(ka).clipExtent([[io-.455*na,ns-.238*na],[io+.455*na,ns+.238*na]]).stream(Za),di=qn.translate([io-.307*na,ns+.201*na]).clipExtent([[io-.425*na+r,ns+.12*na+r],[io-.214*na-r,ns+.234*na-r]]).stream(Za),va=aa.translate([io-.205*na,ns+.212*na]).clipExtent([[io-.214*na+r,ns+.166*na+r],[io-.115*na-r,ns+.234*na-r]]).stream(Za),Oa()},ca.fitExtent=function(ka,na){return gh(ca,ka,na)},ca.fitSize=function(ka,na){return uc(ca,ka,na)},ca.fitWidth=function(ka,na){return rf(ca,ka,na)},ca.fitHeight=function(ka,na){return Hf(ca,ka,na)};function Oa(){return gr=Ur=null,ca}return ca.scale(1070)}function qh(gr){return function(Ur,wn){var hn=u(Ur),qn=u(wn),di=gr(hn*qn);return[di*qn*C(Ur),di*C(wn)]}}function Cf(gr){return function(Ur,wn){var hn=h(Ur*Ur+wn*wn),qn=gr(hn),di=C(qn),aa=u(qn);return[T(Ur*di,hn*aa),w(hn&&wn*di/hn)]}}var Ld=qh(function(gr){return h(2/(1+gr))});Ld.invert=Cf(function(gr){return 2*w(gr/2)});function Jd(){return jc(Ld).scale(124.75).clipAngle(180-.001)}var cf=qh(function(gr){return(gr=k(gr))&&gr/C(gr)});cf.invert=Cf(function(gr){return gr});function Lf(){return jc(cf).scale(79.4188).clipAngle(180-.001)}function wc(gr,Ur){return[gr,P(p((o+Ur)/2))]}wc.invert=function(gr,Ur){return[gr,2*v(_(Ur))-o]};function hf(){return Qc(wc).scale(961/l)}function Qc(gr){var Ur=jc(gr),wn=Ur.center,hn=Ur.scale,qn=Ur.translate,di=Ur.clipExtent,aa=null,va,Ba,Za;Ur.scale=function(Oa){return arguments.length?(hn(Oa),ca()):hn()},Ur.translate=function(Oa){return arguments.length?(qn(Oa),ca()):qn()},Ur.center=function(Oa){return arguments.length?(wn(Oa),ca()):wn()},Ur.clipExtent=function(Oa){return arguments.length?(Oa==null?aa=va=Ba=Za=null:(aa=+Oa[0][0],va=+Oa[0][1],Ba=+Oa[1][0],Za=+Oa[1][1]),ca()):aa==null?null:[[aa,va],[Ba,Za]]};function ca(){var Oa=n*hn(),ka=Ur(Xi(Ur.rotate()).invert([0,0]));return di(aa==null?[[ka[0]-Oa,ka[1]-Oa],[ka[0]+Oa,ka[1]+Oa]]:gr===wc?[[Math.max(ka[0]-Oa,aa),va],[Math.min(ka[0]+Oa,Ba),Za]]:[[aa,Math.max(ka[1]-Oa,va)],[Ba,Math.min(ka[1]+Oa,Za)]])}return ca()}function ff(gr){return p((o+gr)/2)}function Pf(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):P(wn/u(Ur))/P(ff(Ur)/ff(gr)),qn=wn*M(ff(gr),hn)/hn;if(!hn)return wc;function di(aa,va){qn>0?va<-o+r&&(va=-o+r):va>o-r&&(va=o-r);var Ba=qn/M(ff(va),hn);return[Ba*C(hn*aa),qn-Ba*u(hn*aa)]}return di.invert=function(aa,va){var Ba=qn-va,Za=A(hn)*h(aa*aa+Ba*Ba),ca=T(aa,y(Ba))*A(Ba);return Ba*hn<0&&(ca-=n*A(aa)*A(Ba)),[ca/hn,2*v(M(qn/Za,1/hn))-o]},di}function yh(){return hu(Pf).scale(109.5).parallels([30,30])}function wu(gr,Ur){return[gr,Ur]}wu.invert=wu;function Lh(){return jc(wu).scale(152.63)}function Vc(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):(wn-u(Ur))/(Ur-gr),qn=wn/hn+gr;if(y(hn)r&&--hn>0);return[gr/(.8707+(di=wn*wn)*(-.131979+di*(-.013791+di*di*di*(.003971-.001529*di)))),wn]};function xh(){return jc(Ph).scale(175.295)}function Bu(gr,Ur){return[u(Ur)*C(gr),C(Ur)]}Bu.invert=Cf(w);function iu(){return jc(Bu).scale(249.5).clipAngle(90+r)}function _h(gr,Ur){var wn=u(Ur),hn=1+u(gr)*wn;return[wn*C(gr)/hn,C(Ur)/hn]}_h.invert=Cf(function(gr){return 2*v(gr)});function df(){return jc(_h).scale(250).clipAngle(142)}function bh(gr,Ur){return[P(p((o+Ur)/2)),-gr]}bh.invert=function(gr,Ur){return[-Ur,2*v(_(gr))-o]};function Wf(){var gr=Qc(bh),Ur=gr.center,wn=gr.rotate;return gr.center=function(hn){return arguments.length?Ur([-hn[1],hn[0]]):(hn=Ur(),[hn[1],-hn[0]])},gr.rotate=function(hn){return arguments.length?wn([hn[0],hn[1],hn.length>2?hn[2]+90:90]):(hn=wn(),[hn[0],hn[1],hn[2]-90])},wn([0,0,90]).scale(159.155)}c.geoAlbers=bu,c.geoAlbersUsa=vh,c.geoArea=Y,c.geoAzimuthalEqualArea=Jd,c.geoAzimuthalEqualAreaRaw=Ld,c.geoAzimuthalEquidistant=Lf,c.geoAzimuthalEquidistantRaw=cf,c.geoBounds=Gt,c.geoCentroid=tn,c.geoCircle=Wa,c.geoClipAntimeridian=Hr,c.geoClipCircle=Pn,c.geoClipExtent=Qa,c.geoClipRectangle=Vi,c.geoConicConformal=yh,c.geoConicConformalRaw=Pf,c.geoConicEqualArea=Uc,c.geoConicEqualAreaRaw=Mc,c.geoConicEquidistant=fd,c.geoConicEquidistantRaw=Vc,c.geoContains=Us,c.geoDistance=Qs,c.geoEqualEarth=Pd,c.geoEqualEarthRaw=wf,c.geoEquirectangular=Lh,c.geoEquirectangularRaw=wu,c.geoGnomonic=Jf,c.geoGnomonicRaw=gc,c.geoGraticule=qs,c.geoGraticule10=Ql,c.geoIdentity=eh,c.geoInterpolate=Xo,c.geoLength=Ks,c.geoMercator=hf,c.geoMercatorRaw=wc,c.geoNaturalEarth1=xh,c.geoNaturalEarth1Raw=Ph,c.geoOrthographic=iu,c.geoOrthographicRaw=Bu,c.geoPath=Uf,c.geoProjection=jc,c.geoProjectionMutator=Wh,c.geoRotation=Xi,c.geoStereographic=df,c.geoStereographicRaw=_h,c.geoStream=W,c.geoTransform=Vf,c.geoTransverseMercator=Wf,c.geoTransverseMercatorRaw=bh,Object.defineProperty(c,"__esModule",{value:!0})})}),KU=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,PS(),k3()):g(c.d3=c.d3||{},c.d3,c.d3)})(Q,function(c,g,I){var S=Math.abs,t=Math.atan,e=Math.atan2,r=Math.cos,a=Math.exp,n=Math.floor,o=Math.log,i=Math.max,l=Math.min,f=Math.pow,x=Math.round,y=Math.sign||function(Xt){return Xt>0?1:Xt<0?-1:0},v=Math.sin,T=Math.tan,u=1e-6,b=1e-12,_=Math.PI,P=_/2,M=_/4,C=Math.SQRT1_2,A=V(2),h=V(_),p=_*2,k=180/_,w=_/180;function R(Xt){return Xt?Xt/Math.sin(Xt):1}function O(Xt){return Xt>1?P:Xt<-1?-P:Math.asin(Xt)}function j(Xt){return Xt>1?0:Xt<-1?_:Math.acos(Xt)}function V(Xt){return Xt>0?Math.sqrt(Xt):0}function H(Xt){return Xt=a(2*Xt),(Xt-1)/(Xt+1)}function F(Xt){return(a(Xt)-a(-Xt))/2}function U(Xt){return(a(Xt)+a(-Xt))/2}function W(Xt){return o(Xt+V(Xt*Xt+1))}function q(Xt){return o(Xt+V(Xt*Xt-1))}function J(Xt){var ae=T(Xt/2),xe=2*o(r(Xt/2))/(ae*ae);function Ae(je,Oe){var $e=r(je),wr=r(Oe),Or=v(Oe),Nr=wr*$e,en=-((1-Nr?o((1+Nr)/2)/(1-Nr):-.5)+xe/(1+Nr));return[en*wr*v(je),en*Or]}return Ae.invert=function(je,Oe){var $e=V(je*je+Oe*Oe),wr=-Xt/2,Or=50,Nr;if(!$e)return[0,0];do{var en=wr/2,vn=r(en),In=v(en),Nn=In/vn,ii=-o(S(vn));wr-=Nr=(2/Nn*ii-xe*Nn-$e)/(-ii/(In*In)+1-xe/(2*vn*vn))*(vn<0?.7:1)}while(S(Nr)>u&&--Or>0);var Ui=v(wr);return[e(je*Ui,$e*r(wr)),O(Oe*Ui/$e)]},Ae}function lt(){var Xt=P,ae=g.geoProjectionMutator(J),xe=ae(Xt);return xe.radius=function(Ae){return arguments.length?ae(Xt=Ae*w):Xt*k},xe.scale(179.976).clipAngle(147)}function yt(Xt,ae){var xe=r(ae),Ae=R(j(xe*r(Xt/=2)));return[2*xe*v(Xt)*Ae,v(ae)*Ae]}yt.invert=function(Xt,ae){if(!(Xt*Xt+4*ae*ae>_*_+u)){var xe=Xt,Ae=ae,je=25;do{var Oe=v(xe),$e=v(xe/2),wr=r(xe/2),Or=v(Ae),Nr=r(Ae),en=v(2*Ae),vn=Or*Or,In=Nr*Nr,Nn=$e*$e,ii=1-In*wr*wr,Ui=ii?j(Nr*wr)*V(pa=1/ii):pa=0,pa,fa=2*Ui*Nr*$e-Xt,Ta=Ui*Or-ae,so=pa*(In*Nn+Ui*Nr*wr*vn),Bo=pa*(.5*Oe*en-Ui*2*Or*$e),So=pa*.25*(en*$e-Ui*Or*In*Oe),ds=pa*(vn*wr+Ui*Nn*Nr),fl=Bo*So-ds*so;if(!fl)break;var vl=(Ta*Bo-fa*ds)/fl,Ds=(fa*So-Ta*so)/fl;xe-=vl,Ae-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[xe,Ae]}};function mt(){return g.geoProjection(yt).scale(152.63)}function st(Xt){var ae=v(Xt),xe=r(Xt),Ae=Xt>=0?1:-1,je=T(Ae*Xt),Oe=(1+ae-xe)/2;function $e(wr,Or){var Nr=r(Or),en=r(wr/=2);return[(1+Nr)*v(wr),(Ae*Or>-e(en,je)-.001?0:-Ae*10)+Oe+v(Or)*xe-(1+Nr)*ae*en]}return $e.invert=function(wr,Or){var Nr=0,en=0,vn=50;do{var In=r(Nr),Nn=v(Nr),ii=r(en),Ui=v(en),pa=1+ii,fa=pa*Nn-wr,Ta=Oe+Ui*xe-pa*ae*In-Or,so=pa*In/2,Bo=-Nn*Ui,So=ae*pa*Nn/2,ds=xe*ii+ae*In*Ui,fl=Bo*So-ds*so,vl=(Ta*Bo-fa*ds)/fl/2,Ds=(fa*So-Ta*so)/fl;S(Ds)>2&&(Ds/=2),Nr-=vl,en-=Ds}while((S(vl)>u||S(Ds)>u)&&--vn>0);return Ae*en>-e(r(Nr),je)-.001?[Nr*2,en]:null},$e}function tt(){var Xt=20*w,ae=Xt>=0?1:-1,xe=T(ae*Xt),Ae=g.geoProjectionMutator(st),je=Ae(Xt),Oe=je.stream;return je.parallel=function($e){return arguments.length?(xe=T((ae=(Xt=$e*w)>=0?1:-1)*Xt),Ae(Xt)):Xt*k},je.stream=function($e){var wr=je.rotate(),Or=Oe($e),Nr=(je.rotate([0,0]),Oe($e)),en=je.precision();return je.rotate(wr),Or.sphere=function(){Nr.polygonStart(),Nr.lineStart();for(var vn=ae*-180;ae*vn<180;vn+=ae*90)Nr.point(vn,ae*90);if(Xt)for(;ae*(vn-=3*ae*en)>=-180;)Nr.point(vn,ae*-e(r(vn*w/2),xe)*k);Nr.lineEnd(),Nr.polygonEnd()},Or},je.scale(218.695).center([0,28.0974])}function dt(Xt,ae){var xe=T(ae/2),Ae=V(1-xe*xe),je=1+Ae*r(Xt/=2),Oe=v(Xt)*Ae/je,$e=xe/je,wr=Oe*Oe,Or=$e*$e;return[4/3*Oe*(3+wr-3*Or),4/3*$e*(3+3*wr-Or)]}dt.invert=function(Xt,ae){if(Xt*=3/8,ae*=3/8,!Xt&&S(ae)>1)return null;var xe=Xt*Xt,Ae=ae*ae,je=1+xe+Ae,Oe=V((je-V(je*je-4*ae*ae))/2),$e=O(Oe)/3,wr=Oe?q(S(ae/Oe))/3:W(S(Xt))/3,Or=r($e),Nr=U(wr),en=Nr*Nr-Or*Or;return[y(Xt)*2*e(F(wr)*Or,.25-en),y(ae)*2*e(Nr*v($e),.25+en)]};function rt(){return g.geoProjection(dt).scale(66.1603)}var at=V(8),vt=o(1+A);function it(Xt,ae){var xe=S(ae);return xeb&&--Ae>0);return[Xt/(r(xe)*(at-1/v(xe))),y(ae)*xe]};function Y(){return g.geoProjection(it).scale(112.314)}function ft(Xt){var ae=2*_/Xt;function xe(Ae,je){var Oe=g.geoAzimuthalEquidistantRaw(Ae,je);if(S(Ae)>P){var $e=e(Oe[1],Oe[0]),wr=V(Oe[0]*Oe[0]+Oe[1]*Oe[1]),Or=ae*x(($e-P)/ae)+P,Nr=e(v($e-=Or),2-r($e));$e=Or+O(_/wr*v(Nr))-Nr,Oe[0]=wr*r($e),Oe[1]=wr*v($e)}return Oe}return xe.invert=function(Ae,je){var Oe=V(Ae*Ae+je*je);if(Oe>P){var $e=e(je,Ae),wr=ae*x(($e-P)/ae)+P,Or=$e>wr?-1:1,Nr=Oe*r(wr-$e),en=1/T(Or*j((Nr-_)/V(_*(_-2*Nr)+Oe*Oe)));$e=wr+2*t((en+Or*V(en*en-3))/3),Ae=Oe*r($e),je=Oe*v($e)}return g.geoAzimuthalEquidistantRaw.invert(Ae,je)},xe}function ut(){var Xt=5,ae=g.geoProjectionMutator(ft),xe=ae(Xt),Ae=xe.stream,je=.01,Oe=-r(je*w),$e=v(je*w);return xe.lobes=function(wr){return arguments.length?ae(Xt=+wr):Xt},xe.stream=function(wr){var Or=xe.rotate(),Nr=Ae(wr),en=(xe.rotate([0,0]),Ae(wr));return xe.rotate(Or),Nr.sphere=function(){en.polygonStart(),en.lineStart();for(var vn=0,In=360/Xt,Nn=2*_/Xt,ii=90-180/Xt,Ui=P;vn0&&S(je)>u);return Ae<0?NaN:xe}function Wt(Xt,ae,xe){return ae===void 0&&(ae=40),xe===void 0&&(xe=b),function(Ae,je,Oe,$e){var wr,Or,Nr;Oe=Oe===void 0?0:+Oe,$e=$e===void 0?0:+$e;for(var en=0;enwr){Oe-=Or/=2,$e-=Nr/=2;continue}wr=ii;var Ui=(Oe>0?-1:1)*xe,pa=($e>0?-1:1)*xe,fa=Xt(Oe+Ui,$e),Ta=Xt(Oe,$e+pa),so=(fa[0]-vn[0])/Ui,Bo=(fa[1]-vn[1])/Ui,So=(Ta[0]-vn[0])/pa,ds=(Ta[1]-vn[1])/pa,fl=ds*so-Bo*So,vl=(S(fl)<.5?.5:1)/fl;if(Or=(Nn*So-In*ds)*vl,Nr=(In*Bo-Nn*so)*vl,Oe+=Or,$e+=Nr,S(Or)0&&(wr[1]*=1+Or/1.5*wr[0]*wr[0]),wr}return Ae.invert=Wt(Ae),Ae}function ge(){return g.geoProjection(Jt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function fe(Xt,ae){var xe=Xt*v(ae),Ae=30,je;do ae-=je=(ae+v(ae)-xe)/(1+r(ae));while(S(je)>u&&--Ae>0);return ae/2}function pe(Xt,ae,xe){function Ae(je,Oe){return[Xt*je*r(Oe=fe(xe,Oe)),ae*v(Oe)]}return Ae.invert=function(je,Oe){return Oe=O(Oe/ae),[je/(Xt*r(Oe)),O((2*Oe+v(2*Oe))/xe)]},Ae}var se=pe(A/P,A,_);function Tt(){return g.geoProjection(se).scale(169.529)}var Lt=2.00276,Mt=1.11072;function ee(Xt,ae){var xe=fe(_,ae);return[Lt*Xt/(1/r(ae)+Mt/r(xe)),(ae+A*v(xe))/Lt]}ee.invert=function(Xt,ae){var xe=Lt*ae,Ae=ae<0?-M:M,je=25,Oe,$e;do $e=xe-A*v(Ae),Ae-=Oe=(v(2*Ae)+2*Ae-_*v($e))/(2*r(2*Ae)+2+_*r($e)*A*r(Ae));while(S(Oe)>u&&--je>0);return $e=xe-A*v(Ae),[Xt*(1/r($e)+Mt/r(Ae))/Lt,$e]};function ve(){return g.geoProjection(ee).scale(160.857)}function oe(Xt){var ae=0,xe=g.geoProjectionMutator(Xt),Ae=xe(ae);return Ae.parallel=function(je){return arguments.length?xe(ae=je*w):ae*k},Ae}function Te(Xt,ae){return[Xt*r(ae),ae]}Te.invert=function(Xt,ae){return[Xt/r(ae),ae]};function He(){return g.geoProjection(Te).scale(152.63)}function Ge(Xt){if(!Xt)return Te;var ae=1/T(Xt);function xe(Ae,je){var Oe=ae+Xt-je,$e=Oe&&Ae*r(je)/Oe;return[Oe*v($e),ae-Oe*r($e)]}return xe.invert=function(Ae,je){var Oe=V(Ae*Ae+(je=ae-je)*je),$e=ae+Xt-Oe;return[Oe/r($e)*e(Ae,je),$e]},xe}function cr(){return oe(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function ur(Xt){function ae(xe,Ae){var je=P-Ae,Oe=je&&xe*Xt*v(je)/je;return[je*v(Oe)/Xt,P-je*r(Oe)]}return ae.invert=function(xe,Ae){var je=xe*Xt,Oe=P-Ae,$e=V(je*je+Oe*Oe),wr=e(je,Oe);return[($e?$e/v($e):1)*wr/Xt,P-$e]},ae}function jr(){var Xt=.5,ae=g.geoProjectionMutator(ur),xe=ae(Xt);return xe.fraction=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(158.837)}var Wr=pe(1,4/_,_);function br(){return g.geoProjection(Wr).scale(152.63)}function Xr(Xt,ae,xe,Ae,je,Oe){var $e=r(Oe),wr;if(S(Xt)>1||S(Oe)>1)wr=j(xe*je+ae*Ae*$e);else{var Or=v(Xt/2),Nr=v(Oe/2);wr=2*O(V(Or*Or+ae*Ae*Nr*Nr))}return S(wr)>u?[wr,e(Ae*v(Oe),ae*je-xe*Ae*$e)]:[0,0]}function nn(Xt,ae,xe){return j((Xt*Xt+ae*ae-xe*xe)/(2*Xt*ae))}function Le(Xt){return Xt-2*_*n((Xt+_)/(2*_))}function Gt(Xt,ae,xe){for(var Ae=[[Xt[0],Xt[1],v(Xt[1]),r(Xt[1])],[ae[0],ae[1],v(ae[1]),r(ae[1])],[xe[0],xe[1],v(xe[1]),r(xe[1])]],je=Ae[2],Oe,$e=0;$e<3;++$e,je=Oe)Oe=Ae[$e],je.v=Xr(Oe[1]-je[1],je[3],je[2],Oe[3],Oe[2],Oe[0]-je[0]),je.point=[0,0];var wr=nn(Ae[0].v[0],Ae[2].v[0],Ae[1].v[0]),Or=nn(Ae[0].v[0],Ae[1].v[0],Ae[2].v[0]),Nr=_-wr;Ae[2].point[1]=0,Ae[0].point[0]=-(Ae[1].point[0]=Ae[0].v[0]/2);var en=[Ae[2].point[0]=Ae[0].point[0]+Ae[2].v[0]*r(wr),2*(Ae[0].point[1]=Ae[1].point[1]=Ae[2].v[0]*v(wr))];function vn(In,Nn){var ii=v(Nn),Ui=r(Nn),pa=new Array(3),fa;for(fa=0;fa<3;++fa){var Ta=Ae[fa];if(pa[fa]=Xr(Nn-Ta[1],Ta[3],Ta[2],Ui,ii,In-Ta[0]),!pa[fa][0])return Ta.point;pa[fa][1]=Le(pa[fa][1]-Ta.v[1])}var so=en.slice();for(fa=0;fa<3;++fa){var Bo=fa==2?0:fa+1,So=nn(Ae[fa].v[0],pa[fa][0],pa[Bo][0]);pa[fa][1]<0&&(So=-So),fa?fa==1?(So=Or-So,so[0]-=pa[fa][0]*r(So),so[1]-=pa[fa][0]*v(So)):(So=Nr-So,so[0]+=pa[fa][0]*r(So),so[1]+=pa[fa][0]*v(So)):(so[0]+=pa[fa][0]*r(So),so[1]-=pa[fa][0]*v(So))}return so[0]/=3,so[1]/=3,so}return vn}function ne(Xt){return Xt[0]*=w,Xt[1]*=w,Xt}function Ct(){return gt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function gt(Xt,ae,xe){var Ae=g.geoCentroid({type:"MultiPoint",coordinates:[Xt,ae,xe]}),je=[-Ae[0],-Ae[1]],Oe=g.geoRotation(je),$e=Gt(ne(Oe(Xt)),ne(Oe(ae)),ne(Oe(xe)));$e.invert=Wt($e);var wr=g.geoProjection($e).rotate(je),Or=wr.center;return delete wr.rotate,wr.center=function(Nr){return arguments.length?Or(Oe(Nr)):Oe.invert(Or())},wr.clipAngle(90)}function St(Xt,ae){var xe=V(1-v(ae));return[2/h*Xt*xe,h*(1-xe)]}St.invert=function(Xt,ae){var xe=(xe=ae/h-1)*xe;return[xe>0?Xt*V(_/xe)/2:0,O(1-xe)]};function Nt(){return g.geoProjection(St).scale(95.6464).center([0,30])}function re(Xt){var ae=T(Xt);function xe(Ae,je){return[Ae,(Ae?Ae/v(Ae):1)*(v(je)*r(Ae)-ae*r(je))]}return xe.invert=ae?function(Ae,je){Ae&&(je*=v(Ae)/Ae);var Oe=r(Ae);return[Ae,2*e(V(Oe*Oe+ae*ae-je*je)-Oe,ae-je)]}:function(Ae,je){return[Ae,O(Ae?je*T(Ae)/Ae:je)]},xe}function le(){return oe(re).scale(249.828).clipAngle(90)}var we=V(3);function Ue(Xt,ae){return[we*Xt*(2*r(2*ae/3)-1)/h,we*h*v(ae/3)]}Ue.invert=function(Xt,ae){var xe=3*O(ae/(we*h));return[h*Xt/(we*(2*r(2*xe/3)-1)),xe]};function qe(){return g.geoProjection(Ue).scale(156.19)}function or(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,v(je)/ae]}return xe.invert=function(Ae,je){return[Ae/ae,O(je*ae)]},xe}function Sr(){return oe(or).parallel(38.58).scale(195.044)}function Ar(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,(1+ae)*T(je/2)]}return xe.invert=function(Ae,je){return[Ae/ae,t(je/(1+ae))*2]},xe}function mr(){return oe(Ar).scale(124.75)}function Qr(Xt,ae){var xe=V(8/(3*_));return[xe*Xt*(1-S(ae)/_),xe*ae]}Qr.invert=function(Xt,ae){var xe=V(8/(3*_)),Ae=ae/xe;return[Xt/(xe*(1-S(Ae)/_)),Ae]};function Hn(){return g.geoProjection(Qr).scale(165.664)}function Wn(Xt,ae){var xe=V(4-3*v(S(ae)));return[2/V(6*_)*Xt*xe,y(ae)*V(2*_/3)*(2-xe)]}Wn.invert=function(Xt,ae){var xe=2-S(ae)/V(2*_/3);return[Xt*V(6*_)/(2*xe),y(ae)*O((4-xe*xe)/3)]};function Xn(){return g.geoProjection(Wn).scale(165.664)}function Ii(Xt,ae){var xe=V(_*(4+_));return[2/xe*Xt*(1+V(1-4*ae*ae/(_*_))),4/xe*ae]}Ii.invert=function(Xt,ae){var xe=V(_*(4+_))/2;return[Xt*xe/(1+V(1-ae*ae*(4+_)/(4*_))),ae*xe/2]};function oi(){return g.geoProjection(Ii).scale(180.739)}function $n(Xt,ae){var xe=(2+P)*v(ae);ae/=2;for(var Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++){var Oe=r(ae);ae-=je=(ae+v(ae)*(Oe+2)-xe)/(2*Oe*(1+Oe))}return[2/V(_*(4+_))*Xt*(1+r(ae)),2*V(_/(4+_))*v(ae)]}$n.invert=function(Xt,ae){var xe=ae*V((4+_)/_)/2,Ae=O(xe),je=r(Ae);return[Xt/(2/V(_*(4+_))*(1+je)),O((Ae+xe*(je+2))/(2+P))]};function sa(){return g.geoProjection($n).scale(180.739)}function Zi(Xt,ae){return[Xt*(1+r(ae))/V(2+_),2*ae/V(2+_)]}Zi.invert=function(Xt,ae){var xe=V(2+_),Ae=ae*xe/2;return[xe*Xt/(1+r(Ae)),Ae]};function We(){return g.geoProjection(Zi).scale(173.044)}function nr(Xt,ae){for(var xe=(1+P)*v(ae),Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++)ae-=je=(ae+v(ae)-xe)/(1+r(ae));return xe=V(2+_),[Xt*(1+r(ae))/xe,2*ae/xe]}nr.invert=function(Xt,ae){var xe=1+P,Ae=V(xe/2);return[Xt*2*Ae/(1+r(ae*=Ae)),O((ae+v(ae))/xe)]};function fr(){return g.geoProjection(nr).scale(173.044)}var _r=3+2*A;function tn(Xt,ae){var xe=v(Xt/=2),Ae=r(Xt),je=V(r(ae)),Oe=r(ae/=2),$e=v(ae)/(Oe+A*Ae*je),wr=V(2/(1+$e*$e)),Or=V((A*Oe+(Ae+xe)*je)/(A*Oe+(Ae-xe)*je));return[_r*(wr*(Or-1/Or)-2*o(Or)),_r*(wr*$e*(Or+1/Or)-2*t($e))]}tn.invert=function(Xt,ae){if(!(Oe=dt.invert(Xt/1.2,ae*1.065)))return null;var xe=Oe[0],Ae=Oe[1],je=20,Oe;Xt/=_r,ae/=_r;do{var $e=xe/2,wr=Ae/2,Or=v($e),Nr=r($e),en=v(wr),vn=r(wr),In=r(Ae),Nn=V(In),ii=en/(vn+A*Nr*Nn),Ui=ii*ii,pa=V(2/(1+Ui)),fa=A*vn+(Nr+Or)*Nn,Ta=A*vn+(Nr-Or)*Nn,so=fa/Ta,Bo=V(so),So=Bo-1/Bo,ds=Bo+1/Bo,fl=pa*So-2*o(Bo)-Xt,vl=pa*ii*ds-2*t(ii)-ae,Ds=en&&C*Nn*Or*Ui/en,wl=(A*Nr*vn+Nn)/(2*(vn+A*Nr*Nn)*(vn+A*Nr*Nn)*Nn),Eu=-.5*ii*pa*pa*pa,gu=Eu*Ds,$s=Eu*wl,Zs=(Zs=2*vn+A*Nn*(Nr-Or))*Zs*Bo,Yu=(A*Nr*vn*Nn+In)/Zs,dc=-(A*Or*en)/(Nn*Zs),$c=So*gu-2*Yu/Bo+pa*(Yu+Yu/so),At=So*$s-2*dc/Bo+pa*(dc+dc/so),Ut=ii*ds*gu-2*Ds/(1+Ui)+pa*ds*Ds+pa*ii*(Yu-Yu/so),ue=ii*ds*$s-2*wl/(1+Ui)+pa*ds*wl+pa*ii*(dc-dc/so),Me=At*Ut-ue*$c;if(!Me)break;var Pe=(vl*At-fl*ue)/Me,Ne=(fl*Ut-vl*$c)/Me;xe-=Pe,Ae=i(-P,l(P,Ae-Ne))}while((S(Pe)>u||S(Ne)>u)&&--je>0);return S(S(Ae)-P)Ae){var vn=V(en),In=e(Nr,Or),Nn=xe*x(In/xe),ii=In-Nn,Ui=Xt*r(ii),pa=(Xt*v(ii)-ii*v(Ui))/(P-Ui),fa=Ie(ii,pa),Ta=(_-Xt)/Rr(fa,Ui,_);Or=vn;var so=50,Bo;do Or-=Bo=(Xt+Rr(fa,Ui,Or)*Ta-vn)/(fa(Or)*Ta);while(S(Bo)>u&&--so>0);Nr=ii*v(Or),OrAe){var Or=V(wr),Nr=e($e,Oe),en=xe*x(Nr/xe),vn=Nr-en;Oe=Or*r(vn),$e=Or*v(vn);for(var In=Oe-P,Nn=v(Oe),ii=$e/Nn,Ui=Oeu||S(ii)>u)&&--Ui>0);return[vn,In]},Or}var Br=Gr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Yr(){return g.geoProjection(Br).scale(149.995)}var pn=Gr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function on(){return g.geoProjection(pn).scale(153.93)}var Ce=Gr(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function dr(){return g.geoProjection(Ce).scale(130.945)}function Hr(Xt,ae){var xe=Xt*Xt,Ae=ae*ae;return[Xt*(1-.162388*Ae)*(.87-952426e-9*xe*xe),ae*(1+Ae/12)]}Hr.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=50,Oe;do{var $e=Ae*Ae;Ae-=Oe=(Ae*(1+$e/12)-ae)/(1+$e/4)}while(S(Oe)>u&&--je>0);je=50,Xt/=1-.162388*$e;do{var wr=(wr=xe*xe)*wr;xe-=Oe=(xe*(.87-952426e-9*wr)-Xt)/(.87-.00476213*wr)}while(S(Oe)>u&&--je>0);return[xe,Ae]};function _n(){return g.geoProjection(Hr).scale(131.747)}var Fn=Gr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Qn(){return g.geoProjection(Fn).scale(131.087)}function Pn(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function xe(Ae,je){var Oe=Ae>0?-.5:.5,$e=Xt(Ae+Oe*_,je);return $e[0]-=Oe*ae,$e}return Xt.invert&&(xe.invert=function(Ae,je){var Oe=Ae>0?-.5:.5,$e=Xt.invert(Ae+Oe*ae,je),wr=$e[0]-Oe*_;return wr<-_?wr+=2*_:wr>_&&(wr-=2*_),$e[0]=wr,$e}),xe}function En(Xt,ae){var xe=y(Xt),Ae=y(ae),je=r(ae),Oe=r(Xt)*je,$e=v(Xt)*je,wr=v(Ae*ae);Xt=S(e($e,wr)),ae=O(Oe),S(Xt-P)>u&&(Xt%=P);var Or=Zn(Xt>_/4?P-Xt:Xt,ae);return Xt>_/4&&(wr=Or[0],Or[0]=-Or[1],Or[1]=-wr),Or[0]*=xe,Or[1]*=-Ae,Or}En.invert=function(Xt,ae){S(Xt)>1&&(Xt=y(Xt)*2-Xt),S(ae)>1&&(ae=y(ae)*2-ae);var xe=y(Xt),Ae=y(ae),je=-xe*Xt,Oe=-Ae*ae,$e=Oe/je<1,wr=La($e?Oe:je,$e?je:Oe),Or=wr[0],Nr=wr[1],en=r(Nr);return $e&&(Or=-P-Or),[xe*(e(v(Or)*en,-v(Nr))+_),Ae*O(r(Or)*en)]};function Zn(Xt,ae){if(ae===P)return[0,0];var xe=v(ae),Ae=xe*xe,je=Ae*Ae,Oe=1+je,$e=1+3*je,wr=1-je,Or=O(1/V(Oe)),Nr=wr+Ae*Oe*Or,en=(1-xe)/Nr,vn=V(en),In=en*Oe,Nn=V(In),ii=vn*wr,Ui,pa;if(Xt===0)return[0,-(ii+Ae*Nn)];var fa=r(ae),Ta=1/fa,so=2*xe*fa,Bo=(-3*Ae+Or*$e)*so,So=(-Nr*fa-(1-xe)*Bo)/(Nr*Nr),ds=.5*So/vn,fl=wr*ds-2*Ae*vn*so,vl=Ae*Oe*So+en*$e*so,Ds=-Ta*so,wl=-Ta*vl,Eu=-2*Ta*fl,gu=4*Xt/_,$s;if(Xt>.222*_||ae<_/4&&Xt>.175*_){if(Ui=(ii+Ae*V(In*(1+je)-ii*ii))/(1+je),Xt>_/4)return[Ui,Ui];var Zs=Ui,Yu=.5*Ui;Ui=.5*(Yu+Zs),pa=50;do{var dc=V(In-Ui*Ui),$c=Ui*(Eu+Ds*dc)+wl*O(Ui/Nn)-gu;if(!$c)break;$c<0?Yu=Ui:Zs=Ui,Ui=.5*(Yu+Zs)}while(S(Zs-Yu)>u&&--pa>0)}else{Ui=u,pa=25;do{var At=Ui*Ui,Ut=V(In-At),ue=Eu+Ds*Ut,Me=Ui*ue+wl*O(Ui/Nn)-gu,Pe=ue+(wl-Ds*At)/Ut;Ui-=$s=Ut?Me/Pe:0}while(S($s)>u&&--pa>0)}return[Ui,-ii-Ae*V(In-Ui*Ui)]}function La(Xt,ae){for(var xe=0,Ae=1,je=.5,Oe=50;;){var $e=je*je,wr=V(je),Or=O(1/V(1+$e)),Nr=1-$e+je*(1+$e)*Or,en=(1-wr)/Nr,vn=V(en),In=en*(1+$e),Nn=vn*(1-$e),ii=In-Xt*Xt,Ui=V(ii),pa=ae+Nn+je*Ui;if(S(Ae-xe)0?xe=je:Ae=je,je=.5*(xe+Ae)}if(!Oe)return null;var fa=O(wr),Ta=r(fa),so=1/Ta,Bo=2*wr*Ta,So=(-3*je+Or*(1+3*$e))*Bo,ds=(-Nr*Ta-(1-wr)*So)/(Nr*Nr),fl=.5*ds/vn,vl=(1-$e)*fl-2*je*vn*Bo,Ds=-2*so*vl,wl=-so*Bo,Eu=-so*(je*(1+$e)*ds+en*(1+3*$e)*Bo);return[_/4*(Xt*(Ds+wl*Ui)+Eu*O(Xt/V(In))),fa]}function Vi(){return g.geoProjection(Pn(En)).scale(239.75)}function Qa(Xt,ae,xe){var Ae,je,Oe;return Xt?(Ae=Ja(Xt,xe),ae?(je=Ja(ae,1-xe),Oe=je[1]*je[1]+xe*Ae[0]*Ae[0]*je[0]*je[0],[[Ae[0]*je[2]/Oe,Ae[1]*Ae[2]*je[0]*je[1]/Oe],[Ae[1]*je[1]/Oe,-Ae[0]*Ae[2]*je[0]*je[2]/Oe],[Ae[2]*je[1]*je[2]/Oe,-xe*Ae[0]*Ae[1]*je[0]/Oe]]):[[Ae[0],0],[Ae[1],0],[Ae[2],0]]):(je=Ja(ae,1-xe),[[0,je[0]/je[1]],[1/je[1],0],[je[2]/je[1],0]])}function Ja(Xt,ae){var xe,Ae,je,Oe,$e;if(ae=1-u)return xe=(1-ae)/4,Ae=U(Xt),Oe=H(Xt),je=1/Ae,$e=Ae*F(Xt),[Oe+xe*($e-Xt)/(Ae*Ae),je-xe*Oe*je*($e-Xt),je+xe*Oe*je*($e+Xt),2*t(a(Xt))-P+xe*($e-Xt)/Ae];var wr=[1,0,0,0,0,0,0,0,0],Or=[V(ae),0,0,0,0,0,0,0,0],Nr=0;for(Ae=V(1-ae),$e=1;S(Or[Nr]/wr[Nr])>u&&Nr<8;)xe=wr[Nr++],Or[Nr]=(xe-Ae)/2,wr[Nr]=(xe+Ae)/2,Ae=V(xe*Ae),$e*=2;je=$e*wr[Nr]*Xt;do Oe=Or[Nr]*v(Ae=je)/wr[Nr],je=(O(Oe)+je)/2;while(--Nr);return[v(je),Oe=r(je),Oe/r(je-Ae),je]}function Do(Xt,ae,xe){var Ae=S(Xt),je=S(ae),Oe=F(je);if(Ae){var $e=1/v(Ae),wr=1/(T(Ae)*T(Ae)),Or=-(wr+xe*(Oe*Oe*$e*$e)-1+xe),Nr=(xe-1)*wr,en=(-Or+V(Or*Or-4*Nr))/2;return[yo(t(1/V(en)),xe)*y(Xt),yo(t(V((en/wr-1)/xe)),1-xe)*y(ae)]}return[0,yo(t(Oe),1-xe)*y(ae)]}function yo(Xt,ae){if(!ae)return Xt;if(ae===1)return o(T(Xt/2+M));for(var xe=1,Ae=V(1-ae),je=V(ae),Oe=0;S(je)>u;Oe++){if(Xt%_){var $e=t(Ae*T(Xt)/xe);$e<0&&($e+=_),Xt+=$e+~~(Xt/_)*_}else Xt+=Xt;je=(xe+Ae)/2,Ae=V(xe*Ae),je=((xe=je)-Ae)/2}return Xt/(f(2,Oe)*xe)}function Fo(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=yo(P,Ae*Ae),Oe=-1,$e=o(T(_/4+S(ae)/2)),wr=a(Oe*$e)/V(xe),Or=Da(wr*r(Oe*Xt),wr*v(Oe*Xt)),Nr=Do(Or[0],Or[1],Ae*Ae);return[-Nr[1],(ae>=0?1:-1)*(.5*je-Nr[0])]}function Da(Xt,ae){var xe=Xt*Xt,Ae=ae+1,je=1-xe-ae*ae;return[.5*((Xt>=0?P:-P)-e(je,2*Xt)),-.25*o(je*je+4*xe)+.5*o(Ae*Ae+xe)]}function ys(Xt,ae){var xe=ae[0]*ae[0]+ae[1]*ae[1];return[(Xt[0]*ae[0]+Xt[1]*ae[1])/xe,(Xt[1]*ae[0]-Xt[0]*ae[1])/xe]}Fo.invert=function(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=yo(P,Ae*Ae),Oe=-1,$e=Qa(.5*je-ae,-Xt,Ae*Ae),wr=ys($e[0],$e[1]),Or=e(wr[1],wr[0])/Oe;return[Or,2*t(a(.5/Oe*o(xe*wr[0]*wr[0]+xe*wr[1]*wr[1])))-P]};function os(){return g.geoProjection(Pn(Fo)).scale(151.496)}function ul(Xt){var ae=v(Xt),xe=r(Xt),Ae=Zo(Xt);Ae.invert=Zo(-Xt);function je(Oe,$e){var wr=Ae(Oe,$e);Oe=wr[0],$e=wr[1];var Or=v($e),Nr=r($e),en=r(Oe),vn=j(ae*Or+xe*Nr*en),In=v(vn),Nn=S(In)>u?vn/In:1;return[Nn*xe*v(Oe),(S(Oe)>P?Nn:-Nn)*(ae*Nr-xe*Or*en)]}return je.invert=function(Oe,$e){var wr=V(Oe*Oe+$e*$e),Or=-v(wr),Nr=r(wr),en=wr*Nr,vn=-$e*Or,In=wr*ae,Nn=V(en*en+vn*vn-In*In),ii=e(en*In+vn*Nn,vn*In-en*Nn),Ui=(wr>P?-1:1)*e(Oe*Or,wr*r(ii)*Nr+$e*v(ii)*Or);return Ae.invert(Ui,ii)},je}function Zo(Xt){var ae=v(Xt),xe=r(Xt);return function(Ae,je){var Oe=r(je),$e=r(Ae)*Oe,wr=v(Ae)*Oe,Or=v(je);return[e(wr,$e*xe-Or*ae),O(Or*xe+$e*ae)]}}function Ks(){var Xt=0,ae=g.geoProjectionMutator(ul),xe=ae(Xt),Ae=xe.rotate,je=xe.stream,Oe=g.geoCircle();return xe.parallel=function($e){if(!arguments.length)return Xt*k;var wr=xe.rotate();return ae(Xt=$e*w).rotate(wr)},xe.rotate=function($e){return arguments.length?(Ae.call(xe,[$e[0],$e[1]-Xt*k]),Oe.center([-$e[0],-$e[1]]),xe):($e=Ae.call(xe),$e[1]+=Xt*k,$e)},xe.stream=function($e){return $e=je($e),$e.sphere=function(){$e.polygonStart();var wr=.01,Or=Oe.radius(90-wr)().coordinates[0],Nr=Or.length-1,en=-1,vn;for($e.lineStart();++en=0;)$e.point((vn=Or[en])[0],vn[1]);$e.lineEnd(),$e.polygonEnd()},$e},xe.scale(79.4187).parallel(45).clipAngle(180-.001)}var ss=3,cl=O(1-1/ss)*k,Qs=or(0);function Nl(Xt){var ae=cl*w,xe=St(_,ae)[0]-St(-_,ae)[0],Ae=Qs(0,ae)[1],je=St(0,ae)[1],Oe=h-je,$e=p/Xt,wr=4/p,Or=Ae+Oe*Oe*4/p;function Nr(en,vn){var In,Nn=S(vn);if(Nn>ae){var ii=l(Xt-1,i(0,n((en+_)/$e)));en+=_*(Xt-1)/Xt-ii*$e,In=St(en,Nn),In[0]=In[0]*p/xe-p*(Xt-1)/(2*Xt)+ii*p/Xt,In[1]=Ae+(In[1]-je)*4*Oe/p,vn<0&&(In[1]=-In[1])}else In=Qs(en,vn);return In[0]*=wr,In[1]/=Or,In}return Nr.invert=function(en,vn){en/=wr,vn*=Or;var In=S(vn);if(In>Ae){var Nn=l(Xt-1,i(0,n((en+_)/$e)));en=(en+_*(Xt-1)/Xt-Nn*$e)*xe/p;var ii=St.invert(en,.25*(In-Ae)*p/Oe+je);return ii[0]-=_*(Xt-1)/Xt-Nn*$e,vn<0&&(ii[1]=-ii[1]),ii}return Qs.invert(en,vn)},Nr}function cs(Xt,ae){return[Xt,ae&1?90-u:cl]}function Ps(Xt,ae){return[Xt,ae&1?-90+u:-cl]}function Lo(Xt){return[Xt[0]*(1-u),Xt[1]]}function As(Xt){var ae=[].concat(I.range(-180,180+Xt/2,Xt).map(cs),I.range(180,-180-Xt/2,-Xt).map(Ps));return{type:"Polygon",coordinates:[Xt===180?ae.map(Lo):ae]}}function kl(){var Xt=4,ae=g.geoProjectionMutator(Nl),xe=ae(Xt),Ae=xe.stream;return xe.lobes=function(je){return arguments.length?ae(Xt=+je):Xt},xe.stream=function(je){var Oe=xe.rotate(),$e=Ae(je),wr=(xe.rotate([0,0]),Ae(je));return xe.rotate(Oe),$e.sphere=function(){g.geoStream(As(180/Xt),wr)},$e},xe.scale(239.75)}function ql(Xt){var ae=1+Xt,xe=v(1/ae),Ae=O(xe),je=2*V(_/(Oe=_+4*Ae*ae)),Oe,$e=.5*je*(ae+V(Xt*(2+Xt))),wr=Xt*Xt,Or=ae*ae;function Nr(en,vn){var In=1-v(vn),Nn,ii;if(In&&In<2){var Ui=P-vn,pa=25,fa;do{var Ta=v(Ui),so=r(Ui),Bo=Ae+e(Ta,ae-so),So=1+Or-2*ae*so;Ui-=fa=(Ui-wr*Ae-ae*Ta+So*Bo-.5*In*Oe)/(2*ae*Ta*Bo)}while(S(fa)>b&&--pa>0);Nn=je*V(So),ii=en*Bo/_}else Nn=je*(Xt+In),ii=en*Ae/_;return[Nn*v(ii),$e-Nn*r(ii)]}return Nr.invert=function(en,vn){var In=en*en+(vn-=$e)*vn,Nn=(1+Or-In/(je*je))/(2*ae),ii=j(Nn),Ui=v(ii),pa=Ae+e(Ui,ae-Nn);return[O(en/V(In))*_/pa,O(1-2*(ii-wr*Ae-ae*Ui+(1+Or-2*ae*Nn)*pa)/Oe)]},Nr}function Jl(){var Xt=1,ae=g.geoProjectionMutator(ql),xe=ae(Xt);return xe.ratio=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(167.774).center([0,18.67])}var Us=.7109889596207567,Pa=.0528035274542;function fo(Xt,ae){return ae>-Us?(Xt=se(Xt,ae),Xt[1]+=Pa,Xt):Te(Xt,ae)}fo.invert=function(Xt,ae){return ae>-Us?se.invert(Xt,ae-Pa):Te.invert(Xt,ae)};function qs(){return g.geoProjection(fo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ql(Xt,ae){return S(ae)>Us?(Xt=se(Xt,ae),Xt[1]-=ae>0?Pa:-Pa,Xt):Te(Xt,ae)}Ql.invert=function(Xt,ae){return S(ae)>Us?se.invert(Xt,ae+(ae>0?Pa:-Pa)):Te.invert(Xt,ae)};function Xo(){return g.geoProjection(Ql).scale(152.63)}function Gl(Xt,ae,xe,Ae){var je=V(4*_/(2*xe+(1+Xt-ae/2)*v(2*xe)+(Xt+ae)/2*v(4*xe)+ae/2*v(6*xe))),Oe=V(Ae*v(xe)*V((1+Xt*r(2*xe)+ae*r(4*xe))/(1+Xt+ae))),$e=xe*Or(1);function wr(vn){return V(1+Xt*r(2*vn)+ae*r(4*vn))}function Or(vn){var In=vn*xe;return(2*In+(1+Xt-ae/2)*v(2*In)+(Xt+ae)/2*v(4*In)+ae/2*v(6*In))/xe}function Nr(vn){return wr(vn)*v(vn)}var en=function(vn,In){var Nn=xe*qt(Or,$e*v(In)/xe,In/_);isNaN(Nn)&&(Nn=xe*y(In));var ii=je*wr(Nn);return[ii*Oe*vn/_*r(Nn),ii/Oe*v(Nn)]};return en.invert=function(vn,In){var Nn=qt(Nr,In*Oe/je);return[vn*_/(r(Nn)*je*Oe*wr(Nn)),O(xe*Or(Nn/xe)/$e)]},xe===0&&(je=V(Ae/_),en=function(vn,In){return[vn*je,v(In)/je]},en.invert=function(vn,In){return[vn/je,O(In*je)]}),en}function al(){var Xt=1,ae=0,xe=45*w,Ae=2,je=g.geoProjectionMutator(Gl),Oe=je(Xt,ae,xe,Ae);return Oe.a=function($e){return arguments.length?je(Xt=+$e,ae,xe,Ae):Xt},Oe.b=function($e){return arguments.length?je(Xt,ae=+$e,xe,Ae):ae},Oe.psiMax=function($e){return arguments.length?je(Xt,ae,xe=+$e*w,Ae):xe*k},Oe.ratio=function($e){return arguments.length?je(Xt,ae,xe,Ae=+$e):Ae},Oe.scale(180.739)}function Cl(Xt,ae,xe,Ae,je,Oe,$e,wr,Or,Nr,en){if(en.nanEncountered)return NaN;var vn,In,Nn,ii,Ui,pa,fa,Ta,so,Bo;if(vn=xe-ae,In=Xt(ae+vn*.25),Nn=Xt(xe-vn*.25),isNaN(In)){en.nanEncountered=!0;return}if(isNaN(Nn)){en.nanEncountered=!0;return}return ii=vn*(Ae+4*In+je)/12,Ui=vn*(je+4*Nn+Oe)/12,pa=ii+Ui,Bo=(pa-$e)/15,Nr>Or?(en.maxDepthCount++,pa+Bo):Math.abs(Bo)>1;do Or[pa]>Nn?Ui=pa:ii=pa,pa=ii+Ui>>1;while(pa>ii);var fa=Or[pa+1]-Or[pa];return fa&&(fa=(Nn-Or[pa+1])/fa),(pa+1+fa)/$e}var vn=2*en(1)/_*Oe/xe,In=function(Nn,ii){var Ui=en(S(v(ii))),pa=Ae(Ui)*Nn;return Ui/=vn,[pa,ii>=0?Ui:-Ui]};return In.invert=function(Nn,ii){var Ui;return ii*=vn,S(ii)<1&&(Ui=y(ii)*O(je(S(ii))*Oe)),[Nn/Ae(S(ii)),Ui]},In}function Ms(){var Xt=0,ae=2.5,xe=1.183136,Ae=g.geoProjectionMutator(lo),je=Ae(Xt,ae,xe);return je.alpha=function(Oe){return arguments.length?Ae(Xt=+Oe,ae,xe):Xt},je.k=function(Oe){return arguments.length?Ae(Xt,ae=+Oe,xe):ae},je.gamma=function(Oe){return arguments.length?Ae(Xt,ae,xe=+Oe):xe},je.scale(152.63)}function Is(Xt,ae){return S(Xt[0]-ae[0])=0;--Or)xe=Xt[1][Or],Ae=xe[0][0],je=xe[0][1],Oe=xe[1][1],$e=xe[2][0],wr=xe[2][1],ae.push(ou([[$e-u,wr-u],[$e-u,Oe+u],[Ae+u,Oe+u],[Ae+u,je-u]],30));return{type:"Polygon",coordinates:[I.merge(ae)]}}function ts(Xt,ae,xe){var Ae,je;function Oe(Or,Nr){for(var en=Nr<0?-1:1,vn=ae[+(Nr<0)],In=0,Nn=vn.length-1;Invn[In][2][0];++In);var ii=Xt(Or-vn[In][1][0],Nr);return ii[0]+=Xt(vn[In][1][0],en*Nr>en*vn[In][0][1]?vn[In][0][1]:Nr)[0],ii}xe?Oe.invert=xe(Oe):Xt.invert&&(Oe.invert=function(Or,Nr){for(var en=je[+(Nr<0)],vn=ae[+(Nr<0)],In=0,Nn=en.length;Inii&&(Ui=Nn,Nn=ii,ii=Ui),[[vn,Nn],[In,ii]]})}),$e):ae.map(function(Nr){return Nr.map(function(en){return[[en[0][0]*k,en[0][1]*k],[en[1][0]*k,en[1][1]*k],[en[2][0]*k,en[2][1]*k]]})})},ae!=null&&$e.lobes(ae),$e}var Su=[[[[-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 Gu(){return ts(ee,Su).scale(160.857)}var bl=[[[[-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 Dl(){return ts(Ql,bl).scale(152.63)}var tu=[[[[-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 nu(){return ts(se,tu).scale(169.529)}var ac=[[[[-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 mh(){return ts(se,ac).scale(169.529).rotate([20,0])}var Jc=[[[[-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 ah(){return ts(fo,Jc,Wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Bf=[[[[-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 Sf(){return ts(Te,Bf).scale(152.63).rotate([-20,0])}function Fl(Xt,ae){return[3/p*Xt*V(_*_/3-ae*ae),ae]}Fl.invert=function(Xt,ae){return[p/3*Xt/V(_*_/3-ae*ae),ae]};function Bc(){return g.geoProjection(Fl).scale(158.837)}function Nf(Xt){function ae(xe,Ae){if(S(S(Ae)-P)2)return null;xe/=2,Ae/=2;var Oe=xe*xe,$e=Ae*Ae,wr=2*Ae/(1+Oe+$e);return wr=f((1+wr)/(1-wr),1/Xt),[e(2*xe,1-Oe-$e)/Xt,O((wr-1)/(wr+1))]},ae}function hc(){var Xt=.5,ae=g.geoProjectionMutator(Nf),xe=ae(Xt);return xe.spacing=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(124.75)}var oc=_/A;function fc(Xt,ae){return[Xt*(1+V(r(ae)))/2,ae/(r(ae/2)*r(Xt/6))]}fc.invert=function(Xt,ae){var xe=S(Xt),Ae=S(ae),je=u,Oe=P;Aeu||S(pa)>u)&&--je>0);return je&&[xe,Ae]};function sc(){return g.geoProjection(cu).scale(139.98)}function rl(Xt,ae){return[v(Xt)/r(ae),T(ae)*r(Xt)]}rl.invert=function(Xt,ae){var xe=Xt*Xt,Ae=ae*ae,je=Ae+1,Oe=xe+je,$e=Xt?C*V((Oe-V(Oe*Oe-4*xe))/xe):1/V(je);return[O(Xt*$e),y(ae)*j($e)]};function Yl(){return g.geoProjection(rl).scale(144.049).clipAngle(90-.001)}function Sh(Xt){var ae=r(Xt),xe=T(M+Xt/2);function Ae(je,Oe){var $e=Oe-Xt,wr=S($e)=0;)en=Xt[Nr],vn=en[0]+wr*(Nn=vn)-Or*In,In=en[1]+wr*In+Or*Nn;return vn=wr*(Nn=vn)-Or*In,In=wr*In+Or*Nn,[vn,In]}return xe.invert=function(Ae,je){var Oe=20,$e=Ae,wr=je;do{for(var Or=ae,Nr=Xt[Or],en=Nr[0],vn=Nr[1],In=0,Nn=0,ii;--Or>=0;)Nr=Xt[Or],In=en+$e*(ii=In)-wr*Nn,Nn=vn+$e*Nn+wr*ii,en=Nr[0]+$e*(ii=en)-wr*vn,vn=Nr[1]+$e*vn+wr*ii;In=en+$e*(ii=In)-wr*Nn,Nn=vn+$e*Nn+wr*ii,en=$e*(ii=en)-wr*vn-Ae,vn=$e*vn+wr*ii-je;var Ui=In*In+Nn*Nn,pa,fa;$e-=pa=(en*In+vn*Nn)/Ui,wr-=fa=(vn*In-en*Nn)/Ui}while(S(pa)+S(fa)>u*u&&--Oe>0);if(Oe){var Ta=V($e*$e+wr*wr),so=2*t(Ta*.5),Bo=v(so);return[e($e*Bo,Ta*r(so)),Ta?O(wr*Bo/Ta):0]}},xe}var tl=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Vd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ll=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Qo=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function sh(){return lc(tl,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function rc(){return lc(Vd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function jf(){return lc(Ll,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Vh(){return lc(Qo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return lc(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function lc(Xt,ae){var xe=g.geoProjection(Ed(Xt)).rotate(ae).clipAngle(90),Ae=g.geoRotation(ae),je=xe.center;return delete xe.rotate,xe.center=function(Oe){return arguments.length?je(Ae(Oe)):Ae.invert(je())},xe}var hd=V(6),Zf=V(7);function xf(Xt,ae){var xe=O(7*v(ae)/(3*hd));return[hd*Xt*(2*r(2*xe/3)-1)/Zf,9*v(xe/3)/Zf]}xf.invert=function(Xt,ae){var xe=3*O(ae*Zf/9);return[Xt*Zf/(hd*(2*r(2*xe/3)-1)),O(v(xe)*3*hd/7)]};function Hh(){return g.geoProjection(xf).scale(164.859)}function Uf(Xt,ae){for(var xe=(1+C)*v(ae),Ae=ae,je=0,Oe;je<25&&(Ae-=Oe=(v(Ae/2)+v(Ae)-xe)/(.5*r(Ae/2)+r(Ae)),!(S(Oe)b&&--Ae>0);return Oe=xe*xe,$e=Oe*Oe,wr=Oe*$e,[Xt/(.84719-.13063*Oe+wr*wr*(-.04515+.05494*Oe-.02326*$e+.00331*wr)),xe]};function gh(){return g.geoProjection(Eh).scale(175.295)}function uc(Xt,ae){return[Xt*(1+r(ae))/2,2*(ae-T(ae/2))]}uc.invert=function(Xt,ae){for(var xe=ae/2,Ae=0,je=1/0;Ae<10&&S(je)>u;++Ae){var Oe=r(ae/2);ae-=je=(ae-T(ae/2)-xe)/(1-.5/(Oe*Oe))}return[2*Xt/(1+r(ae)),ae]};function rf(){return g.geoProjection(uc).scale(152.63)}var Hf=[[[[-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 eu(){return ts(kt(1/0),Hf).rotate([20,0]).scale(152.63)}function Ef(Xt,ae){var xe=v(ae),Ae=r(ae),je=y(Xt);if(Xt===0||S(ae)===P)return[0,ae];if(ae===0)return[Xt,0];if(S(Xt)===P)return[Xt*Ae,P*xe];var Oe=_/(2*Xt)-2*Xt/_,$e=2*ae/_,wr=(1-$e*$e)/(xe-$e),Or=Oe*Oe,Nr=wr*wr,en=1+Or/Nr,vn=1+Nr/Or,In=(Oe*xe/wr-Oe/2)/en,Nn=(Nr*xe/Or+wr/2)/vn,ii=In*In+Ae*Ae/en,Ui=Nn*Nn-(Nr*xe*xe/Or+wr*xe-1)/vn;return[P*(In+V(ii)*je),P*(Nn+V(Ui<0?0:Ui)*y(-ae*Oe)*je)]}Ef.invert=function(Xt,ae){Xt/=P,ae/=P;var xe=Xt*Xt,Ae=ae*ae,je=xe+Ae,Oe=_*_;return[Xt?(je-1+V((1-je)*(1-je)+4*xe))/(2*Xt)*P:0,qt(function($e){return je*(_*v($e)-2*$e)*_+4*$e*$e*(ae-v($e))+2*_*$e-Oe*ae},0)]};function Cd(){return g.geoProjection(Ef).scale(127.267)}var Yf=1.0148,_f=.23185,Kf=-.14499,Nc=.02406,Xf=Yf,Ou=5*_f,jc=7*Kf,Wh=9*Nc,hu=1.790857183;function Ch(Xt,ae){var xe=ae*ae;return[Xt,ae*(Yf+xe*xe*(_f+xe*(Kf+Nc*xe)))]}Ch.invert=function(Xt,ae){ae>hu?ae=hu:ae<-hu&&(ae=-hu);var xe=ae,Ae;do{var je=xe*xe;xe-=Ae=(xe*(Yf+je*je*(_f+je*(Kf+Nc*je)))-ae)/(Xf+je*je*(Ou+je*(jc+Wh*je)))}while(S(Ae)>u);return[Xt,xe]};function Mc(){return g.geoProjection(Ch).scale(139.319)}function Uc(Xt,ae){if(S(ae)u&&--je>0);return $e=T(Ae),[(S(ae)=0;)if(Ae=ae[wr],xe[0]===Ae[0]&&xe[1]===Ae[1]){if(Oe)return[Oe,xe];Oe=xe}}}function Qc(Xt){for(var ae=Xt.length,xe=[],Ae=Xt[ae-1],je=0;je0?[-Ae[0],0]:[180-Ae[0],180])};var ae=yh.map(function(xe){return{face:xe,project:Xt(xe)}});return[-1,0,0,1,0,1,4,5].forEach(function(xe,Ae){var je=ae[xe];je&&(je.children||(je.children=[])).push(ae[Ae])}),cf(ae[0],function(xe,Ae){return ae[xe<-_/2?Ae<0?6:4:xe<0?Ae<0?2:0:xe<_/2?Ae<0?3:1:Ae<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function yu(Xt){Xt=Xt||function($e){var wr=$e.length===6?g.geoCentroid({type:"MultiPoint",coordinates:$e}):$e[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-wr[0],-wr[1]])};var ae=yh.map(function($e){for(var wr=$e.map(nf),Or=wr.length,Nr=wr[Or-1],en,vn=[],In=0;InAe^Nn>Ae&&xe<(In-Nr)*(Ae-en)/(Nn-en)+Nr&&(je=!je)}return je}function gc(Xt,ae){var xe=ae.stream,Ae;if(!xe)throw new Error("invalid projection");switch(Xt&&Xt.type){case"Feature":Ae=eh;break;case"FeatureCollection":Ae=Jf;break;default:Ae=xh;break}return Ae(Xt,xe)}function Jf(Xt,ae){return{type:"FeatureCollection",features:Xt.features.map(function(xe){return eh(xe,ae)})}}function eh(Xt,ae){return{type:"Feature",id:Xt.id,properties:Xt.properties,geometry:xh(Xt.geometry,ae)}}function Ph(Xt,ae){return{type:"GeometryCollection",geometries:Xt.geometries.map(function(xe){return xh(xe,ae)})}}function xh(Xt,ae){if(!Xt)return null;if(Xt.type==="GeometryCollection")return Ph(Xt,ae);var xe;switch(Xt.type){case"Point":xe=_h;break;case"MultiPoint":xe=_h;break;case"LineString":xe=df;break;case"MultiLineString":xe=df;break;case"Polygon":xe=bh;break;case"MultiPolygon":xe=bh;break;case"Sphere":xe=bh;break;default:return null}return g.geoStream(Xt,ae(xe)),xe.result()}var Bu=[],iu=[],_h={point:function(Xt,ae){Bu.push([Xt,ae])},result:function(){var Xt=Bu.length?Bu.length<2?{type:"Point",coordinates:Bu[0]}:{type:"MultiPoint",coordinates:Bu}:null;return Bu=[],Xt}},df={lineStart:Zh,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){Bu.length&&(iu.push(Bu),Bu=[])},result:function(){var Xt=iu.length?iu.length<2?{type:"LineString",coordinates:iu[0]}:{type:"MultiLineString",coordinates:iu}:null;return iu=[],Xt}},bh={polygonStart:Zh,lineStart:Zh,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){var Xt=Bu.length;if(Xt){do Bu.push(Bu[0].slice());while(++Xt<4);iu.push(Bu),Bu=[]}},polygonEnd:Zh,result:function(){if(!iu.length)return null;var Xt=[],ae=[];return iu.forEach(function(xe){wf(xe)?Xt.push([xe]):ae.push(xe)}),ae.forEach(function(xe){var Ae=xe[0];Xt.some(function(je){if(Pd(je[0],Ae))return je.push(xe),!0})||Xt.push([xe])}),iu=[],Xt.length?Xt.length>1?{type:"MultiPolygon",coordinates:Xt}:{type:"Polygon",coordinates:Xt[0]}:null}};function Wf(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function xe(Ae,je){var Oe=S(Ae)0?Ae-_:Ae+_,je),wr=($e[0]-$e[1])*C,Or=($e[0]+$e[1])*C;if(Oe)return[wr,Or];var Nr=ae*C,en=wr>0^Or>0?-1:1;return[en*wr-y(Or)*Nr,en*Or-y(wr)*Nr]}return Xt.invert&&(xe.invert=function(Ae,je){var Oe=(Ae+je)*C,$e=(je-Ae)*C,wr=S(Oe)<.5*ae&&S($e)<.5*ae;if(!wr){var Or=ae*C,Nr=Oe>0^$e>0?-1:1,en=-Nr*Ae+($e>0?1:-1)*Or,vn=-Nr*je+(Oe>0?1:-1)*Or;Oe=(-en-vn)*C,$e=(en-vn)*C}var In=Xt.invert(Oe,$e);return wr||(In[0]+=Oe>0?_:-_),In}),g.geoProjection(xe).rotate([-90,-90,45]).clipAngle(180-.001)}function gr(){return Wf(En).scale(176.423)}function Ur(){return Wf(Fo).scale(111.48)}function wn(Xt,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function xe(Nr){var en=Nr.length,vn=2,In=new Array(en);for(In[0]=+Nr[0].toFixed(ae),In[1]=+Nr[1].toFixed(ae);vn2||Nn[0]!=en[0]||Nn[1]!=en[1])&&(vn.push(Nn),en=Nn)}return vn.length===1&&Nr.length>1&&vn.push(xe(Nr[Nr.length-1])),vn}function Oe(Nr){return Nr.map(je)}function $e(Nr){if(Nr==null)return Nr;var en;switch(Nr.type){case"GeometryCollection":en={type:"GeometryCollection",geometries:Nr.geometries.map($e)};break;case"Point":en={type:"Point",coordinates:xe(Nr.coordinates)};break;case"MultiPoint":en={type:Nr.type,coordinates:Ae(Nr.coordinates)};break;case"LineString":en={type:Nr.type,coordinates:je(Nr.coordinates)};break;case"MultiLineString":case"Polygon":en={type:Nr.type,coordinates:Oe(Nr.coordinates)};break;case"MultiPolygon":en={type:"MultiPolygon",coordinates:Nr.coordinates.map(Oe)};break;default:return Nr}return Nr.bbox!=null&&(en.bbox=Nr.bbox),en}function wr(Nr){var en={type:"Feature",properties:Nr.properties,geometry:$e(Nr.geometry)};return Nr.id!=null&&(en.id=Nr.id),Nr.bbox!=null&&(en.bbox=Nr.bbox),en}if(Xt!=null)switch(Xt.type){case"Feature":return wr(Xt);case"FeatureCollection":{var Or={type:"FeatureCollection",features:Xt.features.map(wr)};return Xt.bbox!=null&&(Or.bbox=Xt.bbox),Or}default:return $e(Xt)}return Xt}function hn(Xt){var ae=v(Xt);function xe(Ae,je){var Oe=ae?T(Ae*ae/2)/ae:Ae/2;if(!je)return[2*Oe,-Xt];var $e=2*t(Oe*v(je)),wr=1/T(je);return[v($e)*wr,je+(1-r($e))*wr-Xt]}return xe.invert=function(Ae,je){if(S(je+=Xt)u&&--wr>0);var In=Ae*(Nr=T($e)),Nn=T(S(je)0?P:-P)*(Or+je*(en-$e)/2+je*je*(en-2*Or+$e)/2)]}aa.invert=function(Xt,ae){var xe=ae/P,Ae=xe*90,je=l(18,S(Ae/5)),Oe=i(0,n(je));do{var $e=di[Oe][1],wr=di[Oe+1][1],Or=di[l(19,Oe+2)][1],Nr=Or-$e,en=Or-2*wr+$e,vn=2*(S(xe)-wr)/Nr,In=en/Nr,Nn=vn*(1-In*vn*(1-2*In*vn));if(Nn>=0||Oe===1){Ae=(ae>=0?5:-5)*(Nn+je);var ii=50,Ui;do je=l(18,S(Ae)/5),Oe=n(je),Nn=je-Oe,$e=di[Oe][1],wr=di[Oe+1][1],Or=di[l(19,Oe+2)][1],Ae-=(Ui=(ae>=0?P:-P)*(wr+Nn*(Or-$e)/2+Nn*Nn*(Or-2*wr+$e)/2)-ae)*k;while(S(Ui)>b&&--ii>0);break}}while(--Oe>=0);var pa=di[Oe][0],fa=di[Oe+1][0],Ta=di[l(19,Oe+2)][0];return[Xt/(fa+Nn*(Ta-pa)/2+Nn*Nn*(Ta-2*fa+pa)/2),Ae*w]};function va(){return g.geoProjection(aa).scale(152.63)}function Ba(Xt){function ae(xe,Ae){var je=r(Ae),Oe=(Xt-1)/(Xt-je*r(xe));return[Oe*je*v(xe),Oe*v(Ae)]}return ae.invert=function(xe,Ae){var je=xe*xe+Ae*Ae,Oe=V(je),$e=(Xt-V(1-je*(Xt+1)/(Xt-1)))/((Xt-1)/Oe+Oe/(Xt-1));return[e(xe*$e,Oe*V(1-$e*$e)),Oe?O(Ae*$e/Oe):0]},ae}function Za(Xt,ae){var xe=Ba(Xt);if(!ae)return xe;var Ae=r(ae),je=v(ae);function Oe($e,wr){var Or=xe($e,wr),Nr=Or[1],en=Nr*je/(Xt-1)+Ae;return[Or[0]*Ae/en,Nr/en]}return Oe.invert=function($e,wr){var Or=(Xt-1)/(Xt-1-wr*je);return xe.invert(Or*$e,Or*wr*Ae)},Oe}function ca(){var Xt=2,ae=0,xe=g.geoProjectionMutator(Za),Ae=xe(Xt,ae);return Ae.distance=function(je){return arguments.length?xe(Xt=+je,ae):Xt},Ae.tilt=function(je){return arguments.length?xe(Xt,ae=je*w):ae*k},Ae.scale(432.147).clipAngle(j(1/Xt)*k-1e-6)}var Oa=1e-4,ka=1e4,na=-180,io=na+Oa,ns=180,Ko=ns-Oa,ls=-90,ps=ls+Oa,oo=90,qa=oo-Oa;function gs(Xt){return Xt.length>0}function el(Xt){return Math.floor(Xt*ka)/ka}function Pl(Xt){return Xt===ls||Xt===oo?[0,Xt]:[na,el(Xt)]}function su(Xt){var ae=Xt[0],xe=Xt[1],Ae=!1;return ae<=io?(ae=na,Ae=!0):ae>=Ko&&(ae=ns,Ae=!0),xe<=ps?(xe=ls,Ae=!0):xe>=qa&&(xe=oo,Ae=!0),Ae?[ae,xe]:Xt}function $l(Xt){return Xt.map(su)}function lu(Xt,ae,xe){for(var Ae=0,je=Xt.length;Ae=Ko||en<=ps||en>=qa){Oe[$e]=su(Or);for(var vn=$e+1;vnio&&Nnps&&ii=wr)break;xe.push({index:-1,polygon:ae,ring:Oe=Oe.slice(vn-1)}),Oe[0]=Pl(Oe[0][1]),$e=-1,wr=Oe.length}}}}function ml(Xt){var ae,xe=Xt.length,Ae={},je={},Oe,$e,wr,Or,Nr;for(ae=0;ae0?_-wr:wr)*k],Nr=g.geoProjection(Xt($e)).rotate(Or),en=g.geoRotation(Or),vn=Nr.center;return delete Nr.rotate,Nr.center=function(In){return arguments.length?vn(en(In)):en.invert(vn())},Nr.clipAngle(90)}function Rl(Xt){var ae=r(Xt);function xe(Ae,je){var Oe=g.geoGnomonicRaw(Ae,je);return Oe[0]*=ae,Oe}return xe.invert=function(Ae,je){return g.geoGnomonicRaw.invert(Ae/ae,je)},xe}function vc(){return Hc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Hc(Xt,ae){return Kl(Rl,Xt,ae)}function Lc(Xt){if(!(Xt*=2))return g.geoAzimuthalEquidistantRaw;var ae=-Xt/2,xe=-ae,Ae=Xt*Xt,je=T(xe),Oe=.5/v(xe);function $e(wr,Or){var Nr=j(r(Or)*r(wr-ae)),en=j(r(Or)*r(wr-xe)),vn=Or<0?-1:1;return Nr*=Nr,en*=en,[(Nr-en)/(2*Xt),vn*V(4*Ae*en-(Ae-Nr+en)*(Ae-Nr+en))/(2*Xt)]}return $e.invert=function(wr,Or){var Nr=Or*Or,en=r(V(Nr+(In=wr+ae)*In)),vn=r(V(Nr+(In=wr+xe)*In)),In,Nn;return[e(Nn=en-vn,In=(en+vn)*je),(Or<0?-1:1)*j(V(In*In+Nn*Nn)*Oe)]},$e}function Ih(){return Wc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Wc(Xt,ae){return Kl(Lc,Xt,ae)}function zh(Xt,ae){if(S(ae)u&&--wr>0);return[y(Xt)*(V(je*je+4)+je)*_/4,P*$e]};function qf(){return g.geoProjection($u).scale(127.16)}function $t(Xt,ae,xe,Ae,je){function Oe($e,wr){var Or=xe*v(Ae*wr),Nr=V(1-Or*Or),en=V(2/(1+Nr*r($e*=je)));return[Xt*Nr*en*v($e),ae*Or*en]}return Oe.invert=function($e,wr){var Or=$e/Xt,Nr=wr/ae,en=V(Or*Or+Nr*Nr),vn=2*O(en/2);return[e($e*T(vn),Xt*en)/je,en&&O(wr*v(vn)/(ae*xe*en))/Ae]},Oe}function z(Xt,ae,xe,Ae){var je=_/3;Xt=i(Xt,u),ae=i(ae,u),Xt=l(Xt,P),ae=l(ae,_-u),xe=i(xe,0),xe=l(xe,100-u),Ae=i(Ae,u);var Oe=xe/100+1,$e=Ae/100,wr=j(Oe*r(je))/je,Or=v(Xt)/v(wr*P),Nr=ae/_,en=V($e*v(Xt/2)/v(ae/2)),vn=en/V(Nr*Or*wr),In=1/(en*V(Nr*Or*wr));return $t(vn,In,Or,wr,Nr)}function ht(){var Xt=65*w,ae=60*w,xe=20,Ae=200,je=g.geoProjectionMutator(z),Oe=je(Xt,ae,xe,Ae);return Oe.poleline=function($e){return arguments.length?je(Xt=+$e*w,ae,xe,Ae):Xt*k},Oe.parallels=function($e){return arguments.length?je(Xt,ae=+$e*w,xe,Ae):ae*k},Oe.inflation=function($e){return arguments.length?je(Xt,ae,xe=+$e,Ae):xe},Oe.ratio=function($e){return arguments.length?je(Xt,ae,xe,Ae=+$e):Ae},Oe.scale(163.775)}function Et(){return ht().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var zt=4*_+3*V(3),Ht=2*V(2*_*V(3)/zt),ke=pe(Ht*V(3)/_,Ht,zt/6);function Fe(){return g.geoProjection(ke).scale(176.84)}function Ke(Xt,ae){return[Xt*V(1-3*ae*ae/(_*_)),ae]}Ke.invert=function(Xt,ae){return[Xt/V(1-3*ae*ae/(_*_)),ae]};function vr(){return g.geoProjection(Ke).scale(152.63)}function Dr(Xt,ae){var xe=r(ae),Ae=r(Xt)*xe,je=1-Ae,Oe=r(Xt=e(v(Xt)*xe,-v(ae))),$e=v(Xt);return xe=V(1-Ae*Ae),[$e*xe-Oe*je,-Oe*xe-$e*je]}Dr.invert=function(Xt,ae){var xe=(Xt*Xt+ae*ae)/-2,Ae=V(-xe*(2+xe)),je=ae*xe+Xt*Ae,Oe=Xt*xe-ae*Ae,$e=V(Oe*Oe+je*je);return[e(Ae*je,$e*(1+xe)),$e?-O(Ae*Oe/$e):0]};function Fr(){return g.geoProjection(Dr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function un(Xt,ae){var xe=yt(Xt,ae);return[(xe[0]+Xt/P)/2,(xe[1]+ae)/2]}un.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=25;do{var Oe=r(Ae),$e=v(Ae),wr=v(2*Ae),Or=$e*$e,Nr=Oe*Oe,en=v(xe),vn=r(xe/2),In=v(xe/2),Nn=In*In,ii=1-Nr*vn*vn,Ui=ii?j(Oe*vn)*V(pa=1/ii):pa=0,pa,fa=.5*(2*Ui*Oe*In+xe/P)-Xt,Ta=.5*(Ui*$e+Ae)-ae,so=.5*pa*(Nr*Nn+Ui*Oe*vn*Or)+.5/P,Bo=pa*(en*wr/4-Ui*$e*In),So=.125*pa*(wr*In-Ui*$e*Nr*en),ds=.5*pa*(Or*vn+Ui*Nn*Oe)+.5,fl=Bo*So-ds*so,vl=(Ta*Bo-fa*ds)/fl,Ds=(fa*So-Ta*so)/fl;xe-=vl,Ae-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[xe,Ae]};function Sn(){return g.geoProjection(un).scale(158.837)}c.geoNaturalEarth=g.geoNaturalEarth1,c.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,c.geoAiry=lt,c.geoAiryRaw=J,c.geoAitoff=mt,c.geoAitoffRaw=yt,c.geoArmadillo=tt,c.geoArmadilloRaw=st,c.geoAugust=rt,c.geoAugustRaw=dt,c.geoBaker=Y,c.geoBakerRaw=it,c.geoBerghaus=ut,c.geoBerghausRaw=ft,c.geoBertin1953=ge,c.geoBertin1953Raw=Jt,c.geoBoggs=ve,c.geoBoggsRaw=ee,c.geoBonne=cr,c.geoBonneRaw=Ge,c.geoBottomley=jr,c.geoBottomleyRaw=ur,c.geoBromley=br,c.geoBromleyRaw=Wr,c.geoChamberlin=gt,c.geoChamberlinRaw=Gt,c.geoChamberlinAfrica=Ct,c.geoCollignon=Nt,c.geoCollignonRaw=St,c.geoCraig=le,c.geoCraigRaw=re,c.geoCraster=qe,c.geoCrasterRaw=Ue,c.geoCylindricalEqualArea=Sr,c.geoCylindricalEqualAreaRaw=or,c.geoCylindricalStereographic=mr,c.geoCylindricalStereographicRaw=Ar,c.geoEckert1=Hn,c.geoEckert1Raw=Qr,c.geoEckert2=Xn,c.geoEckert2Raw=Wn,c.geoEckert3=oi,c.geoEckert3Raw=Ii,c.geoEckert4=sa,c.geoEckert4Raw=$n,c.geoEckert5=We,c.geoEckert5Raw=Zi,c.geoEckert6=fr,c.geoEckert6Raw=nr,c.geoEisenlohr=Cn,c.geoEisenlohrRaw=tn,c.geoFahey=fi,c.geoFaheyRaw=Mn,c.geoFoucaut=Oi,c.geoFoucautRaw=ki,c.geoFoucautSinusoidal=Xi,c.geoFoucautSinusoidalRaw=ji,c.geoGilbert=Wa,c.geoGingery=$r,c.geoGingeryRaw=ze,c.geoGinzburg4=Yr,c.geoGinzburg4Raw=Br,c.geoGinzburg5=on,c.geoGinzburg5Raw=pn,c.geoGinzburg6=dr,c.geoGinzburg6Raw=Ce,c.geoGinzburg8=_n,c.geoGinzburg8Raw=Hr,c.geoGinzburg9=Qn,c.geoGinzburg9Raw=Fn,c.geoGringorten=Vi,c.geoGringortenRaw=En,c.geoGuyou=os,c.geoGuyouRaw=Fo,c.geoHammer=Pt,c.geoHammerRaw=kt,c.geoHammerRetroazimuthal=Ks,c.geoHammerRetroazimuthalRaw=ul,c.geoHealpix=kl,c.geoHealpixRaw=Nl,c.geoHill=Jl,c.geoHillRaw=ql,c.geoHomolosine=Xo,c.geoHomolosineRaw=Ql,c.geoHufnagel=al,c.geoHufnagelRaw=Gl,c.geoHyperelliptical=Ms,c.geoHyperellipticalRaw=lo,c.geoInterrupt=ts,c.geoInterruptedBoggs=Gu,c.geoInterruptedHomolosine=Dl,c.geoInterruptedMollweide=nu,c.geoInterruptedMollweideHemispheres=mh,c.geoInterruptedSinuMollweide=ah,c.geoInterruptedSinusoidal=Sf,c.geoKavrayskiy7=Bc,c.geoKavrayskiy7Raw=Fl,c.geoLagrange=hc,c.geoLagrangeRaw=Nf,c.geoLarrivee=oh,c.geoLarriveeRaw=fc,c.geoLaskowski=sc,c.geoLaskowskiRaw=cu,c.geoLittrow=Yl,c.geoLittrowRaw=rl,c.geoLoximuthal=Cc,c.geoLoximuthalRaw=Sh,c.geoMiller=_u,c.geoMillerRaw=Uh,c.geoModifiedStereographic=lc,c.geoModifiedStereographicRaw=Ed,c.geoModifiedStereographicAlaska=sh,c.geoModifiedStereographicGs48=rc,c.geoModifiedStereographicGs50=jf,c.geoModifiedStereographicMiller=Vh,c.geoModifiedStereographicLee=yf,c.geoMollweide=Tt,c.geoMollweideRaw=se,c.geoMtFlatPolarParabolic=Hh,c.geoMtFlatPolarParabolicRaw=xf,c.geoMtFlatPolarQuartic=Vf,c.geoMtFlatPolarQuarticRaw=Uf,c.geoMtFlatPolarSinusoidal=Gf,c.geoMtFlatPolarSinusoidalRaw=lh,c.geoNaturalEarth2=gh,c.geoNaturalEarth2Raw=Eh,c.geoNellHammer=rf,c.geoNellHammerRaw=uc,c.geoInterruptedQuarticAuthalic=eu,c.geoNicolosi=Cd,c.geoNicolosiRaw=Ef,c.geoPatterson=Mc,c.geoPattersonRaw=Ch,c.geoPolyconic=bu,c.geoPolyconicRaw=Uc,c.geoPolyhedral=cf,c.geoPolyhedralButterfly=wu,c.geoPolyhedralCollignon=fd,c.geoPolyhedralWaterman=yu,c.geoProject=gc,c.geoGringortenQuincuncial=gr,c.geoPeirceQuincuncial=Ur,c.geoPierceQuincuncial=Ur,c.geoQuantize=wn,c.geoQuincuncial=Wf,c.geoRectangularPolyconic=qn,c.geoRectangularPolyconicRaw=hn,c.geoRobinson=va,c.geoRobinsonRaw=aa,c.geoSatellite=ca,c.geoSatelliteRaw=Za,c.geoSinuMollweide=qs,c.geoSinuMollweideRaw=fo,c.geoSinusoidal=He,c.geoSinusoidalRaw=Te,c.geoStitch=fu,c.geoTimes=Es,c.geoTimesRaw=Oo,c.geoTwoPointAzimuthal=Hc,c.geoTwoPointAzimuthalRaw=Rl,c.geoTwoPointAzimuthalUsa=vc,c.geoTwoPointEquidistant=Wc,c.geoTwoPointEquidistantRaw=Lc,c.geoTwoPointEquidistantUsa=Ih,c.geoVanDerGrinten=Du,c.geoVanDerGrintenRaw=zh,c.geoVanDerGrinten2=rs,c.geoVanDerGrinten2Raw=Oh,c.geoVanDerGrinten3=qc,c.geoVanDerGrinten3Raw=zs,c.geoVanDerGrinten4=qf,c.geoVanDerGrinten4Raw=$u,c.geoWagner=ht,c.geoWagner7=Et,c.geoWagnerRaw=z,c.geoWagner4=Fe,c.geoWagner4Raw=ke,c.geoWagner6=vr,c.geoWagner6Raw=Ke,c.geoWiechel=Fr,c.geoWiechelRaw=Dr,c.geoWinkel3=Sn,c.geoWinkel3Raw=un,Object.defineProperty(c,"__esModule",{value:!0})})}),XU=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Jo(),S=Math.PI/180,t=180/Math.PI,e={cursor:"pointer"},r={cursor:"auto"};function a(k,w){var R=k.projection,O;return w._isScoped?O=i:w._isClipped?O=f:O=l,O(k,R)}Z.exports=a;function n(k,w){return c.behavior.zoom().translate(w.translate()).scale(w.scale())}function o(k,w,R){var O=k.id,j=k.graphDiv,V=j.layout,H=V[O],F=j._fullLayout,U=F[O],W={},q={};function J(lt,yt){W[O+"."+lt]=g.nestedProperty(H,lt).get(),I.call("_storeDirectGUIEdit",V,F._preGUI,W);var mt=g.nestedProperty(U,lt);mt.get()!==yt&&(mt.set(yt),g.nestedProperty(H,lt).set(yt),q[O+"."+lt]=yt)}R(J),J("projection.scale",w.scale()/k.fitScale),J("fitbounds",!1),j.emit("plotly_relayout",q)}function i(k,w){var R=n(k,w);function O(){c.select(this).style(e)}function j(){w.scale(c.event.scale).translate(c.event.translate),k.render(!0);var F=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function V(F){var U=w.invert(k.midPt);F("center.lon",U[0]),F("center.lat",U[1])}function H(){c.select(this).style(r),o(k,w,V)}return R.on("zoomstart",O).on("zoom",j).on("zoomend",H),R}function l(k,w){var R=n(k,w),O=2,j,V,H,F,U,W,q,J,lt;function yt(at){return w.invert(at)}function mt(at){var vt=yt(at);if(!vt)return!0;var it=w(vt);return Math.abs(it[0]-at[0])>O||Math.abs(it[1]-at[1])>O}function st(){c.select(this).style(e),j=c.mouse(this),V=w.rotate(),H=w.translate(),F=V,U=yt(j)}function tt(){if(W=c.mouse(this),mt(j)){R.scale(w.scale()),R.translate(w.translate());return}w.scale(c.event.scale),w.translate([H[0],c.event.translate[1]]),U?yt(W)&&(J=yt(W),q=[F[0]+(J[0]-U[0]),V[1],V[2]],w.rotate(q),F=q):(j=W,U=yt(j)),lt=!0,k.render(!0);var at=w.rotate(),vt=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":vt[0],"geo.center.lat":vt[1],"geo.projection.rotation.lon":-at[0]})}function dt(){c.select(this).style(r),lt&&o(k,w,rt)}function rt(at){var vt=w.rotate(),it=w.invert(k.midPt);at("projection.rotation.lon",-vt[0]),at("center.lon",it[0]),at("center.lat",it[1])}return R.on("zoomstart",st).on("zoom",tt).on("zoomend",dt),R}function f(k,w){w.rotate(),w.scale();var R=n(k,w),O=p(R,"zoomstart","zoom","zoomend"),j=0,V=R.on,H;R.on("zoomstart",function(){c.select(this).style(e);var J=c.mouse(this),lt=w.rotate(),yt=lt,mt=w.translate(),st=y(lt);H=x(w,J),V.call(R,"zoom",function(){var tt=c.mouse(this);if(w.scale(c.event.scale),!H)J=tt,H=x(w,J);else if(x(w,tt)){w.rotate(lt).translate(mt);var dt=x(w,tt),rt=T(H,dt),at=M(v(st,rt)),vt=u(at,H,yt);(!isFinite(vt[0])||!isFinite(vt[1])||!isFinite(vt[2]))&&(vt=yt),w.rotate(vt),yt=vt}U(O.of(this,arguments))}),F(O.of(this,arguments))}).on("zoomend",function(){c.select(this).style(r),V.call(R,"zoom",null),W(O.of(this,arguments)),o(k,w,q)}).on("zoom.redraw",function(){k.render(!0);var J=w.rotate();k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.projection.rotation.lon":-J[0],"geo.projection.rotation.lat":-J[1]})});function F(J){j++||J({type:"zoomstart"})}function U(J){J({type:"zoom"})}function W(J){--j||J({type:"zoomend"})}function q(J){var lt=w.rotate();J("projection.rotation.lon",-lt[0]),J("projection.rotation.lat",-lt[1])}return c.rebind(R,O,"on")}function x(k,w){var R=k.invert(w);return R&&isFinite(R[0])&&isFinite(R[1])&&C(R)}function y(k){var w=.5*k[0]*S,R=.5*k[1]*S,O=.5*k[2]*S,j=Math.sin(w),V=Math.cos(w),H=Math.sin(R),F=Math.cos(R),U=Math.sin(O),W=Math.cos(O);return[V*F*W+j*H*U,j*F*W-V*H*U,V*H*W+j*F*U,V*F*U-j*H*W]}function v(k,w){var R=k[0],O=k[1],j=k[2],V=k[3],H=w[0],F=w[1],U=w[2],W=w[3];return[R*H-O*F-j*U-V*W,R*F+O*H+j*W-V*U,R*U-O*W+j*H+V*F,R*W+O*U-j*F+V*H]}function T(k,w){if(!(!k||!w)){var R=h(k,w),O=Math.sqrt(A(R,R)),j=.5*Math.acos(Math.max(-1,Math.min(1,A(k,w)))),V=Math.sin(j)/O;return O&&[Math.cos(j),R[2]*V,-R[1]*V,R[0]*V]}}function u(k,w,R){var O=P(w,2,k[0]);O=P(O,1,k[1]),O=P(O,0,k[2]-R[2]);var j=w[0],V=w[1],H=w[2],F=O[0],U=O[1],W=O[2],q=Math.atan2(V,j)*t,J=Math.sqrt(j*j+V*V),lt,yt;Math.abs(U)>J?(yt=(U>0?90:-90)-q,lt=0):(yt=Math.asin(U/J)*t-q,lt=Math.sqrt(J*J-U*U));var mt=180-yt-2*q,st=(Math.atan2(W,F)-Math.atan2(H,lt))*t,tt=(Math.atan2(W,F)-Math.atan2(H,-lt))*t,dt=b(R[0],R[1],yt,st),rt=b(R[0],R[1],mt,tt);return dt<=rt?[yt,st,R[2]]:[mt,tt,R[2]]}function b(k,w,R,O){var j=_(R-k),V=_(O-w);return Math.sqrt(j*j+V*V)}function _(k){return(k%360+540)%360-180}function P(k,w,R){var O=R*S,j=k.slice(),V=w===0?1:0,H=w===2?1:2,F=Math.cos(O),U=Math.sin(O);return j[V]=k[V]*F-k[H]*U,j[H]=k[H]*F+k[V]*U,j}function M(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*t,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*t]}function C(k){var w=k[0]*S,R=k[1]*S,O=Math.cos(R);return[O*Math.cos(w),O*Math.sin(w),Math.sin(R)]}function A(k,w){for(var R=0,O=0,j=k.length;O{var c=qr(),g=PS(),I=g.geoPath,S=g.geoDistance,t=KU(),e=Jo(),r=kn(),a=r.strTranslate,n=hi(),o=Vs(),i=tf(),l=Kc(),f=Ls(),x=Y0().getAutoRange,y=up(),v=vf().prepSelect,T=vf().clearOutline,u=vf().selectOnClick,b=XU(),_=w3(),P=W1(),M=eT(),C=ES().feature;function A(R){this.id=R.id,this.graphDiv=R.graphDiv,this.container=R.container,this.topojsonURL=R.topojsonURL,this.isStatic=R.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var h=A.prototype;Z.exports=function(R){return new A(R)},h.plot=function(R,O,j,V){var H=this;if(V)return H.update(R,O,!0);H._geoCalcData=R,H._fullLayout=O;var F=O[this.id],U=[],W=!1;for(var q in _.layerNameToAdjective)if(q!=="frame"&&F["show"+q]){W=!0;break}for(var J=!1,lt=0;lt0&&U._module.calcGeoJSON(F,O)}if(!j){var W=this.updateProjection(R,O);if(W)return;(!this.viewInitial||this.scope!==V.scope)&&this.saveViewInitial(V)}this.scope=V.scope,this.updateBaseLayers(O,V),this.updateDims(O,V),this.updateFx(O,V),l.generalUpdatePerTraceModule(this.graphDiv,this,R,V);var q=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=q.selectAll(".point"),this.dataPoints.text=q.selectAll("text"),this.dataPaths.line=q.selectAll(".js-line");var J=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=J.selectAll("path"),this._render()},h.updateProjection=function(R,O){var j=this.graphDiv,V=O[this.id],H=O._size,F=V.domain,U=V.projection,W=V.lonaxis,q=V.lataxis,J=W._ax,lt=q._ax,yt=this.projection=p(V),mt=[[H.l+H.w*F.x[0],H.t+H.h*(1-F.y[1])],[H.l+H.w*F.x[1],H.t+H.h*(1-F.y[0])]],st=V.center||{},tt=U.rotation||{},dt=W.range||[],rt=q.range||[];if(V.fitbounds){J._length=mt[1][0]-mt[0][0],lt._length=mt[1][1]-mt[0][1],J.range=x(j,J),lt.range=x(j,lt);var at=(J.range[0]+J.range[1])/2,vt=(lt.range[0]+lt.range[1])/2;if(V._isScoped)st={lon:at,lat:vt};else if(V._isClipped){st={lon:at,lat:vt},tt={lon:at,lat:vt,roll:tt.roll};var it=U.type,Y=_.lonaxisSpan[it]/2||180,ft=_.lataxisSpan[it]/2||90;dt=[at-Y,at+Y],rt=[vt-ft,vt+ft]}else st={lon:at,lat:vt},tt={lon:at,lat:tt.lat,roll:tt.roll}}yt.center([st.lon-tt.lon,st.lat-tt.lat]).rotate([-tt.lon,-tt.lat,tt.roll]).parallels(U.parallels);var ut=w(dt,rt);yt.fitExtent(mt,ut);var kt=this.bounds=yt.getBounds(ut),It=this.fitScale=yt.scale(),Pt=yt.translate();if(V.fitbounds){var qt=yt.getBounds(w(J.range,lt.range)),Wt=Math.min((kt[1][0]-kt[0][0])/(qt[1][0]-qt[0][0]),(kt[1][1]-kt[0][1])/(qt[1][1]-qt[0][1]));isFinite(Wt)?yt.scale(Wt*It):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else yt.scale(U.scale*It);var Jt=this.midPt=[(kt[0][0]+kt[1][0])/2,(kt[0][1]+kt[1][1])/2];if(yt.translate([Pt[0]+(Jt[0]-Pt[0]),Pt[1]+(Jt[1]-Pt[1])]).clipExtent(kt),V._isAlbersUsa){var ge=yt([st.lon,st.lat]),fe=yt.translate();yt.translate([fe[0]-(ge[0]-fe[0]),fe[1]-(ge[1]-fe[1])])}},h.updateBaseLayers=function(R,O){var j=this,V=j.topojson,H=j.layers,F=j.basePaths;function U(mt){return mt==="lonaxis"||mt==="lataxis"}function W(mt){return!!_.lineLayers[mt]}function q(mt){return!!_.fillLayers[mt]}var J=this.hasChoropleth?_.layersForChoropleth:_.layers,lt=J.filter(function(mt){return W(mt)||q(mt)?O["show"+mt]:U(mt)?O[mt].showgrid:!0}),yt=j.framework.selectAll(".layer").data(lt,String);yt.exit().each(function(mt){delete H[mt],delete F[mt],c.select(this).remove()}),yt.enter().append("g").attr("class",function(mt){return"layer "+mt}).each(function(mt){var st=H[mt]=c.select(this);mt==="bg"?j.bgRect=st.append("rect").style("pointer-events","all"):U(mt)?F[mt]=st.append("path").style("fill","none"):mt==="backplot"?st.append("g").classed("choroplethlayer",!0):mt==="frontplot"?st.append("g").classed("scatterlayer",!0):W(mt)?F[mt]=st.append("path").style("fill","none").style("stroke-miterlimit",2):q(mt)&&(F[mt]=st.append("path").style("stroke","none"))}),yt.order(),yt.each(function(mt){var st=F[mt],tt=_.layerNameToAdjective[mt];mt==="frame"?st.datum(_.sphereSVG):W(mt)||q(mt)?st.datum(C(V,V.objects[mt])):U(mt)&&st.datum(k(mt,O,R)).call(n.stroke,O[mt].gridcolor).call(o.dashLine,O[mt].griddash,O[mt].gridwidth),W(mt)?st.call(n.stroke,O[tt+"color"]).call(o.dashLine,"",O[tt+"width"]):q(mt)&&st.call(n.fill,O[tt+"color"])})},h.updateDims=function(R,O){var j=this.bounds,V=(O.framewidth||0)/2,H=j[0][0]-V,F=j[0][1]-V,U=j[1][0]-H+V,W=j[1][1]-F+V;o.setRect(this.clipRect,H,F,U,W),this.bgRect.call(o.setRect,H,F,U,W).call(n.fill,O.bgcolor),this.xaxis._offset=H,this.xaxis._length=U,this.yaxis._offset=F,this.yaxis._length=W},h.updateFx=function(R,O){var j=this,V=j.graphDiv,H=j.bgRect,F=R.dragmode,U=R.clickmode;if(j.isStatic)return;function W(){var yt=j.viewInitial,mt={};for(var st in yt)mt[j.id+"."+st]=yt[st];e.call("_guiRelayout",V,mt),V.emit("plotly_doubleclick",null)}function q(yt){return j.projection.invert([yt[0]+j.xaxis._offset,yt[1]+j.yaxis._offset])}var J=function(yt,mt){if(mt.isRect){var st=yt.range={};st[j.id]=[q([mt.xmin,mt.ymin]),q([mt.xmax,mt.ymax])]}else{var tt=yt.lassoPoints={};tt[j.id]=mt.map(q)}},lt={element:j.bgRect.node(),gd:V,plotinfo:{id:j.id,xaxis:j.xaxis,yaxis:j.yaxis,fillRangeItems:J},xaxes:[j.xaxis],yaxes:[j.yaxis],subplot:j.id,clickFn:function(yt){yt===2&&T(V)}};F==="pan"?(H.node().onmousedown=null,H.call(b(j,O)),H.on("dblclick.zoom",W),V._context._scrollZoom.geo||H.on("wheel.zoom",null)):(F==="select"||F==="lasso")&&(H.on(".zoom",null),lt.prepFn=function(yt,mt,st){v(yt,mt,st,lt,F)},y.init(lt)),H.on("mousemove",function(){var yt=j.projection.invert(r.getPositionFromD3Event());if(!yt)return y.unhover(V,c.event);j.xaxis.p2c=function(){return yt[0]},j.yaxis.p2c=function(){return yt[1]},i.hover(V,c.event,j.id)}),H.on("mouseout",function(){V._dragging||y.unhover(V,c.event)}),H.on("click",function(){F!=="select"&&F!=="lasso"&&(U.indexOf("select")>-1&&u(c.event,V,[j.xaxis],[j.yaxis],j.id,lt),U.indexOf("event")>-1&&i.click(V,c.event))})},h.makeFramework=function(){var R=this,O=R.graphDiv,j=O._fullLayout,V="clip"+j._uid+R.id;R.clipDef=j._clips.append("clipPath").attr("id",V),R.clipRect=R.clipDef.append("rect"),R.framework=c.select(R.container).append("g").attr("class","geo "+R.id).call(o.setClipUrl,V,O),R.project=function(H){var F=R.projection(H);return F?[F[0]-R.xaxis._offset,F[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(H){return R.project(H)[0]}},R.yaxis={_id:"y",c2p:function(H){return R.project(H)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(R.mockAxis,j)},h.saveViewInitial=function(R){var O=R.center||{},j=R.projection,V=j.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":j.scale};var H;R._isScoped?H={"center.lon":O.lon,"center.lat":O.lat}:R._isClipped?H={"projection.rotation.lon":V.lon,"projection.rotation.lat":V.lat}:H={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":V.lon},r.extendFlat(this.viewInitial,H)},h.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},h._render=function(){var R=this.projection,O=R.getPath(),j;function V(F){var U=R(F.lonlat);return U?a(U[0],U[1]):null}function H(F){return R.isLonLatOverEdges(F.lonlat)?"none":null}for(j in this.basePaths)this.basePaths[j].attr("d",O);for(j in this.dataPaths)this.dataPaths[j].attr("d",function(F){return O(F.geojson)});for(j in this.dataPoints)this.dataPoints[j].attr("display",H).attr("transform",V)};function p(R){var O=R.projection,j=O.type,V=_.projNames[j];V="geo"+r.titleCase(V);for(var H=g[V]||t[V],F=H(),U=R._isSatellite?Math.acos(1/O.distance)*180/Math.PI:R._isClipped?_.lonaxisSpan[j]/2:null,W=["center","rotate","parallels","clipExtent"],q=function(yt){return yt?F:[]},J=0;Jtt}else return!1},F.getPath=function(){return I().projection(F)},F.getBounds=function(yt){return F.getPath().bounds(yt)},F.precision(_.precision),R._isSatellite&&F.tilt(O.tilt).distance(O.distance),U&&F.clipAngle(U-_.clipPad),F}function k(R,O,j){var V=1e-6,H=2.5,F=O[R],U=_.scopeDefaults[O.scope],W,q,J;R==="lonaxis"?(W=U.lonaxisRange,q=U.lataxisRange,J=function(vt,it){return[vt,it]}):R==="lataxis"&&(W=U.lataxisRange,q=U.lonaxisRange,J=function(vt,it){return[it,vt]});var lt={type:"linear",range:[W[0],W[1]-V],tick0:F.tick0,dtick:F.dtick};f.setConvert(lt,j);var yt=f.calcTicks(lt);!O.isScoped&&R==="lonaxis"&&yt.pop();for(var mt=yt.length,st=new Array(mt),tt=0;tt0&&H<0&&(H+=360);var W=(H-V)/4;return{type:"Polygon",coordinates:[[[V,F],[V,U],[V+W,U],[V+2*W,U],[V+3*W,U],[H,U],[H,F],[H-W,F],[H-2*W,F],[H-3*W,F],[V,F]]]}}}),IS=Dt((Q,Z)=>{var c=wi(),g=jh().attributes,I=kd().dash,S=w3(),t=Yc().overrideAll,e=G0(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:c.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:I},a=Z.exports=t({domain:g({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(S.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(S.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:c.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:S.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:S.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:S.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:S.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:c.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:c.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:c.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:c.background},lonaxis:r,lataxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}),QU=Dt((Q,Z)=>{var c=kn(),g=z1(),I=ud().getSubplotData,S=w3(),t=IS(),e=S.axesNames;Z.exports=function(a,n,o){g(a,n,o,{type:"geo",attributes:t,handleDefaults:r,fullData:o,partition:"y"})};function r(a,n,o,i){var l=I(i.fullData,"geo",i.id),f=l.map(function(rt){return rt.index}),x=o("resolution"),y=o("scope"),v=S.scopeDefaults[y],T=o("projection.type",v.projType),u=n._isAlbersUsa=T==="albers usa";u&&(y=n.scope="usa");var b=n._isScoped=y!=="world",_=n._isSatellite=T==="satellite",P=n._isConic=T.indexOf("conic")!==-1||T==="albers",M=n._isClipped=!!S.lonaxisSpan[T];if(a.visible===!1){var C=c.extendDeep({},n._template);C.showcoastlines=!1,C.showcountries=!1,C.showframe=!1,C.showlakes=!1,C.showland=!1,C.showocean=!1,C.showrivers=!1,C.showsubunits=!1,C.lonaxis&&(C.lonaxis.showgrid=!1),C.lataxis&&(C.lataxis.showgrid=!1),n._template=C}for(var A=o("visible"),h,p=0;p0&&q<0&&(q+=360);var J=(W+q)/2,lt;if(!u){var yt=b?v.projRotate:[J,0,0];lt=o("projection.rotation.lon",yt[0]),o("projection.rotation.lat",yt[1]),o("projection.rotation.roll",yt[2]),h=o("showcoastlines",!b&&A),h&&(o("coastlinecolor"),o("coastlinewidth")),h=o("showocean",A?void 0:!1),h&&o("oceancolor")}var mt,st;if(u?(mt=-96.6,st=38.7):(mt=b?J:lt,st=(U[0]+U[1])/2),o("center.lon",mt),o("center.lat",st),_&&(o("projection.tilt"),o("projection.distance")),P){var tt=v.projParallels||[0,60];o("projection.parallels",tt)}o("projection.scale"),h=o("showland",A?void 0:!1),h&&o("landcolor"),h=o("showlakes",A?void 0:!1),h&&o("lakecolor"),h=o("showrivers",A?void 0:!1),h&&(o("rivercolor"),o("riverwidth")),h=o("showcountries",b&&y!=="usa"&&A),h&&(o("countrycolor"),o("countrywidth")),(y==="usa"||y==="north america"&&x===50)&&(o("showsubunits",A),o("subunitcolor"),o("subunitwidth")),b||(h=o("showframe",A),h&&(o("framecolor"),o("framewidth"))),o("bgcolor");var dt=o("fitbounds");dt&&(delete n.projection.scale,b?(delete n.center.lon,delete n.center.lat):M?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}}),zS=Dt((Q,Z)=>{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=JU(),S="geo",t=g(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function r(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[S],x=0;x{Z.exports={attributes:vx(),supplyDefaults:UU(),colorbar:xo(),formatLabels:VU(),calc:tT(),calcGeoJSON:LS().calcGeoJSON,plot:LS().plot,style:CS(),styleOnSelect:_l().styleOnSelect,hoverPoints:ZU(),eventData:GU(),selectPoints:YU(),moduleType:"trace",name:"scattergeo",basePlotModule:zS(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}),eV=Dt((Q,Z)=>{Z.exports=tV()}),gb=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=vx(),S=kc(),t=Ho(),e=wi().defaultLine,r=Ia().extendFlat,a=I.marker.line;Z.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:I.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},I.geojson,{}),featureidkey:I.featureidkey,text:r({},I.text,{}),hovertext:r({},I.hovertext,{}),marker:{line:{color:r({},a.color,{dflt:e}),width:r({},a.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:I.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:I.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:c(),hovertemplatefallback:g(),showlegend:r({},t.showlegend,{dflt:!1})},S("",{cLetter:"z",editTypeOverride:"calc"}))}),rV=Dt((Q,Z)=>{var c=kn(),g=mc(),I=gb(),S=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(t,e,r,a){function n(v,T){return c.coerce(t,e,I,v,T)}var o=n("locations"),i=n("z");if(!(o&&o.length&&c.isArrayOrTypedArray(i)&&i.length)){e.visible=!1;return}e._length=Math.min(o.length,i.length);var l=n("geojson"),f;(typeof l=="string"&&l!==""||c.isPlainObject(l))&&(f="geojson-id");var x=n("locationmode",f);x==="country names"&&c.warn(S),x==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var y=n("marker.line.width");y&&n("marker.line.color"),n("marker.opacity"),g(t,e,a,n,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(e,n)}}),iT=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=Xd(),S=ct(),t=Bt();function e(r){return r&&typeof r=="string"}Z.exports=function(r,a){var n=a._length,o=new Array(n),i;a.geojson?i=function(v){return e(v)||c(v)}:i=e;for(var l=0;l{var c=qr(),g=hi(),I=Vs(),S=Xc();function t(a,n){n&&e(a,n)}function e(a,n){var o=n[0].trace,i=n[0].node3,l=i.selectAll(".choroplethlocation"),f=o.marker||{},x=f.line||{},y=S.makeColorScaleFuncFromTrace(o);l.each(function(v){c.select(this).attr("fill",y(v.z)).call(g.stroke,v.mlc||x.color).call(I.dashLine,"",v.mlw||x.width||0).style("opacity",f.opacity)}),I.selectedPointStyle(l,o)}function r(a,n){var o=n[0].node3,i=n[0].trace;i.selectedpoints?I.selectedPointStyle(o.selectAll(".choroplethlocation"),i):e(a,n)}Z.exports={style:t,styleOnSelect:r}}),OS=Dt((Q,Z)=>{var c=qr(),g=kn(),I=W1(),S=eT().getTopojsonFeatures,t=Y0().findExtremes,e=aT().style;function r(n,o,i){var l=o.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(l,i,"trace choropleth").each(function(f){var x=c.select(this),y=x.selectAll("path.choroplethlocation").data(g.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),e(n,f)})}function a(n,o){for(var i=n[0].trace,l=o[i.geo],f=l._subplot,x=i.locationmode,y=i._length,v=x==="geojson-id"?I.extractTraceFeature(n):S(i,f.topojson),T=[],u=[],b=0;b{var c=Ls(),g=gb(),I=kn().fillText;Z.exports=function(t,e,r){var a=t.cd,n=a[0].trace,o=t.subplot,i,l,f,x,y=[e,r],v=[e+360,r];for(l=0;l")}}}),sT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.location=g.location,c.z=g.z;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c.ct=e.ct,c}}),lT=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a,n,o,i;if(g===!1)for(r=0;r{Z.exports={attributes:gb(),supplyDefaults:rV(),colorbar:I1(),calc:iT(),calcGeoJSON:OS().calcGeoJSON,plot:OS().plot,style:aT().style,styleOnSelect:aT().styleOnSelect,hoverPoints:oT(),eventData:sT(),selectPoints:lT(),moduleType:"trace",name:"choropleth",basePlotModule:zS(),categories:["geo","noOpacity","showLegend"],meta:{}}}),iV=Dt((Q,Z)=>{Z.exports=nV()}),uT=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Fu();function S(e,r,a,n){var o=e.cd,i=o[0].t,l=o[0].trace,f=e.xa,x=e.ya,y=i.x,v=i.y,T=f.c2p(r),u=x.c2p(a),b=e.distance,_;if(i.tree){var P=f.p2c(T-b),M=f.p2c(T+b),C=x.p2c(u-b),A=x.p2c(u+b);n==="x"?_=i.tree.range(Math.min(P,M),Math.min(x._rl[0],x._rl[1]),Math.max(P,M),Math.max(x._rl[0],x._rl[1])):_=i.tree.range(Math.min(P,M),Math.min(C,A),Math.max(P,M),Math.max(C,A))}else _=i.ids;var h,p,k,w,R,O,j,V,H,F=b;if(n==="x"){var U=!!l.xperiodalignment,W=!!l.yperiodalignment;for(R=0;R<_.length;R++){if(h=_[R],k=y[h],O=Math.abs(f.c2p(k)-T),U){var q=f.c2p(l._xStarts[h]),J=f.c2p(l._xEnds[h]);O=T>=Math.min(q,J)&&T<=Math.max(q,J)?0:1/0}if(O=Math.min(lt,yt)&&u<=Math.max(lt,yt)?0:1/0}H=Math.sqrt(O*O+j*j),p=_[R]}}}else for(R=_.length-1;R>-1;R--)h=_[R],k=y[h],w=v[h],O=f.c2p(k)-T,j=x.c2p(w)-u,V=Math.sqrt(O*O+j*j),V{var c=20;Z.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c,SYMBOL_STROKE:c/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]}}}),T3=Dt((Q,Z)=>{var c=Ho(),g=da(),I=I0(),S=ef(),t=dh().axisHoverFormat,e=kc(),r=G0(),a=Ia().extendFlat,n=Yc().overrideAll,o=q1().DASHES,i=S.line,l=S.marker,f=l.line,x=Z.exports=n({x:S.x,x0:S.x0,dx:S.dx,y:S.y,y0:S.y0,dy:S.dy,xperiod:S.xperiod,yperiod:S.yperiod,xperiod0:S.xperiod0,yperiod0:S.yperiod0,xperiodalignment:S.xperiodalignment,yperiodalignment:S.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:S.text,hovertext:S.hovertext,textposition:S.textposition,textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(o),dflt:"solid"}},marker:a({},e("marker"),{symbol:l.symbol,angle:l.angle,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,opacity:l.opacity,colorbar:l.colorbar,line:a({},e("marker.line"),{width:f.width})}),connectgaps:S.connectgaps,fill:a({},S.fill,{dflt:"none"}),fillcolor:I(),selected:{marker:S.selected.marker,textfont:S.selected.textfont},unselected:{marker:S.unselected.marker,textfont:S.unselected.textfont},opacity:c.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=S.hovertemplate,x.hovertemplatefallback=S.hovertemplatefallback,x.texttemplate=S.texttemplate,x.texttemplatefallback=S.texttemplatefallback}),cT=Dt(Q=>{var Z=q1();Q.isOpenSymbol=function(c){return typeof c=="string"?Z.OPEN_RE.test(c):c%200>100},Q.isDotSymbol=function(c){return typeof c=="string"?Z.DOT_RE.test(c):c>200}}),aV=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=cT(),S=T3(),t=vm(),e=Tc(),r=Hm(),a=Rp(),n=s0(),o=z0(),i=O0(),l=x0();Z.exports=function(f,x,y,v){function T(h,p){return c.coerce(f,x,S,h,p)}var u=f.marker?I.isOpenSymbol(f.marker.symbol):!1,b=e.isBubble(f),_=r(f,x,v,T);if(!_){x.visible=!1;return}a(f,x,v,T),T("xhoverformat"),T("yhoverformat");var P=_{var c=Ws();Z.exports=function(g,I,S){var t=g.i;return"x"in g||(g.x=I._x[t]),"y"in g||(g.y=I._y[t]),c(g,I,S)}}),sV=Dt((Q,Z)=>{function c(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>=0?(l=f,i=f-1):o=f+1}return l}function g(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>0?(l=f,i=f-1):o=f+1}return l}function I(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<0?(l=f,o=f+1):i=f-1}return l}function S(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<=0?(l=f,o=f+1):i=f-1}return l}function t(r,a,n,o,i){for(;o<=i;){var l=o+i>>>1,f=r[l],x=n!==void 0?n(f,a):f-a;if(x===0)return l;x<=0?o=l+1:i=l-1}return-1}function e(r,a,n,o,i,l){return typeof n=="function"?l(r,a,n,o===void 0?0:o|0,i===void 0?r.length-1:i|0):l(r,a,void 0,n===void 0?0:n|0,o===void 0?r.length-1:o|0)}Z.exports={ge:function(r,a,n,o,i){return e(r,a,n,o,i,c)},gt:function(r,a,n,o,i){return e(r,a,n,o,i,g)},lt:function(r,a,n,o,i){return e(r,a,n,o,i,I)},le:function(r,a,n,o,i){return e(r,a,n,o,i,S)},eq:function(r,a,n,o,i){return e(r,a,n,o,i,t)}}}),Ig=Dt((Q,Z)=>{Z.exports=function(I,S,t){var e={},r,a;if(typeof S=="string"&&(S=g(S)),Array.isArray(S)){var n={};for(a=0;a{var c=Ig();Z.exports=g;function g(I){var S;return arguments.length>1&&(I=arguments),typeof I=="string"?I=I.split(/\s/).map(parseFloat):typeof I=="number"&&(I=[I]),I.length&&typeof I[0]=="number"?I.length===1?S={width:I[0],height:I[0],x:0,y:0}:I.length===2?S={width:I[0],height:I[1],x:0,y:0}:S={x:I[0],y:I[1],width:I[2]-I[0]||0,height:I[3]-I[1]||0}:I&&(I=c(I,{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"}),S={x:I.left||0,y:I.top||0},I.width==null?I.right?S.width=I.right-S.x:S.width=0:S.width=I.width,I.height==null?I.bottom?S.height=I.bottom-S.y:S.height=0:S.height=I.height),S}}),yx=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(!g||g.length==null)throw Error("Argument should be an array");I==null?I=1:I=Math.floor(I);for(var S=Array(I*2),t=0;te&&(e=g[a]),g[a]{Z.exports=function(){for(var c=0;c{var c=Yk();Z.exports=g;function g(I,S,t){if(!I)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(I)&&I[0]&&typeof I[0][0]=="number"){var e=I[0].length,r=I.length*e,a,n,o,i;(!S||typeof S=="string")&&(S=new(c(S||"float32"))(r+t));var l=S.length-t;if(r!==l)throw new Error("source length "+r+" ("+e+"x"+I.length+") does not match destination length "+l);for(a=0,o=t;a{Z.exports=function(c){var g=typeof c;return c!==null&&(g==="object"||g==="function")}}),cV=Dt((Q,Z)=>{Z.exports=Math.log2||function(c){return Math.log(c)*Math.LOG2E}}),hV=Dt((Q,Z)=>{var c=sV(),g=_3(),I=vb(),S=yx(),t=Ig(),e=lV(),r=xx(),a=uV(),n=Yk(),o=cV(),i=1073741824;Z.exports=function(f,x){x||(x={}),f=r(f,"float64"),x=t(x,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let y=e(x.maxDepth,255),v=e(x.bounds,S(f,2));v[0]===v[2]&&v[2]++,v[1]===v[3]&&v[3]++;let T=l(f,v),u=f.length>>>1,b;x.dtype||(x.dtype="array"),typeof x.dtype=="string"?b=new(n(x.dtype))(u):x.dtype&&(b=x.dtype,Array.isArray(b)&&(b.length=u));for(let R=0;Ry||F>i){for(let at=0;atft||q>ut||J=yt||it===Y)return;let kt=_[vt];Y===void 0&&(Y=kt.length);for(let se=it;se=V&&Lt<=F&&Mt>=H&&Mt<=U&&mt.push(Tt)}let It=P[vt],Pt=It[it*4+0],qt=It[it*4+1],Wt=It[it*4+2],Jt=It[it*4+3],ge=tt(It,it+1),fe=at*.5,pe=vt+1;st(dt,rt,fe,pe,Pt,qt||Wt||Jt||ge),st(dt,rt+fe,fe,pe,qt,Wt||Jt||ge),st(dt+fe,rt,fe,pe,Wt,Jt||ge),st(dt+fe,rt+fe,fe,pe,Jt,ge)}function tt(dt,rt){let at=null,vt=0;for(;at===null;)if(at=dt[rt*4+vt],vt++,vt>dt.length)return null;return at}return mt}function k(R,O,j,V,H){let F=[];for(let U=0;U{Z.exports=hV()}),DS=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=0,S=0,t=0,e=0;return g.map(function(r){r=r.slice();var a=r[0],n=a.toUpperCase();if(a!=n)switch(r[0]=n,a){case"a":r[6]+=t,r[7]+=e;break;case"v":r[1]+=e;break;case"h":r[1]+=t;break;default:for(var o=1;o{Object.defineProperty(Q,"__esModule",{value:!0});var c=function(){function a(n,o){var i=[],l=!0,f=!1,x=void 0;try{for(var y=n[Symbol.iterator](),v;!(l=(v=y.next()).done)&&(i.push(v.value),!(o&&i.length===o));l=!0);}catch(T){f=!0,x=T}finally{try{!l&&y.return&&y.return()}finally{if(f)throw x}}return i}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return a(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=Math.PI*2,I=function(a,n,o,i,l,f,x){var y=a.x,v=a.y;y*=n,v*=o;var T=i*y-l*v,u=l*y+i*v;return{x:T+f,y:u+x}},S=function(a,n){var o=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),i=Math.cos(a),l=Math.sin(a),f=Math.cos(a+n),x=Math.sin(a+n);return[{x:i-l*o,y:l+i*o},{x:f+x*o,y:x-f*o},{x:f,y:x}]},t=function(a,n,o,i){var l=a*i-n*o<0?-1:1,f=a*o+n*i;return f>1&&(f=1),f<-1&&(f=-1),l*Math.acos(f)},e=function(a,n,o,i,l,f,x,y,v,T,u,b){var _=Math.pow(l,2),P=Math.pow(f,2),M=Math.pow(u,2),C=Math.pow(b,2),A=_*P-_*C-P*M;A<0&&(A=0),A/=_*C+P*M,A=Math.sqrt(A)*(x===y?-1:1);var h=A*l/f*b,p=A*-f/l*u,k=T*h-v*p+(a+o)/2,w=v*h+T*p+(n+i)/2,R=(u-h)/l,O=(b-p)/f,j=(-u-h)/l,V=(-b-p)/f,H=t(1,0,R,O),F=t(R,O,j,V);return y===0&&F>0&&(F-=g),y===1&&F<0&&(F+=g),[k,w,H,F]},r=function(a){var n=a.px,o=a.py,i=a.cx,l=a.cy,f=a.rx,x=a.ry,y=a.xAxisRotation,v=y===void 0?0:y,T=a.largeArcFlag,u=T===void 0?0:T,b=a.sweepFlag,_=b===void 0?0:b,P=[];if(f===0||x===0)return[];var M=Math.sin(v*g/360),C=Math.cos(v*g/360),A=C*(n-i)/2+M*(o-l)/2,h=-M*(n-i)/2+C*(o-l)/2;if(A===0&&h===0)return[];f=Math.abs(f),x=Math.abs(x);var p=Math.pow(A,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(x,2);p>1&&(f*=Math.sqrt(p),x*=Math.sqrt(p));var k=e(n,o,i,l,f,x,u,_,M,C,A,h),w=c(k,4),R=w[0],O=w[1],j=w[2],V=w[3],H=Math.abs(V)/(g/4);Math.abs(1-H)<1e-7&&(H=1);var F=Math.max(Math.ceil(H),1);V/=F;for(var U=0;U{Z.exports=g;var c=fV();function g(t){for(var e,r=[],a=0,n=0,o=0,i=0,l=null,f=null,x=0,y=0,v=0,T=t.length;v4?(a=u[u.length-4],n=u[u.length-3]):(a=x,n=y),r.push(u)}return r}function I(t,e,r,a){return["C",t,e,r,a,r,a]}function S(t,e,r,a,n,o){return["C",t/3+2/3*r,e/3+2/3*a,n/3+2/3*r,o/3+2/3*a,n,o]}}),FS=Dt((Q,Z)=>{Z.exports=function(c){return typeof c!="string"?!1:(c=c.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(c)&&/[\dz]$/i.test(c)&&c.length>4))}}),pV=Dt((Q,Z)=>{var c=S1(),g=DS(),I=dV(),S=FS(),t=t3();Z.exports=e;function e(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(t(S(r),"String is not an SVG path."),r=c(r)),t(Array.isArray(r),"Argument should be a string or an array of path segments."),r=g(r),r=I(r),!r.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],n=0,o=r.length;na[2]&&(a[2]=i[l+0]),i[l+1]>a[3]&&(a[3]=i[l+1]);return a}}),mV=Dt((Q,Z)=>{var c=Math.PI,g=a(120);Z.exports=I;function I(n){for(var o,i=[],l=0,f=0,x=0,y=0,v=null,T=null,u=0,b=0,_=0,P=n.length;_7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var A=u,h=b;(o=="C"||o=="S")&&(A+=A-l,h+=h-f),M=["C",A,h,M[1],M[2],M[3],M[4]];break;case"T":o=="Q"||o=="T"?(v=u*2-v,T=b*2-T):(v=u,T=b),M=t(u,b,v,T,M[1],M[2]);break;case"Q":v=M[1],T=M[2],M=t(u,b,M[1],M[2],M[3],M[4]);break;case"L":M=S(u,b,M[1],M[2]);break;case"H":M=S(u,b,M[1],b);break;case"V":M=S(u,b,u,M[1]);break;case"Z":M=S(u,b,x,y);break}o=C,u=M[M.length-2],b=M[M.length-1],M.length>4?(l=M[M.length-4],f=M[M.length-3]):(l=u,f=b),i.push(M)}return i}function S(n,o,i,l){return["C",n,o,i,l,i,l]}function t(n,o,i,l,f,x){return["C",n/3+2/3*i,o/3+2/3*l,f/3+2/3*i,x/3+2/3*l,f,x]}function e(n,o,i,l,f,x,y,v,T,u){if(u)w=u[0],R=u[1],p=u[2],k=u[3];else{var b=r(n,o,-f);n=b.x,o=b.y,b=r(v,T,-f),v=b.x,T=b.y;var _=(n-v)/2,P=(o-T)/2,M=_*_/(i*i)+P*P/(l*l);M>1&&(M=Math.sqrt(M),i=M*i,l=M*l);var C=i*i,A=l*l,h=(x==y?-1:1)*Math.sqrt(Math.abs((C*A-C*P*P-A*_*_)/(C*P*P+A*_*_)));h==1/0&&(h=1);var p=h*i*P/l+(n+v)/2,k=h*-l*_/i+(o+T)/2,w=Math.asin(((o-k)/l).toFixed(9)),R=Math.asin(((T-k)/l).toFixed(9));w=nR&&(w=w-c*2),!y&&R>w&&(R=R-c*2)}if(Math.abs(R-w)>g){var O=R,j=v,V=T;R=w+g*(y&&R>w?1:-1),v=p+i*Math.cos(R),T=k+l*Math.sin(R);var H=e(v,T,i,l,f,0,y,j,V,[R,O,p,k])}var F=Math.tan((R-w)/4),U=4/3*i*F,W=4/3*l*F,q=[2*n-(n+U*Math.sin(w)),2*o-(o-W*Math.cos(w)),v+U*Math.sin(R),T-W*Math.cos(R),v,T];if(u)return q;H&&(q=q.concat(H));for(var J=0;J{var c=DS(),g=mV(),I={M:"moveTo",C:"bezierCurveTo"};Z.exports=function(S,t){S.beginPath(),g(c(t)).forEach(function(e){var r=e[0],a=e.slice(1);S[I[r]].apply(S,a)}),S.closePath()}}),vV=Dt((Q,Z)=>{var c=_3();Z.exports=I;var g=1e20;function I(e,r){r||(r={});var a=r.cutoff==null?.25:r.cutoff,n=r.radius==null?8:r.radius,o=r.channel||0,i,l,f,x,y,v,T,u,b,_,P;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,l=r.height,x=e,r.stride?v=r.stride:v=Math.floor(e.length/i/l)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=e,T=u.getContext("2d"),i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e.canvas,T=e,i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.ImageData&&e instanceof window.ImageData&&(b=e,i=e.width,l=e.height,x=b.data,v=4);if(f=Math.max(i,l),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(y=x,x=Array(i*l),_=0,P=y.length;_{var c=pV(),g=S1(),I=gV(),S=FS(),t=vV(),e=document.createElement("canvas"),r=e.getContext("2d");Z.exports=a;function a(i,l){if(!S(i))throw Error("Argument should be valid svg path string");l||(l={});var f,x;l.shape?(f=l.shape[0],x=l.shape[1]):(f=e.width=l.w||l.width||200,x=e.height=l.h||l.height||200);var y=Math.min(f,x),v=l.stroke||0,T=l.viewbox||l.viewBox||c(i),u=[f/(T[2]-T[0]),x/(T[3]-T[1])],b=Math.min(u[0]||0,u[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,f,x),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(f*.5,x*.5),r.scale(b,b),o()){var _=new Path2D(i);r.fill(_),v&&r.stroke(_)}else{var P=g(i);I(r,P),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=t(r,{cutoff:l.cutoff!=null?l.cutoff:.5,radius:l.radius!=null?l.radius:y*.5});return M}var n;function o(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var l=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(l);var f=i.getImageData(0,0,1,1);return n=f&&f.data&&f.data[3]===255}}),_x=Dt((Q,Z)=>{var c=Yi(),g=yV(),I=U1(),S=Jo(),t=kn(),e=t.isArrayOrTypedArray,r=Vs(),a=Rc(),n=Av().formatColor,o=Tc(),i=bg(),l=cT(),f=q1(),x=go().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Fp().appendArrayPointValue;function T(H,F){var U,W={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},q=H._context.plotGlPixelRatio;if(F.visible!==!0)return W;if(o.hasText(F)&&(W.text=u(H,F),W.textSel=M(H,F,F.selected),W.textUnsel=M(H,F,F.unselected)),o.hasMarkers(F)&&(W.marker=_(H,F),W.markerSel=P(H,F,F.selected),W.markerUnsel=P(H,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var J=F.marker.opacity;for(W.markerUnsel.opacity=new Array(J.length),U=0;U500?"bold":"normal":H}function _(H,F){var U=F._length,W=F.marker,q={},J,lt=e(W.symbol),yt=e(W.angle),mt=e(W.color),st=e(W.line.color),tt=e(W.opacity),dt=e(W.size),rt=e(W.line.width),at;if(lt||(at=l.isOpenSymbol(W.symbol)),lt||mt||st||tt||yt){q.symbols=new Array(U),q.angles=new Array(U),q.colors=new Array(U),q.borderColors=new Array(U);var vt=W.symbol,it=W.angle,Y=n(W,W.opacity,U),ft=n(W.line,W.opacity,U);if(!e(ft[0])){var ut=ft;for(ft=Array(U),J=0;Jf.TOO_MANY_POINTS||o.hasMarkers(F)?"rect":"round";if(st&&F.connectgaps){var dt=J[0],rt=J[1];for(lt=0;lt1?mt[lt]:mt[0]:mt,at=e(st)?st.length>1?st[lt]:st[0]:st,vt=y[rt],it=y[at],Y=tt?tt/.8+1:0,ft=-it*Y-it*.5;J.offset[lt]=[vt*Y/dt,ft/dt]}}return J}Z.exports={style:T,markerStyle:_,markerSelection:P,linePositions:O,errorBarPositions:j,textPosition:V}}),RS=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=I._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},e={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return I._scene||(S=I._scene={},S.init=function(){c.extendFlat(S,e,t)},S.init(),S.update=function(r){var a=c.repeat(r,S.count);if(S.fill2d&&S.fill2d.update(a),S.scatter2d&&S.scatter2d.update(a),S.line2d&&S.line2d.update(a),S.error2d&&S.error2d.update(a.concat(a)),S.select2d&&S.select2d.update(a),S.glText)for(var n=0;n{var c=hT(),g=kn(),I=Rc(),S=Y0().findExtremes,t=D0(),e=me(),r=e.calcMarkerSize,a=e.calcAxisExpansion,n=e.setFirstScatter,o=F0(),i=_x(),l=RS(),f=Ca().BADNUM,x=q1().TOO_MANY_POINTS;Z.exports=function(T,u){var b=T._fullLayout,_=u._xA=I.getFromId(T,u.xaxis,"x"),P=u._yA=I.getFromId(T,u.yaxis,"y"),M=b._plots[u.xaxis+u.yaxis],C=u._length,A=C>=x,h=C*2,p={},k,w=_.makeCalcdata(u,"x"),R=P.makeCalcdata(u,"y"),O=t(u,_,"x",w),j=t(u,P,"y",R),V=O.vals,H=j.vals;u._x=V,u._y=H,u.xperiodalignment&&(u._origX=w,u._xStarts=O.starts,u._xEnds=O.ends),u.yperiodalignment&&(u._origY=R,u._yStarts=j.starts,u._yEnds=j.ends);var F=new Array(h),U=new Array(C);for(k=0;k1&&g.extendFlat(C.line,i.linePositions(T,b,_)),C.errorX||C.errorY){var A=i.errorBarPositions(T,b,_,P,M);C.errorX&&g.extendFlat(C.errorX,A.x),C.errorY&&g.extendFlat(C.errorY,A.y)}return C.text&&(g.extendFlat(C.text,{positions:_},i.textPosition(T,b,C.text,C.marker)),g.extendFlat(C.textSel,{positions:_},i.textPosition(T,b,C.text,C.markerSel)),g.extendFlat(C.textUnsel,{positions:_},i.textPosition(T,b,C.text,C.markerUnsel))),C}}),BS=Dt((Q,Z)=>{var c=kn(),g=hi(),I=go().DESELECTDIM;function S(t){var e=t[0],r=e.trace,a=e.t,n=a._scene,o=a.index,i=n.selectBatch[o],l=n.unselectBatch[o],f=n.textOptions[o],x=n.textSelectedOptions[o]||{},y=n.textUnselectedOptions[o]||{},v=c.extendFlat({},f),T,u;if(i.length||l.length){var b=x.color,_=y.color,P=f.color,M=c.isArrayOrTypedArray(P);for(v.color=new Array(r._length),T=0;T{var c=Tc(),g=BS().styleTextSelection;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o=t[0].t,i=n._length,l=o.x,f=o.y,x=o._scene,y=o.index;if(!x)return a;var v=c.hasText(n),T=c.hasMarkers(n),u=!T&&!v;if(n.visible!==!0||u)return a;var b=[],_=[];if(S!==!1&&!S.degenerate)for(var P=0;P{var c=uT();Z.exports={moduleType:"trace",name:"scattergl",basePlotModule:Mf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:T3(),supplyDefaults:aV(),crossTraceDefaults:Fw(),colorbar:xo(),formatLabels:oV(),calc:xV(),hoverPoints:c.hoverPoints,selectPoints:NS(),meta:{}}}),bV=Dt((Q,Z)=>{var c=_3();Z.exports=g,Z.exports.to=g,Z.exports.from=I;function g(S,t){t==null&&(t=!0);var e=S[0],r=S[1],a=S[2],n=S[3];n==null&&(n=t?1:255),t&&(e*=255,r*=255,a*=255,n*=255),e=c(e,0,255)&255,r=c(r,0,255)&255,a=c(a,0,255)&255,n=c(n,0,255)&255;var o=e*16777216+(r<<16)+(a<<8)+n;return o}function I(S,t){S=+S;var e=S>>>24,r=(S&16711680)>>>16,a=(S&65280)>>>8,n=S&255;return t===!1?[e,r,a,n]:[e/255,r/255,a/255,n/255]}}),Sd=Dt((Q,Z)=>{var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function t(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},a=0;a<10;a++)r["_"+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Z.exports=t()?Object.assign:function(e,r){for(var a,n=S(e),o,i=1;i{Z.exports=function(c){typeof c=="string"&&(c=[c]);for(var g=[].slice.call(arguments,1),I=[],S=0;S{Z.exports=function(c,g,I){Array.isArray(I)||(I=[].slice.call(arguments,2));for(var S=0,t=I.length;S{Z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}),fT=Dt((Q,Z)=>{Z.exports=I,Z.exports.float32=Z.exports.float=I,Z.exports.fract32=Z.exports.fract=g;var c=new Float32Array(1);function g(S,t){if(S.length){if(S instanceof Float32Array)return new Float32Array(S.length);t instanceof Float32Array||(t=I(S));for(var e=0,r=t.length;e{function c(k,w){var R=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(R!=null){var O,j,V,H,F=[],U=!0,W=!1;try{if(V=(R=R.call(k)).next,w!==0)for(;!(U=(O=V.call(R)).done)&&(F.push(O.value),F.length!==w);U=!0);}catch(q){W=!0,j=q}finally{try{if(!U&&R.return!=null&&(H=R.return(),Object(H)!==H))return}finally{if(W)throw j}}return F}}function g(k,w){return t(k)||c(k,w)||r(k,w)||o()}function I(k){return S(k)||e(k)||r(k)||n()}function S(k){if(Array.isArray(k))return a(k)}function t(k){if(Array.isArray(k))return k}function e(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}function r(k,w){if(k){if(typeof k=="string")return a(k,w);var R=Object.prototype.toString.call(k).slice(8,-1);if(R==="Object"&&k.constructor&&(R=k.constructor.name),R==="Map"||R==="Set")return Array.from(k);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return a(k,w)}}function a(k,w){(w==null||w>k.length)&&(w=k.length);for(var R=0,O=new Array(w);R0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=P);var C=M===P?0:4-M%4;return[M,C]}function x(_){var P=f(_),M=P[0],C=P[1];return(M+C)*3/4-C}function y(_,P,M){return(P+M)*3/4-M}function v(_){var P,M=f(_),C=M[0],A=M[1],h=new n(y(_,C,A)),p=0,k=A>0?C-4:C,w;for(w=0;w>16&255,h[p++]=P>>8&255,h[p++]=P&255;return A===2&&(P=a[_.charCodeAt(w)]<<2|a[_.charCodeAt(w+1)]>>4,h[p++]=P&255),A===1&&(P=a[_.charCodeAt(w)]<<10|a[_.charCodeAt(w+1)]<<4|a[_.charCodeAt(w+2)]>>2,h[p++]=P>>8&255,h[p++]=P&255),h}function T(_){return r[_>>18&63]+r[_>>12&63]+r[_>>6&63]+r[_&63]}function u(_,P,M){for(var C,A=[],h=P;hk?k:p+h));return C===1?(P=_[M-1],A.push(r[P>>2]+r[P<<4&63]+"==")):C===2&&(P=(_[M-2]<<8)+_[M-1],A.push(r[P>>10]+r[P>>4&63]+r[P<<2&63]+"=")),A.join("")}},7518:function(t,e,r){var a=r(1433);function n(l,f,x,y,v,T){this.location=l,this.dimension=f,this.a=x,this.b=y,this.c=v,this.d=T}n.prototype.bind=function(l){switch(this.dimension){case 1:l.vertexAttrib1f(this.location,this.a);break;case 2:l.vertexAttrib2f(this.location,this.a,this.b);break;case 3:l.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:l.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function o(l,f,x){this.gl=l,this._ext=f,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=l.UNSIGNED_SHORT}o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var l=0;l1.0001)return null;w+=k[M]}return Math.abs(w-1)>.001?null:[C,f(y,k),k]}},7636:function(t){t.exports=e;function e(r,a){a=a||1;var n=Math.random()*2*Math.PI,o=Math.random()*2-1,i=Math.sqrt(1-o*o)*a;return r[0]=Math.cos(n)*i,r[1]=Math.sin(n)*i,r[2]=o*a,r}},7640:function(t,e,r){var a=r(1888);function n(v){switch(v){case"uint32":return[a.mallocUint32,a.freeUint32];default:return null}}var o={"uint32,1,0":function(v,T){return function(u,b,_,P,M,C,A,h,p,k,w){var B,O,j,V=u*M+P,H,F=v(h),U,W,q,J;for(B=u+1;B<=b;++B){for(O=B,V+=M,j=V,U=0,W=V,H=0;Hu;){U=0,W=j-M;e:for(H=0;HJ)break e;W+=k,U+=w}for(U=j,W=j-M,H=0;H>1,U=F-j,W=F+j,q=V,J=U,lt=F,yt=W,mt=H,st=_+1,tt=P-1,pt=!0,rt,at,vt,it,K,ft,ut,kt,It,Pt=0,qt=0,Wt=0,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Ae,He,Ge,cr,ur,jr=k,qr=T(jr),br=T(jr);ge=A*q,fe=A*J,ur=C;t:for(Jt=0;Jt0){at=q,q=J,J=at;break t}if(Wt<0)break t;ur+=B}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=B}ge=A*q,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=q,q=lt,lt=at;break t}if(Wt<0)break t;ur+=B}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=B}ge=A*q,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=q,q=yt,yt=at;break t}if(Wt<0)break t;ur+=B}ge=A*lt,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=lt,lt=yt,yt=at;break t}if(Wt<0)break t;ur+=B}ge=A*J,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=J,J=mt,mt=at;break t}if(Wt<0)break t;ur+=B}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=B}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=B}for(ge=A*q,fe=A*J,pe=A*lt,se=A*yt,Tt=A*mt,Lt=A*V,Mt=A*F,ee=A*H,cr=0,ur=C,Jt=0;Jt0)tt--;else if(Wt<0){for(ge=A*ft,fe=A*st,pe=A*tt,ur=C,Jt=0;Jt0)for(;;){ut=C+tt*A,cr=0;t:for(Jt=0;Jt0){if(--ttH){t:for(;;){for(ut=C+st*A,cr=0,ur=C,Jt=0;Jt1&&b?P(u,b[0],b[1]):P(u)}var x={"uint32,1,0":function(v,T){return function(u){var b=u.data,_=u.offset|0,P=u.shape,M=u.stride,C=M[0]|0,A=P[0]|0,h=M[1]|0,p=P[1]|0,k=h,w=h,B=1;A<=32?v(0,A-1,b,_,C,h,A,p,k,w,B):T(0,A-1,b,_,C,h,A,p,k,w,B)}}};function y(v,T){var u=[T,v].join(","),b=x[u],_=i(v,T),P=f(v,T,_);return b(_,P)}t.exports=y},7642:function(t,e,r){var a=r(8954),n=r(1682);t.exports=f;function o(x,y){this.point=x,this.index=y}function i(x,y){for(var v=x.point,T=y.point,u=v.length,b=0;b=2)return!1;V[F]=U}return!0}):j=j.filter(function(V){for(var H=0;H<=T;++H){var F=k[V[H]];if(F<0)return!1;V[H]=F}return!0}),T&1)for(var _=0;_",W="",q=U.length,J=W.length,lt=V[0]===b||V[0]===M,yt=0,mt=-J;yt>-1&&(yt=H.indexOf(U,yt),!(yt===-1||(mt=H.indexOf(W,yt+q),mt===-1)||mt<=yt));){for(var st=yt;st=mt)F[st]=null,H=H.substr(0,st)+" "+H.substr(st+1);else if(F[st]!==null){var tt=F[st].indexOf(V[0]);tt===-1?F[st]+=V:lt&&(F[st]=F[st].substr(0,tt+1)+(1+parseInt(F[st][tt+1]))+F[st].substr(tt+2))}var pt=yt+q,rt=H.substr(pt,mt-pt),at=rt.indexOf(U);at!==-1?yt=at:yt=mt+J}return F}function h(j,V,H){for(var F=V.textAlign||"start",U=V.textBaseline||"alphabetic",W=[1073741824,1073741824],q=[0,0],J=j.length,lt=0;lt/g,` +`):H=H.replace(/\/g," ");var q="",J=[];for(K=0;K-1?parseInt(Mt[1+oe]):0,Ge=Ae>-1?parseInt(ee[1+Ae]):0;He!==Ge&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,Ge-He),ve=ve.replace("?px ",Wt())),ut+=.25*tt*(Ge-He)}if(W.superscripts===!0){var cr=Mt.indexOf(b),ur=ee.indexOf(b),jr=cr>-1?parseInt(Mt[1+cr]):0,qr=ur>-1?parseInt(ee[1+ur]):0;jr!==qr&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,qr-jr),ve=ve.replace("?px ",Wt())),ut-=.25*tt*(qr-jr)}if(W.bolds===!0){var br=Mt.indexOf(y)>-1,Xr=ee.indexOf(y)>-1;!br&&Xr&&(nn?ve=ve.replace("italic ","italic bold "):ve="bold "+ve),br&&!Xr&&(ve=ve.replace("bold ",""))}if(W.italics===!0){var nn=Mt.indexOf(T)>-1,Le=ee.indexOf(T)>-1;!nn&&Le&&(ve="italic "+ve),nn&&!Le&&(ve=ve.replace("italic ",""))}V.font=ve}for(it=0;it0&&(U=F.size),F.lineSpacing&&F.lineSpacing>0&&(W=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(q.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(q.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(q.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(q.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(q.superscripts=!!F.styletags.superscripts)),H.font=[F.fontStyle,F.fontVariant,F.fontWeight,U+"px",F.font].filter(function(lt){return lt}).join(" "),H.textAlign="start",H.textBaseline="alphabetic",H.direction="ltr";var J=p(V,H,j,U,W,q);return B(J,F,U)}},7721:function(t,e,r){var a=r(5716);t.exports=n;function n(o){return a(o[0])*a(o[1])}},7765:function(t,e,r){t.exports=u;var a=r(9618),n=r(1888),o=r(446),i=r(1570);function l(b){for(var _=b.length,P=0,M=0;M<_;++M)P=Math.max(P,b[M].length)|0;return P-1}function f(b,_){for(var P=b.length,M=n.mallocUint8(P),C=0;C"u"&&(M=l(b));var C=b.length;if(C===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=f(_,+P),h=x(b,M),p=y(h,_,A,+P),k=v(h,_.length|0),w=i(M)(b,h.data,k,A),B=T(h),O=[].slice.call(p.data,0,p.shape[0]);return n.free(A),n.free(h.data),n.free(p.data),n.free(k),{cells:w,vertexIds:B,vertexWeights:O}}},7766:function(t,e,r){var a=r(9618),n=r(5298),o=r(1888);t.exports=p;var i=null,l=null,f=null;function x(k){i=[k.LINEAR,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_NEAREST],l=[k.NEAREST,k.LINEAR,k.NEAREST_MIPMAP_NEAREST,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_LINEAR],f=[k.REPEAT,k.CLAMP_TO_EDGE,k.MIRRORED_REPEAT]}function y(k){return typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&k instanceof HTMLVideoElement||typeof ImageData<"u"&&k instanceof ImageData}var v=function(k,w){n.muls(k,w,255)};function T(k,w,B){var O=k.gl,j=O.getParameter(O.MAX_TEXTURE_SIZE);if(w<0||w>j||B<0||B>j)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[w,B],k.bind(),O.texImage2D(O.TEXTURE_2D,0,k.format,w,B,0,k.format,k.type,null),k._mipLevels=[0],k}function u(k,w,B,O,j,V){this.gl=k,this.handle=w,this.format=j,this.type=V,this._shape=[B,O],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var H=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return H._wrapS},set:function(W){return H.wrapS=W}},{get:function(){return H._wrapT},set:function(W){return H.wrapT=W}}]),this._wrapVector=F;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return H._shape[0]},set:function(W){return H.width=W}},{get:function(){return H._shape[1]},set:function(W){return H.height=W}}]),this._shapeVector=U}var b=u.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var w=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,w!==this._anisoSamples){var B=this.gl.getExtension("EXT_texture_filter_anisotropic");B&&this.gl.texParameterf(this.gl.TEXTURE_2D,B.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var w=0;w<2;++w)if(f.indexOf(k[w])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var B=this.gl;return this.bind(),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,this._wrapS),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,T(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,T(this,this._shape[0],k),k}}}),b.bind=function(k){var w=this.gl;return k!==void 0&&w.activeTexture(w.TEXTURE0+(k|0)),w.bindTexture(w.TEXTURE_2D,this.handle),k!==void 0?k|0:w.getParameter(w.ACTIVE_TEXTURE)-w.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),w=0;k>0;++w,k>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},b.setPixels=function(k,w,B,O){var j=this.gl;this.bind(),Array.isArray(w)?(O=B,B=w[1]|0,w=w[0]|0):(w=w||0,B=B||0),O=O||0;var V=y(k)?k:k.raw;if(V){var H=this._mipLevels.indexOf(O)<0;H?(j.texImage2D(j.TEXTURE_2D,0,this.format,this.format,this.type,V),this._mipLevels.push(O)):j.texSubImage2D(j.TEXTURE_2D,O,w,B,this.format,this.type,V)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||w+k.shape[1]>this._shape[1]>>>O||B+k.shape[0]>this._shape[0]>>>O||w<0||B<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");P(j,w,B,O,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function _(k,w){return k.length===3?w[2]===1&&w[1]===k[0]*k[2]&&w[0]===k[2]:w[0]===1&&w[1]===k[0]}function P(k,w,B,O,j,V,H,F){var U=F.dtype,W=F.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,J=0,lt=_(W,F.stride.slice());if(U==="float32"?q=k.FLOAT:U==="float64"?(q=k.FLOAT,lt=!1,U="float32"):U==="uint8"?q=k.UNSIGNED_BYTE:(q=k.UNSIGNED_BYTE,lt=!1,U="uint8"),W.length===2)J=k.LUMINANCE,W=[W[0],W[1],1],F=a(F.data,W,[F.stride[0],F.stride[1],1],F.offset);else if(W.length===3){if(W[2]===1)J=k.ALPHA;else if(W[2]===2)J=k.LUMINANCE_ALPHA;else if(W[2]===3)J=k.RGB;else if(W[2]===4)J=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===k.LUMINANCE||J===k.ALPHA)&&(j===k.LUMINANCE||j===k.ALPHA)&&(J=j),J!==j)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var yt=F.size,mt=H.indexOf(O)<0;if(mt&&H.push(O),q===V&<)F.offset===0&&F.data.length===yt?mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data):k.texSubImage2D(k.TEXTURE_2D,O,w,B,W[0],W[1],j,V,F.data):mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data.subarray(F.offset,F.offset+yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,B,W[0],W[1],j,V,F.data.subarray(F.offset,F.offset+yt));else{var st;V===k.FLOAT?st=o.mallocFloat32(yt):st=o.mallocUint8(yt);var tt=a(st,W,[W[2],W[2]*W[0],1]);q===k.FLOAT&&V===k.UNSIGNED_BYTE?v(tt,F):n.assign(tt,F),mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,st.subarray(0,yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,B,W[0],W[1],j,V,st.subarray(0,yt)),V===k.FLOAT?o.freeFloat32(st):o.freeUint8(st)}}function M(k){var w=k.createTexture();return k.bindTexture(k.TEXTURE_2D,w),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),w}function C(k,w,B,O,j){var V=k.getParameter(k.MAX_TEXTURE_SIZE);if(w<0||w>V||B<0||B>V)throw new Error("gl-texture2d: Invalid texture shape");if(j===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,O,w,B,0,O,j,null),new u(k,H,w,B,O,j)}function A(k,w,B,O,j,V){var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,j,j,V,w),new u(k,H,B,O,j,V)}function h(k,w){var B=w.dtype,O=w.shape.slice(),j=k.getParameter(k.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>j||O[1]<0||O[1]>j)throw new Error("gl-texture2d: Invalid texture size");var V=_(O,w.stride.slice()),H=0;B==="float32"?H=k.FLOAT:B==="float64"?(H=k.FLOAT,V=!1,B="float32"):B==="uint8"?H=k.UNSIGNED_BYTE:(H=k.UNSIGNED_BYTE,V=!1,B="uint8");var F=0;if(O.length===2)F=k.LUMINANCE,O=[O[0],O[1],1],w=a(w.data,O,[w.stride[0],w.stride[1],1],w.offset);else if(O.length===3)if(O[2]===1)F=k.ALPHA;else if(O[2]===2)F=k.LUMINANCE_ALPHA;else if(O[2]===3)F=k.RGB;else if(O[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");H===k.FLOAT&&!k.getExtension("OES_texture_float")&&(H=k.UNSIGNED_BYTE,V=!1);var U,W,q=w.size;if(V)w.offset===0&&w.data.length===q?U=w.data:U=w.data.subarray(w.offset,w.offset+q);else{var J=[O[2],O[2]*O[0],1];W=o.malloc(q,B);var lt=a(W,O,J,0);(B==="float32"||B==="float64")&&H===k.UNSIGNED_BYTE?v(lt,w):n.assign(lt,w),U=W.subarray(0,q)}var yt=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,O[0],O[1],0,F,H,U),V||o.free(W),new u(k,yt,O[0],O[1],F,H)}function p(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||x(k),typeof arguments[1]=="number")return C(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return C(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var w=arguments[1],B=y(w)?w:w.raw;if(B)return A(k,B,w.width|0,w.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return h(k,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(t,e,r){var a=r(2931),n=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(_,P,M,C){for(var A=_.points,h=_.velocities,p=_.divergences,k=[],w=[],B=[],O=[],j=[],V=[],H=0,F=0,U=n.create(),W=n.create(),q=8,J=0;J0)for(var st=0;stP)return C-1}return C},x=function(_,P,M){return _M?M:_},y=function(_,P,M){var C=P.vectors,A=P.meshgrid,h=_[0],p=_[1],k=_[2],w=A[0].length,B=A[1].length,O=A[2].length,j=f(A[0],h),V=f(A[1],p),H=f(A[2],k),F=j+1,U=V+1,W=H+1;if(j=x(j,0,w-1),F=x(F,0,w-1),V=x(V,0,B-1),U=x(U,0,B-1),H=x(H,0,O-1),W=x(W,0,O-1),j<0||V<0||H<0||F>w-1||U>B-1||W>O-1)return a.create();var q=A[0][j],J=A[0][F],lt=A[1][V],yt=A[1][U],mt=A[2][H],st=A[2][W],tt=(h-q)/(J-q),pt=(p-lt)/(yt-lt),rt=(k-mt)/(st-mt);isFinite(tt)||(tt=.5),isFinite(pt)||(pt=.5),isFinite(rt)||(rt=.5);var at,vt,it,K,ft,ut;switch(M.reversedX&&(j=w-1-j,F=w-1-F),M.reversedY&&(V=B-1-V,U=B-1-U),M.reversedZ&&(H=O-1-H,W=O-1-W),M.filled){case 5:ft=H,ut=W,it=V*O,K=U*O,at=j*O*B,vt=F*O*B;break;case 4:ft=H,ut=W,at=j*O,vt=F*O,it=V*O*w,K=U*O*w;break;case 3:it=V,K=U,ft=H*B,ut=W*B,at=j*B*O,vt=F*B*O;break;case 2:it=V,K=U,at=j*B,vt=F*B,ft=H*B*w,ut=W*B*w;break;case 1:at=j,vt=F,ft=H*w,ut=W*w,it=V*w*O,K=U*w*O;break;default:at=j,vt=F,it=V*w,K=U*w,ft=H*w*B,ut=W*w*B;break}var kt=C[at+it+ft],It=C[at+it+ut],Pt=C[at+K+ft],qt=C[at+K+ut],Wt=C[vt+it+ft],Jt=C[vt+it+ut],ge=C[vt+K+ft],fe=C[vt+K+ut],pe=a.create(),se=a.create(),Tt=a.create(),Lt=a.create();a.lerp(pe,kt,Wt,tt),a.lerp(se,It,Jt,tt),a.lerp(Tt,Pt,ge,tt),a.lerp(Lt,qt,fe,tt);var Mt=a.create(),ee=a.create();a.lerp(Mt,pe,Tt,pt),a.lerp(ee,se,Lt,pt);var ve=a.create();return a.lerp(ve,Mt,ee,rt),ve},v=function(_){var P=1/0;_.sort(function(h,p){return h-p});for(var M=_.length,C=1;CF||feU||peW)},J=a.distance(P[0],P[1]),lt=10*J/C,yt=lt*lt,mt=1,st=0,tt=M.length;tt>1&&(mt=T(M));for(var pt=0;ptst&&(st=kt),ft.push(kt),O.push({points:at,velocities:vt,divergences:ft});for(var It=0;Ityt&&a.scale(Pt,Pt,lt/Math.sqrt(qt)),a.add(Pt,Pt,rt),it=w(Pt),a.squaredDistance(K,Pt)-yt>-1e-4*yt){at.push(Pt),K=Pt,vt.push(it);var ut=B(Pt,it),kt=a.length(ut);isFinite(kt)&&kt>st&&(st=kt),ft.push(kt)}rt=Pt}}var Wt=l(O,_.colormap,st,mt);return h?Wt.tubeScale=h:(st===0&&(st=1),Wt.tubeScale=A*.5*mt/st),Wt};var u=r(6740),b=r(6405).createMesh;t.exports.createTubeMesh=function(_,P){return b(_,P,{shaders:u,traceType:"streamtube"})}},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(t,e,r){var a=r(6330),n=r(1533),o=r(2651),i=r(6768),l=r(869),f=r(8697);t.exports=x;function x(y,v){if(a(y))return v?f(y,x(v)):[y[0].clone(),y[1].clone()];var T=0,u,b;if(n(y))u=y.clone();else if(typeof y=="string")u=i(y);else{if(y===0)return[o(0),o(1)];if(y===Math.floor(y))u=o(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),T-=256;u=o(y)}}if(a(v))u.mul(v[1]),b=v[0].clone();else if(n(v))b=v.clone();else if(typeof v=="string")b=i(v);else if(!v)b=o(1);else if(v===Math.floor(v))b=o(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;b=o(v)}return T>0?u=u.ushln(T):T<0&&(b=b.ushln(-T)),l(u,b)}},7894:function(t){t.exports=e;function e(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7932:function(t,e,r){var a=r(620);t.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2],l=a[3]-r[3];return n*n+o*o+i*i+l*l}},8105:function(t){t.exports=r;var e={"lo===p0":a,"lo=p0)&&!(p1>=hi)":x};function r(y){return e[y]}function a(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+p];if(B===P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function n(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+p];if(BO;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function o(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+k];if(B<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function i(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+k];if(B<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function l(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+p],O=b[C+k];if(B<=P&&P<=O)if(h===w)h+=1,A+=M;else{for(var j=0;M>j;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function f(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var B=b[C+p],O=b[C+k];if(Bj;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function x(y,v,T,u,b,_,P,M){for(var C=2*y,A=C*T,h=A,p=T,k=v,w=y+v,B=T;u>B;++B,A+=C){var O=b[A+k],j=b[A+w];if(!(O>=P)&&!(M>=j))if(p===B)p+=1,h+=C;else{for(var V=0;C>V;++V){var H=b[A+V];b[A+V]=b[h],b[h++]=H}var F=_[B];_[B]=_[p],_[p++]=F}}return p}},8107:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r}},8116:function(t,e,r){var a=r(7518),n=r(870);function o(l){this.bindVertexArrayOES=l.bindVertexArray.bind(l),this.createVertexArrayOES=l.createVertexArray.bind(l),this.deleteVertexArrayOES=l.deleteVertexArray.bind(l)}function i(l,f,x,y){var v=l.createVertexArray?new o(l):l.getExtension("OES_vertex_array_object"),T;return v?T=a(l,v):T=n(l),T.update(f,x,y),T}t.exports=i},8192:function(t,e,r){t.exports=i;var a=r(2825),n=r(3536),o=r(244);function i(l,f){var x=a(l[0],l[1],l[2]),y=a(f[0],f[1],f[2]);n(x,x),n(y,y);var v=o(x,y);return v>1?0:Math.acos(v)}},8210:function(t){t.exports=r;function e(a,n){var o=a+n,i=o-a,l=o-i,f=n-i,x=a-l,y=x+f;return y?[y,o]:[o]}function r(a,n){var o=a.length|0,i=n.length|0;if(o===1&&i===1)return e(a[0],n[0]);var l=o+i,f=new Array(l),x=0,y=0,v=0,T=Math.abs,u=a[y],b=T(u),_=n[v],P=T(_),M,C;b=i?(M=u,y+=1,yx)for(var B=f[u],O=1/Math.sqrt(h*k),w=0;w<3;++w){var j=(w+1)%3,V=(w+2)%3;B[w]+=O*(p[j]*A[V]-p[V]*A[j])}}for(var y=0;yx)for(var O=1/Math.sqrt(H),w=0;w<3;++w)B[w]*=O;else for(var w=0;w<3;++w)B[w]=0}return f},e.faceNormals=function(n,o,i){for(var l=n.length,f=new Array(l),x=i===void 0?a:i,y=0;yx?M=1/Math.sqrt(M):M=0;for(var u=0;u<3;++u)P[u]*=M;f[y]=P}return f}},8418:function(t,e,r){var a=r(5219),n=r(2762),o=r(8116),i=r(1888),l=r(6760),f=r(1283),x=r(9366),y=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,u=DataView;function b(at){return T.isView(at)&&!(at instanceof u)}function _(at){return Array.isArray(at)||b(at)}t.exports=rt;function P(at,vt){var it=at[0],K=at[1],ft=at[2],ut=at[3];return at[0]=vt[0]*it+vt[4]*K+vt[8]*ft+vt[12]*ut,at[1]=vt[1]*it+vt[5]*K+vt[9]*ft+vt[13]*ut,at[2]=vt[2]*it+vt[6]*K+vt[10]*ft+vt[14]*ut,at[3]=vt[3]*it+vt[7]*K+vt[11]*ft+vt[15]*ut,at}function M(at,vt,it,K){return P(K,K),P(K,K),P(K,K)}function C(at,vt){this.index=at,this.dataCoordinate=this.position=vt}function A(at){return at===!0||at>1?1:at}function h(at,vt,it,K,ft,ut,kt,It,Pt,qt,Wt,Jt){this.gl=at,this.pixelRatio=1,this.shader=vt,this.orthoShader=it,this.projectShader=K,this.pointBuffer=ft,this.colorBuffer=ut,this.glyphBuffer=kt,this.idBuffer=It,this.vao=Pt,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=qt,this.pickOrthoShader=Wt,this.pickProjectShader=Jt,this.points=[],this._selectResult=new C(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 p=h.prototype;p.pickSlots=1,p.setPickBase=function(at){this.pickId=at},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],w=[0,0,0],B=[0,0,0],O=[0,0,0,1],j=[0,0,0,1],V=v.slice(),H=[0,0,0],F=[[0,0,0],[0,0,0]];function U(at){return at[0]=at[1]=at[2]=0,at}function W(at,vt){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[3]=1,at}function q(at,vt,it,K){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[it]=K,at}function J(at){for(var vt=F,it=0;it<2;++it)for(var K=0;K<3;++K)vt[it][K]=Math.max(Math.min(at[it][K],1e8),-1e8);return vt}function lt(at,vt,it,K){var ft=vt.axesProject,ut=vt.gl,kt=at.uniforms,It=it.model||v,Pt=it.view||v,qt=it.projection||v,Wt=vt.axesBounds,Jt=J(vt.clipBounds),ge;vt.axes&&vt.axes.lastCubeProps?ge=vt.axes.lastCubeProps.axis:ge=[1,1,1],k[0]=2/ut.drawingBufferWidth,k[1]=2/ut.drawingBufferHeight,at.bind(),kt.view=Pt,kt.projection=qt,kt.screenSize=k,kt.highlightId=vt.highlightId,kt.highlightScale=vt.highlightScale,kt.clipBounds=Jt,kt.pickGroup=vt.pickId/255,kt.pixelRatio=K;for(var fe=0;fe<3;++fe)if(ft[fe]){kt.scale=vt.projectScale[fe],kt.opacity=vt.projectOpacity[fe];for(var pe=V,se=0;se<16;++se)pe[se]=0;for(var se=0;se<4;++se)pe[5*se]=1;pe[5*fe]=0,ge[fe]<0?pe[12+fe]=Wt[0][fe]:pe[12+fe]=Wt[1][fe],l(pe,It,pe),kt.model=pe;var Tt=(fe+1)%3,Lt=(fe+2)%3,Mt=U(w),ee=U(B);Mt[Tt]=1,ee[Lt]=1;var ve=M(qt,Pt,It,W(O,Mt)),oe=M(qt,Pt,It,W(j,ee));if(Math.abs(ve[1])>Math.abs(oe[1])){var Ae=ve;ve=oe,oe=Ae,Ae=Mt,Mt=ee,ee=Ae;var He=Tt;Tt=Lt,Lt=He}ve[0]<0&&(Mt[Tt]=-1),oe[1]>0&&(ee[Lt]=-1);for(var Ge=0,cr=0,se=0;se<4;++se)Ge+=Math.pow(It[4*Tt+se],2),cr+=Math.pow(It[4*Lt+se],2);Mt[Tt]/=Math.sqrt(Ge),ee[Lt]/=Math.sqrt(cr),kt.axes[0]=Mt,kt.axes[1]=ee,kt.fragClipBounds[0]=q(H,Jt[0],fe,-1e8),kt.fragClipBounds[1]=q(H,Jt[1],fe,1e8),vt.vao.bind(),vt.vao.draw(ut.TRIANGLES,vt.vertexCount),vt.lineWidth>0&&(ut.lineWidth(vt.lineWidth*K),vt.vao.draw(ut.LINES,vt.lineVertexCount,vt.vertexCount)),vt.vao.unbind()}}var yt=[-1e8,-1e8,-1e8],mt=[1e8,1e8,1e8],st=[yt,mt];function tt(at,vt,it,K,ft,ut,kt){var It=it.gl;if((ut===it.projectHasAlpha||kt)&<(vt,it,K,ft),ut===it.hasAlpha||kt){at.bind();var Pt=at.uniforms;Pt.model=K.model||v,Pt.view=K.view||v,Pt.projection=K.projection||v,k[0]=2/It.drawingBufferWidth,k[1]=2/It.drawingBufferHeight,Pt.screenSize=k,Pt.highlightId=it.highlightId,Pt.highlightScale=it.highlightScale,Pt.fragClipBounds=st,Pt.clipBounds=it.axes.bounds,Pt.opacity=it.opacity,Pt.pickGroup=it.pickId/255,Pt.pixelRatio=ft,it.vao.bind(),it.vao.draw(It.TRIANGLES,it.vertexCount),it.lineWidth>0&&(It.lineWidth(it.lineWidth*ft),it.vao.draw(It.LINES,it.lineVertexCount,it.vertexCount)),it.vao.unbind()}}p.draw=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!1,!1)},p.drawTransparent=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!0,!1)},p.drawPick=function(at){var vt=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;tt(vt,this.pickProjectShader,this,at,1,!0,!0)},p.pick=function(at){if(!at||at.id!==this.pickId)return null;var vt=at.value[2]+(at.value[1]<<8)+(at.value[0]<<16);if(vt>=this.pointCount||vt<0)return null;var it=this.points[vt],K=this._selectResult;K.index=vt;for(var ft=0;ft<3;++ft)K.position[ft]=K.dataCoordinate[ft]=it[ft];return K},p.highlight=function(at){if(!at)this.highlightId=[1,1,1,1];else{var vt=at.index,it=vt&255,K=vt>>8&255,ft=vt>>16&255;this.highlightId=[it/255,K/255,ft/255,0]}};function pt(at,vt,it,K){var ft;_(at)?vt0){var nn=0,Le=Lt,Gt=[0,0,0,1],ne=[0,0,0,1],Ct=_(ge)&&_(ge[0]),gt=_(se)&&_(se[0]);t:for(var K=0;K0?1-cr[0][0]:qe<0?1+cr[1][0]:1,or*=or>0?1-cr[0][1]:or<0?1+cr[1][1]:1;for(var Sr=[qe,or],Mr=He.cells||[],mr=He.positions||[],oe=0;oe=i?(M=u,y+=1,y0?1:0}},8648:function(t,e,r){t.exports=r(783)},8692:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[1],f=a[0]-i,x=a[1]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+f*v-x*y,r[1]=l+f*y+x*v,r[2]=a[2],r}},8697:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]),o[1].mul(i[0]))}},8731:function(t,e,r){t.exports=x;var a=r(8866);function n(y,v,T,u,b,_){this._gl=y,this._wrapper=v,this._index=T,this._locations=u,this._dimension=b,this._constFunc=_}var o=n.prototype;o.pointer=function(y,v,T,u){var b=this,_=b._gl,P=b._locations[b._index];_.vertexAttribPointer(P,b._dimension,y||_.FLOAT,!!v,T||0,u||0),_.enableVertexAttribArray(P)},o.set=function(y,v,T,u){return this._constFunc(this._locations[this._index],y,v,T,u)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var i=[function(y,v,T){return T.length===void 0?y.vertexAttrib1f(v,T):y.vertexAttrib1fv(v,T)},function(y,v,T,u){return T.length===void 0?y.vertexAttrib2f(v,T,u):y.vertexAttrib2fv(v,T)},function(y,v,T,u,b){return T.length===void 0?y.vertexAttrib3f(v,T,u,b):y.vertexAttrib3fv(v,T)},function(y,v,T,u,b,_){return T.length===void 0?y.vertexAttrib4f(v,T,u,b,_):y.vertexAttrib4fv(v,T)}];function l(y,v,T,u,b,_,P){var M=i[b],C=new n(y,v,T,u,b,M);Object.defineProperty(_,P,{set:function(A){return y.disableVertexAttribArray(u[T]),M(y,u[T],A),A},get:function(){return C},enumerable:!0})}function f(y,v,T,u,b,_,P){for(var M=new Array(b),C=new Array(b),A=0;A=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);l(y,v,h[0],u,p,b,C)}else if(A.indexOf("mat")>=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);f(y,v,h,u,p,b,C)}else throw new a("","Unknown data type for attribute "+C+": "+A);break}}return b}},8828:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},8866:function(t){function e(r,a,n){this.shortMessage=a||"",this.longMessage=n||"",this.rawError=r||"",this.message="gl-shader: "+(a||r||"")+(n?` +`+n:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8902:function(t,e,r){var a=r(2478),n=r(3250)[3],o=0,i=1,l=2;t.exports=P;function f(M,C,A,h,p){this.a=M,this.b=C,this.idx=A,this.lowerIds=h,this.upperIds=p}function x(M,C,A,h){this.a=M,this.b=C,this.type=A,this.idx=h}function y(M,C){var A=M.a[0]-C.a[0]||M.a[1]-C.a[1]||M.type-C.type;return A||M.type!==o&&(A=n(M.a,M.b,C.b),A)?A:M.idx-C.idx}function v(M,C){return n(M.a,M.b,C)}function T(M,C,A,h,p){for(var k=a.lt(C,h,v),w=a.gt(C,h,v),B=k;B1&&n(A[j[V-2]],A[j[V-1]],h)>0;)M.push([j[V-1],j[V-2],p]),V-=1;j.length=V,j.push(p);for(var H=O.upperIds,V=H.length;V>1&&n(A[H[V-2]],A[H[V-1]],h)<0;)M.push([H[V-2],H[V-1],p]),V-=1;H.length=V,H.push(p)}}function u(M,C){var A;return M.a[0]O[0]&&p.push(new x(O,B,l,k),new x(B,O,i,k))}p.sort(y);for(var j=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),V=[new f([j,1],[j,0],-1,[],[])],H=[],k=0,F=p.length;k0;){b=h.pop();for(var p=b.adjacent,k=0;k<=P;++k){var w=p[k];if(!(!w.boundary||w.lastVisited<=-M)){for(var B=w.vertices,O=0;O<=P;++O){var j=B[O];j<0?C[O]=_:C[O]=A[j]}var V=this.orient();if(V>0)return w;w.lastVisited=-M,V===0&&h.push(w)}}}return null},T.walk=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=_?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[h];t:for(;!p.boundary;){for(var k=p.vertices,w=p.adjacent,B=0;B<=M;++B)A[B]=C[k[B]];p.lastVisited=P;for(var B=0;B<=M;++B){var O=w[B];if(!(O.lastVisited>=P)){var j=A[B];A[B]=b;var V=this.orient();if(A[B]=j,V<0){p=O;continue t}else O.boundary?O.lastVisited=-P:O.lastVisited=P}}return}return p},T.addPeaks=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=this.interior,p=this.simplices,k=[_];_.lastVisited=P,_.vertices[_.vertices.indexOf(-1)]=P,_.boundary=!1,h.push(_);for(var w=[];k.length>0;){var _=k.pop(),B=_.vertices,O=_.adjacent,j=B.indexOf(P);if(!(j<0)){for(var V=0;V<=M;++V)if(V!==j){var H=O[V];if(!(!H.boundary||H.lastVisited>=P)){var F=H.vertices;if(H.lastVisited!==-P){for(var U=0,W=0;W<=M;++W)F[W]<0?(U=W,A[W]=b):A[W]=C[F[W]];var q=this.orient();if(q>0){F[U]=P,H.boundary=!1,h.push(H),k.push(H),H.lastVisited=P;continue}else H.lastVisited=-P}var J=H.adjacent,lt=B.slice(),yt=O.slice(),mt=new o(lt,yt,!0);p.push(mt);var st=J.indexOf(_);if(!(st<0)){J[st]=mt,yt[j]=H,lt[V]=-1,yt[V]=_,O[V]=mt,mt.flip();for(var W=0;W<=M;++W){var tt=lt[W];if(!(tt<0||tt===P)){for(var pt=new Array(M-1),rt=0,at=0;at<=M;++at){var vt=lt[at];vt<0||at===W||(pt[rt++]=vt)}w.push(new i(pt,mt,W))}}}}}}}w.sort(l);for(var V=0;V+1=0?h[k++]=p[B]:w=B&1;if(w===(b&1)){var O=h[0];h[0]=h[1],h[1]=O}_.push(h)}}return _};function u(b,_){var P=b.length;if(P===0)throw new Error("Must have at least d+1 points");var M=b[0].length;if(P<=M)throw new Error("Must input at least d+1 points");var C=b.slice(0,M+1),A=a.apply(void 0,C);if(A===0)throw new Error("Input not in general position");for(var h=new Array(M+1),p=0;p<=M;++p)h[p]=p;A<0&&(h[0]=1,h[1]=0);for(var k=new o(h,new Array(M+1),!1),w=k.adjacent,B=new Array(M+2),p=0;p<=M;++p){for(var O=h.slice(),j=0;j<=M;++j)j===p&&(O[j]=-1);var V=O[0];O[0]=O[1],O[1]=V;var H=new o(O,new Array(M+1),!0);w[p]=H,B[p]=H}B[M+1]=k;for(var p=0;p<=M;++p)for(var O=w[p].vertices,F=w[p].adjacent,j=0;j<=M;++j){var U=O[j];if(U<0){F[j]=k;continue}for(var W=0;W<=M;++W)w[W].vertices.indexOf(U)<0&&(F[j]=w[W])}for(var q=new v(M,C,B),J=!!_,p=M+1;p=1},u.isTransparent=function(){return this.opacity<1},u.pickSlots=1,u.setPickBase=function(A){this.pickId=A};function b(A){for(var h=y({colormap:A,nshades:256,format:"rgba"}),p=new Uint8Array(1024),k=0;k<256;++k){for(var w=h[k],B=0;B<3;++B)p[4*k+B]=w[B];p[4*k+3]=w[3]*255}return x(p,[256,256,4],[4,0,1])}function _(A){for(var h=A.length,p=new Array(h),k=0;k0){var W=this.triShader;W.bind(),W.uniforms=j,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},u.drawPick=function(A){A=A||{};for(var h=this.gl,p=A.model||v,k=A.view||v,w=A.projection||v,B=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)B[0][O]=Math.max(B[0][O],this.clipBounds[0][O]),B[1][O]=Math.min(B[1][O],this.clipBounds[1][O]);this._model=[].slice.call(p),this._view=[].slice.call(k),this._projection=[].slice.call(w),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var j={model:p,view:k,projection:w,clipBounds:B,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},V=this.pickShader;V.bind(),V.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},u.pick=function(A){if(!A||A.id!==this.pickId)return null;var h=A.value[0]+256*A.value[1]+65536*A.value[2],p=this.cells[h],k=this.positions[p[1]].slice(0,3),w={position:k,dataCoordinate:k,index:Math.floor(p[1]/48)};return this.traceType==="cone"?w.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(w.intensity=this.intensity[p[1]],w.velocity=this.vectors[p[1]].slice(0,3),w.divergence=this.vectors[p[1]][3],w.index=h),w},u.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 P(A,h){var p=a(A,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function M(A,h){var p=a(A,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function C(A,h,p){var k=p.shaders;arguments.length===1&&(h=A,A=h.gl);var w=P(A,k),B=M(A,k),O=i(A,x(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=A.LINEAR_MIPMAP_LINEAR,O.magFilter=A.LINEAR;var j=n(A),V=n(A),H=n(A),F=n(A),U=n(A),W=o(A,[{buffer:j,type:A.FLOAT,size:4},{buffer:U,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:H,type:A.FLOAT,size:4},{buffer:F,type:A.FLOAT,size:2},{buffer:V,type:A.FLOAT,size:4}]),q=new T(A,O,w,B,j,V,U,H,F,W,p.traceType||"cone");return q.update(h),q}t.exports=C},9127:function(t,e,r){t.exports=o;var a=r(6204),n=r(5771);function o(i){return n(a(i))}},9131:function(t,e,r){var a=r(5177),n=r(9288);t.exports=o;function o(i,l){return l=l||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),n(i,i,l),i}},9165:function(t,e,r){t.exports=T;var a=r(2762),n=r(8116),o=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.shader=P,this.buffer=b,this.vao=_,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 f=l.prototype;f.isOpaque=function(){return!this.hasAlpha},f.isTransparent=function(){return this.hasAlpha},f.drawTransparent=f.draw=function(u){var b=this.gl,_=this.shader.uniforms;this.shader.bind();var P=_.view=u.view||i,M=_.projection=u.projection||i;_.model=u.model||i,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var C=P[12],A=P[13],h=P[14],p=P[15],k=u._ortho||!1,w=k?2:1,B=w*this.pixelRatio*(M[3]*C+M[7]*A+M[11]*h+M[15]*p)/b.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)b.lineWidth(this.lineWidth[O]*this.pixelRatio),_.capSize=this.capSize[O]*B,this.lineCount[O]&&b.drawArrays(b.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function x(u,b){for(var _=0;_<3;++_)u[0][_]=Math.min(u[0][_],b[_]),u[1][_]=Math.max(u[1][_],b[_])}var y=function(){for(var u=new Array(3),b=0;b<3;++b){for(var _=[],P=1;P<=2;++P)for(var M=-1;M<=1;M+=2){var C=(P+b)%3,A=[0,0,0];A[C]=M,_.push(A)}u[b]=_}return u}();function v(u,b,_,P){for(var M=y[P],C=0;C0){var j=k.slice();j[h]+=B[1][h],M.push(k[0],k[1],k[2],O[0],O[1],O[2],O[3],0,0,0,j[0],j[1],j[2],O[0],O[1],O[2],O[3],0,0,0),x(this.bounds,j),A+=2+v(M,j,O,h)}}}this.lineCount[h]=A-this.lineOffset[h]}this.buffer.update(M)}},f.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(u){var b=u.gl,_=a(b),P=n(b,[{buffer:_,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:b.FLOAT,size:3,offset:28,stride:40}]),M=o(b);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var C=new l(b,_,P,M);return C.update(u),C}},9215:function(t,e,r){t.exports=x;var a=r(4769),n=r(2478);function o(y,v,T){return Math.min(v,Math.max(y,T))}function i(y,v,T){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var u=0;u=T-1)for(var A=_.length-1,p=y-v[T-1],h=0;h=T-1)for(var C=_.length-1,A=y-v[T-1],h=0;h=0;--T)if(y[--v])return!1;return!0},l.jump=function(y){var v=this.lastT(),T=this.dimension;if(!(y0;--h)u.push(o(M[h-1],C[h-1],arguments[h])),b.push(0)}},l.push=function(y){var v=this.lastT(),T=this.dimension;if(!(y1e-6?1/P:0;this._time.push(y);for(var p=T;p>0;--p){var k=o(C[p-1],A[p-1],arguments[p]);u.push(k),b.push((k-u[_++])*h)}}},l.set=function(y){var v=this.dimension;if(!(y0;--M)T.push(o(_[M-1],P[M-1],arguments[M])),u.push(0)}},l.move=function(y){var v=this.lastT(),T=this.dimension;if(!(y<=v||arguments.length!==T+1)){var u=this._state,b=this._velocity,_=u.length-this.dimension,P=this.bounds,M=P[0],C=P[1],A=y-v,h=A>1e-6?1/A:0;this._time.push(y);for(var p=T;p>0;--p){var k=arguments[p];u.push(o(M[p-1],C[p-1],u[_++]+k)),b.push(k*h)}}},l.idle=function(y){var v=this.lastT();if(!(y=0;--h)u.push(o(M[h],C[h],u[_]+A*b[_])),b.push(0),_+=1}};function f(y){for(var v=new Array(y),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(l=!0),l}},9226:function(t){t.exports=e;function e(r,a){return r[0]=Math.ceil(a[0]),r[1]=Math.ceil(a[1]),r[2]=Math.ceil(a[2]),r}},9265:function(t){t.exports=e;function e(r,a){return r[0]===a[0]&&r[1]===a[1]&&r[2]===a[2]}},9288:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]*n,r[1]=a[1]*n,r[2]=a[2]*n,r[3]=a[3]*n,r}},9346:function(t){var e=new Float64Array(4),r=new Float64Array(4),a=new Float64Array(4);function n(o,i,l,f,x){e.length=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P)):(p=0,_>=0?(k=0,w=P):-_>=u?(k=1,w=u+2*_+P):(k=-_/u,w=_*k+P));else if(k<0)k=0,b>=0?(p=0,w=P):-b>=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P);else{var B=1/h;p*=B,k*=B,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P}else{var O,j,V,H;p<0?(O=T+b,j=u+_,j>O?(V=j-O,H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(p=0,j<=0?(k=1,w=u+2*_+P):_>=0?(k=0,w=P):(k=-_/u,w=_*k+P))):k<0?(O=T+_,j=v+b,j>O?(V=j-O,H=v-2*T+u,V>=H?(k=1,p=0,w=u+2*_+P):(k=V/H,p=1-k,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(k=0,j<=0?(p=1,w=v+2*b+P):b>=0?(p=0,w=P):(p=-b/v,w=b*p+P))):(V=u+_-T-b,V<=0?(p=0,k=1,w=u+2*_+P):(H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)))}for(var F=1-p-k,y=0;y_)for(u=_;ub)for(u=b;u<_;u++)this.gl.disableVertexAttribArray(u);this.gl.lastAttribCount=b,this.gl.useProgram(this.program)},y.dispose=function(){for(var u=this.gl.lastAttribCount,b=0;b=0){for(var F=H.type.charAt(H.type.length-1)|0,U=new Array(F),W=0;W=0;)q+=1;j[V]=q}var J=new Array(_.length);function lt(){C.program=i.program(A,C._vref,C._fref,O,j);for(var yt=0;yt<_.length;++yt)J[yt]=A.getUniformLocation(C.program,_[yt].name)}lt(),C._relink=lt,C.types={uniforms:o(_),attributes:o(P)},C.attributes=n(A,C,B,j),Object.defineProperty(C,"uniforms",a(A,C,_,J))};function T(u,b,_,P,M){var C=new x(u);return C.update(b,_,P,M),C}t.exports=T},9499:function(t,e,r){t.exports=vt;var a=r(8828),n=r(2762),o=r(8116),i=r(7766),l=r(1888),f=r(6729),x=r(5298),y=r(9994),v=r(9618),T=r(3711),u=r(6760),b=r(7608),_=r(2478),P=r(6199),M=r(990),C=M.createShader,A=M.createContourShader,h=M.createPickShader,p=M.createPickContourShader,k=40,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],B=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[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 it=0;it<3;++it){var K=O[it],ft=(it+1)%3,ut=(it+2)%3;K[ft+0]=1,K[ut+3]=1,K[it+6]=1}})();function j(it,K,ft,ut,kt){this.position=it,this.index=K,this.uv=ft,this.level=ut,this.dataCoordinate=kt}var V=256;function H(it,K,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt){this.gl=it,this.shape=K,this.bounds=ft,this.objectOffset=Tt,this.intensityBounds=[],this._shader=ut,this._pickShader=kt,this._coordinateBuffer=It,this._vao=Pt,this._colorMap=qt,this._contourShader=Wt,this._contourPickShader=Jt,this._contourBuffer=ge,this._contourVAO=fe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new j([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=pe,this._dynamicVAO=se,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(l.mallocFloat(1024),[0,0]),v(l.mallocFloat(1024),[0,0]),v(l.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 F=H.prototype;F.genColormap=function(it,K){var ft=!1,ut=y([f({colormap:it,nshades:V,format:"rgba"}).map(function(kt,It){var Pt=K?U(It/255,K):kt[3];return Pt<1&&(ft=!0),[kt[0],kt[1],kt[2],255*Pt]})]);return x.divseq(ut,255),this.hasAlphaScale=ft,ut},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(it){this.pickId=it};function U(it,K){if(!K||!K.length)return 1;for(var ft=0;ftit&&ft>0){var ut=(K[ft][0]-it)/(K[ft][0]-K[ft-1][0]);return K[ft][1]*(1-ut)+ut*K[ft-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(it,K){var ft,ut,kt,It=K.axes&&K.axes.lastCubeProps.axis||W,Pt=K.showSurface,qt=K.showContour;for(ft=0;ft<3;++ft)for(Pt=Pt||K.surfaceProject[ft],ut=0;ut<3;++ut)qt=qt||K.contourProject[ft][ut];for(ft=0;ft<3;++ft){var Wt=q.projections[ft];for(ut=0;ut<16;++ut)Wt[ut]=0;for(ut=0;ut<4;++ut)Wt[5*ut]=1;Wt[5*ft]=0,Wt[12+ft]=K.axesBounds[+(It[ft]>0)][ft],u(Wt,it.model,Wt);var Jt=q.clipBounds[ft];for(kt=0;kt<2;++kt)for(ut=0;ut<3;++ut)Jt[kt][ut]=it.clipBounds[kt][ut];Jt[0][ft]=-1e8,Jt[1][ft]=1e8}return q.showSurface=Pt,q.showContour=qt,q}var lt={model:w,view:w,projection:w,inverseModel:w.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},yt=w.slice(),mt=[1,0,0,0,1,0,0,0,1];function st(it,K){it=it||{};var ft=this.gl;ft.disable(ft.CULL_FACE),this._colorMap.bind(0);var ut=lt;ut.model=it.model||w,ut.view=it.view||w,ut.projection=it.projection||w,ut.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ut.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ut.objectOffset=this.objectOffset,ut.contourColor=this.contourColor[0],ut.inverseModel=b(ut.inverseModel,ut.model);for(var kt=0;kt<2;++kt)for(var It=ut.clipBounds[kt],Pt=0;Pt<3;++Pt)It[Pt]=Math.min(Math.max(this.clipBounds[kt][Pt],-1e8),1e8);ut.kambient=this.ambientLight,ut.kdiffuse=this.diffuseLight,ut.kspecular=this.specularLight,ut.roughness=this.roughness,ut.fresnel=this.fresnel,ut.opacity=this.opacity,ut.height=0,ut.permutation=mt,ut.vertexColor=this.vertexColor;var qt=yt;for(u(qt,ut.view,ut.model),u(qt,ut.projection,qt),b(qt,qt),kt=0;kt<3;++kt)ut.eyePosition[kt]=qt[12+kt]/qt[15];var Wt=qt[15];for(kt=0;kt<3;++kt)Wt+=this.lightPosition[kt]*qt[4*kt+3];for(kt=0;kt<3;++kt){var Jt=qt[12+kt];for(Pt=0;Pt<3;++Pt)Jt+=qt[4*Pt+kt]*this.lightPosition[Pt];ut.lightPosition[kt]=Jt/Wt}var ge=J(ut,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ut,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ft.TRIANGLES,this._vertexCount),kt=0;kt<3;++kt)!this.surfaceProject[kt]||!this.vertexCount||(this._shader.uniforms.model=ge.projections[kt],this._shader.uniforms.clipBounds=ge.clipBounds[kt],this._vao.draw(ft.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var fe=this._contourShader;ut.kambient=1,ut.kdiffuse=0,ut.kspecular=0,ut.opacity=1,fe.bind(),fe.uniforms=ut;var pe=this._contourVAO;for(pe.bind(),kt=0;kt<3;++kt)for(fe.uniforms.permutation=O[kt],ft.lineWidth(this.contourWidth[kt]*this.pixelRatio),Pt=0;Pt>4)/16)/255,kt=Math.floor(ut),It=ut-kt,Pt=K[1]*(it.value[1]+(it.value[2]&15)/16)/255,qt=Math.floor(Pt),Wt=Pt-qt;kt+=1,qt+=1;var Jt=ft.position;Jt[0]=Jt[1]=Jt[2]=0;for(var ge=0;ge<2;++ge)for(var fe=ge?It:1-It,pe=0;pe<2;++pe)for(var se=pe?Wt:1-Wt,Tt=kt+ge,Lt=qt+pe,Mt=fe*se,ee=0;ee<3;++ee)Jt[ee]+=this._field[ee].get(Tt,Lt)*Mt;for(var ve=this._pickResult.level,oe=0;oe<3;++oe)if(ve[oe]=_.le(this.contourLevels[oe],Jt[oe]),ve[oe]<0)this.contourLevels[oe].length>0&&(ve[oe]=0);else if(ve[oe]Math.abs(He-Jt[oe])&&(ve[oe]+=1)}for(ft.index[0]=It<.5?kt:kt+1,ft.index[1]=Wt<.5?qt:qt+1,ft.uv[0]=ut/K[0],ft.uv[1]=Pt/K[1],ee=0;ee<3;++ee)ft.dataCoordinate[ee]=this._field[ee].get(ft.index[0],ft.index[1]);return ft},F.padField=function(it,K){var ft=K.shape.slice(),ut=it.shape.slice();x.assign(it.lo(1,1).hi(ft[0],ft[1]),K),x.assign(it.lo(1).hi(ft[0],1),K.hi(ft[0],1)),x.assign(it.lo(1,ut[1]-1).hi(ft[0],1),K.lo(0,ft[1]-1).hi(ft[0],1)),x.assign(it.lo(0,1).hi(1,ft[1]),K.hi(1)),x.assign(it.lo(ut[0]-1,1).hi(1,ft[1]),K.lo(ft[0]-1)),it.set(0,0,K.get(0,0)),it.set(0,ut[1]-1,K.get(0,ft[1]-1)),it.set(ut[0]-1,0,K.get(ft[0]-1,0)),it.set(ut[0]-1,ut[1]-1,K.get(ft[0]-1,ft[1]-1))};function pt(it,K){return Array.isArray(it)?[K(it[0]),K(it[1]),K(it[2])]:[K(it),K(it),K(it)]}function rt(it){return Array.isArray(it)?it.length===3?[it[0],it[1],it[2],1]:[it[0],it[1],it[2],it[3]]:[0,0,0,1]}function at(it){if(Array.isArray(it)){if(Array.isArray(it))return[rt(it[0]),rt(it[1]),rt(it[2])];var K=rt(it);return[K.slice(),K.slice(),K.slice()]}}F.update=function(it){it=it||{},this.objectOffset=it.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in it&&(this.contourWidth=pt(it.contourWidth,Number)),"showContour"in it&&(this.showContour=pt(it.showContour,Boolean)),"showSurface"in it&&(this.showSurface=!!it.showSurface),"contourTint"in it&&(this.contourTint=pt(it.contourTint,Boolean)),"contourColor"in it&&(this.contourColor=at(it.contourColor)),"contourProject"in it&&(this.contourProject=pt(it.contourProject,function(Ji){return pt(Ji,Boolean)})),"surfaceProject"in it&&(this.surfaceProject=it.surfaceProject),"dynamicColor"in it&&(this.dynamicColor=at(it.dynamicColor)),"dynamicTint"in it&&(this.dynamicTint=pt(it.dynamicTint,Number)),"dynamicWidth"in it&&(this.dynamicWidth=pt(it.dynamicWidth,Number)),"opacity"in it&&(this.opacity=it.opacity),"opacityscale"in it&&(this.opacityscale=it.opacityscale),"colorBounds"in it&&(this.colorBounds=it.colorBounds),"vertexColor"in it&&(this.vertexColor=it.vertexColor?1:0),"colormap"in it&&this._colorMap.setPixels(this.genColormap(it.colormap,this.opacityscale));var K=it.field||it.coords&&it.coords[2]||null,ft=!1;if(K||(this._field[2].shape[0]||this._field[2].shape[2]?K=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):K=this._field[2].hi(0,0)),"field"in it||"coords"in it){var ut=(K.shape[0]+2)*(K.shape[1]+2);ut>this._field[2].data.length&&(l.freeFloat(this._field[2].data),this._field[2].data=l.mallocFloat(a.nextPow2(ut))),this._field[2]=v(this._field[2].data,[K.shape[0]+2,K.shape[1]+2]),this.padField(this._field[2],K),this.shape=K.shape.slice();for(var kt=this.shape,It=0;It<2;++It)this._field[2].size>this._field[It].data.length&&(l.freeFloat(this._field[It].data),this._field[It].data=l.mallocFloat(this._field[2].size)),this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2]);if(it.coords){var Pt=it.coords;if(!Array.isArray(Pt)||Pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(It=0;It<2;++It){var qt=Pt[It];for(pe=0;pe<2;++pe)if(qt.shape[pe]!==kt[pe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[It],qt)}}else if(it.ticks){var Wt=it.ticks;if(!Array.isArray(Wt)||Wt.length!==2)throw new Error("gl-surface: invalid ticks");for(It=0;It<2;++It){var Jt=Wt[It];if((Array.isArray(Jt)||Jt.length)&&(Jt=v(Jt)),Jt.shape[0]!==kt[It])throw new Error("gl-surface: invalid tick length");var ge=v(Jt.data,kt);ge.stride[It]=Jt.stride[0],ge.stride[It^1]=0,this.padField(this._field[It],ge)}}else{for(It=0;It<2;++It){var fe=[0,0];fe[It]=1,this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2],fe,0)}this._field[0].set(0,0,0);for(var pe=0;pe0){for(var Ni=0;Ni<5;++Ni)Mr.pop();Ct-=1}continue t}}}qn.push(Ct)}this._contourOffsets[mr]=Wn,this._contourCounts[mr]=qn}var Hi=l.mallocFloat(Mr.length);for(It=0;It=0&&(A=M|0,C+=p*A,h-=A),new _(this.data,h,p,C)},P.step=function(M){var C=this.shape[0],A=this.stride[0],h=this.offset,p=0,k=Math.ceil;return typeof M=="number"&&(p=M|0,p<0?(h+=A*(C-1),C=k(-C/p)):C=k(C/p),A*=p),new _(this.data,C,A,h)},P.transpose=function(M){M=M===void 0?0:M|0;var C=this.shape,A=this.stride;return new _(this.data,C[M],A[M],this.offset)},P.pick=function(M){var C=[],A=[],h=this.offset;typeof M=="number"&&M>=0?h=h+this.stride[0]*M|0:(C.push(this.shape[0]),A.push(this.stride[0]));var p=u[C.length+1];return p(this.data,C,A,h)},function(M,C,A,h){return new _(M,C[0],A[0],h)}},2:function(T,u,b){function _(M,C,A,h,p,k){this.data=M,this.shape=[C,A],this.stride=[h,p],this.offset=k|0}var P=_.prototype;return P.dtype=T,P.dimension=2,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(P,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),P.set=function(M,C,A){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C,A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]=A},P.get=function(M,C){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]},P.index=function(M,C){return this.offset+this.stride[0]*M+this.stride[1]*C},P.hi=function(M,C){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},P.lo=function(M,C){var A=this.offset,h=0,p=this.shape[0],k=this.shape[1],w=this.stride[0],B=this.stride[1];return typeof M=="number"&&M>=0&&(h=M|0,A+=w*h,p-=h),typeof C=="number"&&C>=0&&(h=C|0,A+=B*h,k-=h),new _(this.data,p,k,w,B,A)},P.step=function(M,C){var A=this.shape[0],h=this.shape[1],p=this.stride[0],k=this.stride[1],w=this.offset,B=0,O=Math.ceil;return typeof M=="number"&&(B=M|0,B<0?(w+=p*(A-1),A=O(-A/B)):A=O(A/B),p*=B),typeof C=="number"&&(B=C|0,B<0?(w+=k*(h-1),h=O(-h/B)):h=O(h/B),k*=B),new _(this.data,A,h,p,k,w)},P.transpose=function(M,C){M=M===void 0?0:M|0,C=C===void 0?1:C|0;var A=this.shape,h=this.stride;return new _(this.data,A[M],A[C],h[M],h[C],this.offset)},P.pick=function(M,C){var A=[],h=[],p=this.offset;typeof M=="number"&&M>=0?p=p+this.stride[0]*M|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof C=="number"&&C>=0?p=p+this.stride[1]*C|0:(A.push(this.shape[1]),h.push(this.stride[1]));var k=u[A.length+1];return k(this.data,A,h,p)},function(M,C,A,h){return new _(M,C[0],C[1],A[0],A[1],h)}},3:function(T,u,b){function _(M,C,A,h,p,k,w,B){this.data=M,this.shape=[C,A,h],this.stride=[p,k,w],this.offset=B|0}var P=_.prototype;return P.dtype=T,P.dimension=3,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(P,"order",{get:function(){var M=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return M>C?C>A?[2,1,0]:M>A?[1,2,0]:[1,0,2]:M>A?[2,0,1]:A>C?[0,1,2]:[0,2,1]}}),P.set=function(M,C,A,h){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A,h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]=h},P.get=function(M,C,A){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]},P.index=function(M,C,A){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A},P.hi=function(M,C,A){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},P.lo=function(M,C,A){var h=this.offset,p=0,k=this.shape[0],w=this.shape[1],B=this.shape[2],O=this.stride[0],j=this.stride[1],V=this.stride[2];return typeof M=="number"&&M>=0&&(p=M|0,h+=O*p,k-=p),typeof C=="number"&&C>=0&&(p=C|0,h+=j*p,w-=p),typeof A=="number"&&A>=0&&(p=A|0,h+=V*p,B-=p),new _(this.data,k,w,B,O,j,V,h)},P.step=function(M,C,A){var h=this.shape[0],p=this.shape[1],k=this.shape[2],w=this.stride[0],B=this.stride[1],O=this.stride[2],j=this.offset,V=0,H=Math.ceil;return typeof M=="number"&&(V=M|0,V<0?(j+=w*(h-1),h=H(-h/V)):h=H(h/V),w*=V),typeof C=="number"&&(V=C|0,V<0?(j+=B*(p-1),p=H(-p/V)):p=H(p/V),B*=V),typeof A=="number"&&(V=A|0,V<0?(j+=O*(k-1),k=H(-k/V)):k=H(k/V),O*=V),new _(this.data,h,p,k,w,B,O,j)},P.transpose=function(M,C,A){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0;var h=this.shape,p=this.stride;return new _(this.data,h[M],h[C],h[A],p[M],p[C],p[A],this.offset)},P.pick=function(M,C,A){var h=[],p=[],k=this.offset;typeof M=="number"&&M>=0?k=k+this.stride[0]*M|0:(h.push(this.shape[0]),p.push(this.stride[0])),typeof C=="number"&&C>=0?k=k+this.stride[1]*C|0:(h.push(this.shape[1]),p.push(this.stride[1])),typeof A=="number"&&A>=0?k=k+this.stride[2]*A|0:(h.push(this.shape[2]),p.push(this.stride[2]));var w=u[h.length+1];return w(this.data,h,p,k)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],A[0],A[1],A[2],h)}},4:function(T,u,b){function _(M,C,A,h,p,k,w,B,O,j){this.data=M,this.shape=[C,A,h,p],this.stride=[k,w,B,O],this.offset=j|0}var P=_.prototype;return P.dtype=T,P.dimension=4,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h,p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]=p},P.get=function(M,C,A,h){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]},P.index=function(M,C,A,h){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h},P.hi=function(M,C,A,h){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},P.lo=function(M,C,A,h){var p=this.offset,k=0,w=this.shape[0],B=this.shape[1],O=this.shape[2],j=this.shape[3],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3];return typeof M=="number"&&M>=0&&(k=M|0,p+=V*k,w-=k),typeof C=="number"&&C>=0&&(k=C|0,p+=H*k,B-=k),typeof A=="number"&&A>=0&&(k=A|0,p+=F*k,O-=k),typeof h=="number"&&h>=0&&(k=h|0,p+=U*k,j-=k),new _(this.data,w,B,O,j,V,H,F,U,p)},P.step=function(M,C,A,h){var p=this.shape[0],k=this.shape[1],w=this.shape[2],B=this.shape[3],O=this.stride[0],j=this.stride[1],V=this.stride[2],H=this.stride[3],F=this.offset,U=0,W=Math.ceil;return typeof M=="number"&&(U=M|0,U<0?(F+=O*(p-1),p=W(-p/U)):p=W(p/U),O*=U),typeof C=="number"&&(U=C|0,U<0?(F+=j*(k-1),k=W(-k/U)):k=W(k/U),j*=U),typeof A=="number"&&(U=A|0,U<0?(F+=V*(w-1),w=W(-w/U)):w=W(w/U),V*=U),typeof h=="number"&&(U=h|0,U<0?(F+=H*(B-1),B=W(-B/U)):B=W(B/U),H*=U),new _(this.data,p,k,w,B,O,j,V,H,F)},P.transpose=function(M,C,A,h){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0;var p=this.shape,k=this.stride;return new _(this.data,p[M],p[C],p[A],p[h],k[M],k[C],k[A],k[h],this.offset)},P.pick=function(M,C,A,h){var p=[],k=[],w=this.offset;typeof M=="number"&&M>=0?w=w+this.stride[0]*M|0:(p.push(this.shape[0]),k.push(this.stride[0])),typeof C=="number"&&C>=0?w=w+this.stride[1]*C|0:(p.push(this.shape[1]),k.push(this.stride[1])),typeof A=="number"&&A>=0?w=w+this.stride[2]*A|0:(p.push(this.shape[2]),k.push(this.stride[2])),typeof h=="number"&&h>=0?w=w+this.stride[3]*h|0:(p.push(this.shape[3]),k.push(this.stride[3]));var B=u[p.length+1];return B(this.data,p,k,w)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],A[0],A[1],A[2],A[3],h)}},5:function(T,u,b){function _(M,C,A,h,p,k,w,B,O,j,V,H){this.data=M,this.shape=[C,A,h,p,k],this.stride=[w,B,O,j,V],this.offset=H|0}var P=_.prototype;return P.dtype=T,P.dimension=5,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p,k){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]=k},P.get=function(M,C,A,h,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]},P.index=function(M,C,A,h,p){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p},P.hi=function(M,C,A,h,p){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,typeof p!="number"||p<0?this.shape[4]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},P.lo=function(M,C,A,h,p){var k=this.offset,w=0,B=this.shape[0],O=this.shape[1],j=this.shape[2],V=this.shape[3],H=this.shape[4],F=this.stride[0],U=this.stride[1],W=this.stride[2],q=this.stride[3],J=this.stride[4];return typeof M=="number"&&M>=0&&(w=M|0,k+=F*w,B-=w),typeof C=="number"&&C>=0&&(w=C|0,k+=U*w,O-=w),typeof A=="number"&&A>=0&&(w=A|0,k+=W*w,j-=w),typeof h=="number"&&h>=0&&(w=h|0,k+=q*w,V-=w),typeof p=="number"&&p>=0&&(w=p|0,k+=J*w,H-=w),new _(this.data,B,O,j,V,H,F,U,W,q,J,k)},P.step=function(M,C,A,h,p){var k=this.shape[0],w=this.shape[1],B=this.shape[2],O=this.shape[3],j=this.shape[4],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3],W=this.stride[4],q=this.offset,J=0,lt=Math.ceil;return typeof M=="number"&&(J=M|0,J<0?(q+=V*(k-1),k=lt(-k/J)):k=lt(k/J),V*=J),typeof C=="number"&&(J=C|0,J<0?(q+=H*(w-1),w=lt(-w/J)):w=lt(w/J),H*=J),typeof A=="number"&&(J=A|0,J<0?(q+=F*(B-1),B=lt(-B/J)):B=lt(B/J),F*=J),typeof h=="number"&&(J=h|0,J<0?(q+=U*(O-1),O=lt(-O/J)):O=lt(O/J),U*=J),typeof p=="number"&&(J=p|0,J<0?(q+=W*(j-1),j=lt(-j/J)):j=lt(j/J),W*=J),new _(this.data,k,w,B,O,j,V,H,F,U,W,q)},P.transpose=function(M,C,A,h,p){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0,p=p===void 0?4:p|0;var k=this.shape,w=this.stride;return new _(this.data,k[M],k[C],k[A],k[h],k[p],w[M],w[C],w[A],w[h],w[p],this.offset)},P.pick=function(M,C,A,h,p){var k=[],w=[],B=this.offset;typeof M=="number"&&M>=0?B=B+this.stride[0]*M|0:(k.push(this.shape[0]),w.push(this.stride[0])),typeof C=="number"&&C>=0?B=B+this.stride[1]*C|0:(k.push(this.shape[1]),w.push(this.stride[1])),typeof A=="number"&&A>=0?B=B+this.stride[2]*A|0:(k.push(this.shape[2]),w.push(this.stride[2])),typeof h=="number"&&h>=0?B=B+this.stride[3]*h|0:(k.push(this.shape[3]),w.push(this.stride[3])),typeof p=="number"&&p>=0?B=B+this.stride[4]*p|0:(k.push(this.shape[4]),w.push(this.stride[4]));var O=u[k.length+1];return O(this.data,k,w,B)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],C[4],A[0],A[1],A[2],A[3],A[4],h)}}};function f(T,u){var b=u===-1?"T":String(u),_=l[b];return u===-1?_(T):u===0?_(T,y[T][0]):_(T,y[T],i)}function x(T){if(a(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,u,b,_){if(T===void 0){var p=y.array[0];return p([])}else typeof T=="number"&&(T=[T]);u===void 0&&(u=[T.length]);var P=u.length;if(b===void 0){b=new Array(P);for(var M=P-1,C=1;M>=0;--M)b[M]=C,C*=u[M]}if(_===void 0){_=0;for(var M=0;M1e-6?(b[0]=P/h,b[1]=M/h,b[2]=C/h,b[3]=A/h):(b[0]=b[1]=b[2]=0,b[3]=1)}function v(b,_,P){this.radius=a([P]),this.center=a(_),this.rotation=a(b),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var _=this.computedRotation;y(_,_);var P=this.computedMatrix;o(P,_);var M=this.computedCenter,C=this.computedEye,A=this.computedUp,h=Math.exp(this.computedRadius[0]);C[0]=M[0]+h*P[2],C[1]=M[1]+h*P[6],C[2]=M[2]+h*P[10],A[0]=P[1],A[1]=P[5],A[2]=P[9];for(var p=0;p<3;++p){for(var k=0,w=0;w<3;++w)k+=P[p+4*w]*C[w];P[12+p]=-k}},T.getMatrix=function(b,_){this.recalcMatrix(b);var P=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=P[M];return _}return P},T.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},T.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},T.pan=function(b,_,P,M){_=_||0,P=P||0,M=M||0,this.recalcMatrix(b);var C=this.computedMatrix,A=C[1],h=C[5],p=C[9],k=f(A,h,p);A/=k,h/=k,p/=k;var w=C[0],B=C[4],O=C[8],j=w*A+B*h+O*p;w-=A*j,B-=h*j,O-=p*j;var V=f(w,B,O);w/=V,B/=V,O/=V,C[2],C[6],C[10];var H=w*_+A*P,F=B*_+h*P,U=O*_+p*P;this.center.move(b,H,F,U);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+M),this.radius.set(b,Math.log(W))},T.rotate=function(b,_,P,M){this.recalcMatrix(b),_=_||0,P=P||0;var C=this.computedMatrix,A=C[0],h=C[4],p=C[8],k=C[1],w=C[5],B=C[9],O=C[2],j=C[6],V=C[10],H=_*A+P*k,F=_*h+P*w,U=_*p+P*B,W=-(j*U-V*F),q=-(V*H-O*U),J=-(O*F-j*H),lt=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(J,2))),yt=x(W,q,J,lt);yt>1e-6?(W/=yt,q/=yt,J/=yt,lt/=yt):(W=q=J=0,lt=1);var mt=this.computedRotation,st=mt[0],tt=mt[1],pt=mt[2],rt=mt[3],at=st*lt+rt*W+tt*J-pt*q,vt=tt*lt+rt*q+pt*W-st*J,it=pt*lt+rt*J+st*q-tt*W,K=rt*lt-st*W-tt*q-pt*J;if(M){W=O,q=j,J=V;var ft=Math.sin(M)/f(W,q,J);W*=ft,q*=ft,J*=ft,lt=Math.cos(_),at=at*lt+K*W+vt*J-it*q,vt=vt*lt+K*q+it*W-at*J,it=it*lt+K*J+at*q-vt*W,K=K*lt-at*W-vt*q-it*J}var ut=x(at,vt,it,K);ut>1e-6?(at/=ut,vt/=ut,it/=ut,K/=ut):(at=vt=it=0,K=1),this.rotation.set(b,at,vt,it,K)},T.lookAt=function(b,_,P,M){this.recalcMatrix(b),P=P||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var C=this.computedMatrix;n(C,_,P,M);var A=this.computedRotation;l(A,C[0],C[1],C[2],C[4],C[5],C[6],C[8],C[9],C[10]),y(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);for(var h=0,p=0;p<3;++p)h+=Math.pow(P[p]-_[p],2);this.radius.set(b,.5*Math.log(Math.max(h,1e-6))),this.center.set(b,P[0],P[1],P[2])},T.translate=function(b,_,P,M){this.center.move(b,_||0,P||0,M||0)},T.setMatrix=function(b,_){var P=this.computedRotation;l(P,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),y(P,P),this.rotation.set(b,P[0],P[1],P[2],P[3]);var M=this.computedMatrix;i(M,_);var C=M[15];if(Math.abs(C)>1e-6){var A=M[12]/C,h=M[13]/C,p=M[14]/C;this.recalcMatrix(b);var k=Math.exp(this.computedRadius[0]);this.center.set(b,A-M[2]*k,h-M[6]*k,p-M[10]*k),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},T.setDistance=function(b,_){_>0&&this.radius.set(b,Math.log(_))},T.setDistanceLimits=function(b,_){b>0?b=Math.log(b):b=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=_},T.getDistanceLimits=function(b){var _=this.radius.bounds;return b?(b[0]=Math.exp(_[0][0]),b[1]=Math.exp(_[1][0]),b):[Math.exp(_[0][0]),Math.exp(_[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(b){var _=this.lastT(),P=b.center;P&&this.center.set(_,P[0],P[1],P[2]);var M=b.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var C=b.distance;C&&C>0&&this.radius.set(_,Math.log(C)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function u(b){b=b||{};var _=b.center||[0,0,0],P=b.rotation||[0,0,0,1],M=b.radius||1;_=[].slice.call(_,0,3),P=[].slice.call(P,0,4),y(P,P);var C=new v(P,_,Math.log(M));return C.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&C.lookAt(0,b.eye,b.center,b.up),C}},9994:function(t,e,r){var a=r(9618),n=r(8277);t.exports=function(o,i){for(var l=[],f=o,x=1;Array.isArray(f);)l.push(f.length),x*=f.length,f=f[0];return l.length===0?a():(i||(i=a(new Float64Array(x),l)),n(i,o),i)}}},g={};function I(t){var e=g[t];if(e!==void 0)return e.exports;var r=g[t]={id:t,loaded:!1,exports:{}};return c[t].call(r.exports,r,r.exports,I),r.loaded=!0,r.exports}(function(){I.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){I.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}();var S=I(1964);Z.exports=S})()}),yS=Dt((Q,Z)=>{Z.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]}}),vU=Dt((Q,Z)=>{var c=yS();Z.exports=I;var g={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function I(S){var t,e=[],r=1,a;if(typeof S=="string")if(S=S.toLowerCase(),c[S])e=c[S].slice(),a="rgb";else if(S==="transparent")r=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var n=S.slice(1),o=n.length,i=o<=4;r=1,i?(e=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],o===4&&(r=parseInt(n[3]+n[3],16)/255)):(e=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],o===8&&(r=parseInt(n[6]+n[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var l=t[1],f=l==="rgb",n=l.replace(/a$/,"");a=n;var o=n==="cmyk"?4:n==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===o?parseFloat(v)/100:n==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(n[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(g[v]!==void 0)return g[v]}return parseFloat(v)}),l===n&&e.push(1),r=f||e[o]===void 0?1:e[o],e=e.slice(0,o)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",r=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),r=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(r/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:r}}}),yU=Dt((Q,Z)=>{var c=vU();Z.exports=function(I){Array.isArray(I)&&I.raw&&(I=String.raw.apply(null,arguments));var S,t=c(I);if(!t.space)return[];var e=[0,0,0],r=t.space[0]==="h"?[360,100,100]:[255,255,255];return S=Array(3),S[0]=Math.min(Math.max(t.values[0],e[0]),r[0]),S[1]=Math.min(Math.max(t.values[1],e[1]),r[1]),S[2]=Math.min(Math.max(t.values[2],e[2]),r[2]),t.space[0]==="h"&&(S=g(S)),S.push(Math.min(Math.max(t.alpha,0),1)),S};function g(I){var S=I[0]/360,t=I[1]/100,e=I[2]/100,r,a,n,o,i,l=0;if(t===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+t):e+t-e*t,r=2*e-a,o=[0,0,0];l<3;)n=S+1/3*-(l-1),n<0?n++:n>1&&n--,i=6*n<1?r+(a-r)*6*n:2*n<1?a:3*n<2?r+(a-r)*(2/3-n)*6:r,o[l++]=i*255;return o}}),b3=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){return IS?S:g:gI?I:g}}),Kk=Dt((Q,Z)=>{Z.exports=function(c){switch(c){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}}}),H1=Dt((Q,Z)=>{var c=yU(),g=b3(),I=Kk();Z.exports=function(t,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var r=I(e),a=new r(4),n=e!=="uint8"&&e!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=c(t),t[0]/=255,t[1]/=255,t[2]/=255),S(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=g(Math.floor(t[0]*255),0,255),a[1]=g(Math.floor(t[1]*255),0,255),a[2]=g(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:g(Math.floor(t[3]*255),0,255)),a)};function S(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}),Mv=Dt((Q,Z)=>{var c=H1();function g(I){return I?c(I):[0,0,0,1]}Z.exports=g}),Sv=Dt((Q,Z)=>{var c=Hn(),g=ro(),I=H1(),S=Xc(),t=Ai().defaultLine,e=la().isArrayOrTypedArray,r=I(t),a=1;function n(x,y){var v=x;return v[3]*=y,v}function o(x){if(c(x))return r;var y=I(x);return y.length?y:r}function i(x){return c(x)?x:a}function l(x,y,v){var T=x.color;T&&T._inputArray&&(T=T._inputArray);var u=e(T),b=e(y),_=S.extractOpts(x),P=[],M,C,A,h,p;if(_.colorscale!==void 0?M=S.makeColorScaleFuncFromTrace(x):M=o,u?C=function(w,B){return w[B]===void 0?r:I(M(w[B]))}:C=o,b?A=function(w,B){return w[B]===void 0?a:i(w[B])}:A=i,u||b)for(var k=0;k{Z.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]}}),Xk=Dt((Q,Z)=>{Z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}),xU=Dt((Q,Z)=>{var c=Qo();function g(t,e,r,a){if(!e||!e.visible)return null;for(var n=c.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),i=0;i0){var v=a.c2l(x);a._lowerLogErrorBound||(a._lowerLogErrorBound=v),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,v)}}else o[i]=[-l[0]*r,l[1]*r]}return o}function I(t){for(var e=0;e{var c=dp().gl_line3d,g=dp().gl_scatter3d,I=dp().gl_error3d,S=dp().gl_mesh3d,t=dp().delaunay_triangulate,e=kn(),r=Mv(),a=Sv().formatColor,n=wg(),o=xS(),i=Xk(),l=Ls(),f=Fp().appendArrayPointValue,x=xU();function y(B,O){this.scene=B,this.uid=O,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 v=y.prototype;v.handlePick=function(B){if(B.object&&(B.object===this.linePlot||B.object===this.delaunayMesh||B.object===this.textMarkers||B.object===this.scatterPlot)){var O=B.index=B.data.index;return B.object.highlight&&B.object.highlight(null),this.scatterPlot&&(B.object=this.scatterPlot,this.scatterPlot.highlight(B.data)),B.textLabel="",this.textLabels&&(e.isArrayOrTypedArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(B.textLabel=this.textLabels[O]):B.textLabel=this.textLabels),B.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function T(B,O,j){var V=(j+1)%3,H=(j+2)%3,F=[],U=[],W;for(W=0;W-1?-1:B.indexOf("right")>-1?1:0}function _(B){return B==null?0:B.indexOf("top")>-1?-1:B.indexOf("bottom")>-1?1:0}function P(B){var O=0,j=0,V=[O,j];if(Array.isArray(B))for(var H=0;H=0){var J=T(W.position,W.delaunayColor,W.delaunayAxis);J.opacity=B.opacity,this.delaunayMesh?this.delaunayMesh.update(J):(J.gl=O,this.delaunayMesh=S(J),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)},v.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 w(B,O){var j=new y(B,O.uid);return j.update(O),j}Z.exports=w}),_S=Dt((Q,Z)=>{var c=ef(),g=ma(),I=kc(),S=ph().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=qo(),n=xS(),o=Xk(),i=Ia().extendFlat,l=Yc().overrideAll,f=Y0(),x=c.line,y=c.marker,v=y.line,T=i({width:x.width,dash:{valType:"enumerated",values:f(n),dflt:"solid"}},I("line"));function u(_){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 b=Z.exports=l({x:c.x,y:c.y,z:{valType:"data_array"},text:i({},c.text,{}),texttemplate:e(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},c.hovertext,{}),hovertemplate:t(),hovertemplatefallback:r(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},c.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:u(),y:u(),z:u()},connectgaps:c.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:f(o),dflt:"circle",arrayOk:!0},size:i({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:i({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:i({width:i({},v.width,{arrayOk:!1})},I("marker.line"))},I("marker")),textposition:i({},c.textposition,{dflt:"top center"}),textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}),bU=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=Tc(),S=s0(),t=O0(),e=x0(),r=_S();Z.exports=function(n,o,i,l){function f(P,M){return g.coerce(n,o,r,P,M)}var x=a(n,o,f,l);if(!x){o.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),I.hasMarkers(o)&&S(n,o,i,l,f,{noSelect:!0,noAngle:!0}),I.hasLines(o)&&(f("connectgaps"),t(n,o,i,l,f)),I.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),e(n,o,l,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(o.line||{}).color,v=(o.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",y||v);for(var T=["x","y","z"],u=0;u<3;++u){var b="projection."+T[u];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=c.getComponentMethod("errorbars","supplyDefaults");_(n,o,y||v||i,{axis:"z"}),_(n,o,y||v||i,{axis:"y",inherit:"z"}),_(n,o,y||v||i,{axis:"x",inherit:"z"})};function a(n,o,i,l){var f=0,x=i("x"),y=i("y"),v=i("z"),T=c.getComponentMethod("calendars","handleTraceDefaults");return T(n,o,["x","y","z"],l),x&&y&&v&&(f=Math.min(x.length,y.length,v.length),o._length=o._xlength=o._ylength=o._zlength=f),f}}),wU=Dt((Q,Z)=>{var c=ct(),g=B0();Z.exports=function(I,S){var t=[{x:!1,y:!1,trace:S,t:{}}];return c(t,S),g(I,S),t}}),kU=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(typeof g!="string")throw new TypeError("must specify type string");if(I=I||{},typeof document>"u"&&!I.canvas)return null;var S=I.canvas||document.createElement("canvas");typeof I.width=="number"&&(S.width=I.width),typeof I.height=="number"&&(S.height=I.height);var t=I,e;try{var r=[g];g.indexOf("webgl")===0&&r.push("experimental-"+g);for(var a=0;a{var c=kU();Z.exports=function(g){return c("webgl",g)}}),bS=Dt((Q,Z)=>{var c=pi(),g=function(){};Z.exports=function(I){for(var S in I)typeof I[S]=="function"&&(I[S]=g);I.destroy=function(){I.container.parentNode.removeChild(I.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=c.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=c.lightLine,t.style["z-index"]=30;var e=document.createElement("p");return e.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",e.style.position="relative",e.style.top="50%",e.style.left="50%",e.style.height="30%",e.style.width="50%",e.style.margin="-15% 0 0 -25%",t.appendChild(e),I.container.appendChild(t),I.container.style.background="#FFFFFF",I.container.onclick=function(){window.open("https://get.webgl.org")},!1}}),AU=Dt((Q,Z)=>{var c=Mv(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(){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 t=S.prototype;t.merge=function(r,a){for(var n=this,o=0;o<3;++o){var i=a[I[o]];if(!i.visible){n.tickEnable[o]=!1,n.labelEnable[o]=!1,n.lineEnable[o]=!1,n.lineTickEnable[o]=!1,n.gridEnable[o]=!1,n.zeroEnable[o]=!1,n.backgroundEnable[o]=!1;continue}n.labels[o]=r._meta?g.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[o]=c(i.title.font.color)),i.title.font.family&&(n.labelFont[o]=i.title.font.family),i.title.font.size&&(n.labelSize[o]=i.title.font.size),i.title.font.weight&&(n.labelFontWeight[o]=i.title.font.weight),i.title.font.style&&(n.labelFontStyle[o]=i.title.font.style),i.title.font.variant&&(n.labelFontVariant[o]=i.title.font.variant)),"showline"in i&&(n.lineEnable[o]=i.showline),"linecolor"in i&&(n.lineColor[o]=c(i.linecolor)),"linewidth"in i&&(n.lineWidth[o]=i.linewidth),"showgrid"in i&&(n.gridEnable[o]=i.showgrid),"gridcolor"in i&&(n.gridColor[o]=c(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[o]=i.gridwidth),i.type==="log"?n.zeroEnable[o]=!1:"zeroline"in i&&(n.zeroEnable[o]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[o]=c(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[o]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[o]=!0:n.lineTickEnable[o]=!1,"ticklen"in i&&(n.lineTickLength[o]=n._defaultLineTickLength[o]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[o]=c(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[o]=i.tickwidth),"tickangle"in i&&(n.tickAngle[o]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[o]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[o]=c(i.tickfont.color)),i.tickfont.family&&(n.tickFont[o]=i.tickfont.family),i.tickfont.size&&(n.tickSize[o]=i.tickfont.size),i.tickfont.weight&&(n.tickFontWeight[o]=i.tickfont.weight),i.tickfont.style&&(n.tickFontStyle[o]=i.tickfont.style),i.tickfont.variant&&(n.tickFontVariant[o]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[o]=!0,n.lineMirror[o]=!0):i.mirror===!0?(n.lineTickMirror[o]=!1,n.lineMirror[o]=!0):(n.lineTickMirror[o]=!1,n.lineMirror[o]=!1):n.lineMirror[o]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[o]=!0,n.backgroundColor[o]=c(i.backgroundcolor)):n.backgroundEnable[o]=!1}};function e(r,a){var n=new S;return n.merge(r,a),n}Z.exports=e}),MU=Dt((Q,Z)=>{var c=Mv(),g=["xaxis","yaxis","zaxis"];function I(){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 S=I.prototype;S.merge=function(e){for(var r=0;r<3;++r){var a=e[g[r]];if(!a.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=a.showspikes,this.colors[r]=c(a.spikecolor),this.drawSides[r]=a.spikesides,this.lineWidth[r]=a.spikethickness}};function t(e){var r=new I;return r.merge(e),r}Z.exports=t}),SU=Dt((Q,Z)=>{Z.exports=t;var c=Ls(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(e){for(var r=new Array(3),a=0;a<3;++a){for(var n=e[a],o=new Array(n.length),i=0;i/g," "));o[i]=y,l.tickmode=f}}r.ticks=o;for(var i=0;i<3;++i){.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var v=0;v<2;++v)r.bounds[v][i]=e.glplot.bounds[v][i]}e.contourLevels=S(o)}}),EU=Dt((Q,Z)=>{var c=dp().gl_plot3d,g=c.createCamera,I=c.createScene,S=TU(),t=O_(),e=Qo(),r=kn(),a=r.preserveDrawingBuffer(),n=Ls(),o=tf(),i=Mv(),l=bS(),f=RM(),x=AU(),y=MU(),v=SU(),T=K0().applyAutorangeOptions,u,b,_=!1;function P(j,V){var H=document.createElement("div"),F=j.container;this.graphDiv=j.graphDiv;var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.style.position="absolute",U.style.top=U.style.left="0px",U.style.width=U.style.height="100%",U.style["z-index"]=20,U.style["pointer-events"]="none",H.appendChild(U),this.svgContainer=U,H.id=j.id,H.style.position="absolute",H.style.top=H.style.left="0px",H.style.width=H.style.height="100%",F.appendChild(H),this.fullLayout=V,this.id=j.id||"scene",this.fullSceneLayout=V[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(V,V[this.id]),this.spikeOptions=y(V[this.id]),this.container=H,this.staticMode=!!j.staticPlot,this.pixelRatio=this.pixelRatio||j.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=P.prototype;M.prepareOptions=function(){var j=this,V={canvas:j.canvas,gl:j.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:j.container,axes:j.axesOptions,spikes:j.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:j.camera,pixelRatio:j.pixelRatio};if(j.staticMode){if(!b&&(u=document.createElement("canvas"),b=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");V.gl=b,V.canvas=u}return V};var C=!0;M.tryCreatePlot=function(){var j=this,V=j.prepareOptions(),H=!0;try{j.glplot=I(V)}catch{if(j.staticMode||!C||a)H=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=V.glOptions.preserveDrawingBuffer=!0,j.glplot=I(V)}catch{a=V.glOptions.preserveDrawingBuffer=!1,H=!1}}}return C=!1,H},M.initializeGLCamera=function(){var j=this,V=j.fullSceneLayout.camera,H=V.projection.type==="orthographic";j.camera=g(j.container,{center:[V.center.x,V.center.y,V.center.z],eye:[V.eye.x,V.eye.y,V.eye.z],up:[V.up.x,V.up.y,V.up.z],_ortho:H,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var j=this;j.initializeGLCamera();var V=j.tryCreatePlot();if(!V)return l(j);j.traces={},j.make4thDimension();var H=j.graphDiv,F=H.layout,U=function(){var q={};return j.isCameraChanged(F)&&(q[j.id+".camera"]=j.getCamera()),j.isAspectChanged(F)&&(q[j.id+".aspectratio"]=j.glplot.getAspectratio(),F[j.id].aspectmode!=="manual"&&(j.fullSceneLayout.aspectmode=F[j.id].aspectmode=q[j.id+".aspectmode"]="manual")),q},W=function(q){if(q.fullSceneLayout.dragmode!==!1){var J=U();q.saveLayout(F),q.graphDiv.emit("plotly_relayout",J)}};return j.glplot.canvas&&(j.glplot.canvas.addEventListener("mouseup",function(){W(j)}),j.glplot.canvas.addEventListener("touchstart",function(){_=!0}),j.glplot.canvas.addEventListener("wheel",function(q){if(H._context._scrollZoom.gl3d){if(j.camera._ortho){var J=q.deltaX>q.deltaY?1.1:.9090909090909091,lt=j.glplot.getAspectratio();j.glplot.setAspectratio({x:J*lt.x,y:J*lt.y,z:J*lt.z})}W(j)}},t?{passive:!1}:!1),j.glplot.canvas.addEventListener("mousemove",function(){if(j.fullSceneLayout.dragmode!==!1&&j.camera.mouseListener.buttons!==0){var q=U();j.graphDiv.emit("plotly_relayouting",q)}}),j.staticMode||j.glplot.canvas.addEventListener("webglcontextlost",function(q){H&&H.emit&&H.emit("plotly_webglcontextlost",{event:q,layer:j.id})},!1)),j.glplot.oncontextloss=function(){j.recoverContext()},j.glplot.onrender=function(){j.render()},!0},M.render=function(){var j=this,V=j.graphDiv,H,F=j.svgContainer,U=j.container.getBoundingClientRect();V._fullLayout._calcInverseTransform(V);var W=V._fullLayout._invScaleX,q=V._fullLayout._invScaleY,J=U.width*W,lt=U.height*q;F.setAttributeNS(null,"viewBox","0 0 "+J+" "+lt),F.setAttributeNS(null,"width",J),F.setAttributeNS(null,"height",lt),v(j),j.glplot.axes.update(j.axesOptions);for(var yt=Object.keys(j.traces),mt=null,st=j.glplot.selection,tt=0;tt")):H.type==="isosurface"||H.type==="volume"?(it.valueLabel=n.hoverLabelText(j._mockAxis,j._mockAxis.d2l(st.traceCoordinate[3]),H.valuehoverformat),It.push("value: "+it.valueLabel),st.textLabel&&It.push(st.textLabel),kt=It.join("
")):kt=st.textLabel;var Pt={x:st.traceCoordinate[0],y:st.traceCoordinate[1],z:st.traceCoordinate[2],data:at._input,fullData:at,curveNumber:at.index,pointNumber:vt};o.appendArrayPointValue(Pt,at,vt),H._module.eventData&&(Pt=at._module.eventData(Pt,st,at,{},vt));var qt={points:[Pt]};if(j.fullSceneLayout.hovermode){var Wt=[];o.loneHover({trace:at,x:(.5+.5*rt[0]/rt[3])*J,y:(.5-.5*rt[1]/rt[3])*lt,xLabel:it.xLabel,yLabel:it.yLabel,zLabel:it.zLabel,text:kt,name:mt.name,color:o.castHoverOption(at,vt,"bgcolor")||mt.color,borderColor:o.castHoverOption(at,vt,"bordercolor"),fontFamily:o.castHoverOption(at,vt,"font.family"),fontSize:o.castHoverOption(at,vt,"font.size"),fontColor:o.castHoverOption(at,vt,"font.color"),nameLength:o.castHoverOption(at,vt,"namelength"),textAlign:o.castHoverOption(at,vt,"align"),hovertemplate:r.castOption(at,vt,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Pt,it),eventData:[Pt]},{container:F,gd:V,inOut_bbox:Wt}),Pt.bbox=Wt[0]}st.distance<5&&(st.buttons||_)?V.emit("plotly_click",qt):V.emit("plotly_hover",qt),this.oldEventData=qt}else o.loneUnhover(F),this.oldEventData&&V.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;j.drawAnnotations(j)},M.recoverContext=function(){var j=this;j.glplot.dispose();var V=function(){if(j.glplot.gl.isContextLost()){requestAnimationFrame(V);return}if(!j.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}j.plot.apply(j,j.plotArgs)};requestAnimationFrame(V)};var A=["xaxis","yaxis","zaxis"];function h(j,V,H){for(var F=j.fullSceneLayout,U=0;U<3;U++){var W=A[U],q=W.charAt(0),J=F[W],lt=V[q],yt=V[q+"calendar"],mt=V["_"+q+"length"];if(!r.isArrayOrTypedArray(lt))H[0][U]=Math.min(H[0][U],0),H[1][U]=Math.max(H[1][U],mt-1);else for(var st,tt=0;tt<(mt||lt.length);tt++)if(r.isArrayOrTypedArray(lt[tt]))for(var pt=0;ptat[1][q])at[0][q]=-1,at[1][q]=1;else{var ge=at[1][q]-at[0][q];at[0][q]-=ge/32,at[1][q]+=ge/32}if(K=[at[0][q],at[1][q]],K=T(K,lt),at[0][q]=K[0],at[1][q]=K[1],lt.isReversed()){var fe=at[0][q];at[0][q]=at[1][q],at[1][q]=fe}}else K=lt.range,at[0][q]=lt.r2l(K[0]),at[1][q]=lt.r2l(K[1]);at[0][q]===at[1][q]&&(at[0][q]-=1,at[1][q]+=1),vt[q]=at[1][q]-at[0][q],lt.range=[at[0][q],at[1][q]],lt.limitRange(),F.glplot.setBounds(q,{min:lt.range[0]*pt[q],max:lt.range[1]*pt[q]})}var pe,se=mt.aspectmode;if(se==="cube")pe=[1,1,1];else if(se==="manual"){var Tt=mt.aspectratio;pe=[Tt.x,Tt.y,Tt.z]}else if(se==="auto"||se==="data"){var Lt=[1,1,1];for(q=0;q<3;++q){lt=mt[A[q]],yt=lt.type;var Mt=it[yt];Lt[q]=Math.pow(Mt.acc,1/Mt.count)/pt[q]}se==="data"||Math.max.apply(null,Lt)/Math.min.apply(null,Lt)<=4?pe=Lt:pe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");mt.aspectratio.x=st.aspectratio.x=pe[0],mt.aspectratio.y=st.aspectratio.y=pe[1],mt.aspectratio.z=st.aspectratio.z=pe[2],F.glplot.setAspectratio(mt.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:mt.aspectratio.x,y:mt.aspectratio.y,z:mt.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=mt.aspectmode);var ee=mt.domain||null,ve=V._size||null;if(ee&&ve){var oe=F.container.style;oe.position="absolute",oe.left=ve.l+ee.x[0]*ve.w+"px",oe.top=ve.t+(1-ee.y[1])*ve.h+"px",oe.width=ve.w*(ee.x[1]-ee.x[0])+"px",oe.height=ve.h*(ee.y[1]-ee.y[0])+"px"}F.glplot.redraw()}},M.destroy=function(){var j=this;j.glplot&&(j.camera.mouseListener.enabled=!1,j.container.removeEventListener("wheel",j.camera.wheelListener),j.camera=null,j.glplot.dispose(),j.container.parentNode.removeChild(j.container),j.glplot=null)};function k(j){return[[j.eye.x,j.eye.y,j.eye.z],[j.center.x,j.center.y,j.center.z],[j.up.x,j.up.y,j.up.z]]}function w(j){return{up:{x:j.up[0],y:j.up[1],z:j.up[2]},center:{x:j.center[0],y:j.center[1],z:j.center[2]},eye:{x:j.eye[0],y:j.eye[1],z:j.eye[2]},projection:{type:j._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var j=this;return j.camera.view.recalcMatrix(j.camera.view.lastT()),w(j.camera)},M.setViewport=function(j){var V=this,H=j.camera;V.camera.lookAt.apply(this,k(H)),V.glplot.setAspectratio(j.aspectratio);var F=H.projection.type==="orthographic",U=V.camera._ortho;F!==U&&(V.glplot.redraw(),V.glplot.clearRGBA(),V.glplot.dispose(),V.initializeGLPlot())},M.isCameraChanged=function(j){var V=this,H=V.getCamera(),F=r.nestedProperty(j,V.id+".camera"),U=F.get();function W(yt,mt,st,tt){var pt=["up","center","eye"],rt=["x","y","z"];return mt[pt[st]]&&yt[pt[st]][rt[tt]]===mt[pt[st]][rt[tt]]}var q=!1;if(U===void 0)q=!0;else{for(var J=0;J<3;J++)for(var lt=0;lt<3;lt++)if(!W(H,U,J,lt)){q=!0;break}(!U.projection||H.projection&&H.projection.type!==U.projection.type)&&(q=!0)}return q},M.isAspectChanged=function(j){var V=this,H=V.glplot.getAspectratio(),F=r.nestedProperty(j,V.id+".aspectratio"),U=F.get();return U===void 0||U.x!==H.x||U.y!==H.y||U.z!==H.z},M.saveLayout=function(j){var V=this,H=V.fullLayout,F,U,W,q,J,lt,yt=V.isCameraChanged(j),mt=V.isAspectChanged(j),st=yt||mt;if(st){var tt={};if(yt&&(F=V.getCamera(),U=r.nestedProperty(j,V.id+".camera"),W=U.get(),tt[V.id+".camera"]=W),mt&&(q=V.glplot.getAspectratio(),J=r.nestedProperty(j,V.id+".aspectratio"),lt=J.get(),tt[V.id+".aspectratio"]=lt),e.call("_storeDirectGUIEdit",j,H._preGUI,tt),yt){U.set(F);var pt=r.nestedProperty(H,V.id+".camera");pt.set(F)}if(mt){J.set(q);var rt=r.nestedProperty(H,V.id+".aspectratio");rt.set(q),V.glplot.redraw()}}return st},M.updateFx=function(j,V){var H=this,F=H.camera;if(F)if(j==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(j==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var U=H.graphDiv,W=U._fullLayout,q=H.fullSceneLayout.camera,J=q.up.x,lt=q.up.y,yt=q.up.z;if(yt/Math.sqrt(J*J+lt*lt+yt*yt)<.999){var mt=H.id+".camera.up",st={x:0,y:0,z:1},tt={};tt[mt]=st;var pt=U.layout;e.call("_storeDirectGUIEdit",pt,W._preGUI,tt),q.up=st,r.nestedProperty(pt,mt).set(st)}}else F.keyBindingMode=j;H.fullSceneLayout.hovermode=V};function B(j,V,H){for(var F=0,U=H-1;F0)for(var J=255/q,lt=0;lt<3;++lt)j[W+lt]=Math.min(J*j[W+lt],255)}}M.toImage=function(j){var V=this;j||(j="png"),V.staticMode&&V.container.appendChild(u),V.glplot.redraw();var H=V.glplot.gl,F=H.drawingBufferWidth,U=H.drawingBufferHeight;H.bindFramebuffer(H.FRAMEBUFFER,null);var W=new Uint8Array(F*U*4);H.readPixels(0,0,F,U,H.RGBA,H.UNSIGNED_BYTE,W),B(W,F,U),O(W,F,U);var q=document.createElement("canvas");q.width=F,q.height=U;var J=q.getContext("2d",{willReadFrequently:!0}),lt=J.createImageData(F,U);lt.data.set(W),J.putImageData(lt,0,0);var yt;switch(j){case"jpeg":yt=q.toDataURL("image/jpeg");break;case"webp":yt=q.toDataURL("image/webp");break;default:yt=q.toDataURL("image/png")}return V.staticMode&&V.container.removeChild(u),yt},M.setConvert=function(){for(var j=this,V=0;V<3;V++){var H=j.fullSceneLayout[A[V]];n.setConvert(H,j.fullLayout),H.setScale=r.noop}},M.make4thDimension=function(){var j=this,V=j.graphDiv,H=V._fullLayout;j._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(j._mockAxis,H)},Z.exports=P}),CU=Dt((Q,Z)=>{Z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}),wS=Dt((Q,Z)=>{var c=pi(),g=Td(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:c.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:I({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},rangemode:g.rangemode,minallowed:g.minallowed,maxallowed:g.maxallowed,range:I({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:I({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth},"plot","from-root")}),kS=Dt((Q,Z)=>{var c=wS(),g=Uh().attributes,I=Ia().extendFlat,S=kn().counterRegex;function t(e,r,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}Z.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:I(t(0,0,1),{}),center:I(t(0,0,0),{}),eye:I(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:g({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:c,yaxis:c,zaxis:c,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"}}),LU=Dt((Q,Z)=>{var c=ro().mix,g=kn(),I=mu(),S=wS(),t=kp(),e=rx(),r=["xaxis","yaxis","zaxis"],a=13600/187;Z.exports=function(n,o,i){var l,f;function x(T,u){return g.coerce(l,f,S,T,u)}for(var y=0;y{var c=kn(),g=pi(),I=Qo(),S=D1(),t=LU(),e=kS(),r=ud().getSubplotData,a="gl3d";Z.exports=function(o,i,l){var f=i._basePlotModules.length>1;function x(y){if(!f){var v=c.validate(o[y],e[y]);if(v)return o[y]}}S(o,i,l,{type:a,attributes:e,handleDefaults:n,fullLayout:i,font:i.font,fullData:l,getDfltFromLayout:x,autotypenumbersDflt:i.autotypenumbers,paper_bgcolor:i.paper_bgcolor,calendar:i.calendar})};function n(o,i,l,f){for(var x=l("bgcolor"),y=g.combine(x,f.paper_bgcolor),v=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";l("dragmode",M),l("hovermode",f.getDfltFromLayout("hovermode"))}}),W1=Dt(Q=>{var Z=Yc().overrideAll,c=po(),g=EU(),I=ud().getSubplotData,S=kn(),t=Dp(),e="gl3d",r="scene";Q.name=e,Q.attr=r,Q.idRoot=r,Q.idRegex=Q.attrRegex=S.counterRegex("scene"),Q.attributes=CU(),Q.layoutAttributes=kS(),Q.baseLayoutAttrOverrides=Z({hoverlabel:c.hoverlabel},"plot","nested"),Q.supplyLayoutDefaults=PU(),Q.plot=function(a){for(var n=a._fullLayout,o=a._fullData,i=n._subplots[e],l=0;l{Z.exports={plot:_U(),attributes:_S(),markerSymbols:Xk(),supplyDefaults:bU(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:wU(),moduleType:"trace",name:"scatter3d",basePlotModule:W1(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}),zU=Dt((Q,Z)=>{Z.exports=IU()}),w3=Dt((Q,Z)=>{var c=pi(),g=kc(),I=ph().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=qo(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{valType:"boolean",dflt:!1}}function o(l){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:n(),y:n(),z:n()},color:{valType:"color",dflt:c.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:c.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=Z.exports=a(r({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),zhoverformat:I("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:r({},e.hoverinfo),showlegend:r({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}),TS=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=mc(),S=w3(),t=.1;function e(o,i){for(var l=[],f=32,x=0;x{var c=Xd();Z.exports=function(g,I){I.surfacecolor?c(g,I,{vals:I.surfacecolor,containerStr:"",cLetter:"c"}):c(g,I,{vals:I.z,containerStr:"",cLetter:"c"})}}),DU=Dt((Q,Z)=>{var c=dp().gl_surface3d,g=dp().ndarray,I=dp().ndarray_linear_interpolate.d2,S=Z6(),t=G6(),e=kn().isArrayOrTypedArray,r=Sv().parseColorScale,a=Mv(),n=Xc().extractOpts;function o(k,w,B){this.scene=k,this.uid=B,this.surface=w,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=o.prototype;i.getXat=function(k,w,B,O){var j=e(this.data.x)?e(this.data.x[0])?this.data.x[w][k]:this.data.x[k]:k;return B===void 0?j:O.d2l(j,0,B)},i.getYat=function(k,w,B,O){var j=e(this.data.y)?e(this.data.y[0])?this.data.y[w][k]:this.data.y[w]:w;return B===void 0?j:O.d2l(j,0,B)},i.getZat=function(k,w,B,O){var j=this.data.z[w][k];return j===null&&this.data.connectgaps&&this.data._interpolatedZ&&(j=this.data._interpolatedZ[w][k]),B===void 0?j:O.d2l(j,0,B)},i.handlePick=function(k){if(k.object===this.surface){var w=(k.data.index[0]-1)/this.dataScaleX-1,B=(k.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(w),this.data.z[0].length-1),0),j=Math.max(Math.min(Math.round(B),this.data._ylength-1),0);k.index=[O,j],k.traceCoordinate=[this.getXat(O,j),this.getYat(O,j),this.getZat(O,j)],k.dataCoordinate=[this.getXat(O,j,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,j,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,j,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var V=0;V<3;V++){var H=k.dataCoordinate[V];H!=null&&(k.dataCoordinate[V]*=this.scene.dataScale[V])}var F=this.data.hovertext||this.data.text;return e(F)&&F[j]&&F[j][O]!==void 0?k.textLabel=F[j][O]:F?k.textLabel=F:k.textLabel="",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};function l(k){var w=k[0].rgb,B=k[k.length-1].rgb;return w[0]===B[0]&&w[1]===B[1]&&w[2]===B[2]&&w[3]===B[3]}var f=[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 x(k,w){if(k0){B=f[O];break}return B}function T(k,w){if(!(k<1||w<1)){for(var B=y(k),O=y(w),j=1,V=0;VP;)O--,O/=v(O),O++,O<_&&(O=P);var j=Math.round(O/k);return j>1?j:1};function M(k,w,B){var O=B[8]+B[2]*w[0]+B[5]*w[1];return k[0]=(B[6]+B[0]*w[0]+B[3]*w[1])/O,k[1]=(B[7]+B[1]*w[0]+B[4]*w[1])/O,k}function C(k,w,B){return A(k,w,M,B),k}function A(k,w,B,O){for(var j=[0,0],V=k.shape[0],H=k.shape[1],F=0;F0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(w[O]=!0,j=this.contourStart[O];jlt&&(this.minValues[W]=lt),this.maxValues[W]{Z.exports={attributes:w3(),supplyDefaults:TS().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:OU(),plot:DU(),moduleType:"trace",name:"surface",basePlotModule:W1(),categories:["gl3d","2dMap","showLegend"],meta:{}}}),BU=Dt((Q,Z)=>{Z.exports=FU()}),mb=Dt((Q,Z)=>{var c=kc(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=w3(),e=qo(),r=Ia().extendFlat;Z.exports=r({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:I({editType:"calc"}),hovertemplatefallback:S({editType:"calc"}),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("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"}},c("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:r({},t.lightposition.x,{dflt:1e5}),y:r({},t.lightposition.y,{dflt:1e5}),z:r({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:r({},e.hoverinfo,{editType:"calc"}),showlegend:r({},e.showlegend,{dflt:!1})})}),Jk=Dt((Q,Z)=>{var c=kc(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=mb(),e=qo(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function o(l){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=Z.exports=a(r({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:n(),y:n(),z:n()},caps:{x:o(),y:o(),z:o()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:I(),hovertemplatefallback:S(),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:r({},e.showlegend,{dflt:!1})},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:r({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}),AS=Dt((Q,Z)=>{var c=kn(),g=Qo(),I=Jk(),S=mc();function t(r,a,n,o){function i(l,f){return c.coerce(r,a,I,l,f)}e(r,a,n,o,i)}function e(r,a,n,o,i){var l=i("isomin"),f=i("isomax");f!=null&&l!==void 0&&l!==null&&l>f&&(a.isomin=null,a.isomax=null);var x=i("x"),y=i("y"),v=i("z"),T=i("value");if(!x||!x.length||!y||!y.length||!v||!v.length||!T||!T.length){a.visible=!1;return}var u=g.getComponentMethod("calendars","handleTraceDefaults");u(r,a,["x","y","z"],o),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var C="caps."+M,A=i(C+".show");A&&i(C+".fill");var h="slices."+M,p=i(h+".show");p&&(i(h+".fill"),i(h+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var _=i("surface.show");_&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var P=i("contour.show");P&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),S(r,a,o,i,{prefix:"",cLetter:"c"}),a._length=null}Z.exports={supplyDefaults:t,supplyIsoDefaults:e}}),Qk=Dt((Q,Z)=>{var c=kn(),g=Xd();function I(r,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var n=S(a);a._gridFill=n.fill,a._Xs=n.Xs,a._Ys=n.Ys,a._Zs=n.Zs,a._len=n.len;var o=0,i,l,f;a.starts&&(i=e(a.starts.x||[]),l=e(a.starts.y||[]),f=e(a.starts.z||[]),o=Math.min(i.length,l.length,f.length)),a._startsX=i||[],a._startsY=l||[],a._startsZ=f||[];var x=0,y=1/0,v;for(v=0;v1&&(p=a[i-1],w=n[i-1],O=o[i-1]),l=0;lp?"-":"+")+"x"),P=P.replace("y",(k>w?"-":"+")+"y"),P=P.replace("z",(B>O?"-":"+")+"z");var F=function(){i=0,j=[],V=[],H=[]};(!i||i{var c=Xd(),g=Qk().processGrid,I=Qk().filter;Z.exports=function(S,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=I(t.x,t._len),t._y=I(t.y,t._len),t._z=I(t.z,t._len),t._value=I(t.value,t._len);var e=g(t);t._gridFill=e.fill,t._Xs=e.Xs,t._Ys=e.Ys,t._Zs=e.Zs,t._len=e.len;for(var r=1/0,a=-1/0,n=0;n{Z.exports=function(c,g,I,S){S=S||c.length;for(var t=new Array(S),e=0;e{var c=dp().gl_mesh3d,g=Sv().parseColorScale,I=kn().isArrayOrTypedArray,S=Mv(),t=Xc().extractOpts,e=gb(),r=function(f,x){for(var y=x.length-1;y>0;y--){var v=Math.min(x[y],x[y-1]),T=Math.max(x[y],x[y-1]);if(T>v&&v-1}function ft(Le,Gt){return Le===null?Gt:Le}function ut(Le,Gt,ne){yt();var Ct=[Gt],gt=[ne];if(at>=1)Ct=[Gt],gt=[ne];else if(at>0){var St=it(Gt,ne);Ct=St.xyzv,gt=St.abc}for(var Nt=0;Nt-1?ne[le]:lt(ke,Ue,qe);Sr>-1?re[le]=Sr:re[le]=st(ke,Ue,qe,ft(Le,or))}tt(re[0],re[1],re[2])}}function kt(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(2,3,0)}function It(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(3,0,1),Ct(2,3,0),Ct(1,2,3)}function Pt(Le,Gt,ne,Ct){var gt=Le[3];gtCt&&(gt=Ct);for(var St=(Le[3]-gt)/(Le[3]-Gt[3]+1e-9),Nt=[],re=0;re<4;re++)Nt[re]=(1-St)*Le[re]+St*Gt[re];return Nt}function qt(Le,Gt,ne){return Le>=Gt&&Le<=ne}function Wt(Le){var Gt=.001*(F-H);return Le>=H-Gt&&Le<=F+Gt}function Jt(Le){for(var Gt=[],ne=0;ne<4;ne++){var Ct=Le[ne];Gt.push([f._x[Ct],f._y[Ct],f._z[Ct],f._value[Ct]])}return Gt}var ge=3;function fe(Le,Gt,ne,Ct,gt,St){St||(St=1),ne=[-1,-1,-1];var Nt=!1,re=[qt(Gt[0][3],Ct,gt),qt(Gt[1][3],Ct,gt),qt(Gt[2][3],Ct,gt)];if(!re[0]&&!re[1]&&!re[2])return!1;var le=function(Ue,qe,or){return Wt(qe[0][3])&&Wt(qe[1][3])&&Wt(qe[2][3])?(ut(Ue,qe,or),!0):Stre?[j,St]:[St,V];cr(Gt,le[0],le[1])}}var ke=[[Math.min(H,V),Math.max(H,V)],[Math.min(j,F),Math.max(j,F)]];["x","y","z"].forEach(function(Ue){for(var qe=[],or=0;or0&&(qn.push(ui.id),Ue==="x"?ei.push([ui.distRatio,0,0]):Ue==="y"?ei.push([0,ui.distRatio,0]):ei.push([0,0,ui.distRatio]))}else Ue==="x"?Wn=br(1,p-1):Ue==="y"?Wn=br(1,k-1):Wn=br(1,w-1);qn.length>0&&(Ue==="x"?qe[Sr]=ur(Le,qn,Mr,mr,ei,qe[Sr]):Ue==="y"?qe[Sr]=jr(Le,qn,Mr,mr,ei,qe[Sr]):qe[Sr]=qr(Le,qn,Mr,mr,ei,qe[Sr]),Sr++),Wn.length>0&&(Ue==="x"?qe[Sr]=ve(Le,Wn,Mr,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,Wn,Mr,mr,qe[Sr]):qe[Sr]=Ae(Le,Wn,Mr,mr,qe[Sr]),Sr++)}var Gn=f.caps[Ue];Gn.show&&Gn.fill&&(vt(Gn.fill),Ue==="x"?qe[Sr]=ve(Le,[0,p-1],Mr,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,[0,k-1],Mr,mr,qe[Sr]):qe[Sr]=Ae(Le,[0,w-1],Mr,mr,qe[Sr]),Sr++)}}),_===0&&mt(),f._meshX=U,f._meshY=W,f._meshZ=q,f._meshIntensity=J,f._Xs=C,f._Ys=A,f._Zs=h}return nn(),f}function l(f,x){var y=f.glplot.gl,v=c({gl:y}),T=new a(f,v,x.uid);return v._trace=T,T.update(x),f.glplot.add(v),T}Z.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:l}}),RU=Dt((Q,Z)=>{Z.exports={attributes:Jk(),supplyDefaults:AS().supplyDefaults,calc:MS(),colorbar:{min:"cmin",max:"cmax"},plot:tT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:W1(),categories:["gl3d","showLegend"],meta:{}}}),NU=Dt((Q,Z)=>{Z.exports=RU()}),SS=Dt((Q,Z)=>{var c=kc(),g=Jk(),I=w3(),S=qo(),t=Ia().extendFlat,e=Yc().overrideAll,r=Z.exports=e(t({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate,hovertemplatefallback:g.hovertemplatefallback},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:I.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:t({},S.hoverinfo),showlegend:t({},S.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}),jU=Dt((Q,Z)=>{var c=kn(),g=SS(),I=AS().supplyIsoDefaults,S=TS().opacityscaleDefaults;Z.exports=function(t,e,r,a){function n(o,i){return c.coerce(t,e,g,o,i)}I(t,e,r,a,n),S(t,e,a,n)}}),UU=Dt((Q,Z)=>{var c=dp().gl_mesh3d,g=Sv().parseColorScale,I=kn().isArrayOrTypedArray,S=Mv(),t=Xc().extractOpts,e=gb(),r=tT().findNearestOnAxis,a=tT().generateIsoMeshes;function n(l,f,x){this.scene=l,this.uid=x,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(l){if(l.object===this.mesh){var f=l.data.index,x=this.data._meshX[f],y=this.data._meshY[f],v=this.data._meshZ[f],T=this.data._Ys.length,u=this.data._Zs.length,b=r(x,this.data._Xs).id,_=r(y,this.data._Ys).id,P=r(v,this.data._Zs).id,M=l.index=P+u*_+u*T*b;l.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var C=this.data.hovertext||this.data.text;return I(C)&&C[M]!==void 0?l.textLabel=C[M]:C&&(l.textLabel=C),!0}},o.update=function(l){var f=this.scene,x=f.fullSceneLayout;this.data=a(l);function y(_,P,M,C){return P.map(function(A){return _.d2l(A,0,C)*M})}var v=e(y(x.xaxis,l._meshX,f.dataScale[0],l.xcalendar),y(x.yaxis,l._meshY,f.dataScale[1],l.ycalendar),y(x.zaxis,l._meshZ,f.dataScale[2],l.zcalendar)),T=e(l._meshI,l._meshJ,l._meshK),u={positions:v,cells:T,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,opacityscale:l.opacityscale,contourEnable:l.contour.show,contourColor:S(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading},b=t(l);u.vertexIntensity=l._meshIntensity,u.vertexIntensityBounds=[b.min,b.max],u.colormap=g(l),this.mesh.update(u)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(l,f){var x=l.glplot.gl,y=c({gl:x}),v=new n(l,y,f.uid);return y._trace=v,v.update(f),l.glplot.add(y),v}Z.exports=i}),VU=Dt((Q,Z)=>{Z.exports={attributes:SS(),supplyDefaults:jU(),calc:MS(),colorbar:{min:"cmin",max:"cmax"},plot:UU(),moduleType:"trace",name:"volume",basePlotModule:W1(),categories:["gl3d","showLegend"],meta:{}}}),HU=Dt((Q,Z)=>{Z.exports=VU()}),WU=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=mc(),S=mb();Z.exports=function(t,e,r,a){function n(x,y){return g.coerce(t,e,S,x,y)}function o(x){var y=x.map(function(v){var T=n(v);return T&&g.isArrayOrTypedArray(T)?T:null});return y.every(function(v){return v&&v.length===y[0].length})&&y}var i=o(["x","y","z"]);if(!i){e.visible=!1;return}if(o(["i","j","k"]),e.i&&(!e.j||!e.k)||e.j&&(!e.k||!e.i)||e.k&&(!e.i||!e.j)){e.visible=!1;return}var l=c.getComponentMethod("calendars","handleTraceDefaults");l(t,e,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(x){n(x)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),I(t,e,a,n,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",r)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),e._length=null}}),qU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){I.intensity&&c(g,I,{vals:I.intensity,containerStr:"",cLetter:"c"})}}),$U=Dt((Q,Z)=>{var c=dp().gl_mesh3d,g=dp().delaunay_triangulate,I=dp().alpha_shape,S=dp().convex_hull,t=Sv().parseColorScale,e=kn().isArrayOrTypedArray,r=Mv(),a=Xc().extractOpts,n=gb();function o(u,b,_){this.scene=u,this.uid=_,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=o.prototype;i.handlePick=function(u){if(u.object===this.mesh){var b=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var _=this.data.hovertext||this.data.text;return e(_)&&_[b]!==void 0?u.textLabel=_[b]:_&&(u.textLabel=_),!0}};function l(u){for(var b=[],_=u.length,P=0;P<_;P++)b[P]=r(u[P]);return b}function f(u,b,_,P){for(var M=[],C=b.length,A=0;A=b-.5)return!1;return!0}i.update=function(u){var b=this.scene,_=b.fullSceneLayout;this.data=u;var P=u.x.length,M=n(f(_.xaxis,u.x,b.dataScale[0],u.xcalendar),f(_.yaxis,u.y,b.dataScale[1],u.ycalendar),f(_.zaxis,u.z,b.dataScale[2],u.zcalendar)),C;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,P)||!v(u.j,P)||!v(u.k,P))return;C=n(x(u.i),x(u.j),x(u.k))}else u.alphahull===0?C=S(M):u.alphahull>0?C=I(u.alphahull,M):C=y(u.delaunayaxis,M);var A={positions:M,cells:C,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:r(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var h=a(u);this.color="#fff";var p=u.intensitymode;A[p+"Intensity"]=u.intensity,A[p+"IntensityBounds"]=[h.min,h.max],A.colormap=t(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],A.vertexColors=l(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],A.cellColors=l(u.facecolor)):(this.color=u.color,A.meshColor=r(u.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(u,b){var _=u.glplot.gl,P=c({gl:_}),M=new o(u,P,b.uid);return P._trace=M,M.update(b),u.glplot.add(P),M}Z.exports=T}),ZU=Dt((Q,Z)=>{Z.exports={attributes:mb(),supplyDefaults:WU(),calc:qU(),colorbar:{min:"cmin",max:"cmax"},plot:$U(),moduleType:"trace",name:"mesh3d",basePlotModule:W1(),categories:["gl3d","showLegend"],meta:{}}}),GU=Dt((Q,Z)=>{Z.exports=ZU()}),ES=Dt((Q,Z)=>{var c=kc(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=mb(),e=qo(),r=Ia().extendFlat,a={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:I({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),YU=Dt((Q,Z)=>{var c=kn(),g=mc(),I=ES();Z.exports=function(S,t,e,r){function a(v,T){return c.coerce(S,t,I,v,T)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}var y=a("sizemode");a("sizeref",y==="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"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),KU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){for(var S=I.u,t=I.v,e=I.w,r=Math.min(I.x.length,I.y.length,I.z.length,S.length,t.length,e.length),a=-1/0,n=1/0,o=0;o{var c=dp().gl_cone3d,g=dp().gl_cone3d.createConeMesh,I=kn().simpleMap,S=Sv().parseColorScale,t=Xc().extractOpts,e=kn().isArrayOrTypedArray,r=gb();function a(y,v){this.scene=y,this.uid=v,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(y){if(y.object===this.mesh){var v=y.index=y.data.index,T=this.data.x[v],u=this.data.y[v],b=this.data.z[v],_=this.data.u[v],P=this.data.v[v],M=this.data.w[v];y.traceCoordinate=[T,u,b,_,P,M,Math.sqrt(_*_+P*P+M*M)];var C=this.data.hovertext||this.data.text;return e(C)&&C[v]!==void 0?y.textLabel=C[v]:C&&(y.textLabel=C),!0}};var o={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},l={tip:1,tail:1,cm:.75,center:.5};function f(y,v){var T=y.fullSceneLayout,u=y.dataScale,b={};function _(h,p){var k=T[p],w=u[o[p]];return I(h,function(B){return k.d2l(B)*w})}b.vectors=r(_(v.u,"xaxis"),_(v.v,"yaxis"),_(v.w,"zaxis"),v._len),b.positions=r(_(v.x,"xaxis"),_(v.y,"yaxis"),_(v.z,"zaxis"),v._len);var P=t(v);b.colormap=S(v),b.vertexIntensityBounds=[P.min/v._normMax,P.max/v._normMax],b.coneOffset=i[v.anchor];var M=v.sizemode;M==="scaled"?b.coneSize=v.sizeref||.5:M==="absolute"?b.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:M==="raw"&&(b.coneSize=v.sizeref),b.coneSizemode=M;var C=c(b),A=v.lightposition;return C.lightPosition=[A.x,A.y,A.z],C.ambient=v.lighting.ambient,C.diffuse=v.lighting.diffuse,C.specular=v.lighting.specular,C.roughness=v.lighting.roughness,C.fresnel=v.lighting.fresnel,C.opacity=v.opacity,v._pad=l[v.anchor]*C.vectorScale*C.coneScale*v._normMax,C}n.update=function(y){this.data=y;var v=f(this.scene,y);this.mesh.update(v)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(y,v){var T=y.glplot.gl,u=f(y,v),b=g(T,u),_=new a(y,v.uid);return _.mesh=b,_.data=v,b._trace=_,y.glplot.add(b),_}Z.exports=x}),JU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"cone",basePlotModule:W1(),categories:["gl3d","showLegend"],attributes:ES(),supplyDefaults:YU(),colorbar:{min:"cmin",max:"cmax"},calc:KU(),plot:XU(),eventData:function(c,g){return c.norm=g.traceCoordinate[6],c},meta:{}}}),QU=Dt((Q,Z)=>{Z.exports=JU()}),CS=Dt((Q,Z)=>{var c=kc(),g=ph().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=mb(),e=qo(),r=Ia().extendFlat,a={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:I({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),tV=Dt((Q,Z)=>{var c=kn(),g=mc(),I=CS();Z.exports=function(S,t,e,r){function a(y,v){return c.coerce(S,t,I,y,v)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),eV=Dt((Q,Z)=>{var c=dp().gl_streamtube3d,g=c.createTubeMesh,I=kn(),S=Sv().parseColorScale,t=Xc().extractOpts,e=gb(),r={xaxis:0,yaxis:1,zaxis:2};function a(x,y){this.scene=x,this.uid=y,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(x){var y=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(_,P){var M=y[P],C=v[r[P]];return M.l2c(_)/C}if(x.object===this.mesh){var u=x.data.position,b=x.data.velocity;return x.traceCoordinate=[T(u[0],"xaxis"),T(u[1],"yaxis"),T(u[2],"zaxis"),T(b[0],"xaxis"),T(b[1],"yaxis"),T(b[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function o(x){var y=x.length,v;return y>2?v=x.slice(1,y-1):y===2?v=[(x[0]+x[1])/2]:v=x,v}function i(x){var y=x.length;return y===1?[.5,.5]:[x[1]-x[0],x[y-1]-x[y-2]]}function l(x,y){var v=x.fullSceneLayout,T=x.dataScale,u=y._len,b={};function _(st,tt){var pt=v[tt],rt=T[r[tt]];return I.simpleMap(st,function(at){return pt.d2l(at)*rt})}if(b.vectors=e(_(y._u,"xaxis"),_(y._v,"yaxis"),_(y._w,"zaxis"),u),!u)return{positions:[],cells:[]};var P=_(y._Xs,"xaxis"),M=_(y._Ys,"yaxis"),C=_(y._Zs,"zaxis");b.meshgrid=[P,M,C],b.gridFill=y._gridFill;var A=y._slen;if(A)b.startingPositions=e(_(y._startsX,"xaxis"),_(y._startsY,"yaxis"),_(y._startsZ,"zaxis"));else{for(var h=M[0],p=o(P),k=o(C),w=new Array(p.length*k.length),B=0,O=0;O{Z.exports={moduleType:"trace",name:"streamtube",basePlotModule:W1(),categories:["gl3d","showLegend"],attributes:CS(),supplyDefaults:tV(),colorbar:{min:"cmin",max:"cmax"},calc:Qk().calc,plot:eV(),eventData:function(c,g){return c.tubex=c.x,c.tubey=c.y,c.tubez=c.z,c.tubeu=g.traceCoordinate[3],c.tubev=g.traceCoordinate[4],c.tubew=g.traceCoordinate[5],c.norm=g.traceCoordinate[6],c.divergence=g.traceCoordinate[7],delete c.x,delete c.y,delete c.z,c},meta:{}}}),nV=Dt((Q,Z)=>{Z.exports=rV()}),xx=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=z0(),t=ef(),e=qo(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=Yc().overrideAll,i=t.marker,l=t.line,f=i.line;Z.exports=o({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:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:l.color,width:l.width,dash:a},connectgaps:t.connectgaps,marker:n({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:n({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:n({width:f.width},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:S(),selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),iV=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=O0(),t=x0(),e=D0(),r=xx(),a=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(n,o,i,l){function f(P,M){return c.coerce(n,o,r,P,M)}var x=f("locations"),y;if(x&&x.length){var v=f("geojson"),T;(typeof v=="string"&&v!==""||c.isPlainObject(v))&&(T="geojson-id");var u=f("locationmode",T);u==="country names"&&c.warn(a),u==="geojson-id"&&f("featureidkey"),y=x.length}else{var b=f("lon")||[],_=f("lat")||[];y=Math.min(b.length,_.length)}if(!y){o.visible=!1;return}o._length=y,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),g.hasMarkers(o)&&I(n,o,i,l,f,{gradient:!0}),g.hasLines(o)&&(S(n,o,i,l,f),f("connectgaps")),g.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),t(n,o,l,f)),f("fill"),o.fill!=="none"&&e(n,o,i,f),c.coerceSelectionMarkerOpacity(o,f)}}),aV=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.geo]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),eT=Dt((Q,Z)=>{var c=Hn(),g=sa().BADNUM,I=B0(),S=ct(),t=Rt(),e=kn().isArrayOrTypedArray,r=kn()._;function a(n){return n&&typeof n=="string"}Z.exports=function(n,o){var i=e(o.locations),l=i?o.locations.length:o._length,f=new Array(l),x;o.geojson?x=function(_){return a(_)||c(_)}:x=a;for(var y=0;y{Q.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"},Q.axesNames=["lonaxis","lataxis"],Q.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Q.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Q.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]}},Q.clipPad=.001,Q.precision=.1,Q.landColor="#F0DC82",Q.waterColor="#3399FF",Q.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Q.sphereSVG={type:"Sphere"},Q.fillLayers={ocean:1,land:1,lakes:1},Q.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Q.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Q.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Q.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}),LS=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.topojson=c.topojson||{}))})(Q,function(c){function g(_){return _}function I(_){if(_==null)return g;var P,M,C=_.scale[0],A=_.scale[1],h=_.translate[0],p=_.translate[1];return function(k,w){w||(P=M=0);var B=2,O=k.length,j=new Array(O);for(j[0]=(P+=k[0])*C+h,j[1]=(M+=k[1])*A+p;Bh&&(h=B[0]),B[1]p&&(p=B[1])}function w(B){switch(B.type){case"GeometryCollection":B.geometries.forEach(w);break;case"Point":k(B.coordinates);break;case"MultiPoint":B.coordinates.forEach(k);break}}_.arcs.forEach(function(B){for(var O=-1,j=B.length,V;++Oh&&(h=V[0]),V[1]p&&(p=V[1])});for(M in _.objects)w(_.objects[M]);return[C,A,h,p]}function t(_,P){for(var M,C=_.length,A=C-P;A<--C;)M=_[A],_[A++]=_[C],_[C]=M}function e(_,P){return typeof P=="string"&&(P=_.objects[P]),P.type==="GeometryCollection"?{type:"FeatureCollection",features:P.geometries.map(function(M){return r(_,M)})}:r(_,P)}function r(_,P){var M=P.id,C=P.bbox,A=P.properties==null?{}:P.properties,h=a(_,P);return M==null&&C==null?{type:"Feature",properties:A,geometry:h}:C==null?{type:"Feature",id:M,properties:A,geometry:h}:{type:"Feature",id:M,bbox:C,properties:A,geometry:h}}function a(_,P){var M=I(_.transform),C=_.arcs;function A(O,j){j.length&&j.pop();for(var V=C[O<0?~O:O],H=0,F=V.length;H1)C=l(_,P,M);else for(A=0,C=new Array(h=_.arcs.length);A1)for(var j=1,V=k(B[0]),H,F;jV&&(F=B[0],B[0]=B[j],B[j]=F,V=H);return B}).filter(function(w){return w.length>0})}}function v(_,P){for(var M=0,C=_.length;M>>1;_[A]=2))throw new Error("n must be ≥2");w=_.bbox||S(_);var M=w[0],C=w[1],A=w[2],h=w[3],p;P={scale:[A-M?(A-M)/(p-1):1,h-C?(h-C)/(p-1):1],translate:[M,C]}}else w=_.bbox;var k=u(P),w,B,O=_.objects,j={};function V(U){return k(U)}function H(U){var W;switch(U.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:U.geometries.map(H)};break;case"Point":W={type:"Point",coordinates:V(U.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:U.coordinates.map(V)};break;default:return U}return U.id!=null&&(W.id=U.id),U.bbox!=null&&(W.bbox=U.bbox),U.properties!=null&&(W.properties=U.properties),W}function F(U){var W=0,q=1,J=U.length,lt,yt=new Array(J);for(yt[0]=k(U[0],0);++W{var c=Z.exports={},g=k3().locationmodeToLayer,I=LS().feature;c.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},c.getTopojsonPath=function(S,t){return S+=S.endsWith("/")?"":"/",`${S}${t}.json`},c.getTopojsonFeatures=function(S,t){var e=g[S.locationmode],r=t.objects[e];return I(t,r).features}}),q1=Dt(Q=>{var Z=sa().BADNUM;Q.calcTraceToLineCoords=function(c){for(var g=c[0].trace,I=g.connectgaps,S=[],t=[],e=0;e0&&(S.push(t),t=[])}return t.length>0&&S.push(t),S},Q.makeLine=function(c){return c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}},Q.makePolygon=function(c){if(c.length===1)return{type:"Polygon",coordinates:c};for(var g=new Array(c.length),I=0;I{Z.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}),nT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=63710088e-1,c={centimeters:Z*100,centimetres:Z*100,degrees:360/(2*Math.PI),feet:Z*3.28084,inches:Z*39.37,kilometers:Z/1e3,kilometres:Z/1e3,meters:Z,metres:Z,miles:Z/1609.344,millimeters:Z*1e3,millimetres:Z*1e3,nauticalmiles:Z/1852,radians:1,yards:Z*1.0936},g={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 I(O,j,V={}){let H={type:"Feature"};return(V.id===0||V.id)&&(H.id=V.id),V.bbox&&(H.bbox=V.bbox),H.properties=j||{},H.geometry=O,H}function S(O,j,V={}){switch(O){case"Point":return t(j).geometry;case"LineString":return n(j).geometry;case"Polygon":return r(j).geometry;case"MultiPoint":return f(j).geometry;case"MultiLineString":return l(j).geometry;case"MultiPolygon":return x(j).geometry;default:throw new Error(O+" is invalid")}}function t(O,j,V={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(O[0])||!p(O[1]))throw new Error("coordinates must contain numbers");return I({type:"Point",coordinates:O},j,V)}function e(O,j,V={}){return i(O.map(H=>t(H,j)),V)}function r(O,j,V={}){for(let H of O){if(H.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(H[H.length-1].length!==H[0].length)throw new Error("First and last Position are not equivalent.");for(let F=0;Fr(H,j)),V)}function n(O,j,V={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return I({type:"LineString",coordinates:O},j,V)}function o(O,j,V={}){return i(O.map(H=>n(H,j)),V)}function i(O,j={}){let V={type:"FeatureCollection"};return j.id&&(V.id=j.id),j.bbox&&(V.bbox=j.bbox),V.features=O,V}function l(O,j,V={}){return I({type:"MultiLineString",coordinates:O},j,V)}function f(O,j,V={}){return I({type:"MultiPoint",coordinates:O},j,V)}function x(O,j,V={}){return I({type:"MultiPolygon",coordinates:O},j,V)}function y(O,j,V={}){return I({type:"GeometryCollection",geometries:O},j,V)}function v(O,j=0){if(j&&!(j>=0))throw new Error("precision must be a positive number");let V=Math.pow(10,j||0);return Math.round(O*V)/V}function T(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O*V}function u(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O/V}function b(O,j){return M(u(O,j))}function _(O){let j=O%360;return j<0&&(j+=360),j}function P(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function M(O){return O%(2*Math.PI)*180/Math.PI}function C(O){return O%360*Math.PI/180}function A(O,j="kilometers",V="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return T(u(O,j),V)}function h(O,j="meters",V="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");let H=g[j];if(!H)throw new Error("invalid original units");let F=g[V];if(!F)throw new Error("invalid final units");return O/H*F}function p(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function k(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function w(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(j=>{if(!p(j))throw new Error("bbox must only contain numbers")})}function B(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}Q.areaFactors=g,Q.azimuthToBearing=P,Q.bearingToAzimuth=_,Q.convertArea=h,Q.convertLength=A,Q.degreesToRadians=C,Q.earthRadius=Z,Q.factors=c,Q.feature=I,Q.featureCollection=i,Q.geometry=S,Q.geometryCollection=y,Q.isNumber=p,Q.isObject=k,Q.lengthToDegrees=b,Q.lengthToRadians=u,Q.lineString=n,Q.lineStrings=o,Q.multiLineString=l,Q.multiPoint=f,Q.multiPolygon=x,Q.point=t,Q.points=e,Q.polygon=r,Q.polygons=a,Q.radiansToDegrees=M,Q.radiansToLength=T,Q.round=v,Q.validateBBox=w,Q.validateId=B}),iT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=nT();function c(u,b,_){if(u!==null)for(var P,M,C,A,h,p,k,w=0,B=0,O,j=u.type,V=j==="FeatureCollection",H=j==="Feature",F=V?u.features.length:1,U=0;Up||V>k||H>w){h=B,p=P,k=V,w=H,C=0;return}var F=Z.lineString.call(void 0,[h,B],_.properties);if(b(F,P,M,H,C)===!1)return!1;C++,h=B})===!1)return!1}}})}function f(u,b,_){var P=_,M=!1;return l(u,function(C,A,h,p,k){M===!1&&_===void 0?P=C:P=b(P,C,A,h,p,k),M=!0}),P}function x(u,b){if(!u)throw new Error("geojson is required");o(u,function(_,P,M){if(_.geometry!==null){var C=_.geometry.type,A=_.geometry.coordinates;switch(C){case"LineString":if(b(_,P,M,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h{Object.defineProperty(Q,"__esModule",{value:!0});var Z=nT(),c=iT();function g(n){return c.geomReduce.call(void 0,n,(o,i)=>o+I(i),0)}function I(n){let o=0,i;switch(n.type){case"Polygon":return S(n.coordinates);case"MultiPolygon":for(i=0;i0){o+=Math.abs(r(n[0]));for(let i=1;i=o?(l+2)%o:l+2],v=f[0]*e,T=x[1]*e,u=y[0]*e;i+=(u-v)*Math.sin(T),l++}return i*t}var a=g;Q.area=g,Q.default=a}),lV=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=nT(),c=iT();function g(S,t={}){let e=0,r=0,a=0;return c.coordEach.call(void 0,S,function(n){e+=n[0],r+=n[1],a++},!0),Z.point.call(void 0,[e/a,r/a],t.properties)}var I=g;Q.centroid=g,Q.default=I}),uV=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=iT();function c(I,S={}){if(I.bbox!=null&&S.recompute!==!0)return I.bbox;let t=[1/0,1/0,-1/0,-1/0];return Z.coordEach.call(void 0,I,e=>{t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{var c=Wr(),g=oV(),{area:I}=sV(),{centroid:S}=lV(),{bbox:t}=uV(),e=T1(),r=as(),a=Qn(),n=Eo(),o=mm(),i=Object.keys(g),l={"ISO-3":e,"USA-states":e,"country names":f};function f(P){for(var M=0;M0&&j[V+1][0]<0)return V;return null}switch(A==="RUS"||A==="FJI"?p=function(j){var V;if(O(j)===null)V=j;else for(V=new Array(j.length),B=0;BV?H[F++]=[j[B][0]+360,j[B][1]]:B===V?(H[F++]=j[B],H[F++]=[j[B][0],-90]):H[F++]=j[B];var U=o.tester(H);U.pts.pop(),h.push(U)}:p=function(j){h.push(o.tester(j))},M.type){case"MultiPolygon":for(k=0;k0?U.properties.ct=u(U):U.properties.ct=[NaN,NaN],H.fIn=j,H.fOut=U,h.push(U)}else r.log(["Location",H.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[V]}switch(C.type){case"FeatureCollection":var B=C.features;for(p=0;ph&&(h=w,C=k)}else C=M;return S(C).geometry.coordinates}function b(P){var M=window.PlotlyGeoAssets||{},C=[];function A(B){return new Promise(function(O,j){c.json(B,function(V,H){if(V){delete M[B];var F=V.status===404?'GeoJSON at URL "'+B+'" does not exist.':"Unexpected error while fetching from "+B;return j(new Error(F))}return M[B]=H,O(H)})})}function h(B){return new Promise(function(O,j){var V=0,H=setInterval(function(){if(M[B]&&M[B]!=="pending")return clearInterval(H),O(M[B]);if(V>100)return clearInterval(H),j("Unexpected error while fetching from "+B);V++},50)})}for(var p=0;p{var c=Wr(),g=Vs(),I=pi(),S=_l(),t=S.stylePoints,e=S.styleText;Z.exports=function(a,n){n&&r(a,n)};function r(a,n){var o=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),t(i,o,a),e(i,o,a),i.selectAll("path.js-line").style("fill","none").each(function(l){var f=c.select(this),x=l.trace,y=x.line||{};f.call(I.stroke,y.color).call(g.dashLine,y.dash||"",y.width||0),x.fill!=="none"&&f.call(I.fill,x.fillcolor)})}}),IS=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=rT().getTopojsonFeatures,S=q1(),t=$1(),e=K0().findExtremes,r=sa().BADNUM,a=me().calcMarkerSize,n=Tc(),o=PS();function i(f,x,y){var v=x.layers.frontplot.select(".scatterlayer"),T=g.makeTraceGroups(v,y,"trace scattergeo");function u(b,_){b.lonlat[0]===r&&c.select(_).remove()}T.selectAll("*").remove(),T.each(function(b){var _=c.select(this),P=b[0].trace;if(n.hasLines(P)||P.fill!=="none"){var M=S.calcTraceToLineCoords(b),C=P.fill!=="none"?S.makePolygon(M):S.makeLine(M);_.selectAll("path.js-line").data([{geojson:C,trace:P}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(P)&&_.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(A){u(A,this)}),n.hasText(P)&&_.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(A){u(A,this)}),o(f,b)})}function l(f,x){var y=f[0].trace,v=x[y.geo],T=v._subplot,u=y._length,b,_;if(g.isArrayOrTypedArray(y.locations)){var P=y.locationmode,M=P==="geojson-id"?t.extractTraceFeature(f):I(y,T.topojson);for(b=0;b{var c=tf(),g=sa().BADNUM,I=Bu(),S=kn().fillText,t=xx();Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.xa,f=r.ya,x=r.subplot,y=x.projection.isLonLatOverEdges,v=x.project;function T(A){var h=A.lonlat;if(h[0]===g||y(h))return 1/0;var p=v(h),k=v([a,n]),w=Math.abs(p[0]-k[0]),B=Math.abs(p[1]-k[1]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(w*w+B*B)-O,1-3/O)}if(c.getClosest(o,T,r),r.index!==!1){var u=o[r.index],b=u.lonlat,_=[l.c2p(b),f.c2p(b)],P=u.mrc||1;r.x0=_[0]-P,r.x1=_[0]+P,r.y0=_[1]-P,r.y1=_[1]+P,r.loc=u.loc,r.lon=b[0],r.lat=b[1];var M={};M[i.geo]={_subplot:x};var C=i._module.formatLabels(u,i,M);return r.lonLabel=C.lonLabel,r.latLabel=C.latLabel,r.color=I(i,u),r.extraText=e(i,u,r,o[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function e(r,a,n,o){if(r.hovertemplate)return;var i=a.hi||r.hoverinfo,l=i==="all"?t.hoverinfo.flags:i.split("+"),f=l.indexOf("location")!==-1&&Array.isArray(r.locations),x=l.indexOf("lon")!==-1,y=l.indexOf("lat")!==-1,v=l.indexOf("text")!==-1,T=[];function u(b){return b+"°"}return f?T.push(a.loc):x&&y?T.push("("+u(n.latLabel)+", "+u(n.lonLabel)+")"):x?T.push(o.lon+u(n.lonLabel)):y&&T.push(o.lat+u(n.latLabel)),v&&S(a,r,T),T.join("
")}}),hV=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.lon=g.lon,c.lat=g.lat,c.location=g.loc?g.loc:null;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c}}),fV=Dt((Q,Z)=>{var c=Tc(),g=sa().BADNUM;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o,i,l,f,x,y=!c.hasMarkers(n)&&!c.hasText(n);if(y)return[];if(S===!1)for(x=0;x{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){function g(rt,at){return rtat?1:rt>=at?0:NaN}function I(rt){return rt.length===1&&(rt=S(rt)),{left:function(at,vt,it,K){for(it==null&&(it=0),K==null&&(K=at.length);it>>1;rt(at[ft],vt)<0?it=ft+1:K=ft}return it},right:function(at,vt,it,K){for(it==null&&(it=0),K==null&&(K=at.length);it>>1;rt(at[ft],vt)>0?K=ft:it=ft+1}return it}}}function S(rt){return function(at,vt){return g(rt(at),vt)}}var t=I(g),e=t.right,r=t.left;function a(rt,at){at==null&&(at=n);for(var vt=0,it=rt.length-1,K=rt[0],ft=new Array(it<0?0:it);vtrt?1:at>=rt?0:NaN}function l(rt){return rt===null?NaN:+rt}function f(rt,at){var vt=rt.length,it=0,K=-1,ft=0,ut,kt,It=0;if(at==null)for(;++K1)return It/(it-1)}function x(rt,at){var vt=f(rt,at);return vt&&Math.sqrt(vt)}function y(rt,at){var vt=rt.length,it=-1,K,ft,ut;if(at==null){for(;++it=K)for(ft=ut=K;++itK&&(ft=K),ut=K)for(ft=ut=K;++itK&&(ft=K),ut0)return[rt];if((it=at0)for(rt=Math.ceil(rt/kt),at=Math.floor(at/kt),ut=new Array(ft=Math.ceil(at-rt+1));++K=0?(ft>=M?10:ft>=C?5:ft>=A?2:1)*Math.pow(10,K):-Math.pow(10,-K)/(ft>=M?10:ft>=C?5:ft>=A?2:1)}function k(rt,at,vt){var it=Math.abs(at-rt)/Math.max(0,vt),K=Math.pow(10,Math.floor(Math.log(it)/Math.LN10)),ft=it/K;return ft>=M?K*=10:ft>=C?K*=5:ft>=A&&(K*=2),atWt;)Jt.pop(),--ge;var fe=new Array(ge+1),pe;for(ft=0;ft<=ge;++ft)pe=fe[ft]=[],pe.x0=ft>0?Jt[ft-1]:qt,pe.x1=ft=1)return+vt(rt[it-1],it-1,rt);var it,K=(it-1)*at,ft=Math.floor(K),ut=+vt(rt[ft],ft,rt),kt=+vt(rt[ft+1],ft+1,rt);return ut+(kt-ut)*(K-ft)}}function j(rt,at,vt){return rt=u.call(rt,l).sort(g),Math.ceil((vt-at)/(2*(O(rt,.75)-O(rt,.25))*Math.pow(rt.length,-1/3)))}function V(rt,at,vt){return Math.ceil((vt-at)/(3.5*x(rt)*Math.pow(rt.length,-1/3)))}function H(rt,at){var vt=rt.length,it=-1,K,ft;if(at==null){for(;++it=K)for(ft=K;++itft&&(ft=K)}else for(;++it=K)for(ft=K;++itft&&(ft=K);return ft}function F(rt,at){var vt=rt.length,it=vt,K=-1,ft,ut=0;if(at==null)for(;++K=0;)for(ut=rt[at],vt=ut.length;--vt>=0;)ft[--K]=ut[vt];return ft}function q(rt,at){var vt=rt.length,it=-1,K,ft;if(at==null){for(;++it=K)for(ft=K;++itK&&(ft=K)}else for(;++it=K)for(ft=K;++itK&&(ft=K);return ft}function J(rt,at){for(var vt=at.length,it=new Array(vt);vt--;)it[vt]=rt[at[vt]];return it}function lt(rt,at){if(vt=rt.length){var vt,it=0,K=0,ft,ut=rt[K];for(at==null&&(at=g);++it{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,T3()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(gr){e(t,gr,this.t),e(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new S;function e(gr,Ur,wn){var hn=gr.s=Ur+wn,Zn=hn-Ur,gi=hn-Zn;gr.t=Ur-gi+(wn-Zn)}var r=1e-6,a=1e-12,n=Math.PI,o=n/2,i=n/4,l=n*2,f=180/n,x=n/180,y=Math.abs,v=Math.atan,T=Math.atan2,u=Math.cos,b=Math.ceil,_=Math.exp,P=Math.log,M=Math.pow,C=Math.sin,A=Math.sign||function(gr){return gr>0?1:gr<0?-1:0},h=Math.sqrt,p=Math.tan;function k(gr){return gr>1?0:gr<-1?n:Math.acos(gr)}function w(gr){return gr>1?o:gr<-1?-o:Math.asin(gr)}function B(gr){return(gr=C(gr/2))*gr}function O(){}function j(gr,Ur){gr&&H.hasOwnProperty(gr.type)&&H[gr.type](gr,Ur)}var V={Feature:function(gr,Ur){j(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,Zn=wn.length;++hn=0?1:-1,Zn=hn*wn,gi=u(Ur),aa=C(Ur),xa=tt*aa,Ra=st*gi+xa*u(Zn),Ga=xa*hn*C(Zn);q.add(T(Ga,Ra)),mt=gr,st=gi,tt=aa}function K(gr){return J.reset(),W(gr,pt),J*2}function ft(gr){return[T(gr[1],gr[0]),w(gr[2])]}function ut(gr){var Ur=gr[0],wn=gr[1],hn=u(wn);return[hn*u(Ur),hn*C(Ur),C(wn)]}function kt(gr,Ur){return gr[0]*Ur[0]+gr[1]*Ur[1]+gr[2]*Ur[2]}function It(gr,Ur){return[gr[1]*Ur[2]-gr[2]*Ur[1],gr[2]*Ur[0]-gr[0]*Ur[2],gr[0]*Ur[1]-gr[1]*Ur[0]]}function Pt(gr,Ur){gr[0]+=Ur[0],gr[1]+=Ur[1],gr[2]+=Ur[2]}function qt(gr,Ur){return[gr[0]*Ur,gr[1]*Ur,gr[2]*Ur]}function Wt(gr){var Ur=h(gr[0]*gr[0]+gr[1]*gr[1]+gr[2]*gr[2]);gr[0]/=Ur,gr[1]/=Ur,gr[2]/=Ur}var Jt,ge,fe,pe,se,Tt,Lt,Mt,ee=I(),ve,oe,Ae={point:He,lineStart:cr,lineEnd:ur,polygonStart:function(){Ae.point=jr,Ae.lineStart=qr,Ae.lineEnd=br,ee.reset(),pt.polygonStart()},polygonEnd:function(){pt.polygonEnd(),Ae.point=He,Ae.lineStart=cr,Ae.lineEnd=ur,q<0?(Jt=-(fe=180),ge=-(pe=90)):ee>r?pe=90:ee<-r&&(ge=-90),oe[0]=Jt,oe[1]=fe},sphere:function(){Jt=-(fe=180),ge=-(pe=90)}};function He(gr,Ur){ve.push(oe=[Jt=gr,fe=gr]),Urpe&&(pe=Ur)}function Ge(gr,Ur){var wn=ut([gr*x,Ur*x]);if(Mt){var hn=It(Mt,wn),Zn=[hn[1],-hn[0],0],gi=It(Zn,hn);Wt(gi),gi=ft(gi);var aa=gr-se,xa=aa>0?1:-1,Ra=gi[0]*f*xa,Ga,fa=y(aa)>180;fa^(xa*sepe&&(pe=Ga)):(Ra=(Ra+360)%360-180,fa^(xa*sepe&&(pe=Ur))),fa?grXr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr):fe>=Jt?(grfe&&(fe=gr)):gr>se?Xr(Jt,gr)>Xr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr)}else ve.push(oe=[Jt=gr,fe=gr]);Urpe&&(pe=Ur),Mt=wn,se=gr}function cr(){Ae.point=Ge}function ur(){oe[0]=Jt,oe[1]=fe,Ae.point=He,Mt=null}function jr(gr,Ur){if(Mt){var wn=gr-se;ee.add(y(wn)>180?wn+(wn>0?360:-360):wn)}else Tt=gr,Lt=Ur;pt.point(gr,Ur),Ge(gr,Ur)}function qr(){pt.lineStart()}function br(){jr(Tt,Lt),pt.lineEnd(),y(ee)>r&&(Jt=-(fe=180)),oe[0]=Jt,oe[1]=fe,Mt=null}function Xr(gr,Ur){return(Ur-=gr)<0?Ur+360:Ur}function nn(gr,Ur){return gr[0]-Ur[0]}function Le(gr,Ur){return gr[0]<=gr[1]?gr[0]<=Ur&&Ur<=gr[1]:UrXr(hn[0],hn[1])&&(hn[1]=Zn[1]),Xr(Zn[0],hn[1])>Xr(hn[0],hn[1])&&(hn[0]=Zn[0])):gi.push(hn=Zn);for(aa=-1/0,wn=gi.length-1,Ur=0,hn=gi[wn];Ur<=wn;hn=Zn,++Ur)Zn=gi[Ur],(xa=Xr(hn[1],Zn[0]))>aa&&(aa=xa,Jt=Zn[0],fe=hn[1])}return ve=oe=null,Jt===1/0||ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Jt,ge],[fe,pe]]}var ne,Ct,gt,St,Nt,re,le,ke,Ue,qe,or,Sr,Mr,mr,Qr,Wn,qn={sphere:O,point:ei,lineStart:ui,lineEnd:Yi,polygonStart:function(){qn.lineStart=We,qn.lineEnd=nr},polygonEnd:function(){qn.lineStart=ui,qn.lineEnd=Yi}};function ei(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);Di(wn*u(gr),wn*C(gr),C(Ur))}function Di(gr,Ur,wn){++ne,gt+=(gr-gt)/ne,St+=(Ur-St)/ne,Nt+=(wn-Nt)/ne}function ui(){qn.point=Gn}function Gn(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Wn=C(Ur),qn.point=ua,Di(mr,Qr,Wn)}function ua(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),Zn=wn*C(gr),gi=C(Ur),aa=T(h((aa=Qr*gi-Wn*Zn)*aa+(aa=Wn*hn-mr*gi)*aa+(aa=mr*Zn-Qr*hn)*aa),mr*hn+Qr*Zn+Wn*gi);Ct+=aa,re+=aa*(mr+(mr=hn)),le+=aa*(Qr+(Qr=Zn)),ke+=aa*(Wn+(Wn=gi)),Di(mr,Qr,Wn)}function Yi(){qn.point=ei}function We(){qn.point=dr}function nr(){_r(Sr,Mr),qn.point=ei}function dr(gr,Ur){Sr=gr,Mr=Ur,gr*=x,Ur*=x,qn.point=_r;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Wn=C(Ur),Di(mr,Qr,Wn)}function _r(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),Zn=wn*C(gr),gi=C(Ur),aa=Qr*gi-Wn*Zn,xa=Wn*hn-mr*gi,Ra=mr*Zn-Qr*hn,Ga=h(aa*aa+xa*xa+Ra*Ra),fa=w(Ga),Oa=Ga&&-fa/Ga;Ue+=Oa*aa,qe+=Oa*xa,or+=Oa*Ra,Ct+=fa,re+=fa*(mr+(mr=hn)),le+=fa*(Qr+(Qr=Zn)),ke+=fa*(Wn+(Wn=gi)),Di(mr,Qr,Wn)}function tn(gr){ne=Ct=gt=St=Nt=re=le=ke=Ue=qe=or=0,W(gr,qn);var Ur=Ue,wn=qe,hn=or,Zn=Ur*Ur+wn*wn+hn*hn;return Znn?gr+Math.round(-gr/l)*l:gr,Ur]}Mn.invert=Mn;function mi(gr,Ur,wn){return(gr%=l)?Ur||wn?Tn(Ni(gr),Hi(Ur,wn)):Ni(gr):Ur||wn?Hi(Ur,wn):Mn}function Mi(gr){return function(Ur,wn){return Ur+=gr,[Ur>n?Ur-l:Ur<-n?Ur+l:Ur,wn]}}function Ni(gr){var Ur=Mi(gr);return Ur.invert=Mi(-gr),Ur}function Hi(gr,Ur){var wn=u(gr),hn=C(gr),Zn=u(Ur),gi=C(Ur);function aa(xa,Ra){var Ga=u(Ra),fa=u(xa)*Ga,Oa=C(xa)*Ga,Aa=C(Ra),na=Aa*wn+fa*hn;return[T(Oa*Zn-na*gi,fa*wn-Aa*hn),w(na*Zn+Oa*gi)]}return aa.invert=function(xa,Ra){var Ga=u(Ra),fa=u(xa)*Ga,Oa=C(xa)*Ga,Aa=C(Ra),na=Aa*Zn-Oa*gi;return[T(Oa*Zn+Aa*gi,fa*wn+na*hn),w(na*wn-fa*hn)]},aa}function Ji(gr){gr=mi(gr[0]*x,gr[1]*x,gr.length>2?gr[2]*x:0);function Ur(wn){return wn=gr(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn}return Ur.invert=function(wn){return wn=gr.invert(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn},Ur}function di(gr,Ur,wn,hn,Zn,gi){if(wn){var aa=u(Ur),xa=C(Ur),Ra=hn*wn;Zn==null?(Zn=Ur+hn*l,gi=Ur-Ra/2):(Zn=za(aa,Zn),gi=za(aa,gi),(hn>0?Zngi)&&(Zn+=hn*l));for(var Ga,fa=Zn;hn>0?fa>gi:fa1&&gr.push(gr.pop().concat(gr.shift()))},result:function(){var wn=gr;return gr=[],Ur=null,wn}}}function ze(gr,Ur){return y(gr[0]-Ur[0])=0;--xa)Zn.point((Oa=fa[xa])[0],Oa[1]);else hn(Aa.x,Aa.p.x,-1,Zn);Aa=Aa.p}Aa=Aa.o,fa=Aa.z,na=!na}while(!Aa.v);Zn.lineEnd()}}}function Gr(gr){if(Ur=gr.length){for(var Ur,wn=0,hn=gr[0],Zn;++wn=0?1:-1,$l=su*Il,lu=$l>n,ml=is*gs;if(Rr.add(T(ml*su*C($l),Xo*el+ml*u($l))),aa+=lu?Il+su*l:Il,lu^na>=wn^so>=wn){var qu=It(ut(Aa),ut(ps));Wt(qu);var zu=It(gi,qu);Wt(zu);var fu=(lu^Il>=0?-1:1)*w(zu[2]);(hn>fu||hn===fu&&(qu[0]||qu[1]))&&(xa+=lu^Il>=0?1:-1)}}return(aa<-r||aa0){for(Ra||(Zn.polygonStart(),Ra=!0),Zn.lineStart(),el=0;el1&&$a&2&&gs.push(gs.pop().concat(gs.shift())),fa.push(gs.filter(Ce))}}return Aa}}function Ce(gr){return gr.length>1}function pr(gr,Ur){return((gr=gr.x)[0]<0?gr[1]-o-r:o-gr[1])-((Ur=Ur.x)[0]<0?Ur[1]-o-r:o-Ur[1])}var Hr=on(function(){return!0},_n,ri,[-n,-o]);function _n(gr){var Ur=NaN,wn=NaN,hn=NaN,Zn;return{lineStart:function(){gr.lineStart(),Zn=1},point:function(gi,aa){var xa=gi>0?n:-n,Ra=y(gi-Ur);y(Ra-n)0?o:-o),gr.point(hn,wn),gr.lineEnd(),gr.lineStart(),gr.point(xa,wn),gr.point(gi,wn),Zn=0):hn!==xa&&Ra>=n&&(y(Ur-hn)r?v((C(Ur)*(gi=u(hn))*C(wn)-C(hn)*(Zn=u(Ur))*C(gr))/(Zn*gi*aa)):(Ur+hn)/2}function ri(gr,Ur,wn,hn){var Zn;if(gr==null)Zn=wn*o,hn.point(-n,Zn),hn.point(0,Zn),hn.point(n,Zn),hn.point(n,0),hn.point(n,-Zn),hn.point(0,-Zn),hn.point(-n,-Zn),hn.point(-n,0),hn.point(-n,Zn);else if(y(gr[0]-Ur[0])>r){var gi=gr[0]0,Zn=y(Ur)>r;function gi(fa,Oa,Aa,na){di(na,gr,wn,Aa,fa,Oa)}function aa(fa,Oa){return u(fa)*u(Oa)>Ur}function xa(fa){var Oa,Aa,na,ao,is;return{lineStart:function(){ao=na=!1,is=1},point:function(Xo,ls){var ps=[Xo,ls],so,$a=aa(Xo,ls),gs=hn?$a?0:Ga(Xo,ls):$a?Ga(Xo+(Xo<0?n:-n),ls):0;if(!Oa&&(ao=na=$a)&&fa.lineStart(),$a!==na&&(so=Ra(Oa,ps),(!so||ze(Oa,so)||ze(ps,so))&&(ps[2]=1)),$a!==na)is=0,$a?(fa.lineStart(),so=Ra(ps,Oa),fa.point(so[0],so[1])):(so=Ra(Oa,ps),fa.point(so[0],so[1],2),fa.lineEnd()),Oa=so;else if(Zn&&Oa&&hn^$a){var el;!(gs&Aa)&&(el=Ra(ps,Oa,!0))&&(is=0,hn?(fa.lineStart(),fa.point(el[0][0],el[0][1]),fa.point(el[1][0],el[1][1]),fa.lineEnd()):(fa.point(el[1][0],el[1][1]),fa.lineEnd(),fa.lineStart(),fa.point(el[0][0],el[0][1],3)))}$a&&(!Oa||!ze(Oa,ps))&&fa.point(ps[0],ps[1]),Oa=ps,na=$a,Aa=gs},lineEnd:function(){na&&fa.lineEnd(),Oa=null},clean:function(){return is|(ao&&na)<<1}}}function Ra(fa,Oa,Aa){var na=ut(fa),ao=ut(Oa),is=[1,0,0],Xo=It(na,ao),ls=kt(Xo,Xo),ps=Xo[0],so=ls-ps*ps;if(!so)return!Aa&&fa;var $a=Ur*ls/so,gs=-Ur*ps/so,el=It(is,Xo),Il=qt(is,$a),su=qt(Xo,gs);Pt(Il,su);var $l=el,lu=kt(Il,$l),ml=kt($l,$l),qu=lu*lu-ml*(kt(Il,Il)-1);if(!(qu<0)){var zu=h(qu),fu=qt($l,(-lu-zu)/ml);if(Pt(fu,Il),fu=ft(fu),!Aa)return fu;var Oo=fa[0],Es=Oa[0],Kl=fa[1],Rl=Oa[1],vc;Es0^fu[1]<(y(fu[0]-Oo)n^(Oo<=fu[0]&&fu[0]<=Es)){var Wc=qt($l,(-lu+zu)/ml);return Pt(Wc,Il),[fu,ft(Wc)]}}}function Ga(fa,Oa){var Aa=hn?gr:n-gr,na=0;return fa<-Aa?na|=1:fa>Aa&&(na|=2),Oa<-Aa?na|=4:Oa>Aa&&(na|=8),na}return on(aa,xa,gi,hn?[0,-gr]:[-n,gr-n])}function En(gr,Ur,wn,hn,Zn,gi){var aa=gr[0],xa=gr[1],Ra=Ur[0],Ga=Ur[1],fa=0,Oa=1,Aa=Ra-aa,na=Ga-xa,ao;if(ao=wn-aa,!(!Aa&&ao>0)){if(ao/=Aa,Aa<0){if(ao0){if(ao>Oa)return;ao>fa&&(fa=ao)}if(ao=Zn-aa,!(!Aa&&ao<0)){if(ao/=Aa,Aa<0){if(ao>Oa)return;ao>fa&&(fa=ao)}else if(Aa>0){if(ao0)){if(ao/=na,na<0){if(ao0){if(ao>Oa)return;ao>fa&&(fa=ao)}if(ao=gi-xa,!(!na&&ao<0)){if(ao/=na,na<0){if(ao>Oa)return;ao>fa&&(fa=ao)}else if(na>0){if(ao0&&(gr[0]=aa+fa*Aa,gr[1]=xa+fa*na),Oa<1&&(Ur[0]=aa+Oa*Aa,Ur[1]=xa+Oa*na),!0}}}}}var Yn=1e9,La=-Yn;function qi(gr,Ur,wn,hn){function Zn(Ga,fa){return gr<=Ga&&Ga<=wn&&Ur<=fa&&fa<=hn}function gi(Ga,fa,Oa,Aa){var na=0,ao=0;if(Ga==null||(na=aa(Ga,Oa))!==(ao=aa(fa,Oa))||Ra(Ga,fa)<0^Oa>0)do Aa.point(na===0||na===3?gr:wn,na>1?hn:Ur);while((na=(na+Oa+4)%4)!==ao);else Aa.point(fa[0],fa[1])}function aa(Ga,fa){return y(Ga[0]-gr)0?0:3:y(Ga[0]-wn)0?2:1:y(Ga[1]-Ur)0?1:0:fa>0?3:2}function xa(Ga,fa){return Ra(Ga.x,fa.x)}function Ra(Ga,fa){var Oa=aa(Ga,1),Aa=aa(fa,1);return Oa!==Aa?Oa-Aa:Oa===0?fa[1]-Ga[1]:Oa===1?Ga[0]-fa[0]:Oa===2?Ga[1]-fa[1]:fa[0]-Ga[0]}return function(Ga){var fa=Ga,Oa=Oe(),Aa,na,ao,is,Xo,ls,ps,so,$a,gs,el,Il={point:su,lineStart:qu,lineEnd:zu,polygonStart:lu,polygonEnd:ml};function su(Oo,Es){Zn(Oo,Es)&&fa.point(Oo,Es)}function $l(){for(var Oo=0,Es=0,Kl=na.length;Eshn&&(Oh-zh)*(hn-Wc)>(Fu-Wc)*(gr-zh)&&++Oo:Fu<=hn&&(Oh-zh)*(hn-Wc)<(Fu-Wc)*(gr-zh)&&--Oo;return Oo}function lu(){fa=Oa,Aa=[],na=[],el=!0}function ml(){var Oo=$l(),Es=el&&Oo,Kl=(Aa=g.merge(Aa)).length;(Es||Kl)&&(Ga.polygonStart(),Es&&(Ga.lineStart(),gi(null,null,1,Ga),Ga.lineEnd()),Kl&&$r(Aa,xa,Oo,gi,Ga),Ga.polygonEnd()),fa=Ga,Aa=na=ao=null}function qu(){Il.point=fu,na&&na.push(ao=[]),gs=!0,$a=!1,ps=so=NaN}function zu(){Aa&&(fu(is,Xo),ls&&$a&&Oa.rejoin(),Aa.push(Oa.result())),Il.point=su,$a&&fa.lineEnd()}function fu(Oo,Es){var Kl=Zn(Oo,Es);if(na&&ao.push([Oo,Es]),gs)is=Oo,Xo=Es,ls=Kl,gs=!1,Kl&&(fa.lineStart(),fa.point(Oo,Es));else if(Kl&&$a)fa.point(Oo,Es);else{var Rl=[ps=Math.max(La,Math.min(Yn,ps)),so=Math.max(La,Math.min(Yn,so))],vc=[Oo=Math.max(La,Math.min(Yn,Oo)),Es=Math.max(La,Math.min(Yn,Es))];En(Rl,vc,gr,Ur,wn,hn)?($a||(fa.lineStart(),fa.point(Rl[0],Rl[1])),fa.point(vc[0],vc[1]),Kl||fa.lineEnd(),el=!1):Kl&&(fa.lineStart(),fa.point(Oo,Es),el=!1)}ps=Oo,so=Es,$a=Kl}return Il}}function Qa(){var gr=0,Ur=0,wn=960,hn=500,Zn,gi,aa;return aa={stream:function(xa){return Zn&&gi===xa?Zn:Zn=qi(gr,Ur,wn,hn)(gi=xa)},extent:function(xa){return arguments.length?(gr=+xa[0][0],Ur=+xa[0][1],wn=+xa[1][0],hn=+xa[1][1],Zn=gi=null,aa):[[gr,Ur],[wn,hn]]}}}var Ja=I(),Do,yo,Bo,Da={sphere:O,point:O,lineStart:ys,lineEnd:O,polygonStart:O,polygonEnd:O};function ys(){Da.point=ul,Da.lineEnd=os}function os(){Da.point=Da.lineEnd=O}function ul(gr,Ur){gr*=x,Ur*=x,Do=gr,yo=C(Ur),Bo=u(Ur),Da.point=Go}function Go(gr,Ur){gr*=x,Ur*=x;var wn=C(Ur),hn=u(Ur),Zn=y(gr-Do),gi=u(Zn),aa=C(Zn),xa=hn*aa,Ra=Bo*wn-yo*hn*gi,Ga=yo*wn+Bo*hn*gi;Ja.add(T(h(xa*xa+Ra*Ra),Ga)),Do=gr,yo=wn,Bo=hn}function Ks(gr){return Ja.reset(),W(gr,Da),+Ja}var ss=[null,null],cl={type:"LineString",coordinates:ss};function Qs(gr,Ur){return ss[0]=gr,ss[1]=Ur,Ks(cl)}var jl={Feature:function(gr,Ur){return Ps(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,Zn=wn.length;++hn0&&(Zn=Qs(gr[gi],gr[gi-1]),Zn>0&&wn<=Zn&&hn<=Zn&&(wn+hn-Zn)*(1-Math.pow((wn-hn)/Zn,2))r}).map(Aa)).concat(g.range(b(gi/Ga)*Ga,Zn,Ga).filter(function(so){return y(so%Oa)>r}).map(na))}return ls.lines=function(){return ps().map(function(so){return{type:"LineString",coordinates:so}})},ls.outline=function(){return{type:"Polygon",coordinates:[ao(hn).concat(is(aa).slice(1),ao(wn).reverse().slice(1),is(xa).reverse().slice(1))]}},ls.extent=function(so){return arguments.length?ls.extentMajor(so).extentMinor(so):ls.extentMinor()},ls.extentMajor=function(so){return arguments.length?(hn=+so[0][0],wn=+so[1][0],xa=+so[0][1],aa=+so[1][1],hn>wn&&(so=hn,hn=wn,wn=so),xa>aa&&(so=xa,xa=aa,aa=so),ls.precision(Xo)):[[hn,xa],[wn,aa]]},ls.extentMinor=function(so){return arguments.length?(Ur=+so[0][0],gr=+so[1][0],gi=+so[0][1],Zn=+so[1][1],Ur>gr&&(so=Ur,Ur=gr,gr=so),gi>Zn&&(so=gi,gi=Zn,Zn=so),ls.precision(Xo)):[[Ur,gi],[gr,Zn]]},ls.step=function(so){return arguments.length?ls.stepMajor(so).stepMinor(so):ls.stepMinor()},ls.stepMajor=function(so){return arguments.length?(fa=+so[0],Oa=+so[1],ls):[fa,Oa]},ls.stepMinor=function(so){return arguments.length?(Ra=+so[0],Ga=+so[1],ls):[Ra,Ga]},ls.precision=function(so){return arguments.length?(Xo=+so,Aa=Pa(gi,Zn,90),na=fo(Ur,gr,Xo),ao=Pa(xa,aa,90),is=fo(hn,wn,Xo),ls):Xo},ls.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Ql(){return qs()()}function Jo(gr,Ur){var wn=gr[0]*x,hn=gr[1]*x,Zn=Ur[0]*x,gi=Ur[1]*x,aa=u(hn),xa=C(hn),Ra=u(gi),Ga=C(gi),fa=aa*u(wn),Oa=aa*C(wn),Aa=Ra*u(Zn),na=Ra*C(Zn),ao=2*w(h(B(gi-hn)+aa*Ra*B(Zn-wn))),is=C(ao),Xo=ao?function(ls){var ps=C(ls*=ao)/is,so=C(ao-ls)/is,$a=so*fa+ps*Aa,gs=so*Oa+ps*na,el=so*xa+ps*Ga;return[T(gs,$a)*f,T(el,h($a*$a+gs*gs))*f]}:function(){return[wn*f,hn*f]};return Xo.distance=ao,Xo}function Gl(gr){return gr}var al=I(),Ll=I(),Ru,uo,Ms,Is,ou={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ou.lineStart=hl,ou.lineEnd=Gu},polygonEnd:function(){ou.lineStart=ou.lineEnd=ou.point=O,al.add(y(Ll)),Ll.reset()},result:function(){var gr=al/2;return al.reset(),gr}};function hl(){ou.point=es}function es(gr,Ur){ou.point=Cu,Ru=Ms=gr,uo=Is=Ur}function Cu(gr,Ur){Ll.add(Is*gr-Ms*Ur),Ms=gr,Is=Ur}function Gu(){Cu(Ru,uo)}var bl=1/0,Fl=bl,tu=-bl,nu=tu,ac={point:gh,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var gr=[[bl,Fl],[tu,nu]];return tu=nu=-(Fl=bl=1/0),gr}};function gh(gr,Ur){grtu&&(tu=gr),Urnu&&(nu=Ur)}var Jc=0,oh=0,jf=0,Sf=0,Bl=0,Rc=0,Uf=0,hc=0,oc=0,fc,sh,cu,sc,rl={point:Yl,lineStart:Eh,lineEnd:bu,polygonStart:function(){rl.lineStart=Ed,rl.lineEnd=tl},polygonEnd:function(){rl.point=Yl,rl.lineStart=Eh,rl.lineEnd=bu},result:function(){var gr=oc?[Uf/oc,hc/oc]:Rc?[Sf/Rc,Bl/Rc]:jf?[Jc/jf,oh/jf]:[NaN,NaN];return Jc=oh=jf=Sf=Bl=Rc=Uf=hc=oc=0,gr}};function Yl(gr,Ur){Jc+=gr,oh+=Ur,++jf}function Eh(){rl.point=Lc}function Lc(gr,Ur){rl.point=Vh,Yl(cu=gr,sc=Ur)}function Vh(gr,Ur){var wn=gr-cu,hn=Ur-sc,Zn=h(wn*wn+hn*hn);Sf+=Zn*(cu+gr)/2,Bl+=Zn*(sc+Ur)/2,Rc+=Zn,Yl(cu=gr,sc=Ur)}function bu(){rl.point=Yl}function Ed(){rl.point=Vd}function tl(){Pl(fc,sh)}function Vd(gr,Ur){rl.point=Pl,Yl(fc=cu=gr,sh=sc=Ur)}function Pl(gr,Ur){var wn=gr-cu,hn=Ur-sc,Zn=h(wn*wn+hn*hn);Sf+=Zn*(cu+gr)/2,Bl+=Zn*(sc+Ur)/2,Rc+=Zn,Zn=sc*gr-cu*Ur,Uf+=Zn*(cu+gr),hc+=Zn*(sc+Ur),oc+=Zn*3,Yl(cu=gr,sc=Ur)}function ts(gr){this._context=gr}ts.prototype={_radius:4.5,pointRadius:function(gr){return this._radius=gr,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(gr,Ur){switch(this._point){case 0:{this._context.moveTo(gr,Ur),this._point=1;break}case 1:{this._context.lineTo(gr,Ur);break}default:{this._context.moveTo(gr+this._radius,Ur),this._context.arc(gr,Ur,this._radius,0,l);break}}},result:O};var lf=I(),lh,rc,Vf,Hh,yf,lc={point:O,lineStart:function(){lc.point=hd},lineEnd:function(){lh&&Gf(rc,Vf),lc.point=O},polygonStart:function(){lh=!0},polygonEnd:function(){lh=null},result:function(){var gr=+lf;return lf.reset(),gr}};function hd(gr,Ur){lc.point=Gf,rc=Hh=gr,Vf=yf=Ur}function Gf(gr,Ur){Hh-=gr,yf-=Ur,lf.add(h(Hh*Hh+yf*yf)),Hh=gr,yf=Ur}function xf(){this._string=[]}xf.prototype={_radius:4.5,_circle:Wh(4.5),pointRadius:function(gr){return(gr=+gr)!==this._radius&&(this._radius=gr,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(gr,Ur){switch(this._point){case 0:{this._string.push("M",gr,",",Ur),this._point=1;break}case 1:{this._string.push("L",gr,",",Ur);break}default:{this._circle==null&&(this._circle=Wh(this._radius)),this._string.push("M",gr,",",Ur,this._circle);break}}},result:function(){if(this._string.length){var gr=this._string.join("");return this._string=[],gr}else return null}};function Wh(gr){return"m0,"+gr+"a"+gr+","+gr+" 0 1,1 0,"+-2*gr+"a"+gr+","+gr+" 0 1,1 0,"+2*gr+"z"}function Hf(gr,Ur){var wn=4.5,hn,Zn;function gi(aa){return aa&&(typeof wn=="function"&&Zn.pointRadius(+wn.apply(this,arguments)),W(aa,hn(Zn))),Zn.result()}return gi.area=function(aa){return W(aa,hn(ou)),ou.result()},gi.measure=function(aa){return W(aa,hn(lc)),lc.result()},gi.bounds=function(aa){return W(aa,hn(ac)),ac.result()},gi.centroid=function(aa){return W(aa,hn(rl)),rl.result()},gi.projection=function(aa){return arguments.length?(hn=aa==null?(gr=null,Gl):(gr=aa).stream,gi):gr},gi.context=function(aa){return arguments.length?(Zn=aa==null?(Ur=null,new xf):new ts(Ur=aa),typeof wn!="function"&&Zn.pointRadius(wn),gi):Ur},gi.pointRadius=function(aa){return arguments.length?(wn=typeof aa=="function"?aa:(Zn.pointRadius(+aa),+aa),gi):wn},gi.projection(gr).context(Ur)}function Wf(gr){return{stream:uh(gr)}}function uh(gr){return function(Ur){var wn=new Yf;for(var hn in gr)wn[hn]=gr[hn];return wn.stream=Ur,wn}}function Yf(){}Yf.prototype={constructor:Yf,point:function(gr,Ur){this.stream.point(gr,Ur)},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 Ch(gr,Ur,wn){var hn=gr.clipExtent&&gr.clipExtent();return gr.scale(150).translate([0,0]),hn!=null&&gr.clipExtent(null),W(wn,gr.stream(ac)),Ur(ac.result()),hn!=null&&gr.clipExtent(hn),gr}function vh(gr,Ur,wn){return Ch(gr,function(hn){var Zn=Ur[1][0]-Ur[0][0],gi=Ur[1][1]-Ur[0][1],aa=Math.min(Zn/(hn[1][0]-hn[0][0]),gi/(hn[1][1]-hn[0][1])),xa=+Ur[0][0]+(Zn-aa*(hn[1][0]+hn[0][0]))/2,Ra=+Ur[0][1]+(gi-aa*(hn[1][1]+hn[0][1]))/2;gr.scale(150*aa).translate([xa,Ra])},wn)}function uc(gr,Ur,wn){return vh(gr,[[0,0],Ur],wn)}function rf(gr,Ur,wn){return Ch(gr,function(hn){var Zn=+Ur,gi=Zn/(hn[1][0]-hn[0][0]),aa=(Zn-gi*(hn[1][0]+hn[0][0]))/2,xa=-gi*hn[0][1];gr.scale(150*gi).translate([aa,xa])},wn)}function qf(gr,Ur,wn){return Ch(gr,function(hn){var Zn=+Ur,gi=Zn/(hn[1][1]-hn[0][1]),aa=-gi*hn[0][0],xa=(Zn-gi*(hn[1][1]+hn[0][1]))/2;gr.scale(150*gi).translate([aa,xa])},wn)}var eu=16,Ef=u(30*x);function Cd(gr,Ur){return+Ur?_f(gr,Ur):Kf(gr)}function Kf(gr){return uh({point:function(Ur,wn){Ur=gr(Ur,wn),this.stream.point(Ur[0],Ur[1])}})}function _f(gr,Ur){function wn(hn,Zn,gi,aa,xa,Ra,Ga,fa,Oa,Aa,na,ao,is,Xo){var ls=Ga-hn,ps=fa-Zn,so=ls*ls+ps*ps;if(so>4*Ur&&is--){var $a=aa+Aa,gs=xa+na,el=Ra+ao,Il=h($a*$a+gs*gs+el*el),su=w(el/=Il),$l=y(y(el)-1)Ur||y((ls*zu+ps*fu)/so-.5)>.3||aa*Aa+xa*na+Ra*ao2?Oo[2]%360*x:0,zu()):[xa*f,Ra*f,Ga*f]},ml.angle=function(Oo){return arguments.length?(Oa=Oo%360*x,zu()):Oa*f},ml.reflectX=function(Oo){return arguments.length?(Aa=Oo?-1:1,zu()):Aa<0},ml.reflectY=function(Oo){return arguments.length?(na=Oo?-1:1,zu()):na<0},ml.precision=function(Oo){return arguments.length?(el=Cd(Il,gs=Oo*Oo),fu()):h(gs)},ml.fitExtent=function(Oo,Es){return vh(ml,Oo,Es)},ml.fitSize=function(Oo,Es){return uc(ml,Oo,Es)},ml.fitWidth=function(Oo,Es){return rf(ml,Oo,Es)},ml.fitHeight=function(Oo,Es){return qf(ml,Oo,Es)};function zu(){var Oo=Du(wn,0,0,Aa,na,Oa).apply(null,Ur(gi,aa)),Es=(Oa?Du:Jf)(wn,hn-Oo[0],Zn-Oo[1],Aa,na,Oa);return fa=mi(xa,Ra,Ga),Il=Tn(Ur,Es),su=Tn(fa,Il),el=Cd(Il,gs),fu()}function fu(){return $l=lu=null,ml}return function(){return Ur=gr.apply(this,arguments),ml.invert=Ur.invert&&qu,zu()}}function hu(gr){var Ur=0,wn=n/3,hn=qh(gr),Zn=hn(Ur,wn);return Zn.parallels=function(gi){return arguments.length?hn(Ur=gi[0]*x,wn=gi[1]*x):[Ur*f,wn*f]},Zn}function Lh(gr){var Ur=u(gr);function wn(hn,Zn){return[hn*Ur,C(Zn)/Ur]}return wn.invert=function(hn,Zn){return[hn/Ur,w(Zn*Ur)]},wn}function Mc(gr,Ur){var wn=C(gr),hn=(wn+C(Ur))/2;if(y(hn)=.12&&Xo<.234&&is>=-.425&&is<-.214?Zn:Xo>=.166&&Xo<.234&&is>=-.214&&is<-.115?aa:wn).invert(Aa)},fa.stream=function(Aa){return gr&&Ur===Aa?gr:gr=uf([wn.stream(Ur=Aa),Zn.stream(Aa),aa.stream(Aa)])},fa.precision=function(Aa){return arguments.length?(wn.precision(Aa),Zn.precision(Aa),aa.precision(Aa),Oa()):wn.precision()},fa.scale=function(Aa){return arguments.length?(wn.scale(Aa),Zn.scale(Aa*.35),aa.scale(Aa),fa.translate(wn.translate())):wn.scale()},fa.translate=function(Aa){if(!arguments.length)return wn.translate();var na=wn.scale(),ao=+Aa[0],is=+Aa[1];return hn=wn.translate(Aa).clipExtent([[ao-.455*na,is-.238*na],[ao+.455*na,is+.238*na]]).stream(Ga),gi=Zn.translate([ao-.307*na,is+.201*na]).clipExtent([[ao-.425*na+r,is+.12*na+r],[ao-.214*na-r,is+.234*na-r]]).stream(Ga),xa=aa.translate([ao-.205*na,is+.212*na]).clipExtent([[ao-.214*na+r,is+.166*na+r],[ao-.115*na-r,is+.234*na-r]]).stream(Ga),Oa()},fa.fitExtent=function(Aa,na){return vh(fa,Aa,na)},fa.fitSize=function(Aa,na){return uc(fa,Aa,na)},fa.fitWidth=function(Aa,na){return rf(fa,Aa,na)},fa.fitHeight=function(Aa,na){return qf(fa,Aa,na)};function Oa(){return gr=Ur=null,fa}return fa.scale(1070)}function $h(gr){return function(Ur,wn){var hn=u(Ur),Zn=u(wn),gi=gr(hn*Zn);return[gi*Zn*C(Ur),gi*C(wn)]}}function Cf(gr){return function(Ur,wn){var hn=h(Ur*Ur+wn*wn),Zn=gr(hn),gi=C(Zn),aa=u(Zn);return[T(Ur*gi,hn*aa),w(hn&&wn*gi/hn)]}}var Ld=$h(function(gr){return h(2/(1+gr))});Ld.invert=Cf(function(gr){return 2*w(gr/2)});function Jd(){return jc(Ld).scale(124.75).clipAngle(180-.001)}var cf=$h(function(gr){return(gr=k(gr))&&gr/C(gr)});cf.invert=Cf(function(gr){return gr});function Lf(){return jc(cf).scale(79.4188).clipAngle(180-.001)}function wc(gr,Ur){return[gr,P(p((o+Ur)/2))]}wc.invert=function(gr,Ur){return[gr,2*v(_(Ur))-o]};function hf(){return Qc(wc).scale(961/l)}function Qc(gr){var Ur=jc(gr),wn=Ur.center,hn=Ur.scale,Zn=Ur.translate,gi=Ur.clipExtent,aa=null,xa,Ra,Ga;Ur.scale=function(Oa){return arguments.length?(hn(Oa),fa()):hn()},Ur.translate=function(Oa){return arguments.length?(Zn(Oa),fa()):Zn()},Ur.center=function(Oa){return arguments.length?(wn(Oa),fa()):wn()},Ur.clipExtent=function(Oa){return arguments.length?(Oa==null?aa=xa=Ra=Ga=null:(aa=+Oa[0][0],xa=+Oa[0][1],Ra=+Oa[1][0],Ga=+Oa[1][1]),fa()):aa==null?null:[[aa,xa],[Ra,Ga]]};function fa(){var Oa=n*hn(),Aa=Ur(Ji(Ur.rotate()).invert([0,0]));return gi(aa==null?[[Aa[0]-Oa,Aa[1]-Oa],[Aa[0]+Oa,Aa[1]+Oa]]:gr===wc?[[Math.max(Aa[0]-Oa,aa),xa],[Math.min(Aa[0]+Oa,Ra),Ga]]:[[aa,Math.max(Aa[1]-Oa,xa)],[Ra,Math.min(Aa[1]+Oa,Ga)]])}return fa()}function ff(gr){return p((o+gr)/2)}function Pf(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):P(wn/u(Ur))/P(ff(Ur)/ff(gr)),Zn=wn*M(ff(gr),hn)/hn;if(!hn)return wc;function gi(aa,xa){Zn>0?xa<-o+r&&(xa=-o+r):xa>o-r&&(xa=o-r);var Ra=Zn/M(ff(xa),hn);return[Ra*C(hn*aa),Zn-Ra*u(hn*aa)]}return gi.invert=function(aa,xa){var Ra=Zn-xa,Ga=A(hn)*h(aa*aa+Ra*Ra),fa=T(aa,y(Ra))*A(Ra);return Ra*hn<0&&(fa-=n*A(aa)*A(Ra)),[fa/hn,2*v(M(Zn/Ga,1/hn))-o]},gi}function xh(){return hu(Pf).scale(109.5).parallels([30,30])}function ku(gr,Ur){return[gr,Ur]}ku.invert=ku;function Ph(){return jc(ku).scale(152.63)}function Vc(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):(wn-u(Ur))/(Ur-gr),Zn=wn/hn+gr;if(y(hn)r&&--hn>0);return[gr/(.8707+(gi=wn*wn)*(-.131979+gi*(-.013791+gi*gi*gi*(.003971-.001529*gi)))),wn]};function _h(){return jc(Ih).scale(175.295)}function Nu(gr,Ur){return[u(Ur)*C(gr),C(Ur)]}Nu.invert=Cf(w);function iu(){return jc(Nu).scale(249.5).clipAngle(90+r)}function bh(gr,Ur){var wn=u(Ur),hn=1+u(gr)*wn;return[wn*C(gr)/hn,C(Ur)/hn]}bh.invert=Cf(function(gr){return 2*v(gr)});function df(){return jc(bh).scale(250).clipAngle(142)}function wh(gr,Ur){return[P(p((o+Ur)/2)),-gr]}wh.invert=function(gr,Ur){return[-Ur,2*v(_(gr))-o]};function $f(){var gr=Qc(wh),Ur=gr.center,wn=gr.rotate;return gr.center=function(hn){return arguments.length?Ur([-hn[1],hn[0]]):(hn=Ur(),[hn[1],-hn[0]])},gr.rotate=function(hn){return arguments.length?wn([hn[0],hn[1],hn.length>2?hn[2]+90:90]):(hn=wn(),[hn[0],hn[1],hn[2]-90])},wn([0,0,90]).scale(159.155)}c.geoAlbers=wu,c.geoAlbersUsa=yh,c.geoArea=K,c.geoAzimuthalEqualArea=Jd,c.geoAzimuthalEqualAreaRaw=Ld,c.geoAzimuthalEquidistant=Lf,c.geoAzimuthalEquidistantRaw=cf,c.geoBounds=Gt,c.geoCentroid=tn,c.geoCircle=qa,c.geoClipAntimeridian=Hr,c.geoClipCircle=Pn,c.geoClipExtent=Qa,c.geoClipRectangle=qi,c.geoConicConformal=xh,c.geoConicConformalRaw=Pf,c.geoConicEqualArea=Uc,c.geoConicEqualAreaRaw=Mc,c.geoConicEquidistant=fd,c.geoConicEquidistantRaw=Vc,c.geoContains=Us,c.geoDistance=Qs,c.geoEqualEarth=Pd,c.geoEqualEarthRaw=wf,c.geoEquirectangular=Ph,c.geoEquirectangularRaw=ku,c.geoGnomonic=Qf,c.geoGnomonicRaw=gc,c.geoGraticule=qs,c.geoGraticule10=Ql,c.geoIdentity=eh,c.geoInterpolate=Jo,c.geoLength=Ks,c.geoMercator=hf,c.geoMercatorRaw=wc,c.geoNaturalEarth1=_h,c.geoNaturalEarth1Raw=Ih,c.geoOrthographic=iu,c.geoOrthographicRaw=Nu,c.geoPath=Hf,c.geoProjection=jc,c.geoProjectionMutator=qh,c.geoRotation=Ji,c.geoStereographic=df,c.geoStereographicRaw=bh,c.geoStream=W,c.geoTransform=Wf,c.geoTransverseMercator=$f,c.geoTransverseMercatorRaw=wh,Object.defineProperty(c,"__esModule",{value:!0})})}),dV=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,zS(),T3()):g(c.d3=c.d3||{},c.d3,c.d3)})(Q,function(c,g,I){var S=Math.abs,t=Math.atan,e=Math.atan2,r=Math.cos,a=Math.exp,n=Math.floor,o=Math.log,i=Math.max,l=Math.min,f=Math.pow,x=Math.round,y=Math.sign||function(Xt){return Xt>0?1:Xt<0?-1:0},v=Math.sin,T=Math.tan,u=1e-6,b=1e-12,_=Math.PI,P=_/2,M=_/4,C=Math.SQRT1_2,A=V(2),h=V(_),p=_*2,k=180/_,w=_/180;function B(Xt){return Xt?Xt/Math.sin(Xt):1}function O(Xt){return Xt>1?P:Xt<-1?-P:Math.asin(Xt)}function j(Xt){return Xt>1?0:Xt<-1?_:Math.acos(Xt)}function V(Xt){return Xt>0?Math.sqrt(Xt):0}function H(Xt){return Xt=a(2*Xt),(Xt-1)/(Xt+1)}function F(Xt){return(a(Xt)-a(-Xt))/2}function U(Xt){return(a(Xt)+a(-Xt))/2}function W(Xt){return o(Xt+V(Xt*Xt+1))}function q(Xt){return o(Xt+V(Xt*Xt-1))}function J(Xt){var ae=T(Xt/2),_e=2*o(r(Xt/2))/(ae*ae);function Me(je,De){var $e=r(je),wr=r(De),Or=v(De),Nr=wr*$e,en=-((1-Nr?o((1+Nr)/2)/(1-Nr):-.5)+_e/(1+Nr));return[en*wr*v(je),en*Or]}return Me.invert=function(je,De){var $e=V(je*je+De*De),wr=-Xt/2,Or=50,Nr;if(!$e)return[0,0];do{var en=wr/2,vn=r(en),In=v(en),jn=In/vn,si=-o(S(vn));wr-=Nr=(2/jn*si-_e*jn-$e)/(-si/(In*In)+1-_e/(2*vn*vn))*(vn<0?.7:1)}while(S(Nr)>u&&--Or>0);var Wi=v(wr);return[e(je*Wi,$e*r(wr)),O(De*Wi/$e)]},Me}function lt(){var Xt=P,ae=g.geoProjectionMutator(J),_e=ae(Xt);return _e.radius=function(Me){return arguments.length?ae(Xt=Me*w):Xt*k},_e.scale(179.976).clipAngle(147)}function yt(Xt,ae){var _e=r(ae),Me=B(j(_e*r(Xt/=2)));return[2*_e*v(Xt)*Me,v(ae)*Me]}yt.invert=function(Xt,ae){if(!(Xt*Xt+4*ae*ae>_*_+u)){var _e=Xt,Me=ae,je=25;do{var De=v(_e),$e=v(_e/2),wr=r(_e/2),Or=v(Me),Nr=r(Me),en=v(2*Me),vn=Or*Or,In=Nr*Nr,jn=$e*$e,si=1-In*wr*wr,Wi=si?j(Nr*wr)*V(ga=1/si):ga=0,ga,pa=2*Wi*Nr*$e-Xt,Ma=Wi*Or-ae,lo=ga*(In*jn+Wi*Nr*wr*vn),No=ga*(.5*De*en-Wi*2*Or*$e),So=ga*.25*(en*$e-Wi*Or*In*De),ds=ga*(vn*wr+Wi*jn*Nr),fl=No*So-ds*lo;if(!fl)break;var vl=(Ma*No-pa*ds)/fl,Ds=(pa*So-Ma*lo)/fl;_e-=vl,Me-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[_e,Me]}};function mt(){return g.geoProjection(yt).scale(152.63)}function st(Xt){var ae=v(Xt),_e=r(Xt),Me=Xt>=0?1:-1,je=T(Me*Xt),De=(1+ae-_e)/2;function $e(wr,Or){var Nr=r(Or),en=r(wr/=2);return[(1+Nr)*v(wr),(Me*Or>-e(en,je)-.001?0:-Me*10)+De+v(Or)*_e-(1+Nr)*ae*en]}return $e.invert=function(wr,Or){var Nr=0,en=0,vn=50;do{var In=r(Nr),jn=v(Nr),si=r(en),Wi=v(en),ga=1+si,pa=ga*jn-wr,Ma=De+Wi*_e-ga*ae*In-Or,lo=ga*In/2,No=-jn*Wi,So=ae*ga*jn/2,ds=_e*si+ae*In*Wi,fl=No*So-ds*lo,vl=(Ma*No-pa*ds)/fl/2,Ds=(pa*So-Ma*lo)/fl;S(Ds)>2&&(Ds/=2),Nr-=vl,en-=Ds}while((S(vl)>u||S(Ds)>u)&&--vn>0);return Me*en>-e(r(Nr),je)-.001?[Nr*2,en]:null},$e}function tt(){var Xt=20*w,ae=Xt>=0?1:-1,_e=T(ae*Xt),Me=g.geoProjectionMutator(st),je=Me(Xt),De=je.stream;return je.parallel=function($e){return arguments.length?(_e=T((ae=(Xt=$e*w)>=0?1:-1)*Xt),Me(Xt)):Xt*k},je.stream=function($e){var wr=je.rotate(),Or=De($e),Nr=(je.rotate([0,0]),De($e)),en=je.precision();return je.rotate(wr),Or.sphere=function(){Nr.polygonStart(),Nr.lineStart();for(var vn=ae*-180;ae*vn<180;vn+=ae*90)Nr.point(vn,ae*90);if(Xt)for(;ae*(vn-=3*ae*en)>=-180;)Nr.point(vn,ae*-e(r(vn*w/2),_e)*k);Nr.lineEnd(),Nr.polygonEnd()},Or},je.scale(218.695).center([0,28.0974])}function pt(Xt,ae){var _e=T(ae/2),Me=V(1-_e*_e),je=1+Me*r(Xt/=2),De=v(Xt)*Me/je,$e=_e/je,wr=De*De,Or=$e*$e;return[4/3*De*(3+wr-3*Or),4/3*$e*(3+3*wr-Or)]}pt.invert=function(Xt,ae){if(Xt*=3/8,ae*=3/8,!Xt&&S(ae)>1)return null;var _e=Xt*Xt,Me=ae*ae,je=1+_e+Me,De=V((je-V(je*je-4*ae*ae))/2),$e=O(De)/3,wr=De?q(S(ae/De))/3:W(S(Xt))/3,Or=r($e),Nr=U(wr),en=Nr*Nr-Or*Or;return[y(Xt)*2*e(F(wr)*Or,.25-en),y(ae)*2*e(Nr*v($e),.25+en)]};function rt(){return g.geoProjection(pt).scale(66.1603)}var at=V(8),vt=o(1+A);function it(Xt,ae){var _e=S(ae);return _eb&&--Me>0);return[Xt/(r(_e)*(at-1/v(_e))),y(ae)*_e]};function K(){return g.geoProjection(it).scale(112.314)}function ft(Xt){var ae=2*_/Xt;function _e(Me,je){var De=g.geoAzimuthalEquidistantRaw(Me,je);if(S(Me)>P){var $e=e(De[1],De[0]),wr=V(De[0]*De[0]+De[1]*De[1]),Or=ae*x(($e-P)/ae)+P,Nr=e(v($e-=Or),2-r($e));$e=Or+O(_/wr*v(Nr))-Nr,De[0]=wr*r($e),De[1]=wr*v($e)}return De}return _e.invert=function(Me,je){var De=V(Me*Me+je*je);if(De>P){var $e=e(je,Me),wr=ae*x(($e-P)/ae)+P,Or=$e>wr?-1:1,Nr=De*r(wr-$e),en=1/T(Or*j((Nr-_)/V(_*(_-2*Nr)+De*De)));$e=wr+2*t((en+Or*V(en*en-3))/3),Me=De*r($e),je=De*v($e)}return g.geoAzimuthalEquidistantRaw.invert(Me,je)},_e}function ut(){var Xt=5,ae=g.geoProjectionMutator(ft),_e=ae(Xt),Me=_e.stream,je=.01,De=-r(je*w),$e=v(je*w);return _e.lobes=function(wr){return arguments.length?ae(Xt=+wr):Xt},_e.stream=function(wr){var Or=_e.rotate(),Nr=Me(wr),en=(_e.rotate([0,0]),Me(wr));return _e.rotate(Or),Nr.sphere=function(){en.polygonStart(),en.lineStart();for(var vn=0,In=360/Xt,jn=2*_/Xt,si=90-180/Xt,Wi=P;vn0&&S(je)>u);return Me<0?NaN:_e}function Wt(Xt,ae,_e){return ae===void 0&&(ae=40),_e===void 0&&(_e=b),function(Me,je,De,$e){var wr,Or,Nr;De=De===void 0?0:+De,$e=$e===void 0?0:+$e;for(var en=0;enwr){De-=Or/=2,$e-=Nr/=2;continue}wr=si;var Wi=(De>0?-1:1)*_e,ga=($e>0?-1:1)*_e,pa=Xt(De+Wi,$e),Ma=Xt(De,$e+ga),lo=(pa[0]-vn[0])/Wi,No=(pa[1]-vn[1])/Wi,So=(Ma[0]-vn[0])/ga,ds=(Ma[1]-vn[1])/ga,fl=ds*lo-No*So,vl=(S(fl)<.5?.5:1)/fl;if(Or=(jn*So-In*ds)*vl,Nr=(In*No-jn*lo)*vl,De+=Or,$e+=Nr,S(Or)<_e&&S(Nr)<_e)break}return[De,$e]}}function Jt(){var Xt=kt(1.68,2),ae=1.4,_e=12;function Me(je,De){if(je+De<-ae){var $e=(je-De+1.6)*(je+De+ae)/8;je+=$e,De-=.8*$e*v(De+_/2)}var wr=Xt(je,De),Or=(1-r(je*De))/_e;return wr[1]<0&&(wr[0]*=1+Or),wr[1]>0&&(wr[1]*=1+Or/1.5*wr[0]*wr[0]),wr}return Me.invert=Wt(Me),Me}function ge(){return g.geoProjection(Jt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function fe(Xt,ae){var _e=Xt*v(ae),Me=30,je;do ae-=je=(ae+v(ae)-_e)/(1+r(ae));while(S(je)>u&&--Me>0);return ae/2}function pe(Xt,ae,_e){function Me(je,De){return[Xt*je*r(De=fe(_e,De)),ae*v(De)]}return Me.invert=function(je,De){return De=O(De/ae),[je/(Xt*r(De)),O((2*De+v(2*De))/_e)]},Me}var se=pe(A/P,A,_);function Tt(){return g.geoProjection(se).scale(169.529)}var Lt=2.00276,Mt=1.11072;function ee(Xt,ae){var _e=fe(_,ae);return[Lt*Xt/(1/r(ae)+Mt/r(_e)),(ae+A*v(_e))/Lt]}ee.invert=function(Xt,ae){var _e=Lt*ae,Me=ae<0?-M:M,je=25,De,$e;do $e=_e-A*v(Me),Me-=De=(v(2*Me)+2*Me-_*v($e))/(2*r(2*Me)+2+_*r($e)*A*r(Me));while(S(De)>u&&--je>0);return $e=_e-A*v(Me),[Xt*(1/r($e)+Mt/r(Me))/Lt,$e]};function ve(){return g.geoProjection(ee).scale(160.857)}function oe(Xt){var ae=0,_e=g.geoProjectionMutator(Xt),Me=_e(ae);return Me.parallel=function(je){return arguments.length?_e(ae=je*w):ae*k},Me}function Ae(Xt,ae){return[Xt*r(ae),ae]}Ae.invert=function(Xt,ae){return[Xt/r(ae),ae]};function He(){return g.geoProjection(Ae).scale(152.63)}function Ge(Xt){if(!Xt)return Ae;var ae=1/T(Xt);function _e(Me,je){var De=ae+Xt-je,$e=De&&Me*r(je)/De;return[De*v($e),ae-De*r($e)]}return _e.invert=function(Me,je){var De=V(Me*Me+(je=ae-je)*je),$e=ae+Xt-De;return[De/r($e)*e(Me,je),$e]},_e}function cr(){return oe(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function ur(Xt){function ae(_e,Me){var je=P-Me,De=je&&_e*Xt*v(je)/je;return[je*v(De)/Xt,P-je*r(De)]}return ae.invert=function(_e,Me){var je=_e*Xt,De=P-Me,$e=V(je*je+De*De),wr=e(je,De);return[($e?$e/v($e):1)*wr/Xt,P-$e]},ae}function jr(){var Xt=.5,ae=g.geoProjectionMutator(ur),_e=ae(Xt);return _e.fraction=function(Me){return arguments.length?ae(Xt=+Me):Xt},_e.scale(158.837)}var qr=pe(1,4/_,_);function br(){return g.geoProjection(qr).scale(152.63)}function Xr(Xt,ae,_e,Me,je,De){var $e=r(De),wr;if(S(Xt)>1||S(De)>1)wr=j(_e*je+ae*Me*$e);else{var Or=v(Xt/2),Nr=v(De/2);wr=2*O(V(Or*Or+ae*Me*Nr*Nr))}return S(wr)>u?[wr,e(Me*v(De),ae*je-_e*Me*$e)]:[0,0]}function nn(Xt,ae,_e){return j((Xt*Xt+ae*ae-_e*_e)/(2*Xt*ae))}function Le(Xt){return Xt-2*_*n((Xt+_)/(2*_))}function Gt(Xt,ae,_e){for(var Me=[[Xt[0],Xt[1],v(Xt[1]),r(Xt[1])],[ae[0],ae[1],v(ae[1]),r(ae[1])],[_e[0],_e[1],v(_e[1]),r(_e[1])]],je=Me[2],De,$e=0;$e<3;++$e,je=De)De=Me[$e],je.v=Xr(De[1]-je[1],je[3],je[2],De[3],De[2],De[0]-je[0]),je.point=[0,0];var wr=nn(Me[0].v[0],Me[2].v[0],Me[1].v[0]),Or=nn(Me[0].v[0],Me[1].v[0],Me[2].v[0]),Nr=_-wr;Me[2].point[1]=0,Me[0].point[0]=-(Me[1].point[0]=Me[0].v[0]/2);var en=[Me[2].point[0]=Me[0].point[0]+Me[2].v[0]*r(wr),2*(Me[0].point[1]=Me[1].point[1]=Me[2].v[0]*v(wr))];function vn(In,jn){var si=v(jn),Wi=r(jn),ga=new Array(3),pa;for(pa=0;pa<3;++pa){var Ma=Me[pa];if(ga[pa]=Xr(jn-Ma[1],Ma[3],Ma[2],Wi,si,In-Ma[0]),!ga[pa][0])return Ma.point;ga[pa][1]=Le(ga[pa][1]-Ma.v[1])}var lo=en.slice();for(pa=0;pa<3;++pa){var No=pa==2?0:pa+1,So=nn(Me[pa].v[0],ga[pa][0],ga[No][0]);ga[pa][1]<0&&(So=-So),pa?pa==1?(So=Or-So,lo[0]-=ga[pa][0]*r(So),lo[1]-=ga[pa][0]*v(So)):(So=Nr-So,lo[0]+=ga[pa][0]*r(So),lo[1]+=ga[pa][0]*v(So)):(lo[0]+=ga[pa][0]*r(So),lo[1]-=ga[pa][0]*v(So))}return lo[0]/=3,lo[1]/=3,lo}return vn}function ne(Xt){return Xt[0]*=w,Xt[1]*=w,Xt}function Ct(){return gt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function gt(Xt,ae,_e){var Me=g.geoCentroid({type:"MultiPoint",coordinates:[Xt,ae,_e]}),je=[-Me[0],-Me[1]],De=g.geoRotation(je),$e=Gt(ne(De(Xt)),ne(De(ae)),ne(De(_e)));$e.invert=Wt($e);var wr=g.geoProjection($e).rotate(je),Or=wr.center;return delete wr.rotate,wr.center=function(Nr){return arguments.length?Or(De(Nr)):De.invert(Or())},wr.clipAngle(90)}function St(Xt,ae){var _e=V(1-v(ae));return[2/h*Xt*_e,h*(1-_e)]}St.invert=function(Xt,ae){var _e=(_e=ae/h-1)*_e;return[_e>0?Xt*V(_/_e)/2:0,O(1-_e)]};function Nt(){return g.geoProjection(St).scale(95.6464).center([0,30])}function re(Xt){var ae=T(Xt);function _e(Me,je){return[Me,(Me?Me/v(Me):1)*(v(je)*r(Me)-ae*r(je))]}return _e.invert=ae?function(Me,je){Me&&(je*=v(Me)/Me);var De=r(Me);return[Me,2*e(V(De*De+ae*ae-je*je)-De,ae-je)]}:function(Me,je){return[Me,O(Me?je*T(Me)/Me:je)]},_e}function le(){return oe(re).scale(249.828).clipAngle(90)}var ke=V(3);function Ue(Xt,ae){return[ke*Xt*(2*r(2*ae/3)-1)/h,ke*h*v(ae/3)]}Ue.invert=function(Xt,ae){var _e=3*O(ae/(ke*h));return[h*Xt/(ke*(2*r(2*_e/3)-1)),_e]};function qe(){return g.geoProjection(Ue).scale(156.19)}function or(Xt){var ae=r(Xt);function _e(Me,je){return[Me*ae,v(je)/ae]}return _e.invert=function(Me,je){return[Me/ae,O(je*ae)]},_e}function Sr(){return oe(or).parallel(38.58).scale(195.044)}function Mr(Xt){var ae=r(Xt);function _e(Me,je){return[Me*ae,(1+ae)*T(je/2)]}return _e.invert=function(Me,je){return[Me/ae,t(je/(1+ae))*2]},_e}function mr(){return oe(Mr).scale(124.75)}function Qr(Xt,ae){var _e=V(8/(3*_));return[_e*Xt*(1-S(ae)/_),_e*ae]}Qr.invert=function(Xt,ae){var _e=V(8/(3*_)),Me=ae/_e;return[Xt/(_e*(1-S(Me)/_)),Me]};function Wn(){return g.geoProjection(Qr).scale(165.664)}function qn(Xt,ae){var _e=V(4-3*v(S(ae)));return[2/V(6*_)*Xt*_e,y(ae)*V(2*_/3)*(2-_e)]}qn.invert=function(Xt,ae){var _e=2-S(ae)/V(2*_/3);return[Xt*V(6*_)/(2*_e),y(ae)*O((4-_e*_e)/3)]};function ei(){return g.geoProjection(qn).scale(165.664)}function Di(Xt,ae){var _e=V(_*(4+_));return[2/_e*Xt*(1+V(1-4*ae*ae/(_*_))),4/_e*ae]}Di.invert=function(Xt,ae){var _e=V(_*(4+_))/2;return[Xt*_e/(1+V(1-ae*ae*(4+_)/(4*_))),ae*_e/2]};function ui(){return g.geoProjection(Di).scale(180.739)}function Gn(Xt,ae){var _e=(2+P)*v(ae);ae/=2;for(var Me=0,je=1/0;Me<10&&S(je)>u;Me++){var De=r(ae);ae-=je=(ae+v(ae)*(De+2)-_e)/(2*De*(1+De))}return[2/V(_*(4+_))*Xt*(1+r(ae)),2*V(_/(4+_))*v(ae)]}Gn.invert=function(Xt,ae){var _e=ae*V((4+_)/_)/2,Me=O(_e),je=r(Me);return[Xt/(2/V(_*(4+_))*(1+je)),O((Me+_e*(je+2))/(2+P))]};function ua(){return g.geoProjection(Gn).scale(180.739)}function Yi(Xt,ae){return[Xt*(1+r(ae))/V(2+_),2*ae/V(2+_)]}Yi.invert=function(Xt,ae){var _e=V(2+_),Me=ae*_e/2;return[_e*Xt/(1+r(Me)),Me]};function We(){return g.geoProjection(Yi).scale(173.044)}function nr(Xt,ae){for(var _e=(1+P)*v(ae),Me=0,je=1/0;Me<10&&S(je)>u;Me++)ae-=je=(ae+v(ae)-_e)/(1+r(ae));return _e=V(2+_),[Xt*(1+r(ae))/_e,2*ae/_e]}nr.invert=function(Xt,ae){var _e=1+P,Me=V(_e/2);return[Xt*2*Me/(1+r(ae*=Me)),O((ae+v(ae))/_e)]};function dr(){return g.geoProjection(nr).scale(173.044)}var _r=3+2*A;function tn(Xt,ae){var _e=v(Xt/=2),Me=r(Xt),je=V(r(ae)),De=r(ae/=2),$e=v(ae)/(De+A*Me*je),wr=V(2/(1+$e*$e)),Or=V((A*De+(Me+_e)*je)/(A*De+(Me-_e)*je));return[_r*(wr*(Or-1/Or)-2*o(Or)),_r*(wr*$e*(Or+1/Or)-2*t($e))]}tn.invert=function(Xt,ae){if(!(De=pt.invert(Xt/1.2,ae*1.065)))return null;var _e=De[0],Me=De[1],je=20,De;Xt/=_r,ae/=_r;do{var $e=_e/2,wr=Me/2,Or=v($e),Nr=r($e),en=v(wr),vn=r(wr),In=r(Me),jn=V(In),si=en/(vn+A*Nr*jn),Wi=si*si,ga=V(2/(1+Wi)),pa=A*vn+(Nr+Or)*jn,Ma=A*vn+(Nr-Or)*jn,lo=pa/Ma,No=V(lo),So=No-1/No,ds=No+1/No,fl=ga*So-2*o(No)-Xt,vl=ga*si*ds-2*t(si)-ae,Ds=en&&C*jn*Or*Wi/en,wl=(A*Nr*vn+jn)/(2*(vn+A*Nr*jn)*(vn+A*Nr*jn)*jn),Lu=-.5*si*ga*ga*ga,gu=Lu*Ds,$s=Lu*wl,Zs=(Zs=2*vn+A*jn*(Nr-Or))*Zs*No,Yu=(A*Nr*vn*jn+In)/Zs,dc=-(A*Or*en)/(jn*Zs),$c=So*gu-2*Yu/No+ga*(Yu+Yu/lo),At=So*$s-2*dc/No+ga*(dc+dc/lo),Ut=si*ds*gu-2*Ds/(1+Wi)+ga*ds*Ds+ga*si*(Yu-Yu/lo),ue=si*ds*$s-2*wl/(1+Wi)+ga*ds*wl+ga*si*(dc-dc/lo),Se=At*Ut-ue*$c;if(!Se)break;var Pe=(vl*At-fl*ue)/Se,Ne=(fl*Ut-vl*$c)/Se;_e-=Pe,Me=i(-P,l(P,Me-Ne))}while((S(Pe)>u||S(Ne)>u)&&--je>0);return S(S(Me)-P)Me){var vn=V(en),In=e(Nr,Or),jn=_e*x(In/_e),si=In-jn,Wi=Xt*r(si),ga=(Xt*v(si)-si*v(Wi))/(P-Wi),pa=ze(si,ga),Ma=(_-Xt)/Br(pa,Wi,_);Or=vn;var lo=50,No;do Or-=No=(Xt+Br(pa,Wi,Or)*Ma-vn)/(pa(Or)*Ma);while(S(No)>u&&--lo>0);Nr=si*v(Or),OrMe){var Or=V(wr),Nr=e($e,De),en=_e*x(Nr/_e),vn=Nr-en;De=Or*r(vn),$e=Or*v(vn);for(var In=De-P,jn=v(De),si=$e/jn,Wi=Deu||S(si)>u)&&--Wi>0);return[vn,In]},Or}var Rr=Gr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Yr(){return g.geoProjection(Rr).scale(149.995)}var mn=Gr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function on(){return g.geoProjection(mn).scale(153.93)}var Ce=Gr(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function pr(){return g.geoProjection(Ce).scale(130.945)}function Hr(Xt,ae){var _e=Xt*Xt,Me=ae*ae;return[Xt*(1-.162388*Me)*(.87-952426e-9*_e*_e),ae*(1+Me/12)]}Hr.invert=function(Xt,ae){var _e=Xt,Me=ae,je=50,De;do{var $e=Me*Me;Me-=De=(Me*(1+$e/12)-ae)/(1+$e/4)}while(S(De)>u&&--je>0);je=50,Xt/=1-.162388*$e;do{var wr=(wr=_e*_e)*wr;_e-=De=(_e*(.87-952426e-9*wr)-Xt)/(.87-.00476213*wr)}while(S(De)>u&&--je>0);return[_e,Me]};function _n(){return g.geoProjection(Hr).scale(131.747)}var Bn=Gr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ri(){return g.geoProjection(Bn).scale(131.087)}function Pn(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function _e(Me,je){var De=Me>0?-.5:.5,$e=Xt(Me+De*_,je);return $e[0]-=De*ae,$e}return Xt.invert&&(_e.invert=function(Me,je){var De=Me>0?-.5:.5,$e=Xt.invert(Me+De*ae,je),wr=$e[0]-De*_;return wr<-_?wr+=2*_:wr>_&&(wr-=2*_),$e[0]=wr,$e}),_e}function En(Xt,ae){var _e=y(Xt),Me=y(ae),je=r(ae),De=r(Xt)*je,$e=v(Xt)*je,wr=v(Me*ae);Xt=S(e($e,wr)),ae=O(De),S(Xt-P)>u&&(Xt%=P);var Or=Yn(Xt>_/4?P-Xt:Xt,ae);return Xt>_/4&&(wr=Or[0],Or[0]=-Or[1],Or[1]=-wr),Or[0]*=_e,Or[1]*=-Me,Or}En.invert=function(Xt,ae){S(Xt)>1&&(Xt=y(Xt)*2-Xt),S(ae)>1&&(ae=y(ae)*2-ae);var _e=y(Xt),Me=y(ae),je=-_e*Xt,De=-Me*ae,$e=De/je<1,wr=La($e?De:je,$e?je:De),Or=wr[0],Nr=wr[1],en=r(Nr);return $e&&(Or=-P-Or),[_e*(e(v(Or)*en,-v(Nr))+_),Me*O(r(Or)*en)]};function Yn(Xt,ae){if(ae===P)return[0,0];var _e=v(ae),Me=_e*_e,je=Me*Me,De=1+je,$e=1+3*je,wr=1-je,Or=O(1/V(De)),Nr=wr+Me*De*Or,en=(1-_e)/Nr,vn=V(en),In=en*De,jn=V(In),si=vn*wr,Wi,ga;if(Xt===0)return[0,-(si+Me*jn)];var pa=r(ae),Ma=1/pa,lo=2*_e*pa,No=(-3*Me+Or*$e)*lo,So=(-Nr*pa-(1-_e)*No)/(Nr*Nr),ds=.5*So/vn,fl=wr*ds-2*Me*vn*lo,vl=Me*De*So+en*$e*lo,Ds=-Ma*lo,wl=-Ma*vl,Lu=-2*Ma*fl,gu=4*Xt/_,$s;if(Xt>.222*_||ae<_/4&&Xt>.175*_){if(Wi=(si+Me*V(In*(1+je)-si*si))/(1+je),Xt>_/4)return[Wi,Wi];var Zs=Wi,Yu=.5*Wi;Wi=.5*(Yu+Zs),ga=50;do{var dc=V(In-Wi*Wi),$c=Wi*(Lu+Ds*dc)+wl*O(Wi/jn)-gu;if(!$c)break;$c<0?Yu=Wi:Zs=Wi,Wi=.5*(Yu+Zs)}while(S(Zs-Yu)>u&&--ga>0)}else{Wi=u,ga=25;do{var At=Wi*Wi,Ut=V(In-At),ue=Lu+Ds*Ut,Se=Wi*ue+wl*O(Wi/jn)-gu,Pe=ue+(wl-Ds*At)/Ut;Wi-=$s=Ut?Se/Pe:0}while(S($s)>u&&--ga>0)}return[Wi,-si-Me*V(In-Wi*Wi)]}function La(Xt,ae){for(var _e=0,Me=1,je=.5,De=50;;){var $e=je*je,wr=V(je),Or=O(1/V(1+$e)),Nr=1-$e+je*(1+$e)*Or,en=(1-wr)/Nr,vn=V(en),In=en*(1+$e),jn=vn*(1-$e),si=In-Xt*Xt,Wi=V(si),ga=ae+jn+je*Wi;if(S(Me-_e)0?_e=je:Me=je,je=.5*(_e+Me)}if(!De)return null;var pa=O(wr),Ma=r(pa),lo=1/Ma,No=2*wr*Ma,So=(-3*je+Or*(1+3*$e))*No,ds=(-Nr*Ma-(1-wr)*So)/(Nr*Nr),fl=.5*ds/vn,vl=(1-$e)*fl-2*je*vn*No,Ds=-2*lo*vl,wl=-lo*No,Lu=-lo*(je*(1+$e)*ds+en*(1+3*$e)*No);return[_/4*(Xt*(Ds+wl*Wi)+Lu*O(Xt/V(In))),pa]}function qi(){return g.geoProjection(Pn(En)).scale(239.75)}function Qa(Xt,ae,_e){var Me,je,De;return Xt?(Me=Ja(Xt,_e),ae?(je=Ja(ae,1-_e),De=je[1]*je[1]+_e*Me[0]*Me[0]*je[0]*je[0],[[Me[0]*je[2]/De,Me[1]*Me[2]*je[0]*je[1]/De],[Me[1]*je[1]/De,-Me[0]*Me[2]*je[0]*je[2]/De],[Me[2]*je[1]*je[2]/De,-_e*Me[0]*Me[1]*je[0]/De]]):[[Me[0],0],[Me[1],0],[Me[2],0]]):(je=Ja(ae,1-_e),[[0,je[0]/je[1]],[1/je[1],0],[je[2]/je[1],0]])}function Ja(Xt,ae){var _e,Me,je,De,$e;if(ae=1-u)return _e=(1-ae)/4,Me=U(Xt),De=H(Xt),je=1/Me,$e=Me*F(Xt),[De+_e*($e-Xt)/(Me*Me),je-_e*De*je*($e-Xt),je+_e*De*je*($e+Xt),2*t(a(Xt))-P+_e*($e-Xt)/Me];var wr=[1,0,0,0,0,0,0,0,0],Or=[V(ae),0,0,0,0,0,0,0,0],Nr=0;for(Me=V(1-ae),$e=1;S(Or[Nr]/wr[Nr])>u&&Nr<8;)_e=wr[Nr++],Or[Nr]=(_e-Me)/2,wr[Nr]=(_e+Me)/2,Me=V(_e*Me),$e*=2;je=$e*wr[Nr]*Xt;do De=Or[Nr]*v(Me=je)/wr[Nr],je=(O(De)+je)/2;while(--Nr);return[v(je),De=r(je),De/r(je-Me),je]}function Do(Xt,ae,_e){var Me=S(Xt),je=S(ae),De=F(je);if(Me){var $e=1/v(Me),wr=1/(T(Me)*T(Me)),Or=-(wr+_e*(De*De*$e*$e)-1+_e),Nr=(_e-1)*wr,en=(-Or+V(Or*Or-4*Nr))/2;return[yo(t(1/V(en)),_e)*y(Xt),yo(t(V((en/wr-1)/_e)),1-_e)*y(ae)]}return[0,yo(t(De),1-_e)*y(ae)]}function yo(Xt,ae){if(!ae)return Xt;if(ae===1)return o(T(Xt/2+M));for(var _e=1,Me=V(1-ae),je=V(ae),De=0;S(je)>u;De++){if(Xt%_){var $e=t(Me*T(Xt)/_e);$e<0&&($e+=_),Xt+=$e+~~(Xt/_)*_}else Xt+=Xt;je=(_e+Me)/2,Me=V(_e*Me),je=((_e=je)-Me)/2}return Xt/(f(2,De)*_e)}function Bo(Xt,ae){var _e=(A-1)/(A+1),Me=V(1-_e*_e),je=yo(P,Me*Me),De=-1,$e=o(T(_/4+S(ae)/2)),wr=a(De*$e)/V(_e),Or=Da(wr*r(De*Xt),wr*v(De*Xt)),Nr=Do(Or[0],Or[1],Me*Me);return[-Nr[1],(ae>=0?1:-1)*(.5*je-Nr[0])]}function Da(Xt,ae){var _e=Xt*Xt,Me=ae+1,je=1-_e-ae*ae;return[.5*((Xt>=0?P:-P)-e(je,2*Xt)),-.25*o(je*je+4*_e)+.5*o(Me*Me+_e)]}function ys(Xt,ae){var _e=ae[0]*ae[0]+ae[1]*ae[1];return[(Xt[0]*ae[0]+Xt[1]*ae[1])/_e,(Xt[1]*ae[0]-Xt[0]*ae[1])/_e]}Bo.invert=function(Xt,ae){var _e=(A-1)/(A+1),Me=V(1-_e*_e),je=yo(P,Me*Me),De=-1,$e=Qa(.5*je-ae,-Xt,Me*Me),wr=ys($e[0],$e[1]),Or=e(wr[1],wr[0])/De;return[Or,2*t(a(.5/De*o(_e*wr[0]*wr[0]+_e*wr[1]*wr[1])))-P]};function os(){return g.geoProjection(Pn(Bo)).scale(151.496)}function ul(Xt){var ae=v(Xt),_e=r(Xt),Me=Go(Xt);Me.invert=Go(-Xt);function je(De,$e){var wr=Me(De,$e);De=wr[0],$e=wr[1];var Or=v($e),Nr=r($e),en=r(De),vn=j(ae*Or+_e*Nr*en),In=v(vn),jn=S(In)>u?vn/In:1;return[jn*_e*v(De),(S(De)>P?jn:-jn)*(ae*Nr-_e*Or*en)]}return je.invert=function(De,$e){var wr=V(De*De+$e*$e),Or=-v(wr),Nr=r(wr),en=wr*Nr,vn=-$e*Or,In=wr*ae,jn=V(en*en+vn*vn-In*In),si=e(en*In+vn*jn,vn*In-en*jn),Wi=(wr>P?-1:1)*e(De*Or,wr*r(si)*Nr+$e*v(si)*Or);return Me.invert(Wi,si)},je}function Go(Xt){var ae=v(Xt),_e=r(Xt);return function(Me,je){var De=r(je),$e=r(Me)*De,wr=v(Me)*De,Or=v(je);return[e(wr,$e*_e-Or*ae),O(Or*_e+$e*ae)]}}function Ks(){var Xt=0,ae=g.geoProjectionMutator(ul),_e=ae(Xt),Me=_e.rotate,je=_e.stream,De=g.geoCircle();return _e.parallel=function($e){if(!arguments.length)return Xt*k;var wr=_e.rotate();return ae(Xt=$e*w).rotate(wr)},_e.rotate=function($e){return arguments.length?(Me.call(_e,[$e[0],$e[1]-Xt*k]),De.center([-$e[0],-$e[1]]),_e):($e=Me.call(_e),$e[1]+=Xt*k,$e)},_e.stream=function($e){return $e=je($e),$e.sphere=function(){$e.polygonStart();var wr=.01,Or=De.radius(90-wr)().coordinates[0],Nr=Or.length-1,en=-1,vn;for($e.lineStart();++en=0;)$e.point((vn=Or[en])[0],vn[1]);$e.lineEnd(),$e.polygonEnd()},$e},_e.scale(79.4187).parallel(45).clipAngle(180-.001)}var ss=3,cl=O(1-1/ss)*k,Qs=or(0);function jl(Xt){var ae=cl*w,_e=St(_,ae)[0]-St(-_,ae)[0],Me=Qs(0,ae)[1],je=St(0,ae)[1],De=h-je,$e=p/Xt,wr=4/p,Or=Me+De*De*4/p;function Nr(en,vn){var In,jn=S(vn);if(jn>ae){var si=l(Xt-1,i(0,n((en+_)/$e)));en+=_*(Xt-1)/Xt-si*$e,In=St(en,jn),In[0]=In[0]*p/_e-p*(Xt-1)/(2*Xt)+si*p/Xt,In[1]=Me+(In[1]-je)*4*De/p,vn<0&&(In[1]=-In[1])}else In=Qs(en,vn);return In[0]*=wr,In[1]/=Or,In}return Nr.invert=function(en,vn){en/=wr,vn*=Or;var In=S(vn);if(In>Me){var jn=l(Xt-1,i(0,n((en+_)/$e)));en=(en+_*(Xt-1)/Xt-jn*$e)*_e/p;var si=St.invert(en,.25*(In-Me)*p/De+je);return si[0]-=_*(Xt-1)/Xt-jn*$e,vn<0&&(si[1]=-si[1]),si}return Qs.invert(en,vn)},Nr}function cs(Xt,ae){return[Xt,ae&1?90-u:cl]}function Ps(Xt,ae){return[Xt,ae&1?-90+u:-cl]}function Po(Xt){return[Xt[0]*(1-u),Xt[1]]}function As(Xt){var ae=[].concat(I.range(-180,180+Xt/2,Xt).map(cs),I.range(180,-180-Xt/2,-Xt).map(Ps));return{type:"Polygon",coordinates:[Xt===180?ae.map(Po):ae]}}function kl(){var Xt=4,ae=g.geoProjectionMutator(jl),_e=ae(Xt),Me=_e.stream;return _e.lobes=function(je){return arguments.length?ae(Xt=+je):Xt},_e.stream=function(je){var De=_e.rotate(),$e=Me(je),wr=(_e.rotate([0,0]),Me(je));return _e.rotate(De),$e.sphere=function(){g.geoStream(As(180/Xt),wr)},$e},_e.scale(239.75)}function ql(Xt){var ae=1+Xt,_e=v(1/ae),Me=O(_e),je=2*V(_/(De=_+4*Me*ae)),De,$e=.5*je*(ae+V(Xt*(2+Xt))),wr=Xt*Xt,Or=ae*ae;function Nr(en,vn){var In=1-v(vn),jn,si;if(In&&In<2){var Wi=P-vn,ga=25,pa;do{var Ma=v(Wi),lo=r(Wi),No=Me+e(Ma,ae-lo),So=1+Or-2*ae*lo;Wi-=pa=(Wi-wr*Me-ae*Ma+So*No-.5*In*De)/(2*ae*Ma*No)}while(S(pa)>b&&--ga>0);jn=je*V(So),si=en*No/_}else jn=je*(Xt+In),si=en*Me/_;return[jn*v(si),$e-jn*r(si)]}return Nr.invert=function(en,vn){var In=en*en+(vn-=$e)*vn,jn=(1+Or-In/(je*je))/(2*ae),si=j(jn),Wi=v(si),ga=Me+e(Wi,ae-jn);return[O(en/V(In))*_/ga,O(1-2*(si-wr*Me-ae*Wi+(1+Or-2*ae*jn)*ga)/De)]},Nr}function Jl(){var Xt=1,ae=g.geoProjectionMutator(ql),_e=ae(Xt);return _e.ratio=function(Me){return arguments.length?ae(Xt=+Me):Xt},_e.scale(167.774).center([0,18.67])}var Us=.7109889596207567,Pa=.0528035274542;function fo(Xt,ae){return ae>-Us?(Xt=se(Xt,ae),Xt[1]+=Pa,Xt):Ae(Xt,ae)}fo.invert=function(Xt,ae){return ae>-Us?se.invert(Xt,ae-Pa):Ae.invert(Xt,ae)};function qs(){return g.geoProjection(fo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ql(Xt,ae){return S(ae)>Us?(Xt=se(Xt,ae),Xt[1]-=ae>0?Pa:-Pa,Xt):Ae(Xt,ae)}Ql.invert=function(Xt,ae){return S(ae)>Us?se.invert(Xt,ae+(ae>0?Pa:-Pa)):Ae.invert(Xt,ae)};function Jo(){return g.geoProjection(Ql).scale(152.63)}function Gl(Xt,ae,_e,Me){var je=V(4*_/(2*_e+(1+Xt-ae/2)*v(2*_e)+(Xt+ae)/2*v(4*_e)+ae/2*v(6*_e))),De=V(Me*v(_e)*V((1+Xt*r(2*_e)+ae*r(4*_e))/(1+Xt+ae))),$e=_e*Or(1);function wr(vn){return V(1+Xt*r(2*vn)+ae*r(4*vn))}function Or(vn){var In=vn*_e;return(2*In+(1+Xt-ae/2)*v(2*In)+(Xt+ae)/2*v(4*In)+ae/2*v(6*In))/_e}function Nr(vn){return wr(vn)*v(vn)}var en=function(vn,In){var jn=_e*qt(Or,$e*v(In)/_e,In/_);isNaN(jn)&&(jn=_e*y(In));var si=je*wr(jn);return[si*De*vn/_*r(jn),si/De*v(jn)]};return en.invert=function(vn,In){var jn=qt(Nr,In*De/je);return[vn*_/(r(jn)*je*De*wr(jn)),O(_e*Or(jn/_e)/$e)]},_e===0&&(je=V(Me/_),en=function(vn,In){return[vn*je,v(In)/je]},en.invert=function(vn,In){return[vn/je,O(In*je)]}),en}function al(){var Xt=1,ae=0,_e=45*w,Me=2,je=g.geoProjectionMutator(Gl),De=je(Xt,ae,_e,Me);return De.a=function($e){return arguments.length?je(Xt=+$e,ae,_e,Me):Xt},De.b=function($e){return arguments.length?je(Xt,ae=+$e,_e,Me):ae},De.psiMax=function($e){return arguments.length?je(Xt,ae,_e=+$e*w,Me):_e*k},De.ratio=function($e){return arguments.length?je(Xt,ae,_e,Me=+$e):Me},De.scale(180.739)}function Ll(Xt,ae,_e,Me,je,De,$e,wr,Or,Nr,en){if(en.nanEncountered)return NaN;var vn,In,jn,si,Wi,ga,pa,Ma,lo,No;if(vn=_e-ae,In=Xt(ae+vn*.25),jn=Xt(_e-vn*.25),isNaN(In)){en.nanEncountered=!0;return}if(isNaN(jn)){en.nanEncountered=!0;return}return si=vn*(Me+4*In+je)/12,Wi=vn*(je+4*jn+De)/12,ga=si+Wi,No=(ga-$e)/15,Nr>Or?(en.maxDepthCount++,ga+No):Math.abs(No)>1;do Or[ga]>jn?Wi=ga:si=ga,ga=si+Wi>>1;while(ga>si);var pa=Or[ga+1]-Or[ga];return pa&&(pa=(jn-Or[ga+1])/pa),(ga+1+pa)/$e}var vn=2*en(1)/_*De/_e,In=function(jn,si){var Wi=en(S(v(si))),ga=Me(Wi)*jn;return Wi/=vn,[ga,si>=0?Wi:-Wi]};return In.invert=function(jn,si){var Wi;return si*=vn,S(si)<1&&(Wi=y(si)*O(je(S(si))*De)),[jn/Me(S(si)),Wi]},In}function Ms(){var Xt=0,ae=2.5,_e=1.183136,Me=g.geoProjectionMutator(uo),je=Me(Xt,ae,_e);return je.alpha=function(De){return arguments.length?Me(Xt=+De,ae,_e):Xt},je.k=function(De){return arguments.length?Me(Xt,ae=+De,_e):ae},je.gamma=function(De){return arguments.length?Me(Xt,ae,_e=+De):_e},je.scale(152.63)}function Is(Xt,ae){return S(Xt[0]-ae[0])=0;--Or)_e=Xt[1][Or],Me=_e[0][0],je=_e[0][1],De=_e[1][1],$e=_e[2][0],wr=_e[2][1],ae.push(ou([[$e-u,wr-u],[$e-u,De+u],[Me+u,De+u],[Me+u,je-u]],30));return{type:"Polygon",coordinates:[I.merge(ae)]}}function es(Xt,ae,_e){var Me,je;function De(Or,Nr){for(var en=Nr<0?-1:1,vn=ae[+(Nr<0)],In=0,jn=vn.length-1;Invn[In][2][0];++In);var si=Xt(Or-vn[In][1][0],Nr);return si[0]+=Xt(vn[In][1][0],en*Nr>en*vn[In][0][1]?vn[In][0][1]:Nr)[0],si}_e?De.invert=_e(De):Xt.invert&&(De.invert=function(Or,Nr){for(var en=je[+(Nr<0)],vn=ae[+(Nr<0)],In=0,jn=en.length;Insi&&(Wi=jn,jn=si,si=Wi),[[vn,jn],[In,si]]})}),$e):ae.map(function(Nr){return Nr.map(function(en){return[[en[0][0]*k,en[0][1]*k],[en[1][0]*k,en[1][1]*k],[en[2][0]*k,en[2][1]*k]]})})},ae!=null&&$e.lobes(ae),$e}var Cu=[[[[-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 Gu(){return es(ee,Cu).scale(160.857)}var bl=[[[[-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 Fl(){return es(Ql,bl).scale(152.63)}var tu=[[[[-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 nu(){return es(se,tu).scale(169.529)}var ac=[[[[-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 gh(){return es(se,ac).scale(169.529).rotate([20,0])}var Jc=[[[[-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 oh(){return es(fo,Jc,Wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jf=[[[[-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 Sf(){return es(Ae,jf).scale(152.63).rotate([-20,0])}function Bl(Xt,ae){return[3/p*Xt*V(_*_/3-ae*ae),ae]}Bl.invert=function(Xt,ae){return[p/3*Xt/V(_*_/3-ae*ae),ae]};function Rc(){return g.geoProjection(Bl).scale(158.837)}function Uf(Xt){function ae(_e,Me){if(S(S(Me)-P)2)return null;_e/=2,Me/=2;var De=_e*_e,$e=Me*Me,wr=2*Me/(1+De+$e);return wr=f((1+wr)/(1-wr),1/Xt),[e(2*_e,1-De-$e)/Xt,O((wr-1)/(wr+1))]},ae}function hc(){var Xt=.5,ae=g.geoProjectionMutator(Uf),_e=ae(Xt);return _e.spacing=function(Me){return arguments.length?ae(Xt=+Me):Xt},_e.scale(124.75)}var oc=_/A;function fc(Xt,ae){return[Xt*(1+V(r(ae)))/2,ae/(r(ae/2)*r(Xt/6))]}fc.invert=function(Xt,ae){var _e=S(Xt),Me=S(ae),je=u,De=P;Meu||S(ga)>u)&&--je>0);return je&&[_e,Me]};function sc(){return g.geoProjection(cu).scale(139.98)}function rl(Xt,ae){return[v(Xt)/r(ae),T(ae)*r(Xt)]}rl.invert=function(Xt,ae){var _e=Xt*Xt,Me=ae*ae,je=Me+1,De=_e+je,$e=Xt?C*V((De-V(De*De-4*_e))/_e):1/V(je);return[O(Xt*$e),y(ae)*j($e)]};function Yl(){return g.geoProjection(rl).scale(144.049).clipAngle(90-.001)}function Eh(Xt){var ae=r(Xt),_e=T(M+Xt/2);function Me(je,De){var $e=De-Xt,wr=S($e)=0;)en=Xt[Nr],vn=en[0]+wr*(jn=vn)-Or*In,In=en[1]+wr*In+Or*jn;return vn=wr*(jn=vn)-Or*In,In=wr*In+Or*jn,[vn,In]}return _e.invert=function(Me,je){var De=20,$e=Me,wr=je;do{for(var Or=ae,Nr=Xt[Or],en=Nr[0],vn=Nr[1],In=0,jn=0,si;--Or>=0;)Nr=Xt[Or],In=en+$e*(si=In)-wr*jn,jn=vn+$e*jn+wr*si,en=Nr[0]+$e*(si=en)-wr*vn,vn=Nr[1]+$e*vn+wr*si;In=en+$e*(si=In)-wr*jn,jn=vn+$e*jn+wr*si,en=$e*(si=en)-wr*vn-Me,vn=$e*vn+wr*si-je;var Wi=In*In+jn*jn,ga,pa;$e-=ga=(en*In+vn*jn)/Wi,wr-=pa=(vn*In-en*jn)/Wi}while(S(ga)+S(pa)>u*u&&--De>0);if(De){var Ma=V($e*$e+wr*wr),lo=2*t(Ma*.5),No=v(lo);return[e($e*No,Ma*r(lo)),Ma?O(wr*No/Ma):0]}},_e}var tl=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Vd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Pl=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function lh(){return lc(tl,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function rc(){return lc(Vd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vf(){return lc(Pl,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Hh(){return lc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return lc(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function lc(Xt,ae){var _e=g.geoProjection(Ed(Xt)).rotate(ae).clipAngle(90),Me=g.geoRotation(ae),je=_e.center;return delete _e.rotate,_e.center=function(De){return arguments.length?je(Me(De)):Me.invert(je())},_e}var hd=V(6),Gf=V(7);function xf(Xt,ae){var _e=O(7*v(ae)/(3*hd));return[hd*Xt*(2*r(2*_e/3)-1)/Gf,9*v(_e/3)/Gf]}xf.invert=function(Xt,ae){var _e=3*O(ae*Gf/9);return[Xt*Gf/(hd*(2*r(2*_e/3)-1)),O(v(_e)*3*hd/7)]};function Wh(){return g.geoProjection(xf).scale(164.859)}function Hf(Xt,ae){for(var _e=(1+C)*v(ae),Me=ae,je=0,De;je<25&&(Me-=De=(v(Me/2)+v(Me)-_e)/(.5*r(Me/2)+r(Me)),!(S(De)b&&--Me>0);return De=_e*_e,$e=De*De,wr=De*$e,[Xt/(.84719-.13063*De+wr*wr*(-.04515+.05494*De-.02326*$e+.00331*wr)),_e]};function vh(){return g.geoProjection(Ch).scale(175.295)}function uc(Xt,ae){return[Xt*(1+r(ae))/2,2*(ae-T(ae/2))]}uc.invert=function(Xt,ae){for(var _e=ae/2,Me=0,je=1/0;Me<10&&S(je)>u;++Me){var De=r(ae/2);ae-=je=(ae-T(ae/2)-_e)/(1-.5/(De*De))}return[2*Xt/(1+r(ae)),ae]};function rf(){return g.geoProjection(uc).scale(152.63)}var qf=[[[[-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 eu(){return es(kt(1/0),qf).rotate([20,0]).scale(152.63)}function Ef(Xt,ae){var _e=v(ae),Me=r(ae),je=y(Xt);if(Xt===0||S(ae)===P)return[0,ae];if(ae===0)return[Xt,0];if(S(Xt)===P)return[Xt*Me,P*_e];var De=_/(2*Xt)-2*Xt/_,$e=2*ae/_,wr=(1-$e*$e)/(_e-$e),Or=De*De,Nr=wr*wr,en=1+Or/Nr,vn=1+Nr/Or,In=(De*_e/wr-De/2)/en,jn=(Nr*_e/Or+wr/2)/vn,si=In*In+Me*Me/en,Wi=jn*jn-(Nr*_e*_e/Or+wr*_e-1)/vn;return[P*(In+V(si)*je),P*(jn+V(Wi<0?0:Wi)*y(-ae*De)*je)]}Ef.invert=function(Xt,ae){Xt/=P,ae/=P;var _e=Xt*Xt,Me=ae*ae,je=_e+Me,De=_*_;return[Xt?(je-1+V((1-je)*(1-je)+4*_e))/(2*Xt)*P:0,qt(function($e){return je*(_*v($e)-2*$e)*_+4*$e*$e*(ae-v($e))+2*_*$e-De*ae},0)]};function Cd(){return g.geoProjection(Ef).scale(127.267)}var Kf=1.0148,_f=.23185,Xf=-.14499,Nc=.02406,Jf=Kf,Du=5*_f,jc=7*Xf,qh=9*Nc,hu=1.790857183;function Lh(Xt,ae){var _e=ae*ae;return[Xt,ae*(Kf+_e*_e*(_f+_e*(Xf+Nc*_e)))]}Lh.invert=function(Xt,ae){ae>hu?ae=hu:ae<-hu&&(ae=-hu);var _e=ae,Me;do{var je=_e*_e;_e-=Me=(_e*(Kf+je*je*(_f+je*(Xf+Nc*je)))-ae)/(Jf+je*je*(Du+je*(jc+qh*je)))}while(S(Me)>u);return[Xt,_e]};function Mc(){return g.geoProjection(Lh).scale(139.319)}function Uc(Xt,ae){if(S(ae)u&&--je>0);return $e=T(Me),[(S(ae)=0;)if(Me=ae[wr],_e[0]===Me[0]&&_e[1]===Me[1]){if(De)return[De,_e];De=_e}}}function Qc(Xt){for(var ae=Xt.length,_e=[],Me=Xt[ae-1],je=0;je0?[-Me[0],0]:[180-Me[0],180])};var ae=xh.map(function(_e){return{face:_e,project:Xt(_e)}});return[-1,0,0,1,0,1,4,5].forEach(function(_e,Me){var je=ae[_e];je&&(je.children||(je.children=[])).push(ae[Me])}),cf(ae[0],function(_e,Me){return ae[_e<-_/2?Me<0?6:4:_e<0?Me<0?2:0:_e<_/2?Me<0?3:1:Me<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function yu(Xt){Xt=Xt||function($e){var wr=$e.length===6?g.geoCentroid({type:"MultiPoint",coordinates:$e}):$e[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-wr[0],-wr[1]])};var ae=xh.map(function($e){for(var wr=$e.map(nf),Or=wr.length,Nr=wr[Or-1],en,vn=[],In=0;InMe^jn>Me&&_e<(In-Nr)*(Me-en)/(jn-en)+Nr&&(je=!je)}return je}function gc(Xt,ae){var _e=ae.stream,Me;if(!_e)throw new Error("invalid projection");switch(Xt&&Xt.type){case"Feature":Me=eh;break;case"FeatureCollection":Me=Qf;break;default:Me=_h;break}return Me(Xt,_e)}function Qf(Xt,ae){return{type:"FeatureCollection",features:Xt.features.map(function(_e){return eh(_e,ae)})}}function eh(Xt,ae){return{type:"Feature",id:Xt.id,properties:Xt.properties,geometry:_h(Xt.geometry,ae)}}function Ih(Xt,ae){return{type:"GeometryCollection",geometries:Xt.geometries.map(function(_e){return _h(_e,ae)})}}function _h(Xt,ae){if(!Xt)return null;if(Xt.type==="GeometryCollection")return Ih(Xt,ae);var _e;switch(Xt.type){case"Point":_e=bh;break;case"MultiPoint":_e=bh;break;case"LineString":_e=df;break;case"MultiLineString":_e=df;break;case"Polygon":_e=wh;break;case"MultiPolygon":_e=wh;break;case"Sphere":_e=wh;break;default:return null}return g.geoStream(Xt,ae(_e)),_e.result()}var Nu=[],iu=[],bh={point:function(Xt,ae){Nu.push([Xt,ae])},result:function(){var Xt=Nu.length?Nu.length<2?{type:"Point",coordinates:Nu[0]}:{type:"MultiPoint",coordinates:Nu}:null;return Nu=[],Xt}},df={lineStart:Gh,point:function(Xt,ae){Nu.push([Xt,ae])},lineEnd:function(){Nu.length&&(iu.push(Nu),Nu=[])},result:function(){var Xt=iu.length?iu.length<2?{type:"LineString",coordinates:iu[0]}:{type:"MultiLineString",coordinates:iu}:null;return iu=[],Xt}},wh={polygonStart:Gh,lineStart:Gh,point:function(Xt,ae){Nu.push([Xt,ae])},lineEnd:function(){var Xt=Nu.length;if(Xt){do Nu.push(Nu[0].slice());while(++Xt<4);iu.push(Nu),Nu=[]}},polygonEnd:Gh,result:function(){if(!iu.length)return null;var Xt=[],ae=[];return iu.forEach(function(_e){wf(_e)?Xt.push([_e]):ae.push(_e)}),ae.forEach(function(_e){var Me=_e[0];Xt.some(function(je){if(Pd(je[0],Me))return je.push(_e),!0})||Xt.push([_e])}),iu=[],Xt.length?Xt.length>1?{type:"MultiPolygon",coordinates:Xt}:{type:"Polygon",coordinates:Xt[0]}:null}};function $f(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function _e(Me,je){var De=S(Me)0?Me-_:Me+_,je),wr=($e[0]-$e[1])*C,Or=($e[0]+$e[1])*C;if(De)return[wr,Or];var Nr=ae*C,en=wr>0^Or>0?-1:1;return[en*wr-y(Or)*Nr,en*Or-y(wr)*Nr]}return Xt.invert&&(_e.invert=function(Me,je){var De=(Me+je)*C,$e=(je-Me)*C,wr=S(De)<.5*ae&&S($e)<.5*ae;if(!wr){var Or=ae*C,Nr=De>0^$e>0?-1:1,en=-Nr*Me+($e>0?1:-1)*Or,vn=-Nr*je+(De>0?1:-1)*Or;De=(-en-vn)*C,$e=(en-vn)*C}var In=Xt.invert(De,$e);return wr||(In[0]+=De>0?_:-_),In}),g.geoProjection(_e).rotate([-90,-90,45]).clipAngle(180-.001)}function gr(){return $f(En).scale(176.423)}function Ur(){return $f(Bo).scale(111.48)}function wn(Xt,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function _e(Nr){var en=Nr.length,vn=2,In=new Array(en);for(In[0]=+Nr[0].toFixed(ae),In[1]=+Nr[1].toFixed(ae);vn2||jn[0]!=en[0]||jn[1]!=en[1])&&(vn.push(jn),en=jn)}return vn.length===1&&Nr.length>1&&vn.push(_e(Nr[Nr.length-1])),vn}function De(Nr){return Nr.map(je)}function $e(Nr){if(Nr==null)return Nr;var en;switch(Nr.type){case"GeometryCollection":en={type:"GeometryCollection",geometries:Nr.geometries.map($e)};break;case"Point":en={type:"Point",coordinates:_e(Nr.coordinates)};break;case"MultiPoint":en={type:Nr.type,coordinates:Me(Nr.coordinates)};break;case"LineString":en={type:Nr.type,coordinates:je(Nr.coordinates)};break;case"MultiLineString":case"Polygon":en={type:Nr.type,coordinates:De(Nr.coordinates)};break;case"MultiPolygon":en={type:"MultiPolygon",coordinates:Nr.coordinates.map(De)};break;default:return Nr}return Nr.bbox!=null&&(en.bbox=Nr.bbox),en}function wr(Nr){var en={type:"Feature",properties:Nr.properties,geometry:$e(Nr.geometry)};return Nr.id!=null&&(en.id=Nr.id),Nr.bbox!=null&&(en.bbox=Nr.bbox),en}if(Xt!=null)switch(Xt.type){case"Feature":return wr(Xt);case"FeatureCollection":{var Or={type:"FeatureCollection",features:Xt.features.map(wr)};return Xt.bbox!=null&&(Or.bbox=Xt.bbox),Or}default:return $e(Xt)}return Xt}function hn(Xt){var ae=v(Xt);function _e(Me,je){var De=ae?T(Me*ae/2)/ae:Me/2;if(!je)return[2*De,-Xt];var $e=2*t(De*v(je)),wr=1/T(je);return[v($e)*wr,je+(1-r($e))*wr-Xt]}return _e.invert=function(Me,je){if(S(je+=Xt)u&&--wr>0);var In=Me*(Nr=T($e)),jn=T(S(je)0?P:-P)*(Or+je*(en-$e)/2+je*je*(en-2*Or+$e)/2)]}aa.invert=function(Xt,ae){var _e=ae/P,Me=_e*90,je=l(18,S(Me/5)),De=i(0,n(je));do{var $e=gi[De][1],wr=gi[De+1][1],Or=gi[l(19,De+2)][1],Nr=Or-$e,en=Or-2*wr+$e,vn=2*(S(_e)-wr)/Nr,In=en/Nr,jn=vn*(1-In*vn*(1-2*In*vn));if(jn>=0||De===1){Me=(ae>=0?5:-5)*(jn+je);var si=50,Wi;do je=l(18,S(Me)/5),De=n(je),jn=je-De,$e=gi[De][1],wr=gi[De+1][1],Or=gi[l(19,De+2)][1],Me-=(Wi=(ae>=0?P:-P)*(wr+jn*(Or-$e)/2+jn*jn*(Or-2*wr+$e)/2)-ae)*k;while(S(Wi)>b&&--si>0);break}}while(--De>=0);var ga=gi[De][0],pa=gi[De+1][0],Ma=gi[l(19,De+2)][0];return[Xt/(pa+jn*(Ma-ga)/2+jn*jn*(Ma-2*pa+ga)/2),Me*w]};function xa(){return g.geoProjection(aa).scale(152.63)}function Ra(Xt){function ae(_e,Me){var je=r(Me),De=(Xt-1)/(Xt-je*r(_e));return[De*je*v(_e),De*v(Me)]}return ae.invert=function(_e,Me){var je=_e*_e+Me*Me,De=V(je),$e=(Xt-V(1-je*(Xt+1)/(Xt-1)))/((Xt-1)/De+De/(Xt-1));return[e(_e*$e,De*V(1-$e*$e)),De?O(Me*$e/De):0]},ae}function Ga(Xt,ae){var _e=Ra(Xt);if(!ae)return _e;var Me=r(ae),je=v(ae);function De($e,wr){var Or=_e($e,wr),Nr=Or[1],en=Nr*je/(Xt-1)+Me;return[Or[0]*Me/en,Nr/en]}return De.invert=function($e,wr){var Or=(Xt-1)/(Xt-1-wr*je);return _e.invert(Or*$e,Or*wr*Me)},De}function fa(){var Xt=2,ae=0,_e=g.geoProjectionMutator(Ga),Me=_e(Xt,ae);return Me.distance=function(je){return arguments.length?_e(Xt=+je,ae):Xt},Me.tilt=function(je){return arguments.length?_e(Xt,ae=je*w):ae*k},Me.scale(432.147).clipAngle(j(1/Xt)*k-1e-6)}var Oa=1e-4,Aa=1e4,na=-180,ao=na+Oa,is=180,Xo=is-Oa,ls=-90,ps=ls+Oa,so=90,$a=so-Oa;function gs(Xt){return Xt.length>0}function el(Xt){return Math.floor(Xt*Aa)/Aa}function Il(Xt){return Xt===ls||Xt===so?[0,Xt]:[na,el(Xt)]}function su(Xt){var ae=Xt[0],_e=Xt[1],Me=!1;return ae<=ao?(ae=na,Me=!0):ae>=Xo&&(ae=is,Me=!0),_e<=ps?(_e=ls,Me=!0):_e>=$a&&(_e=so,Me=!0),Me?[ae,_e]:Xt}function $l(Xt){return Xt.map(su)}function lu(Xt,ae,_e){for(var Me=0,je=Xt.length;Me=Xo||en<=ps||en>=$a){De[$e]=su(Or);for(var vn=$e+1;vnao&&jnps&&si<$a)break}if(vn===$e+1)continue;if($e){var Wi={index:-1,polygon:ae,ring:De.slice(0,$e+1)};Wi.ring[Wi.ring.length-1]=Il(en),_e[_e.length-1]=Wi}else _e.pop();if(vn>=wr)break;_e.push({index:-1,polygon:ae,ring:De=De.slice(vn-1)}),De[0]=Il(De[0][1]),$e=-1,wr=De.length}}}}function ml(Xt){var ae,_e=Xt.length,Me={},je={},De,$e,wr,Or,Nr;for(ae=0;ae<_e;++ae){if(De=Xt[ae],$e=De.ring[0],Or=De.ring[De.ring.length-1],$e[0]===Or[0]&&$e[1]===Or[1]){De.polygon.push(De.ring),Xt[ae]=null;continue}De.index=ae,Me[$e]=je[Or]=De}for(ae=0;ae<_e;++ae)if(De=Xt[ae],De){if($e=De.ring[0],Or=De.ring[De.ring.length-1],wr=je[$e],Nr=Me[Or],delete Me[$e],delete je[Or],$e[0]===Or[0]&&$e[1]===Or[1]){De.polygon.push(De.ring);continue}wr?(delete je[$e],delete Me[wr.ring[0]],wr.ring.pop(),Xt[wr.index]=null,De={index:-1,polygon:wr.polygon,ring:wr.ring.concat(De.ring)},wr===Nr?De.polygon.push(De.ring):(De.index=_e++,Xt.push(Me[De.ring[0]]=je[De.ring[De.ring.length-1]]=De))):Nr?(delete Me[Or],delete je[Nr.ring[Nr.ring.length-1]],De.ring.pop(),De={index:_e++,polygon:Nr.polygon,ring:De.ring.concat(Nr.ring)},Xt[Nr.index]=null,Xt.push(Me[De.ring[0]]=je[De.ring[De.ring.length-1]]=De)):(De.ring.push(De.ring[0]),De.polygon.push(De.ring))}}function qu(Xt){var ae={type:"Feature",geometry:zu(Xt.geometry)};return Xt.id!=null&&(ae.id=Xt.id),Xt.bbox!=null&&(ae.bbox=Xt.bbox),Xt.properties!=null&&(ae.properties=Xt.properties),ae}function zu(Xt){if(Xt==null)return Xt;var ae,_e,Me,je;switch(Xt.type){case"GeometryCollection":ae={type:"GeometryCollection",geometries:Xt.geometries.map(zu)};break;case"Point":ae={type:"Point",coordinates:su(Xt.coordinates)};break;case"MultiPoint":case"LineString":ae={type:Xt.type,coordinates:$l(Xt.coordinates)};break;case"MultiLineString":ae={type:"MultiLineString",coordinates:Xt.coordinates.map($l)};break;case"Polygon":{var De=[];lu(Xt.coordinates,De,_e=[]),ml(_e),ae={type:"Polygon",coordinates:De};break}case"MultiPolygon":{_e=[],Me=-1,je=Xt.coordinates.length;for(var $e=new Array(je);++Me0?_-wr:wr)*k],Nr=g.geoProjection(Xt($e)).rotate(Or),en=g.geoRotation(Or),vn=Nr.center;return delete Nr.rotate,Nr.center=function(In){return arguments.length?vn(en(In)):en.invert(vn())},Nr.clipAngle(90)}function Rl(Xt){var ae=r(Xt);function _e(Me,je){var De=g.geoGnomonicRaw(Me,je);return De[0]*=ae,De}return _e.invert=function(Me,je){return g.geoGnomonicRaw.invert(Me/ae,je)},_e}function vc(){return Hc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Hc(Xt,ae){return Kl(Rl,Xt,ae)}function Pc(Xt){if(!(Xt*=2))return g.geoAzimuthalEquidistantRaw;var ae=-Xt/2,_e=-ae,Me=Xt*Xt,je=T(_e),De=.5/v(_e);function $e(wr,Or){var Nr=j(r(Or)*r(wr-ae)),en=j(r(Or)*r(wr-_e)),vn=Or<0?-1:1;return Nr*=Nr,en*=en,[(Nr-en)/(2*Xt),vn*V(4*Me*en-(Me-Nr+en)*(Me-Nr+en))/(2*Xt)]}return $e.invert=function(wr,Or){var Nr=Or*Or,en=r(V(Nr+(In=wr+ae)*In)),vn=r(V(Nr+(In=wr+_e)*In)),In,jn;return[e(jn=en-vn,In=(en+vn)*je),(Or<0?-1:1)*j(V(In*In+jn*jn)*De)]},$e}function zh(){return Wc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Wc(Xt,ae){return Kl(Pc,Xt,ae)}function Oh(Xt,ae){if(S(ae)u&&--wr>0);return[y(Xt)*(V(je*je+4)+je)*_/4,P*$e]};function Zf(){return g.geoProjection($u).scale(127.16)}function $t(Xt,ae,_e,Me,je){function De($e,wr){var Or=_e*v(Me*wr),Nr=V(1-Or*Or),en=V(2/(1+Nr*r($e*=je)));return[Xt*Nr*en*v($e),ae*Or*en]}return De.invert=function($e,wr){var Or=$e/Xt,Nr=wr/ae,en=V(Or*Or+Nr*Nr),vn=2*O(en/2);return[e($e*T(vn),Xt*en)/je,en&&O(wr*v(vn)/(ae*_e*en))/Me]},De}function z(Xt,ae,_e,Me){var je=_/3;Xt=i(Xt,u),ae=i(ae,u),Xt=l(Xt,P),ae=l(ae,_-u),_e=i(_e,0),_e=l(_e,100-u),Me=i(Me,u);var De=_e/100+1,$e=Me/100,wr=j(De*r(je))/je,Or=v(Xt)/v(wr*P),Nr=ae/_,en=V($e*v(Xt/2)/v(ae/2)),vn=en/V(Nr*Or*wr),In=1/(en*V(Nr*Or*wr));return $t(vn,In,Or,wr,Nr)}function ht(){var Xt=65*w,ae=60*w,_e=20,Me=200,je=g.geoProjectionMutator(z),De=je(Xt,ae,_e,Me);return De.poleline=function($e){return arguments.length?je(Xt=+$e*w,ae,_e,Me):Xt*k},De.parallels=function($e){return arguments.length?je(Xt,ae=+$e*w,_e,Me):ae*k},De.inflation=function($e){return arguments.length?je(Xt,ae,_e=+$e,Me):_e},De.ratio=function($e){return arguments.length?je(Xt,ae,_e,Me=+$e):Me},De.scale(163.775)}function Et(){return ht().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ot=4*_+3*V(3),Ht=2*V(2*_*V(3)/Ot),Te=pe(Ht*V(3)/_,Ht,Ot/6);function Fe(){return g.geoProjection(Te).scale(176.84)}function Ke(Xt,ae){return[Xt*V(1-3*ae*ae/(_*_)),ae]}Ke.invert=function(Xt,ae){return[Xt/V(1-3*ae*ae/(_*_)),ae]};function vr(){return g.geoProjection(Ke).scale(152.63)}function Dr(Xt,ae){var _e=r(ae),Me=r(Xt)*_e,je=1-Me,De=r(Xt=e(v(Xt)*_e,-v(ae))),$e=v(Xt);return _e=V(1-Me*Me),[$e*_e-De*je,-De*_e-$e*je]}Dr.invert=function(Xt,ae){var _e=(Xt*Xt+ae*ae)/-2,Me=V(-_e*(2+_e)),je=ae*_e+Xt*Me,De=Xt*_e-ae*Me,$e=V(De*De+je*je);return[e(Me*je,$e*(1+_e)),$e?-O(Me*De/$e):0]};function Fr(){return g.geoProjection(Dr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function un(Xt,ae){var _e=yt(Xt,ae);return[(_e[0]+Xt/P)/2,(_e[1]+ae)/2]}un.invert=function(Xt,ae){var _e=Xt,Me=ae,je=25;do{var De=r(Me),$e=v(Me),wr=v(2*Me),Or=$e*$e,Nr=De*De,en=v(_e),vn=r(_e/2),In=v(_e/2),jn=In*In,si=1-Nr*vn*vn,Wi=si?j(De*vn)*V(ga=1/si):ga=0,ga,pa=.5*(2*Wi*De*In+_e/P)-Xt,Ma=.5*(Wi*$e+Me)-ae,lo=.5*ga*(Nr*jn+Wi*De*vn*Or)+.5/P,No=ga*(en*wr/4-Wi*$e*In),So=.125*ga*(wr*In-Wi*$e*Nr*en),ds=.5*ga*(Or*vn+Wi*jn*De)+.5,fl=No*So-ds*lo,vl=(Ma*No-pa*ds)/fl,Ds=(pa*So-Ma*lo)/fl;_e-=vl,Me-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[_e,Me]};function Sn(){return g.geoProjection(un).scale(158.837)}c.geoNaturalEarth=g.geoNaturalEarth1,c.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,c.geoAiry=lt,c.geoAiryRaw=J,c.geoAitoff=mt,c.geoAitoffRaw=yt,c.geoArmadillo=tt,c.geoArmadilloRaw=st,c.geoAugust=rt,c.geoAugustRaw=pt,c.geoBaker=K,c.geoBakerRaw=it,c.geoBerghaus=ut,c.geoBerghausRaw=ft,c.geoBertin1953=ge,c.geoBertin1953Raw=Jt,c.geoBoggs=ve,c.geoBoggsRaw=ee,c.geoBonne=cr,c.geoBonneRaw=Ge,c.geoBottomley=jr,c.geoBottomleyRaw=ur,c.geoBromley=br,c.geoBromleyRaw=qr,c.geoChamberlin=gt,c.geoChamberlinRaw=Gt,c.geoChamberlinAfrica=Ct,c.geoCollignon=Nt,c.geoCollignonRaw=St,c.geoCraig=le,c.geoCraigRaw=re,c.geoCraster=qe,c.geoCrasterRaw=Ue,c.geoCylindricalEqualArea=Sr,c.geoCylindricalEqualAreaRaw=or,c.geoCylindricalStereographic=mr,c.geoCylindricalStereographicRaw=Mr,c.geoEckert1=Wn,c.geoEckert1Raw=Qr,c.geoEckert2=ei,c.geoEckert2Raw=qn,c.geoEckert3=ui,c.geoEckert3Raw=Di,c.geoEckert4=ua,c.geoEckert4Raw=Gn,c.geoEckert5=We,c.geoEckert5Raw=Yi,c.geoEckert6=dr,c.geoEckert6Raw=nr,c.geoEisenlohr=Cn,c.geoEisenlohrRaw=tn,c.geoFahey=mi,c.geoFaheyRaw=Mn,c.geoFoucaut=Ni,c.geoFoucautRaw=Mi,c.geoFoucautSinusoidal=Ji,c.geoFoucautSinusoidalRaw=Hi,c.geoGilbert=qa,c.geoGingery=$r,c.geoGingeryRaw=Oe,c.geoGinzburg4=Yr,c.geoGinzburg4Raw=Rr,c.geoGinzburg5=on,c.geoGinzburg5Raw=mn,c.geoGinzburg6=pr,c.geoGinzburg6Raw=Ce,c.geoGinzburg8=_n,c.geoGinzburg8Raw=Hr,c.geoGinzburg9=ri,c.geoGinzburg9Raw=Bn,c.geoGringorten=qi,c.geoGringortenRaw=En,c.geoGuyou=os,c.geoGuyouRaw=Bo,c.geoHammer=Pt,c.geoHammerRaw=kt,c.geoHammerRetroazimuthal=Ks,c.geoHammerRetroazimuthalRaw=ul,c.geoHealpix=kl,c.geoHealpixRaw=jl,c.geoHill=Jl,c.geoHillRaw=ql,c.geoHomolosine=Jo,c.geoHomolosineRaw=Ql,c.geoHufnagel=al,c.geoHufnagelRaw=Gl,c.geoHyperelliptical=Ms,c.geoHyperellipticalRaw=uo,c.geoInterrupt=es,c.geoInterruptedBoggs=Gu,c.geoInterruptedHomolosine=Fl,c.geoInterruptedMollweide=nu,c.geoInterruptedMollweideHemispheres=gh,c.geoInterruptedSinuMollweide=oh,c.geoInterruptedSinusoidal=Sf,c.geoKavrayskiy7=Rc,c.geoKavrayskiy7Raw=Bl,c.geoLagrange=hc,c.geoLagrangeRaw=Uf,c.geoLarrivee=sh,c.geoLarriveeRaw=fc,c.geoLaskowski=sc,c.geoLaskowskiRaw=cu,c.geoLittrow=Yl,c.geoLittrowRaw=rl,c.geoLoximuthal=Lc,c.geoLoximuthalRaw=Eh,c.geoMiller=bu,c.geoMillerRaw=Vh,c.geoModifiedStereographic=lc,c.geoModifiedStereographicRaw=Ed,c.geoModifiedStereographicAlaska=lh,c.geoModifiedStereographicGs48=rc,c.geoModifiedStereographicGs50=Vf,c.geoModifiedStereographicMiller=Hh,c.geoModifiedStereographicLee=yf,c.geoMollweide=Tt,c.geoMollweideRaw=se,c.geoMtFlatPolarParabolic=Wh,c.geoMtFlatPolarParabolicRaw=xf,c.geoMtFlatPolarQuartic=Wf,c.geoMtFlatPolarQuarticRaw=Hf,c.geoMtFlatPolarSinusoidal=Yf,c.geoMtFlatPolarSinusoidalRaw=uh,c.geoNaturalEarth2=vh,c.geoNaturalEarth2Raw=Ch,c.geoNellHammer=rf,c.geoNellHammerRaw=uc,c.geoInterruptedQuarticAuthalic=eu,c.geoNicolosi=Cd,c.geoNicolosiRaw=Ef,c.geoPatterson=Mc,c.geoPattersonRaw=Lh,c.geoPolyconic=wu,c.geoPolyconicRaw=Uc,c.geoPolyhedral=cf,c.geoPolyhedralButterfly=ku,c.geoPolyhedralCollignon=fd,c.geoPolyhedralWaterman=yu,c.geoProject=gc,c.geoGringortenQuincuncial=gr,c.geoPeirceQuincuncial=Ur,c.geoPierceQuincuncial=Ur,c.geoQuantize=wn,c.geoQuincuncial=$f,c.geoRectangularPolyconic=Zn,c.geoRectangularPolyconicRaw=hn,c.geoRobinson=xa,c.geoRobinsonRaw=aa,c.geoSatellite=fa,c.geoSatelliteRaw=Ga,c.geoSinuMollweide=qs,c.geoSinuMollweideRaw=fo,c.geoSinusoidal=He,c.geoSinusoidalRaw=Ae,c.geoStitch=fu,c.geoTimes=Es,c.geoTimesRaw=Oo,c.geoTwoPointAzimuthal=Hc,c.geoTwoPointAzimuthalRaw=Rl,c.geoTwoPointAzimuthalUsa=vc,c.geoTwoPointEquidistant=Wc,c.geoTwoPointEquidistantRaw=Pc,c.geoTwoPointEquidistantUsa=zh,c.geoVanDerGrinten=Fu,c.geoVanDerGrintenRaw=Oh,c.geoVanDerGrinten2=ns,c.geoVanDerGrinten2Raw=Dh,c.geoVanDerGrinten3=qc,c.geoVanDerGrinten3Raw=zs,c.geoVanDerGrinten4=Zf,c.geoVanDerGrinten4Raw=$u,c.geoWagner=ht,c.geoWagner7=Et,c.geoWagnerRaw=z,c.geoWagner4=Fe,c.geoWagner4Raw=Te,c.geoWagner6=vr,c.geoWagner6Raw=Ke,c.geoWiechel=Fr,c.geoWiechelRaw=Dr,c.geoWinkel3=Sn,c.geoWinkel3Raw=un,Object.defineProperty(c,"__esModule",{value:!0})})}),pV=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=Qo(),S=Math.PI/180,t=180/Math.PI,e={cursor:"pointer"},r={cursor:"auto"};function a(k,w){var B=k.projection,O;return w._isScoped?O=i:w._isClipped?O=f:O=l,O(k,B)}Z.exports=a;function n(k,w){return c.behavior.zoom().translate(w.translate()).scale(w.scale())}function o(k,w,B){var O=k.id,j=k.graphDiv,V=j.layout,H=V[O],F=j._fullLayout,U=F[O],W={},q={};function J(lt,yt){W[O+"."+lt]=g.nestedProperty(H,lt).get(),I.call("_storeDirectGUIEdit",V,F._preGUI,W);var mt=g.nestedProperty(U,lt);mt.get()!==yt&&(mt.set(yt),g.nestedProperty(H,lt).set(yt),q[O+"."+lt]=yt)}B(J),J("projection.scale",w.scale()/k.fitScale),J("fitbounds",!1),j.emit("plotly_relayout",q)}function i(k,w){var B=n(k,w);function O(){c.select(this).style(e)}function j(){w.scale(c.event.scale).translate(c.event.translate),k.render(!0);var F=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function V(F){var U=w.invert(k.midPt);F("center.lon",U[0]),F("center.lat",U[1])}function H(){c.select(this).style(r),o(k,w,V)}return B.on("zoomstart",O).on("zoom",j).on("zoomend",H),B}function l(k,w){var B=n(k,w),O=2,j,V,H,F,U,W,q,J,lt;function yt(at){return w.invert(at)}function mt(at){var vt=yt(at);if(!vt)return!0;var it=w(vt);return Math.abs(it[0]-at[0])>O||Math.abs(it[1]-at[1])>O}function st(){c.select(this).style(e),j=c.mouse(this),V=w.rotate(),H=w.translate(),F=V,U=yt(j)}function tt(){if(W=c.mouse(this),mt(j)){B.scale(w.scale()),B.translate(w.translate());return}w.scale(c.event.scale),w.translate([H[0],c.event.translate[1]]),U?yt(W)&&(J=yt(W),q=[F[0]+(J[0]-U[0]),V[1],V[2]],w.rotate(q),F=q):(j=W,U=yt(j)),lt=!0,k.render(!0);var at=w.rotate(),vt=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":vt[0],"geo.center.lat":vt[1],"geo.projection.rotation.lon":-at[0]})}function pt(){c.select(this).style(r),lt&&o(k,w,rt)}function rt(at){var vt=w.rotate(),it=w.invert(k.midPt);at("projection.rotation.lon",-vt[0]),at("center.lon",it[0]),at("center.lat",it[1])}return B.on("zoomstart",st).on("zoom",tt).on("zoomend",pt),B}function f(k,w){w.rotate(),w.scale();var B=n(k,w),O=p(B,"zoomstart","zoom","zoomend"),j=0,V=B.on,H;B.on("zoomstart",function(){c.select(this).style(e);var J=c.mouse(this),lt=w.rotate(),yt=lt,mt=w.translate(),st=y(lt);H=x(w,J),V.call(B,"zoom",function(){var tt=c.mouse(this);if(w.scale(c.event.scale),!H)J=tt,H=x(w,J);else if(x(w,tt)){w.rotate(lt).translate(mt);var pt=x(w,tt),rt=T(H,pt),at=M(v(st,rt)),vt=u(at,H,yt);(!isFinite(vt[0])||!isFinite(vt[1])||!isFinite(vt[2]))&&(vt=yt),w.rotate(vt),yt=vt}U(O.of(this,arguments))}),F(O.of(this,arguments))}).on("zoomend",function(){c.select(this).style(r),V.call(B,"zoom",null),W(O.of(this,arguments)),o(k,w,q)}).on("zoom.redraw",function(){k.render(!0);var J=w.rotate();k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.projection.rotation.lon":-J[0],"geo.projection.rotation.lat":-J[1]})});function F(J){j++||J({type:"zoomstart"})}function U(J){J({type:"zoom"})}function W(J){--j||J({type:"zoomend"})}function q(J){var lt=w.rotate();J("projection.rotation.lon",-lt[0]),J("projection.rotation.lat",-lt[1])}return c.rebind(B,O,"on")}function x(k,w){var B=k.invert(w);return B&&isFinite(B[0])&&isFinite(B[1])&&C(B)}function y(k){var w=.5*k[0]*S,B=.5*k[1]*S,O=.5*k[2]*S,j=Math.sin(w),V=Math.cos(w),H=Math.sin(B),F=Math.cos(B),U=Math.sin(O),W=Math.cos(O);return[V*F*W+j*H*U,j*F*W-V*H*U,V*H*W+j*F*U,V*F*U-j*H*W]}function v(k,w){var B=k[0],O=k[1],j=k[2],V=k[3],H=w[0],F=w[1],U=w[2],W=w[3];return[B*H-O*F-j*U-V*W,B*F+O*H+j*W-V*U,B*U-O*W+j*H+V*F,B*W+O*U-j*F+V*H]}function T(k,w){if(!(!k||!w)){var B=h(k,w),O=Math.sqrt(A(B,B)),j=.5*Math.acos(Math.max(-1,Math.min(1,A(k,w)))),V=Math.sin(j)/O;return O&&[Math.cos(j),B[2]*V,-B[1]*V,B[0]*V]}}function u(k,w,B){var O=P(w,2,k[0]);O=P(O,1,k[1]),O=P(O,0,k[2]-B[2]);var j=w[0],V=w[1],H=w[2],F=O[0],U=O[1],W=O[2],q=Math.atan2(V,j)*t,J=Math.sqrt(j*j+V*V),lt,yt;Math.abs(U)>J?(yt=(U>0?90:-90)-q,lt=0):(yt=Math.asin(U/J)*t-q,lt=Math.sqrt(J*J-U*U));var mt=180-yt-2*q,st=(Math.atan2(W,F)-Math.atan2(H,lt))*t,tt=(Math.atan2(W,F)-Math.atan2(H,-lt))*t,pt=b(B[0],B[1],yt,st),rt=b(B[0],B[1],mt,tt);return pt<=rt?[yt,st,B[2]]:[mt,tt,B[2]]}function b(k,w,B,O){var j=_(B-k),V=_(O-w);return Math.sqrt(j*j+V*V)}function _(k){return(k%360+540)%360-180}function P(k,w,B){var O=B*S,j=k.slice(),V=w===0?1:0,H=w===2?1:2,F=Math.cos(O),U=Math.sin(O);return j[V]=k[V]*F-k[H]*U,j[H]=k[H]*F+k[V]*U,j}function M(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*t,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*t]}function C(k){var w=k[0]*S,B=k[1]*S,O=Math.cos(B);return[O*Math.cos(w),O*Math.sin(w),Math.sin(B)]}function A(k,w){for(var B=0,O=0,j=k.length;O{var c=Wr(),g=zS(),I=g.geoPath,S=g.geoDistance,t=dV(),e=Qo(),r=kn(),a=r.strTranslate,n=pi(),o=Vs(),i=tf(),l=Kc(),f=Ls(),x=K0().getAutoRange,y=cp(),v=vf().prepSelect,T=vf().clearOutline,u=vf().selectOnClick,b=pV(),_=k3(),P=$1(),M=rT(),C=LS().feature;function A(B){this.id=B.id,this.graphDiv=B.graphDiv,this.container=B.container,this.topojsonURL=B.topojsonURL,this.isStatic=B.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 h=A.prototype;Z.exports=function(B){return new A(B)},h.plot=function(B,O,j,V){var H=this;if(V)return H.update(B,O,!0);H._geoCalcData=B,H._fullLayout=O;var F=O[this.id],U=[],W=!1;for(var q in _.layerNameToAdjective)if(q!=="frame"&&F["show"+q]){W=!0;break}for(var J=!1,lt=0;lt0&&U._module.calcGeoJSON(F,O)}if(!j){var W=this.updateProjection(B,O);if(W)return;(!this.viewInitial||this.scope!==V.scope)&&this.saveViewInitial(V)}this.scope=V.scope,this.updateBaseLayers(O,V),this.updateDims(O,V),this.updateFx(O,V),l.generalUpdatePerTraceModule(this.graphDiv,this,B,V);var q=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=q.selectAll(".point"),this.dataPoints.text=q.selectAll("text"),this.dataPaths.line=q.selectAll(".js-line");var J=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=J.selectAll("path"),this._render()},h.updateProjection=function(B,O){var j=this.graphDiv,V=O[this.id],H=O._size,F=V.domain,U=V.projection,W=V.lonaxis,q=V.lataxis,J=W._ax,lt=q._ax,yt=this.projection=p(V),mt=[[H.l+H.w*F.x[0],H.t+H.h*(1-F.y[1])],[H.l+H.w*F.x[1],H.t+H.h*(1-F.y[0])]],st=V.center||{},tt=U.rotation||{},pt=W.range||[],rt=q.range||[];if(V.fitbounds){J._length=mt[1][0]-mt[0][0],lt._length=mt[1][1]-mt[0][1],J.range=x(j,J),lt.range=x(j,lt);var at=(J.range[0]+J.range[1])/2,vt=(lt.range[0]+lt.range[1])/2;if(V._isScoped)st={lon:at,lat:vt};else if(V._isClipped){st={lon:at,lat:vt},tt={lon:at,lat:vt,roll:tt.roll};var it=U.type,K=_.lonaxisSpan[it]/2||180,ft=_.lataxisSpan[it]/2||90;pt=[at-K,at+K],rt=[vt-ft,vt+ft]}else st={lon:at,lat:vt},tt={lon:at,lat:tt.lat,roll:tt.roll}}yt.center([st.lon-tt.lon,st.lat-tt.lat]).rotate([-tt.lon,-tt.lat,tt.roll]).parallels(U.parallels);var ut=w(pt,rt);yt.fitExtent(mt,ut);var kt=this.bounds=yt.getBounds(ut),It=this.fitScale=yt.scale(),Pt=yt.translate();if(V.fitbounds){var qt=yt.getBounds(w(J.range,lt.range)),Wt=Math.min((kt[1][0]-kt[0][0])/(qt[1][0]-qt[0][0]),(kt[1][1]-kt[0][1])/(qt[1][1]-qt[0][1]));isFinite(Wt)?yt.scale(Wt*It):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else yt.scale(U.scale*It);var Jt=this.midPt=[(kt[0][0]+kt[1][0])/2,(kt[0][1]+kt[1][1])/2];if(yt.translate([Pt[0]+(Jt[0]-Pt[0]),Pt[1]+(Jt[1]-Pt[1])]).clipExtent(kt),V._isAlbersUsa){var ge=yt([st.lon,st.lat]),fe=yt.translate();yt.translate([fe[0]-(ge[0]-fe[0]),fe[1]-(ge[1]-fe[1])])}},h.updateBaseLayers=function(B,O){var j=this,V=j.topojson,H=j.layers,F=j.basePaths;function U(mt){return mt==="lonaxis"||mt==="lataxis"}function W(mt){return!!_.lineLayers[mt]}function q(mt){return!!_.fillLayers[mt]}var J=this.hasChoropleth?_.layersForChoropleth:_.layers,lt=J.filter(function(mt){return W(mt)||q(mt)?O["show"+mt]:U(mt)?O[mt].showgrid:!0}),yt=j.framework.selectAll(".layer").data(lt,String);yt.exit().each(function(mt){delete H[mt],delete F[mt],c.select(this).remove()}),yt.enter().append("g").attr("class",function(mt){return"layer "+mt}).each(function(mt){var st=H[mt]=c.select(this);mt==="bg"?j.bgRect=st.append("rect").style("pointer-events","all"):U(mt)?F[mt]=st.append("path").style("fill","none"):mt==="backplot"?st.append("g").classed("choroplethlayer",!0):mt==="frontplot"?st.append("g").classed("scatterlayer",!0):W(mt)?F[mt]=st.append("path").style("fill","none").style("stroke-miterlimit",2):q(mt)&&(F[mt]=st.append("path").style("stroke","none"))}),yt.order(),yt.each(function(mt){var st=F[mt],tt=_.layerNameToAdjective[mt];mt==="frame"?st.datum(_.sphereSVG):W(mt)||q(mt)?st.datum(C(V,V.objects[mt])):U(mt)&&st.datum(k(mt,O,B)).call(n.stroke,O[mt].gridcolor).call(o.dashLine,O[mt].griddash,O[mt].gridwidth),W(mt)?st.call(n.stroke,O[tt+"color"]).call(o.dashLine,"",O[tt+"width"]):q(mt)&&st.call(n.fill,O[tt+"color"])})},h.updateDims=function(B,O){var j=this.bounds,V=(O.framewidth||0)/2,H=j[0][0]-V,F=j[0][1]-V,U=j[1][0]-H+V,W=j[1][1]-F+V;o.setRect(this.clipRect,H,F,U,W),this.bgRect.call(o.setRect,H,F,U,W).call(n.fill,O.bgcolor),this.xaxis._offset=H,this.xaxis._length=U,this.yaxis._offset=F,this.yaxis._length=W},h.updateFx=function(B,O){var j=this,V=j.graphDiv,H=j.bgRect,F=B.dragmode,U=B.clickmode;if(j.isStatic)return;function W(){var yt=j.viewInitial,mt={};for(var st in yt)mt[j.id+"."+st]=yt[st];e.call("_guiRelayout",V,mt),V.emit("plotly_doubleclick",null)}function q(yt){return j.projection.invert([yt[0]+j.xaxis._offset,yt[1]+j.yaxis._offset])}var J=function(yt,mt){if(mt.isRect){var st=yt.range={};st[j.id]=[q([mt.xmin,mt.ymin]),q([mt.xmax,mt.ymax])]}else{var tt=yt.lassoPoints={};tt[j.id]=mt.map(q)}},lt={element:j.bgRect.node(),gd:V,plotinfo:{id:j.id,xaxis:j.xaxis,yaxis:j.yaxis,fillRangeItems:J},xaxes:[j.xaxis],yaxes:[j.yaxis],subplot:j.id,clickFn:function(yt){yt===2&&T(V)}};F==="pan"?(H.node().onmousedown=null,H.call(b(j,O)),H.on("dblclick.zoom",W),V._context._scrollZoom.geo||H.on("wheel.zoom",null)):(F==="select"||F==="lasso")&&(H.on(".zoom",null),lt.prepFn=function(yt,mt,st){v(yt,mt,st,lt,F)},y.init(lt)),H.on("mousemove",function(){var yt=j.projection.invert(r.getPositionFromD3Event());if(!yt)return y.unhover(V,c.event);j.xaxis.p2c=function(){return yt[0]},j.yaxis.p2c=function(){return yt[1]},i.hover(V,c.event,j.id)}),H.on("mouseout",function(){V._dragging||y.unhover(V,c.event)}),H.on("click",function(){F!=="select"&&F!=="lasso"&&(U.indexOf("select")>-1&&u(c.event,V,[j.xaxis],[j.yaxis],j.id,lt),U.indexOf("event")>-1&&i.click(V,c.event))})},h.makeFramework=function(){var B=this,O=B.graphDiv,j=O._fullLayout,V="clip"+j._uid+B.id;B.clipDef=j._clips.append("clipPath").attr("id",V),B.clipRect=B.clipDef.append("rect"),B.framework=c.select(B.container).append("g").attr("class","geo "+B.id).call(o.setClipUrl,V,O),B.project=function(H){var F=B.projection(H);return F?[F[0]-B.xaxis._offset,F[1]-B.yaxis._offset]:[null,null]},B.xaxis={_id:"x",c2p:function(H){return B.project(H)[0]}},B.yaxis={_id:"y",c2p:function(H){return B.project(H)[1]}},B.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(B.mockAxis,j)},h.saveViewInitial=function(B){var O=B.center||{},j=B.projection,V=j.rotation||{};this.viewInitial={fitbounds:B.fitbounds,"projection.scale":j.scale};var H;B._isScoped?H={"center.lon":O.lon,"center.lat":O.lat}:B._isClipped?H={"projection.rotation.lon":V.lon,"projection.rotation.lat":V.lat}:H={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":V.lon},r.extendFlat(this.viewInitial,H)},h.render=function(B){this._hasMarkerAngles&&B?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},h._render=function(){var B=this.projection,O=B.getPath(),j;function V(F){var U=B(F.lonlat);return U?a(U[0],U[1]):null}function H(F){return B.isLonLatOverEdges(F.lonlat)?"none":null}for(j in this.basePaths)this.basePaths[j].attr("d",O);for(j in this.dataPaths)this.dataPaths[j].attr("d",function(F){return O(F.geojson)});for(j in this.dataPoints)this.dataPoints[j].attr("display",H).attr("transform",V)};function p(B){var O=B.projection,j=O.type,V=_.projNames[j];V="geo"+r.titleCase(V);for(var H=g[V]||t[V],F=H(),U=B._isSatellite?Math.acos(1/O.distance)*180/Math.PI:B._isClipped?_.lonaxisSpan[j]/2:null,W=["center","rotate","parallels","clipExtent"],q=function(yt){return yt?F:[]},J=0;Jtt}else return!1},F.getPath=function(){return I().projection(F)},F.getBounds=function(yt){return F.getPath().bounds(yt)},F.precision(_.precision),B._isSatellite&&F.tilt(O.tilt).distance(O.distance),U&&F.clipAngle(U-_.clipPad),F}function k(B,O,j){var V=1e-6,H=2.5,F=O[B],U=_.scopeDefaults[O.scope],W,q,J;B==="lonaxis"?(W=U.lonaxisRange,q=U.lataxisRange,J=function(vt,it){return[vt,it]}):B==="lataxis"&&(W=U.lataxisRange,q=U.lonaxisRange,J=function(vt,it){return[it,vt]});var lt={type:"linear",range:[W[0],W[1]-V],tick0:F.tick0,dtick:F.dtick};f.setConvert(lt,j);var yt=f.calcTicks(lt);!O.isScoped&&B==="lonaxis"&&yt.pop();for(var mt=yt.length,st=new Array(mt),tt=0;tt0&&H<0&&(H+=360);var W=(H-V)/4;return{type:"Polygon",coordinates:[[[V,F],[V,U],[V+W,U],[V+2*W,U],[V+3*W,U],[H,U],[H,F],[H-W,F],[H-2*W,F],[H-3*W,F],[V,F]]]}}}),OS=Dt((Q,Z)=>{var c=Ai(),g=Uh().attributes,I=kd().dash,S=k3(),t=Yc().overrideAll,e=Y0(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:c.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:I},a=Z.exports=t({domain:g({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(S.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(S.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:c.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:S.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:S.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:S.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:S.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:c.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:c.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:c.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:c.background},lonaxis:r,lataxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}),gV=Dt((Q,Z)=>{var c=kn(),g=D1(),I=ud().getSubplotData,S=k3(),t=OS(),e=S.axesNames;Z.exports=function(a,n,o){g(a,n,o,{type:"geo",attributes:t,handleDefaults:r,fullData:o,partition:"y"})};function r(a,n,o,i){var l=I(i.fullData,"geo",i.id),f=l.map(function(rt){return rt.index}),x=o("resolution"),y=o("scope"),v=S.scopeDefaults[y],T=o("projection.type",v.projType),u=n._isAlbersUsa=T==="albers usa";u&&(y=n.scope="usa");var b=n._isScoped=y!=="world",_=n._isSatellite=T==="satellite",P=n._isConic=T.indexOf("conic")!==-1||T==="albers",M=n._isClipped=!!S.lonaxisSpan[T];if(a.visible===!1){var C=c.extendDeep({},n._template);C.showcoastlines=!1,C.showcountries=!1,C.showframe=!1,C.showlakes=!1,C.showland=!1,C.showocean=!1,C.showrivers=!1,C.showsubunits=!1,C.lonaxis&&(C.lonaxis.showgrid=!1),C.lataxis&&(C.lataxis.showgrid=!1),n._template=C}for(var A=o("visible"),h,p=0;p0&&q<0&&(q+=360);var J=(W+q)/2,lt;if(!u){var yt=b?v.projRotate:[J,0,0];lt=o("projection.rotation.lon",yt[0]),o("projection.rotation.lat",yt[1]),o("projection.rotation.roll",yt[2]),h=o("showcoastlines",!b&&A),h&&(o("coastlinecolor"),o("coastlinewidth")),h=o("showocean",A?void 0:!1),h&&o("oceancolor")}var mt,st;if(u?(mt=-96.6,st=38.7):(mt=b?J:lt,st=(U[0]+U[1])/2),o("center.lon",mt),o("center.lat",st),_&&(o("projection.tilt"),o("projection.distance")),P){var tt=v.projParallels||[0,60];o("projection.parallels",tt)}o("projection.scale"),h=o("showland",A?void 0:!1),h&&o("landcolor"),h=o("showlakes",A?void 0:!1),h&&o("lakecolor"),h=o("showrivers",A?void 0:!1),h&&(o("rivercolor"),o("riverwidth")),h=o("showcountries",b&&y!=="usa"&&A),h&&(o("countrycolor"),o("countrywidth")),(y==="usa"||y==="north america"&&x===50)&&(o("showsubunits",A),o("subunitcolor"),o("subunitwidth")),b||(h=o("showframe",A),h&&(o("framecolor"),o("framewidth"))),o("bgcolor");var pt=o("fitbounds");pt&&(delete n.projection.scale,b?(delete n.center.lon,delete n.center.lat):M?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}}),DS=Dt((Q,Z)=>{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=mV(),S="geo",t=g(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function r(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[S],x=0;x{Z.exports={attributes:xx(),supplyDefaults:iV(),colorbar:xo(),formatLabels:aV(),calc:eT(),calcGeoJSON:IS().calcGeoJSON,plot:IS().plot,style:PS(),styleOnSelect:_l().styleOnSelect,hoverPoints:cV(),eventData:hV(),selectPoints:fV(),moduleType:"trace",name:"scattergeo",basePlotModule:DS(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}),yV=Dt((Q,Z)=>{Z.exports=vV()}),vb=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=xx(),S=kc(),t=qo(),e=Ai().defaultLine,r=Ia().extendFlat,a=I.marker.line;Z.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:I.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},I.geojson,{}),featureidkey:I.featureidkey,text:r({},I.text,{}),hovertext:r({},I.hovertext,{}),marker:{line:{color:r({},a.color,{dflt:e}),width:r({},a.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:I.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:I.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:c(),hovertemplatefallback:g(),showlegend:r({},t.showlegend,{dflt:!1})},S("",{cLetter:"z",editTypeOverride:"calc"}))}),xV=Dt((Q,Z)=>{var c=kn(),g=mc(),I=vb(),S=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(t,e,r,a){function n(v,T){return c.coerce(t,e,I,v,T)}var o=n("locations"),i=n("z");if(!(o&&o.length&&c.isArrayOrTypedArray(i)&&i.length)){e.visible=!1;return}e._length=Math.min(o.length,i.length);var l=n("geojson"),f;(typeof l=="string"&&l!==""||c.isPlainObject(l))&&(f="geojson-id");var x=n("locationmode",f);x==="country names"&&c.warn(S),x==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var y=n("marker.line.width");y&&n("marker.line.color"),n("marker.opacity"),g(t,e,a,n,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(e,n)}}),aT=Dt((Q,Z)=>{var c=Hn(),g=sa().BADNUM,I=Xd(),S=ct(),t=Rt();function e(r){return r&&typeof r=="string"}Z.exports=function(r,a){var n=a._length,o=new Array(n),i;a.geojson?i=function(v){return e(v)||c(v)}:i=e;for(var l=0;l{var c=Wr(),g=pi(),I=Vs(),S=Xc();function t(a,n){n&&e(a,n)}function e(a,n){var o=n[0].trace,i=n[0].node3,l=i.selectAll(".choroplethlocation"),f=o.marker||{},x=f.line||{},y=S.makeColorScaleFuncFromTrace(o);l.each(function(v){c.select(this).attr("fill",y(v.z)).call(g.stroke,v.mlc||x.color).call(I.dashLine,"",v.mlw||x.width||0).style("opacity",f.opacity)}),I.selectedPointStyle(l,o)}function r(a,n){var o=n[0].node3,i=n[0].trace;i.selectedpoints?I.selectedPointStyle(o.selectAll(".choroplethlocation"),i):e(a,n)}Z.exports={style:t,styleOnSelect:r}}),FS=Dt((Q,Z)=>{var c=Wr(),g=kn(),I=$1(),S=rT().getTopojsonFeatures,t=K0().findExtremes,e=oT().style;function r(n,o,i){var l=o.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(l,i,"trace choropleth").each(function(f){var x=c.select(this),y=x.selectAll("path.choroplethlocation").data(g.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),e(n,f)})}function a(n,o){for(var i=n[0].trace,l=o[i.geo],f=l._subplot,x=i.locationmode,y=i._length,v=x==="geojson-id"?I.extractTraceFeature(n):S(i,f.topojson),T=[],u=[],b=0;b{var c=Ls(),g=vb(),I=kn().fillText;Z.exports=function(t,e,r){var a=t.cd,n=a[0].trace,o=t.subplot,i,l,f,x,y=[e,r],v=[e+360,r];for(l=0;l")}}}),lT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.location=g.location,c.z=g.z;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c.ct=e.ct,c}}),uT=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a,n,o,i;if(g===!1)for(r=0;r{Z.exports={attributes:vb(),supplyDefaults:xV(),colorbar:O1(),calc:aT(),calcGeoJSON:FS().calcGeoJSON,plot:FS().plot,style:oT().style,styleOnSelect:oT().styleOnSelect,hoverPoints:sT(),eventData:lT(),selectPoints:uT(),moduleType:"trace",name:"choropleth",basePlotModule:DS(),categories:["geo","noOpacity","showLegend"],meta:{}}}),bV=Dt((Q,Z)=>{Z.exports=_V()}),cT=Dt((Q,Z)=>{var c=Qo(),g=kn(),I=Bu();function S(e,r,a,n){var o=e.cd,i=o[0].t,l=o[0].trace,f=e.xa,x=e.ya,y=i.x,v=i.y,T=f.c2p(r),u=x.c2p(a),b=e.distance,_;if(i.tree){var P=f.p2c(T-b),M=f.p2c(T+b),C=x.p2c(u-b),A=x.p2c(u+b);n==="x"?_=i.tree.range(Math.min(P,M),Math.min(x._rl[0],x._rl[1]),Math.max(P,M),Math.max(x._rl[0],x._rl[1])):_=i.tree.range(Math.min(P,M),Math.min(C,A),Math.max(P,M),Math.max(C,A))}else _=i.ids;var h,p,k,w,B,O,j,V,H,F=b;if(n==="x"){var U=!!l.xperiodalignment,W=!!l.yperiodalignment;for(B=0;B<_.length;B++){if(h=_[B],k=y[h],O=Math.abs(f.c2p(k)-T),U){var q=f.c2p(l._xStarts[h]),J=f.c2p(l._xEnds[h]);O=T>=Math.min(q,J)&&T<=Math.max(q,J)?0:1/0}if(O=Math.min(lt,yt)&&u<=Math.max(lt,yt)?0:1/0}H=Math.sqrt(O*O+j*j),p=_[B]}}}else for(B=_.length-1;B>-1;B--)h=_[B],k=y[h],w=v[h],O=f.c2p(k)-T,j=x.c2p(w)-u,V=Math.sqrt(O*O+j*j),V{var c=20;Z.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c,SYMBOL_STROKE:c/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]}}}),A3=Dt((Q,Z)=>{var c=qo(),g=ma(),I=z0(),S=ef(),t=ph().axisHoverFormat,e=kc(),r=Y0(),a=Ia().extendFlat,n=Yc().overrideAll,o=Z1().DASHES,i=S.line,l=S.marker,f=l.line,x=Z.exports=n({x:S.x,x0:S.x0,dx:S.dx,y:S.y,y0:S.y0,dy:S.dy,xperiod:S.xperiod,yperiod:S.yperiod,xperiod0:S.xperiod0,yperiod0:S.yperiod0,xperiodalignment:S.xperiodalignment,yperiodalignment:S.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:S.text,hovertext:S.hovertext,textposition:S.textposition,textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(o),dflt:"solid"}},marker:a({},e("marker"),{symbol:l.symbol,angle:l.angle,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,opacity:l.opacity,colorbar:l.colorbar,line:a({},e("marker.line"),{width:f.width})}),connectgaps:S.connectgaps,fill:a({},S.fill,{dflt:"none"}),fillcolor:I(),selected:{marker:S.selected.marker,textfont:S.selected.textfont},unselected:{marker:S.unselected.marker,textfont:S.unselected.textfont},opacity:c.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=S.hovertemplate,x.hovertemplatefallback=S.hovertemplatefallback,x.texttemplate=S.texttemplate,x.texttemplatefallback=S.texttemplatefallback}),hT=Dt(Q=>{var Z=Z1();Q.isOpenSymbol=function(c){return typeof c=="string"?Z.OPEN_RE.test(c):c%200>100},Q.isDotSymbol=function(c){return typeof c=="string"?Z.DOT_RE.test(c):c>200}}),wV=Dt((Q,Z)=>{var c=kn(),g=Qo(),I=hT(),S=A3(),t=vm(),e=Tc(),r=Wm(),a=Bp(),n=s0(),o=O0(),i=D0(),l=x0();Z.exports=function(f,x,y,v){function T(h,p){return c.coerce(f,x,S,h,p)}var u=f.marker?I.isOpenSymbol(f.marker.symbol):!1,b=e.isBubble(f),_=r(f,x,v,T);if(!_){x.visible=!1;return}a(f,x,v,T),T("xhoverformat"),T("yhoverformat");var P=_{var c=Ws();Z.exports=function(g,I,S){var t=g.i;return"x"in g||(g.x=I._x[t]),"y"in g||(g.y=I._y[t]),c(g,I,S)}}),TV=Dt((Q,Z)=>{function c(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>=0?(l=f,i=f-1):o=f+1}return l}function g(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>0?(l=f,i=f-1):o=f+1}return l}function I(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<0?(l=f,o=f+1):i=f-1}return l}function S(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<=0?(l=f,o=f+1):i=f-1}return l}function t(r,a,n,o,i){for(;o<=i;){var l=o+i>>>1,f=r[l],x=n!==void 0?n(f,a):f-a;if(x===0)return l;x<=0?o=l+1:i=l-1}return-1}function e(r,a,n,o,i,l){return typeof n=="function"?l(r,a,n,o===void 0?0:o|0,i===void 0?r.length-1:i|0):l(r,a,void 0,n===void 0?0:n|0,o===void 0?r.length-1:o|0)}Z.exports={ge:function(r,a,n,o,i){return e(r,a,n,o,i,c)},gt:function(r,a,n,o,i){return e(r,a,n,o,i,g)},lt:function(r,a,n,o,i){return e(r,a,n,o,i,I)},le:function(r,a,n,o,i){return e(r,a,n,o,i,S)},eq:function(r,a,n,o,i){return e(r,a,n,o,i,t)}}}),zg=Dt((Q,Z)=>{Z.exports=function(I,S,t){var e={},r,a;if(typeof S=="string"&&(S=g(S)),Array.isArray(S)){var n={};for(a=0;a{var c=zg();Z.exports=g;function g(I){var S;return arguments.length>1&&(I=arguments),typeof I=="string"?I=I.split(/\s/).map(parseFloat):typeof I=="number"&&(I=[I]),I.length&&typeof I[0]=="number"?I.length===1?S={width:I[0],height:I[0],x:0,y:0}:I.length===2?S={width:I[0],height:I[1],x:0,y:0}:S={x:I[0],y:I[1],width:I[2]-I[0]||0,height:I[3]-I[1]||0}:I&&(I=c(I,{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"}),S={x:I.left||0,y:I.top||0},I.width==null?I.right?S.width=I.right-S.x:S.width=0:S.width=I.width,I.height==null?I.bottom?S.height=I.bottom-S.y:S.height=0:S.height=I.height),S}}),_x=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(!g||g.length==null)throw Error("Argument should be an array");I==null?I=1:I=Math.floor(I);for(var S=Array(I*2),t=0;te&&(e=g[a]),g[a]{Z.exports=function(){for(var c=0;c{var c=Kk();Z.exports=g;function g(I,S,t){if(!I)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(I)&&I[0]&&typeof I[0][0]=="number"){var e=I[0].length,r=I.length*e,a,n,o,i;(!S||typeof S=="string")&&(S=new(c(S||"float32"))(r+t));var l=S.length-t;if(r!==l)throw new Error("source length "+r+" ("+e+"x"+I.length+") does not match destination length "+l);for(a=0,o=t;a{Z.exports=function(c){var g=typeof c;return c!==null&&(g==="object"||g==="function")}}),SV=Dt((Q,Z)=>{Z.exports=Math.log2||function(c){return Math.log(c)*Math.LOG2E}}),EV=Dt((Q,Z)=>{var c=TV(),g=b3(),I=yb(),S=_x(),t=zg(),e=AV(),r=bx(),a=MV(),n=Kk(),o=SV(),i=1073741824;Z.exports=function(f,x){x||(x={}),f=r(f,"float64"),x=t(x,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let y=e(x.maxDepth,255),v=e(x.bounds,S(f,2));v[0]===v[2]&&v[2]++,v[1]===v[3]&&v[3]++;let T=l(f,v),u=f.length>>>1,b;x.dtype||(x.dtype="array"),typeof x.dtype=="string"?b=new(n(x.dtype))(u):x.dtype&&(b=x.dtype,Array.isArray(b)&&(b.length=u));for(let B=0;By||F>i){for(let at=0;atft||q>ut||J=yt||it===K)return;let kt=_[vt];K===void 0&&(K=kt.length);for(let se=it;se=V&&Lt<=F&&Mt>=H&&Mt<=U&&mt.push(Tt)}let It=P[vt],Pt=It[it*4+0],qt=It[it*4+1],Wt=It[it*4+2],Jt=It[it*4+3],ge=tt(It,it+1),fe=at*.5,pe=vt+1;st(pt,rt,fe,pe,Pt,qt||Wt||Jt||ge),st(pt,rt+fe,fe,pe,qt,Wt||Jt||ge),st(pt+fe,rt,fe,pe,Wt,Jt||ge),st(pt+fe,rt+fe,fe,pe,Jt,ge)}function tt(pt,rt){let at=null,vt=0;for(;at===null;)if(at=pt[rt*4+vt],vt++,vt>pt.length)return null;return at}return mt}function k(B,O,j,V,H){let F=[];for(let U=0;U{Z.exports=EV()}),BS=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=0,S=0,t=0,e=0;return g.map(function(r){r=r.slice();var a=r[0],n=a.toUpperCase();if(a!=n)switch(r[0]=n,a){case"a":r[6]+=t,r[7]+=e;break;case"v":r[1]+=e;break;case"h":r[1]+=t;break;default:for(var o=1;o{Object.defineProperty(Q,"__esModule",{value:!0});var c=function(){function a(n,o){var i=[],l=!0,f=!1,x=void 0;try{for(var y=n[Symbol.iterator](),v;!(l=(v=y.next()).done)&&(i.push(v.value),!(o&&i.length===o));l=!0);}catch(T){f=!0,x=T}finally{try{!l&&y.return&&y.return()}finally{if(f)throw x}}return i}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return a(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=Math.PI*2,I=function(a,n,o,i,l,f,x){var y=a.x,v=a.y;y*=n,v*=o;var T=i*y-l*v,u=l*y+i*v;return{x:T+f,y:u+x}},S=function(a,n){var o=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),i=Math.cos(a),l=Math.sin(a),f=Math.cos(a+n),x=Math.sin(a+n);return[{x:i-l*o,y:l+i*o},{x:f+x*o,y:x-f*o},{x:f,y:x}]},t=function(a,n,o,i){var l=a*i-n*o<0?-1:1,f=a*o+n*i;return f>1&&(f=1),f<-1&&(f=-1),l*Math.acos(f)},e=function(a,n,o,i,l,f,x,y,v,T,u,b){var _=Math.pow(l,2),P=Math.pow(f,2),M=Math.pow(u,2),C=Math.pow(b,2),A=_*P-_*C-P*M;A<0&&(A=0),A/=_*C+P*M,A=Math.sqrt(A)*(x===y?-1:1);var h=A*l/f*b,p=A*-f/l*u,k=T*h-v*p+(a+o)/2,w=v*h+T*p+(n+i)/2,B=(u-h)/l,O=(b-p)/f,j=(-u-h)/l,V=(-b-p)/f,H=t(1,0,B,O),F=t(B,O,j,V);return y===0&&F>0&&(F-=g),y===1&&F<0&&(F+=g),[k,w,H,F]},r=function(a){var n=a.px,o=a.py,i=a.cx,l=a.cy,f=a.rx,x=a.ry,y=a.xAxisRotation,v=y===void 0?0:y,T=a.largeArcFlag,u=T===void 0?0:T,b=a.sweepFlag,_=b===void 0?0:b,P=[];if(f===0||x===0)return[];var M=Math.sin(v*g/360),C=Math.cos(v*g/360),A=C*(n-i)/2+M*(o-l)/2,h=-M*(n-i)/2+C*(o-l)/2;if(A===0&&h===0)return[];f=Math.abs(f),x=Math.abs(x);var p=Math.pow(A,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(x,2);p>1&&(f*=Math.sqrt(p),x*=Math.sqrt(p));var k=e(n,o,i,l,f,x,u,_,M,C,A,h),w=c(k,4),B=w[0],O=w[1],j=w[2],V=w[3],H=Math.abs(V)/(g/4);Math.abs(1-H)<1e-7&&(H=1);var F=Math.max(Math.ceil(H),1);V/=F;for(var U=0;U{Z.exports=g;var c=CV();function g(t){for(var e,r=[],a=0,n=0,o=0,i=0,l=null,f=null,x=0,y=0,v=0,T=t.length;v4?(a=u[u.length-4],n=u[u.length-3]):(a=x,n=y),r.push(u)}return r}function I(t,e,r,a){return["C",t,e,r,a,r,a]}function S(t,e,r,a,n,o){return["C",t/3+2/3*r,e/3+2/3*a,n/3+2/3*r,o/3+2/3*a,n,o]}}),RS=Dt((Q,Z)=>{Z.exports=function(c){return typeof c!="string"?!1:(c=c.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(c)&&/[\dz]$/i.test(c)&&c.length>4))}}),PV=Dt((Q,Z)=>{var c=C1(),g=BS(),I=LV(),S=RS(),t=e3();Z.exports=e;function e(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(t(S(r),"String is not an SVG path."),r=c(r)),t(Array.isArray(r),"Argument should be a string or an array of path segments."),r=g(r),r=I(r),!r.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],n=0,o=r.length;na[2]&&(a[2]=i[l+0]),i[l+1]>a[3]&&(a[3]=i[l+1]);return a}}),IV=Dt((Q,Z)=>{var c=Math.PI,g=a(120);Z.exports=I;function I(n){for(var o,i=[],l=0,f=0,x=0,y=0,v=null,T=null,u=0,b=0,_=0,P=n.length;_7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var A=u,h=b;(o=="C"||o=="S")&&(A+=A-l,h+=h-f),M=["C",A,h,M[1],M[2],M[3],M[4]];break;case"T":o=="Q"||o=="T"?(v=u*2-v,T=b*2-T):(v=u,T=b),M=t(u,b,v,T,M[1],M[2]);break;case"Q":v=M[1],T=M[2],M=t(u,b,M[1],M[2],M[3],M[4]);break;case"L":M=S(u,b,M[1],M[2]);break;case"H":M=S(u,b,M[1],b);break;case"V":M=S(u,b,u,M[1]);break;case"Z":M=S(u,b,x,y);break}o=C,u=M[M.length-2],b=M[M.length-1],M.length>4?(l=M[M.length-4],f=M[M.length-3]):(l=u,f=b),i.push(M)}return i}function S(n,o,i,l){return["C",n,o,i,l,i,l]}function t(n,o,i,l,f,x){return["C",n/3+2/3*i,o/3+2/3*l,f/3+2/3*i,x/3+2/3*l,f,x]}function e(n,o,i,l,f,x,y,v,T,u){if(u)w=u[0],B=u[1],p=u[2],k=u[3];else{var b=r(n,o,-f);n=b.x,o=b.y,b=r(v,T,-f),v=b.x,T=b.y;var _=(n-v)/2,P=(o-T)/2,M=_*_/(i*i)+P*P/(l*l);M>1&&(M=Math.sqrt(M),i=M*i,l=M*l);var C=i*i,A=l*l,h=(x==y?-1:1)*Math.sqrt(Math.abs((C*A-C*P*P-A*_*_)/(C*P*P+A*_*_)));h==1/0&&(h=1);var p=h*i*P/l+(n+v)/2,k=h*-l*_/i+(o+T)/2,w=Math.asin(((o-k)/l).toFixed(9)),B=Math.asin(((T-k)/l).toFixed(9));w=nB&&(w=w-c*2),!y&&B>w&&(B=B-c*2)}if(Math.abs(B-w)>g){var O=B,j=v,V=T;B=w+g*(y&&B>w?1:-1),v=p+i*Math.cos(B),T=k+l*Math.sin(B);var H=e(v,T,i,l,f,0,y,j,V,[B,O,p,k])}var F=Math.tan((B-w)/4),U=4/3*i*F,W=4/3*l*F,q=[2*n-(n+U*Math.sin(w)),2*o-(o-W*Math.cos(w)),v+U*Math.sin(B),T-W*Math.cos(B),v,T];if(u)return q;H&&(q=q.concat(H));for(var J=0;J{var c=BS(),g=IV(),I={M:"moveTo",C:"bezierCurveTo"};Z.exports=function(S,t){S.beginPath(),g(c(t)).forEach(function(e){var r=e[0],a=e.slice(1);S[I[r]].apply(S,a)}),S.closePath()}}),OV=Dt((Q,Z)=>{var c=b3();Z.exports=I;var g=1e20;function I(e,r){r||(r={});var a=r.cutoff==null?.25:r.cutoff,n=r.radius==null?8:r.radius,o=r.channel||0,i,l,f,x,y,v,T,u,b,_,P;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,l=r.height,x=e,r.stride?v=r.stride:v=Math.floor(e.length/i/l)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=e,T=u.getContext("2d"),i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e.canvas,T=e,i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.ImageData&&e instanceof window.ImageData&&(b=e,i=e.width,l=e.height,x=b.data,v=4);if(f=Math.max(i,l),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(y=x,x=Array(i*l),_=0,P=y.length;_{var c=PV(),g=C1(),I=zV(),S=RS(),t=OV(),e=document.createElement("canvas"),r=e.getContext("2d");Z.exports=a;function a(i,l){if(!S(i))throw Error("Argument should be valid svg path string");l||(l={});var f,x;l.shape?(f=l.shape[0],x=l.shape[1]):(f=e.width=l.w||l.width||200,x=e.height=l.h||l.height||200);var y=Math.min(f,x),v=l.stroke||0,T=l.viewbox||l.viewBox||c(i),u=[f/(T[2]-T[0]),x/(T[3]-T[1])],b=Math.min(u[0]||0,u[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,f,x),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(f*.5,x*.5),r.scale(b,b),o()){var _=new Path2D(i);r.fill(_),v&&r.stroke(_)}else{var P=g(i);I(r,P),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=t(r,{cutoff:l.cutoff!=null?l.cutoff:.5,radius:l.radius!=null?l.radius:y*.5});return M}var n;function o(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var l=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(l);var f=i.getImageData(0,0,1,1);return n=f&&f.data&&f.data[3]===255}}),wx=Dt((Q,Z)=>{var c=Hn(),g=DV(),I=H1(),S=Qo(),t=kn(),e=t.isArrayOrTypedArray,r=Vs(),a=Bc(),n=Sv().formatColor,o=Tc(),i=wg(),l=hT(),f=Z1(),x=go().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Fp().appendArrayPointValue;function T(H,F){var U,W={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},q=H._context.plotGlPixelRatio;if(F.visible!==!0)return W;if(o.hasText(F)&&(W.text=u(H,F),W.textSel=M(H,F,F.selected),W.textUnsel=M(H,F,F.unselected)),o.hasMarkers(F)&&(W.marker=_(H,F),W.markerSel=P(H,F,F.selected),W.markerUnsel=P(H,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var J=F.marker.opacity;for(W.markerUnsel.opacity=new Array(J.length),U=0;U500?"bold":"normal":H}function _(H,F){var U=F._length,W=F.marker,q={},J,lt=e(W.symbol),yt=e(W.angle),mt=e(W.color),st=e(W.line.color),tt=e(W.opacity),pt=e(W.size),rt=e(W.line.width),at;if(lt||(at=l.isOpenSymbol(W.symbol)),lt||mt||st||tt||yt){q.symbols=new Array(U),q.angles=new Array(U),q.colors=new Array(U),q.borderColors=new Array(U);var vt=W.symbol,it=W.angle,K=n(W,W.opacity,U),ft=n(W.line,W.opacity,U);if(!e(ft[0])){var ut=ft;for(ft=Array(U),J=0;Jf.TOO_MANY_POINTS||o.hasMarkers(F)?"rect":"round";if(st&&F.connectgaps){var pt=J[0],rt=J[1];for(lt=0;lt1?mt[lt]:mt[0]:mt,at=e(st)?st.length>1?st[lt]:st[0]:st,vt=y[rt],it=y[at],K=tt?tt/.8+1:0,ft=-it*K-it*.5;J.offset[lt]=[vt*K/pt,ft/pt]}}return J}Z.exports={style:T,markerStyle:_,markerSelection:P,linePositions:O,errorBarPositions:j,textPosition:V}}),NS=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=I._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},e={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return I._scene||(S=I._scene={},S.init=function(){c.extendFlat(S,e,t)},S.init(),S.update=function(r){var a=c.repeat(r,S.count);if(S.fill2d&&S.fill2d.update(a),S.scatter2d&&S.scatter2d.update(a),S.line2d&&S.line2d.update(a),S.error2d&&S.error2d.update(a.concat(a)),S.select2d&&S.select2d.update(a),S.glText)for(var n=0;n{var c=fT(),g=kn(),I=Bc(),S=K0().findExtremes,t=F0(),e=me(),r=e.calcMarkerSize,a=e.calcAxisExpansion,n=e.setFirstScatter,o=B0(),i=wx(),l=NS(),f=sa().BADNUM,x=Z1().TOO_MANY_POINTS;Z.exports=function(T,u){var b=T._fullLayout,_=u._xA=I.getFromId(T,u.xaxis,"x"),P=u._yA=I.getFromId(T,u.yaxis,"y"),M=b._plots[u.xaxis+u.yaxis],C=u._length,A=C>=x,h=C*2,p={},k,w=_.makeCalcdata(u,"x"),B=P.makeCalcdata(u,"y"),O=t(u,_,"x",w),j=t(u,P,"y",B),V=O.vals,H=j.vals;u._x=V,u._y=H,u.xperiodalignment&&(u._origX=w,u._xStarts=O.starts,u._xEnds=O.ends),u.yperiodalignment&&(u._origY=B,u._yStarts=j.starts,u._yEnds=j.ends);var F=new Array(h),U=new Array(C);for(k=0;k1&&g.extendFlat(C.line,i.linePositions(T,b,_)),C.errorX||C.errorY){var A=i.errorBarPositions(T,b,_,P,M);C.errorX&&g.extendFlat(C.errorX,A.x),C.errorY&&g.extendFlat(C.errorY,A.y)}return C.text&&(g.extendFlat(C.text,{positions:_},i.textPosition(T,b,C.text,C.marker)),g.extendFlat(C.textSel,{positions:_},i.textPosition(T,b,C.text,C.markerSel)),g.extendFlat(C.textUnsel,{positions:_},i.textPosition(T,b,C.text,C.markerUnsel))),C}}),jS=Dt((Q,Z)=>{var c=kn(),g=pi(),I=go().DESELECTDIM;function S(t){var e=t[0],r=e.trace,a=e.t,n=a._scene,o=a.index,i=n.selectBatch[o],l=n.unselectBatch[o],f=n.textOptions[o],x=n.textSelectedOptions[o]||{},y=n.textUnselectedOptions[o]||{},v=c.extendFlat({},f),T,u;if(i.length||l.length){var b=x.color,_=y.color,P=f.color,M=c.isArrayOrTypedArray(P);for(v.color=new Array(r._length),T=0;T{var c=Tc(),g=jS().styleTextSelection;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o=t[0].t,i=n._length,l=o.x,f=o.y,x=o._scene,y=o.index;if(!x)return a;var v=c.hasText(n),T=c.hasMarkers(n),u=!T&&!v;if(n.visible!==!0||u)return a;var b=[],_=[];if(S!==!1&&!S.degenerate)for(var P=0;P{var c=cT();Z.exports={moduleType:"trace",name:"scattergl",basePlotModule:Mf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:A3(),supplyDefaults:wV(),crossTraceDefaults:Bw(),colorbar:xo(),formatLabels:kV(),calc:FV(),hoverPoints:c.hoverPoints,selectPoints:US(),meta:{}}}),RV=Dt((Q,Z)=>{var c=b3();Z.exports=g,Z.exports.to=g,Z.exports.from=I;function g(S,t){t==null&&(t=!0);var e=S[0],r=S[1],a=S[2],n=S[3];n==null&&(n=t?1:255),t&&(e*=255,r*=255,a*=255,n*=255),e=c(e,0,255)&255,r=c(r,0,255)&255,a=c(a,0,255)&255,n=c(n,0,255)&255;var o=e*16777216+(r<<16)+(a<<8)+n;return o}function I(S,t){S=+S;var e=S>>>24,r=(S&16711680)>>>16,a=(S&65280)>>>8,n=S&255;return t===!1?[e,r,a,n]:[e/255,r/255,a/255,n/255]}}),Sd=Dt((Q,Z)=>{var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function t(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},a=0;a<10;a++)r["_"+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Z.exports=t()?Object.assign:function(e,r){for(var a,n=S(e),o,i=1;i{Z.exports=function(c){typeof c=="string"&&(c=[c]);for(var g=[].slice.call(arguments,1),I=[],S=0;S{Z.exports=function(c,g,I){Array.isArray(I)||(I=[].slice.call(arguments,2));for(var S=0,t=I.length;S{Z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}),dT=Dt((Q,Z)=>{Z.exports=I,Z.exports.float32=Z.exports.float=I,Z.exports.fract32=Z.exports.fract=g;var c=new Float32Array(1);function g(S,t){if(S.length){if(S instanceof Float32Array)return new Float32Array(S.length);t instanceof Float32Array||(t=I(S));for(var e=0,r=t.length;e{function c(k,w){var B=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(B!=null){var O,j,V,H,F=[],U=!0,W=!1;try{if(V=(B=B.call(k)).next,w!==0)for(;!(U=(O=V.call(B)).done)&&(F.push(O.value),F.length!==w);U=!0);}catch(q){W=!0,j=q}finally{try{if(!U&&B.return!=null&&(H=B.return(),Object(H)!==H))return}finally{if(W)throw j}}return F}}function g(k,w){return t(k)||c(k,w)||r(k,w)||o()}function I(k){return S(k)||e(k)||r(k)||n()}function S(k){if(Array.isArray(k))return a(k)}function t(k){if(Array.isArray(k))return k}function e(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}function r(k,w){if(k){if(typeof k=="string")return a(k,w);var B=Object.prototype.toString.call(k).slice(8,-1);if(B==="Object"&&k.constructor&&(B=k.constructor.name),B==="Map"||B==="Set")return Array.from(k);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return a(k,w)}}function a(k,w){(w==null||w>k.length)&&(w=k.length);for(var B=0,O=new Array(w);BTt)?pe.tree=x(fe,{bounds:oe}):Tt&&Tt.length&&(pe.tree=Tt),pe.tree){var Te={primitive:"points",usage:"static",data:pe.tree,type:"uint32"};pe.elements?pe.elements(Te):pe.elements=H.elements(Te)}var He=P.float32(fe);Lt({data:He,usage:"dynamic"});var Ge=P.fract32(fe,He);return Mt({data:Ge,usage:"dynamic"}),ee({data:new Uint8Array(ve),type:"uint8",usage:"stream"}),fe}},{marker:function(fe,pe,se){var Tt=pe.activation;if(Tt.forEach(function(Ge){return Ge&&Ge.destroy&&Ge.destroy()}),Tt.length=0,!fe||typeof fe[0]=="number"){var Lt=k.addMarker(fe);Tt[Lt]=!0}else{for(var Mt=[],ee=0,ve=Math.min(fe.length,pe.count);ee=0)return j;var V;if(k instanceof Uint8Array||k instanceof Uint8ClampedArray)V=k;else{V=new Uint8Array(k.length);for(var H=0,F=k.length;HO*4&&(this.tooManyColors=!0),this.updatePalette(R),j.length===1?j[0]:j},A.prototype.updatePalette=function(k){if(!this.tooManyColors){var w=this.maxColors,R=this.paletteTexture,O=Math.ceil(k.length*.25/w);if(O>1){k=k.slice();for(var j=k.length*.25%w;j{Z.exports=c,Z.exports.default=c;function c(H,F,U){U=U||2;var W=F&&F.length,q=W?F[0]*U:H.length,J=g(H,0,q,U,!0),lt=[];if(!J||J.next===J.prev)return lt;var yt,mt,st,tt,dt,rt,at;if(W&&(J=n(H,F,J,U)),H.length>80*U){yt=st=H[0],mt=tt=H[1];for(var vt=U;vtst&&(st=dt),rt>tt&&(tt=rt);at=Math.max(st-yt,tt-mt),at=at!==0?32767/at:0}return S(J,lt,U,yt,mt,at,0),lt}function g(H,F,U,W,q){var J,lt;if(q===V(H,F,U,W)>0)for(J=F;J=F;J-=W)lt=R(J,H[J],H[J+1],lt);return lt&&P(lt,lt.next)&&(O(lt),lt=lt.next),lt}function I(H,F){if(!H)return H;F||(F=H);var U=H,W;do if(W=!1,!U.steiner&&(P(U,U.next)||_(U.prev,U,U.next)===0)){if(O(U),U=F=U.prev,U===U.next)break;W=!0}else U=U.next;while(W||U!==F);return F}function S(H,F,U,W,q,J,lt){if(H){!lt&&J&&x(H,W,q,J);for(var yt=H,mt,st;H.prev!==H.next;){if(mt=H.prev,st=H.next,J?e(H,W,q,J):t(H)){F.push(mt.i/U|0),F.push(H.i/U|0),F.push(st.i/U|0),O(H),H=st.next,yt=st.next;continue}if(H=st,H===yt){lt?lt===1?(H=r(I(H),F,U),S(H,F,U,W,q,J,2)):lt===2&&a(H,F,U,W,q,J):S(I(H),F,U,W,q,J,1);break}}}}function t(H){var F=H.prev,U=H,W=H.next;if(_(F,U,W)>=0)return!1;for(var q=F.x,J=U.x,lt=W.x,yt=F.y,mt=U.y,st=W.y,tt=qJ?q>lt?q:lt:J>lt?J:lt,at=yt>mt?yt>st?yt:st:mt>st?mt:st,vt=W.next;vt!==F;){if(vt.x>=tt&&vt.x<=rt&&vt.y>=dt&&vt.y<=at&&u(q,yt,J,mt,lt,st,vt.x,vt.y)&&_(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function e(H,F,U,W){var q=H.prev,J=H,lt=H.next;if(_(q,J,lt)>=0)return!1;for(var yt=q.x,mt=J.x,st=lt.x,tt=q.y,dt=J.y,rt=lt.y,at=ytmt?yt>st?yt:st:mt>st?mt:st,Y=tt>dt?tt>rt?tt:rt:dt>rt?dt:rt,ft=v(at,vt,F,U,W),ut=v(it,Y,F,U,W),kt=H.prevZ,It=H.nextZ;kt&&kt.z>=ft&&It&&It.z<=ut;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=Y&&kt!==q&&kt!==lt&&u(yt,tt,mt,dt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0||(kt=kt.prevZ,It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=Y&&It!==q&&It!==lt&&u(yt,tt,mt,dt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0))return!1;It=It.nextZ}for(;kt&&kt.z>=ft;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=Y&&kt!==q&&kt!==lt&&u(yt,tt,mt,dt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0)return!1;kt=kt.prevZ}for(;It&&It.z<=ut;){if(It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=Y&&It!==q&&It!==lt&&u(yt,tt,mt,dt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0)return!1;It=It.nextZ}return!0}function r(H,F,U){var W=H;do{var q=W.prev,J=W.next.next;!P(q,J)&&M(q,W,W.next,J)&&p(q,J)&&p(J,q)&&(F.push(q.i/U|0),F.push(W.i/U|0),F.push(J.i/U|0),O(W),O(W.next),W=H=J),W=W.next}while(W!==H);return I(W)}function a(H,F,U,W,q,J){var lt=H;do{for(var yt=lt.next.next;yt!==lt.prev;){if(lt.i!==yt.i&&b(lt,yt)){var mt=w(lt,yt);lt=I(lt,lt.next),mt=I(mt,mt.next),S(lt,F,U,W,q,J,0),S(mt,F,U,W,q,J,0);return}yt=yt.next}lt=lt.next}while(lt!==H)}function n(H,F,U,W){var q=[],J,lt,yt,mt,st;for(J=0,lt=F.length;J=U.next.y&&U.next.y!==U.y){var yt=U.x+(q-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(yt<=W&&yt>J&&(J=yt,lt=U.x=U.x&&U.x>=st&&W!==U.x&&u(qlt.x||U.x===lt.x&&f(lt,U)))&&(lt=U,dt=rt)),U=U.next;while(U!==mt);return lt}function f(H,F){return _(H.prev,H,F.prev)<0&&_(F.next,H,H.next)<0}function x(H,F,U,W){var q=H;do q.z===0&&(q.z=v(q.x,q.y,F,U,W)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==H);q.prevZ.nextZ=null,q.prevZ=null,y(q)}function y(H){var F,U,W,q,J,lt,yt,mt,st=1;do{for(U=H,H=null,J=null,lt=0;U;){for(lt++,W=U,yt=0,F=0;F0||mt>0&&W;)yt!==0&&(mt===0||!W||U.z<=W.z)?(q=U,U=U.nextZ,yt--):(q=W,W=W.nextZ,mt--),J?J.nextZ=q:H=q,q.prevZ=J,J=q;U=W}J.nextZ=null,st*=2}while(lt>1);return H}function v(H,F,U,W,q){return H=(H-U)*q|0,F=(F-W)*q|0,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,H|F<<1}function T(H){var F=H,U=H;do(F.x=(H-lt)*(J-yt)&&(H-lt)*(W-yt)>=(U-lt)*(F-yt)&&(U-lt)*(J-yt)>=(q-lt)*(W-yt)}function b(H,F){return H.next.i!==F.i&&H.prev.i!==F.i&&!h(H,F)&&(p(H,F)&&p(F,H)&&k(H,F)&&(_(H.prev,H,F.prev)||_(H,F.prev,F))||P(H,F)&&_(H.prev,H,H.next)>0&&_(F.prev,F,F.next)>0)}function _(H,F,U){return(F.y-H.y)*(U.x-F.x)-(F.x-H.x)*(U.y-F.y)}function P(H,F){return H.x===F.x&&H.y===F.y}function M(H,F,U,W){var q=A(_(H,F,U)),J=A(_(H,F,W)),lt=A(_(U,W,H)),yt=A(_(U,W,F));return!!(q!==J&<!==yt||q===0&&C(H,U,F)||J===0&&C(H,W,F)||lt===0&&C(U,H,W)||yt===0&&C(U,F,W))}function C(H,F,U){return F.x<=Math.max(H.x,U.x)&&F.x>=Math.min(H.x,U.x)&&F.y<=Math.max(H.y,U.y)&&F.y>=Math.min(H.y,U.y)}function A(H){return H>0?1:H<0?-1:0}function h(H,F){var U=H;do{if(U.i!==H.i&&U.next.i!==H.i&&U.i!==F.i&&U.next.i!==F.i&&M(U,U.next,H,F))return!0;U=U.next}while(U!==H);return!1}function p(H,F){return _(H.prev,H,H.next)<0?_(H,F,H.next)>=0&&_(H,H.prev,F)>=0:_(H,F,H.prev)<0||_(H,H.next,F)<0}function k(H,F){var U=H,W=!1,q=(H.x+F.x)/2,J=(H.y+F.y)/2;do U.y>J!=U.next.y>J&&U.next.y!==U.y&&q<(U.next.x-U.x)*(J-U.y)/(U.next.y-U.y)+U.x&&(W=!W),U=U.next;while(U!==H);return W}function w(H,F){var U=new j(H.i,H.x,H.y),W=new j(F.i,F.x,F.y),q=H.next,J=F.prev;return H.next=F,F.prev=H,U.next=q,q.prev=U,W.next=U,U.prev=W,J.next=W,W.prev=J,W}function R(H,F,U,W){var q=new j(H,F,U);return W?(q.next=W.next,q.prev=W,W.next.prev=q,W.next=q):(q.prev=q,q.next=q),q}function O(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function j(H,F,U){this.i=H,this.x=F,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}c.deviation=function(H,F,U,W){var q=F&&F.length,J=q?F[0]*U:H.length,lt=Math.abs(V(H,0,J,U));if(q)for(var yt=0,mt=F.length;yt0&&(W+=H[q-1].length,U.holes.push(W))}return U}}),AV=Dt((Q,Z)=>{var c=yx();Z.exports=g;function g(I,S,t){if(!I||I.length==null)throw Error("Argument should be an array");S==null&&(S=1),t==null&&(t=c(I,S));for(var e=0;e{Z.exports=function(){var c,g;if(typeof WeakMap!="function")return!1;try{c=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(c)!=="[object WeakMap]"||typeof c.set!="function"||c.set({},1)!==c||typeof c.delete!="function"||typeof c.has!="function"||c.get(g)!=="one")}}),SV=Dt((Q,Z)=>{Z.exports=function(){}}),$1=Dt((Q,Z)=>{var c=SV()();Z.exports=function(g){return g!==c&&g!==null}}),VS=Dt((Q,Z)=>{var c=Object.create,g=Object.getPrototypeOf,I={};Z.exports=function(){var S=Object.setPrototypeOf,t=arguments[0]||c;return typeof S!="function"?!1:g(S(t(null),I))===I}}),HS=Dt((Q,Z)=>{var c=$1(),g={function:!0,object:!0};Z.exports=function(I){return c(I)&&g[typeof I]||!1}}),Mv=Dt((Q,Z)=>{var c=$1();Z.exports=function(g){if(!c(g))throw new TypeError("Cannot use null or undefined");return g}}),EV=Dt((Q,Z)=>{var c=Object.create,g;VS()()||(g=WS()),Z.exports=function(){var I,S,t;return!g||g.level!==1?c:(I={},S={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){S[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}S[e]=t}),Object.defineProperties(I,S),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:I}),function(e,r){return c(e===null?I:e,r)})}()}),WS=Dt((Q,Z)=>{var c=HS(),g=Mv(),I=Object.prototype.isPrototypeOf,S=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(r,a){if(g(r),a===null||c(a))return r;throw new TypeError("Prototype must be null or an object")},Z.exports=function(r){var a,n;return r?(r.level===2?r.set?(n=r.set,a=function(o,i){return n.call(e(o,i),i),o}):a=function(o,i){return e(o,i).__proto__=i,o}:a=function o(i,l){var f;return e(i,l),f=I.call(o.nullPolyfill,i),f&&delete o.nullPolyfill.__proto__,l===null&&(l=o.nullPolyfill),i.__proto__=l,f&&S(o.nullPolyfill,"__proto__",t),i},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),a={},n,o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(o){try{n=o.set,n.call(r,a)}catch{}if(Object.getPrototypeOf(r)===a)return{set:n,level:2}}return r.__proto__=a,Object.getPrototypeOf(r)===a?{level:2}:(r={},r.__proto__=a,Object.getPrototypeOf(r)===a?{level:1}:!1)}()),EV()}),dT=Dt((Q,Z)=>{Z.exports=VS()()?Object.setPrototypeOf:WS()}),CV=Dt((Q,Z)=>{var c=HS();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not an Object");return g}}),LV=Dt((Q,Z)=>{var c=Object.create(null),g=Math.random;Z.exports=function(){var I;do I=g().toString(36).slice(2);while(c[I]);return I}}),bx=Dt((Q,Z)=>{var c=void 0;Z.exports=function(g){return g!==c&&g!==null}}),pT=Dt((Q,Z)=>{var c=bx(),g={object:!0,function:!0,undefined:!0};Z.exports=function(I){return c(I)?hasOwnProperty.call(g,typeof I):!1}}),PV=Dt((Q,Z)=>{var c=pT();Z.exports=function(g){if(!c(g))return!1;try{return g.constructor?g.constructor.prototype===g:!1}catch{return!1}}}),IV=Dt((Q,Z)=>{var c=PV();Z.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!c(g)}}),qS=Dt((Q,Z)=>{var c=IV(),g=/^\s*class[\s{/}]/,I=Function.prototype.toString;Z.exports=function(S){return!(!c(S)||g.test(I.call(S)))}}),zV=Dt((Q,Z)=>{Z.exports=function(){var c=Object.assign,g;return typeof c!="function"?!1:(g={foo:"raz"},c(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}}),OV=Dt((Q,Z)=>{Z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}),DV=Dt((Q,Z)=>{var c=$1(),g=Object.keys;Z.exports=function(I){return g(c(I)?Object(I):I)}}),FV=Dt((Q,Z)=>{Z.exports=OV()()?Object.keys:DV()}),RV=Dt((Q,Z)=>{var c=FV(),g=Mv(),I=Math.max;Z.exports=function(S,t){var e,r,a=I(arguments.length,2),n;for(S=Object(g(S)),n=function(o){try{S[o]=t[o]}catch(i){e||(e=i)}},r=1;r{Z.exports=zV()()?Object.assign:RV()}),$S=Dt((Q,Z)=>{var c=$1(),g=Array.prototype.forEach,I=Object.create,S=function(t,e){var r;for(r in t)e[r]=t[r]};Z.exports=function(t){var e=I(null);return g.call(arguments,function(r){c(r)&&S(Object(r),e)}),e}}),BV=Dt((Q,Z)=>{var c="razdwatrzy";Z.exports=function(){return typeof c.contains!="function"?!1:c.contains("dwa")===!0&&c.contains("foo")===!1}}),NV=Dt((Q,Z)=>{var c=String.prototype.indexOf;Z.exports=function(g){return c.call(this,g,arguments[1])>-1}}),ZS=Dt((Q,Z)=>{Z.exports=BV()()?String.prototype.contains:NV()}),Sv=Dt((Q,Z)=>{var c=bx(),g=qS(),I=mT(),S=$S(),t=ZS(),e=Z.exports=function(r,a){var n,o,i,l,f;return arguments.length<2||typeof r!="string"?(l=a,a=r,r=null):l=arguments[2],c(r)?(n=t.call(r,"c"),o=t.call(r,"e"),i=t.call(r,"w")):(n=i=!0,o=!1),f={value:a,configurable:n,enumerable:o,writable:i},l?I(S(l),f):f};e.gs=function(r,a,n){var o,i,l,f;return typeof r!="string"?(l=n,n=a,a=r,r=null):l=arguments[3],c(a)?g(a)?c(n)?g(n)||(l=n,n=void 0):n=void 0:(l=a,a=n=void 0):a=void 0,c(r)?(o=t.call(r,"c"),i=t.call(r,"e")):(o=!0,i=!1),f={get:a,set:n,configurable:o,enumerable:i},l?I(S(l),f):f}}),A3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call(function(){return arguments}());Z.exports=function(I){return c.call(I)===g}}),M3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call("");Z.exports=function(I){return typeof I=="string"||I&&typeof I=="object"&&(I instanceof String||c.call(I)===g)||!1}}),jV=Dt((Q,Z)=>{Z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}),UV=Dt((Q,Z)=>{var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};Z.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}()}),S3=Dt((Q,Z)=>{Z.exports=jV()()?globalThis:UV()}),VV=Dt((Q,Z)=>{var c=S3(),g={object:!0,symbol:!0};Z.exports=function(){var I=c.Symbol,S;if(typeof I!="function")return!1;S=I("test symbol");try{String(S)}catch{return!1}return!(!g[typeof I.iterator]||!g[typeof I.toPrimitive]||!g[typeof I.toStringTag])}}),HV=Dt((Q,Z)=>{Z.exports=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}}),GS=Dt((Q,Z)=>{var c=HV();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not a symbol");return g}}),WV=Dt((Q,Z)=>{var c=Sv(),g=Object.create,I=Object.defineProperty,S=Object.prototype,t=g(null);Z.exports=function(e){for(var r=0,a,n;t[e+(r||"")];)++r;return e+=r||"",t[e]=!0,a="@@"+e,I(S,a,c.gs(null,function(o){n||(n=!0,I(this,a,c(o)),n=!1)})),a}}),qV=Dt((Q,Z)=>{var c=Sv(),g=S3().Symbol;Z.exports=function(I){return Object.defineProperties(I,{hasInstance:c("",g&&g.hasInstance||I("hasInstance")),isConcatSpreadable:c("",g&&g.isConcatSpreadable||I("isConcatSpreadable")),iterator:c("",g&&g.iterator||I("iterator")),match:c("",g&&g.match||I("match")),replace:c("",g&&g.replace||I("replace")),search:c("",g&&g.search||I("search")),species:c("",g&&g.species||I("species")),split:c("",g&&g.split||I("split")),toPrimitive:c("",g&&g.toPrimitive||I("toPrimitive")),toStringTag:c("",g&&g.toStringTag||I("toStringTag")),unscopables:c("",g&&g.unscopables||I("unscopables"))})}}),$V=Dt((Q,Z)=>{var c=Sv(),g=GS(),I=Object.create(null);Z.exports=function(S){return Object.defineProperties(S,{for:c(function(t){return I[t]?I[t]:I[t]=S(String(t))}),keyFor:c(function(t){var e;g(t);for(e in I)if(I[e]===t)return e})})}}),ZV=Dt((Q,Z)=>{var c=Sv(),g=GS(),I=S3().Symbol,S=WV(),t=qV(),e=$V(),r=Object.create,a=Object.defineProperties,n=Object.defineProperty,o,i,l;if(typeof I=="function")try{String(I()),l=!0}catch{}else I=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(f)},Z.exports=o=function f(x){var y;if(this instanceof f)throw new TypeError("Symbol is not a constructor");return l?I(x):(y=r(i.prototype),x=x===void 0?"":String(x),a(y,{__description__:c("",x),__name__:c("",S(x))}))},t(o),e(o),a(i.prototype,{constructor:c(o),toString:c("",function(){return this.__name__})}),a(o.prototype,{toString:c(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:c(function(){return g(this)})}),n(o.prototype,o.toPrimitive,c("",function(){var f=g(this);return typeof f=="symbol"?f:f.toString()})),n(o.prototype,o.toStringTag,c("c","Symbol")),n(i.prototype,o.toStringTag,c("c",o.prototype[o.toStringTag])),n(i.prototype,o.toPrimitive,c("c",o.prototype[o.toPrimitive]))}),Z1=Dt((Q,Z)=>{Z.exports=VV()()?S3().Symbol:ZV()}),GV=Dt((Q,Z)=>{var c=Mv();Z.exports=function(){return c(this).length=0,this}}),yb=Dt((Q,Z)=>{Z.exports=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c}}),YV=Dt((Q,Z)=>{var c=bx(),g=pT(),I=Object.prototype.toString;Z.exports=function(S){if(!c(S))return null;if(g(S)){var t=S.toString;if(typeof t!="function"||t===I)return null}try{return""+S}catch{return null}}}),KV=Dt((Q,Z)=>{Z.exports=function(c){try{return c.toString()}catch{try{return String(c)}catch{return null}}}}),XV=Dt((Q,Z)=>{var c=KV(),g=/[\n\r\u2028\u2029]/g;Z.exports=function(I){var S=c(I);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(g,function(t){switch(t){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}),YS=Dt((Q,Z)=>{var c=bx(),g=pT(),I=YV(),S=XV(),t=function(e,r){return e.replace("%v",S(r))};Z.exports=function(e,r,a){if(!g(a))throw new TypeError(t(r,e));if(!c(e)){if("default"in a)return a.default;if(a.isOptional)return null}var n=I(a.errorMessage);throw c(n)||(n=r),new TypeError(t(n,e))}}),JV=Dt((Q,Z)=>{var c=YS(),g=bx();Z.exports=function(I){return g(I)?I:c(I,"Cannot use %v",arguments[1])}}),QV=Dt((Q,Z)=>{var c=YS(),g=qS();Z.exports=function(I){return g(I)?I:c(I,"%v is not a plain function",arguments[1])}}),tH=Dt((Q,Z)=>{Z.exports=function(){var c=Array.from,g,I;return typeof c!="function"?!1:(g=["raz","dwa"],I=c(g),!!(I&&I!==g&&I[1]==="dwa"))}}),eH=Dt((Q,Z)=>{var c=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);Z.exports=function(I){return typeof I=="function"&&g(c.call(I))}}),rH=Dt((Q,Z)=>{Z.exports=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1}}),nH=Dt((Q,Z)=>{Z.exports=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}}),iH=Dt((Q,Z)=>{Z.exports=rH()()?Math.sign:nH()}),aH=Dt((Q,Z)=>{var c=iH(),g=Math.abs,I=Math.floor;Z.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:c(S)*I(g(S)))}}),oH=Dt((Q,Z)=>{var c=aH(),g=Math.max;Z.exports=function(I){return g(0,c(I))}}),sH=Dt((Q,Z)=>{var c=Z1().iterator,g=A3(),I=eH(),S=oH(),t=yb(),e=Mv(),r=$1(),a=M3(),n=Array.isArray,o=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},l=Object.defineProperty;Z.exports=function(f){var x=arguments[1],y=arguments[2],v,T,u,b,_,P,M,C,A,h;if(f=Object(e(f)),r(x)&&t(x),!this||this===Array||!I(this)){if(!x){if(g(f))return _=f.length,_!==1?Array.apply(null,f):(b=new Array(1),b[0]=f[0],b);if(n(f)){for(b=new Array(_=f.length),T=0;T<_;++T)b[T]=f[T];return b}}b=[]}else v=this;if(!n(f)){if((A=f[c])!==void 0){for(M=t(A).call(f),v&&(b=new v),C=M.next(),T=0;!C.done;)h=x?o.call(x,y,C.value,T):C.value,v?(i.value=h,l(b,T,i)):b[T]=h,C=M.next(),++T;_=T}else if(a(f)){for(_=f.length,v&&(b=new v),T=0,u=0;T<_;++T)h=f[T],T+1<_&&(P=h.charCodeAt(0),P>=55296&&P<=56319&&(h+=f[++T])),h=x?o.call(x,y,h,u):h,v?(i.value=h,l(b,u,i)):b[u]=h,++u;_=u}}if(_===void 0)for(_=S(f.length),v&&(b=new v(_)),T=0;T<_;++T)h=x?o.call(x,y,f[T],T):f[T],v?(i.value=h,l(b,T,i)):b[T]=h;return v&&(i.value=null,b.length=_),b}}),lH=Dt((Q,Z)=>{Z.exports=tH()()?Array.from:sH()}),uH=Dt((Q,Z)=>{var c=lH(),g=mT(),I=Mv();Z.exports=function(S){var t=Object(I(S)),e=arguments[1],r=Object(arguments[2]);if(t!==S&&!e)return t;var a={};return e?c(e,function(n){(r.ensure||n in S)&&(a[n]=S[n])}):g(a,S),a}}),cH=Dt((Q,Z)=>{var c=yb(),g=Mv(),I=Function.prototype.bind,S=Function.prototype.call,t=Object.keys,e=Object.prototype.propertyIsEnumerable;Z.exports=function(r,a){return function(n,o){var i,l=arguments[2],f=arguments[3];return n=Object(g(n)),c(o),i=t(n),f&&i.sort(typeof f=="function"?I.call(f,n):void 0),typeof r!="function"&&(r=i[r]),S.call(r,i,function(x,y){return e.call(n,x)?S.call(o,l,n[x],x,n,y):a})}}}),hH=Dt((Q,Z)=>{Z.exports=cH()("forEach")}),fH=Dt((Q,Z)=>{var c=yb(),g=hH(),I=Function.prototype.call;Z.exports=function(S,t){var e={},r=arguments[2];return c(t),g(S,function(a,n,o,i){e[n]=I.call(t,r,a,n,o,i)}),e}}),dH=Dt((Q,Z)=>{var c=bx(),g=JV(),I=QV(),S=uH(),t=$S(),e=fH(),r=Function.prototype.bind,a=Object.defineProperty,n=Object.prototype.hasOwnProperty,o;o=function(i,l,f){var x=g(l)&&I(l.value),y;return y=S(l),delete y.writable,delete y.value,y.get=function(){return!f.overwriteDefinition&&n.call(this,i)?x:(l.value=r.call(x,f.resolveContext?f.resolveContext(this):this),a(this,i,l),this[i])},y},Z.exports=function(i){var l=t(arguments[1]);return c(l.resolveContext)&&I(l.resolveContext),e(i,function(f,x){return o(x,f,l)})}}),KS=Dt((Q,Z)=>{var c=GV(),g=mT(),I=yb(),S=Mv(),t=Sv(),e=dH(),r=Z1(),a=Object.defineProperty,n=Object.defineProperties,o;Z.exports=o=function(i,l){if(!(this instanceof o))throw new TypeError("Constructor requires 'new'");n(this,{__list__:t("w",S(i)),__context__:t("w",l),__nextIndex__:t("w",0)}),l&&(I(l.on),l.on("_add",this._onAdd),l.on("_delete",this._onDelete),l.on("_clear",this._onClear))},delete o.prototype.constructor,n(o.prototype,g({_next:t(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",t("c",[i]));return}this.__redo__.forEach(function(l,f){l>=i&&(this.__redo__[f]=++l)},this),this.__redo__.push(i)}}),_onDelete:t(function(i){var l;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(l=this.__redo__.indexOf(i),l!==-1&&this.__redo__.splice(l,1),this.__redo__.forEach(function(f,x){f>i&&(this.__redo__[x]=--f)},this)))}),_onClear:t(function(){this.__redo__&&c.call(this.__redo__),this.__nextIndex__=0})}))),a(o.prototype,r.iterator,t(function(){return this}))}),pH=Dt((Q,Z)=>{var c=dT(),g=ZS(),I=Sv(),S=Z1(),t=KS(),e=Object.defineProperty,r;r=Z.exports=function(a,n){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t.call(this,a),n?g.call(n,"key+value")?n="key+value":g.call(n,"key")?n="key":n="value":n="value",e(this,"__kind__",I("",n))},c&&c(r,t),delete r.prototype.constructor,r.prototype=Object.create(t.prototype,{_resolve:I(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(r.prototype,S.toStringTag,I("c","Array Iterator"))}),mH=Dt((Q,Z)=>{var c=dT(),g=Sv(),I=Z1(),S=KS(),t=Object.defineProperty,e;e=Z.exports=function(r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");r=String(r),S.call(this,r),t(this,"__length__",g("",r.length))},c&&c(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:g(function(){if(this.__list__){if(this.__nextIndex__=55296&&n<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),t(e.prototype,I.toStringTag,g("c","String Iterator"))}),gH=Dt((Q,Z)=>{var c=A3(),g=$1(),I=M3(),S=Z1().iterator,t=Array.isArray;Z.exports=function(e){return g(e)?t(e)||I(e)||c(e)?!0:typeof e[S]=="function":!1}}),vH=Dt((Q,Z)=>{var c=gH();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not iterable");return g}}),XS=Dt((Q,Z)=>{var c=A3(),g=M3(),I=pH(),S=mH(),t=vH(),e=Z1().iterator;Z.exports=function(r){return typeof t(r)[e]=="function"?r[e]():c(r)?new I(r):g(r)?new S(r):new I(r)}}),yH=Dt((Q,Z)=>{var c=A3(),g=yb(),I=M3(),S=XS(),t=Array.isArray,e=Function.prototype.call,r=Array.prototype.some;Z.exports=function(a,n){var o,i=arguments[2],l,f,x,y,v,T,u;if(t(a)||c(a)?o="array":I(a)?o="string":a=S(a),g(n),f=function(){x=!0},o==="array"){r.call(a,function(b){return e.call(n,i,b,f),x});return}if(o==="string"){for(v=a.length,y=0;y=55296&&u<=56319&&(T+=a[++y])),e.call(n,i,T,f),!x);++y);return}for(l=a.next();!l.done;){if(e.call(n,i,l.value,f),x)return;l=a.next()}}}),xH=Dt((Q,Z)=>{Z.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}),_H=Dt((Q,Z)=>{var c=$1(),g=dT(),I=CV(),S=Mv(),t=LV(),e=Sv(),r=XS(),a=yH(),n=Z1().toStringTag,o=xH(),i=Array.isArray,l=Object.defineProperty,f=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,y;Z.exports=y=function(){var v=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=o&&g&&WeakMap!==y?g(new WeakMap,x(this)):this,c(v)&&(i(v)||(v=r(v))),l(T,"__weakMapData__",e("c","$weakMap$"+t())),v&&a(v,function(u){S(u),T.set(u[0],u[1])}),T},o&&(g&&g(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:e(y)})),Object.defineProperties(y.prototype,{delete:e(function(v){return f.call(I(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(f.call(I(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return f.call(I(v),this.__weakMapData__)}),set:e(function(v,T){return l(I(v),this.__weakMapData__,e("c",T)),this}),toString:e(function(){return"[object WeakMap]"})}),l(y.prototype,n,e("c","WeakMap"))}),JS=Dt((Q,Z)=>{Z.exports=MV()()?WeakMap:_H()}),bH=Dt((Q,Z)=>{Z.exports=function(c,g,I){if(typeof Array.prototype.findIndex=="function")return c.findIndex(g,I);if(typeof g!="function")throw new TypeError("predicate must be a function");var S=Object(c),t=S.length;if(t===0)return-1;for(var e=0;e{var c=U1(),g=yx(),I=Sd(),S=Ig(),t=xx(),e=TV(),r=AV(),{float32:a,fract32:n}=fT(),o=JS(),i=vb(),l=bH(),f=` +`]),_&&(mt.frag=mt.frag.replace("smoothstep","smoothStep"),yt.frag=yt.frag.replace("smoothstep","smoothStep")),this.drawCircle=k(mt)}A.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},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var k=this,w=arguments.length,B=new Array(w),O=0;OTt)?pe.tree=x(fe,{bounds:oe}):Tt&&Tt.length&&(pe.tree=Tt),pe.tree){var Ae={primitive:"points",usage:"static",data:pe.tree,type:"uint32"};pe.elements?pe.elements(Ae):pe.elements=H.elements(Ae)}var He=P.float32(fe);Lt({data:He,usage:"dynamic"});var Ge=P.fract32(fe,He);return Mt({data:Ge,usage:"dynamic"}),ee({data:new Uint8Array(ve),type:"uint8",usage:"stream"}),fe}},{marker:function(fe,pe,se){var Tt=pe.activation;if(Tt.forEach(function(Ge){return Ge&&Ge.destroy&&Ge.destroy()}),Tt.length=0,!fe||typeof fe[0]=="number"){var Lt=k.addMarker(fe);Tt[Lt]=!0}else{for(var Mt=[],ee=0,ve=Math.min(fe.length,pe.count);ee=0)return j;var V;if(k instanceof Uint8Array||k instanceof Uint8ClampedArray)V=k;else{V=new Uint8Array(k.length);for(var H=0,F=k.length;HO*4&&(this.tooManyColors=!0),this.updatePalette(B),j.length===1?j[0]:j},A.prototype.updatePalette=function(k){if(!this.tooManyColors){var w=this.maxColors,B=this.paletteTexture,O=Math.ceil(k.length*.25/w);if(O>1){k=k.slice();for(var j=k.length*.25%w;j{Z.exports=c,Z.exports.default=c;function c(H,F,U){U=U||2;var W=F&&F.length,q=W?F[0]*U:H.length,J=g(H,0,q,U,!0),lt=[];if(!J||J.next===J.prev)return lt;var yt,mt,st,tt,pt,rt,at;if(W&&(J=n(H,F,J,U)),H.length>80*U){yt=st=H[0],mt=tt=H[1];for(var vt=U;vtst&&(st=pt),rt>tt&&(tt=rt);at=Math.max(st-yt,tt-mt),at=at!==0?32767/at:0}return S(J,lt,U,yt,mt,at,0),lt}function g(H,F,U,W,q){var J,lt;if(q===V(H,F,U,W)>0)for(J=F;J=F;J-=W)lt=B(J,H[J],H[J+1],lt);return lt&&P(lt,lt.next)&&(O(lt),lt=lt.next),lt}function I(H,F){if(!H)return H;F||(F=H);var U=H,W;do if(W=!1,!U.steiner&&(P(U,U.next)||_(U.prev,U,U.next)===0)){if(O(U),U=F=U.prev,U===U.next)break;W=!0}else U=U.next;while(W||U!==F);return F}function S(H,F,U,W,q,J,lt){if(H){!lt&&J&&x(H,W,q,J);for(var yt=H,mt,st;H.prev!==H.next;){if(mt=H.prev,st=H.next,J?e(H,W,q,J):t(H)){F.push(mt.i/U|0),F.push(H.i/U|0),F.push(st.i/U|0),O(H),H=st.next,yt=st.next;continue}if(H=st,H===yt){lt?lt===1?(H=r(I(H),F,U),S(H,F,U,W,q,J,2)):lt===2&&a(H,F,U,W,q,J):S(I(H),F,U,W,q,J,1);break}}}}function t(H){var F=H.prev,U=H,W=H.next;if(_(F,U,W)>=0)return!1;for(var q=F.x,J=U.x,lt=W.x,yt=F.y,mt=U.y,st=W.y,tt=qJ?q>lt?q:lt:J>lt?J:lt,at=yt>mt?yt>st?yt:st:mt>st?mt:st,vt=W.next;vt!==F;){if(vt.x>=tt&&vt.x<=rt&&vt.y>=pt&&vt.y<=at&&u(q,yt,J,mt,lt,st,vt.x,vt.y)&&_(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function e(H,F,U,W){var q=H.prev,J=H,lt=H.next;if(_(q,J,lt)>=0)return!1;for(var yt=q.x,mt=J.x,st=lt.x,tt=q.y,pt=J.y,rt=lt.y,at=ytmt?yt>st?yt:st:mt>st?mt:st,K=tt>pt?tt>rt?tt:rt:pt>rt?pt:rt,ft=v(at,vt,F,U,W),ut=v(it,K,F,U,W),kt=H.prevZ,It=H.nextZ;kt&&kt.z>=ft&&It&&It.z<=ut;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=K&&kt!==q&&kt!==lt&&u(yt,tt,mt,pt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0||(kt=kt.prevZ,It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=K&&It!==q&&It!==lt&&u(yt,tt,mt,pt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0))return!1;It=It.nextZ}for(;kt&&kt.z>=ft;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=K&&kt!==q&&kt!==lt&&u(yt,tt,mt,pt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0)return!1;kt=kt.prevZ}for(;It&&It.z<=ut;){if(It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=K&&It!==q&&It!==lt&&u(yt,tt,mt,pt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0)return!1;It=It.nextZ}return!0}function r(H,F,U){var W=H;do{var q=W.prev,J=W.next.next;!P(q,J)&&M(q,W,W.next,J)&&p(q,J)&&p(J,q)&&(F.push(q.i/U|0),F.push(W.i/U|0),F.push(J.i/U|0),O(W),O(W.next),W=H=J),W=W.next}while(W!==H);return I(W)}function a(H,F,U,W,q,J){var lt=H;do{for(var yt=lt.next.next;yt!==lt.prev;){if(lt.i!==yt.i&&b(lt,yt)){var mt=w(lt,yt);lt=I(lt,lt.next),mt=I(mt,mt.next),S(lt,F,U,W,q,J,0),S(mt,F,U,W,q,J,0);return}yt=yt.next}lt=lt.next}while(lt!==H)}function n(H,F,U,W){var q=[],J,lt,yt,mt,st;for(J=0,lt=F.length;J=U.next.y&&U.next.y!==U.y){var yt=U.x+(q-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(yt<=W&&yt>J&&(J=yt,lt=U.x=U.x&&U.x>=st&&W!==U.x&&u(qlt.x||U.x===lt.x&&f(lt,U)))&&(lt=U,pt=rt)),U=U.next;while(U!==mt);return lt}function f(H,F){return _(H.prev,H,F.prev)<0&&_(F.next,H,H.next)<0}function x(H,F,U,W){var q=H;do q.z===0&&(q.z=v(q.x,q.y,F,U,W)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==H);q.prevZ.nextZ=null,q.prevZ=null,y(q)}function y(H){var F,U,W,q,J,lt,yt,mt,st=1;do{for(U=H,H=null,J=null,lt=0;U;){for(lt++,W=U,yt=0,F=0;F0||mt>0&&W;)yt!==0&&(mt===0||!W||U.z<=W.z)?(q=U,U=U.nextZ,yt--):(q=W,W=W.nextZ,mt--),J?J.nextZ=q:H=q,q.prevZ=J,J=q;U=W}J.nextZ=null,st*=2}while(lt>1);return H}function v(H,F,U,W,q){return H=(H-U)*q|0,F=(F-W)*q|0,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,H|F<<1}function T(H){var F=H,U=H;do(F.x=(H-lt)*(J-yt)&&(H-lt)*(W-yt)>=(U-lt)*(F-yt)&&(U-lt)*(J-yt)>=(q-lt)*(W-yt)}function b(H,F){return H.next.i!==F.i&&H.prev.i!==F.i&&!h(H,F)&&(p(H,F)&&p(F,H)&&k(H,F)&&(_(H.prev,H,F.prev)||_(H,F.prev,F))||P(H,F)&&_(H.prev,H,H.next)>0&&_(F.prev,F,F.next)>0)}function _(H,F,U){return(F.y-H.y)*(U.x-F.x)-(F.x-H.x)*(U.y-F.y)}function P(H,F){return H.x===F.x&&H.y===F.y}function M(H,F,U,W){var q=A(_(H,F,U)),J=A(_(H,F,W)),lt=A(_(U,W,H)),yt=A(_(U,W,F));return!!(q!==J&<!==yt||q===0&&C(H,U,F)||J===0&&C(H,W,F)||lt===0&&C(U,H,W)||yt===0&&C(U,F,W))}function C(H,F,U){return F.x<=Math.max(H.x,U.x)&&F.x>=Math.min(H.x,U.x)&&F.y<=Math.max(H.y,U.y)&&F.y>=Math.min(H.y,U.y)}function A(H){return H>0?1:H<0?-1:0}function h(H,F){var U=H;do{if(U.i!==H.i&&U.next.i!==H.i&&U.i!==F.i&&U.next.i!==F.i&&M(U,U.next,H,F))return!0;U=U.next}while(U!==H);return!1}function p(H,F){return _(H.prev,H,H.next)<0?_(H,F,H.next)>=0&&_(H,H.prev,F)>=0:_(H,F,H.prev)<0||_(H,H.next,F)<0}function k(H,F){var U=H,W=!1,q=(H.x+F.x)/2,J=(H.y+F.y)/2;do U.y>J!=U.next.y>J&&U.next.y!==U.y&&q<(U.next.x-U.x)*(J-U.y)/(U.next.y-U.y)+U.x&&(W=!W),U=U.next;while(U!==H);return W}function w(H,F){var U=new j(H.i,H.x,H.y),W=new j(F.i,F.x,F.y),q=H.next,J=F.prev;return H.next=F,F.prev=H,U.next=q,q.prev=U,W.next=U,U.prev=W,J.next=W,W.prev=J,W}function B(H,F,U,W){var q=new j(H,F,U);return W?(q.next=W.next,q.prev=W,W.next.prev=q,W.next=q):(q.prev=q,q.next=q),q}function O(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function j(H,F,U){this.i=H,this.x=F,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}c.deviation=function(H,F,U,W){var q=F&&F.length,J=q?F[0]*U:H.length,lt=Math.abs(V(H,0,J,U));if(q)for(var yt=0,mt=F.length;yt0&&(W+=H[q-1].length,U.holes.push(W))}return U}}),VV=Dt((Q,Z)=>{var c=_x();Z.exports=g;function g(I,S,t){if(!I||I.length==null)throw Error("Argument should be an array");S==null&&(S=1),t==null&&(t=c(I,S));for(var e=0;e{Z.exports=function(){var c,g;if(typeof WeakMap!="function")return!1;try{c=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(c)!=="[object WeakMap]"||typeof c.set!="function"||c.set({},1)!==c||typeof c.delete!="function"||typeof c.has!="function"||c.get(g)!=="one")}}),WV=Dt((Q,Z)=>{Z.exports=function(){}}),G1=Dt((Q,Z)=>{var c=WV()();Z.exports=function(g){return g!==c&&g!==null}}),WS=Dt((Q,Z)=>{var c=Object.create,g=Object.getPrototypeOf,I={};Z.exports=function(){var S=Object.setPrototypeOf,t=arguments[0]||c;return typeof S!="function"?!1:g(S(t(null),I))===I}}),qS=Dt((Q,Z)=>{var c=G1(),g={function:!0,object:!0};Z.exports=function(I){return c(I)&&g[typeof I]||!1}}),Ev=Dt((Q,Z)=>{var c=G1();Z.exports=function(g){if(!c(g))throw new TypeError("Cannot use null or undefined");return g}}),qV=Dt((Q,Z)=>{var c=Object.create,g;WS()()||(g=$S()),Z.exports=function(){var I,S,t;return!g||g.level!==1?c:(I={},S={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){S[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}S[e]=t}),Object.defineProperties(I,S),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:I}),function(e,r){return c(e===null?I:e,r)})}()}),$S=Dt((Q,Z)=>{var c=qS(),g=Ev(),I=Object.prototype.isPrototypeOf,S=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(r,a){if(g(r),a===null||c(a))return r;throw new TypeError("Prototype must be null or an object")},Z.exports=function(r){var a,n;return r?(r.level===2?r.set?(n=r.set,a=function(o,i){return n.call(e(o,i),i),o}):a=function(o,i){return e(o,i).__proto__=i,o}:a=function o(i,l){var f;return e(i,l),f=I.call(o.nullPolyfill,i),f&&delete o.nullPolyfill.__proto__,l===null&&(l=o.nullPolyfill),i.__proto__=l,f&&S(o.nullPolyfill,"__proto__",t),i},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),a={},n,o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(o){try{n=o.set,n.call(r,a)}catch{}if(Object.getPrototypeOf(r)===a)return{set:n,level:2}}return r.__proto__=a,Object.getPrototypeOf(r)===a?{level:2}:(r={},r.__proto__=a,Object.getPrototypeOf(r)===a?{level:1}:!1)}()),qV()}),pT=Dt((Q,Z)=>{Z.exports=WS()()?Object.setPrototypeOf:$S()}),$V=Dt((Q,Z)=>{var c=qS();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not an Object");return g}}),ZV=Dt((Q,Z)=>{var c=Object.create(null),g=Math.random;Z.exports=function(){var I;do I=g().toString(36).slice(2);while(c[I]);return I}}),kx=Dt((Q,Z)=>{var c=void 0;Z.exports=function(g){return g!==c&&g!==null}}),mT=Dt((Q,Z)=>{var c=kx(),g={object:!0,function:!0,undefined:!0};Z.exports=function(I){return c(I)?hasOwnProperty.call(g,typeof I):!1}}),GV=Dt((Q,Z)=>{var c=mT();Z.exports=function(g){if(!c(g))return!1;try{return g.constructor?g.constructor.prototype===g:!1}catch{return!1}}}),YV=Dt((Q,Z)=>{var c=GV();Z.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!c(g)}}),ZS=Dt((Q,Z)=>{var c=YV(),g=/^\s*class[\s{/}]/,I=Function.prototype.toString;Z.exports=function(S){return!(!c(S)||g.test(I.call(S)))}}),KV=Dt((Q,Z)=>{Z.exports=function(){var c=Object.assign,g;return typeof c!="function"?!1:(g={foo:"raz"},c(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}}),XV=Dt((Q,Z)=>{Z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}),JV=Dt((Q,Z)=>{var c=G1(),g=Object.keys;Z.exports=function(I){return g(c(I)?Object(I):I)}}),QV=Dt((Q,Z)=>{Z.exports=XV()()?Object.keys:JV()}),tH=Dt((Q,Z)=>{var c=QV(),g=Ev(),I=Math.max;Z.exports=function(S,t){var e,r,a=I(arguments.length,2),n;for(S=Object(g(S)),n=function(o){try{S[o]=t[o]}catch(i){e||(e=i)}},r=1;r{Z.exports=KV()()?Object.assign:tH()}),GS=Dt((Q,Z)=>{var c=G1(),g=Array.prototype.forEach,I=Object.create,S=function(t,e){var r;for(r in t)e[r]=t[r]};Z.exports=function(t){var e=I(null);return g.call(arguments,function(r){c(r)&&S(Object(r),e)}),e}}),eH=Dt((Q,Z)=>{var c="razdwatrzy";Z.exports=function(){return typeof c.contains!="function"?!1:c.contains("dwa")===!0&&c.contains("foo")===!1}}),rH=Dt((Q,Z)=>{var c=String.prototype.indexOf;Z.exports=function(g){return c.call(this,g,arguments[1])>-1}}),YS=Dt((Q,Z)=>{Z.exports=eH()()?String.prototype.contains:rH()}),Cv=Dt((Q,Z)=>{var c=kx(),g=ZS(),I=gT(),S=GS(),t=YS(),e=Z.exports=function(r,a){var n,o,i,l,f;return arguments.length<2||typeof r!="string"?(l=a,a=r,r=null):l=arguments[2],c(r)?(n=t.call(r,"c"),o=t.call(r,"e"),i=t.call(r,"w")):(n=i=!0,o=!1),f={value:a,configurable:n,enumerable:o,writable:i},l?I(S(l),f):f};e.gs=function(r,a,n){var o,i,l,f;return typeof r!="string"?(l=n,n=a,a=r,r=null):l=arguments[3],c(a)?g(a)?c(n)?g(n)||(l=n,n=void 0):n=void 0:(l=a,a=n=void 0):a=void 0,c(r)?(o=t.call(r,"c"),i=t.call(r,"e")):(o=!0,i=!1),f={get:a,set:n,configurable:o,enumerable:i},l?I(S(l),f):f}}),M3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call(function(){return arguments}());Z.exports=function(I){return c.call(I)===g}}),S3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call("");Z.exports=function(I){return typeof I=="string"||I&&typeof I=="object"&&(I instanceof String||c.call(I)===g)||!1}}),nH=Dt((Q,Z)=>{Z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}),iH=Dt((Q,Z)=>{var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};Z.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}()}),E3=Dt((Q,Z)=>{Z.exports=nH()()?globalThis:iH()}),aH=Dt((Q,Z)=>{var c=E3(),g={object:!0,symbol:!0};Z.exports=function(){var I=c.Symbol,S;if(typeof I!="function")return!1;S=I("test symbol");try{String(S)}catch{return!1}return!(!g[typeof I.iterator]||!g[typeof I.toPrimitive]||!g[typeof I.toStringTag])}}),oH=Dt((Q,Z)=>{Z.exports=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}}),KS=Dt((Q,Z)=>{var c=oH();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not a symbol");return g}}),sH=Dt((Q,Z)=>{var c=Cv(),g=Object.create,I=Object.defineProperty,S=Object.prototype,t=g(null);Z.exports=function(e){for(var r=0,a,n;t[e+(r||"")];)++r;return e+=r||"",t[e]=!0,a="@@"+e,I(S,a,c.gs(null,function(o){n||(n=!0,I(this,a,c(o)),n=!1)})),a}}),lH=Dt((Q,Z)=>{var c=Cv(),g=E3().Symbol;Z.exports=function(I){return Object.defineProperties(I,{hasInstance:c("",g&&g.hasInstance||I("hasInstance")),isConcatSpreadable:c("",g&&g.isConcatSpreadable||I("isConcatSpreadable")),iterator:c("",g&&g.iterator||I("iterator")),match:c("",g&&g.match||I("match")),replace:c("",g&&g.replace||I("replace")),search:c("",g&&g.search||I("search")),species:c("",g&&g.species||I("species")),split:c("",g&&g.split||I("split")),toPrimitive:c("",g&&g.toPrimitive||I("toPrimitive")),toStringTag:c("",g&&g.toStringTag||I("toStringTag")),unscopables:c("",g&&g.unscopables||I("unscopables"))})}}),uH=Dt((Q,Z)=>{var c=Cv(),g=KS(),I=Object.create(null);Z.exports=function(S){return Object.defineProperties(S,{for:c(function(t){return I[t]?I[t]:I[t]=S(String(t))}),keyFor:c(function(t){var e;g(t);for(e in I)if(I[e]===t)return e})})}}),cH=Dt((Q,Z)=>{var c=Cv(),g=KS(),I=E3().Symbol,S=sH(),t=lH(),e=uH(),r=Object.create,a=Object.defineProperties,n=Object.defineProperty,o,i,l;if(typeof I=="function")try{String(I()),l=!0}catch{}else I=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(f)},Z.exports=o=function f(x){var y;if(this instanceof f)throw new TypeError("Symbol is not a constructor");return l?I(x):(y=r(i.prototype),x=x===void 0?"":String(x),a(y,{__description__:c("",x),__name__:c("",S(x))}))},t(o),e(o),a(i.prototype,{constructor:c(o),toString:c("",function(){return this.__name__})}),a(o.prototype,{toString:c(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:c(function(){return g(this)})}),n(o.prototype,o.toPrimitive,c("",function(){var f=g(this);return typeof f=="symbol"?f:f.toString()})),n(o.prototype,o.toStringTag,c("c","Symbol")),n(i.prototype,o.toStringTag,c("c",o.prototype[o.toStringTag])),n(i.prototype,o.toPrimitive,c("c",o.prototype[o.toPrimitive]))}),Y1=Dt((Q,Z)=>{Z.exports=aH()()?E3().Symbol:cH()}),hH=Dt((Q,Z)=>{var c=Ev();Z.exports=function(){return c(this).length=0,this}}),xb=Dt((Q,Z)=>{Z.exports=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c}}),fH=Dt((Q,Z)=>{var c=kx(),g=mT(),I=Object.prototype.toString;Z.exports=function(S){if(!c(S))return null;if(g(S)){var t=S.toString;if(typeof t!="function"||t===I)return null}try{return""+S}catch{return null}}}),dH=Dt((Q,Z)=>{Z.exports=function(c){try{return c.toString()}catch{try{return String(c)}catch{return null}}}}),pH=Dt((Q,Z)=>{var c=dH(),g=/[\n\r\u2028\u2029]/g;Z.exports=function(I){var S=c(I);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(g,function(t){switch(t){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}),XS=Dt((Q,Z)=>{var c=kx(),g=mT(),I=fH(),S=pH(),t=function(e,r){return e.replace("%v",S(r))};Z.exports=function(e,r,a){if(!g(a))throw new TypeError(t(r,e));if(!c(e)){if("default"in a)return a.default;if(a.isOptional)return null}var n=I(a.errorMessage);throw c(n)||(n=r),new TypeError(t(n,e))}}),mH=Dt((Q,Z)=>{var c=XS(),g=kx();Z.exports=function(I){return g(I)?I:c(I,"Cannot use %v",arguments[1])}}),gH=Dt((Q,Z)=>{var c=XS(),g=ZS();Z.exports=function(I){return g(I)?I:c(I,"%v is not a plain function",arguments[1])}}),vH=Dt((Q,Z)=>{Z.exports=function(){var c=Array.from,g,I;return typeof c!="function"?!1:(g=["raz","dwa"],I=c(g),!!(I&&I!==g&&I[1]==="dwa"))}}),yH=Dt((Q,Z)=>{var c=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);Z.exports=function(I){return typeof I=="function"&&g(c.call(I))}}),xH=Dt((Q,Z)=>{Z.exports=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1}}),_H=Dt((Q,Z)=>{Z.exports=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}}),bH=Dt((Q,Z)=>{Z.exports=xH()()?Math.sign:_H()}),wH=Dt((Q,Z)=>{var c=bH(),g=Math.abs,I=Math.floor;Z.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:c(S)*I(g(S)))}}),kH=Dt((Q,Z)=>{var c=wH(),g=Math.max;Z.exports=function(I){return g(0,c(I))}}),TH=Dt((Q,Z)=>{var c=Y1().iterator,g=M3(),I=yH(),S=kH(),t=xb(),e=Ev(),r=G1(),a=S3(),n=Array.isArray,o=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},l=Object.defineProperty;Z.exports=function(f){var x=arguments[1],y=arguments[2],v,T,u,b,_,P,M,C,A,h;if(f=Object(e(f)),r(x)&&t(x),!this||this===Array||!I(this)){if(!x){if(g(f))return _=f.length,_!==1?Array.apply(null,f):(b=new Array(1),b[0]=f[0],b);if(n(f)){for(b=new Array(_=f.length),T=0;T<_;++T)b[T]=f[T];return b}}b=[]}else v=this;if(!n(f)){if((A=f[c])!==void 0){for(M=t(A).call(f),v&&(b=new v),C=M.next(),T=0;!C.done;)h=x?o.call(x,y,C.value,T):C.value,v?(i.value=h,l(b,T,i)):b[T]=h,C=M.next(),++T;_=T}else if(a(f)){for(_=f.length,v&&(b=new v),T=0,u=0;T<_;++T)h=f[T],T+1<_&&(P=h.charCodeAt(0),P>=55296&&P<=56319&&(h+=f[++T])),h=x?o.call(x,y,h,u):h,v?(i.value=h,l(b,u,i)):b[u]=h,++u;_=u}}if(_===void 0)for(_=S(f.length),v&&(b=new v(_)),T=0;T<_;++T)h=x?o.call(x,y,f[T],T):f[T],v?(i.value=h,l(b,T,i)):b[T]=h;return v&&(i.value=null,b.length=_),b}}),AH=Dt((Q,Z)=>{Z.exports=vH()()?Array.from:TH()}),MH=Dt((Q,Z)=>{var c=AH(),g=gT(),I=Ev();Z.exports=function(S){var t=Object(I(S)),e=arguments[1],r=Object(arguments[2]);if(t!==S&&!e)return t;var a={};return e?c(e,function(n){(r.ensure||n in S)&&(a[n]=S[n])}):g(a,S),a}}),SH=Dt((Q,Z)=>{var c=xb(),g=Ev(),I=Function.prototype.bind,S=Function.prototype.call,t=Object.keys,e=Object.prototype.propertyIsEnumerable;Z.exports=function(r,a){return function(n,o){var i,l=arguments[2],f=arguments[3];return n=Object(g(n)),c(o),i=t(n),f&&i.sort(typeof f=="function"?I.call(f,n):void 0),typeof r!="function"&&(r=i[r]),S.call(r,i,function(x,y){return e.call(n,x)?S.call(o,l,n[x],x,n,y):a})}}}),EH=Dt((Q,Z)=>{Z.exports=SH()("forEach")}),CH=Dt((Q,Z)=>{var c=xb(),g=EH(),I=Function.prototype.call;Z.exports=function(S,t){var e={},r=arguments[2];return c(t),g(S,function(a,n,o,i){e[n]=I.call(t,r,a,n,o,i)}),e}}),LH=Dt((Q,Z)=>{var c=kx(),g=mH(),I=gH(),S=MH(),t=GS(),e=CH(),r=Function.prototype.bind,a=Object.defineProperty,n=Object.prototype.hasOwnProperty,o;o=function(i,l,f){var x=g(l)&&I(l.value),y;return y=S(l),delete y.writable,delete y.value,y.get=function(){return!f.overwriteDefinition&&n.call(this,i)?x:(l.value=r.call(x,f.resolveContext?f.resolveContext(this):this),a(this,i,l),this[i])},y},Z.exports=function(i){var l=t(arguments[1]);return c(l.resolveContext)&&I(l.resolveContext),e(i,function(f,x){return o(x,f,l)})}}),JS=Dt((Q,Z)=>{var c=hH(),g=gT(),I=xb(),S=Ev(),t=Cv(),e=LH(),r=Y1(),a=Object.defineProperty,n=Object.defineProperties,o;Z.exports=o=function(i,l){if(!(this instanceof o))throw new TypeError("Constructor requires 'new'");n(this,{__list__:t("w",S(i)),__context__:t("w",l),__nextIndex__:t("w",0)}),l&&(I(l.on),l.on("_add",this._onAdd),l.on("_delete",this._onDelete),l.on("_clear",this._onClear))},delete o.prototype.constructor,n(o.prototype,g({_next:t(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",t("c",[i]));return}this.__redo__.forEach(function(l,f){l>=i&&(this.__redo__[f]=++l)},this),this.__redo__.push(i)}}),_onDelete:t(function(i){var l;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(l=this.__redo__.indexOf(i),l!==-1&&this.__redo__.splice(l,1),this.__redo__.forEach(function(f,x){f>i&&(this.__redo__[x]=--f)},this)))}),_onClear:t(function(){this.__redo__&&c.call(this.__redo__),this.__nextIndex__=0})}))),a(o.prototype,r.iterator,t(function(){return this}))}),PH=Dt((Q,Z)=>{var c=pT(),g=YS(),I=Cv(),S=Y1(),t=JS(),e=Object.defineProperty,r;r=Z.exports=function(a,n){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t.call(this,a),n?g.call(n,"key+value")?n="key+value":g.call(n,"key")?n="key":n="value":n="value",e(this,"__kind__",I("",n))},c&&c(r,t),delete r.prototype.constructor,r.prototype=Object.create(t.prototype,{_resolve:I(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(r.prototype,S.toStringTag,I("c","Array Iterator"))}),IH=Dt((Q,Z)=>{var c=pT(),g=Cv(),I=Y1(),S=JS(),t=Object.defineProperty,e;e=Z.exports=function(r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");r=String(r),S.call(this,r),t(this,"__length__",g("",r.length))},c&&c(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:g(function(){if(this.__list__){if(this.__nextIndex__=55296&&n<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),t(e.prototype,I.toStringTag,g("c","String Iterator"))}),zH=Dt((Q,Z)=>{var c=M3(),g=G1(),I=S3(),S=Y1().iterator,t=Array.isArray;Z.exports=function(e){return g(e)?t(e)||I(e)||c(e)?!0:typeof e[S]=="function":!1}}),OH=Dt((Q,Z)=>{var c=zH();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not iterable");return g}}),QS=Dt((Q,Z)=>{var c=M3(),g=S3(),I=PH(),S=IH(),t=OH(),e=Y1().iterator;Z.exports=function(r){return typeof t(r)[e]=="function"?r[e]():c(r)?new I(r):g(r)?new S(r):new I(r)}}),DH=Dt((Q,Z)=>{var c=M3(),g=xb(),I=S3(),S=QS(),t=Array.isArray,e=Function.prototype.call,r=Array.prototype.some;Z.exports=function(a,n){var o,i=arguments[2],l,f,x,y,v,T,u;if(t(a)||c(a)?o="array":I(a)?o="string":a=S(a),g(n),f=function(){x=!0},o==="array"){r.call(a,function(b){return e.call(n,i,b,f),x});return}if(o==="string"){for(v=a.length,y=0;y=55296&&u<=56319&&(T+=a[++y])),e.call(n,i,T,f),!x);++y);return}for(l=a.next();!l.done;){if(e.call(n,i,l.value,f),x)return;l=a.next()}}}),FH=Dt((Q,Z)=>{Z.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}),BH=Dt((Q,Z)=>{var c=G1(),g=pT(),I=$V(),S=Ev(),t=ZV(),e=Cv(),r=QS(),a=DH(),n=Y1().toStringTag,o=FH(),i=Array.isArray,l=Object.defineProperty,f=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,y;Z.exports=y=function(){var v=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=o&&g&&WeakMap!==y?g(new WeakMap,x(this)):this,c(v)&&(i(v)||(v=r(v))),l(T,"__weakMapData__",e("c","$weakMap$"+t())),v&&a(v,function(u){S(u),T.set(u[0],u[1])}),T},o&&(g&&g(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:e(y)})),Object.defineProperties(y.prototype,{delete:e(function(v){return f.call(I(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(f.call(I(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return f.call(I(v),this.__weakMapData__)}),set:e(function(v,T){return l(I(v),this.__weakMapData__,e("c",T)),this}),toString:e(function(){return"[object WeakMap]"})}),l(y.prototype,n,e("c","WeakMap"))}),tE=Dt((Q,Z)=>{Z.exports=HV()()?WeakMap:BH()}),RH=Dt((Q,Z)=>{Z.exports=function(c,g,I){if(typeof Array.prototype.findIndex=="function")return c.findIndex(g,I);if(typeof g!="function")throw new TypeError("predicate must be a function");var S=Object(c),t=S.length;if(t===0)return-1;for(var e=0;e{var c=H1(),g=_x(),I=Sd(),S=zg(),t=bx(),e=UV(),r=VV(),{float32:a,fract32:n}=dT(),o=tE(),i=yb(),l=RH(),f=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; @@ -2703,7 +2703,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;Z.exports=b;function b(_,P){if(!(this instanceof b))return new b(_,P);if(typeof _=="function"?(P||(P={}),P.regl=_):P=_,P.length&&(P.positions=P),_=P.regl,!_.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=_._gl,this.regl=_,this.passes=[],this.shaders=b.shaders.has(_)?b.shaders.get(_):b.shaders.set(_,b.createShaders(_)).get(_),this.update(P)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new o,b.createShaders=function(_){let P=_.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:_.prop("count"),count:4,offset:0,uniforms:{miterMode:(h,p)=>p.join==="round"?2:1,miterLimit:_.prop("miterLimit"),scale:_.prop("scale"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),thickness:_.prop("thickness"),dashTexture:_.prop("dashTexture"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),dashLength:_.prop("dashLength"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight],depth:_.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:(h,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:_.prop("viewport")},viewport:_.prop("viewport")},C=_(I({vert:f,frag:x,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),A;try{A=_(I({cull:{enable:!0,face:"back"},vert:T,frag:u,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aColor:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:_.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{A=C}return{fill:_({primitive:"triangle",elements:(h,p)=>p.triangles,offset:0,vert:y,frag:v,uniforms:{scale:_.prop("scale"),color:_.prop("fill"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:_.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:C,miter:A}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(..._){_.length&&this.update(..._),this.draw()},b.prototype.draw=function(..._){return(_.length?_:this.passes).forEach((P,M)=>{if(P&&Array.isArray(P))return this.draw(...P);typeof P=="number"&&(P=this.passes[P]),P&&P.count>1&&P.opacity&&(this.regl._refresh(),P.fill&&P.triangles&&P.triangles.length>2&&this.shaders.fill(P),P.thickness&&(P.scale[0]*P.viewport.width>b.precisionThreshold||P.scale[1]*P.viewport.height>b.precisionThreshold?this.shaders.rect(P):P.join==="rect"||!P.join&&(P.thickness<=2||P.count>=b.maxPoints)?this.shaders.rect(P):this.shaders.miter(P)))}),this},b.prototype.update=function(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let{regl:P,gl:M}=this;if(_.forEach((A,h)=>{let p=this.passes[h];if(A!==void 0){if(A===null){this.passes[h]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(this.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:P.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:P.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=I({},b.defaults,A)),A.thickness!=null&&(p.thickness=parseFloat(A.thickness)),A.opacity!=null&&(p.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(p.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(p.overlay=!!A.overlay,hmt-st),J=[],lt=0,yt=p.hole!=null?p.hole[0]:null;if(yt!=null){let mt=l(q,st=>st>=yt);q=q.slice(0,mt),q.push(yt)}for(let mt=0;mtrt-yt+(q[mt]-lt)),dt=e(st,tt);dt=dt.map(rt=>rt+lt+(rt+lt{_.colorBuffer.destroy(),_.positionBuffer.destroy(),_.dashTexture.destroy()}),this.passes.length=0,this}}),wH=Dt((Q,Z)=>{var c=yx(),g=U1(),I=jS(),S=Ig(),t=Sd(),e=xx(),{float32:r,fract32:a}=fT();Z.exports=o;var n=[[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 o(i,l){if(typeof i=="function"?(l||(l={}),l.regl=i):l=i,l.length&&(l.positions=l),i=l.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let f=i._gl,x,y,v,T,u,b,_={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},P=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),u=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:n}),h(l),x=i({vert:` +`;Z.exports=b;function b(_,P){if(!(this instanceof b))return new b(_,P);if(typeof _=="function"?(P||(P={}),P.regl=_):P=_,P.length&&(P.positions=P),_=P.regl,!_.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=_._gl,this.regl=_,this.passes=[],this.shaders=b.shaders.has(_)?b.shaders.get(_):b.shaders.set(_,b.createShaders(_)).get(_),this.update(P)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new o,b.createShaders=function(_){let P=_.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:_.prop("count"),count:4,offset:0,uniforms:{miterMode:(h,p)=>p.join==="round"?2:1,miterLimit:_.prop("miterLimit"),scale:_.prop("scale"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),thickness:_.prop("thickness"),dashTexture:_.prop("dashTexture"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),dashLength:_.prop("dashLength"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight],depth:_.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:(h,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:_.prop("viewport")},viewport:_.prop("viewport")},C=_(I({vert:f,frag:x,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),A;try{A=_(I({cull:{enable:!0,face:"back"},vert:T,frag:u,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aColor:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:_.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{A=C}return{fill:_({primitive:"triangle",elements:(h,p)=>p.triangles,offset:0,vert:y,frag:v,uniforms:{scale:_.prop("scale"),color:_.prop("fill"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:_.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:C,miter:A}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(..._){_.length&&this.update(..._),this.draw()},b.prototype.draw=function(..._){return(_.length?_:this.passes).forEach((P,M)=>{if(P&&Array.isArray(P))return this.draw(...P);typeof P=="number"&&(P=this.passes[P]),P&&P.count>1&&P.opacity&&(this.regl._refresh(),P.fill&&P.triangles&&P.triangles.length>2&&this.shaders.fill(P),P.thickness&&(P.scale[0]*P.viewport.width>b.precisionThreshold||P.scale[1]*P.viewport.height>b.precisionThreshold?this.shaders.rect(P):P.join==="rect"||!P.join&&(P.thickness<=2||P.count>=b.maxPoints)?this.shaders.rect(P):this.shaders.miter(P)))}),this},b.prototype.update=function(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let{regl:P,gl:M}=this;if(_.forEach((A,h)=>{let p=this.passes[h];if(A!==void 0){if(A===null){this.passes[h]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(this.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:P.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:P.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=I({},b.defaults,A)),A.thickness!=null&&(p.thickness=parseFloat(A.thickness)),A.opacity!=null&&(p.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(p.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(p.overlay=!!A.overlay,hmt-st),J=[],lt=0,yt=p.hole!=null?p.hole[0]:null;if(yt!=null){let mt=l(q,st=>st>=yt);q=q.slice(0,mt),q.push(yt)}for(let mt=0;mtrt-yt+(q[mt]-lt)),pt=e(st,tt);pt=pt.map(rt=>rt+lt+(rt+lt{_.colorBuffer.destroy(),_.positionBuffer.destroy(),_.dashTexture.destroy()}),this.passes.length=0,this}}),NH=Dt((Q,Z)=>{var c=_x(),g=H1(),I=VS(),S=zg(),t=Sd(),e=bx(),{float32:r,fract32:a}=dT();Z.exports=o;var n=[[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 o(i,l){if(typeof i=="function"?(l||(l={}),l.regl=i):l=i,l.length&&(l.positions=l),i=l.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let f=i._gl,x,y,v,T,u,b,_={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},P=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),u=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:n}),h(l),x=i({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2747,10 +2747,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(k,w)=>[w.viewport.x,w.viewport.y,k.viewportWidth,k.viewportHeight]},attributes:{color:{buffer:T,offset:(k,w)=>w.offset*4,divisor:1},position:{buffer:y,offset:(k,w)=>w.offset*8,divisor:1},positionFract:{buffer:v,offset:(k,w)=>w.offset*8,divisor:1},error:{buffer:u,offset:(k,w)=>w.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:n.length}),t(M,{update:h,draw:C,destroy:p,regl:i,gl:f,canvas:f.canvas,groups:P}),M;function M(k){k?h(k):k===null&&p(),C()}function C(k){if(typeof k=="number")return A(k);k&&!Array.isArray(k)&&(k=[k]),i._refresh(),P.forEach((w,R)=>{if(w){if(k&&(k[R]?w.draw=!0:w.draw=!1),!w.draw){w.draw=!0;return}A(R)}})}function A(k){typeof k=="number"&&(k=P[k]),k!=null&&k&&k.count&&k.color&&k.opacity&&k.positions&&k.positions.length>1&&(k.scaleRatio=[k.scale[0]*k.viewport.width,k.scale[1]*k.viewport.height],x(k),k.after&&k.after(k))}function h(k){if(!k)return;k.length!=null?typeof k[0]=="number"&&(k=[{positions:k}]):Array.isArray(k)||(k=[k]);let w=0,R=0;if(M.groups=P=k.map((V,H)=>{let F=P[H];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return F;return V=S(V,{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"}),F||(P[H]=F={id:H,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=t({},_,V)),I(F,V,[{lineWidth:U=>+U*.5,capSize:U=>+U*.5,opacity:parseFloat,errors:U=>(U=e(U),R+=U.length,U),positions:(U,W)=>(U=e(U,"float64"),W.count=Math.floor(U.length/2),W.bounds=c(U,2),W.offset=w,w+=W.count,U)},{color:(U,W)=>{let q=W.count;if(U||(U="transparent"),!Array.isArray(U)||typeof U[0]=="number"){let lt=U;U=Array(q);for(let yt=0;yt{let J=W.bounds;return U||(U=J),W.scale=[1/(U[2]-U[0]),1/(U[3]-U[1])],W.translate=[-U[0],-U[1]],W.scaleFract=a(W.scale),W.translateFract=a(W.translate),U},viewport:U=>{let W;return Array.isArray(U)?W={x:U[0],y:U[1],width:U[2]-U[0],height:U[3]-U[1]}:U?(W={x:U.x||U.left||0,y:U.y||U.top||0},U.right?W.width=U.right-W.x:W.width=U.w||U.width||0,U.bottom?W.height=U.bottom-W.y:W.height=U.h||U.height||0):W={x:0,y:0,width:f.drawingBufferWidth,height:f.drawingBufferHeight},W}}]),F}),w||R){let V=P.reduce((W,q,J)=>W+(q?q.count:0),0),H=new Float64Array(V*2),F=new Uint8Array(V*4),U=new Float32Array(V*4);P.forEach((W,q)=>{if(!W)return;let{positions:J,count:lt,offset:yt,color:mt,errors:st}=W;lt&&(F.set(mt,yt*4),U.set(st,yt*4),H.set(J,yt*2))});var O=r(H);y(O);var j=a(H,O);v(j),T(F),u(U)}}function p(){y.destroy(),v.destroy(),T.destroy(),u.destroy(),b.destroy()}}}),kH=Dt((Q,Z)=>{var c=/[\'\"]/;Z.exports=function(g){return g?(c.test(g.charAt(0))&&(g=g.substr(1)),c.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}}),tE=Dt((Q,Z)=>{Z.exports=["inherit","initial","unset"]}),eE=Dt((Q,Z)=>{Z.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}),rE=Dt((Q,Z)=>{Z.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}),nE=Dt((Q,Z)=>{Z.exports=["normal","italic","oblique"]}),iE=Dt((Q,Z)=>{Z.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}),TH=Dt((Q,Z)=>{function c(S,t){if(typeof S!="string")return[S];var e=[S];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",n=!!t.flat;r.forEach(function(l){var f=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),x=[];function y(v,T,u){var b=e.push(v.slice(l[0].length,-l[1].length))-1;return x.push(b),a+b+a}e.forEach(function(v,T){for(var u,b=0;v!=u;)if(u=v,v=v.replace(f,y),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[T]=v}),x=x.reverse(),e=e.map(function(v){return x.forEach(function(T){v=v.replace(new RegExp("(\\"+a+T+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(l,f,x){for(var y=[],v,T=0;v=o.exec(l);){if(T++>1e4)throw Error("Circular references in parenthesis");y.push(l.slice(0,v.index)),y.push(i(f[v[1]],f)),l=l.slice(v.index+v[0].length)}return y.push(l),y}return n?e:i(e[0],e)}function g(S,t){if(t&&t.flat){var e=t&&t.escape||"___",r=S[0],a;if(!r)return"";for(var n=new RegExp("\\"+e+"([0-9]+)\\"+e),o=0;r!=a;){if(o++>1e4)throw Error("Circular references in "+S);a=r,r=r.replace(n,i)}return r}return S.reduce(function l(f,x){return Array.isArray(x)&&(x=x.reduce(l,"")),f+x},"");function i(l,f){if(S[f]==null)throw Error("Reference "+f+"is undefined");return S[f]}}function I(S,t){return Array.isArray(S)?g(S,t):c(S,t)}I.parse=c,I.stringify=g,Z.exports=I}),AH=Dt((Q,Z)=>{var c=TH();Z.exports=function(g,I,S){if(g==null)throw Error("First argument should be a string");if(I==null)throw Error("Separator should be a string or a RegExp");S?(typeof S=="string"||Array.isArray(S))&&(S={ignore:S}):S={},S.escape==null&&(S.escape=!0),S.ignore==null?S.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof S.ignore=="string"&&(S.ignore=[S.ignore]),S.ignore=S.ignore.map(function(l){return l.length===1&&(l=l+l),l}));var t=c.parse(g,{flat:!0,brackets:S.ignore}),e=t[0],r=e.split(I);if(S.escape){for(var a=[],n=0;n{Z.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}),aE=Dt((Q,Z)=>{var c=MH();Z.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||c.indexOf(g)!==-1}}}),SH=Dt((Q,Z)=>{var c=kH(),g=tE(),I=eE(),S=rE(),t=nE(),e=iE(),r=AH(),a=aE().isSize;Z.exports=o;var n=o.cache={};function o(l){if(typeof l!="string")throw new Error("Font argument must be a string.");if(n[l])return n[l];if(l==="")throw new Error("Cannot parse an empty string.");if(I.indexOf(l)!==-1)return n[l]={system:l};for(var f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=r(l,/\s+/),y;y=x.shift();){if(g.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){f[T]=y}),n[l]=f;if(t.indexOf(y)!==-1){f.style=y;continue}if(y==="normal"||y==="small-caps"){f.variant=y;continue}if(e.indexOf(y)!==-1){f.stretch=y;continue}if(S.indexOf(y)!==-1){f.weight=y;continue}if(a(y)){var v=r(y,"/");if(f.size=v[0],v[1]!=null?f.lineHeight=i(v[1]):x[0]==="/"&&(x.shift(),f.lineHeight=i(x.shift())),!x.length)throw new Error("Missing required font-family.");return f.family=r(x.join(" "),/\s*,\s*/).map(c),n[l]=f}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function i(l){var f=parseFloat(l);return f.toString()===l?f:l}}),oE=Dt((Q,Z)=>{var c=Ig(),g=aE().isSize,I=l(tE()),S=l(eE()),t=l(rE()),e=l(nE()),r=l(iE()),a={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},o={size:"1rem",family:"serif"};Z.exports=function(f){if(f=c(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),f.system)return f.system&&i(f.system,S),f.system;if(i(f.style,e),i(f.variant,a),i(f.weight,t),i(f.stretch,r),f.size==null&&(f.size=o.size),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=o.family),Array.isArray(f.family)&&(f.family.length||(f.family=[o.family]),f.family=f.family.map(function(y){return n[y]?y:'"'+y+'"'}).join(", "));var x=[];return x.push(f.style),f.variant!==f.style&&x.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&x.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&x.push(f.stretch),x.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),x.push(f.family),x.filter(Boolean).join(" ")};function i(f,x){if(f&&!x[f]&&!I[f])throw Error("Unknown keyword `"+f+"`");return f}function l(f){for(var x={},y=0;y{Z.exports={parse:SH(),stringify:oE()}}),CH=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Ir=Object.keys(kr),Dn=0;Dn1&&kr===Ir&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var li=_e.split(".");if(li.length===1)return['"'+r(_e)+'"'];for(var ti=[],yn=0;yn"u"?1:window.devicePixelRatio,ya=!1,$a={},Na=function(fn){},ia=function(){};if(typeof kr=="string"?Ir=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Ir=kr:_(kr)?(ti=kr,li=ti.canvas):("gl"in kr?ti=kr.gl:"canvas"in kr?li=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(yn=kr.attributes),"extensions"in kr&&(ai=P(kr.extensions)),"optionalExtensions"in kr&&(ta=P(kr.optionalExtensions)),"onDone"in kr&&(Na=kr.onDone),"profile"in kr&&(ya=!!kr.profile),"pixelRatio"in kr&&($i=+kr.pixelRatio),"cachedCode"in kr&&($a=kr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?li=Ir:Dn=Ir),!ti){if(!li){var Ai=T(Dn||document.body,Na,$i);if(!Ai)return null;li=Ai.canvas,ia=Ai.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ti=u(li,yn)}return ti?{gl:ti,canvas:li,container:Dn,extensions:ai,optionalExtensions:ta,pixelRatio:$i,profile:ya,cachedCode:$a,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Ir={};function Dn(yn){var ai=yn.toLowerCase(),ta;try{ta=Ir[ai]=_e.getExtension(ai)}catch{}return!!ta}for(var li=0;li65535)<<4,_e>>>=kr,Ir=(_e>255)<<3,_e>>>=Ir,kr|=Ir,Ir=(_e>15)<<2,_e>>>=Ir,kr|=Ir,Ir=(_e>3)<<1,_e>>>=Ir,kr|=Ir,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(ti){var yn=H(ti),ai=_e[F(yn)>>2];return ai.length>0?ai.pop():new ArrayBuffer(yn)}function Ir(ti){_e[F(ti.byteLength)>>2].push(ti)}function Dn(ti,yn){var ai=null;switch(ti){case p:ai=new Int8Array(kr(yn),0,yn);break;case k:ai=new Uint8Array(kr(yn),0,yn);break;case w:ai=new Int16Array(kr(2*yn),0,yn);break;case R:ai=new Uint16Array(kr(2*yn),0,yn);break;case O:ai=new Int32Array(kr(4*yn),0,yn);break;case j:ai=new Uint32Array(kr(4*yn),0,yn);break;case V:ai=new Float32Array(kr(4*yn),0,yn);break;default:return null}return ai.length!==yn?ai.subarray(0,yn):ai}function li(ti){Ir(ti.buffer)}return{alloc:kr,free:Ir,allocType:Dn,freeType:li}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Wr=16384,br=function(_e,kr){var Ir=1;kr.ext_texture_filter_anisotropic&&(Ir=_e.getParameter(se));var Dn=1,li=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),li=_e.getParameter(Tt));var ti=!!kr.oes_texture_float;if(ti){var yn=_e.createTexture();_e.bindTexture(Mt,yn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ai=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ai),_e.framebufferTexture2D(cr,jr,Mt,yn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)ti=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Wr);var ta=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,ta),_e.getError()?ti=!1:(_e.deleteFramebuffer(ai),_e.deleteTexture(yn),ti=ta[0]===1),W.freeType(ta)}}var $i=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ya=!0;if(!$i){var $a=_e.createTexture(),Na=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(ee,$a),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Na),W.freeType(Na),_e.bindTexture(ee,null),_e.deleteTexture($a),ya=!_e.getError()}return{colorBits:[_e.getParameter(J),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(mt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ia){return!!kr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Dn,maxColorAttachments:li,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(qt),maxRenderbufferSize:_e.getParameter(Wt),maxTextureUnits:_e.getParameter(It),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(kt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(pe),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(fe),readFloat:ti,npotTextureCube:ya}},Xr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function nn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Xr(_e.data))}var Le=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Ir){for(var Dn=0;Dn0){var Va;if(Array.isArray(jn[0])){ha=$n(jn);for(var xi=1,ri=1;ri0){if(typeof xi[0]=="number"){var Ki=W.allocType(ei.dtype,xi.length);tn(Ki,xi),ha(Ki,Ea),W.freeType(Ki)}else if(Array.isArray(xi[0])||Xr(xi[0])){ma=$n(xi);var Ji=oi(xi,ma,ei.dtype);ha(Ji,Ea),W.freeType(Ji)}}}else if(nn(xi)){ma=xi.shape;var ba=xi.stride,Io=0,wo=0,_a=0,Fa=0;ma.length===1?(Io=ma[0],wo=1,_a=ba[0],Fa=0):ma.length===2&&(Io=ma[0],wo=ma[1],_a=ba[0],Fa=ba[1]);var vo=Array.isArray(xi.data)?ei.dtype:_r(xi.data),Eo=W.allocType(vo,Io*wo);Cn(Eo,xi.data,Io,wo,_a,Fa,xi.offset),ha(Eo,Ea),W.freeType(Eo)}return Sa}return Bi||Sa(fn),Sa._reglType="buffer",Sa._buffer=ei,Sa.subdata=Va,Ir.profile&&(Sa.stats=ei.stats),Sa.destroy=function(){Na(ei)},Sa}function Ai(){Le(ti).forEach(function(fn){fn.buffer=_e.createBuffer(),_e.bindBuffer(fn.type,fn.buffer),_e.bufferData(fn.type,fn.persistentData||fn.byteLength,fn.usage)})}return Ir.profile&&(kr.getTotalBufferSize=function(){var fn=0;return Object.keys(ti).forEach(function(jn){fn+=ti[jn].stats.size}),fn}),{create:ia,createStream:ta,destroyStream:$i,clear:function(){Le(ti).forEach(Na),ai.forEach(Na)},getBuffer:function(fn){return fn&&fn._buffer instanceof yn?fn._buffer:null},restore:Ai,_initBuffer:$a}}var Mn=0,fi=0,ki=1,Oi=1,ji=4,Xi=4,ci={points:Mn,point:fi,lines:ki,line:Oi,triangles:ji,triangle:Xi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,Wa=1,ze=4,Ie=5120,Rr=5121,$r=5122,Gr=5123,Br=5124,Yr=5125,pn=34963,on=35040,Ce=35044;function dr(_e,kr,Ir,Dn){var li={},ti=0,yn={uint8:Rr,uint16:Gr};kr.oes_element_index_uint&&(yn.uint32=Yr);function ai(Ai){this.id=ti++,li[this.id]=this,this.buffer=Ai,this.primType=ze,this.vertCount=0,this.type=0}ai.prototype.bind=function(){this.buffer.bind()};var ta=[];function $i(Ai){var fn=ta.pop();return fn||(fn=new ai(Ir.create(null,pn,!0,!1)._buffer)),$a(fn,Ai,on,-1,-1,0,0),fn}function ya(Ai){ta.push(Ai)}function $a(Ai,fn,jn,Bi,Ti,ei,Sa){Ai.buffer.bind();var ha;if(fn){var Va=Sa;!Sa&&(!Xr(fn)||nn(fn)&&!Xr(fn.data))&&(Va=kr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ai.buffer,fn,jn,Va,3)}else _e.bufferData(pn,ei,jn),Ai.buffer.dtype=ha||Rr,Ai.buffer.usage=jn,Ai.buffer.dimension=3,Ai.buffer.byteLength=ei;if(ha=Sa,!Sa){switch(Ai.buffer.dtype){case Rr:case Ie:ha=Rr;break;case Gr:case $r:ha=Gr;break;case Yr:case Br:ha=Yr;break}Ai.buffer.dtype=ha}Ai.type=ha;var xi=Ti;xi<0&&(xi=Ai.buffer.byteLength,ha===Gr?xi>>=1:ha===Yr&&(xi>>=2)),Ai.vertCount=xi;var ri=Bi;if(Bi<0){ri=ze;var Ea=Ai.buffer.dimension;Ea===1&&(ri=za),Ea===2&&(ri=Wa),Ea===3&&(ri=ze)}Ai.primType=ri}function Na(Ai){Dn.elementsCount--,delete li[Ai.id],Ai.buffer.destroy(),Ai.buffer=null}function ia(Ai,fn){var jn=Ir.create(null,pn,!0),Bi=new ai(jn._buffer);Dn.elementsCount++;function Ti(ei){if(!ei)jn(),Bi.primType=ze,Bi.vertCount=0,Bi.type=Rr;else if(typeof ei=="number")jn(ei),Bi.primType=ze,Bi.vertCount=ei|0,Bi.type=Rr;else{var Sa=null,ha=Ce,Va=-1,xi=-1,ri=0,Ea=0;Array.isArray(ei)||Xr(ei)||nn(ei)?Sa=ei:("data"in ei&&(Sa=ei.data),"usage"in ei&&(ha=Ii[ei.usage]),"primitive"in ei&&(Va=ci[ei.primitive]),"count"in ei&&(xi=ei.count|0),"type"in ei&&(Ea=yn[ei.type]),"length"in ei?ri=ei.length|0:(ri=xi,Ea===Gr||Ea===$r?ri*=2:(Ea===Yr||Ea===Br)&&(ri*=4))),$a(Bi,Sa,ha,Va,xi,ri,Ea)}return Ti}return Ti(Ai),Ti._reglType="elements",Ti._elements=Bi,Ti.subdata=function(ei,Sa){return jn.subdata(ei,Sa),Ti},Ti.destroy=function(){Na(Bi)},Ti}return{create:ia,createStream:$i,destroyStream:ya,getElements:function(Ai){return typeof Ai=="function"&&Ai._elements instanceof ai?Ai._elements:null},clear:function(){Le(li).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Fn=5123;function Qn(_e){for(var kr=W.allocType(Fn,_e.length),Ir=0;Ir<_e.length;++Ir)if(isNaN(_e[Ir]))kr[Ir]=65535;else if(_e[Ir]===1/0)kr[Ir]=31744;else if(_e[Ir]===-1/0)kr[Ir]=64512;else{Hr[0]=_e[Ir];var Dn=_n[0],li=Dn>>>31<<15,ti=(Dn<<1>>>24)-127,yn=Dn>>13&1023;if(ti<-24)kr[Ir]=li;else if(ti<-14){var ai=-14-ti;kr[Ir]=li+(yn+1024>>ai)}else ti>15?kr[Ir]=li+31744:kr[Ir]=li+(ti+15<<10)+yn}return kr}function Pn(_e){return Array.isArray(_e)||Xr(_e)}var En=34467,Zn=3553,La=34067,Vi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Fo=6410,Da=32854,ys=32855,os=36194,ul=32819,Zo=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,Nl=35904,cs=35906,Ps=36193,Lo=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Xo=35843,Gl=36196,al=5121,Cl=5123,Ru=5125,lo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,ts=33648,Su=10240,Gu=10241,bl=9728,Dl=9729,tu=9984,nu=9985,ac=9986,mh=9987,Jc=33170,ah=4352,Bf=4353,Sf=4354,Fl=34046,Bc=3317,Nf=37440,hc=37441,oc=37443,fc=37444,oh=33984,cu=[tu,ac,nu,mh],sc=[0,yo,Fo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Fo]=2,rl[Do]=rl[Nl]=3,rl[Qa]=rl[cs]=4;function Yl(_e){return"[object "+_e+"]"}var Sh=Yl("HTMLCanvasElement"),Cc=Yl("OffscreenCanvas"),Uh=Yl("CanvasRenderingContext2D"),_u=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Sh,Cc,Uh,_u,Ed,tl]),Ll=[];Ll[al]=1,Ll[lo]=4,Ll[Ps]=2,Ll[Cl]=2,Ll[Ru]=4;var Qo=[];Qo[Da]=2,Qo[ys]=2,Qo[os]=2,Qo[Qs]=4,Qo[Lo]=.5,Qo[As]=.5,Qo[kl]=1,Qo[ql]=1,Qo[Jl]=.5,Qo[Us]=1,Qo[Pa]=1,Qo[fo]=.5,Qo[qs]=.25,Qo[Ql]=.5,Qo[Xo]=.25,Qo[Gl]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function rc(_e){return Object.prototype.toString.call(_e)}function jf(_e){return rc(_e)===Sh}function Vh(_e){return rc(_e)===Cc}function yf(_e){return rc(_e)===Uh}function lc(_e){return rc(_e)===_u}function hd(_e){return rc(_e)===Ed}function Zf(_e){return rc(_e)===tl}function xf(_e){if(!_e)return!1;var kr=rc(_e);return Vd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||nn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Uf(_e,kr){var Ir=kr.length;switch(_e.type){case al:case Cl:case Ru:case lo:var Dn=W.allocType(_e.type,Ir);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Qn(kr);break}}function Vf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function lh(_e,kr){_e.type===Ps?(_e.data=Qn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Ir,Dn,li,ti){for(var yn=_e.width,ai=_e.height,ta=_e.channels,$i=yn*ai*ta,ya=Vf(_e,$i),$a=0,Na=0;Na=1;)ai+=yn*ta*ta,ta/=2;return ai}else return yn*Ir*Dn}function gh(_e,kr,Ir,Dn,li,ti,yn){var ai={"don't care":ah,"dont care":ah,nice:Sf,fast:Bf},ta={repeat:ou,clamp:hl,mirror:ts},$i={nearest:bl,linear:Dl},ya=c({mipmap:mh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":mh},$i),$a={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Zo},ia={alpha:Ja,luminance:yo,"luminance alpha":Fo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ai={};kr.ext_srgb&&(ia.srgb=Nl,ia.srgba=cs),kr.oes_texture_float&&(Na.float32=Na.float=lo),kr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),kr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Cl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(Ai,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),kr.webgl_compressed_texture_atc&&c(Ai,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),kr.webgl_compressed_texture_pvrtc&&c(Ai,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Xo}),kr.webgl_compressed_texture_etc1&&(Ai["rgb etc1"]=Gl);var fn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(Ai).forEach(function($){var ot=Ai[$];fn.indexOf(ot)>=0&&(ia[$]=ot)});var jn=Object.keys(ia);Ir.textureFormats=jn;var Bi=[];Object.keys(ia).forEach(function($){var ot=ia[$];Bi[ot]=$});var Ti=[];Object.keys(Na).forEach(function($){var ot=Na[$];Ti[ot]=$});var ei=[];Object.keys($i).forEach(function($){var ot=$i[$];ei[ot]=$});var Sa=[];Object.keys(ya).forEach(function($){var ot=ya[$];Sa[ot]=$});var ha=[];Object.keys(ta).forEach(function($){var ot=ta[$];ha[ot]=$});var Va=jn.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Fo||et===cl||et===Qs||kr.ext_srgb&&(et===Nl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function xi(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ri($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ea($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=$a[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,ye=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=$.internalformat=ia[ce];$.format=Va[Se],ce in Na&&("type"in ot||($.type=Na[ce])),ce in Ai&&($.compressed=!0),Yt=!0}!ye&&Yt?$.channels=rl[$.format]:ye&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function ma($){_e.pixelStorei(Nf,$.flipY),_e.pixelStorei(hc,$.premultiplyAlpha),_e.pixelStorei(oc,$.colorSpace),_e.pixelStorei(Bc,$.unpackAlignment)}function Ki(){xi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ji($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ea($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=li.viewportWidth,Vt=li.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Hh(et));else if(lf(et))$.channels=$.channels||4,Uf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Hh(de));var ye=et.shape,Yt=et.stride,ce,Se,ir,Ye,tr,lr;ye.length===3?(ir=ye[2],lr=Yt[2]):(ir=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],$.alignment=1,$.width=ce,$.height=Se,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Gf($,de,Ye,tr,lr,et.offset)}else if(jf(et)||Vh(et)||yf(et))jf(et)||Vh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Zf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(sh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Ji(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=$i[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Vt=de=ta[ye]:Array.isArray(ye)&&(Vt=ta[ye[0]],de=ta[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var ce=ot.wrapT;de=ta[ce]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=ai[ot.mipmap],$.genMipmaps=!0,Se=!0;break;case"boolean":Se=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){_e.texParameteri(ot,Gu,$.minFilter),_e.texParameteri(ot,Su,$.magFilter),_e.texParameteri(ot,Ms,$.wrapS),_e.texParameteri(ot,Is,$.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,$.anisotropic),$.genMipmaps&&(_e.hint(Jc,$.mipmapHint),_e.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Tu=Array(pu).map(function(){return null});function No($){xi.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Au($){_e.activeTexture(oh),_e.bindTexture($.target,$.texture)}function sl(){var $=Tu[0];$?_e.bindTexture($.target,$.texture):_e.bindTexture(Zn,null)}function Lu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),Tu[et]=null),_e.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ti.textureCount--}c(No.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Tu[et]=$,ot=et;break}yn.profile&&ti.maxTextureUnits>tr)-ir,lr.height=lr.height||(et.height>>tr)-Ye,Au(et),Io(lr,Zn,ir,Ye,tr),sl(),Fa(lr),xt}function de(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Au(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=ce>>ir,tr=Se>>ir;if(!Ye||!tr)break;_e.texImage2D(Zn,ir,et.format,Ye,tr,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Co($,ot,et,xt,Vt,de){var ye=new No(La);xu[ye.id]=ye,ti.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var Ze,Pr=ye.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Eo(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(tr)es(Yt[0],Ye),es(Yt[1],tr),es(Yt[2],lr),es(Yt[3],hr),es(Yt[4],Ve),es(Yt[5],Xe);else if(Cu(Pr,Ye),Ea(ye,Ye),"faces"in Ye){var dn=Ye.faces;for(Ze=0;Ze<6;++Ze)ri(Yt[Ze],ye),es(Yt[Ze],dn[Ze])}else for(Ze=0;Ze<6;++Ze)es(Yt[Ze],Ye);for(ri(ye,Yt[0]),Pr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Au(ye),Ze=0;Ze<6;++Ze)Ul(Yt[Ze],Vi+Ze);for(pc(Pr,La),sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Pr.genMipmaps,!0)),ce.format=Bi[ye.internalformat],ce.type=Ti[ye.type],ce.mag=ei[Pr.magFilter],ce.min=Sa[Pr.minFilter],ce.wrapS=ha[Pr.wrapS],ce.wrapT=ha[Pr.wrapT],Ze=0;Ze<6;++Ze)ku(Yt[Ze]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=_a();return ri(sn,ye),sn.width=0,sn.height=0,Ji(sn,tr),sn.width=sn.width||(ye.width>>Pr)-Xe,sn.height=sn.height||(ye.height>>Pr)-Ze,Au(ye),Io(sn,Vi+Ye,Xe,Ze,Pr),sl(),Fa(sn),ce}function ir(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Au(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Vi+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce($,ot,et,xt,Vt,de),ce.subimage=Se,ce.resize=ir,ce._reglType="textureCube",ce._texture=ye,yn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)_e.texImage2D(Vi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?ku=!0:ta.indexOf(dl)>=0&&(ku=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(Tu=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?Ul=No.depth:(yc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(xu=No.stencil,Ul=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?Ul=Al=No.depthStencil:(pu=No.depthStencil,Ul=!1,Al=!1))}var sl=null,Lu=null,xc=null,Co=null;if(Array.isArray(hs))sl=hs.map(Ai);else if(hs)sl=[Ai(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Ji[0].depth,Fa.stencil=Ji[0].stencil,Fa.depthStencil=Ji[0].depthStencil),Ji[_a]?Ji[_a](Fa):Ji[_a]=ri(Fa)}return c(ba,{width:vo,height:vo,color:dl})}function Io(wo){var _a,Fa=wo|0;if(Fa===ba.width)return ba;var vo=ba.color;for(_a=0;_a=vo.byteLength?Eo.subdata(vo):(Eo.destroy(),ri.buffers[wo]=null)),ri.buffers[wo]||(Eo=ri.buffers[wo]=li.create(_a,Pf,!1,!0)),Fa.buffer=li.getBuffer(Eo),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ba[wo]=1}else li.getBuffer(_a)?(Fa.buffer=li.getBuffer(_a),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):li.getBuffer(_a.buffer)?(Fa.buffer=li.getBuffer(_a.buffer),Fa.size=(+_a.size||Fa.buffer.dimension)|0,Fa.normalized=!!_a.normalized||!1,"type"in _a?Fa.type=Hn[_a.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(_a.offset||0)|0,Fa.stride=(_a.stride||0)|0,Fa.divisor=(_a.divisor||0)|0,Fa.state=1):"x"in _a&&(Fa.x=+_a.x||0,Fa.y=+_a.y||0,Fa.z=+_a.z||0,Fa.w=+_a.w||0,Fa.state=2)}for(var es=0;es1)for(var ma=0;mafn&&(fn=jn.stats.uniformsCount)}),fn},Ir.getMaxAttributesCount=function(){var fn=0;return ya.forEach(function(jn){jn.stats.attributesCount>fn&&(fn=jn.stats.attributesCount)}),fn});function Ai(){li={},ti={};for(var fn=0;fn>>4&15)+kr.charAt(Dn&15);return Ir}function Ph(_e){for(var kr="",Ir=-1,Dn,li;++Ir<_e.length;)Dn=_e.charCodeAt(Ir),li=Ir+1<_e.length?_e.charCodeAt(Ir+1):0,55296<=Dn&&Dn<=56319&&56320<=li&&li<=57343&&(Dn=65536+((Dn&1023)<<10)+(li&1023),Ir++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Ir=0;Ir>5]|=(_e.charCodeAt(Ir/8)&255)<<24-Ir%32;return kr}function Bu(_e){for(var kr="",Ir=0;Ir<_e.length*32;Ir+=8)kr+=String.fromCharCode(_e[Ir>>5]>>>24-Ir%32&255);return kr}function iu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Ir){return _e&kr^~_e&Ir}function bh(_e,kr,Ir){return _e&kr^_e&Ir^kr&Ir}function Wf(_e){return iu(_e,2)^iu(_e,13)^iu(_e,22)}function gr(_e){return iu(_e,6)^iu(_e,11)^iu(_e,25)}function Ur(_e){return iu(_e,7)^iu(_e,18)^_h(_e,3)}function wn(_e){return iu(_e,17)^iu(_e,19)^_h(_e,10)}var hn=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 qn(_e,kr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Na=0;Na<_e.length;Na+=16){for(li=Ir[0],ti=Ir[1],yn=Ir[2],ai=Ir[3],ta=Ir[4],$i=Ir[5],ya=Ir[6],$a=Ir[7],ia=0;ia<64;ia++)ia<16?Dn[ia]=_e[ia+Na]:Dn[ia]=di(di(di(wn(Dn[ia-2]),Dn[ia-7]),Ur(Dn[ia-15])),Dn[ia-16]),Ai=di(di(di(di($a,gr(ta)),df(ta,$i,ya)),hn[ia]),Dn[ia]),fn=di(Wf(li),bh(li,ti,yn)),$a=ya,ya=$i,$i=ta,ta=di(ai,Ai),ai=yn,yn=ti,ti=li,li=di(Ai,fn);Ir[0]=di(li,Ir[0]),Ir[1]=di(ti,Ir[1]),Ir[2]=di(yn,Ir[2]),Ir[3]=di(ai,Ir[3]),Ir[4]=di(ta,Ir[4]),Ir[5]=di($i,Ir[5]),Ir[6]=di(ya,Ir[6]),Ir[7]=di($a,Ir[7])}return Ir}function di(_e,kr){var Ir=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Ir>>16);return Dn<<16|Ir&65535}function aa(_e){return Array.prototype.slice.call(_e)}function va(_e){return aa(_e).join("")}function Ba(_e){var kr=_e&&_e.cache,Ir=0,Dn=[],li=[],ti=[];function yn(Ai,fn){var jn=fn&&fn.stable;if(!jn){for(var Bi=0;Bi0&&(Ai.push(Ti,"="),Ai.push.apply(Ai,aa(arguments)),Ai.push(";")),Ti}return c(fn,{def:Bi,toString:function(){return va([jn.length>0?"var "+jn.join(",")+";":"",va(Ai)])}})}function ta(){var Ai=ai(),fn=ai(),jn=Ai.toString,Bi=fn.toString;function Ti(ei,Sa){fn(ei,Sa,"=",Ai.def(ei,Sa),";")}return c(function(){Ai.apply(Ai,aa(arguments))},{def:Ai.def,entry:Ai,exit:fn,save:Ti,set:function(ei,Sa,ha){Ti(ei,Sa),Ai(ei,Sa,"=",ha,";")},toString:function(){return jn()+Bi()}})}function $i(){var Ai=va(arguments),fn=ta(),jn=ta(),Bi=fn.toString,Ti=jn.toString;return c(fn,{then:function(){return fn.apply(fn,aa(arguments)),this},else:function(){return jn.apply(jn,aa(arguments)),this},toString:function(){var ei=Ti();return ei&&(ei="else{"+ei+"}"),va(["if(",Ai,"){",Bi(),"}",ei])}})}var ya=ai(),$a={};function Na(Ai,fn){var jn=[];function Bi(){var Va="a"+jn.length;return jn.push(Va),Va}fn=fn||0;for(var Ti=0;Ti[w.viewport.x,w.viewport.y,k.viewportWidth,k.viewportHeight]},attributes:{color:{buffer:T,offset:(k,w)=>w.offset*4,divisor:1},position:{buffer:y,offset:(k,w)=>w.offset*8,divisor:1},positionFract:{buffer:v,offset:(k,w)=>w.offset*8,divisor:1},error:{buffer:u,offset:(k,w)=>w.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:n.length}),t(M,{update:h,draw:C,destroy:p,regl:i,gl:f,canvas:f.canvas,groups:P}),M;function M(k){k?h(k):k===null&&p(),C()}function C(k){if(typeof k=="number")return A(k);k&&!Array.isArray(k)&&(k=[k]),i._refresh(),P.forEach((w,B)=>{if(w){if(k&&(k[B]?w.draw=!0:w.draw=!1),!w.draw){w.draw=!0;return}A(B)}})}function A(k){typeof k=="number"&&(k=P[k]),k!=null&&k&&k.count&&k.color&&k.opacity&&k.positions&&k.positions.length>1&&(k.scaleRatio=[k.scale[0]*k.viewport.width,k.scale[1]*k.viewport.height],x(k),k.after&&k.after(k))}function h(k){if(!k)return;k.length!=null?typeof k[0]=="number"&&(k=[{positions:k}]):Array.isArray(k)||(k=[k]);let w=0,B=0;if(M.groups=P=k.map((V,H)=>{let F=P[H];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return F;return V=S(V,{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"}),F||(P[H]=F={id:H,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=t({},_,V)),I(F,V,[{lineWidth:U=>+U*.5,capSize:U=>+U*.5,opacity:parseFloat,errors:U=>(U=e(U),B+=U.length,U),positions:(U,W)=>(U=e(U,"float64"),W.count=Math.floor(U.length/2),W.bounds=c(U,2),W.offset=w,w+=W.count,U)},{color:(U,W)=>{let q=W.count;if(U||(U="transparent"),!Array.isArray(U)||typeof U[0]=="number"){let lt=U;U=Array(q);for(let yt=0;yt{let J=W.bounds;return U||(U=J),W.scale=[1/(U[2]-U[0]),1/(U[3]-U[1])],W.translate=[-U[0],-U[1]],W.scaleFract=a(W.scale),W.translateFract=a(W.translate),U},viewport:U=>{let W;return Array.isArray(U)?W={x:U[0],y:U[1],width:U[2]-U[0],height:U[3]-U[1]}:U?(W={x:U.x||U.left||0,y:U.y||U.top||0},U.right?W.width=U.right-W.x:W.width=U.w||U.width||0,U.bottom?W.height=U.bottom-W.y:W.height=U.h||U.height||0):W={x:0,y:0,width:f.drawingBufferWidth,height:f.drawingBufferHeight},W}}]),F}),w||B){let V=P.reduce((W,q,J)=>W+(q?q.count:0),0),H=new Float64Array(V*2),F=new Uint8Array(V*4),U=new Float32Array(V*4);P.forEach((W,q)=>{if(!W)return;let{positions:J,count:lt,offset:yt,color:mt,errors:st}=W;lt&&(F.set(mt,yt*4),U.set(st,yt*4),H.set(J,yt*2))});var O=r(H);y(O);var j=a(H,O);v(j),T(F),u(U)}}function p(){y.destroy(),v.destroy(),T.destroy(),u.destroy(),b.destroy()}}}),jH=Dt((Q,Z)=>{var c=/[\'\"]/;Z.exports=function(g){return g?(c.test(g.charAt(0))&&(g=g.substr(1)),c.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}}),rE=Dt((Q,Z)=>{Z.exports=["inherit","initial","unset"]}),nE=Dt((Q,Z)=>{Z.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}),iE=Dt((Q,Z)=>{Z.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}),aE=Dt((Q,Z)=>{Z.exports=["normal","italic","oblique"]}),oE=Dt((Q,Z)=>{Z.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}),UH=Dt((Q,Z)=>{function c(S,t){if(typeof S!="string")return[S];var e=[S];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",n=!!t.flat;r.forEach(function(l){var f=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),x=[];function y(v,T,u){var b=e.push(v.slice(l[0].length,-l[1].length))-1;return x.push(b),a+b+a}e.forEach(function(v,T){for(var u,b=0;v!=u;)if(u=v,v=v.replace(f,y),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[T]=v}),x=x.reverse(),e=e.map(function(v){return x.forEach(function(T){v=v.replace(new RegExp("(\\"+a+T+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(l,f,x){for(var y=[],v,T=0;v=o.exec(l);){if(T++>1e4)throw Error("Circular references in parenthesis");y.push(l.slice(0,v.index)),y.push(i(f[v[1]],f)),l=l.slice(v.index+v[0].length)}return y.push(l),y}return n?e:i(e[0],e)}function g(S,t){if(t&&t.flat){var e=t&&t.escape||"___",r=S[0],a;if(!r)return"";for(var n=new RegExp("\\"+e+"([0-9]+)\\"+e),o=0;r!=a;){if(o++>1e4)throw Error("Circular references in "+S);a=r,r=r.replace(n,i)}return r}return S.reduce(function l(f,x){return Array.isArray(x)&&(x=x.reduce(l,"")),f+x},"");function i(l,f){if(S[f]==null)throw Error("Reference "+f+"is undefined");return S[f]}}function I(S,t){return Array.isArray(S)?g(S,t):c(S,t)}I.parse=c,I.stringify=g,Z.exports=I}),VH=Dt((Q,Z)=>{var c=UH();Z.exports=function(g,I,S){if(g==null)throw Error("First argument should be a string");if(I==null)throw Error("Separator should be a string or a RegExp");S?(typeof S=="string"||Array.isArray(S))&&(S={ignore:S}):S={},S.escape==null&&(S.escape=!0),S.ignore==null?S.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof S.ignore=="string"&&(S.ignore=[S.ignore]),S.ignore=S.ignore.map(function(l){return l.length===1&&(l=l+l),l}));var t=c.parse(g,{flat:!0,brackets:S.ignore}),e=t[0],r=e.split(I);if(S.escape){for(var a=[],n=0;n{Z.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}),sE=Dt((Q,Z)=>{var c=HH();Z.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||c.indexOf(g)!==-1}}}),WH=Dt((Q,Z)=>{var c=jH(),g=rE(),I=nE(),S=iE(),t=aE(),e=oE(),r=VH(),a=sE().isSize;Z.exports=o;var n=o.cache={};function o(l){if(typeof l!="string")throw new Error("Font argument must be a string.");if(n[l])return n[l];if(l==="")throw new Error("Cannot parse an empty string.");if(I.indexOf(l)!==-1)return n[l]={system:l};for(var f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=r(l,/\s+/),y;y=x.shift();){if(g.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){f[T]=y}),n[l]=f;if(t.indexOf(y)!==-1){f.style=y;continue}if(y==="normal"||y==="small-caps"){f.variant=y;continue}if(e.indexOf(y)!==-1){f.stretch=y;continue}if(S.indexOf(y)!==-1){f.weight=y;continue}if(a(y)){var v=r(y,"/");if(f.size=v[0],v[1]!=null?f.lineHeight=i(v[1]):x[0]==="/"&&(x.shift(),f.lineHeight=i(x.shift())),!x.length)throw new Error("Missing required font-family.");return f.family=r(x.join(" "),/\s*,\s*/).map(c),n[l]=f}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function i(l){var f=parseFloat(l);return f.toString()===l?f:l}}),lE=Dt((Q,Z)=>{var c=zg(),g=sE().isSize,I=l(rE()),S=l(nE()),t=l(iE()),e=l(aE()),r=l(oE()),a={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},o={size:"1rem",family:"serif"};Z.exports=function(f){if(f=c(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),f.system)return f.system&&i(f.system,S),f.system;if(i(f.style,e),i(f.variant,a),i(f.weight,t),i(f.stretch,r),f.size==null&&(f.size=o.size),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=o.family),Array.isArray(f.family)&&(f.family.length||(f.family=[o.family]),f.family=f.family.map(function(y){return n[y]?y:'"'+y+'"'}).join(", "));var x=[];return x.push(f.style),f.variant!==f.style&&x.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&x.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&x.push(f.stretch),x.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),x.push(f.family),x.filter(Boolean).join(" ")};function i(f,x){if(f&&!x[f]&&!I[f])throw Error("Unknown keyword `"+f+"`");return f}function l(f){for(var x={},y=0;y{Z.exports={parse:WH(),stringify:lE()}}),$H=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(be,Tr){for(var Ir=Object.keys(Tr),Fn=0;Fn1&&Tr===Ir&&(Tr==='"'||Tr==="'"))return['"'+r(be.substr(1,be.length-2))+'"'];var Fn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(be);if(Fn)return a(be.substr(0,Fn.index)).concat(a(Fn[1])).concat(a(be.substr(Fn.index+Fn[0].length)));var hi=be.split(".");if(hi.length===1)return['"'+r(be)+'"'];for(var ni=[],yn=0;yn"u"?1:window.devicePixelRatio,_a=!1,Za={},Na=function(dn){},ia=function(){};if(typeof Tr=="string"?Ir=document.querySelector(Tr):typeof Tr=="object"&&(b(Tr)?Ir=Tr:_(Tr)?(ni=Tr,hi=ni.canvas):("gl"in Tr?ni=Tr.gl:"canvas"in Tr?hi=M(Tr.canvas):"container"in Tr&&(Fn=M(Tr.container)),"attributes"in Tr&&(yn=Tr.attributes),"extensions"in Tr&&(li=P(Tr.extensions)),"optionalExtensions"in Tr&&(ta=P(Tr.optionalExtensions)),"onDone"in Tr&&(Na=Tr.onDone),"profile"in Tr&&(_a=!!Tr.profile),"pixelRatio"in Tr&&(Gi=+Tr.pixelRatio),"cachedCode"in Tr&&(Za=Tr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?hi=Ir:Fn=Ir),!ni){if(!hi){var Ei=T(Fn||document.body,Na,Gi);if(!Ei)return null;hi=Ei.canvas,ia=Ei.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ni=u(hi,yn)}return ni?{gl:ni,canvas:hi,container:Fn,extensions:li,optionalExtensions:ta,pixelRatio:Gi,profile:_a,cachedCode:Za,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(be,Tr){var Ir={};function Fn(yn){var li=yn.toLowerCase(),ta;try{ta=Ir[li]=be.getExtension(li)}catch{}return!!ta}for(var hi=0;hi65535)<<4,be>>>=Tr,Ir=(be>255)<<3,be>>>=Ir,Tr|=Ir,Ir=(be>15)<<2,be>>>=Ir,Tr|=Ir,Ir=(be>3)<<1,be>>>=Ir,Tr|=Ir,Tr|be>>1}function U(){var be=h(8,function(){return[]});function Tr(ni){var yn=H(ni),li=be[F(yn)>>2];return li.length>0?li.pop():new ArrayBuffer(yn)}function Ir(ni){be[F(ni.byteLength)>>2].push(ni)}function Fn(ni,yn){var li=null;switch(ni){case p:li=new Int8Array(Tr(yn),0,yn);break;case k:li=new Uint8Array(Tr(yn),0,yn);break;case w:li=new Int16Array(Tr(2*yn),0,yn);break;case B:li=new Uint16Array(Tr(2*yn),0,yn);break;case O:li=new Int32Array(Tr(4*yn),0,yn);break;case j:li=new Uint32Array(Tr(4*yn),0,yn);break;case V:li=new Float32Array(Tr(4*yn),0,yn);break;default:return null}return li.length!==yn?li.subarray(0,yn):li}function hi(ni){Ir(ni.buffer)}return{alloc:Tr,free:Ir,allocType:Fn,freeType:hi}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,pt=33901,rt=33902,at=3379,vt=3386,it=34921,K=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Ae=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,qr=16384,br=function(be,Tr){var Ir=1;Tr.ext_texture_filter_anisotropic&&(Ir=be.getParameter(se));var Fn=1,hi=1;Tr.webgl_draw_buffers&&(Fn=be.getParameter(Lt),hi=be.getParameter(Tt));var ni=!!Tr.oes_texture_float;if(ni){var yn=be.createTexture();be.bindTexture(Mt,yn),be.texImage2D(Mt,0,Ae,1,1,0,Ae,He,null);var li=be.createFramebuffer();if(be.bindFramebuffer(cr,li),be.framebufferTexture2D(cr,jr,Mt,yn,0),be.bindTexture(Mt,null),be.checkFramebufferStatus(cr)!==ur)ni=!1;else{be.viewport(0,0,1,1),be.clearColor(1,0,0,1),be.clear(qr);var ta=W.allocType(He,4);be.readPixels(0,0,1,1,Ae,He,ta),be.getError()?ni=!1:(be.deleteFramebuffer(li),be.deleteTexture(yn),ni=ta[0]===1),W.freeType(ta)}}var Gi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),_a=!0;if(!Gi){var Za=be.createTexture(),Na=W.allocType(Ge,36);be.activeTexture(oe),be.bindTexture(ee,Za),be.texImage2D(ve,0,Ae,3,3,0,Ae,Ge,Na),W.freeType(Na),be.bindTexture(ee,null),be.deleteTexture(Za),_a=!be.getError()}return{colorBits:[be.getParameter(J),be.getParameter(lt),be.getParameter(yt),be.getParameter(mt)],depthBits:be.getParameter(st),stencilBits:be.getParameter(tt),subpixelBits:be.getParameter(q),extensions:Object.keys(Tr).filter(function(ia){return!!Tr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Fn,maxColorAttachments:hi,pointSizeDims:be.getParameter(pt),lineWidthDims:be.getParameter(rt),maxViewportDims:be.getParameter(vt),maxCombinedTextureUnits:be.getParameter(ut),maxCubeMapSize:be.getParameter(qt),maxRenderbufferSize:be.getParameter(Wt),maxTextureUnits:be.getParameter(It),maxTextureSize:be.getParameter(at),maxAttributes:be.getParameter(it),maxVertexUniforms:be.getParameter(K),maxVertexTextureUnits:be.getParameter(kt),maxVaryingVectors:be.getParameter(ft),maxFragmentUniforms:be.getParameter(Pt),glsl:be.getParameter(pe),renderer:be.getParameter(ge),vendor:be.getParameter(Jt),version:be.getParameter(fe),readFloat:ni,npotTextureCube:_a}},Xr=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 nn(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)||Xr(be.data))}var Le=function(be){return Object.keys(be).map(function(Tr){return be[Tr]})},Gt={shape:re,flatten:Nt};function ne(be,Tr,Ir){for(var Fn=0;Fn0){var Va;if(Array.isArray(Un[0])){da=Gn(Un);for(var ki=1,oi=1;oi0){if(typeof ki[0]=="number"){var Xi=W.allocType(ai.dtype,ki.length);tn(Xi,ki),da(Xi,Ca),W.freeType(Xi)}else if(Array.isArray(ki[0])||Xr(ki[0])){va=Gn(ki);var Qi=ui(ki,va,ai.dtype);da(Qi,Ca),W.freeType(Qi)}}}else if(nn(ki)){va=ki.shape;var ka=ki.stride,zo=0,wo=0,wa=0,Fa=0;va.length===1?(zo=va[0],wo=1,wa=ka[0],Fa=0):va.length===2&&(zo=va[0],wo=va[1],wa=ka[0],Fa=ka[1]);var vo=Array.isArray(ki.data)?ai.dtype:_r(ki.data),Co=W.allocType(vo,zo*wo);Cn(Co,ki.data,zo,wo,wa,Fa,ki.offset),da(Co,Ca),W.freeType(Co)}return Ea}return Ui||Ea(dn),Ea._reglType="buffer",Ea._buffer=ai,Ea.subdata=Va,Ir.profile&&(Ea.stats=ai.stats),Ea.destroy=function(){Na(ai)},Ea}function Ei(){Le(ni).forEach(function(dn){dn.buffer=be.createBuffer(),be.bindBuffer(dn.type,dn.buffer),be.bufferData(dn.type,dn.persistentData||dn.byteLength,dn.usage)})}return Ir.profile&&(Tr.getTotalBufferSize=function(){var dn=0;return Object.keys(ni).forEach(function(Un){dn+=ni[Un].stats.size}),dn}),{create:ia,createStream:ta,destroyStream:Gi,clear:function(){Le(ni).forEach(Na),li.forEach(Na)},getBuffer:function(dn){return dn&&dn._buffer instanceof yn?dn._buffer:null},restore:Ei,_initBuffer:Za}}var Mn=0,mi=0,Mi=1,Ni=1,Hi=4,Ji=4,di={points:Mn,point:mi,lines:Mi,line:Ni,triangles:Hi,triangle:Ji,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,qa=1,Oe=4,ze=5120,Br=5121,$r=5122,Gr=5123,Rr=5124,Yr=5125,mn=34963,on=35040,Ce=35044;function pr(be,Tr,Ir,Fn){var hi={},ni=0,yn={uint8:Br,uint16:Gr};Tr.oes_element_index_uint&&(yn.uint32=Yr);function li(Ei){this.id=ni++,hi[this.id]=this,this.buffer=Ei,this.primType=Oe,this.vertCount=0,this.type=0}li.prototype.bind=function(){this.buffer.bind()};var ta=[];function Gi(Ei){var dn=ta.pop();return dn||(dn=new li(Ir.create(null,mn,!0,!1)._buffer)),Za(dn,Ei,on,-1,-1,0,0),dn}function _a(Ei){ta.push(Ei)}function Za(Ei,dn,Un,Ui,Si,ai,Ea){Ei.buffer.bind();var da;if(dn){var Va=Ea;!Ea&&(!Xr(dn)||nn(dn)&&!Xr(dn.data))&&(Va=Tr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ei.buffer,dn,Un,Va,3)}else be.bufferData(mn,ai,Un),Ei.buffer.dtype=da||Br,Ei.buffer.usage=Un,Ei.buffer.dimension=3,Ei.buffer.byteLength=ai;if(da=Ea,!Ea){switch(Ei.buffer.dtype){case Br:case ze:da=Br;break;case Gr:case $r:da=Gr;break;case Yr:case Rr:da=Yr;break}Ei.buffer.dtype=da}Ei.type=da;var ki=Si;ki<0&&(ki=Ei.buffer.byteLength,da===Gr?ki>>=1:da===Yr&&(ki>>=2)),Ei.vertCount=ki;var oi=Ui;if(Ui<0){oi=Oe;var Ca=Ei.buffer.dimension;Ca===1&&(oi=za),Ca===2&&(oi=qa),Ca===3&&(oi=Oe)}Ei.primType=oi}function Na(Ei){Fn.elementsCount--,delete hi[Ei.id],Ei.buffer.destroy(),Ei.buffer=null}function ia(Ei,dn){var Un=Ir.create(null,mn,!0),Ui=new li(Un._buffer);Fn.elementsCount++;function Si(ai){if(!ai)Un(),Ui.primType=Oe,Ui.vertCount=0,Ui.type=Br;else if(typeof ai=="number")Un(ai),Ui.primType=Oe,Ui.vertCount=ai|0,Ui.type=Br;else{var Ea=null,da=Ce,Va=-1,ki=-1,oi=0,Ca=0;Array.isArray(ai)||Xr(ai)||nn(ai)?Ea=ai:("data"in ai&&(Ea=ai.data),"usage"in ai&&(da=Di[ai.usage]),"primitive"in ai&&(Va=di[ai.primitive]),"count"in ai&&(ki=ai.count|0),"type"in ai&&(Ca=yn[ai.type]),"length"in ai?oi=ai.length|0:(oi=ki,Ca===Gr||Ca===$r?oi*=2:(Ca===Yr||Ca===Rr)&&(oi*=4))),Za(Ui,Ea,da,Va,ki,oi,Ca)}return Si}return Si(Ei),Si._reglType="elements",Si._elements=Ui,Si.subdata=function(ai,Ea){return Un.subdata(ai,Ea),Si},Si.destroy=function(){Na(Ui)},Si}return{create:ia,createStream:Gi,destroyStream:_a,getElements:function(Ei){return typeof Ei=="function"&&Ei._elements instanceof li?Ei._elements:null},clear:function(){Le(hi).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Bn=5123;function ri(be){for(var Tr=W.allocType(Bn,be.length),Ir=0;Ir>>31<<15,ni=(Fn<<1>>>24)-127,yn=Fn>>13&1023;if(ni<-24)Tr[Ir]=hi;else if(ni<-14){var li=-14-ni;Tr[Ir]=hi+(yn+1024>>li)}else ni>15?Tr[Ir]=hi+31744:Tr[Ir]=hi+(ni+15<<10)+yn}return Tr}function Pn(be){return Array.isArray(be)||Xr(be)}var En=34467,Yn=3553,La=34067,qi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Bo=6410,Da=32854,ys=32855,os=36194,ul=32819,Go=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,jl=35904,cs=35906,Ps=36193,Po=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Jo=35843,Gl=36196,al=5121,Ll=5123,Ru=5125,uo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,es=33648,Cu=10240,Gu=10241,bl=9728,Fl=9729,tu=9984,nu=9985,ac=9986,gh=9987,Jc=33170,oh=4352,jf=4353,Sf=4354,Bl=34046,Rc=3317,Uf=37440,hc=37441,oc=37443,fc=37444,sh=33984,cu=[tu,ac,nu,gh],sc=[0,yo,Bo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Bo]=2,rl[Do]=rl[jl]=3,rl[Qa]=rl[cs]=4;function Yl(be){return"[object "+be+"]"}var Eh=Yl("HTMLCanvasElement"),Lc=Yl("OffscreenCanvas"),Vh=Yl("CanvasRenderingContext2D"),bu=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Eh,Lc,Vh,bu,Ed,tl]),Pl=[];Pl[al]=1,Pl[uo]=4,Pl[Ps]=2,Pl[Ll]=2,Pl[Ru]=4;var ts=[];ts[Da]=2,ts[ys]=2,ts[os]=2,ts[Qs]=4,ts[Po]=.5,ts[As]=.5,ts[kl]=1,ts[ql]=1,ts[Jl]=.5,ts[Us]=1,ts[Pa]=1,ts[fo]=.5,ts[qs]=.25,ts[Ql]=.5,ts[Jo]=.25,ts[Gl]=.5;function lf(be){return Array.isArray(be)&&(be.length===0||typeof be[0]=="number")}function lh(be){if(!Array.isArray(be))return!1;var Tr=be.length;return!(Tr===0||!Pn(be[0]))}function rc(be){return Object.prototype.toString.call(be)}function Vf(be){return rc(be)===Eh}function Hh(be){return rc(be)===Lc}function yf(be){return rc(be)===Vh}function lc(be){return rc(be)===bu}function hd(be){return rc(be)===Ed}function Gf(be){return rc(be)===tl}function xf(be){if(!be)return!1;var Tr=rc(be);return Vd.indexOf(Tr)>=0?!0:lf(be)||lh(be)||nn(be)}function Wh(be){return le[Object.prototype.toString.call(be)]|0}function Hf(be,Tr){var Ir=Tr.length;switch(be.type){case al:case Ll:case Ru:case uo:var Fn=W.allocType(be.type,Ir);Fn.set(Tr),be.data=Fn;break;case Ps:be.data=ri(Tr);break}}function Wf(be,Tr){return W.allocType(be.type===Ps?uo:be.type,Tr)}function uh(be,Tr){be.type===Ps?(be.data=ri(Tr),W.freeType(Tr)):be.data=Tr}function Yf(be,Tr,Ir,Fn,hi,ni){for(var yn=be.width,li=be.height,ta=be.channels,Gi=yn*li*ta,_a=Wf(be,Gi),Za=0,Na=0;Na=1;)li+=yn*ta*ta,ta/=2;return li}else return yn*Ir*Fn}function vh(be,Tr,Ir,Fn,hi,ni,yn){var li={"don't care":oh,"dont care":oh,nice:Sf,fast:jf},ta={repeat:ou,clamp:hl,mirror:es},Gi={nearest:bl,linear:Fl},_a=c({mipmap:gh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":gh},Gi),Za={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Go},ia={alpha:Ja,luminance:yo,"luminance alpha":Bo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ei={};Tr.ext_srgb&&(ia.srgb=jl,ia.srgba=cs),Tr.oes_texture_float&&(Na.float32=Na.float=uo),Tr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),Tr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Ll,uint32:Ru,"depth stencil":ss})),Tr.webgl_compressed_texture_s3tc&&c(Ei,{"rgb s3tc dxt1":Po,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),Tr.webgl_compressed_texture_atc&&c(Ei,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),Tr.webgl_compressed_texture_pvrtc&&c(Ei,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Jo}),Tr.webgl_compressed_texture_etc1&&(Ei["rgb etc1"]=Gl);var dn=Array.prototype.slice.call(be.getParameter(En));Object.keys(Ei).forEach(function($){var ot=Ei[$];dn.indexOf(ot)>=0&&(ia[$]=ot)});var Un=Object.keys(ia);Ir.textureFormats=Un;var Ui=[];Object.keys(ia).forEach(function($){var ot=ia[$];Ui[ot]=$});var Si=[];Object.keys(Na).forEach(function($){var ot=Na[$];Si[ot]=$});var ai=[];Object.keys(Gi).forEach(function($){var ot=Gi[$];ai[ot]=$});var Ea=[];Object.keys(_a).forEach(function($){var ot=_a[$];Ea[ot]=$});var da=[];Object.keys(ta).forEach(function($){var ot=ta[$];da[ot]=$});var Va=Un.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Bo||et===cl||et===Qs||Tr.ext_srgb&&(et===jl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function ki(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function oi($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ca($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,xe=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],xe=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,xe=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var he=ot.format,Ee=$.internalformat=ia[he];$.format=Va[Ee],he in Na&&("type"in ot||($.type=Na[he])),he in Ei&&($.compressed=!0),Yt=!0}!xe&&Yt?$.channels=rl[$.format]:xe&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function va($){be.pixelStorei(Uf,$.flipY),be.pixelStorei(hc,$.premultiplyAlpha),be.pixelStorei(oc,$.colorSpace),be.pixelStorei(Rc,$.unpackAlignment)}function Xi(){ki.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Qi($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ca($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=hi.viewportWidth,Vt=hi.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Wh(et));else if(lf(et))$.channels=$.channels||4,Hf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Wh(de));var xe=et.shape,Yt=et.stride,he,Ee,ir,Ye,er,lr;xe.length===3?(ir=xe[2],lr=Yt[2]):(ir=1,lr=1),he=xe[0],Ee=xe[1],Ye=Yt[0],er=Yt[1],$.alignment=1,$.width=he,$.height=Ee,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Yf($,de,Ye,er,lr,et.offset)}else if(Vf(et)||Hh(et)||yf(et))Vf(et)||Hh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Gf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(lh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Qi(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=Gi[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var xe=ot.wrap;typeof xe=="string"?Vt=de=ta[xe]:Array.isArray(xe)&&(Vt=ta[xe[0]],de=ta[xe[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var he=ot.wrapT;de=ta[he]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Ee=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=li[ot.mipmap],$.genMipmaps=!0,Ee=!0;break;case"boolean":Ee=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Ee=!0;break}Ee&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){be.texParameteri(ot,Gu,$.minFilter),be.texParameteri(ot,Cu,$.magFilter),be.texParameteri(ot,Ms,$.wrapS),be.texParameteri(ot,Is,$.wrapT),Tr.ext_texture_filter_anisotropic&&be.texParameteri(ot,Bl,$.anisotropic),$.genMipmaps&&(be.hint(Jc,$.mipmapHint),be.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Au=Array(pu).map(function(){return null});function jo($){ki.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Mu($){be.activeTexture(sh),be.bindTexture($.target,$.texture)}function sl(){var $=Au[0];$?be.bindTexture($.target,$.texture):be.bindTexture(Yn,null)}function Iu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(be.activeTexture(sh+et),be.bindTexture(xt,null),Au[et]=null),be.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ni.textureCount--}c(jo.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Au[et]=$,ot=et;break}yn.profile&&ni.maxTextureUnits>er)-ir,lr.height=lr.height||(et.height>>er)-Ye,Mu(et),zo(lr,Yn,ir,Ye,er),sl(),Fa(lr),xt}function de(xe,Yt){var he=xe|0,Ee=Yt|0||he;if(he===et.width&&Ee===et.height)return xt;xt.width=et.width=he,xt.height=et.height=Ee,Mu(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=he>>ir,er=Ee>>ir;if(!Ye||!er)break;be.texImage2D(Yn,ir,et.format,Ye,er,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Ch(et.internalformat,et.type,he,Ee,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Lo($,ot,et,xt,Vt,de){var xe=new jo(La);xu[xe.id]=xe,ni.cubeCount++;var Yt=new Array(6);function he(Ye,er,lr,hr,Ve,Xe){var Ze,Pr=xe.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Co(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(er)rs(Yt[0],Ye),rs(Yt[1],er),rs(Yt[2],lr),rs(Yt[3],hr),rs(Yt[4],Ve),rs(Yt[5],Xe);else if(Pu(Pr,Ye),Ca(xe,Ye),"faces"in Ye){var pn=Ye.faces;for(Ze=0;Ze<6;++Ze)oi(Yt[Ze],xe),rs(Yt[Ze],pn[Ze])}else for(Ze=0;Ze<6;++Ze)rs(Yt[Ze],Ye);for(oi(xe,Yt[0]),Pr.genMipmaps?xe.mipmask=(Yt[0].width<<1)-1:xe.mipmask=Yt[0].mipmask,xe.internalformat=Yt[0].internalformat,he.width=Yt[0].width,he.height=Yt[0].height,Mu(xe),Ze=0;Ze<6;++Ze)Vl(Yt[Ze],qi+Ze);for(pc(Pr,La),sl(),yn.profile&&(xe.stats.size=Ch(xe.internalformat,xe.type,he.width,he.height,Pr.genMipmaps,!0)),he.format=Ui[xe.internalformat],he.type=Si[xe.type],he.mag=ai[Pr.magFilter],he.min=Ea[Pr.minFilter],he.wrapS=da[Pr.wrapS],he.wrapT=da[Pr.wrapT],Ze=0;Ze<6;++Ze)Tu(Yt[Ze]);return he}function Ee(Ye,er,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=wa();return oi(sn,xe),sn.width=0,sn.height=0,Qi(sn,er),sn.width=sn.width||(xe.width>>Pr)-Xe,sn.height=sn.height||(xe.height>>Pr)-Ze,Mu(xe),zo(sn,qi+Ye,Xe,Ze,Pr),sl(),Fa(sn),he}function ir(Ye){var er=Ye|0;if(er!==xe.width){he.width=xe.width=er,he.height=xe.height=er,Mu(xe);for(var lr=0;lr<6;++lr)for(var hr=0;xe.mipmask>>hr;++hr)be.texImage2D(qi+lr,hr,xe.format,er>>hr,er>>hr,0,xe.format,xe.type,null);return sl(),yn.profile&&(xe.stats.size=Ch(xe.internalformat,xe.type,he.width,he.height,!1,!0)),he}}return he($,ot,et,xt,Vt,de),he.subimage=Ee,he.resize=ir,he._reglType="textureCube",he._texture=xe,yn.profile&&(he.stats=xe.stats),he.destroy=function(){xe.decRef()},he}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)be.texImage2D(qi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?Tu=!0:ta.indexOf(dl)>=0&&(Tu=!1))),("depthTexture"in jo||"depthStencilTexture"in jo)&&(Au=!!(jo.depthTexture||jo.depthStencilTexture)),"depth"in jo&&(typeof jo.depth=="boolean"?Vl=jo.depth:(yc=jo.depth,Al=!1)),"stencil"in jo&&(typeof jo.stencil=="boolean"?Al=jo.stencil:(xu=jo.stencil,Vl=!1)),"depthStencil"in jo&&(typeof jo.depthStencil=="boolean"?Vl=Al=jo.depthStencil:(pu=jo.depthStencil,Vl=!1,Al=!1))}var sl=null,Iu=null,xc=null,Lo=null;if(Array.isArray(hs))sl=hs.map(Ei);else if(hs)sl=[Ei(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Qi[0].depth,Fa.stencil=Qi[0].stencil,Fa.depthStencil=Qi[0].depthStencil),Qi[wa]?Qi[wa](Fa):Qi[wa]=oi(Fa)}return c(ka,{width:vo,height:vo,color:dl})}function zo(wo){var wa,Fa=wo|0;if(Fa===ka.width)return ka;var vo=ka.color;for(wa=0;wa=vo.byteLength?Co.subdata(vo):(Co.destroy(),oi.buffers[wo]=null)),oi.buffers[wo]||(Co=oi.buffers[wo]=hi.create(wa,Pf,!1,!0)),Fa.buffer=hi.getBuffer(Co),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ka[wo]=1}else hi.getBuffer(wa)?(Fa.buffer=hi.getBuffer(wa),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):hi.getBuffer(wa.buffer)?(Fa.buffer=hi.getBuffer(wa.buffer),Fa.size=(+wa.size||Fa.buffer.dimension)|0,Fa.normalized=!!wa.normalized||!1,"type"in wa?Fa.type=Wn[wa.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(wa.offset||0)|0,Fa.stride=(wa.stride||0)|0,Fa.divisor=(wa.divisor||0)|0,Fa.state=1):"x"in wa&&(Fa.x=+wa.x||0,Fa.y=+wa.y||0,Fa.z=+wa.z||0,Fa.w=+wa.w||0,Fa.state=2)}for(var rs=0;rs1)for(var va=0;vadn&&(dn=Un.stats.uniformsCount)}),dn},Ir.getMaxAttributesCount=function(){var dn=0;return _a.forEach(function(Un){Un.stats.attributesCount>dn&&(dn=Un.stats.attributesCount)}),dn});function Ei(){hi={},ni={};for(var dn=0;dn<_a.length;++dn)ia(_a[dn],null,_a[dn].attributes.map(function(Un){return[Un.location,Un.name]}))}return{clear:function(){var dn=be.deleteShader.bind(be);Le(hi).forEach(dn),hi={},Le(ni).forEach(dn),ni={},_a.forEach(function(Un){be.deleteProgram(Un.program)}),_a.length=0,Gi={},Ir.shaderCount=0},program:function(dn,Un,Ui,Si){var ai=Gi[Un];ai||(ai=Gi[Un]={});var Ea=ai[dn];if(Ea&&(Ea.refCount++,!Si))return Ea;var da=new Na(Un,dn);return Ir.shaderCount++,ia(da,Ui,Si),Ea||(ai[dn]=da),_a.push(da),c(da,{destroy:function(){if(da.refCount--,da.refCount<=0){be.deleteProgram(da.program);var Va=_a.indexOf(da);_a.splice(Va,1),Ir.shaderCount--}ai[da.vertId].refCount<=0&&(be.deleteShader(ni[da.vertId]),delete ni[da.vertId],delete Gi[da.fragId][da.vertId]),Object.keys(Gi[da.fragId]).length||(be.deleteShader(hi[da.fragId]),delete hi[da.fragId],delete Gi[da.fragId])}})},restore:Ei,shader:ta,frag:-1,vert:-1}}var th=6408,nf=5121,Gh=3333,wf=5126;function Pd(be,Tr,Ir,Fn,hi,ni,yn){function li(_a){var Za;Tr.next===null?Za=nf:Za=Tr.next.colorAttachments[0].texture._texture.type;var Na=0,ia=0,Ei=Fn.framebufferWidth,dn=Fn.framebufferHeight,Un=null;Xr(_a)?Un=_a:_a&&(Na=_a.x|0,ia=_a.y|0,Ei=(_a.width||Fn.framebufferWidth-Na)|0,dn=(_a.height||Fn.framebufferHeight-ia)|0,Un=_a.data||null),Ir();var Ui=Ei*dn*4;return Un||(Za===nf?Un=new Uint8Array(Ui):Za===wf&&(Un=Un||new Float32Array(Ui))),be.pixelStorei(Gh,4),be.readPixels(Na,ia,Ei,dn,th,Za,Un),Un}function ta(_a){var Za;return Tr.setFBO({framebuffer:_a.framebuffer},function(){Za=li(_a)}),Za}function Gi(_a){return!_a||!("framebuffer"in _a)?li(_a):ta(_a)}return Gi}function gc(be){return eh(Qf(Ih(be)))}function Qf(be){return Nu(Zn(_h(be),be.length*8))}function eh(be){for(var Tr="0123456789abcdef",Ir="",Fn,hi=0;hi>>4&15)+Tr.charAt(Fn&15);return Ir}function Ih(be){for(var Tr="",Ir=-1,Fn,hi;++Ir>>6&31,128|Fn&63):Fn<=65535?Tr+=String.fromCharCode(224|Fn>>>12&15,128|Fn>>>6&63,128|Fn&63):Fn<=2097151&&(Tr+=String.fromCharCode(240|Fn>>>18&7,128|Fn>>>12&63,128|Fn>>>6&63,128|Fn&63));return Tr}function _h(be){for(var Tr=Array(be.length>>2),Ir=0;Ir>5]|=(be.charCodeAt(Ir/8)&255)<<24-Ir%32;return Tr}function Nu(be){for(var Tr="",Ir=0;Ir>5]>>>24-Ir%32&255);return Tr}function iu(be,Tr){return be>>>Tr|be<<32-Tr}function bh(be,Tr){return be>>>Tr}function df(be,Tr,Ir){return be&Tr^~be&Ir}function wh(be,Tr,Ir){return be&Tr^be&Ir^Tr&Ir}function $f(be){return iu(be,2)^iu(be,13)^iu(be,22)}function gr(be){return iu(be,6)^iu(be,11)^iu(be,25)}function Ur(be){return iu(be,7)^iu(be,18)^bh(be,3)}function wn(be){return iu(be,17)^iu(be,19)^bh(be,10)}var hn=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 Zn(be,Tr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Fn=new Array(64),hi,ni,yn,li,ta,Gi,_a,Za,Na,ia,Ei,dn;for(be[Tr>>5]|=128<<24-Tr%32,be[(Tr+64>>9<<4)+15]=Tr,Na=0;Na>16)+(Tr>>16)+(Ir>>16);return Fn<<16|Ir&65535}function aa(be){return Array.prototype.slice.call(be)}function xa(be){return aa(be).join("")}function Ra(be){var Tr=be&&be.cache,Ir=0,Fn=[],hi=[],ni=[];function yn(Ei,dn){var Un=dn&&dn.stable;if(!Un){for(var Ui=0;Ui0&&(Ei.push(Si,"="),Ei.push.apply(Ei,aa(arguments)),Ei.push(";")),Si}return c(dn,{def:Ui,toString:function(){return xa([Un.length>0?"var "+Un.join(",")+";":"",xa(Ei)])}})}function ta(){var Ei=li(),dn=li(),Un=Ei.toString,Ui=dn.toString;function Si(ai,Ea){dn(ai,Ea,"=",Ei.def(ai,Ea),";")}return c(function(){Ei.apply(Ei,aa(arguments))},{def:Ei.def,entry:Ei,exit:dn,save:Si,set:function(ai,Ea,da){Si(ai,Ea),Ei(ai,Ea,"=",da,";")},toString:function(){return Un()+Ui()}})}function Gi(){var Ei=xa(arguments),dn=ta(),Un=ta(),Ui=dn.toString,Si=Un.toString;return c(dn,{then:function(){return dn.apply(dn,aa(arguments)),this},else:function(){return Un.apply(Un,aa(arguments)),this},toString:function(){var ai=Si();return ai&&(ai="else{"+ai+"}"),xa(["if(",Ei,"){",Ui(),"}",ai])}})}var _a=li(),Za={};function Na(Ei,dn){var Un=[];function Ui(){var Va="a"+Un.length;return Un.push(Va),Va}dn=dn||0;for(var Si=0;Si":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},yi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Si={cw:ue,ccw:Me};function Ri(_e){return Array.isArray(_e)||Xr(_e)||nn(_e)}function Gi(_e){return _e.sort(function(kr,Ir){return kr===$u?-1:Ir===$u?1:kr=1,Dn>=2,kr)}else if(Ir===ls){var li=_e.data;return new Kn(li.thisDep,li.contextDep,li.propDep,kr)}else{if(Ir===ps)return new Kn(!1,!1,!1,kr);if(Ir===oo){for(var ti=!1,yn=!1,ai=!1,ta=0;ta<_e.data.length;++ta){var $i=_e.data[ta];if($i.type===io)ai=!0;else if($i.type===ns)yn=!0;else if($i.type===Ko)ti=!0;else if($i.type===na){ti=!0;var ya=$i.data;ya>=1&&(yn=!0),ya>=2&&(ai=!0)}else $i.type===ls&&(ti=ti||$i.data.thisDep,yn=yn||$i.data.contextDep,ai=ai||$i.data.propDep)}return new Kn(ti,yn,ai,kr)}else return new Kn(Ir===Ko,Ir===ns,Ir===io,kr)}}var Po=new Kn(!1,!1,!1,function(){});function Ro(_e,kr,Ir,Dn,li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn){var jn=$i.Record,Bi={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Bi.min=Pe,Bi.max=Ne);var Ti=Ir.angle_instanced_arrays,ei=Ir.webgl_draw_buffers,Sa=Ir.oes_vertex_array_object,ha={dirty:!0,profile:fn.profile},Va={},xi=[],ri={},Ea={};function ma(Yt){return Yt.replace(".","_")}function Ki(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Va[ir]=ha[ir]=!!Se,ri[ir]=ce}function Ji(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Array.isArray(Se)?(ha[ir]=Se.slice(),Va[ir]=Se.slice()):ha[ir]=Va[ir]=Se,Ea[ir]=ce}function ba(Yt){return!!isNaN(Yt)}Ki(qa,Nr),Ki(gs,Or),Ji(el,"blendColor",[0,0,0,0]),Ji(Pl,"blendEquationSeparate",[Jr,Jr]),Ji(su,"blendFuncSeparate",[rn,Er,rn,Er]),Ki($l,vn,!0),Ji(lu,"depthFunc",xn),Ji(ml,"depthRange",[0,1]),Ji(qu,"depthMask",!0),Ji(Iu,Iu,[!0,!0,!0,!0]),Ki(fu,wr),Ji(Oo,"cullFace",Ut),Ji(Es,Es,Me),Ji(Kl,Kl,1),Ki(Rl,Nn),Ji(vc,"polygonOffset",[0,0]),Ki(Hc,ii),Ki(Lc,Ui),Ji(Ih,"sampleCoverage",[1,!1]),Ki(Wc,en),Ji(zh,"stencilMask",-1),Ji(Du,"stencilFunc",[sr,0,-1]),Ji(Oh,"stencilOpSeparate",[At,ar,ar,ar]),Ji(rs,"stencilOpSeparate",[Ut,ar,ar,ar]),Ki(zs,In),Ji(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),Ji($u,$u,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Na,strings:kr,next:Va,current:ha,draw:$a,elements:ti,buffer:li,shader:ya,attributes:$i.state,vao:$i,uniforms:ta,framebuffer:ai,extensions:Ir,timer:ia,isBufferArgs:Ri},wo={primTypes:ci,compareFuncs:Vn,blendFuncs:Hi,blendEquations:Bi,stencilOps:yi,glTypes:Hn,orientationType:Si};ei&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var _a=0;function Fa(){var Yt=Ba({cache:Ai}),ce=Yt.link,Se=Yt.global;Yt.id=_a++,Yt.batchId="0";var ir=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(ir,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ea).forEach(function(Xe){Array.isArray(ha[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case io:return Xe.def(Ye.props,Ze.data);case ns:return Xe.def(Ye.context,Ze.data);case Ko:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case oo:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=kr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=$i.scope[Ze];Pr||(Pr=$i.scope[Ze]=new jn);var sn=Ve[Ze]=ce(Pr);return sn},Yt}function vo(Yt){var ce=Yt.static,Se=Yt.dynamic,ir;if(qf in ce){var Ye=!!ce[qf];ir=Ha(function(lr,hr){return Ye}),ir.enable=Ye}else if(qf in Se){var tr=Se[qf];ir=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}return ir}function Eo(Yt,ce){var Se=Yt.static,ir=Yt.dynamic;if($t in Se){var Ye=Se[$t];return Ye?(Ye=ai.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+un,Xe+"."+Ae),"null"})}else if($t in ir){var tr=ir[$t];return ao(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+xe),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Ae),Pr})}else return null}function es(Yt,ce,Se){var ir=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,dn,pi;return"width"in Xe?dn=Xe.width|0:Ze=!1,"height"in Xe?pi=Xe.height|0:Ze=!1,new Kn(!Ze&&ce&&ce.thisDep,!Ze&&ce&&ce.contextDep,!Ze&&ce&&ce.propDep,function(Ci,mi){var ea=Ci.shared.context,Ei=dn;"width"in Xe||(Ei=mi.def(ea,".",Fr,"-",Pr));var Li=pi;return"height"in Xe||(Li=mi.def(ea,".",un,"-",sn)),[Pr,sn,Ei,Li]})}else if(Ve in Ye){var ui=Ye[Ve],Yn=ao(ui,function(Ci,mi){var ea=Ci.invoke(mi,ui),Ei=Ci.shared.context,Li=mi.def(ea,".x|0"),la=mi.def(ea,".y|0"),to=mi.def('"width" in ',ea,"?",ea,".width|0:","(",Ei,".",Fr,"-",Li,")"),co=mi.def('"height" in ',ea,"?",ea,".height|0:","(",Ei,".",un,"-",la,")");return[Li,la,to,co]});return ce&&(Yn.thisDep=Yn.thisDep||ce.thisDep,Yn.contextDep=Yn.contextDep||ce.contextDep,Yn.propDep=Yn.propDep||ce.propDep),Yn}else return ce?new Kn(ce.thisDep,ce.contextDep,ce.propDep,function(Ci,mi){var ea=Ci.shared.context;return[0,0,mi.def(ea,".",Fr),mi.def(ea,".",un)]}):null}var lr=tr($u);if(lr){var hr=lr;lr=new Kn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:tr(qc)}}function Ul(Yt,ce){var Se=Yt.static,ir=typeof Se[ht]=="string"&&typeof Se[z]=="string";if(ir){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Li+"?"+Ze+".constant["+Li+"]:0;"}).join(""),"}}else{","if(",dn,"(",Ze,".buffer)){",Ci,"=",pi,".createStream(",Oe,",",Ze,".buffer);","}else{",Ci,"=",pi,".getBuffer(",Ze,".buffer);","}",mi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",Ci,".dtype;",ui.normalized,"=!!",Ze,".normalized;");function ea(Ei){Xe(ui[Ei],"=",Ze,".",Ei,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",ui.isStream,"){",pi,".destroyStream(",Ci,");","}"),ui}Ye[tr]=ao(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,ir={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];ir[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];ir[Ye]=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}),ir}function yc(Yt,ce,Se,ir,Ye){Yt.static,Yt.dynamic;var tr=Ul(Yt,ce),lr=Eo(Yt),hr=es(Yt,lr),Ve=hs(Yt),Xe=ku(Yt),Ze=Al(Yt,Ye,tr);function Pr(Ci){var mi=hr[Ci];mi&&(Xe[Ci]=mi)}Pr($u),Pr(ma(qc));var sn=Object.keys(Xe).length>0,dn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(dn.profile=vo(Yt),dn.uniforms=dl(Se),dn.drawVAO=dn.scopeVAO=Ve.vao,!dn.drawVAO&&Ze.program&&!tr&&Ir.angle_instanced_arrays&&Ve.static.elements){var pi=!0,ui=Ze.program.attributes.map(function(Ci){var mi=ce.static[Ci];return pi=pi&&!!mi,mi});if(pi&&ui.length>0){var Yn=$i.getVAO($i.createVAO({attributes:ui,elements:Ve.static.elements}));dn.drawVAO=new Kn(null,null,null,function(Ci,mi){return Ci.link(Yn)}),dn.useVAO=!0}}return tr?dn.useVAO=!0:dn.attributes=Cu(ce),dn.context=pc(ir),dn}function xu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;ei&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Se?Pr=Se.append(Yt,ce):Pr=ce.def(lr,".next"),ir||ce("if(",Pr,"!==",lr,".cur){"),ce("if(",Pr,"){",tr,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ei&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",zn,",null);"),ei&&ce(hr,".drawBuffersWEBGL(",Ze,");"),ce("}",lr,".cur=",Pr,";"),ir||ce("}")}function Tu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.gl,tr=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");xi.forEach(function(Ze){var Pr=ma(Ze);if(!(Pr in Se.state)){var sn,dn;if(Pr in lr){sn=lr[Pr],dn=tr[Pr];var pi=h(ha[Pr].length,function(Yn){return Xe.def(sn,"[",Yn,"]")});Xe(Yt.cond(pi.map(function(Yn,Ci){return Yn+"!=="+dn+"["+Ci+"]"}).join("||")).then(Ye,".",Ea[Pr],"(",pi,");",pi.map(function(Yn,Ci){return dn+"["+Ci+"]="+Yn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var ui=Yt.cond(sn,"!==",hr,".",Pr);Xe(ui),Pr in ri?ui(Yt.cond(sn).then(Ye,".enable(",ri[Pr],");").else(Ye,".disable(",ri[Pr],");"),hr,".",Pr,"=",sn,";"):ui(Ye,".",Ea[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Gi(Object.keys(Se)).forEach(function(Xe){var Ze=Se[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,ce);if(ri[Xe]){var sn=ri[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var dn=tr[Xe];ce(hr,".",Ea[Xe],"(",Pr,");",Pr.map(function(pi,ui){return dn+"["+ui+"]="+pi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(hr,".",Ea[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ea[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Au(Yt,ce){Ti&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,ce,Se,ir,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function dn(ea){Pr=ce.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=ce.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function pi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function ui(ea){var Ei=ce.def(hr,".profile");ce(hr,".profile=",ea,";"),ce.exit(hr,".profile=",Ei,";")}var Yn;if(Xe){if(Ua(Xe)){Xe.enable?(dn(ce),pi(ce.exit),ui("true")):ui("false");return}Yn=Xe.append(Yt,ce),ui(Yn)}else Yn=ce.def(hr,".profile");var Ci=Yt.block();dn(Ci),ce("if(",Yn,"){",Ci,"}");var mi=Yt.block();pi(mi),ce.exit("if(",Yn,"){",mi,"}")}function Lu(Yt,ce,Se,ir,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case fa:case So:case Ds:return 2;case Ta:case ds:case wl:return 3;case so:case fl:case Eu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=tr.gl,sn=ce.def(Ve,".location"),dn=ce.def(tr.attributes,"[",sn,"]"),pi=Ze.state,ui=Ze.buffer,Yn=[Ze.x,Ze.y,Ze.z,Ze.w],Ci=["buffer","normalized","offset","stride"];function mi(){ce("if(!",dn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ei=Ze.type,Li;if(Ze.size?Li=ce.def(Ze.size,"||",Xe):Li=Xe,ce("if(",dn,".type!==",Ei,"||",dn,".size!==",Li,"||",Ci.map(function(to){return dn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",Oe,",",ui,".buffer);",Pr,".vertexAttribPointer(",[sn,Li,Ei,Ze.normalized,Ze.stride,Ze.offset],");",dn,".type=",Ei,";",dn,".size=",Li,";",Ci.map(function(to){return dn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Ti){var la=Ze.divisor;ce("if(",dn,".divisor!==",la,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,la],");",dn,".divisor=",la,";}")}}function ea(){ce("if(",dn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",dn,".buffer=null;","}if(",Za.map(function(Ei,Li){return dn+"."+Ei+"!=="+Yn[Li]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Yn,");",Za.map(function(Ei,Li){return dn+"."+Ei+"="+Yn[Li]+";"}).join(""),"}")}pi===Oa?mi():pi===ka?ea():(ce("if(",pi,"===",Oa,"){"),mi(),ce("}else{"),ea(),ce("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Se.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,ce)}else{if(!Ye(Po))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new jn).forEach(function(dn){Pr[dn]=ce.def(sn,".",dn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,ce,Se,ir,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],xs=[],Il=0;Il>1)",ui],");")}function la(){Se(Yn,".drawArraysInstancedANGLE(",[sn,dn,pi,ui],");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}function Ei(){function Li(){Se(tr+".drawElements("+[sn,pi,Ci,dn+"<<(("+Ci+"-"+ca+")>>1)"]+");")}function la(){Se(tr+".drawArrays("+[sn,dn,pi]+");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}Ti&&(typeof ui!="number"||ui>=0)?typeof ui=="string"?(Se("if(",ui,">0){"),ea(),Se("}else if(",ui,"<0){"),Ei(),Se("}")):ea():Ei()}function Cs(Yt,ce,Se,ir,Ye){var tr=Fa(),lr=tr.proc("body",Ye);return Ti&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,ir),tr.compile().body}function Ml(Yt,ce,Se,ir){Au(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Lu(Yt,ce,Se,ir.attributes,function(){return!0})),xc(Yt,ce,Se,ir.uniforms,function(){return!0},!1),Co(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Au(Yt,Se),xu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),Tu(Yt,Se,ce),No(Yt,Se,ce.state),sl(Yt,Se,ce,!1,!0);var ir=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",ir,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(ir,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function $(Yt,ce,Se,ir){Yt.batchId="a1",Au(Yt,ce);function Ye(){return!0}Lu(Yt,ce,Se,ir.attributes,Ye),xc(Yt,ce,Se,ir.uniforms,Ye,!1),Co(Yt,ce,ce,Se)}function ot(Yt,ce,Se,ir){Au(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),Ze=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",Ze,"}",Xe.exit);function Pr(Ci){return Ci.contextDep&&Ye||Ci.propDep}function sn(Ci){return!Pr(Ci)}if(Se.needsContext&&xu(Yt,Ze,Se.context),Se.needsFramebuffer&&pu(Yt,Ze,Se.framebuffer),No(Yt,Ze,Se.state,Pr),Se.profile&&Pr(Se.profile)&&sl(Yt,Ze,Se,!1,!0),ir)Se.useVAO?Se.drawVAO?Pr(Se.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Lu(Yt,Xe,Se,ir.attributes,sn),Lu(Yt,Ze,Se,ir.attributes,Pr)),xc(Yt,Xe,Se,ir.uniforms,sn,!1),xc(Yt,Ze,Se,ir.uniforms,Pr,!0),Co(Yt,Xe,Ze,Se);else{var dn=Yt.global.def("{}"),pi=Se.shader.progVar.append(Yt,Ze),ui=Ze.def(pi,".id"),Yn=Ze.def(dn,"[",ui,"]");Ze(Yt.shared.gl,".useProgram(",pi,".program);","if(!",Yn,"){",Yn,"=",dn,"[",ui,"]=",Yt.link(function(Ci){return Cs($,Yt,Se,Ci,2)}),"(",pi,");}",Yn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Au(Yt,Se);var ir=!1,Ye=!0;Object.keys(ce.context).forEach(function(dn){ir=ir||ce.context[dn].propDep}),ir||(xu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?ir=lr=!0:tr.contextDep&&ir&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(ir=!0);function hr(dn){return dn.contextDep&&ir||dn.propDep}Tu(Yt,Se,ce),No(Yt,Se,ce.state,function(dn){return!hr(dn)}),(!ce.profile||!hr(ce.profile))&&sl(Yt,Se,ce,!1,"a1"),ce.contextDep=ir,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Se.def(Xe,".id"),sn=Se.def(Ze,"[",Pr,"]");Se(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(dn){return Cs(ot,Yt,ce,dn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Gi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function(Ze,Pr){ba(Ze)?Se.set(Yt.next[hr],"["+Pr+"]",Ze):Se.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Se.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(ir.next,"."+hr,Xe)}),sl(Yt,Se,ce,!0,!0),[Et,ke,Ht,Fe,zt].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.draw,"."+hr,Xe):Se.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ba(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(ir.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new jn).forEach(function(Ze){Se.set(Xe,"."+Ze,Ve[Ze])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);ba(tr)?Se.set(ir.vao,".targetVAO",tr):Se.set(ir.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.shader,"."+hr,Xe):Se.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Co){var Cs=ba[Co];Cs&&Cs(ia,null,0)}Ir.flush(),$i&&$i.update()}function Eo(){!Fa&&ba.length>0&&(Fa=x.next(vo))}function es(){Fa&&(x.cancel(vo),Fa=null)}function Ul(Co){Co.preventDefault(),es(),Io.forEach(function(Cs){Cs()})}function Al(Co){Ir.getError(),li.restore(),ha.restore(),Bi.restore(),Va.restore(),xi.restore(),ri.restore(),ei.restore(),$i&&$i.restore(),Ea.procs.refresh(),Eo(),wo.forEach(function(Cs){Cs()})}Ji&&(Ji.addEventListener(nl,Ul,!1),Ji.addEventListener(uu,Al,!1));function hs(){ba.length=0,es(),Ji&&(Ji.removeEventListener(nl,Ul),Ji.removeEventListener(uu,Al)),ha.clear(),ri.clear(),xi.clear(),ei.clear(),Va.clear(),Ti.clear(),Bi.clear(),$i&&$i.clear(),_a.forEach(function(Co){Co()})}function ku(Co){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var Ze=0;Ze0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=ri.setFBO=ku({framebuffer:f.define.call(null,Xl,"framebuffer")});function Cu(Co,Cs){var Ml=0;Ea.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Co.framebuffer.faces[Cs]},Co),Cu);else dl(Co,Cu);else Cu(null,Co)}function yc(Co){ba.push(Co);function Cs(){var Ml=ru(ba,Co);function yl(){var $=ru(ba,yl);ba[$]=ba[ba.length-1],ba.length-=1,ba.length<=0&&es()}ba[Ml]=yl}return Eo(),{cancel:Cs}}function xu(){var Co=Ki.viewport,Cs=Ki.scissor_box;Co[0]=Co[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Co[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Co[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=No(),xu(),Ea.procs.poll()}function Tu(){Va.refresh(),xu(),Ea.procs.refresh(),$i&&$i.update()}function No(){return(y()-ya)/1e3}Tu();function Au(Co,Cs){var Ml;switch(Co){case"frame":return yc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=_a;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:ma,destroy:hs,_gl:Ir,_refresh:Tu,poll:function(){pu(),$i&&$i.update()},now:No,stats:yn,getCachedCode:sl,preloadCachedCode:Lu});return kr.onDone(null,xc),xc}return wh})}),LH=Dt((Q,Z)=>{var c=Ig();Z.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},I(r)?r={container:r}:S(r)?r={container:r}:t(r)?r={gl:r}:r=c(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var a=document.querySelector(r.container);if(!a)throw Error("Element "+r.container+" is not found");r.container=a}I(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=e(),r.container.appendChild(r.canvas),g(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=e(),r.container.appendChild(r.canvas),g(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch{}return r.gl}),r.gl};function g(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var a=r.container.getBoundingClientRect();r.canvas.width=r.width||a.right-a.left,r.canvas.height=r.height||a.bottom-a.top}}function I(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function S(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function t(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function e(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}),PH=Dt((Q,Z)=>{var c=oE(),g=[32,126];Z.exports=I;function I(S){S=S||{};var t=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),r=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],n=S.chars||g;if(r&&typeof r!="string"&&(r=c(r)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var o=[],i=n[0],l=0;i<=n[1];i++)o[l++]=String.fromCharCode(i);n=o}t=t.slice(),e.width=t[0],e.height=t[1];var f=e.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,e.width,e.height),f.font=r,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";for(var x=a[0]/2,y=a[1]/2,i=0;it[0]-a[0]/2&&(x=a[0]/2,y+=a[1]);return e}}),sE=Dt(Q=>{"use restrict";var Z=32;Q.INT_BITS=Z,Q.INT_MAX=2147483647,Q.INT_MIN=-1<0)-(I<0)},Q.abs=function(I){var S=I>>Z-1;return(I^S)-S},Q.min=function(I,S){return S^(I^S)&-(I65535)<<4,I>>>=S,t=(I>255)<<3,I>>>=t,S|=t,t=(I>15)<<2,I>>>=t,S|=t,t=(I>3)<<1,I>>>=t,S|=t,S|I>>1},Q.log10=function(I){return I>=1e9?9:I>=1e8?8:I>=1e7?7:I>=1e6?6:I>=1e5?5:I>=1e4?4:I>=1e3?3:I>=100?2:I>=10?1:0},Q.popCount=function(I){return I=I-(I>>>1&1431655765),I=(I&858993459)+(I>>>2&858993459),(I+(I>>>4)&252645135)*16843009>>>24};function c(I){var S=32;return I&=-I,I&&S--,I&65535&&(S-=16),I&16711935&&(S-=8),I&252645135&&(S-=4),I&858993459&&(S-=2),I&1431655765&&(S-=1),S}Q.countTrailingZeros=c,Q.nextPow2=function(I){return I+=I===0,--I,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I+1},Q.prevPow2=function(I){return I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I-(I>>>1)},Q.parity=function(I){return I^=I>>>16,I^=I>>>8,I^=I>>>4,I&=15,27030>>>I&1};var g=new Array(256);(function(I){for(var S=0;S<256;++S){var t=S,e=S,r=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=t&1,--r;I[S]=e<>>8&255]<<16|g[I>>>16&255]<<8|g[I>>>24&255]},Q.interleave2=function(I,S){return I&=65535,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,I|S<<1},Q.deinterleave2=function(I,S){return I=I>>>S&1431655765,I=(I|I>>>1)&858993459,I=(I|I>>>2)&252645135,I=(I|I>>>4)&16711935,I=(I|I>>>16)&65535,I<<16>>16},Q.interleave3=function(I,S,t){return I&=1023,I=(I|I<<16)&4278190335,I=(I|I<<8)&251719695,I=(I|I<<4)&3272356035,I=(I|I<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,I|=S<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,I|t<<2},Q.deinterleave3=function(I,S){return I=I>>>S&1227133513,I=(I|I>>>2)&3272356035,I=(I|I>>>4)&251719695,I=(I|I>>>8)&4278190335,I=(I|I>>>16)&1023,I<<22>>22},Q.nextCombination=function(I){var S=I|I-1;return S+1|(~S&-~S)-1>>>c(I)+1}}),IH=Dt((Q,Z)=>{function c(S,t,e){var r=S[e]|0;if(r<=0)return[];var a=new Array(r),n;if(e===S.length-1)for(n=0;n"u"&&(t=0),typeof S){case"number":if(S>0)return g(S|0,t);break;case"object":if(typeof S.length=="number")return c(S,t,0);break}return[]}Z.exports=I}),zH=Dt(Q=>{var Z=sE(),c=IH(),g=ix().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:c([32,0]),UINT16:c([32,0]),UINT32:c([32,0]),BIGUINT64:c([32,0]),INT8:c([32,0]),INT16:c([32,0]),INT32:c([32,0]),BIGINT64:c([32,0]),FLOAT:c([32,0]),DOUBLE:c([32,0]),DATA:c([32,0]),UINT8C:c([32,0]),BUFFER:c([32,0])});var I=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=c([32,0])),e.BIGUINT64||(e.BIGUINT64=c([32,0])),e.BIGINT64||(e.BIGINT64=c([32,0])),e.BUFFER||(e.BUFFER=c([32,0]));var r=e.DATA,a=e.BUFFER;Q.free=function(h){if(g.isBuffer(h))a[Z.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var p=h.length||h.byteLength,k=Z.log2(p)|0;r[k].push(h)}};function n(h){if(h){var p=h.length||h.byteLength,k=Z.log2(p);r[k].push(h)}}function o(h){n(h.buffer)}Q.freeUint8=Q.freeUint16=Q.freeUint32=Q.freeBigUint64=Q.freeInt8=Q.freeInt16=Q.freeInt32=Q.freeBigInt64=Q.freeFloat32=Q.freeFloat=Q.freeFloat64=Q.freeDouble=Q.freeUint8Clamped=Q.freeDataView=o,Q.freeArrayBuffer=n,Q.freeBuffer=function(h){a[Z.log2(h.length)].push(h)},Q.malloc=function(h,p){if(p===void 0||p==="arraybuffer")return i(h);switch(p){case"uint8":return l(h);case"uint16":return f(h);case"uint32":return x(h);case"int8":return y(h);case"int16":return v(h);case"int32":return T(h);case"float":case"float32":return u(h);case"double":case"float64":return b(h);case"uint8_clamped":return _(h);case"bigint64":return M(h);case"biguint64":return P(h);case"buffer":return A(h);case"data":case"dataview":return C(h);default:return null}return null};function i(p){var p=Z.nextPow2(p),k=Z.log2(p),w=r[k];return w.length>0?w.pop():new ArrayBuffer(p)}Q.mallocArrayBuffer=i;function l(h){return new Uint8Array(i(h),0,h)}Q.mallocUint8=l;function f(h){return new Uint16Array(i(2*h),0,h)}Q.mallocUint16=f;function x(h){return new Uint32Array(i(4*h),0,h)}Q.mallocUint32=x;function y(h){return new Int8Array(i(h),0,h)}Q.mallocInt8=y;function v(h){return new Int16Array(i(2*h),0,h)}Q.mallocInt16=v;function T(h){return new Int32Array(i(4*h),0,h)}Q.mallocInt32=T;function u(h){return new Float32Array(i(4*h),0,h)}Q.mallocFloat32=Q.mallocFloat=u;function b(h){return new Float64Array(i(8*h),0,h)}Q.mallocFloat64=Q.mallocDouble=b;function _(h){return I?new Uint8ClampedArray(i(h),0,h):l(h)}Q.mallocUint8Clamped=_;function P(h){return S?new BigUint64Array(i(8*h),0,h):null}Q.mallocBigUint64=P;function M(h){return t?new BigInt64Array(i(8*h),0,h):null}Q.mallocBigInt64=M;function C(h){return new DataView(i(h),0,h)}Q.mallocDataView=C;function A(h){h=Z.nextPow2(h);var p=Z.log2(h),k=a[p];return k.length>0?k.pop():new g(h)}Q.mallocBuffer=A,Q.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,r[h].length=0,a[h].length=0}}),OH=Dt((Q,Z)=>{var c=Object.prototype.toString;Z.exports=function(g){var I;return c.call(g)==="[object Object]"&&(I=Object.getPrototypeOf(g),I===null||I===Object.getPrototypeOf({}))}}),lE=Dt((Q,Z)=>{Z.exports=function(c,g){g||(g=[0,""]),c=String(c);var I=parseFloat(c,10);return g[0]=I,g[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}}),DH=Dt((Q,Z)=>{var c=lE();Z.exports=t;var g=96;function I(e,r){var a=c(getComputedStyle(e).getPropertyValue(r));return a[0]*t(a[1],e)}function S(e,r){var a=document.createElement("div");a.style["font-size"]="128"+e,r.appendChild(a);var n=I(a,"font-size")/128;return r.removeChild(a),n}function t(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return S(e,r);case"em":return I(r,"font-size");case"rem":return I(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 g;case"cm":return g/2.54;case"mm":return g/25.4;case"pt":return g/72;case"pc":return g/6}return 1}}),FH=Dt((Q,Z)=>{Z.exports=S;var c=S.canvas=document.createElement("canvas"),g=c.getContext("2d"),I=t([32,126]);S.createPairs=t,S.ascii=I;function S(e,r){Array.isArray(e)&&(e=e.join(", "));var a={},n,o=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?n=t(r):Array.isArray(r)?n=r:(r.o?n=t(r.o):r.pairs&&(n=r.pairs),r.fontSize&&(o=r.fontSize),r.threshold!=null&&(i=r.threshold))),n||(n=I),g.font=o+"px "+e;for(var l=0;lo*i){var v=(y-x)/o;a[f]=v*1e3}}return a}function t(e){for(var r=[],a=e[0];a<=e[1];a++)for(var n=String.fromCharCode(a),o=e[0];o{Z.exports=c,c.canvas=document.createElement("canvas"),c.cache={};function c(i,e){e||(e={}),(typeof i=="string"||Array.isArray(i))&&(e.family=i);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var a=e.size||e.fontSize||e.em||48,n=e.weight||e.fontWeight||"",o=e.style||e.fontStyle||"",i=[o,n,a].join(" ")+"px "+r,l=e.origin||"top";if(c.cache[r]&&a<=c.cache[r].em)return g(c.cache[r],l);var f=e.canvas||c.canvas,x=f.getContext("2d"),y={upper:e.upper!==void 0?e.upper:"H",lower:e.lower!==void 0?e.lower:"x",descent:e.descent!==void 0?e.descent:"p",ascent:e.ascent!==void 0?e.ascent:"h",tittle:e.tittle!==void 0?e.tittle:"i",overshoot:e.overshoot!==void 0?e.overshoot:"O"},v=Math.ceil(a*1.5);f.height=v,f.width=v*.5,x.font=i;var T="H",u={top:0};x.clearRect(0,0,v,v),x.textBaseline="top",x.fillStyle="black",x.fillText(T,0,0);var b=I(x.getImageData(0,0,v,v));x.clearRect(0,0,v,v),x.textBaseline="bottom",x.fillText(T,0,v);var _=I(x.getImageData(0,0,v,v));u.lineHeight=u.bottom=v-_+b,x.clearRect(0,0,v,v),x.textBaseline="alphabetic",x.fillText(T,0,v);var P=I(x.getImageData(0,0,v,v)),M=v-P-1+b;u.baseline=u.alphabetic=M,x.clearRect(0,0,v,v),x.textBaseline="middle",x.fillText(T,0,v*.5);var C=I(x.getImageData(0,0,v,v));u.median=u.middle=v-C-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="hanging",x.fillText(T,0,v*.5);var A=I(x.getImageData(0,0,v,v));u.hanging=v-A-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="ideographic",x.fillText(T,0,v);var h=I(x.getImageData(0,0,v,v));if(u.ideographic=v-h-1+b,y.upper&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.upper,0,0),u.upper=I(x.getImageData(0,0,v,v)),u.capHeight=u.baseline-u.upper),y.lower&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.lower,0,0),u.lower=I(x.getImageData(0,0,v,v)),u.xHeight=u.baseline-u.lower),y.tittle&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.tittle,0,0),u.tittle=I(x.getImageData(0,0,v,v))),y.ascent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.ascent,0,0),u.ascent=I(x.getImageData(0,0,v,v))),y.descent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.descent,0,0),u.descent=S(x.getImageData(0,0,v,v))),y.overshoot){x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.overshoot,0,0);var p=S(x.getImageData(0,0,v,v));u.overshoot=p-M}for(var k in u)u[k]/=a;return u.em=a,c.cache[r]=u,g(u,l)}function g(t,e){var r={};typeof e=="string"&&(e=t[e]);for(var a in t)a!=="em"&&(r[a]=t[a]-e);return r}function I(t){for(var e=t.height,r=t.data,a=3;a0;a-=4)if(r[a]!==0)return Math.floor((a-3)*.25/e)}}),BH=Dt((Q,Z)=>{var c=EH(),g=Ig(),I=CH(),S=LH(),t=JS(),e=U1(),r=PH(),a=zH(),n=vb(),o=OH(),i=lE(),l=DH(),f=FH(),x=Sd(),y=RH(),v=xx(),T=sE(),u=T.nextPow2,b=new t,_=!1;document.body&&(P=document.body.appendChild(document.createElement("div")),P.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P).fontStretch&&(_=!0),document.body.removeChild(P));var P,M=function(A){C(A)?(A={regl:A},this.gl=A.regl._gl):this.gl=S(A),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=A.regl||I({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(),b.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(o(A)?A:{})};M.prototype.createShader=function(){var A=this.regl,h=A({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:A.prop("count"),offset:A.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:A.this("sizeBuffer")},width:{offset:0,stride:8,buffer:A.this("sizeBuffer")},char:A.this("charBuffer"),position:A.this("position")},uniforms:{atlasSize:function(k,w){return[w.atlas.width,w.atlas.height]},atlasDim:function(k,w){return[w.atlas.cols,w.atlas.rows]},atlas:function(k,w){return w.atlas.texture},charStep:function(k,w){return w.atlas.step},em:function(k,w){return w.atlas.em},color:A.prop("color"),opacity:A.prop("opacity"),viewport:A.this("viewportArray"),scale:A.this("scale"),align:A.prop("align"),baseline:A.prop("baseline"),translate:A.this("translate"),positionOffset:A.prop("positionOffset")},primitive:"points",viewport:A.this("viewport"),vert:` +`),Un;if(Tr&&(Un=gc(dn),Tr[Un]))return Tr[Un].apply(null,hi);var Ui=Function.apply(null,Fn.concat(dn));return Tr&&(Tr[Un]=Ui),Ui.apply(null,hi)}return{global:_a,link:yn,block:li,proc:Na,scope:ta,cond:Gi,compile:ia}}var Ga="xyzw".split(""),fa=5121,Oa=1,Aa=2,na=0,ao=1,is=2,Xo=3,ls=4,ps=5,so=6,$a="dither",gs="blend.enable",el="blend.color",Il="blend.equation",su="blend.func",$l="depth.enable",lu="depth.func",ml="depth.range",qu="depth.mask",zu="colorMask",fu="cull.enable",Oo="cull.face",Es="frontFace",Kl="lineWidth",Rl="polygonOffset.enable",vc="polygonOffset.offset",Hc="sample.alpha",Pc="sample.enable",zh="sample.coverage",Wc="stencil.enable",Oh="stencil.mask",Fu="stencil.func",Dh="stencil.opFront",ns="stencil.opBack",zs="scissor.enable",qc="scissor.box",$u="viewport",Zf="profile",$t="framebuffer",z="vert",ht="frag",Et="elements",Ot="primitive",Ht="count",Te="offset",Fe="instances",Ke="vao",vr="Width",Dr="Height",Fr=$t+vr,un=$t+Dr,Sn=$u+vr,Xt=$u+Dr,ae="drawingBuffer",_e=ae+vr,Me=ae+Dr,je=[su,Il,Fu,Dh,ns,zh,$u,qc,vc],De=34962,$e=34963,wr=2884,Or=3042,Nr=3024,en=2960,vn=2929,In=3089,jn=32823,si=32926,Wi=32928,ga=5126,pa=35664,Ma=35665,lo=35666,No=5124,So=35667,ds=35668,fl=35669,vl=35670,Ds=35671,wl=35672,Lu=35673,gu=35674,$s=35675,Zs=35676,Yu=35678,dc=35680,$c=4,At=1028,Ut=1029,ue=2304,Se=2305,Pe=32775,Ne=32776,sr=519,ar=7680,Er=0,rn=1,Jr=32774,xn=513,zn=36160,On=36064,$i={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},Vn={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},bi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pi={cw:ue,ccw:Se};function ji(be){return Array.isArray(be)||Xr(be)||nn(be)}function Ki(be){return be.sort(function(Tr,Ir){return Tr===$u?-1:Ir===$u?1:Tr=1,Fn>=2,Tr)}else if(Ir===ls){var hi=be.data;return new Jn(hi.thisDep,hi.contextDep,hi.propDep,Tr)}else{if(Ir===ps)return new Jn(!1,!1,!1,Tr);if(Ir===so){for(var ni=!1,yn=!1,li=!1,ta=0;ta=1&&(yn=!0),_a>=2&&(li=!0)}else Gi.type===ls&&(ni=ni||Gi.data.thisDep,yn=yn||Gi.data.contextDep,li=li||Gi.data.propDep)}return new Jn(ni,yn,li,Tr)}else return new Jn(Ir===Xo,Ir===is,Ir===ao,Tr)}}var Io=new Jn(!1,!1,!1,function(){});function Ro(be,Tr,Ir,Fn,hi,ni,yn,li,ta,Gi,_a,Za,Na,ia,Ei,dn){var Un=Gi.Record,Ui={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Ui.min=Pe,Ui.max=Ne);var Si=Ir.angle_instanced_arrays,ai=Ir.webgl_draw_buffers,Ea=Ir.oes_vertex_array_object,da={dirty:!0,profile:dn.profile},Va={},ki=[],oi={},Ca={};function va(Yt){return Yt.replace(".","_")}function Xi(Yt,he,Ee){var ir=va(Yt);ki.push(Yt),Va[ir]=da[ir]=!!Ee,oi[ir]=he}function Qi(Yt,he,Ee){var ir=va(Yt);ki.push(Yt),Array.isArray(Ee)?(da[ir]=Ee.slice(),Va[ir]=Ee.slice()):da[ir]=Va[ir]=Ee,Ca[ir]=he}function ka(Yt){return!!isNaN(Yt)}Xi($a,Nr),Xi(gs,Or),Qi(el,"blendColor",[0,0,0,0]),Qi(Il,"blendEquationSeparate",[Jr,Jr]),Qi(su,"blendFuncSeparate",[rn,Er,rn,Er]),Xi($l,vn,!0),Qi(lu,"depthFunc",xn),Qi(ml,"depthRange",[0,1]),Qi(qu,"depthMask",!0),Qi(zu,zu,[!0,!0,!0,!0]),Xi(fu,wr),Qi(Oo,"cullFace",Ut),Qi(Es,Es,Se),Qi(Kl,Kl,1),Xi(Rl,jn),Qi(vc,"polygonOffset",[0,0]),Xi(Hc,si),Xi(Pc,Wi),Qi(zh,"sampleCoverage",[1,!1]),Xi(Wc,en),Qi(Oh,"stencilMask",-1),Qi(Fu,"stencilFunc",[sr,0,-1]),Qi(Dh,"stencilOpSeparate",[At,ar,ar,ar]),Qi(ns,"stencilOpSeparate",[Ut,ar,ar,ar]),Xi(zs,In),Qi(qc,"scissor",[0,0,be.drawingBufferWidth,be.drawingBufferHeight]),Qi($u,$u,[0,0,be.drawingBufferWidth,be.drawingBufferHeight]);var zo={gl:be,context:Na,strings:Tr,next:Va,current:da,draw:Za,elements:ni,buffer:hi,shader:_a,attributes:Gi.state,vao:Gi,uniforms:ta,framebuffer:li,extensions:Ir,timer:ia,isBufferArgs:ji},wo={primTypes:di,compareFuncs:Vn,blendFuncs:$i,blendEquations:Ui,stencilOps:bi,glTypes:Wn,orientationType:Pi};ai&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Fn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(he){return On+he})}));var wa=0;function Fa(){var Yt=Ra({cache:Ei}),he=Yt.link,Ee=Yt.global;Yt.id=wa++,Yt.batchId="0";var ir=he(zo),Ye=Yt.shared={props:"a0"};Object.keys(zo).forEach(function(Xe){Ye[Xe]=Ee.def(ir,".",Xe)});var er=Yt.next={},lr=Yt.current={};Object.keys(Ca).forEach(function(Xe){Array.isArray(da[Xe])&&(er[Xe]=Ee.def(Ye.next,".",Xe),lr[Xe]=Ee.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Ee.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(he(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case ao:return Xe.def(Ye.props,Ze.data);case is:return Xe.def(Ye.context,Ze.data);case Xo:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case so:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=Tr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=Gi.scope[Ze];Pr||(Pr=Gi.scope[Ze]=new Un);var sn=Ve[Ze]=he(Pr);return sn},Yt}function vo(Yt){var he=Yt.static,Ee=Yt.dynamic,ir;if(Zf in he){var Ye=!!he[Zf];ir=Wa(function(lr,hr){return Ye}),ir.enable=Ye}else if(Zf in Ee){var er=Ee[Zf];ir=oo(er,function(lr,hr){return lr.invoke(hr,er)})}return ir}function Co(Yt,he){var Ee=Yt.static,ir=Yt.dynamic;if($t in Ee){var Ye=Ee[$t];return Ye?(Ye=li.getFramebuffer(Ye),Wa(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Wa(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+_e),hr.set(Xe,"."+un,Xe+"."+Me),"null"})}else if($t in ir){var er=ir[$t];return oo(er,function(lr,hr){var Ve=lr.invoke(hr,er),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+_e),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Me),Pr})}else return null}function rs(Yt,he,Ee){var ir=Yt.static,Ye=Yt.dynamic;function er(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,pn,vi;return"width"in Xe?pn=Xe.width|0:Ze=!1,"height"in Xe?vi=Xe.height|0:Ze=!1,new Jn(!Ze&&he&&he.thisDep,!Ze&&he&&he.contextDep,!Ze&&he&&he.propDep,function(zi,yi){var ea=zi.shared.context,Ii=pn;"width"in Xe||(Ii=yi.def(ea,".",Fr,"-",Pr));var Oi=vi;return"height"in Xe||(Oi=yi.def(ea,".",un,"-",sn)),[Pr,sn,Ii,Oi]})}else if(Ve in Ye){var fi=Ye[Ve],Xn=oo(fi,function(zi,yi){var ea=zi.invoke(yi,fi),Ii=zi.shared.context,Oi=yi.def(ea,".x|0"),ca=yi.def(ea,".y|0"),to=yi.def('"width" in ',ea,"?",ea,".width|0:","(",Ii,".",Fr,"-",Oi,")"),ho=yi.def('"height" in ',ea,"?",ea,".height|0:","(",Ii,".",un,"-",ca,")");return[Oi,ca,to,ho]});return he&&(Xn.thisDep=Xn.thisDep||he.thisDep,Xn.contextDep=Xn.contextDep||he.contextDep,Xn.propDep=Xn.propDep||he.propDep),Xn}else return he?new Jn(he.thisDep,he.contextDep,he.propDep,function(zi,yi){var ea=zi.shared.context;return[0,0,yi.def(ea,".",Fr),yi.def(ea,".",un)]}):null}var lr=er($u);if(lr){var hr=lr;lr=new Jn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:er(qc)}}function Vl(Yt,he){var Ee=Yt.static,ir=typeof Ee[ht]=="string"&&typeof Ee[z]=="string";if(ir){if(Object.keys(he.dynamic).length>0)return null;var Ye=he.static,er=Object.keys(Ye);if(er.length>0&&typeof Ye[er[0]]=="number"){for(var lr=[],hr=0;hr"+Oi+"?"+Ze+".constant["+Oi+"]:0;"}).join(""),"}}else{","if(",pn,"(",Ze,".buffer)){",zi,"=",vi,".createStream(",De,",",Ze,".buffer);","}else{",zi,"=",vi,".getBuffer(",Ze,".buffer);","}",yi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",zi,".dtype;",fi.normalized,"=!!",Ze,".normalized;");function ea(Ii){Xe(fi[Ii],"=",Ze,".",Ii,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",fi.isStream,"){",vi,".destroyStream(",zi,");","}"),fi}Ye[er]=oo(lr,hr)}),Ye}function pc(Yt){var he=Yt.static,Ee=Yt.dynamic,ir={};return Object.keys(he).forEach(function(Ye){var er=he[Ye];ir[Ye]=Wa(function(lr,hr){return typeof er=="number"||typeof er=="boolean"?""+er:lr.link(er)})}),Object.keys(Ee).forEach(function(Ye){var er=Ee[Ye];ir[Ye]=oo(er,function(lr,hr){return lr.invoke(hr,er)})}),ir}function yc(Yt,he,Ee,ir,Ye){Yt.static,Yt.dynamic;var er=Vl(Yt,he),lr=Co(Yt),hr=rs(Yt,lr),Ve=hs(Yt),Xe=Tu(Yt),Ze=Al(Yt,Ye,er);function Pr(zi){var yi=hr[zi];yi&&(Xe[zi]=yi)}Pr($u),Pr(va(qc));var sn=Object.keys(Xe).length>0,pn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(pn.profile=vo(Yt),pn.uniforms=dl(Ee),pn.drawVAO=pn.scopeVAO=Ve.vao,!pn.drawVAO&&Ze.program&&!er&&Ir.angle_instanced_arrays&&Ve.static.elements){var vi=!0,fi=Ze.program.attributes.map(function(zi){var yi=he.static[zi];return vi=vi&&!!yi,yi});if(vi&&fi.length>0){var Xn=Gi.getVAO(Gi.createVAO({attributes:fi,elements:Ve.static.elements}));pn.drawVAO=new Jn(null,null,null,function(zi,yi){return zi.link(Xn)}),pn.useVAO=!0}}return er?pn.useVAO=!0:pn.attributes=Pu(he),pn.context=pc(ir),pn}function xu(Yt,he,Ee){var ir=Yt.shared,Ye=ir.context,er=Yt.scope();Object.keys(Ee).forEach(function(lr){he.save(Ye,"."+lr);var hr=Ee[lr],Ve=hr.append(Yt,he);Array.isArray(Ve)?er(Ye,".",lr,"=[",Ve.join(),"];"):er(Ye,".",lr,"=",Ve,";")}),he(er)}function pu(Yt,he,Ee,ir){var Ye=Yt.shared,er=Ye.gl,lr=Ye.framebuffer,hr;ai&&(hr=he.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Ee?Pr=Ee.append(Yt,he):Pr=he.def(lr,".next"),ir||he("if(",Pr,"!==",lr,".cur){"),he("if(",Pr,"){",er,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ai&&he(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),he("}else{",er,".bindFramebuffer(",zn,",null);"),ai&&he(hr,".drawBuffersWEBGL(",Ze,");"),he("}",lr,".cur=",Pr,";"),ir||he("}")}function Au(Yt,he,Ee){var ir=Yt.shared,Ye=ir.gl,er=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");ki.forEach(function(Ze){var Pr=va(Ze);if(!(Pr in Ee.state)){var sn,pn;if(Pr in lr){sn=lr[Pr],pn=er[Pr];var vi=h(da[Pr].length,function(Xn){return Xe.def(sn,"[",Xn,"]")});Xe(Yt.cond(vi.map(function(Xn,zi){return Xn+"!=="+pn+"["+zi+"]"}).join("||")).then(Ye,".",Ca[Pr],"(",vi,");",vi.map(function(Xn,zi){return pn+"["+zi+"]="+Xn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var fi=Yt.cond(sn,"!==",hr,".",Pr);Xe(fi),Pr in oi?fi(Yt.cond(sn).then(Ye,".enable(",oi[Pr],");").else(Ye,".disable(",oi[Pr],");"),hr,".",Pr,"=",sn,";"):fi(Ye,".",Ca[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Ee.state).length===0&&Xe(hr,".dirty=false;"),he(Xe)}function jo(Yt,he,Ee,ir){var Ye=Yt.shared,er=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Ki(Object.keys(Ee)).forEach(function(Xe){var Ze=Ee[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,he);if(oi[Xe]){var sn=oi[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),he(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),he(lr,".",Xe,"=",Ve,";")):(he(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),he(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var pn=er[Xe];he(hr,".",Ca[Xe],"(",Pr,");",Pr.map(function(vi,fi){return pn+"["+fi+"]="+vi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),he(hr,".",Ca[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):he(hr,".",Ca[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Mu(Yt,he){Si&&(Yt.instancing=he.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,he,Ee,ir,Ye){var er=Yt.shared,lr=Yt.stats,hr=er.current,Ve=er.timer,Xe=Ee.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function pn(ea){Pr=he.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=he.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function vi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function fi(ea){var Ii=he.def(hr,".profile");he(hr,".profile=",ea,";"),he.exit(hr,".profile=",Ii,";")}var Xn;if(Xe){if(Ua(Xe)){Xe.enable?(pn(he),vi(he.exit),fi("true")):fi("false");return}Xn=Xe.append(Yt,he),fi(Xn)}else Xn=he.def(hr,".profile");var zi=Yt.block();pn(zi),he("if(",Xn,"){",zi,"}");var yi=Yt.block();vi(yi),he.exit("if(",Xn,"){",yi,"}")}function Iu(Yt,he,Ee,ir,Ye){var er=Yt.shared;function lr(Ve){switch(Ve){case pa:case So:case Ds:return 2;case Ma:case ds:case wl:return 3;case lo:case fl:case Lu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=er.gl,sn=he.def(Ve,".location"),pn=he.def(er.attributes,"[",sn,"]"),vi=Ze.state,fi=Ze.buffer,Xn=[Ze.x,Ze.y,Ze.z,Ze.w],zi=["buffer","normalized","offset","stride"];function yi(){he("if(!",pn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ii=Ze.type,Oi;if(Ze.size?Oi=he.def(Ze.size,"||",Xe):Oi=Xe,he("if(",pn,".type!==",Ii,"||",pn,".size!==",Oi,"||",zi.map(function(to){return pn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",De,",",fi,".buffer);",Pr,".vertexAttribPointer(",[sn,Oi,Ii,Ze.normalized,Ze.stride,Ze.offset],");",pn,".type=",Ii,";",pn,".size=",Oi,";",zi.map(function(to){return pn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Si){var ca=Ze.divisor;he("if(",pn,".divisor!==",ca,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,ca],");",pn,".divisor=",ca,";}")}}function ea(){he("if(",pn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",pn,".buffer=null;","}if(",Ga.map(function(Ii,Oi){return pn+"."+Ii+"!=="+Xn[Oi]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Xn,");",Ga.map(function(Ii,Oi){return pn+"."+Ii+"="+Xn[Oi]+";"}).join(""),"}")}vi===Oa?yi():vi===Aa?ea():(he("if(",vi,"===",Oa,"){"),yi(),he("}else{"),ea(),he("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Ee.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,he)}else{if(!Ye(Io))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new Un).forEach(function(pn){Pr[pn]=he.def(sn,".",pn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,he,Ee,ir,Ye,er){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var Zo=[],xs=[],zl=0;zl>1)",fi],");")}function ca(){Ee(Xn,".drawArraysInstancedANGLE(",[sn,pn,vi,fi],");")}Ze&&Ze!=="null"?yi?Oi():(Ee("if(",Ze,"){"),Oi(),Ee("}else{"),ca(),Ee("}")):ca()}function Ii(){function Oi(){Ee(er+".drawElements("+[sn,vi,zi,pn+"<<(("+zi+"-"+fa+")>>1)"]+");")}function ca(){Ee(er+".drawArrays("+[sn,pn,vi]+");")}Ze&&Ze!=="null"?yi?Oi():(Ee("if(",Ze,"){"),Oi(),Ee("}else{"),ca(),Ee("}")):ca()}Si&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(Ee("if(",fi,">0){"),ea(),Ee("}else if(",fi,"<0){"),Ii(),Ee("}")):ea():Ii()}function Cs(Yt,he,Ee,ir,Ye){var er=Fa(),lr=er.proc("body",Ye);return Si&&(er.instancing=lr.def(er.shared.extensions,".angle_instanced_arrays")),Yt(er,lr,Ee,ir),er.compile().body}function Ml(Yt,he,Ee,ir){Mu(Yt,he),Ee.useVAO?Ee.drawVAO?he(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,he),");"):he(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(he(Yt.shared.vao,".setVAO(null);"),Iu(Yt,he,Ee,ir.attributes,function(){return!0})),xc(Yt,he,Ee,ir.uniforms,function(){return!0},!1),Lo(Yt,he,he,Ee)}function yl(Yt,he){var Ee=Yt.proc("draw",1);Mu(Yt,Ee),xu(Yt,Ee,he.context),pu(Yt,Ee,he.framebuffer),Au(Yt,Ee,he),jo(Yt,Ee,he.state),sl(Yt,Ee,he,!1,!0);var ir=he.shader.progVar.append(Yt,Ee);if(Ee(Yt.shared.gl,".useProgram(",ir,".program);"),he.shader.program)Ml(Yt,Ee,he,he.shader.program);else{Ee(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),er=Ee.def(ir,".id"),lr=Ee.def(Ye,"[",er,"]");Ee(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",er,"]=",Yt.link(function(hr){return Cs(Ml,Yt,he,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(he.state).length>0&&Ee(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Ee(Yt.shared.vao,".setVAO(null);")}function $(Yt,he,Ee,ir){Yt.batchId="a1",Mu(Yt,he);function Ye(){return!0}Iu(Yt,he,Ee,ir.attributes,Ye),xc(Yt,he,Ee,ir.uniforms,Ye,!1),Lo(Yt,he,he,Ee)}function ot(Yt,he,Ee,ir){Mu(Yt,he);var Ye=Ee.contextDep,er=he.def(),lr="a0",hr="a1",Ve=he.def();Yt.shared.props=Ve,Yt.batchId=er;var Xe=Yt.scope(),Ze=Yt.scope();he(Xe.entry,"for(",er,"=0;",er,"<",hr,";++",er,"){",Ve,"=",lr,"[",er,"];",Ze,"}",Xe.exit);function Pr(zi){return zi.contextDep&&Ye||zi.propDep}function sn(zi){return!Pr(zi)}if(Ee.needsContext&&xu(Yt,Ze,Ee.context),Ee.needsFramebuffer&&pu(Yt,Ze,Ee.framebuffer),jo(Yt,Ze,Ee.state,Pr),Ee.profile&&Pr(Ee.profile)&&sl(Yt,Ze,Ee,!1,!0),ir)Ee.useVAO?Ee.drawVAO?Pr(Ee.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Iu(Yt,Xe,Ee,ir.attributes,sn),Iu(Yt,Ze,Ee,ir.attributes,Pr)),xc(Yt,Xe,Ee,ir.uniforms,sn,!1),xc(Yt,Ze,Ee,ir.uniforms,Pr,!0),Lo(Yt,Xe,Ze,Ee);else{var pn=Yt.global.def("{}"),vi=Ee.shader.progVar.append(Yt,Ze),fi=Ze.def(vi,".id"),Xn=Ze.def(pn,"[",fi,"]");Ze(Yt.shared.gl,".useProgram(",vi,".program);","if(!",Xn,"){",Xn,"=",pn,"[",fi,"]=",Yt.link(function(zi){return Cs($,Yt,Ee,zi,2)}),"(",vi,");}",Xn,".call(this,a0[",er,"],",er,");")}}function et(Yt,he){var Ee=Yt.proc("batch",2);Yt.batchId="0",Mu(Yt,Ee);var ir=!1,Ye=!0;Object.keys(he.context).forEach(function(pn){ir=ir||he.context[pn].propDep}),ir||(xu(Yt,Ee,he.context),Ye=!1);var er=he.framebuffer,lr=!1;er?(er.propDep?ir=lr=!0:er.contextDep&&ir&&(lr=!0),lr||pu(Yt,Ee,er)):pu(Yt,Ee,null),he.state.viewport&&he.state.viewport.propDep&&(ir=!0);function hr(pn){return pn.contextDep&&ir||pn.propDep}Au(Yt,Ee,he),jo(Yt,Ee,he.state,function(pn){return!hr(pn)}),(!he.profile||!hr(he.profile))&&sl(Yt,Ee,he,!1,"a1"),he.contextDep=ir,he.needsContext=Ye,he.needsFramebuffer=lr;var Ve=he.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Ee,he,null);else{var Xe=Ve.append(Yt,Ee);if(Ee(Yt.shared.gl,".useProgram(",Xe,".program);"),he.shader.program)ot(Yt,Ee,he,he.shader.program);else{Ee(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Ee.def(Xe,".id"),sn=Ee.def(Ze,"[",Pr,"]");Ee(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(pn){return Cs(ot,Yt,he,pn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(he.state).length>0&&Ee(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Ee(Yt.shared.vao,".setVAO(null);")}function xt(Yt,he){var Ee=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Ee,he.context),he.framebuffer&&he.framebuffer.append(Yt,Ee),Ki(Object.keys(he.state)).forEach(function(hr){var Ve=he.state[hr],Xe=Ve.append(Yt,Ee);Pn(Xe)?Xe.forEach(function(Ze,Pr){ka(Ze)?Ee.set(Yt.next[hr],"["+Pr+"]",Ze):Ee.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Ee.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Ee.set(ir.next,"."+hr,Xe)}),sl(Yt,Ee,he,!0,!0),[Et,Te,Ht,Fe,Ot].forEach(function(hr){var Ve=he.draw[hr];if(Ve){var Xe=Ve.append(Yt,Ee);ka(Xe)?Ee.set(ir.draw,"."+hr,Xe):Ee.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(he.uniforms).forEach(function(hr){var Ve=he.uniforms[hr].append(Yt,Ee);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ka(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Ee.set(ir.uniforms,"["+Yt.link(Tr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(he.attributes).forEach(function(hr){var Ve=he.attributes[hr].append(Yt,Ee),Xe=Yt.scopeAttrib(hr);Object.keys(new Un).forEach(function(Ze){Ee.set(Xe,"."+Ze,Ve[Ze])})}),he.scopeVAO){var er=he.scopeVAO.append(Yt,Ee);ka(er)?Ee.set(ir.vao,".targetVAO",er):Ee.set(ir.vao,".targetVAO",Yt.link(er,{stable:!0}))}function lr(hr){var Ve=he.shader[hr];if(Ve){var Xe=Ve.append(Yt,Ee);ka(Xe)?Ee.set(ir.shader,"."+hr,Xe):Ee.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(he.state).length>0&&(Ee(Ye,".dirty=true;"),Ee.exit(Ye,".dirty=true;")),Ee("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var he=Object.keys(Yt),Ee=0;Ee=0;--Lo){var Cs=ka[Lo];Cs&&Cs(ia,null,0)}Ir.flush(),Gi&&Gi.update()}function Co(){!Fa&&ka.length>0&&(Fa=x.next(vo))}function rs(){Fa&&(x.cancel(vo),Fa=null)}function Vl(Lo){Lo.preventDefault(),rs(),zo.forEach(function(Cs){Cs()})}function Al(Lo){Ir.getError(),hi.restore(),da.restore(),Ui.restore(),Va.restore(),ki.restore(),oi.restore(),ai.restore(),Gi&&Gi.restore(),Ca.procs.refresh(),Co(),wo.forEach(function(Cs){Cs()})}Qi&&(Qi.addEventListener(nl,Vl,!1),Qi.addEventListener(uu,Al,!1));function hs(){ka.length=0,rs(),Qi&&(Qi.removeEventListener(nl,Vl),Qi.removeEventListener(uu,Al)),da.clear(),oi.clear(),ki.clear(),ai.clear(),Va.clear(),Si.clear(),Ui.clear(),Gi&&Gi.clear(),wa.forEach(function(Lo){Lo()})}function Tu(Lo){function Cs(Ye){var er=c({},Ye);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 lr(hr){if(hr in er){var Ve=er[hr];delete er[hr],Object.keys(Ve).forEach(function(Xe){er[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(er.vao=Ye.vao),er}function Ml(Ye,er){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(er&&Array.isArray(Xe)){for(var Ze=0;Ze0)return xe.call(this,Ee(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return xe.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=oi.setFBO=Tu({framebuffer:f.define.call(null,Xl,"framebuffer")});function Pu(Lo,Cs){var Ml=0;Ca.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Lo){if("framebuffer"in Lo)if(Lo.framebuffer&&Lo.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Lo.framebuffer.faces[Cs]},Lo),Pu);else dl(Lo,Pu);else Pu(null,Lo)}function yc(Lo){ka.push(Lo);function Cs(){var Ml=ru(ka,Lo);function yl(){var $=ru(ka,yl);ka[$]=ka[ka.length-1],ka.length-=1,ka.length<=0&&rs()}ka[Ml]=yl}return Co(),{cancel:Cs}}function xu(){var Lo=Xi.viewport,Cs=Xi.scissor_box;Lo[0]=Lo[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Lo[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Lo[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=jo(),xu(),Ca.procs.poll()}function Au(){Va.refresh(),xu(),Ca.procs.refresh(),Gi&&Gi.update()}function jo(){return(y()-_a)/1e3}Au();function Mu(Lo,Cs){var Ml;switch(Lo){case"frame":return yc(Cs);case"lost":Ml=zo;break;case"restore":Ml=wo;break;case"destroy":Ml=wa;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:va,destroy:hs,_gl:Ir,_refresh:Au,poll:function(){pu(),Gi&&Gi.update()},now:jo,stats:yn,getCachedCode:sl,preloadCachedCode:Iu});return Tr.onDone(null,xc),xc}return kh})}),ZH=Dt((Q,Z)=>{var c=zg();Z.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},I(r)?r={container:r}:S(r)?r={container:r}:t(r)?r={gl:r}:r=c(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var a=document.querySelector(r.container);if(!a)throw Error("Element "+r.container+" is not found");r.container=a}I(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=e(),r.container.appendChild(r.canvas),g(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=e(),r.container.appendChild(r.canvas),g(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch{}return r.gl}),r.gl};function g(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var a=r.container.getBoundingClientRect();r.canvas.width=r.width||a.right-a.left,r.canvas.height=r.height||a.bottom-a.top}}function I(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function S(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function t(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function e(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}),GH=Dt((Q,Z)=>{var c=lE(),g=[32,126];Z.exports=I;function I(S){S=S||{};var t=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),r=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],n=S.chars||g;if(r&&typeof r!="string"&&(r=c(r)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var o=[],i=n[0],l=0;i<=n[1];i++)o[l++]=String.fromCharCode(i);n=o}t=t.slice(),e.width=t[0],e.height=t[1];var f=e.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,e.width,e.height),f.font=r,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";for(var x=a[0]/2,y=a[1]/2,i=0;it[0]-a[0]/2&&(x=a[0]/2,y+=a[1]);return e}}),uE=Dt(Q=>{"use restrict";var Z=32;Q.INT_BITS=Z,Q.INT_MAX=2147483647,Q.INT_MIN=-1<0)-(I<0)},Q.abs=function(I){var S=I>>Z-1;return(I^S)-S},Q.min=function(I,S){return S^(I^S)&-(I65535)<<4,I>>>=S,t=(I>255)<<3,I>>>=t,S|=t,t=(I>15)<<2,I>>>=t,S|=t,t=(I>3)<<1,I>>>=t,S|=t,S|I>>1},Q.log10=function(I){return I>=1e9?9:I>=1e8?8:I>=1e7?7:I>=1e6?6:I>=1e5?5:I>=1e4?4:I>=1e3?3:I>=100?2:I>=10?1:0},Q.popCount=function(I){return I=I-(I>>>1&1431655765),I=(I&858993459)+(I>>>2&858993459),(I+(I>>>4)&252645135)*16843009>>>24};function c(I){var S=32;return I&=-I,I&&S--,I&65535&&(S-=16),I&16711935&&(S-=8),I&252645135&&(S-=4),I&858993459&&(S-=2),I&1431655765&&(S-=1),S}Q.countTrailingZeros=c,Q.nextPow2=function(I){return I+=I===0,--I,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I+1},Q.prevPow2=function(I){return I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I-(I>>>1)},Q.parity=function(I){return I^=I>>>16,I^=I>>>8,I^=I>>>4,I&=15,27030>>>I&1};var g=new Array(256);(function(I){for(var S=0;S<256;++S){var t=S,e=S,r=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=t&1,--r;I[S]=e<>>8&255]<<16|g[I>>>16&255]<<8|g[I>>>24&255]},Q.interleave2=function(I,S){return I&=65535,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,I|S<<1},Q.deinterleave2=function(I,S){return I=I>>>S&1431655765,I=(I|I>>>1)&858993459,I=(I|I>>>2)&252645135,I=(I|I>>>4)&16711935,I=(I|I>>>16)&65535,I<<16>>16},Q.interleave3=function(I,S,t){return I&=1023,I=(I|I<<16)&4278190335,I=(I|I<<8)&251719695,I=(I|I<<4)&3272356035,I=(I|I<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,I|=S<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,I|t<<2},Q.deinterleave3=function(I,S){return I=I>>>S&1227133513,I=(I|I>>>2)&3272356035,I=(I|I>>>4)&251719695,I=(I|I>>>8)&4278190335,I=(I|I>>>16)&1023,I<<22>>22},Q.nextCombination=function(I){var S=I|I-1;return S+1|(~S&-~S)-1>>>c(I)+1}}),YH=Dt((Q,Z)=>{function c(S,t,e){var r=S[e]|0;if(r<=0)return[];var a=new Array(r),n;if(e===S.length-1)for(n=0;n"u"&&(t=0),typeof S){case"number":if(S>0)return g(S|0,t);break;case"object":if(typeof S.length=="number")return c(S,t,0);break}return[]}Z.exports=I}),KH=Dt(Q=>{var Z=uE(),c=YH(),g=ox().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:c([32,0]),UINT16:c([32,0]),UINT32:c([32,0]),BIGUINT64:c([32,0]),INT8:c([32,0]),INT16:c([32,0]),INT32:c([32,0]),BIGINT64:c([32,0]),FLOAT:c([32,0]),DOUBLE:c([32,0]),DATA:c([32,0]),UINT8C:c([32,0]),BUFFER:c([32,0])});var I=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=c([32,0])),e.BIGUINT64||(e.BIGUINT64=c([32,0])),e.BIGINT64||(e.BIGINT64=c([32,0])),e.BUFFER||(e.BUFFER=c([32,0]));var r=e.DATA,a=e.BUFFER;Q.free=function(h){if(g.isBuffer(h))a[Z.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var p=h.length||h.byteLength,k=Z.log2(p)|0;r[k].push(h)}};function n(h){if(h){var p=h.length||h.byteLength,k=Z.log2(p);r[k].push(h)}}function o(h){n(h.buffer)}Q.freeUint8=Q.freeUint16=Q.freeUint32=Q.freeBigUint64=Q.freeInt8=Q.freeInt16=Q.freeInt32=Q.freeBigInt64=Q.freeFloat32=Q.freeFloat=Q.freeFloat64=Q.freeDouble=Q.freeUint8Clamped=Q.freeDataView=o,Q.freeArrayBuffer=n,Q.freeBuffer=function(h){a[Z.log2(h.length)].push(h)},Q.malloc=function(h,p){if(p===void 0||p==="arraybuffer")return i(h);switch(p){case"uint8":return l(h);case"uint16":return f(h);case"uint32":return x(h);case"int8":return y(h);case"int16":return v(h);case"int32":return T(h);case"float":case"float32":return u(h);case"double":case"float64":return b(h);case"uint8_clamped":return _(h);case"bigint64":return M(h);case"biguint64":return P(h);case"buffer":return A(h);case"data":case"dataview":return C(h);default:return null}return null};function i(p){var p=Z.nextPow2(p),k=Z.log2(p),w=r[k];return w.length>0?w.pop():new ArrayBuffer(p)}Q.mallocArrayBuffer=i;function l(h){return new Uint8Array(i(h),0,h)}Q.mallocUint8=l;function f(h){return new Uint16Array(i(2*h),0,h)}Q.mallocUint16=f;function x(h){return new Uint32Array(i(4*h),0,h)}Q.mallocUint32=x;function y(h){return new Int8Array(i(h),0,h)}Q.mallocInt8=y;function v(h){return new Int16Array(i(2*h),0,h)}Q.mallocInt16=v;function T(h){return new Int32Array(i(4*h),0,h)}Q.mallocInt32=T;function u(h){return new Float32Array(i(4*h),0,h)}Q.mallocFloat32=Q.mallocFloat=u;function b(h){return new Float64Array(i(8*h),0,h)}Q.mallocFloat64=Q.mallocDouble=b;function _(h){return I?new Uint8ClampedArray(i(h),0,h):l(h)}Q.mallocUint8Clamped=_;function P(h){return S?new BigUint64Array(i(8*h),0,h):null}Q.mallocBigUint64=P;function M(h){return t?new BigInt64Array(i(8*h),0,h):null}Q.mallocBigInt64=M;function C(h){return new DataView(i(h),0,h)}Q.mallocDataView=C;function A(h){h=Z.nextPow2(h);var p=Z.log2(h),k=a[p];return k.length>0?k.pop():new g(h)}Q.mallocBuffer=A,Q.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,r[h].length=0,a[h].length=0}}),XH=Dt((Q,Z)=>{var c=Object.prototype.toString;Z.exports=function(g){var I;return c.call(g)==="[object Object]"&&(I=Object.getPrototypeOf(g),I===null||I===Object.getPrototypeOf({}))}}),cE=Dt((Q,Z)=>{Z.exports=function(c,g){g||(g=[0,""]),c=String(c);var I=parseFloat(c,10);return g[0]=I,g[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}}),JH=Dt((Q,Z)=>{var c=cE();Z.exports=t;var g=96;function I(e,r){var a=c(getComputedStyle(e).getPropertyValue(r));return a[0]*t(a[1],e)}function S(e,r){var a=document.createElement("div");a.style["font-size"]="128"+e,r.appendChild(a);var n=I(a,"font-size")/128;return r.removeChild(a),n}function t(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return S(e,r);case"em":return I(r,"font-size");case"rem":return I(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 g;case"cm":return g/2.54;case"mm":return g/25.4;case"pt":return g/72;case"pc":return g/6}return 1}}),QH=Dt((Q,Z)=>{Z.exports=S;var c=S.canvas=document.createElement("canvas"),g=c.getContext("2d"),I=t([32,126]);S.createPairs=t,S.ascii=I;function S(e,r){Array.isArray(e)&&(e=e.join(", "));var a={},n,o=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?n=t(r):Array.isArray(r)?n=r:(r.o?n=t(r.o):r.pairs&&(n=r.pairs),r.fontSize&&(o=r.fontSize),r.threshold!=null&&(i=r.threshold))),n||(n=I),g.font=o+"px "+e;for(var l=0;lo*i){var v=(y-x)/o;a[f]=v*1e3}}return a}function t(e){for(var r=[],a=e[0];a<=e[1];a++)for(var n=String.fromCharCode(a),o=e[0];o{Z.exports=c,c.canvas=document.createElement("canvas"),c.cache={};function c(i,e){e||(e={}),(typeof i=="string"||Array.isArray(i))&&(e.family=i);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var a=e.size||e.fontSize||e.em||48,n=e.weight||e.fontWeight||"",o=e.style||e.fontStyle||"",i=[o,n,a].join(" ")+"px "+r,l=e.origin||"top";if(c.cache[r]&&a<=c.cache[r].em)return g(c.cache[r],l);var f=e.canvas||c.canvas,x=f.getContext("2d"),y={upper:e.upper!==void 0?e.upper:"H",lower:e.lower!==void 0?e.lower:"x",descent:e.descent!==void 0?e.descent:"p",ascent:e.ascent!==void 0?e.ascent:"h",tittle:e.tittle!==void 0?e.tittle:"i",overshoot:e.overshoot!==void 0?e.overshoot:"O"},v=Math.ceil(a*1.5);f.height=v,f.width=v*.5,x.font=i;var T="H",u={top:0};x.clearRect(0,0,v,v),x.textBaseline="top",x.fillStyle="black",x.fillText(T,0,0);var b=I(x.getImageData(0,0,v,v));x.clearRect(0,0,v,v),x.textBaseline="bottom",x.fillText(T,0,v);var _=I(x.getImageData(0,0,v,v));u.lineHeight=u.bottom=v-_+b,x.clearRect(0,0,v,v),x.textBaseline="alphabetic",x.fillText(T,0,v);var P=I(x.getImageData(0,0,v,v)),M=v-P-1+b;u.baseline=u.alphabetic=M,x.clearRect(0,0,v,v),x.textBaseline="middle",x.fillText(T,0,v*.5);var C=I(x.getImageData(0,0,v,v));u.median=u.middle=v-C-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="hanging",x.fillText(T,0,v*.5);var A=I(x.getImageData(0,0,v,v));u.hanging=v-A-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="ideographic",x.fillText(T,0,v);var h=I(x.getImageData(0,0,v,v));if(u.ideographic=v-h-1+b,y.upper&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.upper,0,0),u.upper=I(x.getImageData(0,0,v,v)),u.capHeight=u.baseline-u.upper),y.lower&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.lower,0,0),u.lower=I(x.getImageData(0,0,v,v)),u.xHeight=u.baseline-u.lower),y.tittle&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.tittle,0,0),u.tittle=I(x.getImageData(0,0,v,v))),y.ascent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.ascent,0,0),u.ascent=I(x.getImageData(0,0,v,v))),y.descent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.descent,0,0),u.descent=S(x.getImageData(0,0,v,v))),y.overshoot){x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.overshoot,0,0);var p=S(x.getImageData(0,0,v,v));u.overshoot=p-M}for(var k in u)u[k]/=a;return u.em=a,c.cache[r]=u,g(u,l)}function g(t,e){var r={};typeof e=="string"&&(e=t[e]);for(var a in t)a!=="em"&&(r[a]=t[a]-e);return r}function I(t){for(var e=t.height,r=t.data,a=3;a0;a-=4)if(r[a]!==0)return Math.floor((a-3)*.25/e)}}),eW=Dt((Q,Z)=>{var c=qH(),g=zg(),I=$H(),S=ZH(),t=tE(),e=H1(),r=GH(),a=KH(),n=yb(),o=XH(),i=cE(),l=JH(),f=QH(),x=Sd(),y=tW(),v=bx(),T=uE(),u=T.nextPow2,b=new t,_=!1;document.body&&(P=document.body.appendChild(document.createElement("div")),P.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P).fontStretch&&(_=!0),document.body.removeChild(P));var P,M=function(A){C(A)?(A={regl:A},this.gl=A.regl._gl):this.gl=S(A),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=A.regl||I({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(),b.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(o(A)?A:{})};M.prototype.createShader=function(){var A=this.regl,h=A({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:A.prop("count"),offset:A.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:A.this("sizeBuffer")},width:{offset:0,stride:8,buffer:A.this("sizeBuffer")},char:A.this("charBuffer"),position:A.this("position")},uniforms:{atlasSize:function(k,w){return[w.atlas.width,w.atlas.height]},atlasDim:function(k,w){return[w.atlas.cols,w.atlas.rows]},atlas:function(k,w){return w.atlas.texture},charStep:function(k,w){return w.atlas.step},em:function(k,w){return w.atlas.em},color:A.prop("color"),opacity:A.prop("opacity"),viewport:A.this("viewportArray"),scale:A.this("scale"),align:A.prop("align"),baseline:A.prop("baseline"),translate:A.this("translate"),positionOffset:A.prop("positionOffset")},primitive:"points",viewport:A.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2824,17 +2824,17 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),p={};return{regl:A,draw:h,atlas:p}},M.prototype.update=function(A){var h=this;if(typeof A=="string")A={text:A};else if(!A)return;A=g(A,{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),A.opacity!=null&&(Array.isArray(A.opacity)?this.opacity=A.opacity.map(function(Lt){return parseFloat(Lt)}):this.opacity=parseFloat(A.opacity)),A.viewport!=null&&(this.viewport=n(A.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]),A.kerning!=null&&(this.kerning=A.kerning),A.offset!=null&&(typeof A.offset=="number"&&(A.offset=[A.offset,0]),this.positionOffset=v(A.offset)),A.direction&&(this.direction=A.direction),A.range&&(this.range=A.range,this.scale=[1/(A.range[2]-A.range[0]),1/(A.range[3]-A.range[1])],this.translate=[-A.range[0],-A.range[1]]),A.scale&&(this.scale=A.scale),A.translate&&(this.translate=A.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!A.font&&(A.font=M.baseFontSize+"px sans-serif");var p=!1,k=!1;if(A.font&&(Array.isArray(A.font)?A.font:[A.font]).forEach(function(Lt,Mt){if(typeof Lt=="string")try{Lt=c.parse(Lt)}catch{Lt=c.parse(M.baseFontSize+"px "+Lt)}else{var ee=Lt.style,ve=Lt.weight,oe=Lt.stretch,Te=Lt.variant;Lt=c.parse(c.stringify(Lt)),ee&&(Lt.style=ee),ve&&(Lt.weight=ve),oe&&(Lt.stretch=oe),Te&&(Lt.variant=Te)}var He=c.stringify({size:M.baseFontSize,family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style}),Ge=i(Lt.size),cr=Math.round(Ge[0]*l(Ge[1]));if(cr!==h.fontSize[Mt]&&(k=!0,h.fontSize[Mt]=cr),(!h.font[Mt]||He!=h.font[Mt].baseString)&&(p=!0,h.font[Mt]=M.fonts[He],!h.font[Mt])){var ur=Lt.family.join(", "),jr=[Lt.style];Lt.style!=Lt.variant&&jr.push(Lt.variant),Lt.variant!=Lt.weight&&jr.push(Lt.weight),_&&Lt.weight!=Lt.stretch&&jr.push(Lt.stretch),h.font[Mt]={baseString:He,family:ur,weight:Lt.weight,stretch:Lt.stretch,style:Lt.style,variant:Lt.variant,width:{},kerning:{},metrics:y(ur,{origin:"top",fontSize:M.baseFontSize,fontStyle:jr.join(" ")})},M.fonts[He]=h.font[Mt]}}),(p||k)&&this.font.forEach(function(Lt,Mt){var ee=c.stringify({size:h.fontSize[Mt],family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style});if(h.fontAtlas[Mt]=h.shader.atlas[ee],!h.fontAtlas[Mt]){var ve=Lt.metrics;h.shader.atlas[ee]=h.fontAtlas[Mt]={fontString:ee,step:Math.ceil(h.fontSize[Mt]*ve.bottom*.5)*2,em:h.fontSize[Mt],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:h.regl.texture()}}A.text==null&&(A.text=h.text)}),typeof A.text=="string"&&A.position&&A.position.length>2){for(var w=Array(A.position.length*.5),R=0;R2){for(var V=!A.position[0].length,H=a.mallocFloat(this.count*2),F=0,U=0;F1?h.align[Mt]:h.align[0]:h.align;if(typeof ee=="number")return ee;switch(ee){case"right":case"end":return-Lt;case"center":case"centre":case"middle":return-Lt*.5}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Lt,Mt){var ee=(h.font[Mt]||h.font[0]).metrics,ve=0;return ve+=ee.bottom*.5,typeof Lt=="number"?ve+=Lt-ee.baseline:ve+=-ee[Lt],ve*=-1,ve})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color=="string"||!isNaN(A.color))this.color=e(A.color,"uint8");else{var Pt;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var qt=A.color.length;Pt=a.mallocUint8(qt);for(var Wt=(A.color.subarray||A.color.slice).bind(A.color),Jt=0;Jt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(pe){var se=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(se);for(var Tt=0;Tt1?this.counts[Tt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Tt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Tt*4,Tt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Tt]:this.opacity,baseline:this.baselineOffset[Tt]!=null?this.baselineOffset[Tt]:this.baselineOffset[0],align:this.align?this.alignOffset[Tt]!=null?this.alignOffset[Tt]:this.alignOffset[0]:0,atlas:this.fontAtlas[Tt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Tt*2,Tt*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function C(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}Z.exports=M}),NH=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Ir=Object.keys(kr),Dn=0;Dn1&&kr===Ir&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var li=_e.split(".");if(li.length===1)return['"'+r(_e)+'"'];for(var ti=[],yn=0;yn"u"?1:window.devicePixelRatio,ya=!1,$a={},Na=function(fn){},ia=function(){};if(typeof kr=="string"?Ir=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Ir=kr:_(kr)?(ti=kr,li=ti.canvas):("gl"in kr?ti=kr.gl:"canvas"in kr?li=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(yn=kr.attributes),"extensions"in kr&&(ai=P(kr.extensions)),"optionalExtensions"in kr&&(ta=P(kr.optionalExtensions)),"onDone"in kr&&(Na=kr.onDone),"profile"in kr&&(ya=!!kr.profile),"pixelRatio"in kr&&($i=+kr.pixelRatio),"cachedCode"in kr&&($a=kr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?li=Ir:Dn=Ir),!ti){if(!li){var Ai=T(Dn||document.body,Na,$i);if(!Ai)return null;li=Ai.canvas,ia=Ai.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ti=u(li,yn)}return ti?{gl:ti,canvas:li,container:Dn,extensions:ai,optionalExtensions:ta,pixelRatio:$i,profile:ya,cachedCode:$a,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Ir={};function Dn(yn){var ai=yn.toLowerCase(),ta;try{ta=Ir[ai]=_e.getExtension(ai)}catch{}return!!ta}for(var li=0;li65535)<<4,_e>>>=kr,Ir=(_e>255)<<3,_e>>>=Ir,kr|=Ir,Ir=(_e>15)<<2,_e>>>=Ir,kr|=Ir,Ir=(_e>3)<<1,_e>>>=Ir,kr|=Ir,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(ti){var yn=H(ti),ai=_e[F(yn)>>2];return ai.length>0?ai.pop():new ArrayBuffer(yn)}function Ir(ti){_e[F(ti.byteLength)>>2].push(ti)}function Dn(ti,yn){var ai=null;switch(ti){case p:ai=new Int8Array(kr(yn),0,yn);break;case k:ai=new Uint8Array(kr(yn),0,yn);break;case w:ai=new Int16Array(kr(2*yn),0,yn);break;case R:ai=new Uint16Array(kr(2*yn),0,yn);break;case O:ai=new Int32Array(kr(4*yn),0,yn);break;case j:ai=new Uint32Array(kr(4*yn),0,yn);break;case V:ai=new Float32Array(kr(4*yn),0,yn);break;default:return null}return ai.length!==yn?ai.subarray(0,yn):ai}function li(ti){Ir(ti.buffer)}return{alloc:kr,free:Ir,allocType:Dn,freeType:li}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Wr=16384,br=function(_e,kr){var Ir=1;kr.ext_texture_filter_anisotropic&&(Ir=_e.getParameter(se));var Dn=1,li=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),li=_e.getParameter(Tt));var ti=!!kr.oes_texture_float;if(ti){var yn=_e.createTexture();_e.bindTexture(Mt,yn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ai=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ai),_e.framebufferTexture2D(cr,jr,Mt,yn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)ti=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Wr);var ta=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,ta),_e.getError()?ti=!1:(_e.deleteFramebuffer(ai),_e.deleteTexture(yn),ti=ta[0]===1),W.freeType(ta)}}var $i=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ya=!0;if(!$i){var $a=_e.createTexture(),Na=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(ee,$a),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Na),W.freeType(Na),_e.bindTexture(ee,null),_e.deleteTexture($a),ya=!_e.getError()}return{colorBits:[_e.getParameter(J),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(mt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ia){return!!kr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Dn,maxColorAttachments:li,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(qt),maxRenderbufferSize:_e.getParameter(Wt),maxTextureUnits:_e.getParameter(It),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(kt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(pe),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(fe),readFloat:ti,npotTextureCube:ya}},Xr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function nn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Xr(_e.data))}var Le=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Ir){for(var Dn=0;Dn0){var Va;if(Array.isArray(jn[0])){ha=$n(jn);for(var xi=1,ri=1;ri0){if(typeof xi[0]=="number"){var Ki=W.allocType(ei.dtype,xi.length);tn(Ki,xi),ha(Ki,Ea),W.freeType(Ki)}else if(Array.isArray(xi[0])||Xr(xi[0])){ma=$n(xi);var Ji=oi(xi,ma,ei.dtype);ha(Ji,Ea),W.freeType(Ji)}}}else if(nn(xi)){ma=xi.shape;var ba=xi.stride,Io=0,wo=0,_a=0,Fa=0;ma.length===1?(Io=ma[0],wo=1,_a=ba[0],Fa=0):ma.length===2&&(Io=ma[0],wo=ma[1],_a=ba[0],Fa=ba[1]);var vo=Array.isArray(xi.data)?ei.dtype:_r(xi.data),Eo=W.allocType(vo,Io*wo);Cn(Eo,xi.data,Io,wo,_a,Fa,xi.offset),ha(Eo,Ea),W.freeType(Eo)}return Sa}return Bi||Sa(fn),Sa._reglType="buffer",Sa._buffer=ei,Sa.subdata=Va,Ir.profile&&(Sa.stats=ei.stats),Sa.destroy=function(){Na(ei)},Sa}function Ai(){Le(ti).forEach(function(fn){fn.buffer=_e.createBuffer(),_e.bindBuffer(fn.type,fn.buffer),_e.bufferData(fn.type,fn.persistentData||fn.byteLength,fn.usage)})}return Ir.profile&&(kr.getTotalBufferSize=function(){var fn=0;return Object.keys(ti).forEach(function(jn){fn+=ti[jn].stats.size}),fn}),{create:ia,createStream:ta,destroyStream:$i,clear:function(){Le(ti).forEach(Na),ai.forEach(Na)},getBuffer:function(fn){return fn&&fn._buffer instanceof yn?fn._buffer:null},restore:Ai,_initBuffer:$a}}var Mn=0,fi=0,ki=1,Oi=1,ji=4,Xi=4,ci={points:Mn,point:fi,lines:ki,line:Oi,triangles:ji,triangle:Xi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,Wa=1,ze=4,Ie=5120,Rr=5121,$r=5122,Gr=5123,Br=5124,Yr=5125,pn=34963,on=35040,Ce=35044;function dr(_e,kr,Ir,Dn){var li={},ti=0,yn={uint8:Rr,uint16:Gr};kr.oes_element_index_uint&&(yn.uint32=Yr);function ai(Ai){this.id=ti++,li[this.id]=this,this.buffer=Ai,this.primType=ze,this.vertCount=0,this.type=0}ai.prototype.bind=function(){this.buffer.bind()};var ta=[];function $i(Ai){var fn=ta.pop();return fn||(fn=new ai(Ir.create(null,pn,!0,!1)._buffer)),$a(fn,Ai,on,-1,-1,0,0),fn}function ya(Ai){ta.push(Ai)}function $a(Ai,fn,jn,Bi,Ti,ei,Sa){Ai.buffer.bind();var ha;if(fn){var Va=Sa;!Sa&&(!Xr(fn)||nn(fn)&&!Xr(fn.data))&&(Va=kr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ai.buffer,fn,jn,Va,3)}else _e.bufferData(pn,ei,jn),Ai.buffer.dtype=ha||Rr,Ai.buffer.usage=jn,Ai.buffer.dimension=3,Ai.buffer.byteLength=ei;if(ha=Sa,!Sa){switch(Ai.buffer.dtype){case Rr:case Ie:ha=Rr;break;case Gr:case $r:ha=Gr;break;case Yr:case Br:ha=Yr;break}Ai.buffer.dtype=ha}Ai.type=ha;var xi=Ti;xi<0&&(xi=Ai.buffer.byteLength,ha===Gr?xi>>=1:ha===Yr&&(xi>>=2)),Ai.vertCount=xi;var ri=Bi;if(Bi<0){ri=ze;var Ea=Ai.buffer.dimension;Ea===1&&(ri=za),Ea===2&&(ri=Wa),Ea===3&&(ri=ze)}Ai.primType=ri}function Na(Ai){Dn.elementsCount--,delete li[Ai.id],Ai.buffer.destroy(),Ai.buffer=null}function ia(Ai,fn){var jn=Ir.create(null,pn,!0),Bi=new ai(jn._buffer);Dn.elementsCount++;function Ti(ei){if(!ei)jn(),Bi.primType=ze,Bi.vertCount=0,Bi.type=Rr;else if(typeof ei=="number")jn(ei),Bi.primType=ze,Bi.vertCount=ei|0,Bi.type=Rr;else{var Sa=null,ha=Ce,Va=-1,xi=-1,ri=0,Ea=0;Array.isArray(ei)||Xr(ei)||nn(ei)?Sa=ei:("data"in ei&&(Sa=ei.data),"usage"in ei&&(ha=Ii[ei.usage]),"primitive"in ei&&(Va=ci[ei.primitive]),"count"in ei&&(xi=ei.count|0),"type"in ei&&(Ea=yn[ei.type]),"length"in ei?ri=ei.length|0:(ri=xi,Ea===Gr||Ea===$r?ri*=2:(Ea===Yr||Ea===Br)&&(ri*=4))),$a(Bi,Sa,ha,Va,xi,ri,Ea)}return Ti}return Ti(Ai),Ti._reglType="elements",Ti._elements=Bi,Ti.subdata=function(ei,Sa){return jn.subdata(ei,Sa),Ti},Ti.destroy=function(){Na(Bi)},Ti}return{create:ia,createStream:$i,destroyStream:ya,getElements:function(Ai){return typeof Ai=="function"&&Ai._elements instanceof ai?Ai._elements:null},clear:function(){Le(li).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Fn=5123;function Qn(_e){for(var kr=W.allocType(Fn,_e.length),Ir=0;Ir<_e.length;++Ir)if(isNaN(_e[Ir]))kr[Ir]=65535;else if(_e[Ir]===1/0)kr[Ir]=31744;else if(_e[Ir]===-1/0)kr[Ir]=64512;else{Hr[0]=_e[Ir];var Dn=_n[0],li=Dn>>>31<<15,ti=(Dn<<1>>>24)-127,yn=Dn>>13&1023;if(ti<-24)kr[Ir]=li;else if(ti<-14){var ai=-14-ti;kr[Ir]=li+(yn+1024>>ai)}else ti>15?kr[Ir]=li+31744:kr[Ir]=li+(ti+15<<10)+yn}return kr}function Pn(_e){return Array.isArray(_e)||Xr(_e)}var En=34467,Zn=3553,La=34067,Vi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Fo=6410,Da=32854,ys=32855,os=36194,ul=32819,Zo=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,Nl=35904,cs=35906,Ps=36193,Lo=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Xo=35843,Gl=36196,al=5121,Cl=5123,Ru=5125,lo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,ts=33648,Su=10240,Gu=10241,bl=9728,Dl=9729,tu=9984,nu=9985,ac=9986,mh=9987,Jc=33170,ah=4352,Bf=4353,Sf=4354,Fl=34046,Bc=3317,Nf=37440,hc=37441,oc=37443,fc=37444,oh=33984,cu=[tu,ac,nu,mh],sc=[0,yo,Fo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Fo]=2,rl[Do]=rl[Nl]=3,rl[Qa]=rl[cs]=4;function Yl(_e){return"[object "+_e+"]"}var Sh=Yl("HTMLCanvasElement"),Cc=Yl("OffscreenCanvas"),Uh=Yl("CanvasRenderingContext2D"),_u=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Sh,Cc,Uh,_u,Ed,tl]),Ll=[];Ll[al]=1,Ll[lo]=4,Ll[Ps]=2,Ll[Cl]=2,Ll[Ru]=4;var Qo=[];Qo[Da]=2,Qo[ys]=2,Qo[os]=2,Qo[Qs]=4,Qo[Lo]=.5,Qo[As]=.5,Qo[kl]=1,Qo[ql]=1,Qo[Jl]=.5,Qo[Us]=1,Qo[Pa]=1,Qo[fo]=.5,Qo[qs]=.25,Qo[Ql]=.5,Qo[Xo]=.25,Qo[Gl]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function rc(_e){return Object.prototype.toString.call(_e)}function jf(_e){return rc(_e)===Sh}function Vh(_e){return rc(_e)===Cc}function yf(_e){return rc(_e)===Uh}function lc(_e){return rc(_e)===_u}function hd(_e){return rc(_e)===Ed}function Zf(_e){return rc(_e)===tl}function xf(_e){if(!_e)return!1;var kr=rc(_e);return Vd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||nn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Uf(_e,kr){var Ir=kr.length;switch(_e.type){case al:case Cl:case Ru:case lo:var Dn=W.allocType(_e.type,Ir);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Qn(kr);break}}function Vf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function lh(_e,kr){_e.type===Ps?(_e.data=Qn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Ir,Dn,li,ti){for(var yn=_e.width,ai=_e.height,ta=_e.channels,$i=yn*ai*ta,ya=Vf(_e,$i),$a=0,Na=0;Na=1;)ai+=yn*ta*ta,ta/=2;return ai}else return yn*Ir*Dn}function gh(_e,kr,Ir,Dn,li,ti,yn){var ai={"don't care":ah,"dont care":ah,nice:Sf,fast:Bf},ta={repeat:ou,clamp:hl,mirror:ts},$i={nearest:bl,linear:Dl},ya=c({mipmap:mh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":mh},$i),$a={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Zo},ia={alpha:Ja,luminance:yo,"luminance alpha":Fo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ai={};kr.ext_srgb&&(ia.srgb=Nl,ia.srgba=cs),kr.oes_texture_float&&(Na.float32=Na.float=lo),kr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),kr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Cl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(Ai,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),kr.webgl_compressed_texture_atc&&c(Ai,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),kr.webgl_compressed_texture_pvrtc&&c(Ai,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Xo}),kr.webgl_compressed_texture_etc1&&(Ai["rgb etc1"]=Gl);var fn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(Ai).forEach(function($){var ot=Ai[$];fn.indexOf(ot)>=0&&(ia[$]=ot)});var jn=Object.keys(ia);Ir.textureFormats=jn;var Bi=[];Object.keys(ia).forEach(function($){var ot=ia[$];Bi[ot]=$});var Ti=[];Object.keys(Na).forEach(function($){var ot=Na[$];Ti[ot]=$});var ei=[];Object.keys($i).forEach(function($){var ot=$i[$];ei[ot]=$});var Sa=[];Object.keys(ya).forEach(function($){var ot=ya[$];Sa[ot]=$});var ha=[];Object.keys(ta).forEach(function($){var ot=ta[$];ha[ot]=$});var Va=jn.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Fo||et===cl||et===Qs||kr.ext_srgb&&(et===Nl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function xi(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ri($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ea($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=$a[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,ye=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=$.internalformat=ia[ce];$.format=Va[Se],ce in Na&&("type"in ot||($.type=Na[ce])),ce in Ai&&($.compressed=!0),Yt=!0}!ye&&Yt?$.channels=rl[$.format]:ye&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function ma($){_e.pixelStorei(Nf,$.flipY),_e.pixelStorei(hc,$.premultiplyAlpha),_e.pixelStorei(oc,$.colorSpace),_e.pixelStorei(Bc,$.unpackAlignment)}function Ki(){xi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ji($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ea($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=li.viewportWidth,Vt=li.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Hh(et));else if(lf(et))$.channels=$.channels||4,Uf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Hh(de));var ye=et.shape,Yt=et.stride,ce,Se,ir,Ye,tr,lr;ye.length===3?(ir=ye[2],lr=Yt[2]):(ir=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],$.alignment=1,$.width=ce,$.height=Se,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Gf($,de,Ye,tr,lr,et.offset)}else if(jf(et)||Vh(et)||yf(et))jf(et)||Vh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Zf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(sh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Ji(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=$i[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Vt=de=ta[ye]:Array.isArray(ye)&&(Vt=ta[ye[0]],de=ta[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var ce=ot.wrapT;de=ta[ce]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=ai[ot.mipmap],$.genMipmaps=!0,Se=!0;break;case"boolean":Se=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){_e.texParameteri(ot,Gu,$.minFilter),_e.texParameteri(ot,Su,$.magFilter),_e.texParameteri(ot,Ms,$.wrapS),_e.texParameteri(ot,Is,$.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,$.anisotropic),$.genMipmaps&&(_e.hint(Jc,$.mipmapHint),_e.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Tu=Array(pu).map(function(){return null});function No($){xi.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Au($){_e.activeTexture(oh),_e.bindTexture($.target,$.texture)}function sl(){var $=Tu[0];$?_e.bindTexture($.target,$.texture):_e.bindTexture(Zn,null)}function Lu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),Tu[et]=null),_e.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ti.textureCount--}c(No.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Tu[et]=$,ot=et;break}yn.profile&&ti.maxTextureUnits>tr)-ir,lr.height=lr.height||(et.height>>tr)-Ye,Au(et),Io(lr,Zn,ir,Ye,tr),sl(),Fa(lr),xt}function de(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Au(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=ce>>ir,tr=Se>>ir;if(!Ye||!tr)break;_e.texImage2D(Zn,ir,et.format,Ye,tr,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Co($,ot,et,xt,Vt,de){var ye=new No(La);xu[ye.id]=ye,ti.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var Ze,Pr=ye.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Eo(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(tr)es(Yt[0],Ye),es(Yt[1],tr),es(Yt[2],lr),es(Yt[3],hr),es(Yt[4],Ve),es(Yt[5],Xe);else if(Cu(Pr,Ye),Ea(ye,Ye),"faces"in Ye){var dn=Ye.faces;for(Ze=0;Ze<6;++Ze)ri(Yt[Ze],ye),es(Yt[Ze],dn[Ze])}else for(Ze=0;Ze<6;++Ze)es(Yt[Ze],Ye);for(ri(ye,Yt[0]),Pr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Au(ye),Ze=0;Ze<6;++Ze)Ul(Yt[Ze],Vi+Ze);for(pc(Pr,La),sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Pr.genMipmaps,!0)),ce.format=Bi[ye.internalformat],ce.type=Ti[ye.type],ce.mag=ei[Pr.magFilter],ce.min=Sa[Pr.minFilter],ce.wrapS=ha[Pr.wrapS],ce.wrapT=ha[Pr.wrapT],Ze=0;Ze<6;++Ze)ku(Yt[Ze]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=_a();return ri(sn,ye),sn.width=0,sn.height=0,Ji(sn,tr),sn.width=sn.width||(ye.width>>Pr)-Xe,sn.height=sn.height||(ye.height>>Pr)-Ze,Au(ye),Io(sn,Vi+Ye,Xe,Ze,Pr),sl(),Fa(sn),ce}function ir(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Au(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Vi+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce($,ot,et,xt,Vt,de),ce.subimage=Se,ce.resize=ir,ce._reglType="textureCube",ce._texture=ye,yn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)_e.texImage2D(Vi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?ku=!0:ta.indexOf(dl)>=0&&(ku=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(Tu=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?Ul=No.depth:(yc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(xu=No.stencil,Ul=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?Ul=Al=No.depthStencil:(pu=No.depthStencil,Ul=!1,Al=!1))}var sl=null,Lu=null,xc=null,Co=null;if(Array.isArray(hs))sl=hs.map(Ai);else if(hs)sl=[Ai(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Ji[0].depth,Fa.stencil=Ji[0].stencil,Fa.depthStencil=Ji[0].depthStencil),Ji[_a]?Ji[_a](Fa):Ji[_a]=ri(Fa)}return c(ba,{width:vo,height:vo,color:dl})}function Io(wo){var _a,Fa=wo|0;if(Fa===ba.width)return ba;var vo=ba.color;for(_a=0;_a=vo.byteLength?Eo.subdata(vo):(Eo.destroy(),ri.buffers[wo]=null)),ri.buffers[wo]||(Eo=ri.buffers[wo]=li.create(_a,Pf,!1,!0)),Fa.buffer=li.getBuffer(Eo),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ba[wo]=1}else li.getBuffer(_a)?(Fa.buffer=li.getBuffer(_a),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):li.getBuffer(_a.buffer)?(Fa.buffer=li.getBuffer(_a.buffer),Fa.size=(+_a.size||Fa.buffer.dimension)|0,Fa.normalized=!!_a.normalized||!1,"type"in _a?Fa.type=Hn[_a.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(_a.offset||0)|0,Fa.stride=(_a.stride||0)|0,Fa.divisor=(_a.divisor||0)|0,Fa.state=1):"x"in _a&&(Fa.x=+_a.x||0,Fa.y=+_a.y||0,Fa.z=+_a.z||0,Fa.w=+_a.w||0,Fa.state=2)}for(var es=0;es1)for(var ma=0;mafn&&(fn=jn.stats.uniformsCount)}),fn},Ir.getMaxAttributesCount=function(){var fn=0;return ya.forEach(function(jn){jn.stats.attributesCount>fn&&(fn=jn.stats.attributesCount)}),fn});function Ai(){li={},ti={};for(var fn=0;fn>>4&15)+kr.charAt(Dn&15);return Ir}function Ph(_e){for(var kr="",Ir=-1,Dn,li;++Ir<_e.length;)Dn=_e.charCodeAt(Ir),li=Ir+1<_e.length?_e.charCodeAt(Ir+1):0,55296<=Dn&&Dn<=56319&&56320<=li&&li<=57343&&(Dn=65536+((Dn&1023)<<10)+(li&1023),Ir++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Ir=0;Ir>5]|=(_e.charCodeAt(Ir/8)&255)<<24-Ir%32;return kr}function Bu(_e){for(var kr="",Ir=0;Ir<_e.length*32;Ir+=8)kr+=String.fromCharCode(_e[Ir>>5]>>>24-Ir%32&255);return kr}function iu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Ir){return _e&kr^~_e&Ir}function bh(_e,kr,Ir){return _e&kr^_e&Ir^kr&Ir}function Wf(_e){return iu(_e,2)^iu(_e,13)^iu(_e,22)}function gr(_e){return iu(_e,6)^iu(_e,11)^iu(_e,25)}function Ur(_e){return iu(_e,7)^iu(_e,18)^_h(_e,3)}function wn(_e){return iu(_e,17)^iu(_e,19)^_h(_e,10)}var hn=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 qn(_e,kr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Na=0;Na<_e.length;Na+=16){for(li=Ir[0],ti=Ir[1],yn=Ir[2],ai=Ir[3],ta=Ir[4],$i=Ir[5],ya=Ir[6],$a=Ir[7],ia=0;ia<64;ia++)ia<16?Dn[ia]=_e[ia+Na]:Dn[ia]=di(di(di(wn(Dn[ia-2]),Dn[ia-7]),Ur(Dn[ia-15])),Dn[ia-16]),Ai=di(di(di(di($a,gr(ta)),df(ta,$i,ya)),hn[ia]),Dn[ia]),fn=di(Wf(li),bh(li,ti,yn)),$a=ya,ya=$i,$i=ta,ta=di(ai,Ai),ai=yn,yn=ti,ti=li,li=di(Ai,fn);Ir[0]=di(li,Ir[0]),Ir[1]=di(ti,Ir[1]),Ir[2]=di(yn,Ir[2]),Ir[3]=di(ai,Ir[3]),Ir[4]=di(ta,Ir[4]),Ir[5]=di($i,Ir[5]),Ir[6]=di(ya,Ir[6]),Ir[7]=di($a,Ir[7])}return Ir}function di(_e,kr){var Ir=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Ir>>16);return Dn<<16|Ir&65535}function aa(_e){return Array.prototype.slice.call(_e)}function va(_e){return aa(_e).join("")}function Ba(_e){var kr=_e&&_e.cache,Ir=0,Dn=[],li=[],ti=[];function yn(Ai,fn){var jn=fn&&fn.stable;if(!jn){for(var Bi=0;Bi0&&(Ai.push(Ti,"="),Ai.push.apply(Ai,aa(arguments)),Ai.push(";")),Ti}return c(fn,{def:Bi,toString:function(){return va([jn.length>0?"var "+jn.join(",")+";":"",va(Ai)])}})}function ta(){var Ai=ai(),fn=ai(),jn=Ai.toString,Bi=fn.toString;function Ti(ei,Sa){fn(ei,Sa,"=",Ai.def(ei,Sa),";")}return c(function(){Ai.apply(Ai,aa(arguments))},{def:Ai.def,entry:Ai,exit:fn,save:Ti,set:function(ei,Sa,ha){Ti(ei,Sa),Ai(ei,Sa,"=",ha,";")},toString:function(){return jn()+Bi()}})}function $i(){var Ai=va(arguments),fn=ta(),jn=ta(),Bi=fn.toString,Ti=jn.toString;return c(fn,{then:function(){return fn.apply(fn,aa(arguments)),this},else:function(){return jn.apply(jn,aa(arguments)),this},toString:function(){var ei=Ti();return ei&&(ei="else{"+ei+"}"),va(["if(",Ai,"){",Bi(),"}",ei])}})}var ya=ai(),$a={};function Na(Ai,fn){var jn=[];function Bi(){var Va="a"+jn.length;return jn.push(Va),Va}fn=fn||0;for(var Ti=0;Ti2){for(var w=Array(A.position.length*.5),B=0;B2){for(var V=!A.position[0].length,H=a.mallocFloat(this.count*2),F=0,U=0;F1?h.align[Mt]:h.align[0]:h.align;if(typeof ee=="number")return ee;switch(ee){case"right":case"end":return-Lt;case"center":case"centre":case"middle":return-Lt*.5}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Lt,Mt){var ee=(h.font[Mt]||h.font[0]).metrics,ve=0;return ve+=ee.bottom*.5,typeof Lt=="number"?ve+=Lt-ee.baseline:ve+=-ee[Lt],ve*=-1,ve})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color=="string"||!isNaN(A.color))this.color=e(A.color,"uint8");else{var Pt;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var qt=A.color.length;Pt=a.mallocUint8(qt);for(var Wt=(A.color.subarray||A.color.slice).bind(A.color),Jt=0;Jt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(pe){var se=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(se);for(var Tt=0;Tt1?this.counts[Tt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Tt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Tt*4,Tt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Tt]:this.opacity,baseline:this.baselineOffset[Tt]!=null?this.baselineOffset[Tt]:this.baselineOffset[0],align:this.align?this.alignOffset[Tt]!=null?this.alignOffset[Tt]:this.alignOffset[0]:0,atlas:this.fontAtlas[Tt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Tt*2,Tt*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function C(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}Z.exports=M}),rW=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(be,Tr){for(var Ir=Object.keys(Tr),Fn=0;Fn1&&Tr===Ir&&(Tr==='"'||Tr==="'"))return['"'+r(be.substr(1,be.length-2))+'"'];var Fn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(be);if(Fn)return a(be.substr(0,Fn.index)).concat(a(Fn[1])).concat(a(be.substr(Fn.index+Fn[0].length)));var hi=be.split(".");if(hi.length===1)return['"'+r(be)+'"'];for(var ni=[],yn=0;yn"u"?1:window.devicePixelRatio,_a=!1,Za={},Na=function(dn){},ia=function(){};if(typeof Tr=="string"?Ir=document.querySelector(Tr):typeof Tr=="object"&&(b(Tr)?Ir=Tr:_(Tr)?(ni=Tr,hi=ni.canvas):("gl"in Tr?ni=Tr.gl:"canvas"in Tr?hi=M(Tr.canvas):"container"in Tr&&(Fn=M(Tr.container)),"attributes"in Tr&&(yn=Tr.attributes),"extensions"in Tr&&(li=P(Tr.extensions)),"optionalExtensions"in Tr&&(ta=P(Tr.optionalExtensions)),"onDone"in Tr&&(Na=Tr.onDone),"profile"in Tr&&(_a=!!Tr.profile),"pixelRatio"in Tr&&(Gi=+Tr.pixelRatio),"cachedCode"in Tr&&(Za=Tr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?hi=Ir:Fn=Ir),!ni){if(!hi){var Ei=T(Fn||document.body,Na,Gi);if(!Ei)return null;hi=Ei.canvas,ia=Ei.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ni=u(hi,yn)}return ni?{gl:ni,canvas:hi,container:Fn,extensions:li,optionalExtensions:ta,pixelRatio:Gi,profile:_a,cachedCode:Za,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(be,Tr){var Ir={};function Fn(yn){var li=yn.toLowerCase(),ta;try{ta=Ir[li]=be.getExtension(li)}catch{}return!!ta}for(var hi=0;hi65535)<<4,be>>>=Tr,Ir=(be>255)<<3,be>>>=Ir,Tr|=Ir,Ir=(be>15)<<2,be>>>=Ir,Tr|=Ir,Ir=(be>3)<<1,be>>>=Ir,Tr|=Ir,Tr|be>>1}function U(){var be=h(8,function(){return[]});function Tr(ni){var yn=H(ni),li=be[F(yn)>>2];return li.length>0?li.pop():new ArrayBuffer(yn)}function Ir(ni){be[F(ni.byteLength)>>2].push(ni)}function Fn(ni,yn){var li=null;switch(ni){case p:li=new Int8Array(Tr(yn),0,yn);break;case k:li=new Uint8Array(Tr(yn),0,yn);break;case w:li=new Int16Array(Tr(2*yn),0,yn);break;case B:li=new Uint16Array(Tr(2*yn),0,yn);break;case O:li=new Int32Array(Tr(4*yn),0,yn);break;case j:li=new Uint32Array(Tr(4*yn),0,yn);break;case V:li=new Float32Array(Tr(4*yn),0,yn);break;default:return null}return li.length!==yn?li.subarray(0,yn):li}function hi(ni){Ir(ni.buffer)}return{alloc:Tr,free:Ir,allocType:Fn,freeType:hi}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,pt=33901,rt=33902,at=3379,vt=3386,it=34921,K=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Ae=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,qr=16384,br=function(be,Tr){var Ir=1;Tr.ext_texture_filter_anisotropic&&(Ir=be.getParameter(se));var Fn=1,hi=1;Tr.webgl_draw_buffers&&(Fn=be.getParameter(Lt),hi=be.getParameter(Tt));var ni=!!Tr.oes_texture_float;if(ni){var yn=be.createTexture();be.bindTexture(Mt,yn),be.texImage2D(Mt,0,Ae,1,1,0,Ae,He,null);var li=be.createFramebuffer();if(be.bindFramebuffer(cr,li),be.framebufferTexture2D(cr,jr,Mt,yn,0),be.bindTexture(Mt,null),be.checkFramebufferStatus(cr)!==ur)ni=!1;else{be.viewport(0,0,1,1),be.clearColor(1,0,0,1),be.clear(qr);var ta=W.allocType(He,4);be.readPixels(0,0,1,1,Ae,He,ta),be.getError()?ni=!1:(be.deleteFramebuffer(li),be.deleteTexture(yn),ni=ta[0]===1),W.freeType(ta)}}var Gi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),_a=!0;if(!Gi){var Za=be.createTexture(),Na=W.allocType(Ge,36);be.activeTexture(oe),be.bindTexture(ee,Za),be.texImage2D(ve,0,Ae,3,3,0,Ae,Ge,Na),W.freeType(Na),be.bindTexture(ee,null),be.deleteTexture(Za),_a=!be.getError()}return{colorBits:[be.getParameter(J),be.getParameter(lt),be.getParameter(yt),be.getParameter(mt)],depthBits:be.getParameter(st),stencilBits:be.getParameter(tt),subpixelBits:be.getParameter(q),extensions:Object.keys(Tr).filter(function(ia){return!!Tr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Fn,maxColorAttachments:hi,pointSizeDims:be.getParameter(pt),lineWidthDims:be.getParameter(rt),maxViewportDims:be.getParameter(vt),maxCombinedTextureUnits:be.getParameter(ut),maxCubeMapSize:be.getParameter(qt),maxRenderbufferSize:be.getParameter(Wt),maxTextureUnits:be.getParameter(It),maxTextureSize:be.getParameter(at),maxAttributes:be.getParameter(it),maxVertexUniforms:be.getParameter(K),maxVertexTextureUnits:be.getParameter(kt),maxVaryingVectors:be.getParameter(ft),maxFragmentUniforms:be.getParameter(Pt),glsl:be.getParameter(pe),renderer:be.getParameter(ge),vendor:be.getParameter(Jt),version:be.getParameter(fe),readFloat:ni,npotTextureCube:_a}},Xr=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 nn(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)||Xr(be.data))}var Le=function(be){return Object.keys(be).map(function(Tr){return be[Tr]})},Gt={shape:re,flatten:Nt};function ne(be,Tr,Ir){for(var Fn=0;Fn0){var Va;if(Array.isArray(Un[0])){da=Gn(Un);for(var ki=1,oi=1;oi0){if(typeof ki[0]=="number"){var Xi=W.allocType(ai.dtype,ki.length);tn(Xi,ki),da(Xi,Ca),W.freeType(Xi)}else if(Array.isArray(ki[0])||Xr(ki[0])){va=Gn(ki);var Qi=ui(ki,va,ai.dtype);da(Qi,Ca),W.freeType(Qi)}}}else if(nn(ki)){va=ki.shape;var ka=ki.stride,zo=0,wo=0,wa=0,Fa=0;va.length===1?(zo=va[0],wo=1,wa=ka[0],Fa=0):va.length===2&&(zo=va[0],wo=va[1],wa=ka[0],Fa=ka[1]);var vo=Array.isArray(ki.data)?ai.dtype:_r(ki.data),Co=W.allocType(vo,zo*wo);Cn(Co,ki.data,zo,wo,wa,Fa,ki.offset),da(Co,Ca),W.freeType(Co)}return Ea}return Ui||Ea(dn),Ea._reglType="buffer",Ea._buffer=ai,Ea.subdata=Va,Ir.profile&&(Ea.stats=ai.stats),Ea.destroy=function(){Na(ai)},Ea}function Ei(){Le(ni).forEach(function(dn){dn.buffer=be.createBuffer(),be.bindBuffer(dn.type,dn.buffer),be.bufferData(dn.type,dn.persistentData||dn.byteLength,dn.usage)})}return Ir.profile&&(Tr.getTotalBufferSize=function(){var dn=0;return Object.keys(ni).forEach(function(Un){dn+=ni[Un].stats.size}),dn}),{create:ia,createStream:ta,destroyStream:Gi,clear:function(){Le(ni).forEach(Na),li.forEach(Na)},getBuffer:function(dn){return dn&&dn._buffer instanceof yn?dn._buffer:null},restore:Ei,_initBuffer:Za}}var Mn=0,mi=0,Mi=1,Ni=1,Hi=4,Ji=4,di={points:Mn,point:mi,lines:Mi,line:Ni,triangles:Hi,triangle:Ji,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,qa=1,Oe=4,ze=5120,Br=5121,$r=5122,Gr=5123,Rr=5124,Yr=5125,mn=34963,on=35040,Ce=35044;function pr(be,Tr,Ir,Fn){var hi={},ni=0,yn={uint8:Br,uint16:Gr};Tr.oes_element_index_uint&&(yn.uint32=Yr);function li(Ei){this.id=ni++,hi[this.id]=this,this.buffer=Ei,this.primType=Oe,this.vertCount=0,this.type=0}li.prototype.bind=function(){this.buffer.bind()};var ta=[];function Gi(Ei){var dn=ta.pop();return dn||(dn=new li(Ir.create(null,mn,!0,!1)._buffer)),Za(dn,Ei,on,-1,-1,0,0),dn}function _a(Ei){ta.push(Ei)}function Za(Ei,dn,Un,Ui,Si,ai,Ea){Ei.buffer.bind();var da;if(dn){var Va=Ea;!Ea&&(!Xr(dn)||nn(dn)&&!Xr(dn.data))&&(Va=Tr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ei.buffer,dn,Un,Va,3)}else be.bufferData(mn,ai,Un),Ei.buffer.dtype=da||Br,Ei.buffer.usage=Un,Ei.buffer.dimension=3,Ei.buffer.byteLength=ai;if(da=Ea,!Ea){switch(Ei.buffer.dtype){case Br:case ze:da=Br;break;case Gr:case $r:da=Gr;break;case Yr:case Rr:da=Yr;break}Ei.buffer.dtype=da}Ei.type=da;var ki=Si;ki<0&&(ki=Ei.buffer.byteLength,da===Gr?ki>>=1:da===Yr&&(ki>>=2)),Ei.vertCount=ki;var oi=Ui;if(Ui<0){oi=Oe;var Ca=Ei.buffer.dimension;Ca===1&&(oi=za),Ca===2&&(oi=qa),Ca===3&&(oi=Oe)}Ei.primType=oi}function Na(Ei){Fn.elementsCount--,delete hi[Ei.id],Ei.buffer.destroy(),Ei.buffer=null}function ia(Ei,dn){var Un=Ir.create(null,mn,!0),Ui=new li(Un._buffer);Fn.elementsCount++;function Si(ai){if(!ai)Un(),Ui.primType=Oe,Ui.vertCount=0,Ui.type=Br;else if(typeof ai=="number")Un(ai),Ui.primType=Oe,Ui.vertCount=ai|0,Ui.type=Br;else{var Ea=null,da=Ce,Va=-1,ki=-1,oi=0,Ca=0;Array.isArray(ai)||Xr(ai)||nn(ai)?Ea=ai:("data"in ai&&(Ea=ai.data),"usage"in ai&&(da=Di[ai.usage]),"primitive"in ai&&(Va=di[ai.primitive]),"count"in ai&&(ki=ai.count|0),"type"in ai&&(Ca=yn[ai.type]),"length"in ai?oi=ai.length|0:(oi=ki,Ca===Gr||Ca===$r?oi*=2:(Ca===Yr||Ca===Rr)&&(oi*=4))),Za(Ui,Ea,da,Va,ki,oi,Ca)}return Si}return Si(Ei),Si._reglType="elements",Si._elements=Ui,Si.subdata=function(ai,Ea){return Un.subdata(ai,Ea),Si},Si.destroy=function(){Na(Ui)},Si}return{create:ia,createStream:Gi,destroyStream:_a,getElements:function(Ei){return typeof Ei=="function"&&Ei._elements instanceof li?Ei._elements:null},clear:function(){Le(hi).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Bn=5123;function ri(be){for(var Tr=W.allocType(Bn,be.length),Ir=0;Ir>>31<<15,ni=(Fn<<1>>>24)-127,yn=Fn>>13&1023;if(ni<-24)Tr[Ir]=hi;else if(ni<-14){var li=-14-ni;Tr[Ir]=hi+(yn+1024>>li)}else ni>15?Tr[Ir]=hi+31744:Tr[Ir]=hi+(ni+15<<10)+yn}return Tr}function Pn(be){return Array.isArray(be)||Xr(be)}var En=34467,Yn=3553,La=34067,qi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Bo=6410,Da=32854,ys=32855,os=36194,ul=32819,Go=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,jl=35904,cs=35906,Ps=36193,Po=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Jo=35843,Gl=36196,al=5121,Ll=5123,Ru=5125,uo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,es=33648,Cu=10240,Gu=10241,bl=9728,Fl=9729,tu=9984,nu=9985,ac=9986,gh=9987,Jc=33170,oh=4352,jf=4353,Sf=4354,Bl=34046,Rc=3317,Uf=37440,hc=37441,oc=37443,fc=37444,sh=33984,cu=[tu,ac,nu,gh],sc=[0,yo,Bo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Bo]=2,rl[Do]=rl[jl]=3,rl[Qa]=rl[cs]=4;function Yl(be){return"[object "+be+"]"}var Eh=Yl("HTMLCanvasElement"),Lc=Yl("OffscreenCanvas"),Vh=Yl("CanvasRenderingContext2D"),bu=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Eh,Lc,Vh,bu,Ed,tl]),Pl=[];Pl[al]=1,Pl[uo]=4,Pl[Ps]=2,Pl[Ll]=2,Pl[Ru]=4;var ts=[];ts[Da]=2,ts[ys]=2,ts[os]=2,ts[Qs]=4,ts[Po]=.5,ts[As]=.5,ts[kl]=1,ts[ql]=1,ts[Jl]=.5,ts[Us]=1,ts[Pa]=1,ts[fo]=.5,ts[qs]=.25,ts[Ql]=.5,ts[Jo]=.25,ts[Gl]=.5;function lf(be){return Array.isArray(be)&&(be.length===0||typeof be[0]=="number")}function lh(be){if(!Array.isArray(be))return!1;var Tr=be.length;return!(Tr===0||!Pn(be[0]))}function rc(be){return Object.prototype.toString.call(be)}function Vf(be){return rc(be)===Eh}function Hh(be){return rc(be)===Lc}function yf(be){return rc(be)===Vh}function lc(be){return rc(be)===bu}function hd(be){return rc(be)===Ed}function Gf(be){return rc(be)===tl}function xf(be){if(!be)return!1;var Tr=rc(be);return Vd.indexOf(Tr)>=0?!0:lf(be)||lh(be)||nn(be)}function Wh(be){return le[Object.prototype.toString.call(be)]|0}function Hf(be,Tr){var Ir=Tr.length;switch(be.type){case al:case Ll:case Ru:case uo:var Fn=W.allocType(be.type,Ir);Fn.set(Tr),be.data=Fn;break;case Ps:be.data=ri(Tr);break}}function Wf(be,Tr){return W.allocType(be.type===Ps?uo:be.type,Tr)}function uh(be,Tr){be.type===Ps?(be.data=ri(Tr),W.freeType(Tr)):be.data=Tr}function Yf(be,Tr,Ir,Fn,hi,ni){for(var yn=be.width,li=be.height,ta=be.channels,Gi=yn*li*ta,_a=Wf(be,Gi),Za=0,Na=0;Na=1;)li+=yn*ta*ta,ta/=2;return li}else return yn*Ir*Fn}function vh(be,Tr,Ir,Fn,hi,ni,yn){var li={"don't care":oh,"dont care":oh,nice:Sf,fast:jf},ta={repeat:ou,clamp:hl,mirror:es},Gi={nearest:bl,linear:Fl},_a=c({mipmap:gh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":gh},Gi),Za={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Go},ia={alpha:Ja,luminance:yo,"luminance alpha":Bo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ei={};Tr.ext_srgb&&(ia.srgb=jl,ia.srgba=cs),Tr.oes_texture_float&&(Na.float32=Na.float=uo),Tr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),Tr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Ll,uint32:Ru,"depth stencil":ss})),Tr.webgl_compressed_texture_s3tc&&c(Ei,{"rgb s3tc dxt1":Po,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),Tr.webgl_compressed_texture_atc&&c(Ei,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),Tr.webgl_compressed_texture_pvrtc&&c(Ei,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Jo}),Tr.webgl_compressed_texture_etc1&&(Ei["rgb etc1"]=Gl);var dn=Array.prototype.slice.call(be.getParameter(En));Object.keys(Ei).forEach(function($){var ot=Ei[$];dn.indexOf(ot)>=0&&(ia[$]=ot)});var Un=Object.keys(ia);Ir.textureFormats=Un;var Ui=[];Object.keys(ia).forEach(function($){var ot=ia[$];Ui[ot]=$});var Si=[];Object.keys(Na).forEach(function($){var ot=Na[$];Si[ot]=$});var ai=[];Object.keys(Gi).forEach(function($){var ot=Gi[$];ai[ot]=$});var Ea=[];Object.keys(_a).forEach(function($){var ot=_a[$];Ea[ot]=$});var da=[];Object.keys(ta).forEach(function($){var ot=ta[$];da[ot]=$});var Va=Un.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Bo||et===cl||et===Qs||Tr.ext_srgb&&(et===jl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function ki(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function oi($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ca($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,xe=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],xe=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,xe=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var he=ot.format,Ee=$.internalformat=ia[he];$.format=Va[Ee],he in Na&&("type"in ot||($.type=Na[he])),he in Ei&&($.compressed=!0),Yt=!0}!xe&&Yt?$.channels=rl[$.format]:xe&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function va($){be.pixelStorei(Uf,$.flipY),be.pixelStorei(hc,$.premultiplyAlpha),be.pixelStorei(oc,$.colorSpace),be.pixelStorei(Rc,$.unpackAlignment)}function Xi(){ki.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Qi($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ca($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=hi.viewportWidth,Vt=hi.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Wh(et));else if(lf(et))$.channels=$.channels||4,Hf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Wh(de));var xe=et.shape,Yt=et.stride,he,Ee,ir,Ye,er,lr;xe.length===3?(ir=xe[2],lr=Yt[2]):(ir=1,lr=1),he=xe[0],Ee=xe[1],Ye=Yt[0],er=Yt[1],$.alignment=1,$.width=he,$.height=Ee,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Yf($,de,Ye,er,lr,et.offset)}else if(Vf(et)||Hh(et)||yf(et))Vf(et)||Hh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Gf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(lh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Qi(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=Gi[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var xe=ot.wrap;typeof xe=="string"?Vt=de=ta[xe]:Array.isArray(xe)&&(Vt=ta[xe[0]],de=ta[xe[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var he=ot.wrapT;de=ta[he]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Ee=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=li[ot.mipmap],$.genMipmaps=!0,Ee=!0;break;case"boolean":Ee=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Ee=!0;break}Ee&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){be.texParameteri(ot,Gu,$.minFilter),be.texParameteri(ot,Cu,$.magFilter),be.texParameteri(ot,Ms,$.wrapS),be.texParameteri(ot,Is,$.wrapT),Tr.ext_texture_filter_anisotropic&&be.texParameteri(ot,Bl,$.anisotropic),$.genMipmaps&&(be.hint(Jc,$.mipmapHint),be.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Au=Array(pu).map(function(){return null});function jo($){ki.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Mu($){be.activeTexture(sh),be.bindTexture($.target,$.texture)}function sl(){var $=Au[0];$?be.bindTexture($.target,$.texture):be.bindTexture(Yn,null)}function Iu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(be.activeTexture(sh+et),be.bindTexture(xt,null),Au[et]=null),be.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ni.textureCount--}c(jo.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Au[et]=$,ot=et;break}yn.profile&&ni.maxTextureUnits>er)-ir,lr.height=lr.height||(et.height>>er)-Ye,Mu(et),zo(lr,Yn,ir,Ye,er),sl(),Fa(lr),xt}function de(xe,Yt){var he=xe|0,Ee=Yt|0||he;if(he===et.width&&Ee===et.height)return xt;xt.width=et.width=he,xt.height=et.height=Ee,Mu(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=he>>ir,er=Ee>>ir;if(!Ye||!er)break;be.texImage2D(Yn,ir,et.format,Ye,er,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Ch(et.internalformat,et.type,he,Ee,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Lo($,ot,et,xt,Vt,de){var xe=new jo(La);xu[xe.id]=xe,ni.cubeCount++;var Yt=new Array(6);function he(Ye,er,lr,hr,Ve,Xe){var Ze,Pr=xe.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Co(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(er)rs(Yt[0],Ye),rs(Yt[1],er),rs(Yt[2],lr),rs(Yt[3],hr),rs(Yt[4],Ve),rs(Yt[5],Xe);else if(Pu(Pr,Ye),Ca(xe,Ye),"faces"in Ye){var pn=Ye.faces;for(Ze=0;Ze<6;++Ze)oi(Yt[Ze],xe),rs(Yt[Ze],pn[Ze])}else for(Ze=0;Ze<6;++Ze)rs(Yt[Ze],Ye);for(oi(xe,Yt[0]),Pr.genMipmaps?xe.mipmask=(Yt[0].width<<1)-1:xe.mipmask=Yt[0].mipmask,xe.internalformat=Yt[0].internalformat,he.width=Yt[0].width,he.height=Yt[0].height,Mu(xe),Ze=0;Ze<6;++Ze)Vl(Yt[Ze],qi+Ze);for(pc(Pr,La),sl(),yn.profile&&(xe.stats.size=Ch(xe.internalformat,xe.type,he.width,he.height,Pr.genMipmaps,!0)),he.format=Ui[xe.internalformat],he.type=Si[xe.type],he.mag=ai[Pr.magFilter],he.min=Ea[Pr.minFilter],he.wrapS=da[Pr.wrapS],he.wrapT=da[Pr.wrapT],Ze=0;Ze<6;++Ze)Tu(Yt[Ze]);return he}function Ee(Ye,er,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=wa();return oi(sn,xe),sn.width=0,sn.height=0,Qi(sn,er),sn.width=sn.width||(xe.width>>Pr)-Xe,sn.height=sn.height||(xe.height>>Pr)-Ze,Mu(xe),zo(sn,qi+Ye,Xe,Ze,Pr),sl(),Fa(sn),he}function ir(Ye){var er=Ye|0;if(er!==xe.width){he.width=xe.width=er,he.height=xe.height=er,Mu(xe);for(var lr=0;lr<6;++lr)for(var hr=0;xe.mipmask>>hr;++hr)be.texImage2D(qi+lr,hr,xe.format,er>>hr,er>>hr,0,xe.format,xe.type,null);return sl(),yn.profile&&(xe.stats.size=Ch(xe.internalformat,xe.type,he.width,he.height,!1,!0)),he}}return he($,ot,et,xt,Vt,de),he.subimage=Ee,he.resize=ir,he._reglType="textureCube",he._texture=xe,yn.profile&&(he.stats=xe.stats),he.destroy=function(){xe.decRef()},he}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)be.texImage2D(qi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?Tu=!0:ta.indexOf(dl)>=0&&(Tu=!1))),("depthTexture"in jo||"depthStencilTexture"in jo)&&(Au=!!(jo.depthTexture||jo.depthStencilTexture)),"depth"in jo&&(typeof jo.depth=="boolean"?Vl=jo.depth:(yc=jo.depth,Al=!1)),"stencil"in jo&&(typeof jo.stencil=="boolean"?Al=jo.stencil:(xu=jo.stencil,Vl=!1)),"depthStencil"in jo&&(typeof jo.depthStencil=="boolean"?Vl=Al=jo.depthStencil:(pu=jo.depthStencil,Vl=!1,Al=!1))}var sl=null,Iu=null,xc=null,Lo=null;if(Array.isArray(hs))sl=hs.map(Ei);else if(hs)sl=[Ei(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Qi[0].depth,Fa.stencil=Qi[0].stencil,Fa.depthStencil=Qi[0].depthStencil),Qi[wa]?Qi[wa](Fa):Qi[wa]=oi(Fa)}return c(ka,{width:vo,height:vo,color:dl})}function zo(wo){var wa,Fa=wo|0;if(Fa===ka.width)return ka;var vo=ka.color;for(wa=0;wa=vo.byteLength?Co.subdata(vo):(Co.destroy(),oi.buffers[wo]=null)),oi.buffers[wo]||(Co=oi.buffers[wo]=hi.create(wa,Pf,!1,!0)),Fa.buffer=hi.getBuffer(Co),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ka[wo]=1}else hi.getBuffer(wa)?(Fa.buffer=hi.getBuffer(wa),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):hi.getBuffer(wa.buffer)?(Fa.buffer=hi.getBuffer(wa.buffer),Fa.size=(+wa.size||Fa.buffer.dimension)|0,Fa.normalized=!!wa.normalized||!1,"type"in wa?Fa.type=Wn[wa.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(wa.offset||0)|0,Fa.stride=(wa.stride||0)|0,Fa.divisor=(wa.divisor||0)|0,Fa.state=1):"x"in wa&&(Fa.x=+wa.x||0,Fa.y=+wa.y||0,Fa.z=+wa.z||0,Fa.w=+wa.w||0,Fa.state=2)}for(var rs=0;rs1)for(var va=0;vadn&&(dn=Un.stats.uniformsCount)}),dn},Ir.getMaxAttributesCount=function(){var dn=0;return _a.forEach(function(Un){Un.stats.attributesCount>dn&&(dn=Un.stats.attributesCount)}),dn});function Ei(){hi={},ni={};for(var dn=0;dn<_a.length;++dn)ia(_a[dn],null,_a[dn].attributes.map(function(Un){return[Un.location,Un.name]}))}return{clear:function(){var dn=be.deleteShader.bind(be);Le(hi).forEach(dn),hi={},Le(ni).forEach(dn),ni={},_a.forEach(function(Un){be.deleteProgram(Un.program)}),_a.length=0,Gi={},Ir.shaderCount=0},program:function(dn,Un,Ui,Si){var ai=Gi[Un];ai||(ai=Gi[Un]={});var Ea=ai[dn];if(Ea&&(Ea.refCount++,!Si))return Ea;var da=new Na(Un,dn);return Ir.shaderCount++,ia(da,Ui,Si),Ea||(ai[dn]=da),_a.push(da),c(da,{destroy:function(){if(da.refCount--,da.refCount<=0){be.deleteProgram(da.program);var Va=_a.indexOf(da);_a.splice(Va,1),Ir.shaderCount--}ai[da.vertId].refCount<=0&&(be.deleteShader(ni[da.vertId]),delete ni[da.vertId],delete Gi[da.fragId][da.vertId]),Object.keys(Gi[da.fragId]).length||(be.deleteShader(hi[da.fragId]),delete hi[da.fragId],delete Gi[da.fragId])}})},restore:Ei,shader:ta,frag:-1,vert:-1}}var th=6408,nf=5121,Gh=3333,wf=5126;function Pd(be,Tr,Ir,Fn,hi,ni,yn){function li(_a){var Za;Tr.next===null?Za=nf:Za=Tr.next.colorAttachments[0].texture._texture.type;var Na=0,ia=0,Ei=Fn.framebufferWidth,dn=Fn.framebufferHeight,Un=null;Xr(_a)?Un=_a:_a&&(Na=_a.x|0,ia=_a.y|0,Ei=(_a.width||Fn.framebufferWidth-Na)|0,dn=(_a.height||Fn.framebufferHeight-ia)|0,Un=_a.data||null),Ir();var Ui=Ei*dn*4;return Un||(Za===nf?Un=new Uint8Array(Ui):Za===wf&&(Un=Un||new Float32Array(Ui))),be.pixelStorei(Gh,4),be.readPixels(Na,ia,Ei,dn,th,Za,Un),Un}function ta(_a){var Za;return Tr.setFBO({framebuffer:_a.framebuffer},function(){Za=li(_a)}),Za}function Gi(_a){return!_a||!("framebuffer"in _a)?li(_a):ta(_a)}return Gi}function gc(be){return eh(Qf(Ih(be)))}function Qf(be){return Nu(Zn(_h(be),be.length*8))}function eh(be){for(var Tr="0123456789abcdef",Ir="",Fn,hi=0;hi>>4&15)+Tr.charAt(Fn&15);return Ir}function Ih(be){for(var Tr="",Ir=-1,Fn,hi;++Ir>>6&31,128|Fn&63):Fn<=65535?Tr+=String.fromCharCode(224|Fn>>>12&15,128|Fn>>>6&63,128|Fn&63):Fn<=2097151&&(Tr+=String.fromCharCode(240|Fn>>>18&7,128|Fn>>>12&63,128|Fn>>>6&63,128|Fn&63));return Tr}function _h(be){for(var Tr=Array(be.length>>2),Ir=0;Ir>5]|=(be.charCodeAt(Ir/8)&255)<<24-Ir%32;return Tr}function Nu(be){for(var Tr="",Ir=0;Ir>5]>>>24-Ir%32&255);return Tr}function iu(be,Tr){return be>>>Tr|be<<32-Tr}function bh(be,Tr){return be>>>Tr}function df(be,Tr,Ir){return be&Tr^~be&Ir}function wh(be,Tr,Ir){return be&Tr^be&Ir^Tr&Ir}function $f(be){return iu(be,2)^iu(be,13)^iu(be,22)}function gr(be){return iu(be,6)^iu(be,11)^iu(be,25)}function Ur(be){return iu(be,7)^iu(be,18)^bh(be,3)}function wn(be){return iu(be,17)^iu(be,19)^bh(be,10)}var hn=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 Zn(be,Tr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Fn=new Array(64),hi,ni,yn,li,ta,Gi,_a,Za,Na,ia,Ei,dn;for(be[Tr>>5]|=128<<24-Tr%32,be[(Tr+64>>9<<4)+15]=Tr,Na=0;Na>16)+(Tr>>16)+(Ir>>16);return Fn<<16|Ir&65535}function aa(be){return Array.prototype.slice.call(be)}function xa(be){return aa(be).join("")}function Ra(be){var Tr=be&&be.cache,Ir=0,Fn=[],hi=[],ni=[];function yn(Ei,dn){var Un=dn&&dn.stable;if(!Un){for(var Ui=0;Ui0&&(Ei.push(Si,"="),Ei.push.apply(Ei,aa(arguments)),Ei.push(";")),Si}return c(dn,{def:Ui,toString:function(){return xa([Un.length>0?"var "+Un.join(",")+";":"",xa(Ei)])}})}function ta(){var Ei=li(),dn=li(),Un=Ei.toString,Ui=dn.toString;function Si(ai,Ea){dn(ai,Ea,"=",Ei.def(ai,Ea),";")}return c(function(){Ei.apply(Ei,aa(arguments))},{def:Ei.def,entry:Ei,exit:dn,save:Si,set:function(ai,Ea,da){Si(ai,Ea),Ei(ai,Ea,"=",da,";")},toString:function(){return Un()+Ui()}})}function Gi(){var Ei=xa(arguments),dn=ta(),Un=ta(),Ui=dn.toString,Si=Un.toString;return c(dn,{then:function(){return dn.apply(dn,aa(arguments)),this},else:function(){return Un.apply(Un,aa(arguments)),this},toString:function(){var ai=Si();return ai&&(ai="else{"+ai+"}"),xa(["if(",Ei,"){",Ui(),"}",ai])}})}var _a=li(),Za={};function Na(Ei,dn){var Un=[];function Ui(){var Va="a"+Un.length;return Un.push(Va),Va}dn=dn||0;for(var Si=0;Si":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},yi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Si={cw:ue,ccw:Me};function Ri(_e){return Array.isArray(_e)||Xr(_e)||nn(_e)}function Gi(_e){return _e.sort(function(kr,Ir){return kr===$u?-1:Ir===$u?1:kr=1,Dn>=2,kr)}else if(Ir===ls){var li=_e.data;return new Kn(li.thisDep,li.contextDep,li.propDep,kr)}else{if(Ir===ps)return new Kn(!1,!1,!1,kr);if(Ir===oo){for(var ti=!1,yn=!1,ai=!1,ta=0;ta<_e.data.length;++ta){var $i=_e.data[ta];if($i.type===io)ai=!0;else if($i.type===ns)yn=!0;else if($i.type===Ko)ti=!0;else if($i.type===na){ti=!0;var ya=$i.data;ya>=1&&(yn=!0),ya>=2&&(ai=!0)}else $i.type===ls&&(ti=ti||$i.data.thisDep,yn=yn||$i.data.contextDep,ai=ai||$i.data.propDep)}return new Kn(ti,yn,ai,kr)}else return new Kn(Ir===Ko,Ir===ns,Ir===io,kr)}}var Po=new Kn(!1,!1,!1,function(){});function Ro(_e,kr,Ir,Dn,li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn){var jn=$i.Record,Bi={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Bi.min=Pe,Bi.max=Ne);var Ti=Ir.angle_instanced_arrays,ei=Ir.webgl_draw_buffers,Sa=Ir.oes_vertex_array_object,ha={dirty:!0,profile:fn.profile},Va={},xi=[],ri={},Ea={};function ma(Yt){return Yt.replace(".","_")}function Ki(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Va[ir]=ha[ir]=!!Se,ri[ir]=ce}function Ji(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Array.isArray(Se)?(ha[ir]=Se.slice(),Va[ir]=Se.slice()):ha[ir]=Va[ir]=Se,Ea[ir]=ce}function ba(Yt){return!!isNaN(Yt)}Ki(qa,Nr),Ki(gs,Or),Ji(el,"blendColor",[0,0,0,0]),Ji(Pl,"blendEquationSeparate",[Jr,Jr]),Ji(su,"blendFuncSeparate",[rn,Er,rn,Er]),Ki($l,vn,!0),Ji(lu,"depthFunc",xn),Ji(ml,"depthRange",[0,1]),Ji(qu,"depthMask",!0),Ji(Iu,Iu,[!0,!0,!0,!0]),Ki(fu,wr),Ji(Oo,"cullFace",Ut),Ji(Es,Es,Me),Ji(Kl,Kl,1),Ki(Rl,Nn),Ji(vc,"polygonOffset",[0,0]),Ki(Hc,ii),Ki(Lc,Ui),Ji(Ih,"sampleCoverage",[1,!1]),Ki(Wc,en),Ji(zh,"stencilMask",-1),Ji(Du,"stencilFunc",[sr,0,-1]),Ji(Oh,"stencilOpSeparate",[At,ar,ar,ar]),Ji(rs,"stencilOpSeparate",[Ut,ar,ar,ar]),Ki(zs,In),Ji(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),Ji($u,$u,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Na,strings:kr,next:Va,current:ha,draw:$a,elements:ti,buffer:li,shader:ya,attributes:$i.state,vao:$i,uniforms:ta,framebuffer:ai,extensions:Ir,timer:ia,isBufferArgs:Ri},wo={primTypes:ci,compareFuncs:Vn,blendFuncs:Hi,blendEquations:Bi,stencilOps:yi,glTypes:Hn,orientationType:Si};ei&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var _a=0;function Fa(){var Yt=Ba({cache:Ai}),ce=Yt.link,Se=Yt.global;Yt.id=_a++,Yt.batchId="0";var ir=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(ir,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ea).forEach(function(Xe){Array.isArray(ha[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case io:return Xe.def(Ye.props,Ze.data);case ns:return Xe.def(Ye.context,Ze.data);case Ko:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case oo:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=kr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=$i.scope[Ze];Pr||(Pr=$i.scope[Ze]=new jn);var sn=Ve[Ze]=ce(Pr);return sn},Yt}function vo(Yt){var ce=Yt.static,Se=Yt.dynamic,ir;if(qf in ce){var Ye=!!ce[qf];ir=Ha(function(lr,hr){return Ye}),ir.enable=Ye}else if(qf in Se){var tr=Se[qf];ir=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}return ir}function Eo(Yt,ce){var Se=Yt.static,ir=Yt.dynamic;if($t in Se){var Ye=Se[$t];return Ye?(Ye=ai.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+un,Xe+"."+Ae),"null"})}else if($t in ir){var tr=ir[$t];return ao(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+xe),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Ae),Pr})}else return null}function es(Yt,ce,Se){var ir=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,dn,pi;return"width"in Xe?dn=Xe.width|0:Ze=!1,"height"in Xe?pi=Xe.height|0:Ze=!1,new Kn(!Ze&&ce&&ce.thisDep,!Ze&&ce&&ce.contextDep,!Ze&&ce&&ce.propDep,function(Ci,mi){var ea=Ci.shared.context,Ei=dn;"width"in Xe||(Ei=mi.def(ea,".",Fr,"-",Pr));var Li=pi;return"height"in Xe||(Li=mi.def(ea,".",un,"-",sn)),[Pr,sn,Ei,Li]})}else if(Ve in Ye){var ui=Ye[Ve],Yn=ao(ui,function(Ci,mi){var ea=Ci.invoke(mi,ui),Ei=Ci.shared.context,Li=mi.def(ea,".x|0"),la=mi.def(ea,".y|0"),to=mi.def('"width" in ',ea,"?",ea,".width|0:","(",Ei,".",Fr,"-",Li,")"),co=mi.def('"height" in ',ea,"?",ea,".height|0:","(",Ei,".",un,"-",la,")");return[Li,la,to,co]});return ce&&(Yn.thisDep=Yn.thisDep||ce.thisDep,Yn.contextDep=Yn.contextDep||ce.contextDep,Yn.propDep=Yn.propDep||ce.propDep),Yn}else return ce?new Kn(ce.thisDep,ce.contextDep,ce.propDep,function(Ci,mi){var ea=Ci.shared.context;return[0,0,mi.def(ea,".",Fr),mi.def(ea,".",un)]}):null}var lr=tr($u);if(lr){var hr=lr;lr=new Kn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:tr(qc)}}function Ul(Yt,ce){var Se=Yt.static,ir=typeof Se[ht]=="string"&&typeof Se[z]=="string";if(ir){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Li+"?"+Ze+".constant["+Li+"]:0;"}).join(""),"}}else{","if(",dn,"(",Ze,".buffer)){",Ci,"=",pi,".createStream(",Oe,",",Ze,".buffer);","}else{",Ci,"=",pi,".getBuffer(",Ze,".buffer);","}",mi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",Ci,".dtype;",ui.normalized,"=!!",Ze,".normalized;");function ea(Ei){Xe(ui[Ei],"=",Ze,".",Ei,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",ui.isStream,"){",pi,".destroyStream(",Ci,");","}"),ui}Ye[tr]=ao(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,ir={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];ir[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];ir[Ye]=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}),ir}function yc(Yt,ce,Se,ir,Ye){Yt.static,Yt.dynamic;var tr=Ul(Yt,ce),lr=Eo(Yt),hr=es(Yt,lr),Ve=hs(Yt),Xe=ku(Yt),Ze=Al(Yt,Ye,tr);function Pr(Ci){var mi=hr[Ci];mi&&(Xe[Ci]=mi)}Pr($u),Pr(ma(qc));var sn=Object.keys(Xe).length>0,dn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(dn.profile=vo(Yt),dn.uniforms=dl(Se),dn.drawVAO=dn.scopeVAO=Ve.vao,!dn.drawVAO&&Ze.program&&!tr&&Ir.angle_instanced_arrays&&Ve.static.elements){var pi=!0,ui=Ze.program.attributes.map(function(Ci){var mi=ce.static[Ci];return pi=pi&&!!mi,mi});if(pi&&ui.length>0){var Yn=$i.getVAO($i.createVAO({attributes:ui,elements:Ve.static.elements}));dn.drawVAO=new Kn(null,null,null,function(Ci,mi){return Ci.link(Yn)}),dn.useVAO=!0}}return tr?dn.useVAO=!0:dn.attributes=Cu(ce),dn.context=pc(ir),dn}function xu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;ei&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Se?Pr=Se.append(Yt,ce):Pr=ce.def(lr,".next"),ir||ce("if(",Pr,"!==",lr,".cur){"),ce("if(",Pr,"){",tr,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ei&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",zn,",null);"),ei&&ce(hr,".drawBuffersWEBGL(",Ze,");"),ce("}",lr,".cur=",Pr,";"),ir||ce("}")}function Tu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.gl,tr=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");xi.forEach(function(Ze){var Pr=ma(Ze);if(!(Pr in Se.state)){var sn,dn;if(Pr in lr){sn=lr[Pr],dn=tr[Pr];var pi=h(ha[Pr].length,function(Yn){return Xe.def(sn,"[",Yn,"]")});Xe(Yt.cond(pi.map(function(Yn,Ci){return Yn+"!=="+dn+"["+Ci+"]"}).join("||")).then(Ye,".",Ea[Pr],"(",pi,");",pi.map(function(Yn,Ci){return dn+"["+Ci+"]="+Yn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var ui=Yt.cond(sn,"!==",hr,".",Pr);Xe(ui),Pr in ri?ui(Yt.cond(sn).then(Ye,".enable(",ri[Pr],");").else(Ye,".disable(",ri[Pr],");"),hr,".",Pr,"=",sn,";"):ui(Ye,".",Ea[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Gi(Object.keys(Se)).forEach(function(Xe){var Ze=Se[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,ce);if(ri[Xe]){var sn=ri[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var dn=tr[Xe];ce(hr,".",Ea[Xe],"(",Pr,");",Pr.map(function(pi,ui){return dn+"["+ui+"]="+pi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(hr,".",Ea[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ea[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Au(Yt,ce){Ti&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,ce,Se,ir,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function dn(ea){Pr=ce.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=ce.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function pi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function ui(ea){var Ei=ce.def(hr,".profile");ce(hr,".profile=",ea,";"),ce.exit(hr,".profile=",Ei,";")}var Yn;if(Xe){if(Ua(Xe)){Xe.enable?(dn(ce),pi(ce.exit),ui("true")):ui("false");return}Yn=Xe.append(Yt,ce),ui(Yn)}else Yn=ce.def(hr,".profile");var Ci=Yt.block();dn(Ci),ce("if(",Yn,"){",Ci,"}");var mi=Yt.block();pi(mi),ce.exit("if(",Yn,"){",mi,"}")}function Lu(Yt,ce,Se,ir,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case fa:case So:case Ds:return 2;case Ta:case ds:case wl:return 3;case so:case fl:case Eu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=tr.gl,sn=ce.def(Ve,".location"),dn=ce.def(tr.attributes,"[",sn,"]"),pi=Ze.state,ui=Ze.buffer,Yn=[Ze.x,Ze.y,Ze.z,Ze.w],Ci=["buffer","normalized","offset","stride"];function mi(){ce("if(!",dn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ei=Ze.type,Li;if(Ze.size?Li=ce.def(Ze.size,"||",Xe):Li=Xe,ce("if(",dn,".type!==",Ei,"||",dn,".size!==",Li,"||",Ci.map(function(to){return dn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",Oe,",",ui,".buffer);",Pr,".vertexAttribPointer(",[sn,Li,Ei,Ze.normalized,Ze.stride,Ze.offset],");",dn,".type=",Ei,";",dn,".size=",Li,";",Ci.map(function(to){return dn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Ti){var la=Ze.divisor;ce("if(",dn,".divisor!==",la,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,la],");",dn,".divisor=",la,";}")}}function ea(){ce("if(",dn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",dn,".buffer=null;","}if(",Za.map(function(Ei,Li){return dn+"."+Ei+"!=="+Yn[Li]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Yn,");",Za.map(function(Ei,Li){return dn+"."+Ei+"="+Yn[Li]+";"}).join(""),"}")}pi===Oa?mi():pi===ka?ea():(ce("if(",pi,"===",Oa,"){"),mi(),ce("}else{"),ea(),ce("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Se.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,ce)}else{if(!Ye(Po))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new jn).forEach(function(dn){Pr[dn]=ce.def(sn,".",dn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,ce,Se,ir,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],xs=[],Il=0;Il>1)",ui],");")}function la(){Se(Yn,".drawArraysInstancedANGLE(",[sn,dn,pi,ui],");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}function Ei(){function Li(){Se(tr+".drawElements("+[sn,pi,Ci,dn+"<<(("+Ci+"-"+ca+")>>1)"]+");")}function la(){Se(tr+".drawArrays("+[sn,dn,pi]+");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}Ti&&(typeof ui!="number"||ui>=0)?typeof ui=="string"?(Se("if(",ui,">0){"),ea(),Se("}else if(",ui,"<0){"),Ei(),Se("}")):ea():Ei()}function Cs(Yt,ce,Se,ir,Ye){var tr=Fa(),lr=tr.proc("body",Ye);return Ti&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,ir),tr.compile().body}function Ml(Yt,ce,Se,ir){Au(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Lu(Yt,ce,Se,ir.attributes,function(){return!0})),xc(Yt,ce,Se,ir.uniforms,function(){return!0},!1),Co(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Au(Yt,Se),xu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),Tu(Yt,Se,ce),No(Yt,Se,ce.state),sl(Yt,Se,ce,!1,!0);var ir=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",ir,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(ir,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function $(Yt,ce,Se,ir){Yt.batchId="a1",Au(Yt,ce);function Ye(){return!0}Lu(Yt,ce,Se,ir.attributes,Ye),xc(Yt,ce,Se,ir.uniforms,Ye,!1),Co(Yt,ce,ce,Se)}function ot(Yt,ce,Se,ir){Au(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),Ze=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",Ze,"}",Xe.exit);function Pr(Ci){return Ci.contextDep&&Ye||Ci.propDep}function sn(Ci){return!Pr(Ci)}if(Se.needsContext&&xu(Yt,Ze,Se.context),Se.needsFramebuffer&&pu(Yt,Ze,Se.framebuffer),No(Yt,Ze,Se.state,Pr),Se.profile&&Pr(Se.profile)&&sl(Yt,Ze,Se,!1,!0),ir)Se.useVAO?Se.drawVAO?Pr(Se.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Lu(Yt,Xe,Se,ir.attributes,sn),Lu(Yt,Ze,Se,ir.attributes,Pr)),xc(Yt,Xe,Se,ir.uniforms,sn,!1),xc(Yt,Ze,Se,ir.uniforms,Pr,!0),Co(Yt,Xe,Ze,Se);else{var dn=Yt.global.def("{}"),pi=Se.shader.progVar.append(Yt,Ze),ui=Ze.def(pi,".id"),Yn=Ze.def(dn,"[",ui,"]");Ze(Yt.shared.gl,".useProgram(",pi,".program);","if(!",Yn,"){",Yn,"=",dn,"[",ui,"]=",Yt.link(function(Ci){return Cs($,Yt,Se,Ci,2)}),"(",pi,");}",Yn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Au(Yt,Se);var ir=!1,Ye=!0;Object.keys(ce.context).forEach(function(dn){ir=ir||ce.context[dn].propDep}),ir||(xu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?ir=lr=!0:tr.contextDep&&ir&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(ir=!0);function hr(dn){return dn.contextDep&&ir||dn.propDep}Tu(Yt,Se,ce),No(Yt,Se,ce.state,function(dn){return!hr(dn)}),(!ce.profile||!hr(ce.profile))&&sl(Yt,Se,ce,!1,"a1"),ce.contextDep=ir,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Se.def(Xe,".id"),sn=Se.def(Ze,"[",Pr,"]");Se(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(dn){return Cs(ot,Yt,ce,dn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Gi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function(Ze,Pr){ba(Ze)?Se.set(Yt.next[hr],"["+Pr+"]",Ze):Se.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Se.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(ir.next,"."+hr,Xe)}),sl(Yt,Se,ce,!0,!0),[Et,ke,Ht,Fe,zt].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.draw,"."+hr,Xe):Se.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ba(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(ir.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new jn).forEach(function(Ze){Se.set(Xe,"."+Ze,Ve[Ze])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);ba(tr)?Se.set(ir.vao,".targetVAO",tr):Se.set(ir.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.shader,"."+hr,Xe):Se.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Co){var Cs=ba[Co];Cs&&Cs(ia,null,0)}Ir.flush(),$i&&$i.update()}function Eo(){!Fa&&ba.length>0&&(Fa=x.next(vo))}function es(){Fa&&(x.cancel(vo),Fa=null)}function Ul(Co){Co.preventDefault(),es(),Io.forEach(function(Cs){Cs()})}function Al(Co){Ir.getError(),li.restore(),ha.restore(),Bi.restore(),Va.restore(),xi.restore(),ri.restore(),ei.restore(),$i&&$i.restore(),Ea.procs.refresh(),Eo(),wo.forEach(function(Cs){Cs()})}Ji&&(Ji.addEventListener(nl,Ul,!1),Ji.addEventListener(uu,Al,!1));function hs(){ba.length=0,es(),Ji&&(Ji.removeEventListener(nl,Ul),Ji.removeEventListener(uu,Al)),ha.clear(),ri.clear(),xi.clear(),ei.clear(),Va.clear(),Ti.clear(),Bi.clear(),$i&&$i.clear(),_a.forEach(function(Co){Co()})}function ku(Co){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var Ze=0;Ze0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=ri.setFBO=ku({framebuffer:f.define.call(null,Xl,"framebuffer")});function Cu(Co,Cs){var Ml=0;Ea.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Co.framebuffer.faces[Cs]},Co),Cu);else dl(Co,Cu);else Cu(null,Co)}function yc(Co){ba.push(Co);function Cs(){var Ml=ru(ba,Co);function yl(){var $=ru(ba,yl);ba[$]=ba[ba.length-1],ba.length-=1,ba.length<=0&&es()}ba[Ml]=yl}return Eo(),{cancel:Cs}}function xu(){var Co=Ki.viewport,Cs=Ki.scissor_box;Co[0]=Co[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Co[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Co[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=No(),xu(),Ea.procs.poll()}function Tu(){Va.refresh(),xu(),Ea.procs.refresh(),$i&&$i.update()}function No(){return(y()-ya)/1e3}Tu();function Au(Co,Cs){var Ml;switch(Co){case"frame":return yc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=_a;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:ma,destroy:hs,_gl:Ir,_refresh:Tu,poll:function(){pu(),$i&&$i.update()},now:No,stats:yn,getCachedCode:sl,preloadCachedCode:Lu});return kr.onDone(null,xc),xc}return wh})}),gT=Dt((Q,Z)=>{var c=xS(),g=NH();Z.exports=function(I,S,t){var e=I._fullLayout,r=!0;return e._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!e._has("parcoords"))){try{a.regl=g({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:I._context.plotGlPixelRatio||window.devicePixelRatio,extensions:S||[],cachedCode:t||{}})}catch{r=!1}a.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(n){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),r||c({container:e._glcontainer.node()}),r}}),uE=Dt((f,Z)=>{var c=US(),g=QS(),I=wH(),S=BH(),t=kn(),e=v0().selectMode,r=gT(),a=Tc(),n=ja(),o=BS().styleTextSelection,i={};function l(x,y,v,T){var u=x._size,b=x.width*T,_=x.height*T,P=u.l*T,M=u.b*T,C=u.r*T,A=u.t*T,h=u.w*T,p=u.h*T;return[P+y.domain[0]*h,M+v.domain[0]*p,b-C-(1-y.domain[1])*h,_-A-(1-v.domain[1])*p]}var f=Z.exports=function(x,y,v){if(v.length){var T=x._fullLayout,u=y._scene,b=y.xaxis,_=y.yaxis,P,M;if(u){var C=r(x,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!C){u.init();return}var A=u.count,h=T._glcanvas.data()[0].regl;if(n(x,y,v),u.dirty){if((u.line2d||u.error2d)&&!(u.scatter2d||u.fill2d||u.glText)&&h.clear({color:!0,depth:!0}),u.error2d===!0&&(u.error2d=I(h)),u.line2d===!0&&(u.line2d=g(h)),u.scatter2d===!0&&(u.scatter2d=c(h)),u.fill2d===!0&&(u.fill2d=g(h)),u.glText===!0)for(u.glText=new Array(A),P=0;Pu.glText.length){var p=A-u.glText.length;for(P=0;Pft&&(isNaN(Y[ut])||isNaN(Y[ut+1]));)ut-=2;it.positions=Y.slice(ft,ut+2)}return it}),u.line2d.update(u.lineOptions)),u.error2d){var R=(u.errorXOptions||[]).concat(u.errorYOptions||[]);u.error2d.update(R)}u.scatter2d&&u.scatter2d.update(u.markerOptions),u.fillOrder=t.repeat(null,A),u.fill2d&&(u.fillOptions=u.fillOptions.map(function(it,Y){var ft=v[Y];if(!(!it||!ft||!ft[0]||!ft[0].trace)){var ut=ft[0],kt=ut.trace,It=ut.t,Pt=u.lineOptions[Y],qt,Wt,Jt=[];kt._ownfill&&Jt.push(Y),kt._nexttrace&&Jt.push(Y+1),Jt.length&&(u.fillOrder[Y]=Jt);var ge=[],fe=Pt&&Pt.positions||It.positions,pe,se;if(kt.fill==="tozeroy"){for(pe=0;pepe&&isNaN(fe[se+1]);)se-=2;fe[pe+1]!==0&&(ge=[fe[pe],0]),ge=ge.concat(fe.slice(pe,se+2)),fe[se+1]!==0&&(ge=ge.concat([fe[se],0]))}else if(kt.fill==="tozerox"){for(pe=0;pepe&&isNaN(fe[se]);)se-=2;fe[pe]!==0&&(ge=[0,fe[pe+1]]),ge=ge.concat(fe.slice(pe,se+2)),fe[se]!==0&&(ge=ge.concat([0,fe[se+1]]))}else if(kt.fill==="toself"||kt.fill==="tonext"){for(ge=[],qt=0,it.splitNull=!0,Wt=0;Wt-1;for(P=0;P{var c=_V();c.plot=uE(),Z.exports=c}),UH=Dt((Q,Z)=>{Z.exports=jH()}),cE=Dt((Q,Z)=>{var c=ef(),g=kc(),I=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=T3(),r=ic().idRegex,a=mu().templatedArray,n=Ia().extendFlat,o=c.marker,i=o.line,l=n(g("marker.line",{editTypeOverride:"calc"}),{width:n({},i.width,{editType:"calc"}),editType:"calc"}),f=n(g("marker"),{symbol:o.symbol,angle:o.angle,size:n({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:l,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function x(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[y],editType:"plot"}}}Z.exports={dimensions:a("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:n({},e.text,{}),hovertext:n({},e.hovertext,{}),hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),marker:f,xaxes:x("x"),yaxes:x("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:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}),vT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){S||(S=1/0);var t,e;for(t=0;t{var c=kn(),g=Ad(),I=cE(),S=Tc(),t=s0(),e=vT(),r=cT().isOpenSymbol;Z.exports=function(o,i,l,f){function x(M,C){return c.coerce(o,i,I,M,C)}var y=g(o,i,{name:"dimensions",handleItemDefaults:a}),v=x("diagonal.visible"),T=x("showupperhalf"),u=x("showlowerhalf"),b=e(i,y,"values");if(!b||!v&&!T&&!u){i.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("xhoverformat"),x("yhoverformat"),t(o,i,l,f,x,{noAngleRef:!0,noStandOff:!0});var _=r(i.marker.symbol),P=S.isBubble(i);x("marker.line.width",_||P?1:0),n(o,i,f,x),c.coerceSelectionMarkerOpacity(i,x)};function a(o,i){function l(x,y){return c.coerce(o,i,I.dimensions,x,y)}l("label");var f=l("values");f&&f.length?l("visible"):i.visible=!1,l("axis.type"),l("axis.matches")}function n(o,i,l,f){var x=i.dimensions,y=x.length,v=i.showupperhalf,T=i.showlowerhalf,u=i.diagonal.visible,b,_,P=new Array(y),M=new Array(y);for(b=0;b_&&v||b<_&&T||b===_&&(u||!T||!v))&&(l._splomSubplots[q]=1)}(!T||!u&&v&&T)&&(l._splomGridDflt.xside="bottom",l._splomGridDflt.yside="left")}}),HH=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g._fullLayout,t=I.uid,e=S._splomScenes;e||(e=S._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=e[I.uid];return n||(n=e[t]=c.extendFlat({},r,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||c.extendFlat(n,r),n}}),WH=Dt((Q,Z)=>{var c=kn(),g=Rc(),I=me().calcMarkerSize,S=me().calcAxisExpansion,t=F0(),e=_x().markerSelection,r=_x().markerStyle,a=HH(),n=Ca().BADNUM,o=q1().TOO_MANY_POINTS;Z.exports=function(i,l){var f=l.dimensions,x=l._length,y={},v=y.cdata=[],T=y.data=[],u=l._visibleDims=[],b,_,P,M,C;function A(R,O){for(var j=R.makeCalcdata({v:O.values,vcalendar:l.calendar},"v"),V=0;Vo,k;for(p?k=y.sizeAvg||Math.max(y.size,3):k=I(l,x),_=0;_{(function(){var c,g,I,S,t,e;typeof performance<"u"&&performance!==null&&performance.now?Z.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Z.exports=function(){return(c()-t)/1e6},g=process.hrtime,c=function(){var r;return r=g(),r[0]*1e9+r[1]},S=c(),e=process.uptime()*1e9,t=S-e):Date.now?(Z.exports=function(){return Date.now()-I},I=Date.now()):(Z.exports=function(){return new Date().getTime()-I},I=new Date().getTime())}).call(Q)}),$H=Dt((Q,Z)=>{var c=qH(),g=window,I=["moz","webkit"],S="AnimationFrame",t=g["request"+S],e=g["cancel"+S]||g["cancelRequest"+S];for(r=0;!t&&r{Z.exports=function(c,g){var I=typeof c=="number",S=typeof g=="number";I&&!S?(g=c,c=0):!I&&!S&&(c=0,g=0),c=c|0,g=g|0;var t=g-c;if(t<0)throw new Error("array length must be positive");for(var e=new Array(t),r=0,a=c;r{var c=US(),g=Ig(),I=yx(),S=$H(),t=ZH(),e=vb(),r=xx();Z.exports=a;function a(l,f){if(!(this instanceof a))return new a(l);this.traces=[],this.passes={},this.regl=l,this.scatter=c(l),this.canvas=this.scatter.canvas}a.prototype.render=function(...l){return l.length&&this.update(...l),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=S(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...l){if(!l.length)return;for(let y=0;yw||!v.lower&&k{f[T+b]=y})}this.scatter.draw(...f)}return this},a.prototype.destroy=function(){return this.traces.forEach(l=>{l.buffer&&l.buffer.destroy&&l.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(l,f,x){let y=l.id!=null?l.id:l,v=f,T=x;return y<<16|(v&255)<<8|T&255}function o(l,f,x){let y,v,T,u,b=l[f],_=l[x];return b.length>2?(b[0],b[2],y=b[1],v=b[3]):b.length?(y=b[0],v=b[1]):(b.x,y=b.y,b.x+b.width,v=b.y+b.height),_.length>2?(T=_[0],u=_[2],_[1],_[3]):_.length?(T=_[0],u=_[1]):(T=_.x,_.y,u=_.x+_.width,_.y+_.height),[T,y,u,v]}function i(l){if(typeof l=="number")return[l,l,l,l];if(l.length===2)return[l[0],l[1],l[0],l[1]];{let f=e(l);return[f.x,f.y,f.x+f.width,f.y+f.height]}}}),YH=Dt((Q,Z)=>{var c=GH(),g=kn(),I=Rc(),S=v0().selectMode;Z.exports=function(e,r,a){if(a.length)for(var n=0;n-1,H=S(v)||!!o.selectedpoints||V,F=!0;if(H){var U=o._length;if(o.selectedpoints){l.selectBatch=o.selectedpoints;var W=o.selectedpoints,q={};for(b=0;b{Q.getDimIndex=function(Z,c){for(var g=c._id,I=g.charAt(0),S={x:0,y:1}[I],t=Z._visibleDims,e=0;e{var c=hE(),g=uT().calcHover,I=Ls().getFromId,S=Ia().extendFlat;function t(r,a,n,o,i){i||(i={});var l=(o||"").charAt(0)==="x",f=(o||"").charAt(0)==="y",x=e(r,a,n);if((l||f)&&i.hoversubplots==="axis"&&x[0])for(var y=(l?r.xa:r.ya)._subplotsWith,v=i.gd,T=S({},r),u=0;u{var c=kn(),g=c.pushUnique,I=Tc(),S=hE();Z.exports=function(t,e){var r=t.cd,a=r[0].trace,n=r[0].t,o=t.scene,i=o.matrixOptions.cdata,l=t.xaxis,f=t.yaxis,x=[];if(!o)return x;var y=!I.hasMarkers(a)&&!I.hasText(a);if(a.visible!==!0||y)return x;var v=S.getDimIndex(a,l),T=S.getDimIndex(a,f);if(v===!1||T===!1)return x;var u=n.xpx[v],b=n.ypx[T],_=i[v],P=i[T],M=(t.scene.selectBatch||[]).slice(),C=[];if(e!==!1&&!e.degenerate)for(var A=0;A<_.length;A++)e.contains([u[A],b[A]],null,A,t)?(x.push({pointNumber:A,x:_[A],y:P[A]}),g(M,A)):M.indexOf(A)!==-1?g(M,A):C.push(A);var h=o.matrixOptions;return!M.length&&!C.length?o.matrix.update(h,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,c.extendFlat({},h,o.selectedOptions,o.viewOpts)),o.selectBatch=M,o.unselectBatch=C,x}}),JH=Dt((Q,Z)=>{var c=kn(),g=F0(),I=_x().markerStyle;Z.exports=function(S,t){var e=t.trace,r=S._fullLayout._splomScenes[e.uid];if(r){g(S,e),c.extendFlat(r.matrixOptions,I(S,e));var a=c.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(a,null)}}}),QH=Dt((Q,Z)=>{var c=Jo(),g=HM();Z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:cE(),supplyDefaults:VH(),colorbar:xo(),calc:WH(),plot:YH(),hoverPoints:KH().hoverPoints,selectPoints:XH(),editStyle:JH(),meta:{}},c.register(g)}),tW=Dt((Q,Z)=>{var c=QS(),g=Jo(),I=gT(),S=ud().getModuleCalcData,t=Mf(),e=Rc().getFromId,r=Ls().shouldShowZeroLine,a="splom",n={};function o(v){var T=v._fullLayout,u=g.getModule(a),b=S(v.calcdata,u)[0],_=I(v,["ANGLE_instanced_arrays","OES_element_index_uint"],n);_&&(T._hasOnlyLargeSploms&&f(v),u.plot(v,{},b))}function i(v){var T=v.calcdata,u=v._fullLayout;u._hasOnlyLargeSploms&&f(v);for(var b=0;b{var c=QH();c.basePlotModule=tW(),Z.exports=c}),rW=Dt((Q,Z)=>{Z.exports=eW()}),fE=Dt((Q,Z)=>{var c=kc(),g=Td(),I=da(),S=jh().attributes,t=Ia().extendFlat,e=mu().templatedArray;Z.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:I({editType:"plot"}),tickfont:I({autoShadowDflt:!0,editType:"plot"}),rangefont:I({editType:"plot"}),dimensions:e("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},g.tickvals,{editType:"plot"}),ticktext:t({},g.ticktext,{editType:"plot"}),tickformat:t({},g.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:t({editType:"calc"},c("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"}}}),E3=Dt((Q,Z)=>{Z.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"}}}),zg=Dt((Q,Z)=>{var c=w1();function g(I){return[I]}Z.exports={keyFun:function(I){return I.key},repeat:g,descend:c,wrap:g,unwrap:function(I){return I[0]}}}),dE=Dt((Q,Z)=>{var c=E3(),g=qr(),I=zg().keyFun,S=zg().repeat,t=kn().sorterAsc,e=kn().strTranslate,r=c.bar.snapRatio;function a(q,J){return q*(1-r)+J*r}var n=c.bar.snapClose;function o(q,J){return q*(1-n)+J*n}function i(q,J,lt,yt){if(l(lt,yt))return lt;var mt=q?-1:1,st=0,tt=J.length-1;if(mt<0){var dt=st;st=tt,tt=dt}for(var rt=J[st],at=rt,vt=st;mt*vt=J[lt][0]&&q<=J[lt][1])return!0;return!1}function f(q){q.attr("x",-c.bar.captureWidth/2).attr("width",c.bar.captureWidth)}function x(q){q.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(q){if(!q.brush.filterSpecified)return"0,"+q.height;for(var J=v(q.brush.filter.getConsolidated(),q.height),lt=[0],yt,mt,st,tt=J.length?J[0][0]:null,dt=0;dtq[1]+lt||J=.9*q[1]+.1*q[0]?"n":J<=.9*q[0]+.1*q[1]?"s":"ns"}function u(){g.select(document.body).style("cursor",null)}function b(q){q.attr("stroke-dasharray",y)}function _(q,J){var lt=g.select(q).selectAll(".highlight, .highlight-shadow"),yt=J?lt.transition().duration(c.bar.snapDuration).each("end",J):lt;b(yt)}function P(q,J){var lt=q.brush,yt=lt.filterSpecified,mt=NaN,st={},tt;if(yt){var dt=q.height,rt=lt.filter.getConsolidated(),at=v(rt,dt),vt=NaN,it=NaN,Y=NaN;for(tt=0;tt<=at.length;tt++){var ft=at[tt];if(ft&&ft[0]<=J&&J<=ft[1]){vt=tt;break}else if(it=tt?tt-1:NaN,ft&&ft[0]>J){Y=tt;break}}if(mt=vt,isNaN(mt)&&(isNaN(it)||isNaN(Y)?mt=isNaN(it)?Y:it:mt=J-at[it][1]=qt[0]&&Pt<=qt[1]){st.clickableOrdinalRange=qt;break}}}return st}function M(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.unitToPaddedPx.invert(lt),mt=J.brush,st=P(J,lt),tt=st.interval,dt=mt.svgBrush;if(dt.wasDragged=!1,dt.grabbingBar=st.region==="ns",dt.grabbingBar){var rt=tt.map(J.unitToPaddedPx);dt.grabPoint=lt-rt[0]-c.verticalPadding,dt.barLength=rt[1]-rt[0]}dt.clickableOrdinalRange=st.clickableOrdinalRange,dt.stayingIntervals=J.multiselect&&mt.filterSpecified?mt.filter.getConsolidated():[],tt&&(dt.stayingIntervals=dt.stayingIntervals.filter(function(at){return at[0]!==tt[0]&&at[1]!==tt[1]})),dt.startExtent=st.region?tt[st.region==="s"?1:0]:yt,J.parent.inBrushDrag=!0,dt.brushStartCallback()}function C(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.brush.svgBrush;yt.wasDragged=!0,yt._dragging=!0,yt.grabbingBar?yt.newExtent=[lt-yt.grabPoint,lt+yt.barLength-yt.grabPoint].map(J.unitToPaddedPx.invert):yt.newExtent=[yt.startExtent,J.unitToPaddedPx.invert(lt)].sort(t),J.brush.filterSpecified=!0,yt.extent=yt.stayingIntervals.concat([yt.newExtent]),yt.brushCallback(J),_(q.parentNode)}function A(q,J){var lt=J.brush,yt=lt.filter,mt=lt.svgBrush;mt._dragging||(h(q,J),C(q,J),J.brush.svgBrush.wasDragged=!1),mt._dragging=!1;var st=g.event;st.sourceEvent.stopPropagation();var tt=mt.grabbingBar;if(mt.grabbingBar=!1,mt.grabLocation=void 0,J.parent.inBrushDrag=!1,u(),!mt.wasDragged){mt.wasDragged=void 0,mt.clickableOrdinalRange?lt.filterSpecified&&J.multiselect?mt.extent.push(mt.clickableOrdinalRange):(mt.extent=[mt.clickableOrdinalRange],lt.filterSpecified=!0):tt?(mt.extent=mt.stayingIntervals,mt.extent.length===0&&j(lt)):j(lt),mt.brushCallback(J),_(q.parentNode),mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[]);return}var dt=function(){yt.set(yt.getConsolidated())};if(J.ordinal){var rt=J.unitTickvals;rt[rt.length-1]mt.newExtent[0];mt.extent=mt.stayingIntervals.concat(at?[mt.newExtent]:[]),mt.extent.length||j(lt),mt.brushCallback(J),at?_(q.parentNode,dt):(dt(),_(q.parentNode))}else dt();mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[])}function h(q,J){var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=P(J,lt),mt="crosshair";yt.clickableOrdinalRange?mt="pointer":yt.region&&(mt=yt.region+"-resize"),g.select(document.body).style("cursor",mt)}function p(q){q.on("mousemove",function(J){g.event.preventDefault(),J.parent.inBrushDrag||h(this,J)}).on("mouseleave",function(J){J.parent.inBrushDrag||u()}).call(g.behavior.drag().on("dragstart",function(J){M(this,J)}).on("drag",function(J){C(this,J)}).on("dragend",function(J){A(this,J)}))}function k(q,J){return q[0]-J[0]}function w(q,J,lt){var yt=lt._context.staticPlot,mt=q.selectAll(".background").data(S);mt.enter().append("rect").classed("background",!0).call(f).call(x).style("pointer-events",yt?"none":"auto").attr("transform",e(0,c.verticalPadding)),mt.call(p).attr("height",function(dt){return dt.height-c.verticalPadding});var st=q.selectAll(".highlight-shadow").data(S);st.enter().append("line").classed("highlight-shadow",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width+c.bar.strokeWidth).attr("stroke",J).attr("opacity",c.bar.strokeOpacity).attr("stroke-linecap","butt"),st.attr("y1",function(dt){return dt.height}).call(b);var tt=q.selectAll(".highlight").data(S);tt.enter().append("line").classed("highlight",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width-c.bar.strokeWidth).attr("stroke",c.bar.fillColor).attr("opacity",c.bar.fillOpacity).attr("stroke-linecap","butt"),tt.attr("y1",function(dt){return dt.height}).call(b)}function R(q,J,lt){var yt=q.selectAll("."+c.cn.axisBrush).data(S,I);yt.enter().append("g").classed(c.cn.axisBrush,!0),w(yt,J,lt)}function O(q){return q.svgBrush.extent.map(function(J){return J.slice()})}function j(q){q.filterSpecified=!1,q.svgBrush.extent=[[-1/0,1/0]]}function V(q){return function(J){var lt=J.brush,yt=O(lt),mt=yt.slice();lt.filter.set(mt),q()}}function H(q){for(var J=q.slice(),lt=[],yt,mt=J.shift();mt;){for(yt=mt.slice();(mt=J.shift())&&mt[0]<=yt[1];)yt[1]=Math.max(yt[1],mt[1]);lt.push(yt)}return lt.length===1&<[0][0]>lt[0][1]&&(lt=[]),lt}function F(){var q=[],J,lt;return{set:function(yt){q=yt.map(function(mt){return mt.slice().sort(t)}).sort(k),q.length===1&&q[0][0]===-1/0&&q[0][1]===1/0&&(q=[[0,-1]]),J=H(q),lt=q.reduce(function(mt,st){return[Math.min(mt[0],st[0]),Math.max(mt[1],st[1])]},[1/0,-1/0])},get:function(){return q.slice()},getConsolidated:function(){return J},getBounds:function(){return lt}}}function U(q,J,lt,yt,mt,st){var tt=F();return tt.set(lt),{filter:tt,filterSpecified:J,svgBrush:{extent:[],brushStartCallback:yt,brushCallback:V(mt),brushEndCallback:st}}}function W(q,J){if(Array.isArray(q[0])?(q=q.map(function(yt){return yt.sort(t)}),J.multiselect?q=H(q.sort(k)):q=[q[0]]):q=[q.sort(t)],J.tickvals){var lt=J.tickvals.slice().sort(t);if(q=q.map(function(yt){var mt=[i(0,lt,yt[0],[]),i(1,lt,yt[1],[])];if(mt[1]>mt[0])return mt}).filter(function(yt){return yt}),!q.length)return}return q.length>1?q:q[0]}Z.exports={makeBrush:U,ensureAxisBrush:R,cleanRanges:W}}),nW=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=jh().defaults,t=Ad(),e=Ls(),r=fE(),a=dE(),n=E3().maxDimensionCount,o=vT();function i(f,x,y,v,T){var u=T("line.color",y);if(g(f,"line")&&c.isArrayOrTypedArray(u)){if(u.length)return T("line.colorscale"),I(f,x,v,T,{prefix:"line.",cLetter:"c"}),u.length;x.line.color=y}return 1/0}function l(f,x,y,v){function T(M,C){return c.coerce(f,x,r.dimensions,M,C)}var u=T("values"),b=T("visible");if(u&&u.length||(b=x.visible=!1),b){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var _=T("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:_},e.setConvert(x._ax,v.layout),T("multiselect");var P=T("constraintrange");P&&(x.constraintrange=a.cleanRanges(P,x))}}Z.exports=function(f,x,y,v){function T(M,C){return c.coerce(f,x,r,M,C)}var u=f.dimensions;Array.isArray(u)&&u.length>n&&(c.log("parcoords traces support up to "+n+" dimensions at the moment"),u.splice(n));var b=t(f,x,{name:"dimensions",layout:v,handleItemDefaults:l}),_=i(f,x,y,v,T);S(x,v,T),(!Array.isArray(b)||!b.length)&&(x.visible=!1),o(x,b,"values",_);var P=c.extendFlat({},v.font,{size:Math.round(v.font.size/1.2)});c.coerceFont(T,"labelfont",P),c.coerceFont(T,"tickfont",P,{autoShadowDflt:!0}),c.coerceFont(T,"rangefont",P),T("labelangle"),T("labelside"),T("unselected.line.color"),T("unselected.line.opacity")}}),iW=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Xc(),I=zg().wrap;Z.exports=function(t,e){var r,a;return g.hasColorscale(e,"line")&&c(e.line.color)?(r=e.line.color,a=g.extractOpts(e.line).colorscale,g.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(e._length),a=[[0,e.line.color],[1,e.line.color]]),I({lineColor:r,cscale:a})};function S(t){for(var e=new Array(t),r=0;r>>16,(Q&65280)>>>8,Q&255],alpha:1};if(typeof Q=="number")return{space:"rgb",values:[Q>>>16,(Q&65280)>>>8,Q&255],alpha:1};if(Q=String(Q).toLowerCase(),yT.default[Q])I=yT.default[Q].slice(),t="rgb";else if(Q==="transparent")S=0,t="rgb",I=[0,0,0];else if(Q[0]==="#"){var e=Q.slice(1),r=e.length,a=r<=4;S=1,a?(I=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],r===4&&(S=parseInt(e[3]+e[3],16)/255)):(I=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],r===8&&(S=parseInt(e[6]+e[7],16)/255)),I[0]||(I[0]=0),I[1]||(I[1]=0),I[2]||(I[2]=0),t="rgb"}else if(g=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Q)){var n=g[1];t=n.replace(/a$/,"");var o=t==="cmyk"?4:t==="gray"?1:3;I=g[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=I.shift()),I=I.map(function(i,l){if(i[i.length-1]==="%")return i=parseFloat(i)/100,l===3?i:t==="rgb"?i*255:t[0]==="h"||t[0]==="l"&&!l?i*100:t==="lab"?i*125:t==="lch"?l<2?i*150:i*360:t[0]==="o"&&!l?i:t==="oklab"?i*.4:t==="oklch"?l<2?i*.4:i*360:i;if(t[l]==="h"||l===2&&t[t.length-1]==="h"){if(xT[i]!==void 0)return xT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=I.length>o?I.pop():1}else/[0-9](?:\s|\/|,)/.test(Q)&&(I=Q.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),t=((c=(Z=Q.match(/([a-z])/ig))==null?void 0:Z.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:t,values:I,alpha:S}}var yT,pE,xT,oW=mn(()=>{yT=Bn(gS()),pE=aW,xT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}),C3,mE=mn(()=>{C3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}),L3,sW=mn(()=>{mE(),L3={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Q){var Z=Q[0]/360,c=Q[1]/100,g=Q[2]/100,I,S,t,e,r,a=0;if(c===0)return r=g*255,[r,r,r];for(S=g<.5?g*(1+c):g+c-g*c,I=2*g-S,e=[0,0,0];a<3;)t=Z+1/3*-(a-1),t<0?t++:t>1&&t--,r=6*t<1?I+(S-I)*6*t:2*t<1?S:3*t<2?I+(S-I)*(2/3-t)*6:I,e[a++]=r*255;return e}},C3.hsl=function(Q){var Z=Q[0]/255,c=Q[1]/255,g=Q[2]/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=S-I,e,r,a;return S===I?e=0:Z===S?e=(c-g)/t:c===S?e=2+(g-Z)/t:g===S&&(e=4+(Z-c)/t),e=Math.min(e*60,360),e<0&&(e+=360),a=(I+S)/2,S===I?r=0:a<=.5?r=t/(S+I):r=t/(2-S-I),[e,r*100,a*100]}}),gE={};cn(gE,{default:()=>lW});function lW(Q){Array.isArray(Q)&&Q.raw&&(Q=String.raw(...arguments)),Q instanceof Number&&(Q=+Q);var Z,c=pE(Q);if(!c.space)return[];let g=c.space[0]==="h"?L3.min:C3.min,I=c.space[0]==="h"?L3.max:C3.max;return Z=Array(3),Z[0]=Math.min(Math.max(c.values[0],g[0]),I[0]),Z[1]=Math.min(Math.max(c.values[1],g[1]),I[1]),Z[2]=Math.min(Math.max(c.values[2],g[2]),I[2]),c.space[0]==="h"&&(Z=L3.rgb(Z)),Z.push(Math.min(Math.max(c.alpha,0),1)),Z}var uW=mn(()=>{oW(),mE(),sW()}),vE=Dt(Q=>{var Z=kn().isTypedArray;Q.convertTypedArray=function(c){return Z(c)?Array.prototype.slice.call(c):c},Q.isOrdinal=function(c){return!!c.tickvals},Q.isVisible=function(c){return c.visible||!("visible"in c)}}),cW=Dt((Q,Z)=>{var c=["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(` +`),Un;if(Tr&&(Un=gc(dn),Tr[Un]))return Tr[Un].apply(null,hi);var Ui=Function.apply(null,Fn.concat(dn));return Tr&&(Tr[Un]=Ui),Ui.apply(null,hi)}return{global:_a,link:yn,block:li,proc:Na,scope:ta,cond:Gi,compile:ia}}var Ga="xyzw".split(""),fa=5121,Oa=1,Aa=2,na=0,ao=1,is=2,Xo=3,ls=4,ps=5,so=6,$a="dither",gs="blend.enable",el="blend.color",Il="blend.equation",su="blend.func",$l="depth.enable",lu="depth.func",ml="depth.range",qu="depth.mask",zu="colorMask",fu="cull.enable",Oo="cull.face",Es="frontFace",Kl="lineWidth",Rl="polygonOffset.enable",vc="polygonOffset.offset",Hc="sample.alpha",Pc="sample.enable",zh="sample.coverage",Wc="stencil.enable",Oh="stencil.mask",Fu="stencil.func",Dh="stencil.opFront",ns="stencil.opBack",zs="scissor.enable",qc="scissor.box",$u="viewport",Zf="profile",$t="framebuffer",z="vert",ht="frag",Et="elements",Ot="primitive",Ht="count",Te="offset",Fe="instances",Ke="vao",vr="Width",Dr="Height",Fr=$t+vr,un=$t+Dr,Sn=$u+vr,Xt=$u+Dr,ae="drawingBuffer",_e=ae+vr,Me=ae+Dr,je=[su,Il,Fu,Dh,ns,zh,$u,qc,vc],De=34962,$e=34963,wr=2884,Or=3042,Nr=3024,en=2960,vn=2929,In=3089,jn=32823,si=32926,Wi=32928,ga=5126,pa=35664,Ma=35665,lo=35666,No=5124,So=35667,ds=35668,fl=35669,vl=35670,Ds=35671,wl=35672,Lu=35673,gu=35674,$s=35675,Zs=35676,Yu=35678,dc=35680,$c=4,At=1028,Ut=1029,ue=2304,Se=2305,Pe=32775,Ne=32776,sr=519,ar=7680,Er=0,rn=1,Jr=32774,xn=513,zn=36160,On=36064,$i={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},Vn={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},bi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pi={cw:ue,ccw:Se};function ji(be){return Array.isArray(be)||Xr(be)||nn(be)}function Ki(be){return be.sort(function(Tr,Ir){return Tr===$u?-1:Ir===$u?1:Tr=1,Fn>=2,Tr)}else if(Ir===ls){var hi=be.data;return new Jn(hi.thisDep,hi.contextDep,hi.propDep,Tr)}else{if(Ir===ps)return new Jn(!1,!1,!1,Tr);if(Ir===so){for(var ni=!1,yn=!1,li=!1,ta=0;ta=1&&(yn=!0),_a>=2&&(li=!0)}else Gi.type===ls&&(ni=ni||Gi.data.thisDep,yn=yn||Gi.data.contextDep,li=li||Gi.data.propDep)}return new Jn(ni,yn,li,Tr)}else return new Jn(Ir===Xo,Ir===is,Ir===ao,Tr)}}var Io=new Jn(!1,!1,!1,function(){});function Ro(be,Tr,Ir,Fn,hi,ni,yn,li,ta,Gi,_a,Za,Na,ia,Ei,dn){var Un=Gi.Record,Ui={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Ui.min=Pe,Ui.max=Ne);var Si=Ir.angle_instanced_arrays,ai=Ir.webgl_draw_buffers,Ea=Ir.oes_vertex_array_object,da={dirty:!0,profile:dn.profile},Va={},ki=[],oi={},Ca={};function va(Yt){return Yt.replace(".","_")}function Xi(Yt,he,Ee){var ir=va(Yt);ki.push(Yt),Va[ir]=da[ir]=!!Ee,oi[ir]=he}function Qi(Yt,he,Ee){var ir=va(Yt);ki.push(Yt),Array.isArray(Ee)?(da[ir]=Ee.slice(),Va[ir]=Ee.slice()):da[ir]=Va[ir]=Ee,Ca[ir]=he}function ka(Yt){return!!isNaN(Yt)}Xi($a,Nr),Xi(gs,Or),Qi(el,"blendColor",[0,0,0,0]),Qi(Il,"blendEquationSeparate",[Jr,Jr]),Qi(su,"blendFuncSeparate",[rn,Er,rn,Er]),Xi($l,vn,!0),Qi(lu,"depthFunc",xn),Qi(ml,"depthRange",[0,1]),Qi(qu,"depthMask",!0),Qi(zu,zu,[!0,!0,!0,!0]),Xi(fu,wr),Qi(Oo,"cullFace",Ut),Qi(Es,Es,Se),Qi(Kl,Kl,1),Xi(Rl,jn),Qi(vc,"polygonOffset",[0,0]),Xi(Hc,si),Xi(Pc,Wi),Qi(zh,"sampleCoverage",[1,!1]),Xi(Wc,en),Qi(Oh,"stencilMask",-1),Qi(Fu,"stencilFunc",[sr,0,-1]),Qi(Dh,"stencilOpSeparate",[At,ar,ar,ar]),Qi(ns,"stencilOpSeparate",[Ut,ar,ar,ar]),Xi(zs,In),Qi(qc,"scissor",[0,0,be.drawingBufferWidth,be.drawingBufferHeight]),Qi($u,$u,[0,0,be.drawingBufferWidth,be.drawingBufferHeight]);var zo={gl:be,context:Na,strings:Tr,next:Va,current:da,draw:Za,elements:ni,buffer:hi,shader:_a,attributes:Gi.state,vao:Gi,uniforms:ta,framebuffer:li,extensions:Ir,timer:ia,isBufferArgs:ji},wo={primTypes:di,compareFuncs:Vn,blendFuncs:$i,blendEquations:Ui,stencilOps:bi,glTypes:Wn,orientationType:Pi};ai&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Fn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(he){return On+he})}));var wa=0;function Fa(){var Yt=Ra({cache:Ei}),he=Yt.link,Ee=Yt.global;Yt.id=wa++,Yt.batchId="0";var ir=he(zo),Ye=Yt.shared={props:"a0"};Object.keys(zo).forEach(function(Xe){Ye[Xe]=Ee.def(ir,".",Xe)});var er=Yt.next={},lr=Yt.current={};Object.keys(Ca).forEach(function(Xe){Array.isArray(da[Xe])&&(er[Xe]=Ee.def(Ye.next,".",Xe),lr[Xe]=Ee.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Ee.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(he(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case ao:return Xe.def(Ye.props,Ze.data);case is:return Xe.def(Ye.context,Ze.data);case Xo:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case so:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=Tr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=Gi.scope[Ze];Pr||(Pr=Gi.scope[Ze]=new Un);var sn=Ve[Ze]=he(Pr);return sn},Yt}function vo(Yt){var he=Yt.static,Ee=Yt.dynamic,ir;if(Zf in he){var Ye=!!he[Zf];ir=Wa(function(lr,hr){return Ye}),ir.enable=Ye}else if(Zf in Ee){var er=Ee[Zf];ir=oo(er,function(lr,hr){return lr.invoke(hr,er)})}return ir}function Co(Yt,he){var Ee=Yt.static,ir=Yt.dynamic;if($t in Ee){var Ye=Ee[$t];return Ye?(Ye=li.getFramebuffer(Ye),Wa(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Wa(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+_e),hr.set(Xe,"."+un,Xe+"."+Me),"null"})}else if($t in ir){var er=ir[$t];return oo(er,function(lr,hr){var Ve=lr.invoke(hr,er),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+_e),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Me),Pr})}else return null}function rs(Yt,he,Ee){var ir=Yt.static,Ye=Yt.dynamic;function er(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,pn,vi;return"width"in Xe?pn=Xe.width|0:Ze=!1,"height"in Xe?vi=Xe.height|0:Ze=!1,new Jn(!Ze&&he&&he.thisDep,!Ze&&he&&he.contextDep,!Ze&&he&&he.propDep,function(zi,yi){var ea=zi.shared.context,Ii=pn;"width"in Xe||(Ii=yi.def(ea,".",Fr,"-",Pr));var Oi=vi;return"height"in Xe||(Oi=yi.def(ea,".",un,"-",sn)),[Pr,sn,Ii,Oi]})}else if(Ve in Ye){var fi=Ye[Ve],Xn=oo(fi,function(zi,yi){var ea=zi.invoke(yi,fi),Ii=zi.shared.context,Oi=yi.def(ea,".x|0"),ca=yi.def(ea,".y|0"),to=yi.def('"width" in ',ea,"?",ea,".width|0:","(",Ii,".",Fr,"-",Oi,")"),ho=yi.def('"height" in ',ea,"?",ea,".height|0:","(",Ii,".",un,"-",ca,")");return[Oi,ca,to,ho]});return he&&(Xn.thisDep=Xn.thisDep||he.thisDep,Xn.contextDep=Xn.contextDep||he.contextDep,Xn.propDep=Xn.propDep||he.propDep),Xn}else return he?new Jn(he.thisDep,he.contextDep,he.propDep,function(zi,yi){var ea=zi.shared.context;return[0,0,yi.def(ea,".",Fr),yi.def(ea,".",un)]}):null}var lr=er($u);if(lr){var hr=lr;lr=new Jn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:er(qc)}}function Vl(Yt,he){var Ee=Yt.static,ir=typeof Ee[ht]=="string"&&typeof Ee[z]=="string";if(ir){if(Object.keys(he.dynamic).length>0)return null;var Ye=he.static,er=Object.keys(Ye);if(er.length>0&&typeof Ye[er[0]]=="number"){for(var lr=[],hr=0;hr"+Oi+"?"+Ze+".constant["+Oi+"]:0;"}).join(""),"}}else{","if(",pn,"(",Ze,".buffer)){",zi,"=",vi,".createStream(",De,",",Ze,".buffer);","}else{",zi,"=",vi,".getBuffer(",Ze,".buffer);","}",yi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",zi,".dtype;",fi.normalized,"=!!",Ze,".normalized;");function ea(Ii){Xe(fi[Ii],"=",Ze,".",Ii,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",fi.isStream,"){",vi,".destroyStream(",zi,");","}"),fi}Ye[er]=oo(lr,hr)}),Ye}function pc(Yt){var he=Yt.static,Ee=Yt.dynamic,ir={};return Object.keys(he).forEach(function(Ye){var er=he[Ye];ir[Ye]=Wa(function(lr,hr){return typeof er=="number"||typeof er=="boolean"?""+er:lr.link(er)})}),Object.keys(Ee).forEach(function(Ye){var er=Ee[Ye];ir[Ye]=oo(er,function(lr,hr){return lr.invoke(hr,er)})}),ir}function yc(Yt,he,Ee,ir,Ye){Yt.static,Yt.dynamic;var er=Vl(Yt,he),lr=Co(Yt),hr=rs(Yt,lr),Ve=hs(Yt),Xe=Tu(Yt),Ze=Al(Yt,Ye,er);function Pr(zi){var yi=hr[zi];yi&&(Xe[zi]=yi)}Pr($u),Pr(va(qc));var sn=Object.keys(Xe).length>0,pn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(pn.profile=vo(Yt),pn.uniforms=dl(Ee),pn.drawVAO=pn.scopeVAO=Ve.vao,!pn.drawVAO&&Ze.program&&!er&&Ir.angle_instanced_arrays&&Ve.static.elements){var vi=!0,fi=Ze.program.attributes.map(function(zi){var yi=he.static[zi];return vi=vi&&!!yi,yi});if(vi&&fi.length>0){var Xn=Gi.getVAO(Gi.createVAO({attributes:fi,elements:Ve.static.elements}));pn.drawVAO=new Jn(null,null,null,function(zi,yi){return zi.link(Xn)}),pn.useVAO=!0}}return er?pn.useVAO=!0:pn.attributes=Pu(he),pn.context=pc(ir),pn}function xu(Yt,he,Ee){var ir=Yt.shared,Ye=ir.context,er=Yt.scope();Object.keys(Ee).forEach(function(lr){he.save(Ye,"."+lr);var hr=Ee[lr],Ve=hr.append(Yt,he);Array.isArray(Ve)?er(Ye,".",lr,"=[",Ve.join(),"];"):er(Ye,".",lr,"=",Ve,";")}),he(er)}function pu(Yt,he,Ee,ir){var Ye=Yt.shared,er=Ye.gl,lr=Ye.framebuffer,hr;ai&&(hr=he.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Ee?Pr=Ee.append(Yt,he):Pr=he.def(lr,".next"),ir||he("if(",Pr,"!==",lr,".cur){"),he("if(",Pr,"){",er,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ai&&he(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),he("}else{",er,".bindFramebuffer(",zn,",null);"),ai&&he(hr,".drawBuffersWEBGL(",Ze,");"),he("}",lr,".cur=",Pr,";"),ir||he("}")}function Au(Yt,he,Ee){var ir=Yt.shared,Ye=ir.gl,er=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");ki.forEach(function(Ze){var Pr=va(Ze);if(!(Pr in Ee.state)){var sn,pn;if(Pr in lr){sn=lr[Pr],pn=er[Pr];var vi=h(da[Pr].length,function(Xn){return Xe.def(sn,"[",Xn,"]")});Xe(Yt.cond(vi.map(function(Xn,zi){return Xn+"!=="+pn+"["+zi+"]"}).join("||")).then(Ye,".",Ca[Pr],"(",vi,");",vi.map(function(Xn,zi){return pn+"["+zi+"]="+Xn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var fi=Yt.cond(sn,"!==",hr,".",Pr);Xe(fi),Pr in oi?fi(Yt.cond(sn).then(Ye,".enable(",oi[Pr],");").else(Ye,".disable(",oi[Pr],");"),hr,".",Pr,"=",sn,";"):fi(Ye,".",Ca[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Ee.state).length===0&&Xe(hr,".dirty=false;"),he(Xe)}function jo(Yt,he,Ee,ir){var Ye=Yt.shared,er=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Ki(Object.keys(Ee)).forEach(function(Xe){var Ze=Ee[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,he);if(oi[Xe]){var sn=oi[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),he(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),he(lr,".",Xe,"=",Ve,";")):(he(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),he(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var pn=er[Xe];he(hr,".",Ca[Xe],"(",Pr,");",Pr.map(function(vi,fi){return pn+"["+fi+"]="+vi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),he(hr,".",Ca[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):he(hr,".",Ca[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Mu(Yt,he){Si&&(Yt.instancing=he.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,he,Ee,ir,Ye){var er=Yt.shared,lr=Yt.stats,hr=er.current,Ve=er.timer,Xe=Ee.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function pn(ea){Pr=he.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=he.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function vi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function fi(ea){var Ii=he.def(hr,".profile");he(hr,".profile=",ea,";"),he.exit(hr,".profile=",Ii,";")}var Xn;if(Xe){if(Ua(Xe)){Xe.enable?(pn(he),vi(he.exit),fi("true")):fi("false");return}Xn=Xe.append(Yt,he),fi(Xn)}else Xn=he.def(hr,".profile");var zi=Yt.block();pn(zi),he("if(",Xn,"){",zi,"}");var yi=Yt.block();vi(yi),he.exit("if(",Xn,"){",yi,"}")}function Iu(Yt,he,Ee,ir,Ye){var er=Yt.shared;function lr(Ve){switch(Ve){case pa:case So:case Ds:return 2;case Ma:case ds:case wl:return 3;case lo:case fl:case Lu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=er.gl,sn=he.def(Ve,".location"),pn=he.def(er.attributes,"[",sn,"]"),vi=Ze.state,fi=Ze.buffer,Xn=[Ze.x,Ze.y,Ze.z,Ze.w],zi=["buffer","normalized","offset","stride"];function yi(){he("if(!",pn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ii=Ze.type,Oi;if(Ze.size?Oi=he.def(Ze.size,"||",Xe):Oi=Xe,he("if(",pn,".type!==",Ii,"||",pn,".size!==",Oi,"||",zi.map(function(to){return pn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",De,",",fi,".buffer);",Pr,".vertexAttribPointer(",[sn,Oi,Ii,Ze.normalized,Ze.stride,Ze.offset],");",pn,".type=",Ii,";",pn,".size=",Oi,";",zi.map(function(to){return pn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Si){var ca=Ze.divisor;he("if(",pn,".divisor!==",ca,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,ca],");",pn,".divisor=",ca,";}")}}function ea(){he("if(",pn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",pn,".buffer=null;","}if(",Ga.map(function(Ii,Oi){return pn+"."+Ii+"!=="+Xn[Oi]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Xn,");",Ga.map(function(Ii,Oi){return pn+"."+Ii+"="+Xn[Oi]+";"}).join(""),"}")}vi===Oa?yi():vi===Aa?ea():(he("if(",vi,"===",Oa,"){"),yi(),he("}else{"),ea(),he("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Ee.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,he)}else{if(!Ye(Io))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new Un).forEach(function(pn){Pr[pn]=he.def(sn,".",pn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,he,Ee,ir,Ye,er){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var Zo=[],xs=[],zl=0;zl>1)",fi],");")}function ca(){Ee(Xn,".drawArraysInstancedANGLE(",[sn,pn,vi,fi],");")}Ze&&Ze!=="null"?yi?Oi():(Ee("if(",Ze,"){"),Oi(),Ee("}else{"),ca(),Ee("}")):ca()}function Ii(){function Oi(){Ee(er+".drawElements("+[sn,vi,zi,pn+"<<(("+zi+"-"+fa+")>>1)"]+");")}function ca(){Ee(er+".drawArrays("+[sn,pn,vi]+");")}Ze&&Ze!=="null"?yi?Oi():(Ee("if(",Ze,"){"),Oi(),Ee("}else{"),ca(),Ee("}")):ca()}Si&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(Ee("if(",fi,">0){"),ea(),Ee("}else if(",fi,"<0){"),Ii(),Ee("}")):ea():Ii()}function Cs(Yt,he,Ee,ir,Ye){var er=Fa(),lr=er.proc("body",Ye);return Si&&(er.instancing=lr.def(er.shared.extensions,".angle_instanced_arrays")),Yt(er,lr,Ee,ir),er.compile().body}function Ml(Yt,he,Ee,ir){Mu(Yt,he),Ee.useVAO?Ee.drawVAO?he(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,he),");"):he(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(he(Yt.shared.vao,".setVAO(null);"),Iu(Yt,he,Ee,ir.attributes,function(){return!0})),xc(Yt,he,Ee,ir.uniforms,function(){return!0},!1),Lo(Yt,he,he,Ee)}function yl(Yt,he){var Ee=Yt.proc("draw",1);Mu(Yt,Ee),xu(Yt,Ee,he.context),pu(Yt,Ee,he.framebuffer),Au(Yt,Ee,he),jo(Yt,Ee,he.state),sl(Yt,Ee,he,!1,!0);var ir=he.shader.progVar.append(Yt,Ee);if(Ee(Yt.shared.gl,".useProgram(",ir,".program);"),he.shader.program)Ml(Yt,Ee,he,he.shader.program);else{Ee(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),er=Ee.def(ir,".id"),lr=Ee.def(Ye,"[",er,"]");Ee(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",er,"]=",Yt.link(function(hr){return Cs(Ml,Yt,he,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(he.state).length>0&&Ee(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Ee(Yt.shared.vao,".setVAO(null);")}function $(Yt,he,Ee,ir){Yt.batchId="a1",Mu(Yt,he);function Ye(){return!0}Iu(Yt,he,Ee,ir.attributes,Ye),xc(Yt,he,Ee,ir.uniforms,Ye,!1),Lo(Yt,he,he,Ee)}function ot(Yt,he,Ee,ir){Mu(Yt,he);var Ye=Ee.contextDep,er=he.def(),lr="a0",hr="a1",Ve=he.def();Yt.shared.props=Ve,Yt.batchId=er;var Xe=Yt.scope(),Ze=Yt.scope();he(Xe.entry,"for(",er,"=0;",er,"<",hr,";++",er,"){",Ve,"=",lr,"[",er,"];",Ze,"}",Xe.exit);function Pr(zi){return zi.contextDep&&Ye||zi.propDep}function sn(zi){return!Pr(zi)}if(Ee.needsContext&&xu(Yt,Ze,Ee.context),Ee.needsFramebuffer&&pu(Yt,Ze,Ee.framebuffer),jo(Yt,Ze,Ee.state,Pr),Ee.profile&&Pr(Ee.profile)&&sl(Yt,Ze,Ee,!1,!0),ir)Ee.useVAO?Ee.drawVAO?Pr(Ee.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Ee.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Iu(Yt,Xe,Ee,ir.attributes,sn),Iu(Yt,Ze,Ee,ir.attributes,Pr)),xc(Yt,Xe,Ee,ir.uniforms,sn,!1),xc(Yt,Ze,Ee,ir.uniforms,Pr,!0),Lo(Yt,Xe,Ze,Ee);else{var pn=Yt.global.def("{}"),vi=Ee.shader.progVar.append(Yt,Ze),fi=Ze.def(vi,".id"),Xn=Ze.def(pn,"[",fi,"]");Ze(Yt.shared.gl,".useProgram(",vi,".program);","if(!",Xn,"){",Xn,"=",pn,"[",fi,"]=",Yt.link(function(zi){return Cs($,Yt,Ee,zi,2)}),"(",vi,");}",Xn,".call(this,a0[",er,"],",er,");")}}function et(Yt,he){var Ee=Yt.proc("batch",2);Yt.batchId="0",Mu(Yt,Ee);var ir=!1,Ye=!0;Object.keys(he.context).forEach(function(pn){ir=ir||he.context[pn].propDep}),ir||(xu(Yt,Ee,he.context),Ye=!1);var er=he.framebuffer,lr=!1;er?(er.propDep?ir=lr=!0:er.contextDep&&ir&&(lr=!0),lr||pu(Yt,Ee,er)):pu(Yt,Ee,null),he.state.viewport&&he.state.viewport.propDep&&(ir=!0);function hr(pn){return pn.contextDep&&ir||pn.propDep}Au(Yt,Ee,he),jo(Yt,Ee,he.state,function(pn){return!hr(pn)}),(!he.profile||!hr(he.profile))&&sl(Yt,Ee,he,!1,"a1"),he.contextDep=ir,he.needsContext=Ye,he.needsFramebuffer=lr;var Ve=he.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Ee,he,null);else{var Xe=Ve.append(Yt,Ee);if(Ee(Yt.shared.gl,".useProgram(",Xe,".program);"),he.shader.program)ot(Yt,Ee,he,he.shader.program);else{Ee(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Ee.def(Xe,".id"),sn=Ee.def(Ze,"[",Pr,"]");Ee(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(pn){return Cs(ot,Yt,he,pn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(he.state).length>0&&Ee(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Ee(Yt.shared.vao,".setVAO(null);")}function xt(Yt,he){var Ee=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Ee,he.context),he.framebuffer&&he.framebuffer.append(Yt,Ee),Ki(Object.keys(he.state)).forEach(function(hr){var Ve=he.state[hr],Xe=Ve.append(Yt,Ee);Pn(Xe)?Xe.forEach(function(Ze,Pr){ka(Ze)?Ee.set(Yt.next[hr],"["+Pr+"]",Ze):Ee.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Ee.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Ee.set(ir.next,"."+hr,Xe)}),sl(Yt,Ee,he,!0,!0),[Et,Te,Ht,Fe,Ot].forEach(function(hr){var Ve=he.draw[hr];if(Ve){var Xe=Ve.append(Yt,Ee);ka(Xe)?Ee.set(ir.draw,"."+hr,Xe):Ee.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(he.uniforms).forEach(function(hr){var Ve=he.uniforms[hr].append(Yt,Ee);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ka(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Ee.set(ir.uniforms,"["+Yt.link(Tr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(he.attributes).forEach(function(hr){var Ve=he.attributes[hr].append(Yt,Ee),Xe=Yt.scopeAttrib(hr);Object.keys(new Un).forEach(function(Ze){Ee.set(Xe,"."+Ze,Ve[Ze])})}),he.scopeVAO){var er=he.scopeVAO.append(Yt,Ee);ka(er)?Ee.set(ir.vao,".targetVAO",er):Ee.set(ir.vao,".targetVAO",Yt.link(er,{stable:!0}))}function lr(hr){var Ve=he.shader[hr];if(Ve){var Xe=Ve.append(Yt,Ee);ka(Xe)?Ee.set(ir.shader,"."+hr,Xe):Ee.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(he.state).length>0&&(Ee(Ye,".dirty=true;"),Ee.exit(Ye,".dirty=true;")),Ee("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var he=Object.keys(Yt),Ee=0;Ee=0;--Lo){var Cs=ka[Lo];Cs&&Cs(ia,null,0)}Ir.flush(),Gi&&Gi.update()}function Co(){!Fa&&ka.length>0&&(Fa=x.next(vo))}function rs(){Fa&&(x.cancel(vo),Fa=null)}function Vl(Lo){Lo.preventDefault(),rs(),zo.forEach(function(Cs){Cs()})}function Al(Lo){Ir.getError(),hi.restore(),da.restore(),Ui.restore(),Va.restore(),ki.restore(),oi.restore(),ai.restore(),Gi&&Gi.restore(),Ca.procs.refresh(),Co(),wo.forEach(function(Cs){Cs()})}Qi&&(Qi.addEventListener(nl,Vl,!1),Qi.addEventListener(uu,Al,!1));function hs(){ka.length=0,rs(),Qi&&(Qi.removeEventListener(nl,Vl),Qi.removeEventListener(uu,Al)),da.clear(),oi.clear(),ki.clear(),ai.clear(),Va.clear(),Si.clear(),Ui.clear(),Gi&&Gi.clear(),wa.forEach(function(Lo){Lo()})}function Tu(Lo){function Cs(Ye){var er=c({},Ye);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 lr(hr){if(hr in er){var Ve=er[hr];delete er[hr],Object.keys(Ve).forEach(function(Xe){er[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(er.vao=Ye.vao),er}function Ml(Ye,er){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(er&&Array.isArray(Xe)){for(var Ze=0;Ze0)return xe.call(this,Ee(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return xe.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=oi.setFBO=Tu({framebuffer:f.define.call(null,Xl,"framebuffer")});function Pu(Lo,Cs){var Ml=0;Ca.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Lo){if("framebuffer"in Lo)if(Lo.framebuffer&&Lo.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Lo.framebuffer.faces[Cs]},Lo),Pu);else dl(Lo,Pu);else Pu(null,Lo)}function yc(Lo){ka.push(Lo);function Cs(){var Ml=ru(ka,Lo);function yl(){var $=ru(ka,yl);ka[$]=ka[ka.length-1],ka.length-=1,ka.length<=0&&rs()}ka[Ml]=yl}return Co(),{cancel:Cs}}function xu(){var Lo=Xi.viewport,Cs=Xi.scissor_box;Lo[0]=Lo[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Lo[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Lo[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=jo(),xu(),Ca.procs.poll()}function Au(){Va.refresh(),xu(),Ca.procs.refresh(),Gi&&Gi.update()}function jo(){return(y()-_a)/1e3}Au();function Mu(Lo,Cs){var Ml;switch(Lo){case"frame":return yc(Cs);case"lost":Ml=zo;break;case"restore":Ml=wo;break;case"destroy":Ml=wa;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:va,destroy:hs,_gl:Ir,_refresh:Au,poll:function(){pu(),Gi&&Gi.update()},now:jo,stats:yn,getCachedCode:sl,preloadCachedCode:Iu});return Tr.onDone(null,xc),xc}return kh})}),vT=Dt((Q,Z)=>{var c=bS(),g=rW();Z.exports=function(I,S,t){var e=I._fullLayout,r=!0;return e._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!e._has("parcoords"))){try{a.regl=g({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:I._context.plotGlPixelRatio||window.devicePixelRatio,extensions:S||[],cachedCode:t||{}})}catch{r=!1}a.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(n){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),r||c({container:e._glcontainer.node()}),r}}),hE=Dt((f,Z)=>{var c=HS(),g=eE(),I=NH(),S=eW(),t=kn(),e=v0().selectMode,r=vT(),a=Tc(),n=ja(),o=jS().styleTextSelection,i={};function l(x,y,v,T){var u=x._size,b=x.width*T,_=x.height*T,P=u.l*T,M=u.b*T,C=u.r*T,A=u.t*T,h=u.w*T,p=u.h*T;return[P+y.domain[0]*h,M+v.domain[0]*p,b-C-(1-y.domain[1])*h,_-A-(1-v.domain[1])*p]}var f=Z.exports=function(x,y,v){if(v.length){var T=x._fullLayout,u=y._scene,b=y.xaxis,_=y.yaxis,P,M;if(u){var C=r(x,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!C){u.init();return}var A=u.count,h=T._glcanvas.data()[0].regl;if(n(x,y,v),u.dirty){if((u.line2d||u.error2d)&&!(u.scatter2d||u.fill2d||u.glText)&&h.clear({color:!0,depth:!0}),u.error2d===!0&&(u.error2d=I(h)),u.line2d===!0&&(u.line2d=g(h)),u.scatter2d===!0&&(u.scatter2d=c(h)),u.fill2d===!0&&(u.fill2d=g(h)),u.glText===!0)for(u.glText=new Array(A),P=0;Pu.glText.length){var p=A-u.glText.length;for(P=0;Pft&&(isNaN(K[ut])||isNaN(K[ut+1]));)ut-=2;it.positions=K.slice(ft,ut+2)}return it}),u.line2d.update(u.lineOptions)),u.error2d){var B=(u.errorXOptions||[]).concat(u.errorYOptions||[]);u.error2d.update(B)}u.scatter2d&&u.scatter2d.update(u.markerOptions),u.fillOrder=t.repeat(null,A),u.fill2d&&(u.fillOptions=u.fillOptions.map(function(it,K){var ft=v[K];if(!(!it||!ft||!ft[0]||!ft[0].trace)){var ut=ft[0],kt=ut.trace,It=ut.t,Pt=u.lineOptions[K],qt,Wt,Jt=[];kt._ownfill&&Jt.push(K),kt._nexttrace&&Jt.push(K+1),Jt.length&&(u.fillOrder[K]=Jt);var ge=[],fe=Pt&&Pt.positions||It.positions,pe,se;if(kt.fill==="tozeroy"){for(pe=0;pepe&&isNaN(fe[se+1]);)se-=2;fe[pe+1]!==0&&(ge=[fe[pe],0]),ge=ge.concat(fe.slice(pe,se+2)),fe[se+1]!==0&&(ge=ge.concat([fe[se],0]))}else if(kt.fill==="tozerox"){for(pe=0;pepe&&isNaN(fe[se]);)se-=2;fe[pe]!==0&&(ge=[0,fe[pe+1]]),ge=ge.concat(fe.slice(pe,se+2)),fe[se]!==0&&(ge=ge.concat([0,fe[se+1]]))}else if(kt.fill==="toself"||kt.fill==="tonext"){for(ge=[],qt=0,it.splitNull=!0,Wt=0;Wt-1;for(P=0;P{var c=BV();c.plot=hE(),Z.exports=c}),iW=Dt((Q,Z)=>{Z.exports=nW()}),fE=Dt((Q,Z)=>{var c=ef(),g=kc(),I=ph().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=A3(),r=ic().idRegex,a=mu().templatedArray,n=Ia().extendFlat,o=c.marker,i=o.line,l=n(g("marker.line",{editTypeOverride:"calc"}),{width:n({},i.width,{editType:"calc"}),editType:"calc"}),f=n(g("marker"),{symbol:o.symbol,angle:o.angle,size:n({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:l,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function x(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[y],editType:"plot"}}}Z.exports={dimensions:a("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:n({},e.text,{}),hovertext:n({},e.hovertext,{}),hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),marker:f,xaxes:x("x"),yaxes:x("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:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}),yT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){S||(S=1/0);var t,e;for(t=0;t{var c=kn(),g=Ad(),I=fE(),S=Tc(),t=s0(),e=yT(),r=hT().isOpenSymbol;Z.exports=function(o,i,l,f){function x(M,C){return c.coerce(o,i,I,M,C)}var y=g(o,i,{name:"dimensions",handleItemDefaults:a}),v=x("diagonal.visible"),T=x("showupperhalf"),u=x("showlowerhalf"),b=e(i,y,"values");if(!b||!v&&!T&&!u){i.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("xhoverformat"),x("yhoverformat"),t(o,i,l,f,x,{noAngleRef:!0,noStandOff:!0});var _=r(i.marker.symbol),P=S.isBubble(i);x("marker.line.width",_||P?1:0),n(o,i,f,x),c.coerceSelectionMarkerOpacity(i,x)};function a(o,i){function l(x,y){return c.coerce(o,i,I.dimensions,x,y)}l("label");var f=l("values");f&&f.length?l("visible"):i.visible=!1,l("axis.type"),l("axis.matches")}function n(o,i,l,f){var x=i.dimensions,y=x.length,v=i.showupperhalf,T=i.showlowerhalf,u=i.diagonal.visible,b,_,P=new Array(y),M=new Array(y);for(b=0;b_&&v||b<_&&T||b===_&&(u||!T||!v))&&(l._splomSubplots[q]=1)}(!T||!u&&v&&T)&&(l._splomGridDflt.xside="bottom",l._splomGridDflt.yside="left")}}),oW=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g._fullLayout,t=I.uid,e=S._splomScenes;e||(e=S._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=e[I.uid];return n||(n=e[t]=c.extendFlat({},r,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||c.extendFlat(n,r),n}}),sW=Dt((Q,Z)=>{var c=kn(),g=Bc(),I=me().calcMarkerSize,S=me().calcAxisExpansion,t=B0(),e=wx().markerSelection,r=wx().markerStyle,a=oW(),n=sa().BADNUM,o=Z1().TOO_MANY_POINTS;Z.exports=function(i,l){var f=l.dimensions,x=l._length,y={},v=y.cdata=[],T=y.data=[],u=l._visibleDims=[],b,_,P,M,C;function A(B,O){for(var j=B.makeCalcdata({v:O.values,vcalendar:l.calendar},"v"),V=0;Vo,k;for(p?k=y.sizeAvg||Math.max(y.size,3):k=I(l,x),_=0;_{(function(){var c,g,I,S,t,e;typeof performance<"u"&&performance!==null&&performance.now?Z.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Z.exports=function(){return(c()-t)/1e6},g=process.hrtime,c=function(){var r;return r=g(),r[0]*1e9+r[1]},S=c(),e=process.uptime()*1e9,t=S-e):Date.now?(Z.exports=function(){return Date.now()-I},I=Date.now()):(Z.exports=function(){return new Date().getTime()-I},I=new Date().getTime())}).call(Q)}),uW=Dt((Q,Z)=>{var c=lW(),g=window,I=["moz","webkit"],S="AnimationFrame",t=g["request"+S],e=g["cancel"+S]||g["cancelRequest"+S];for(r=0;!t&&r{Z.exports=function(c,g){var I=typeof c=="number",S=typeof g=="number";I&&!S?(g=c,c=0):!I&&!S&&(c=0,g=0),c=c|0,g=g|0;var t=g-c;if(t<0)throw new Error("array length must be positive");for(var e=new Array(t),r=0,a=c;r{var c=HS(),g=zg(),I=_x(),S=uW(),t=cW(),e=yb(),r=bx();Z.exports=a;function a(l,f){if(!(this instanceof a))return new a(l);this.traces=[],this.passes={},this.regl=l,this.scatter=c(l),this.canvas=this.scatter.canvas}a.prototype.render=function(...l){return l.length&&this.update(...l),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=S(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...l){if(!l.length)return;for(let y=0;yw||!v.lower&&k{f[T+b]=y})}this.scatter.draw(...f)}return this},a.prototype.destroy=function(){return this.traces.forEach(l=>{l.buffer&&l.buffer.destroy&&l.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(l,f,x){let y=l.id!=null?l.id:l,v=f,T=x;return y<<16|(v&255)<<8|T&255}function o(l,f,x){let y,v,T,u,b=l[f],_=l[x];return b.length>2?(b[0],b[2],y=b[1],v=b[3]):b.length?(y=b[0],v=b[1]):(b.x,y=b.y,b.x+b.width,v=b.y+b.height),_.length>2?(T=_[0],u=_[2],_[1],_[3]):_.length?(T=_[0],u=_[1]):(T=_.x,_.y,u=_.x+_.width,_.y+_.height),[T,y,u,v]}function i(l){if(typeof l=="number")return[l,l,l,l];if(l.length===2)return[l[0],l[1],l[0],l[1]];{let f=e(l);return[f.x,f.y,f.x+f.width,f.y+f.height]}}}),fW=Dt((Q,Z)=>{var c=hW(),g=kn(),I=Bc(),S=v0().selectMode;Z.exports=function(e,r,a){if(a.length)for(var n=0;n-1,H=S(v)||!!o.selectedpoints||V,F=!0;if(H){var U=o._length;if(o.selectedpoints){l.selectBatch=o.selectedpoints;var W=o.selectedpoints,q={};for(b=0;b{Q.getDimIndex=function(Z,c){for(var g=c._id,I=g.charAt(0),S={x:0,y:1}[I],t=Z._visibleDims,e=0;e{var c=dE(),g=cT().calcHover,I=Ls().getFromId,S=Ia().extendFlat;function t(r,a,n,o,i){i||(i={});var l=(o||"").charAt(0)==="x",f=(o||"").charAt(0)==="y",x=e(r,a,n);if((l||f)&&i.hoversubplots==="axis"&&x[0])for(var y=(l?r.xa:r.ya)._subplotsWith,v=i.gd,T=S({},r),u=0;u{var c=kn(),g=c.pushUnique,I=Tc(),S=dE();Z.exports=function(t,e){var r=t.cd,a=r[0].trace,n=r[0].t,o=t.scene,i=o.matrixOptions.cdata,l=t.xaxis,f=t.yaxis,x=[];if(!o)return x;var y=!I.hasMarkers(a)&&!I.hasText(a);if(a.visible!==!0||y)return x;var v=S.getDimIndex(a,l),T=S.getDimIndex(a,f);if(v===!1||T===!1)return x;var u=n.xpx[v],b=n.ypx[T],_=i[v],P=i[T],M=(t.scene.selectBatch||[]).slice(),C=[];if(e!==!1&&!e.degenerate)for(var A=0;A<_.length;A++)e.contains([u[A],b[A]],null,A,t)?(x.push({pointNumber:A,x:_[A],y:P[A]}),g(M,A)):M.indexOf(A)!==-1?g(M,A):C.push(A);var h=o.matrixOptions;return!M.length&&!C.length?o.matrix.update(h,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,c.extendFlat({},h,o.selectedOptions,o.viewOpts)),o.selectBatch=M,o.unselectBatch=C,x}}),mW=Dt((Q,Z)=>{var c=kn(),g=B0(),I=wx().markerStyle;Z.exports=function(S,t){var e=t.trace,r=S._fullLayout._splomScenes[e.uid];if(r){g(S,e),c.extendFlat(r.matrixOptions,I(S,e));var a=c.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(a,null)}}}),gW=Dt((Q,Z)=>{var c=Qo(),g=qM();Z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:fE(),supplyDefaults:aW(),colorbar:xo(),calc:sW(),plot:fW(),hoverPoints:dW().hoverPoints,selectPoints:pW(),editStyle:mW(),meta:{}},c.register(g)}),vW=Dt((Q,Z)=>{var c=eE(),g=Qo(),I=vT(),S=ud().getModuleCalcData,t=Mf(),e=Bc().getFromId,r=Ls().shouldShowZeroLine,a="splom",n={};function o(v){var T=v._fullLayout,u=g.getModule(a),b=S(v.calcdata,u)[0],_=I(v,["ANGLE_instanced_arrays","OES_element_index_uint"],n);_&&(T._hasOnlyLargeSploms&&f(v),u.plot(v,{},b))}function i(v){var T=v.calcdata,u=v._fullLayout;u._hasOnlyLargeSploms&&f(v);for(var b=0;b{var c=gW();c.basePlotModule=vW(),Z.exports=c}),xW=Dt((Q,Z)=>{Z.exports=yW()}),pE=Dt((Q,Z)=>{var c=kc(),g=Td(),I=ma(),S=Uh().attributes,t=Ia().extendFlat,e=mu().templatedArray;Z.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:I({editType:"plot"}),tickfont:I({autoShadowDflt:!0,editType:"plot"}),rangefont:I({editType:"plot"}),dimensions:e("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},g.tickvals,{editType:"plot"}),ticktext:t({},g.ticktext,{editType:"plot"}),tickformat:t({},g.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:t({editType:"calc"},c("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"}}}),C3=Dt((Q,Z)=>{Z.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"}}}),Og=Dt((Q,Z)=>{var c=T1();function g(I){return[I]}Z.exports={keyFun:function(I){return I.key},repeat:g,descend:c,wrap:g,unwrap:function(I){return I[0]}}}),mE=Dt((Q,Z)=>{var c=C3(),g=Wr(),I=Og().keyFun,S=Og().repeat,t=kn().sorterAsc,e=kn().strTranslate,r=c.bar.snapRatio;function a(q,J){return q*(1-r)+J*r}var n=c.bar.snapClose;function o(q,J){return q*(1-n)+J*n}function i(q,J,lt,yt){if(l(lt,yt))return lt;var mt=q?-1:1,st=0,tt=J.length-1;if(mt<0){var pt=st;st=tt,tt=pt}for(var rt=J[st],at=rt,vt=st;mt*vt=J[lt][0]&&q<=J[lt][1])return!0;return!1}function f(q){q.attr("x",-c.bar.captureWidth/2).attr("width",c.bar.captureWidth)}function x(q){q.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(q){if(!q.brush.filterSpecified)return"0,"+q.height;for(var J=v(q.brush.filter.getConsolidated(),q.height),lt=[0],yt,mt,st,tt=J.length?J[0][0]:null,pt=0;ptq[1]+lt||J=.9*q[1]+.1*q[0]?"n":J<=.9*q[0]+.1*q[1]?"s":"ns"}function u(){g.select(document.body).style("cursor",null)}function b(q){q.attr("stroke-dasharray",y)}function _(q,J){var lt=g.select(q).selectAll(".highlight, .highlight-shadow"),yt=J?lt.transition().duration(c.bar.snapDuration).each("end",J):lt;b(yt)}function P(q,J){var lt=q.brush,yt=lt.filterSpecified,mt=NaN,st={},tt;if(yt){var pt=q.height,rt=lt.filter.getConsolidated(),at=v(rt,pt),vt=NaN,it=NaN,K=NaN;for(tt=0;tt<=at.length;tt++){var ft=at[tt];if(ft&&ft[0]<=J&&J<=ft[1]){vt=tt;break}else if(it=tt?tt-1:NaN,ft&&ft[0]>J){K=tt;break}}if(mt=vt,isNaN(mt)&&(isNaN(it)||isNaN(K)?mt=isNaN(it)?K:it:mt=J-at[it][1]=qt[0]&&Pt<=qt[1]){st.clickableOrdinalRange=qt;break}}}return st}function M(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.unitToPaddedPx.invert(lt),mt=J.brush,st=P(J,lt),tt=st.interval,pt=mt.svgBrush;if(pt.wasDragged=!1,pt.grabbingBar=st.region==="ns",pt.grabbingBar){var rt=tt.map(J.unitToPaddedPx);pt.grabPoint=lt-rt[0]-c.verticalPadding,pt.barLength=rt[1]-rt[0]}pt.clickableOrdinalRange=st.clickableOrdinalRange,pt.stayingIntervals=J.multiselect&&mt.filterSpecified?mt.filter.getConsolidated():[],tt&&(pt.stayingIntervals=pt.stayingIntervals.filter(function(at){return at[0]!==tt[0]&&at[1]!==tt[1]})),pt.startExtent=st.region?tt[st.region==="s"?1:0]:yt,J.parent.inBrushDrag=!0,pt.brushStartCallback()}function C(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.brush.svgBrush;yt.wasDragged=!0,yt._dragging=!0,yt.grabbingBar?yt.newExtent=[lt-yt.grabPoint,lt+yt.barLength-yt.grabPoint].map(J.unitToPaddedPx.invert):yt.newExtent=[yt.startExtent,J.unitToPaddedPx.invert(lt)].sort(t),J.brush.filterSpecified=!0,yt.extent=yt.stayingIntervals.concat([yt.newExtent]),yt.brushCallback(J),_(q.parentNode)}function A(q,J){var lt=J.brush,yt=lt.filter,mt=lt.svgBrush;mt._dragging||(h(q,J),C(q,J),J.brush.svgBrush.wasDragged=!1),mt._dragging=!1;var st=g.event;st.sourceEvent.stopPropagation();var tt=mt.grabbingBar;if(mt.grabbingBar=!1,mt.grabLocation=void 0,J.parent.inBrushDrag=!1,u(),!mt.wasDragged){mt.wasDragged=void 0,mt.clickableOrdinalRange?lt.filterSpecified&&J.multiselect?mt.extent.push(mt.clickableOrdinalRange):(mt.extent=[mt.clickableOrdinalRange],lt.filterSpecified=!0):tt?(mt.extent=mt.stayingIntervals,mt.extent.length===0&&j(lt)):j(lt),mt.brushCallback(J),_(q.parentNode),mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[]);return}var pt=function(){yt.set(yt.getConsolidated())};if(J.ordinal){var rt=J.unitTickvals;rt[rt.length-1]mt.newExtent[0];mt.extent=mt.stayingIntervals.concat(at?[mt.newExtent]:[]),mt.extent.length||j(lt),mt.brushCallback(J),at?_(q.parentNode,pt):(pt(),_(q.parentNode))}else pt();mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[])}function h(q,J){var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=P(J,lt),mt="crosshair";yt.clickableOrdinalRange?mt="pointer":yt.region&&(mt=yt.region+"-resize"),g.select(document.body).style("cursor",mt)}function p(q){q.on("mousemove",function(J){g.event.preventDefault(),J.parent.inBrushDrag||h(this,J)}).on("mouseleave",function(J){J.parent.inBrushDrag||u()}).call(g.behavior.drag().on("dragstart",function(J){M(this,J)}).on("drag",function(J){C(this,J)}).on("dragend",function(J){A(this,J)}))}function k(q,J){return q[0]-J[0]}function w(q,J,lt){var yt=lt._context.staticPlot,mt=q.selectAll(".background").data(S);mt.enter().append("rect").classed("background",!0).call(f).call(x).style("pointer-events",yt?"none":"auto").attr("transform",e(0,c.verticalPadding)),mt.call(p).attr("height",function(pt){return pt.height-c.verticalPadding});var st=q.selectAll(".highlight-shadow").data(S);st.enter().append("line").classed("highlight-shadow",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width+c.bar.strokeWidth).attr("stroke",J).attr("opacity",c.bar.strokeOpacity).attr("stroke-linecap","butt"),st.attr("y1",function(pt){return pt.height}).call(b);var tt=q.selectAll(".highlight").data(S);tt.enter().append("line").classed("highlight",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width-c.bar.strokeWidth).attr("stroke",c.bar.fillColor).attr("opacity",c.bar.fillOpacity).attr("stroke-linecap","butt"),tt.attr("y1",function(pt){return pt.height}).call(b)}function B(q,J,lt){var yt=q.selectAll("."+c.cn.axisBrush).data(S,I);yt.enter().append("g").classed(c.cn.axisBrush,!0),w(yt,J,lt)}function O(q){return q.svgBrush.extent.map(function(J){return J.slice()})}function j(q){q.filterSpecified=!1,q.svgBrush.extent=[[-1/0,1/0]]}function V(q){return function(J){var lt=J.brush,yt=O(lt),mt=yt.slice();lt.filter.set(mt),q()}}function H(q){for(var J=q.slice(),lt=[],yt,mt=J.shift();mt;){for(yt=mt.slice();(mt=J.shift())&&mt[0]<=yt[1];)yt[1]=Math.max(yt[1],mt[1]);lt.push(yt)}return lt.length===1&<[0][0]>lt[0][1]&&(lt=[]),lt}function F(){var q=[],J,lt;return{set:function(yt){q=yt.map(function(mt){return mt.slice().sort(t)}).sort(k),q.length===1&&q[0][0]===-1/0&&q[0][1]===1/0&&(q=[[0,-1]]),J=H(q),lt=q.reduce(function(mt,st){return[Math.min(mt[0],st[0]),Math.max(mt[1],st[1])]},[1/0,-1/0])},get:function(){return q.slice()},getConsolidated:function(){return J},getBounds:function(){return lt}}}function U(q,J,lt,yt,mt,st){var tt=F();return tt.set(lt),{filter:tt,filterSpecified:J,svgBrush:{extent:[],brushStartCallback:yt,brushCallback:V(mt),brushEndCallback:st}}}function W(q,J){if(Array.isArray(q[0])?(q=q.map(function(yt){return yt.sort(t)}),J.multiselect?q=H(q.sort(k)):q=[q[0]]):q=[q.sort(t)],J.tickvals){var lt=J.tickvals.slice().sort(t);if(q=q.map(function(yt){var mt=[i(0,lt,yt[0],[]),i(1,lt,yt[1],[])];if(mt[1]>mt[0])return mt}).filter(function(yt){return yt}),!q.length)return}return q.length>1?q:q[0]}Z.exports={makeBrush:U,ensureAxisBrush:B,cleanRanges:W}}),_W=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=Uh().defaults,t=Ad(),e=Ls(),r=pE(),a=mE(),n=C3().maxDimensionCount,o=yT();function i(f,x,y,v,T){var u=T("line.color",y);if(g(f,"line")&&c.isArrayOrTypedArray(u)){if(u.length)return T("line.colorscale"),I(f,x,v,T,{prefix:"line.",cLetter:"c"}),u.length;x.line.color=y}return 1/0}function l(f,x,y,v){function T(M,C){return c.coerce(f,x,r.dimensions,M,C)}var u=T("values"),b=T("visible");if(u&&u.length||(b=x.visible=!1),b){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var _=T("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:_},e.setConvert(x._ax,v.layout),T("multiselect");var P=T("constraintrange");P&&(x.constraintrange=a.cleanRanges(P,x))}}Z.exports=function(f,x,y,v){function T(M,C){return c.coerce(f,x,r,M,C)}var u=f.dimensions;Array.isArray(u)&&u.length>n&&(c.log("parcoords traces support up to "+n+" dimensions at the moment"),u.splice(n));var b=t(f,x,{name:"dimensions",layout:v,handleItemDefaults:l}),_=i(f,x,y,v,T);S(x,v,T),(!Array.isArray(b)||!b.length)&&(x.visible=!1),o(x,b,"values",_);var P=c.extendFlat({},v.font,{size:Math.round(v.font.size/1.2)});c.coerceFont(T,"labelfont",P),c.coerceFont(T,"tickfont",P,{autoShadowDflt:!0}),c.coerceFont(T,"rangefont",P),T("labelangle"),T("labelside"),T("unselected.line.color"),T("unselected.line.opacity")}}),bW=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Xc(),I=Og().wrap;Z.exports=function(t,e){var r,a;return g.hasColorscale(e,"line")&&c(e.line.color)?(r=e.line.color,a=g.extractOpts(e.line).colorscale,g.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(e._length),a=[[0,e.line.color],[1,e.line.color]]),I({lineColor:r,cscale:a})};function S(t){for(var e=new Array(t),r=0;r>>16,(Q&65280)>>>8,Q&255],alpha:1};if(typeof Q=="number")return{space:"rgb",values:[Q>>>16,(Q&65280)>>>8,Q&255],alpha:1};if(Q=String(Q).toLowerCase(),xT.default[Q])I=xT.default[Q].slice(),t="rgb";else if(Q==="transparent")S=0,t="rgb",I=[0,0,0];else if(Q[0]==="#"){var e=Q.slice(1),r=e.length,a=r<=4;S=1,a?(I=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],r===4&&(S=parseInt(e[3]+e[3],16)/255)):(I=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],r===8&&(S=parseInt(e[6]+e[7],16)/255)),I[0]||(I[0]=0),I[1]||(I[1]=0),I[2]||(I[2]=0),t="rgb"}else if(g=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Q)){var n=g[1];t=n.replace(/a$/,"");var o=t==="cmyk"?4:t==="gray"?1:3;I=g[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=I.shift()),I=I.map(function(i,l){if(i[i.length-1]==="%")return i=parseFloat(i)/100,l===3?i:t==="rgb"?i*255:t[0]==="h"||t[0]==="l"&&!l?i*100:t==="lab"?i*125:t==="lch"?l<2?i*150:i*360:t[0]==="o"&&!l?i:t==="oklab"?i*.4:t==="oklch"?l<2?i*.4:i*360:i;if(t[l]==="h"||l===2&&t[t.length-1]==="h"){if(_T[i]!==void 0)return _T[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=I.length>o?I.pop():1}else/[0-9](?:\s|\/|,)/.test(Q)&&(I=Q.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),t=((c=(Z=Q.match(/([a-z])/ig))==null?void 0:Z.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:t,values:I,alpha:S}}var xT,gE,_T,kW=fn(()=>{xT=Dn(yS()),gE=wW,_T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}),L3,vE=fn(()=>{L3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}),P3,TW=fn(()=>{vE(),P3={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Q){var Z=Q[0]/360,c=Q[1]/100,g=Q[2]/100,I,S,t,e,r,a=0;if(c===0)return r=g*255,[r,r,r];for(S=g<.5?g*(1+c):g+c-g*c,I=2*g-S,e=[0,0,0];a<3;)t=Z+1/3*-(a-1),t<0?t++:t>1&&t--,r=6*t<1?I+(S-I)*6*t:2*t<1?S:3*t<2?I+(S-I)*(2/3-t)*6:I,e[a++]=r*255;return e}},L3.hsl=function(Q){var Z=Q[0]/255,c=Q[1]/255,g=Q[2]/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=S-I,e,r,a;return S===I?e=0:Z===S?e=(c-g)/t:c===S?e=2+(g-Z)/t:g===S&&(e=4+(Z-c)/t),e=Math.min(e*60,360),e<0&&(e+=360),a=(I+S)/2,S===I?r=0:a<=.5?r=t/(S+I):r=t/(2-S-I),[e,r*100,a*100]}}),yE={};cn(yE,{default:()=>AW});function AW(Q){Array.isArray(Q)&&Q.raw&&(Q=String.raw(...arguments)),Q instanceof Number&&(Q=+Q);var Z,c=gE(Q);if(!c.space)return[];let g=c.space[0]==="h"?P3.min:L3.min,I=c.space[0]==="h"?P3.max:L3.max;return Z=Array(3),Z[0]=Math.min(Math.max(c.values[0],g[0]),I[0]),Z[1]=Math.min(Math.max(c.values[1],g[1]),I[1]),Z[2]=Math.min(Math.max(c.values[2],g[2]),I[2]),c.space[0]==="h"&&(Z=P3.rgb(Z)),Z.push(Math.min(Math.max(c.alpha,0),1)),Z}var MW=fn(()=>{kW(),vE(),TW()}),xE=Dt(Q=>{var Z=kn().isTypedArray;Q.convertTypedArray=function(c){return Z(c)?Array.prototype.slice.call(c):c},Q.isOrdinal=function(c){return!!c.tickvals},Q.isVisible=function(c){return c.visible||!("visible"in c)}}),SW=Dt((Q,Z)=>{var c=["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(` `),g=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),I=E3().maxDimensionCount,S=kn(),t=1e-6,e=2048,r=new Uint8Array(4),a=new Uint8Array(4),n={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(A){A.read({x:0,y:0,width:1,height:1,data:r})}function i(A,h,p,k,w){var R=A._gl;R.enable(R.SCISSOR_TEST),R.scissor(h,p,k,w),A.clear({color:[0,0,0,0],depth:1})}function l(A,h,p,k,w,R){var O=R.key;function j(V){var H=Math.min(k,w-V*k);V===0&&(window.cancelAnimationFrame(p.currentRafs[O]),delete p.currentRafs[O],i(A,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!p.clearOnly&&(R.count=2*H,R.offset=2*V*k,h(R),V*k+H>>8*h)%256/255}function v(A,h,p){for(var k=new Array(A*(I+4)),w=0,R=0;RWt&&(Wt=it[kt].dim1.canvasX,Pt=kt);ut===0&&i(w,0,0,H.canvasWidth,H.canvasHeight);var Jt=tt(p);for(kt=0;kt{var c=qr(),g=kn(),I=g.isArrayOrTypedArray,S=g.numberFormat,t=(uW(),ni(gE)).default,e=Ls(),r=g.strRotate,a=g.strTranslate,n=ec(),o=Vs(),i=Xc(),l=zg(),f=l.keyFun,x=l.repeat,y=l.unwrap,v=vE(),T=E3(),u=dE(),b=cW();function _(yt,mt,st){return g.aggNums(yt,null,mt,st)}function P(yt,mt){return C(_(Math.min,yt,mt),_(Math.max,yt,mt))}function M(yt){var mt=yt.range;return mt?C(mt[0],mt[1]):P(yt.values,yt._length)}function C(yt,mt){return(isNaN(yt)||!isFinite(yt))&&(yt=0),(isNaN(mt)||!isFinite(mt))&&(mt=0),yt===mt&&(yt===0?(yt-=1,mt+=1):(yt*=.9,mt*=1.1)),[yt,mt]}function A(yt,mt){return mt?function(st,tt){var dt=mt[tt];return dt??yt(st)}:yt}function h(yt,mt,st,tt,dt){var rt=M(st);return tt?c.scale.ordinal().domain(tt.map(A(S(st.tickformat),dt))).range(tt.map(function(at){var vt=(at-rt[0])/(rt[1]-rt[0]);return yt-mt+vt*(2*mt-yt)})):c.scale.linear().domain(rt).range([yt-mt,mt])}function p(yt,mt){return c.scale.linear().range([mt,yt-mt])}function k(yt,mt){return c.scale.linear().domain(M(yt)).range([mt,1-mt])}function w(yt){if(yt.tickvals){var mt=M(yt);return c.scale.ordinal().domain(yt.tickvals).range(yt.tickvals.map(function(st){return(st-mt[0])/(mt[1]-mt[0])}))}}function R(yt){var mt=yt.map(function(rt){return rt[0]}),st=yt.map(function(rt){var at=t(rt[1]);return c.rgb("rgb("+at[0]+","+at[1]+","+at[2]+")")}),tt=function(rt){return function(at){return at[rt]}},dt="rgb".split("").map(function(rt){return c.scale.linear().clamp(!0).domain(mt).range(st.map(tt(rt)))});return function(rt){return dt.map(function(at){return at(rt)})}}function O(yt){return yt.dimensions.some(function(mt){return mt.brush.filterSpecified})}function j(yt,mt,st){var tt=y(mt),dt=tt.trace,rt=v.convertTypedArray(tt.lineColor),at=dt.line,vt={color:t(dt.unselected.line.color),opacity:dt.unselected.line.opacity},it=i.extractOpts(at),Y=it.reversescale?i.flipScale(tt.cscale):tt.cscale,ft=dt.domain,ut=dt.dimensions,kt=yt.width,It=dt.labelangle,Pt=dt.labelside,qt=dt.labelfont,Wt=dt.tickfont,Jt=dt.rangefont,ge=g.extendDeepNoArrays({},at,{color:rt.map(c.scale.linear().domain(M({values:rt,range:[it.min,it.max],_length:dt._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),fe=Math.floor(kt*(ft.x[1]-ft.x[0])),pe=Math.floor(yt.height*(ft.y[1]-ft.y[0])),se=yt.margin||{l:80,r:80,t:100,b:80},Tt=fe,Lt=pe;return{key:st,colCount:ut.filter(v.isVisible).length,dimensions:ut,tickDistance:T.tickDistance,unitToColor:R(Y),lines:ge,deselectedLines:vt,labelAngle:It,labelSide:Pt,labelFont:qt,tickFont:Wt,rangeFont:Jt,layoutWidth:kt,layoutHeight:yt.height,domain:ft,translateX:ft.x[0]*kt,translateY:yt.height-ft.y[1]*yt.height,pad:se,canvasWidth:Tt*T.canvasPixelRatio+2*ge.canvasOverdrag,canvasHeight:Lt*T.canvasPixelRatio,width:Tt,height:Lt,canvasPixelRatio:T.canvasPixelRatio}}function V(yt,mt,st){var tt=st.width,dt=st.height,rt=st.dimensions,at=st.canvasPixelRatio,vt=function(kt){return tt*kt/Math.max(1,st.colCount-1)},it=T.verticalPadding/dt,Y=p(dt,T.verticalPadding),ft={key:st.key,xScale:vt,model:st,inBrushDrag:!1},ut={};return ft.dimensions=rt.filter(v.isVisible).map(function(kt,It){var Pt=k(kt,it),qt=ut[kt.label];ut[kt.label]=(qt||0)+1;var Wt=kt.label+(qt?"__"+qt:""),Jt=kt.constraintrange,ge=Jt&&Jt.length;ge&&!I(Jt[0])&&(Jt=[Jt]);var fe=ge?Jt.map(function(He){return He.map(Pt)}):[[-1/0,1/0]],pe=function(){var He=ft;He.focusLayer&&He.focusLayer.render(He.panels,!0);var Ge=O(He);!yt.contextShown()&&Ge?(He.contextLayer&&He.contextLayer.render(He.panels,!0),yt.contextShown(!0)):yt.contextShown()&&!Ge&&(He.contextLayer&&He.contextLayer.render(He.panels,!0,!0),yt.contextShown(!1))},se=kt.values;se.length>kt._length&&(se=se.slice(0,kt._length));var Tt=kt.tickvals,Lt;function Mt(He,Ge){return{val:He,text:Lt[Ge]}}function ee(He,Ge){return He.val-Ge.val}if(I(Tt)&&Tt.length){g.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Lt=kt.ticktext,!I(Lt)||!Lt.length?Lt=Tt.map(S(kt.tickformat)):Lt.length>Tt.length?Lt=Lt.slice(0,Tt.length):Tt.length>Lt.length&&(Tt=Tt.slice(0,Lt.length));for(var ve=1;ve=He||jr>=Ge)return;var Wr=oe.lineLayer.readPixel(ur,Ge-1-jr),br=Wr[3]!==0,Xr=br?Wr[2]+256*(Wr[1]+256*Wr[0]):null,nn={x:ur,y:jr,clientX:Te.clientX,clientY:Te.clientY,dataIndex:oe.model.key,curveNumber:Xr};Xr!==It&&(br?tt.hover(nn):tt.unhover&&tt.unhover(nn),It=Xr)}}),kt.style("opacity",function(oe){return oe.pick?0:1}),at.style("background","rgba(255, 255, 255, 0)");var qt=at.selectAll("."+T.cn.parcoords).data(ut,f);qt.exit().remove(),qt.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),qt.attr("transform",function(oe){return a(oe.model.translateX,oe.model.translateY)});var Wt=qt.selectAll("."+T.cn.parcoordsControlView).data(x,f);Wt.enter().append("g").classed(T.cn.parcoordsControlView,!0),Wt.attr("transform",function(oe){return a(oe.model.pad.l,oe.model.pad.t)});var Jt=Wt.selectAll("."+T.cn.yAxis).data(function(oe){return oe.dimensions},f);Jt.enter().append("g").classed(T.cn.yAxis,!0),Wt.each(function(oe){W(Jt,oe,it)}),kt.each(function(oe){if(oe.viewModel){!oe.lineLayer||tt?oe.lineLayer=b(this,oe):oe.lineLayer.update(oe),(oe.key||oe.key===0)&&(oe.viewModel[oe.key]=oe.lineLayer);var Te=!oe.context||tt;oe.lineLayer.render(oe.viewModel.panels,Te)}}),Jt.attr("transform",function(oe){return a(oe.xScale(oe.xIndex),0)}),Jt.call(c.behavior.drag().origin(function(oe){return oe}).on("drag",function(oe){var Te=oe.parent;ft.linePickActive(!1),oe.x=Math.max(-T.overdrag,Math.min(oe.model.width+T.overdrag,c.event.x)),oe.canvasX=oe.x*oe.model.canvasPixelRatio,Jt.sort(function(He,Ge){return He.x-Ge.x}).each(function(He,Ge){He.xIndex=Ge,He.x=oe===He?He.x:He.xScale(He.xIndex),He.canvasX=He.x*He.model.canvasPixelRatio}),W(Jt,Te,it),Jt.filter(function(He){return Math.abs(oe.xIndex-He.xIndex)!==0}).attr("transform",function(He){return a(He.xScale(He.xIndex),0)}),c.select(this).attr("transform",a(oe.x,0)),Jt.each(function(He,Ge,cr){cr===oe.parent.key&&(Te.dimensions[Ge]=He)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer.render&&Te.focusLayer.render(Te.panels)}).on("dragend",function(oe){var Te=oe.parent;oe.x=oe.xScale(oe.xIndex),oe.canvasX=oe.x*oe.model.canvasPixelRatio,W(Jt,Te,it),c.select(this).attr("transform",function(He){return a(He.x,0)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer&&Te.focusLayer.render(Te.panels),Te.pickLayer&&Te.pickLayer.render(Te.panels,!0),ft.linePickActive(!0),tt&&tt.axesMoved&&tt.axesMoved(Te.key,Te.dimensions.map(function(He){return He.crossfilterDimensionIndex}))})),Jt.exit().remove();var ge=Jt.selectAll("."+T.cn.axisOverlays).data(x,f);ge.enter().append("g").classed(T.cn.axisOverlays,!0),ge.selectAll("."+T.cn.axis).remove();var fe=ge.selectAll("."+T.cn.axis).data(x,f);fe.enter().append("g").classed(T.cn.axis,!0),fe.each(function(oe){var Te=oe.model.height/oe.model.tickDistance,He=oe.domainScale,Ge=He.domain();c.select(this).call(c.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Te,oe.tickFormat).tickValues(oe.ordinal?Ge:null).tickFormat(function(cr){return v.isOrdinal(oe)?cr:J(oe.model.dimensions[oe.visibleIndex],cr)}).scale(He)),o.font(fe.selectAll("text"),oe.model.tickFont)}),fe.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),fe.selectAll("text").style("cursor","default");var pe=ge.selectAll("."+T.cn.axisHeading).data(x,f);pe.enter().append("g").classed(T.cn.axisHeading,!0);var se=pe.selectAll("."+T.cn.axisTitle).data(x,f);se.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",dt?"none":"auto"),se.text(function(oe){return oe.label}).each(function(oe){var Te=c.select(this);o.font(Te,oe.model.labelFont),n.convertToTspans(Te,yt)}).attr("transform",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=T.axisTitleOffset;return(Te.dir>0?"":a(0,2*He+oe.model.height))+r(Te.degrees)+a(-He*Te.dx,-He*Te.dy)}).attr("text-anchor",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=Math.abs(Te.dx),Ge=Math.abs(Te.dy);return 2*He>Ge?Te.dir*Te.dx<0?"start":"end":"middle"});var Tt=ge.selectAll("."+T.cn.axisExtent).data(x,f);Tt.enter().append("g").classed(T.cn.axisExtent,!0);var Lt=Tt.selectAll("."+T.cn.axisExtentTop).data(x,f);Lt.enter().append("g").classed(T.cn.axisExtentTop,!0),Lt.attr("transform",a(0,-T.axisExtentOffset));var Mt=Lt.selectAll("."+T.cn.axisExtentTopText).data(x,f);Mt.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(H),Mt.text(function(oe){return lt(oe,!0)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)});var ee=Tt.selectAll("."+T.cn.axisExtentBottom).data(x,f);ee.enter().append("g").classed(T.cn.axisExtentBottom,!0),ee.attr("transform",function(oe){return a(0,oe.model.height+T.axisExtentOffset)});var ve=ee.selectAll("."+T.cn.axisExtentBottomText).data(x,f);ve.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ve.text(function(oe){return lt(oe,!1)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)}),u.ensureAxisBrush(ge,Y,yt)}}),yE=Dt((r,Z)=>{var c=hW(),g=gT(),I=vE().isVisible,S={};function t(a,n,o){var i=n.indexOf(o),l=a.indexOf(i);return l===-1&&(l+=n.length),l}function e(a,n){return function(o,i){return t(a,n,o)-t(a,n,i)}}var r=Z.exports=function(a,n){var o=a._fullLayout,i=g(a,[],S);if(i){var l={},f={},x={},y={},v=o._size;n.forEach(function(P,M){var C=P[0].trace;x[M]=C.index;var A=y[M]=C.index;l[M]=a.data[A].dimensions,f[M]=a.data[A].dimensions.slice()});var T=function(P,M,C){var A=f[P][M],h=C.map(function(j){return j.slice()}),p="dimensions["+M+"].constraintrange",k=o._tracePreGUI[a._fullData[x[P]]._fullInput.uid];if(k[p]===void 0){var w=A.constraintrange;k[p]=w||null}var R=a._fullData[x[P]].dimensions[M];h.length?(h.length===1&&(h=h[0]),A.constraintrange=h,R.constraintrange=h.slice(),h=[h]):(delete A.constraintrange,delete R.constraintrange,h=null);var O={};O[p]=h,a.emit("plotly_restyle",[O,[y[P]]])},u=function(P){a.emit("plotly_hover",P)},b=function(P){a.emit("plotly_unhover",P)},_=function(P,M){var C=e(M,f[P].filter(I));l[P].sort(C),f[P].filter(function(A){return!I(A)}).sort(function(A){return f[P].indexOf(A)}).forEach(function(A){l[P].splice(l[P].indexOf(A),1),l[P].splice(f[P].indexOf(A),0,A)}),a.emit("plotly_restyle",[{dimensions:[l[P]]},[y[P]]])};c(a,n,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:T,hover:u,unhover:b,axesMoved:_})}};r.reglPrecompiled=S}),fW=Dt(Q=>{var Z=qr(),c=ud().getModuleCalcData,g=yE(),I=Dp();Q.name="parcoords",Q.plot=function(S){var t=c(S.calcdata,"parcoords")[0];t.length&&g(S,t)},Q.clean=function(S,t,e,r){var a=r._has&&r._has("parcoords"),n=t._has&&t._has("parcoords");a&&!n&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Q.toSVG=function(S){var t=S._fullLayout._glimages,e=Z.select(S).selectAll(".svg-container"),r=e.filter(function(n,o){return o===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var n=this,o=n.toDataURL("image/png"),i=t.append("svg:image");i.attr({xmlns:I.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}r.each(a),window.setTimeout(function(){Z.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}),dW=Dt((Q,Z)=>{Z.exports={attributes:fE(),supplyDefaults:nW(),calc:iW(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:fW(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}),pW=Dt((Q,Z)=>{var c=dW();c.plot=yE(),Z.exports=c}),mW=Dt((Q,Z)=>{Z.exports=pW()}),xE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Ho(),I=da(),S=kc(),{hovertemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=jh().attributes,a=c({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});Z.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:c({},g.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({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:I({editType:"calc"}),tickfont:I({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:a,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}}),gW=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=jh().defaults,t=Ad(),e=xE(),r=vT(),a=Ma().isTypedArraySpec;function n(i,l,f,x,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var v=y("line.color",x.colorway[0]);if(g(i,"line")&&c.isArrayOrTypedArray(v)){if(v.length)return y("line.colorscale"),I(i,l,x,y,{prefix:"line.",cLetter:"c"}),v.length;l.line.color=f}return 1/0}function o(i,l){function f(_,P){return c.coerce(i,l,e.dimensions,_,P)}var x=f("values"),y=f("visible");if(x&&x.length||(y=l.visible=!1),y){f("label"),f("displayindex",l._index);var v=i.categoryarray,T=c.isArrayOrTypedArray(v)&&v.length>0||a(v),u;T&&(u="array");var b=f("categoryorder",u);b==="array"?(f("categoryarray"),f("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&b==="array"&&(l.categoryorder="trace")}}Z.exports=function(i,l,f,x){function y(b,_){return c.coerce(i,l,e,b,_)}var v=t(i,l,{name:"dimensions",handleItemDefaults:o}),T=n(i,l,f,x,y);S(l,x,y),(!Array.isArray(v)||!v.length)&&(l.visible=!1),r(l,v,"values",T),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var u=x.font;c.coerceFont(y,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),c.coerceFont(y,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}}),vW=Dt((Q,Z)=>{var c=zg().wrap,g=Ud().hasColorscale,I=Xd(),S=Ec(),t=Vs(),e=kn(),r=Yi();Z.exports=function(u,b){var _=e.filterVisible(b.dimensions);if(_.length===0)return[];var P=_.map(function(st){var tt;if(st.categoryorder==="trace")tt=null;else if(st.categoryorder==="array")tt=st.categoryarray;else{tt=S(st.values);for(var dt=!0,rt=0;rt=u.length||b[u[_]]!==void 0)return!1;b[u[_]]=!0}return!0}}),yW=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolateNumber,I=G_(),S=tf(),t=kn(),e=t.strTranslate,r=Vs(),a=ro(),n=ec();function o(at,vt,it,Y){var ft=vt._context.staticPlot,ut=at.map(mt.bind(0,vt,it)),kt=Y.selectAll("g.parcatslayer").data([null]);kt.enter().append("g").attr("class","parcatslayer").style("pointer-events",ft?"none":"all");var It=kt.selectAll("g.trace.parcats").data(ut,i),Pt=It.enter().append("g").attr("class","trace parcats");It.attr("transform",function(Mt){return e(Mt.x,Mt.y)}),Pt.append("g").attr("class","paths");var qt=It.select("g.paths"),Wt=qt.selectAll("path.path").data(function(Mt){return Mt.paths},i);Wt.attr("fill",function(Mt){return Mt.model.color});var Jt=Wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.model.color}).attr("fill-opacity",0);b(Jt),Wt.attr("d",function(Mt){return Mt.svgD}),Jt.empty()||Wt.sort(f),Wt.exit().remove(),Wt.on("mouseover",x).on("mouseout",y).on("click",u),Pt.append("g").attr("class","dimensions");var ge=It.select("g.dimensions"),fe=ge.selectAll("g.dimension").data(function(Mt){return Mt.dimensions},i);fe.enter().append("g").attr("class","dimension"),fe.attr("transform",function(Mt){return e(Mt.x,0)}),fe.exit().remove();var pe=fe.selectAll("g.category").data(function(Mt){return Mt.categories},i),se=pe.enter().append("g").attr("class","category");pe.attr("transform",function(Mt){return e(0,Mt.y)}),se.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}),M(se);var Tt=pe.selectAll("rect.bandrect").data(function(Mt){return Mt.bands},i);Tt.each(function(){t.raiseToTop(this)}),Tt.attr("fill",function(Mt){return Mt.color});var Lt=Tt.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.color}).attr("fill-opacity",0);Tt.attr("fill",function(Mt){return Mt.color}).attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}).attr("y",function(Mt){return Mt.y}).attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":Mt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Lt),Tt.exit().remove(),se.append("text").attr("class","catlabel").attr("pointer-events","none"),pe.select("text.catlabel").attr("text-anchor",function(Mt){return l(Mt)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Mt){return l(Mt)?Mt.width+5:-5}).attr("y",function(Mt){return Mt.height/2}).text(function(Mt){return Mt.model.categoryLabel}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.categorylabelfont),n.convertToTspans(c.select(this),vt)}),se.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Mt){return Mt.width/2}).attr("y",-5).text(function(Mt,ee){return ee===0?Mt.parcatsViewModel.model.dimensions[Mt.model.dimensionInd].dimensionLabel:null}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",H).on("mouseout",F),pe.exit().remove(),fe.call(c.behavior.drag().origin(function(Mt){return{x:Mt.x,y:0}}).on("dragstart",U).on("drag",W).on("dragend",q)),It.each(function(Mt){Mt.traceSelection=c.select(this),Mt.pathSelection=c.select(this).selectAll("g.paths").selectAll("path.path"),Mt.dimensionSelection=c.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),It.exit().remove()}Z.exports=function(at,vt,it,Y){o(it,at,Y,vt)};function i(at){return at.key}function l(at){var vt=at.parcatsViewModel.dimensions.length,it=at.parcatsViewModel.dimensions[vt-1].model.dimensionInd;return at.model.dimensionInd===it}function f(at,vt){return at.model.rawColor>vt.model.rawColor?1:at.model.rawColor"),Te=c.mouse(ft)[0];S.loneHover({trace:ut,x:pe-It.left+Pt.left,y:se-It.top+Pt.top,text:oe,color:at.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Tt,idealAlign:Te1&&qt.displayInd===Pt.dimensions.length-1?(ge=kt.left,fe="left"):(ge=kt.left+kt.width,fe="right");var pe=It.model.count,se=It.model.categoryLabel,Tt=pe/It.parcatsViewModel.model.count,Lt={countLabel:pe,categoryLabel:se,probabilityLabel:Tt.toFixed(3)},Mt=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Lt.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Mt.push(["P("+Lt.categoryLabel+"):",Lt.probabilityLabel].join(" "));var ee=Mt.join("
");return{trace:Wt,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:ee,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Lt,eventData:[{data:Wt._input,fullData:Wt,count:pe,category:se,probability:Tt}]}}function j(at,vt,it){var Y=[];return c.select(it.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ft=this;Y.push(O(at,vt,ft))}),Y}function V(at,vt,it){at._fullLayout._calcInverseTransform(at);var Y=at._fullLayout._invScaleX,ft=at._fullLayout._invScaleY,ut=it.getBoundingClientRect(),kt=c.select(it).datum(),It=kt.categoryViewModel,Pt=It.parcatsViewModel,qt=Pt.model.dimensions[It.model.dimensionInd],Wt=Pt.trace,Jt=ut.y+ut.height/2,ge,fe;Pt.dimensions.length>1&&qt.displayInd===Pt.dimensions.length-1?(ge=ut.left,fe="left"):(ge=ut.left+ut.width,fe="right");var pe=It.model.categoryLabel,se=kt.parcatsViewModel.model.count,Tt=0;kt.categoryViewModel.bands.forEach(function(ur){ur.color===kt.color&&(Tt+=ur.count)});var Lt=It.model.count,Mt=0;Pt.pathSelection.each(function(ur){ur.model.color===kt.color&&(Mt+=ur.model.count)});var ee=Tt/se,ve=Tt/Mt,oe=Tt/Lt,Te={countLabel:Tt,categoryLabel:pe,probabilityLabel:ee.toFixed(3)},He=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&He.push(["Count:",Te.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(He.push("P(color ∩ "+pe+"): "+Te.probabilityLabel),He.push("P("+pe+" | color): "+ve.toFixed(3)),He.push("P(color | "+pe+"): "+oe.toFixed(3)));var Ge=He.join("
"),cr=a.mostReadable(kt.color,["black","white"]);return{trace:Wt,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:Ge,color:kt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Te,eventData:[{data:Wt._input,fullData:Wt,category:pe,count:se,probability:ee,categorycount:Lt,colorcount:Mt,bandcolorcount:Tt}]}}function H(at){if(!at.parcatsViewModel.dragDimension&&at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var vt=c.mouse(this)[1];if(vt<-1)return;var it=at.parcatsViewModel.graphDiv,Y=it._fullLayout,ft=Y._paperdiv.node().getBoundingClientRect(),ut=at.parcatsViewModel.hoveron,kt=this;if(ut==="color"?(k(kt),R(kt,"plotly_hover",c.event)):(p(kt),w(kt,"plotly_hover",c.event)),at.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var It;ut==="category"?It=O(it,ft,kt):ut==="color"?It=V(it,ft,kt):ut==="dimension"&&(It=j(it,ft,kt)),It&&S.loneHover(It,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:it})}}}function F(at){var vt=at.parcatsViewModel;if(!vt.dragDimension&&(b(vt.pathSelection),M(vt.dimensionSelection.selectAll("g.category")),A(vt.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(vt.graphDiv._fullLayout._hoverlayer.node()),vt.pathSelection.sort(f),vt.hoverinfoItems.indexOf("skip")===-1)){var it=at.parcatsViewModel.hoveron,Y=this;it==="color"?R(Y,"plotly_unhover",c.event):w(Y,"plotly_unhover",c.event)}}function U(at){at.parcatsViewModel.arrangement!=="fixed"&&(at.dragDimensionDisplayInd=at.model.displayInd,at.initialDragDimensionDisplayInds=at.parcatsViewModel.model.dimensions.map(function(vt){return vt.displayInd}),at.dragHasMoved=!1,at.dragCategoryDisplayInd=null,c.select(this).selectAll("g.category").select("rect.catrect").each(function(vt){var it=c.mouse(this)[0],Y=c.mouse(this)[1];-2<=it&&it<=vt.width+2&&-2<=Y&&Y<=vt.height+2&&(at.dragCategoryDisplayInd=vt.model.displayInd,at.initialDragCategoryDisplayInds=at.model.categories.map(function(ft){return ft.displayInd}),vt.model.dragY=vt.y,t.raiseToTop(this.parentNode),c.select(this.parentNode).selectAll("rect.bandrect").each(function(ft){ft.yWt.y+Wt.height/2&&(ut.model.displayInd=Wt.model.displayInd,Wt.model.displayInd=It),at.dragCategoryDisplayInd=ut.model.displayInd}if(at.dragCategoryDisplayInd===null||at.parcatsViewModel.arrangement==="freeform"){ft.model.dragX=c.event.x;var Jt=at.parcatsViewModel.dimensions[it],ge=at.parcatsViewModel.dimensions[Y];Jt!==void 0&&ft.model.dragXge.x&&(ft.model.displayInd=ge.model.displayInd,ge.model.displayInd=at.dragDimensionDisplayInd),at.dragDimensionDisplayInd=ft.model.displayInd}dt(at.parcatsViewModel),tt(at.parcatsViewModel),yt(at.parcatsViewModel),lt(at.parcatsViewModel)}}function q(at){if(at.parcatsViewModel.arrangement!=="fixed"&&at.dragDimensionDisplayInd!==null){c.select(this).selectAll("text").attr("font-weight","normal");var vt={},it=J(at.parcatsViewModel),Y=at.parcatsViewModel.model.dimensions.map(function(ge){return ge.displayInd}),ft=at.initialDragDimensionDisplayInds.some(function(ge,fe){return ge!==Y[fe]});ft&&Y.forEach(function(ge,fe){var pe=at.parcatsViewModel.model.dimensions[fe].containerInd;vt["dimensions["+pe+"].displayindex"]=ge});var ut=!1;if(at.dragCategoryDisplayInd!==null){var kt=at.model.categories.map(function(ge){return ge.displayInd});if(ut=at.initialDragCategoryDisplayInds.some(function(ge,fe){return ge!==kt[fe]}),ut){var It=at.model.categories.slice().sort(function(ge,fe){return ge.displayInd-fe.displayInd}),Pt=It.map(function(ge){return ge.categoryValue}),qt=It.map(function(ge){return ge.categoryLabel});vt["dimensions["+at.model.containerInd+"].categoryarray"]=[Pt],vt["dimensions["+at.model.containerInd+"].ticktext"]=[qt],vt["dimensions["+at.model.containerInd+"].categoryorder"]="array"}}if(at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!at.dragHasMoved&&at.potentialClickBand&&(at.parcatsViewModel.hoveron==="color"?R(at.potentialClickBand,"plotly_click",c.event.sourceEvent):w(at.potentialClickBand,"plotly_click",c.event.sourceEvent)),at.model.dragX=null,at.dragCategoryDisplayInd!==null){var Wt=at.parcatsViewModel.dimensions[at.dragDimensionDisplayInd].categories[at.dragCategoryDisplayInd];Wt.model.dragY=null,at.dragCategoryDisplayInd=null}at.dragDimensionDisplayInd=null,at.parcatsViewModel.dragDimension=null,at.dragHasMoved=null,at.potentialClickBand=null,dt(at.parcatsViewModel),tt(at.parcatsViewModel);var Jt=c.transition().duration(300).ease("cubic-in-out");Jt.each(function(){yt(at.parcatsViewModel,!0),lt(at.parcatsViewModel,!0)}).each("end",function(){(ft||ut)&&I.restyle(at.parcatsViewModel.graphDiv,vt,[it])})}}function J(at){for(var vt,it=at.graphDiv._fullData,Y=0;Y=0;Pt--)qt+="C"+kt[Pt]+","+(vt[Pt+1]+Y)+" "+ut[Pt]+","+(vt[Pt]+Y)+" "+(at[Pt]+it[Pt])+","+(vt[Pt]+Y),qt+="l-"+it[Pt]+",0 ";return qt+="Z",qt}function tt(at){var vt=at.dimensions,it=at.model,Y=vt.map(function(br){return br.categories.map(function(Xr){return Xr.y})}),ft=at.model.dimensions.map(function(br){return br.categories.map(function(Xr){return Xr.displayInd})}),ut=at.model.dimensions.map(function(br){return br.displayInd}),kt=at.dimensions.map(function(br){return br.model.dimensionInd}),It=vt.map(function(br){return br.x}),Pt=vt.map(function(br){return br.width}),qt=[];for(var Wt in it.paths)it.paths.hasOwnProperty(Wt)&&qt.push(it.paths[Wt]);function Jt(br){var Xr=br.categoryInds.map(function(Le,Gt){return ft[Gt][Le]}),nn=kt.map(function(Le){return Xr[Le]});return nn}qt.sort(function(br,Xr){var nn=Jt(br),Le=Jt(Xr);return at.sortpaths==="backward"&&(nn.reverse(),Le.reverse()),nn.push(br.valueInds[0]),Le.push(Xr.valueInds[0]),at.bundlecolors&&(nn.unshift(br.rawColor),Le.unshift(Xr.rawColor)),nnLe?1:0});for(var ge=new Array(qt.length),fe=vt[0].model.count,pe=vt[0].categories.map(function(br){return br.height}).reduce(function(br,Xr){return br+Xr}),se=0;se0?Lt=pe*(Tt.count/fe):Lt=0;for(var Mt=new Array(Y.length),ee=0;ee1?kt=(at.width-2*it-Y)/(ft-1):kt=0,It=it,Pt=It+kt*ut;var qt=[],Wt=at.model.maxCats,Jt=vt.categories.length,ge=8,fe=vt.count,pe=at.height-ge*(Wt-1),se,Tt,Lt,Mt,ee,ve=(Wt-Jt)*ge/2,oe=vt.categories.map(function(Te){return{displayInd:Te.displayInd,categoryInd:Te.categoryInd}});for(oe.sort(function(Te,He){return Te.displayInd-He.displayInd}),ee=0;ee0?se=Tt.count/fe*pe:se=0,Lt={key:Tt.valueInds[0],model:Tt,width:Y,height:se,y:Tt.dragY!==null?Tt.dragY:ve,bands:[],parcatsViewModel:at},ve=ve+se+ge,qt.push(Lt);return{key:vt.dimensionInd,x:vt.dragX!==null?vt.dragX:Pt,y:0,width:Y,model:vt,categories:qt,parcatsViewModel:at,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}),_E=Dt((Q,Z)=>{var c=yW();Z.exports=function(g,I,S,t){var e=g._fullLayout,r=e._paper,a=e._size;c(g,r,I,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},S,t)}}),xW=Dt(Q=>{var Z=ud().getModuleCalcData,c=_E(),g="parcats";Q.name=g,Q.plot=function(I,S,t,e){var r=Z(I.calcdata,g);if(r.length){var a=r[0];c(I,a,t,e)}},Q.clean=function(I,S,t,e){var r=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");r&&!a&&e._paperdiv.selectAll(".parcats").remove()}}),_W=Dt((Q,Z)=>{Z.exports={attributes:xE(),supplyDefaults:gW(),calc:vW(),plot:_E(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:xW(),categories:["noOpacity"],meta:{}}}),bW=Dt((Q,Z)=>{Z.exports=_W()}),Ev=Dt((Q,Z)=>{var c=G0(),g="1.13.4",I='© OpenStreetMap contributors',S=['© Carto',I].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:I,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},a=c(r);Z.exports={requiredVersion:g,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+g+"."].join(` +`),I=C3().maxDimensionCount,S=kn(),t=1e-6,e=2048,r=new Uint8Array(4),a=new Uint8Array(4),n={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(A){A.read({x:0,y:0,width:1,height:1,data:r})}function i(A,h,p,k,w){var B=A._gl;B.enable(B.SCISSOR_TEST),B.scissor(h,p,k,w),A.clear({color:[0,0,0,0],depth:1})}function l(A,h,p,k,w,B){var O=B.key;function j(V){var H=Math.min(k,w-V*k);V===0&&(window.cancelAnimationFrame(p.currentRafs[O]),delete p.currentRafs[O],i(A,B.scissorX,B.scissorY,B.scissorWidth,B.viewBoxSize[1])),!p.clearOnly&&(B.count=2*H,B.offset=2*V*k,h(B),V*k+H>>8*h)%256/255}function v(A,h,p){for(var k=new Array(A*(I+4)),w=0,B=0;BWt&&(Wt=it[kt].dim1.canvasX,Pt=kt);ut===0&&i(w,0,0,H.canvasWidth,H.canvasHeight);var Jt=tt(p);for(kt=0;kt{var c=Wr(),g=kn(),I=g.isArrayOrTypedArray,S=g.numberFormat,t=(MW(),ii(yE)).default,e=Ls(),r=g.strRotate,a=g.strTranslate,n=ec(),o=Vs(),i=Xc(),l=Og(),f=l.keyFun,x=l.repeat,y=l.unwrap,v=xE(),T=C3(),u=mE(),b=SW();function _(yt,mt,st){return g.aggNums(yt,null,mt,st)}function P(yt,mt){return C(_(Math.min,yt,mt),_(Math.max,yt,mt))}function M(yt){var mt=yt.range;return mt?C(mt[0],mt[1]):P(yt.values,yt._length)}function C(yt,mt){return(isNaN(yt)||!isFinite(yt))&&(yt=0),(isNaN(mt)||!isFinite(mt))&&(mt=0),yt===mt&&(yt===0?(yt-=1,mt+=1):(yt*=.9,mt*=1.1)),[yt,mt]}function A(yt,mt){return mt?function(st,tt){var pt=mt[tt];return pt??yt(st)}:yt}function h(yt,mt,st,tt,pt){var rt=M(st);return tt?c.scale.ordinal().domain(tt.map(A(S(st.tickformat),pt))).range(tt.map(function(at){var vt=(at-rt[0])/(rt[1]-rt[0]);return yt-mt+vt*(2*mt-yt)})):c.scale.linear().domain(rt).range([yt-mt,mt])}function p(yt,mt){return c.scale.linear().range([mt,yt-mt])}function k(yt,mt){return c.scale.linear().domain(M(yt)).range([mt,1-mt])}function w(yt){if(yt.tickvals){var mt=M(yt);return c.scale.ordinal().domain(yt.tickvals).range(yt.tickvals.map(function(st){return(st-mt[0])/(mt[1]-mt[0])}))}}function B(yt){var mt=yt.map(function(rt){return rt[0]}),st=yt.map(function(rt){var at=t(rt[1]);return c.rgb("rgb("+at[0]+","+at[1]+","+at[2]+")")}),tt=function(rt){return function(at){return at[rt]}},pt="rgb".split("").map(function(rt){return c.scale.linear().clamp(!0).domain(mt).range(st.map(tt(rt)))});return function(rt){return pt.map(function(at){return at(rt)})}}function O(yt){return yt.dimensions.some(function(mt){return mt.brush.filterSpecified})}function j(yt,mt,st){var tt=y(mt),pt=tt.trace,rt=v.convertTypedArray(tt.lineColor),at=pt.line,vt={color:t(pt.unselected.line.color),opacity:pt.unselected.line.opacity},it=i.extractOpts(at),K=it.reversescale?i.flipScale(tt.cscale):tt.cscale,ft=pt.domain,ut=pt.dimensions,kt=yt.width,It=pt.labelangle,Pt=pt.labelside,qt=pt.labelfont,Wt=pt.tickfont,Jt=pt.rangefont,ge=g.extendDeepNoArrays({},at,{color:rt.map(c.scale.linear().domain(M({values:rt,range:[it.min,it.max],_length:pt._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),fe=Math.floor(kt*(ft.x[1]-ft.x[0])),pe=Math.floor(yt.height*(ft.y[1]-ft.y[0])),se=yt.margin||{l:80,r:80,t:100,b:80},Tt=fe,Lt=pe;return{key:st,colCount:ut.filter(v.isVisible).length,dimensions:ut,tickDistance:T.tickDistance,unitToColor:B(K),lines:ge,deselectedLines:vt,labelAngle:It,labelSide:Pt,labelFont:qt,tickFont:Wt,rangeFont:Jt,layoutWidth:kt,layoutHeight:yt.height,domain:ft,translateX:ft.x[0]*kt,translateY:yt.height-ft.y[1]*yt.height,pad:se,canvasWidth:Tt*T.canvasPixelRatio+2*ge.canvasOverdrag,canvasHeight:Lt*T.canvasPixelRatio,width:Tt,height:Lt,canvasPixelRatio:T.canvasPixelRatio}}function V(yt,mt,st){var tt=st.width,pt=st.height,rt=st.dimensions,at=st.canvasPixelRatio,vt=function(kt){return tt*kt/Math.max(1,st.colCount-1)},it=T.verticalPadding/pt,K=p(pt,T.verticalPadding),ft={key:st.key,xScale:vt,model:st,inBrushDrag:!1},ut={};return ft.dimensions=rt.filter(v.isVisible).map(function(kt,It){var Pt=k(kt,it),qt=ut[kt.label];ut[kt.label]=(qt||0)+1;var Wt=kt.label+(qt?"__"+qt:""),Jt=kt.constraintrange,ge=Jt&&Jt.length;ge&&!I(Jt[0])&&(Jt=[Jt]);var fe=ge?Jt.map(function(He){return He.map(Pt)}):[[-1/0,1/0]],pe=function(){var He=ft;He.focusLayer&&He.focusLayer.render(He.panels,!0);var Ge=O(He);!yt.contextShown()&&Ge?(He.contextLayer&&He.contextLayer.render(He.panels,!0),yt.contextShown(!0)):yt.contextShown()&&!Ge&&(He.contextLayer&&He.contextLayer.render(He.panels,!0,!0),yt.contextShown(!1))},se=kt.values;se.length>kt._length&&(se=se.slice(0,kt._length));var Tt=kt.tickvals,Lt;function Mt(He,Ge){return{val:He,text:Lt[Ge]}}function ee(He,Ge){return He.val-Ge.val}if(I(Tt)&&Tt.length){g.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Lt=kt.ticktext,!I(Lt)||!Lt.length?Lt=Tt.map(S(kt.tickformat)):Lt.length>Tt.length?Lt=Lt.slice(0,Tt.length):Tt.length>Lt.length&&(Tt=Tt.slice(0,Lt.length));for(var ve=1;ve=He||jr>=Ge)return;var qr=oe.lineLayer.readPixel(ur,Ge-1-jr),br=qr[3]!==0,Xr=br?qr[2]+256*(qr[1]+256*qr[0]):null,nn={x:ur,y:jr,clientX:Ae.clientX,clientY:Ae.clientY,dataIndex:oe.model.key,curveNumber:Xr};Xr!==It&&(br?tt.hover(nn):tt.unhover&&tt.unhover(nn),It=Xr)}}),kt.style("opacity",function(oe){return oe.pick?0:1}),at.style("background","rgba(255, 255, 255, 0)");var qt=at.selectAll("."+T.cn.parcoords).data(ut,f);qt.exit().remove(),qt.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),qt.attr("transform",function(oe){return a(oe.model.translateX,oe.model.translateY)});var Wt=qt.selectAll("."+T.cn.parcoordsControlView).data(x,f);Wt.enter().append("g").classed(T.cn.parcoordsControlView,!0),Wt.attr("transform",function(oe){return a(oe.model.pad.l,oe.model.pad.t)});var Jt=Wt.selectAll("."+T.cn.yAxis).data(function(oe){return oe.dimensions},f);Jt.enter().append("g").classed(T.cn.yAxis,!0),Wt.each(function(oe){W(Jt,oe,it)}),kt.each(function(oe){if(oe.viewModel){!oe.lineLayer||tt?oe.lineLayer=b(this,oe):oe.lineLayer.update(oe),(oe.key||oe.key===0)&&(oe.viewModel[oe.key]=oe.lineLayer);var Ae=!oe.context||tt;oe.lineLayer.render(oe.viewModel.panels,Ae)}}),Jt.attr("transform",function(oe){return a(oe.xScale(oe.xIndex),0)}),Jt.call(c.behavior.drag().origin(function(oe){return oe}).on("drag",function(oe){var Ae=oe.parent;ft.linePickActive(!1),oe.x=Math.max(-T.overdrag,Math.min(oe.model.width+T.overdrag,c.event.x)),oe.canvasX=oe.x*oe.model.canvasPixelRatio,Jt.sort(function(He,Ge){return He.x-Ge.x}).each(function(He,Ge){He.xIndex=Ge,He.x=oe===He?He.x:He.xScale(He.xIndex),He.canvasX=He.x*He.model.canvasPixelRatio}),W(Jt,Ae,it),Jt.filter(function(He){return Math.abs(oe.xIndex-He.xIndex)!==0}).attr("transform",function(He){return a(He.xScale(He.xIndex),0)}),c.select(this).attr("transform",a(oe.x,0)),Jt.each(function(He,Ge,cr){cr===oe.parent.key&&(Ae.dimensions[Ge]=He)}),Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!1,!O(Ae)),Ae.focusLayer.render&&Ae.focusLayer.render(Ae.panels)}).on("dragend",function(oe){var Ae=oe.parent;oe.x=oe.xScale(oe.xIndex),oe.canvasX=oe.x*oe.model.canvasPixelRatio,W(Jt,Ae,it),c.select(this).attr("transform",function(He){return a(He.x,0)}),Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!1,!O(Ae)),Ae.focusLayer&&Ae.focusLayer.render(Ae.panels),Ae.pickLayer&&Ae.pickLayer.render(Ae.panels,!0),ft.linePickActive(!0),tt&&tt.axesMoved&&tt.axesMoved(Ae.key,Ae.dimensions.map(function(He){return He.crossfilterDimensionIndex}))})),Jt.exit().remove();var ge=Jt.selectAll("."+T.cn.axisOverlays).data(x,f);ge.enter().append("g").classed(T.cn.axisOverlays,!0),ge.selectAll("."+T.cn.axis).remove();var fe=ge.selectAll("."+T.cn.axis).data(x,f);fe.enter().append("g").classed(T.cn.axis,!0),fe.each(function(oe){var Ae=oe.model.height/oe.model.tickDistance,He=oe.domainScale,Ge=He.domain();c.select(this).call(c.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ae,oe.tickFormat).tickValues(oe.ordinal?Ge:null).tickFormat(function(cr){return v.isOrdinal(oe)?cr:J(oe.model.dimensions[oe.visibleIndex],cr)}).scale(He)),o.font(fe.selectAll("text"),oe.model.tickFont)}),fe.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),fe.selectAll("text").style("cursor","default");var pe=ge.selectAll("."+T.cn.axisHeading).data(x,f);pe.enter().append("g").classed(T.cn.axisHeading,!0);var se=pe.selectAll("."+T.cn.axisTitle).data(x,f);se.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",pt?"none":"auto"),se.text(function(oe){return oe.label}).each(function(oe){var Ae=c.select(this);o.font(Ae,oe.model.labelFont),n.convertToTspans(Ae,yt)}).attr("transform",function(oe){var Ae=U(oe.model.labelAngle,oe.model.labelSide),He=T.axisTitleOffset;return(Ae.dir>0?"":a(0,2*He+oe.model.height))+r(Ae.degrees)+a(-He*Ae.dx,-He*Ae.dy)}).attr("text-anchor",function(oe){var Ae=U(oe.model.labelAngle,oe.model.labelSide),He=Math.abs(Ae.dx),Ge=Math.abs(Ae.dy);return 2*He>Ge?Ae.dir*Ae.dx<0?"start":"end":"middle"});var Tt=ge.selectAll("."+T.cn.axisExtent).data(x,f);Tt.enter().append("g").classed(T.cn.axisExtent,!0);var Lt=Tt.selectAll("."+T.cn.axisExtentTop).data(x,f);Lt.enter().append("g").classed(T.cn.axisExtentTop,!0),Lt.attr("transform",a(0,-T.axisExtentOffset));var Mt=Lt.selectAll("."+T.cn.axisExtentTopText).data(x,f);Mt.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(H),Mt.text(function(oe){return lt(oe,!0)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)});var ee=Tt.selectAll("."+T.cn.axisExtentBottom).data(x,f);ee.enter().append("g").classed(T.cn.axisExtentBottom,!0),ee.attr("transform",function(oe){return a(0,oe.model.height+T.axisExtentOffset)});var ve=ee.selectAll("."+T.cn.axisExtentBottomText).data(x,f);ve.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ve.text(function(oe){return lt(oe,!1)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)}),u.ensureAxisBrush(ge,K,yt)}}),_E=Dt((r,Z)=>{var c=EW(),g=vT(),I=xE().isVisible,S={};function t(a,n,o){var i=n.indexOf(o),l=a.indexOf(i);return l===-1&&(l+=n.length),l}function e(a,n){return function(o,i){return t(a,n,o)-t(a,n,i)}}var r=Z.exports=function(a,n){var o=a._fullLayout,i=g(a,[],S);if(i){var l={},f={},x={},y={},v=o._size;n.forEach(function(P,M){var C=P[0].trace;x[M]=C.index;var A=y[M]=C.index;l[M]=a.data[A].dimensions,f[M]=a.data[A].dimensions.slice()});var T=function(P,M,C){var A=f[P][M],h=C.map(function(j){return j.slice()}),p="dimensions["+M+"].constraintrange",k=o._tracePreGUI[a._fullData[x[P]]._fullInput.uid];if(k[p]===void 0){var w=A.constraintrange;k[p]=w||null}var B=a._fullData[x[P]].dimensions[M];h.length?(h.length===1&&(h=h[0]),A.constraintrange=h,B.constraintrange=h.slice(),h=[h]):(delete A.constraintrange,delete B.constraintrange,h=null);var O={};O[p]=h,a.emit("plotly_restyle",[O,[y[P]]])},u=function(P){a.emit("plotly_hover",P)},b=function(P){a.emit("plotly_unhover",P)},_=function(P,M){var C=e(M,f[P].filter(I));l[P].sort(C),f[P].filter(function(A){return!I(A)}).sort(function(A){return f[P].indexOf(A)}).forEach(function(A){l[P].splice(l[P].indexOf(A),1),l[P].splice(f[P].indexOf(A),0,A)}),a.emit("plotly_restyle",[{dimensions:[l[P]]},[y[P]]])};c(a,n,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:T,hover:u,unhover:b,axesMoved:_})}};r.reglPrecompiled=S}),CW=Dt(Q=>{var Z=Wr(),c=ud().getModuleCalcData,g=_E(),I=Dp();Q.name="parcoords",Q.plot=function(S){var t=c(S.calcdata,"parcoords")[0];t.length&&g(S,t)},Q.clean=function(S,t,e,r){var a=r._has&&r._has("parcoords"),n=t._has&&t._has("parcoords");a&&!n&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Q.toSVG=function(S){var t=S._fullLayout._glimages,e=Z.select(S).selectAll(".svg-container"),r=e.filter(function(n,o){return o===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var n=this,o=n.toDataURL("image/png"),i=t.append("svg:image");i.attr({xmlns:I.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}r.each(a),window.setTimeout(function(){Z.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}),LW=Dt((Q,Z)=>{Z.exports={attributes:pE(),supplyDefaults:_W(),calc:bW(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:CW(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}),PW=Dt((Q,Z)=>{var c=LW();c.plot=_E(),Z.exports=c}),IW=Dt((Q,Z)=>{Z.exports=PW()}),bE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=qo(),I=ma(),S=kc(),{hovertemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=Uh().attributes,a=c({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});Z.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:c({},g.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({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:I({editType:"calc"}),tickfont:I({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:a,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}}),zW=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=Uh().defaults,t=Ad(),e=bE(),r=yT(),a=la().isTypedArraySpec;function n(i,l,f,x,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var v=y("line.color",x.colorway[0]);if(g(i,"line")&&c.isArrayOrTypedArray(v)){if(v.length)return y("line.colorscale"),I(i,l,x,y,{prefix:"line.",cLetter:"c"}),v.length;l.line.color=f}return 1/0}function o(i,l){function f(_,P){return c.coerce(i,l,e.dimensions,_,P)}var x=f("values"),y=f("visible");if(x&&x.length||(y=l.visible=!1),y){f("label"),f("displayindex",l._index);var v=i.categoryarray,T=c.isArrayOrTypedArray(v)&&v.length>0||a(v),u;T&&(u="array");var b=f("categoryorder",u);b==="array"?(f("categoryarray"),f("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&b==="array"&&(l.categoryorder="trace")}}Z.exports=function(i,l,f,x){function y(b,_){return c.coerce(i,l,e,b,_)}var v=t(i,l,{name:"dimensions",handleItemDefaults:o}),T=n(i,l,f,x,y);S(l,x,y),(!Array.isArray(v)||!v.length)&&(l.visible=!1),r(l,v,"values",T),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var u=x.font;c.coerceFont(y,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),c.coerceFont(y,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}}),OW=Dt((Q,Z)=>{var c=Og().wrap,g=Ud().hasColorscale,I=Xd(),S=Cc(),t=Vs(),e=kn(),r=Hn();Z.exports=function(u,b){var _=e.filterVisible(b.dimensions);if(_.length===0)return[];var P=_.map(function(st){var tt;if(st.categoryorder==="trace")tt=null;else if(st.categoryorder==="array")tt=st.categoryarray;else{tt=S(st.values);for(var pt=!0,rt=0;rt=u.length||b[u[_]]!==void 0)return!1;b[u[_]]=!0}return!0}}),DW=Dt((Q,Z)=>{var c=Wr(),g=(vx(),ii(V1)).interpolateNumber,I=Y_(),S=tf(),t=kn(),e=t.strTranslate,r=Vs(),a=ro(),n=ec();function o(at,vt,it,K){var ft=vt._context.staticPlot,ut=at.map(mt.bind(0,vt,it)),kt=K.selectAll("g.parcatslayer").data([null]);kt.enter().append("g").attr("class","parcatslayer").style("pointer-events",ft?"none":"all");var It=kt.selectAll("g.trace.parcats").data(ut,i),Pt=It.enter().append("g").attr("class","trace parcats");It.attr("transform",function(Mt){return e(Mt.x,Mt.y)}),Pt.append("g").attr("class","paths");var qt=It.select("g.paths"),Wt=qt.selectAll("path.path").data(function(Mt){return Mt.paths},i);Wt.attr("fill",function(Mt){return Mt.model.color});var Jt=Wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.model.color}).attr("fill-opacity",0);b(Jt),Wt.attr("d",function(Mt){return Mt.svgD}),Jt.empty()||Wt.sort(f),Wt.exit().remove(),Wt.on("mouseover",x).on("mouseout",y).on("click",u),Pt.append("g").attr("class","dimensions");var ge=It.select("g.dimensions"),fe=ge.selectAll("g.dimension").data(function(Mt){return Mt.dimensions},i);fe.enter().append("g").attr("class","dimension"),fe.attr("transform",function(Mt){return e(Mt.x,0)}),fe.exit().remove();var pe=fe.selectAll("g.category").data(function(Mt){return Mt.categories},i),se=pe.enter().append("g").attr("class","category");pe.attr("transform",function(Mt){return e(0,Mt.y)}),se.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}),M(se);var Tt=pe.selectAll("rect.bandrect").data(function(Mt){return Mt.bands},i);Tt.each(function(){t.raiseToTop(this)}),Tt.attr("fill",function(Mt){return Mt.color});var Lt=Tt.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.color}).attr("fill-opacity",0);Tt.attr("fill",function(Mt){return Mt.color}).attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}).attr("y",function(Mt){return Mt.y}).attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":Mt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Lt),Tt.exit().remove(),se.append("text").attr("class","catlabel").attr("pointer-events","none"),pe.select("text.catlabel").attr("text-anchor",function(Mt){return l(Mt)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Mt){return l(Mt)?Mt.width+5:-5}).attr("y",function(Mt){return Mt.height/2}).text(function(Mt){return Mt.model.categoryLabel}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.categorylabelfont),n.convertToTspans(c.select(this),vt)}),se.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Mt){return Mt.width/2}).attr("y",-5).text(function(Mt,ee){return ee===0?Mt.parcatsViewModel.model.dimensions[Mt.model.dimensionInd].dimensionLabel:null}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",H).on("mouseout",F),pe.exit().remove(),fe.call(c.behavior.drag().origin(function(Mt){return{x:Mt.x,y:0}}).on("dragstart",U).on("drag",W).on("dragend",q)),It.each(function(Mt){Mt.traceSelection=c.select(this),Mt.pathSelection=c.select(this).selectAll("g.paths").selectAll("path.path"),Mt.dimensionSelection=c.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),It.exit().remove()}Z.exports=function(at,vt,it,K){o(it,at,K,vt)};function i(at){return at.key}function l(at){var vt=at.parcatsViewModel.dimensions.length,it=at.parcatsViewModel.dimensions[vt-1].model.dimensionInd;return at.model.dimensionInd===it}function f(at,vt){return at.model.rawColor>vt.model.rawColor?1:at.model.rawColor"),Ae=c.mouse(ft)[0];S.loneHover({trace:ut,x:pe-It.left+Pt.left,y:se-It.top+Pt.top,text:oe,color:at.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Tt,idealAlign:Ae1&&qt.displayInd===Pt.dimensions.length-1?(ge=kt.left,fe="left"):(ge=kt.left+kt.width,fe="right");var pe=It.model.count,se=It.model.categoryLabel,Tt=pe/It.parcatsViewModel.model.count,Lt={countLabel:pe,categoryLabel:se,probabilityLabel:Tt.toFixed(3)},Mt=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Lt.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Mt.push(["P("+Lt.categoryLabel+"):",Lt.probabilityLabel].join(" "));var ee=Mt.join("
");return{trace:Wt,x:K*(ge-vt.left),y:ft*(Jt-vt.top),text:ee,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Lt,eventData:[{data:Wt._input,fullData:Wt,count:pe,category:se,probability:Tt}]}}function j(at,vt,it){var K=[];return c.select(it.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ft=this;K.push(O(at,vt,ft))}),K}function V(at,vt,it){at._fullLayout._calcInverseTransform(at);var K=at._fullLayout._invScaleX,ft=at._fullLayout._invScaleY,ut=it.getBoundingClientRect(),kt=c.select(it).datum(),It=kt.categoryViewModel,Pt=It.parcatsViewModel,qt=Pt.model.dimensions[It.model.dimensionInd],Wt=Pt.trace,Jt=ut.y+ut.height/2,ge,fe;Pt.dimensions.length>1&&qt.displayInd===Pt.dimensions.length-1?(ge=ut.left,fe="left"):(ge=ut.left+ut.width,fe="right");var pe=It.model.categoryLabel,se=kt.parcatsViewModel.model.count,Tt=0;kt.categoryViewModel.bands.forEach(function(ur){ur.color===kt.color&&(Tt+=ur.count)});var Lt=It.model.count,Mt=0;Pt.pathSelection.each(function(ur){ur.model.color===kt.color&&(Mt+=ur.model.count)});var ee=Tt/se,ve=Tt/Mt,oe=Tt/Lt,Ae={countLabel:Tt,categoryLabel:pe,probabilityLabel:ee.toFixed(3)},He=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&He.push(["Count:",Ae.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(He.push("P(color ∩ "+pe+"): "+Ae.probabilityLabel),He.push("P("+pe+" | color): "+ve.toFixed(3)),He.push("P(color | "+pe+"): "+oe.toFixed(3)));var Ge=He.join("
"),cr=a.mostReadable(kt.color,["black","white"]);return{trace:Wt,x:K*(ge-vt.left),y:ft*(Jt-vt.top),text:Ge,color:kt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Ae,eventData:[{data:Wt._input,fullData:Wt,category:pe,count:se,probability:ee,categorycount:Lt,colorcount:Mt,bandcolorcount:Tt}]}}function H(at){if(!at.parcatsViewModel.dragDimension&&at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var vt=c.mouse(this)[1];if(vt<-1)return;var it=at.parcatsViewModel.graphDiv,K=it._fullLayout,ft=K._paperdiv.node().getBoundingClientRect(),ut=at.parcatsViewModel.hoveron,kt=this;if(ut==="color"?(k(kt),B(kt,"plotly_hover",c.event)):(p(kt),w(kt,"plotly_hover",c.event)),at.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var It;ut==="category"?It=O(it,ft,kt):ut==="color"?It=V(it,ft,kt):ut==="dimension"&&(It=j(it,ft,kt)),It&&S.loneHover(It,{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:it})}}}function F(at){var vt=at.parcatsViewModel;if(!vt.dragDimension&&(b(vt.pathSelection),M(vt.dimensionSelection.selectAll("g.category")),A(vt.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(vt.graphDiv._fullLayout._hoverlayer.node()),vt.pathSelection.sort(f),vt.hoverinfoItems.indexOf("skip")===-1)){var it=at.parcatsViewModel.hoveron,K=this;it==="color"?B(K,"plotly_unhover",c.event):w(K,"plotly_unhover",c.event)}}function U(at){at.parcatsViewModel.arrangement!=="fixed"&&(at.dragDimensionDisplayInd=at.model.displayInd,at.initialDragDimensionDisplayInds=at.parcatsViewModel.model.dimensions.map(function(vt){return vt.displayInd}),at.dragHasMoved=!1,at.dragCategoryDisplayInd=null,c.select(this).selectAll("g.category").select("rect.catrect").each(function(vt){var it=c.mouse(this)[0],K=c.mouse(this)[1];-2<=it&&it<=vt.width+2&&-2<=K&&K<=vt.height+2&&(at.dragCategoryDisplayInd=vt.model.displayInd,at.initialDragCategoryDisplayInds=at.model.categories.map(function(ft){return ft.displayInd}),vt.model.dragY=vt.y,t.raiseToTop(this.parentNode),c.select(this.parentNode).selectAll("rect.bandrect").each(function(ft){ft.yWt.y+Wt.height/2&&(ut.model.displayInd=Wt.model.displayInd,Wt.model.displayInd=It),at.dragCategoryDisplayInd=ut.model.displayInd}if(at.dragCategoryDisplayInd===null||at.parcatsViewModel.arrangement==="freeform"){ft.model.dragX=c.event.x;var Jt=at.parcatsViewModel.dimensions[it],ge=at.parcatsViewModel.dimensions[K];Jt!==void 0&&ft.model.dragXge.x&&(ft.model.displayInd=ge.model.displayInd,ge.model.displayInd=at.dragDimensionDisplayInd),at.dragDimensionDisplayInd=ft.model.displayInd}pt(at.parcatsViewModel),tt(at.parcatsViewModel),yt(at.parcatsViewModel),lt(at.parcatsViewModel)}}function q(at){if(at.parcatsViewModel.arrangement!=="fixed"&&at.dragDimensionDisplayInd!==null){c.select(this).selectAll("text").attr("font-weight","normal");var vt={},it=J(at.parcatsViewModel),K=at.parcatsViewModel.model.dimensions.map(function(ge){return ge.displayInd}),ft=at.initialDragDimensionDisplayInds.some(function(ge,fe){return ge!==K[fe]});ft&&K.forEach(function(ge,fe){var pe=at.parcatsViewModel.model.dimensions[fe].containerInd;vt["dimensions["+pe+"].displayindex"]=ge});var ut=!1;if(at.dragCategoryDisplayInd!==null){var kt=at.model.categories.map(function(ge){return ge.displayInd});if(ut=at.initialDragCategoryDisplayInds.some(function(ge,fe){return ge!==kt[fe]}),ut){var It=at.model.categories.slice().sort(function(ge,fe){return ge.displayInd-fe.displayInd}),Pt=It.map(function(ge){return ge.categoryValue}),qt=It.map(function(ge){return ge.categoryLabel});vt["dimensions["+at.model.containerInd+"].categoryarray"]=[Pt],vt["dimensions["+at.model.containerInd+"].ticktext"]=[qt],vt["dimensions["+at.model.containerInd+"].categoryorder"]="array"}}if(at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!at.dragHasMoved&&at.potentialClickBand&&(at.parcatsViewModel.hoveron==="color"?B(at.potentialClickBand,"plotly_click",c.event.sourceEvent):w(at.potentialClickBand,"plotly_click",c.event.sourceEvent)),at.model.dragX=null,at.dragCategoryDisplayInd!==null){var Wt=at.parcatsViewModel.dimensions[at.dragDimensionDisplayInd].categories[at.dragCategoryDisplayInd];Wt.model.dragY=null,at.dragCategoryDisplayInd=null}at.dragDimensionDisplayInd=null,at.parcatsViewModel.dragDimension=null,at.dragHasMoved=null,at.potentialClickBand=null,pt(at.parcatsViewModel),tt(at.parcatsViewModel);var Jt=c.transition().duration(300).ease("cubic-in-out");Jt.each(function(){yt(at.parcatsViewModel,!0),lt(at.parcatsViewModel,!0)}).each("end",function(){(ft||ut)&&I.restyle(at.parcatsViewModel.graphDiv,vt,[it])})}}function J(at){for(var vt,it=at.graphDiv._fullData,K=0;K=0;Pt--)qt+="C"+kt[Pt]+","+(vt[Pt+1]+K)+" "+ut[Pt]+","+(vt[Pt]+K)+" "+(at[Pt]+it[Pt])+","+(vt[Pt]+K),qt+="l-"+it[Pt]+",0 ";return qt+="Z",qt}function tt(at){var vt=at.dimensions,it=at.model,K=vt.map(function(br){return br.categories.map(function(Xr){return Xr.y})}),ft=at.model.dimensions.map(function(br){return br.categories.map(function(Xr){return Xr.displayInd})}),ut=at.model.dimensions.map(function(br){return br.displayInd}),kt=at.dimensions.map(function(br){return br.model.dimensionInd}),It=vt.map(function(br){return br.x}),Pt=vt.map(function(br){return br.width}),qt=[];for(var Wt in it.paths)it.paths.hasOwnProperty(Wt)&&qt.push(it.paths[Wt]);function Jt(br){var Xr=br.categoryInds.map(function(Le,Gt){return ft[Gt][Le]}),nn=kt.map(function(Le){return Xr[Le]});return nn}qt.sort(function(br,Xr){var nn=Jt(br),Le=Jt(Xr);return at.sortpaths==="backward"&&(nn.reverse(),Le.reverse()),nn.push(br.valueInds[0]),Le.push(Xr.valueInds[0]),at.bundlecolors&&(nn.unshift(br.rawColor),Le.unshift(Xr.rawColor)),nnLe?1:0});for(var ge=new Array(qt.length),fe=vt[0].model.count,pe=vt[0].categories.map(function(br){return br.height}).reduce(function(br,Xr){return br+Xr}),se=0;se0?Lt=pe*(Tt.count/fe):Lt=0;for(var Mt=new Array(K.length),ee=0;ee1?kt=(at.width-2*it-K)/(ft-1):kt=0,It=it,Pt=It+kt*ut;var qt=[],Wt=at.model.maxCats,Jt=vt.categories.length,ge=8,fe=vt.count,pe=at.height-ge*(Wt-1),se,Tt,Lt,Mt,ee,ve=(Wt-Jt)*ge/2,oe=vt.categories.map(function(Ae){return{displayInd:Ae.displayInd,categoryInd:Ae.categoryInd}});for(oe.sort(function(Ae,He){return Ae.displayInd-He.displayInd}),ee=0;ee0?se=Tt.count/fe*pe:se=0,Lt={key:Tt.valueInds[0],model:Tt,width:K,height:se,y:Tt.dragY!==null?Tt.dragY:ve,bands:[],parcatsViewModel:at},ve=ve+se+ge,qt.push(Lt);return{key:vt.dimensionInd,x:vt.dragX!==null?vt.dragX:Pt,y:0,width:K,model:vt,categories:qt,parcatsViewModel:at,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}),wE=Dt((Q,Z)=>{var c=DW();Z.exports=function(g,I,S,t){var e=g._fullLayout,r=e._paper,a=e._size;c(g,r,I,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},S,t)}}),FW=Dt(Q=>{var Z=ud().getModuleCalcData,c=wE(),g="parcats";Q.name=g,Q.plot=function(I,S,t,e){var r=Z(I.calcdata,g);if(r.length){var a=r[0];c(I,a,t,e)}},Q.clean=function(I,S,t,e){var r=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");r&&!a&&e._paperdiv.selectAll(".parcats").remove()}}),BW=Dt((Q,Z)=>{Z.exports={attributes:bE(),supplyDefaults:zW(),calc:OW(),plot:wE(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:FW(),categories:["noOpacity"],meta:{}}}),RW=Dt((Q,Z)=>{Z.exports=BW()}),Lv=Dt((Q,Z)=>{var c=Y0(),g="1.13.4",I='© OpenStreetMap contributors',S=['© Carto',I].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:I,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},a=c(r);Z.exports={requiredVersion:g,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+g+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}),P3=Dt((Q,Z)=>{var c=kn(),g=hi().defaultLine,I=jh().attributes,S=da(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=Ev(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("mapbox",".layers",!0)],domain:I({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:a.styleValuesMapbox.concat(a.styleValuesNonMapbox),dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},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:g}},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:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),_T=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=vx(),e=ef(),r=P3(),a=Ho(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=P3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.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:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),bE=Dt((Q,Z)=>{var c=["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"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),wW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=_T(),a=bE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),wE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),kE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),kW=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ca().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Tc(),n=bE().isSupportedFont,o=kE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||R)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),TW=Dt((Q,Z)=>{var c=kn(),g=kW(),I=Ev().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermapbox",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Fu(),S=g.fillText,t=Ca().BADNUM,e=Ev().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),AW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),MW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=Ca().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=c||self,c.mapboxgl=g())})(Q,function(){var c,g,I;function S(t,e){if(!c)c=e;else if(!g)g=e;else{var r="var sharedChunk = {}; ("+c+")(sharedChunk); ("+g+")(sharedChunk);",a={};c(a),I=e(a),typeof window<"u"&&(I.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return S(["exports"],function(t){function e(m,N){return N={exports:{}},m(N,N.exports),N.exports}var r="1.13.4",a=n;function n(m,N,X,wt){this.cx=3*m,this.bx=3*(X-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*N,this.by=3*(wt-N)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=wt,this.p2x=X,this.p2y=wt}n.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},n.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},n.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},n.prototype.solveCurveX=function(m,N){typeof N>"u"&&(N=1e-6);var X,wt,Ft,Zt,ie;for(Ft=m,ie=0;ie<8;ie++){if(Zt=this.sampleCurveX(Ft)-m,Math.abs(Zt)wt)return wt;for(;XZt?X=Ft:wt=Ft,Ft=(wt-X)*.5+X}return Ft},n.prototype.solve=function(m,N){return this.sampleCurveY(this.solveCurveX(m,N))};var o=i;function i(m,N){this.x=m,this.y=N}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,N){return this.clone()._rotateAround(m,N)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var N=m.x-this.x,X=m.y-this.y;return N*N+X*X},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,N){return Math.atan2(this.x*N-this.y*m,this.x*m+this.y*N)},_matMult:function(m){var N=m[0]*this.x+m[1]*this.y,X=m[2]*this.x+m[3]*this.y;return this.x=N,this.y=X,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var N=Math.cos(m),X=Math.sin(m),wt=N*this.x-X*this.y,Ft=X*this.x+N*this.y;return this.x=wt,this.y=Ft,this},_rotateAround:function(m,N){var X=Math.cos(m),wt=Math.sin(m),Ft=N.x+X*(this.x-N.x)-wt*(this.y-N.y),Zt=N.y+wt*(this.x-N.x)+X*(this.y-N.y);return this.x=Ft,this.y=Zt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(m){return m instanceof i?m:Array.isArray(m)?new i(m[0],m[1]):m};var l=typeof self<"u"?self:{};function f(m,N){if(Array.isArray(m)){if(!Array.isArray(N)||m.length!==N.length)return!1;for(var X=0;X=1)return 1;var N=m*m,X=N*m;return 4*(m<.5?X:3*(m-N)+X-.75)}function v(m,N,X,wt){var Ft=new a(m,N,X,wt);return function(Zt){return Ft.solve(Zt)}}var T=v(.25,.1,.25,1);function u(m,N,X){return Math.min(X,Math.max(N,m))}function b(m,N,X){var wt=X-N,Ft=((m-N)%wt+wt)%wt+N;return Ft===N?X:Ft}function _(m,N,X){if(!m.length)return X(null,[]);var wt=m.length,Ft=new Array(m.length),Zt=null;m.forEach(function(ie,Re){N(ie,function(Je,yr){Je&&(Zt=Je),Ft[Re]=yr,--wt===0&&X(Zt,Ft)})})}function P(m){var N=[];for(var X in m)N.push(m[X]);return N}function M(m,N){var X=[];for(var wt in m)wt in N||X.push(wt);return X}function C(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt>N/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function w(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function R(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,N){m.forEach(function(X){N[X]&&(N[X]=N[X].bind(N))})}function j(m,N){return m.indexOf(N,m.length-N.length)!==-1}function V(m,N,X){var wt={};for(var Ft in m)wt[Ft]=N.call(X||this,m[Ft],Ft,m);return wt}function H(m,N,X){var wt={};for(var Ft in m)N.call(X||this,m[Ft],Ft,m)&&(wt[Ft]=m[Ft]);return wt}function F(m){return Array.isArray(m)?m.map(F):typeof m=="object"&&m?V(m,F):m}function U(m,N){for(var X=0;X=0)return!0;return!1}var W={};function q(m){W[m]||(typeof console<"u"&&console.warn(m),W[m]=!0)}function J(m,N,X){return(X.y-m.y)*(N.x-m.x)>(N.y-m.y)*(X.x-m.x)}function lt(m){for(var N=0,X=0,wt=m.length,Ft=wt-1,Zt=void 0,ie=void 0;X@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,X={};if(m.replace(N,function(Ft,Zt,ie,Re){var Je=ie||Re;return X[Zt]=Je?Je.toLowerCase():!0,""}),X["max-age"]){var wt=parseInt(X["max-age"],10);isNaN(wt)?delete X["max-age"]:X["max-age"]=wt}return X}var tt=null;function dt(m){if(tt==null){var N=m.navigator?m.navigator.userAgent:null;tt=!!m.safari||!!(N&&(/\b(iPad|iPhone|iPod)\b/.test(N)||N.match("Safari")&&!N.match("Chrome")))}return tt}function rt(m){try{var N=l[m];return N.setItem("_mapbox_test_",1),N.removeItem("_mapbox_test_"),!0}catch{return!1}}function at(m){return l.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(N,X){return String.fromCharCode(+("0x"+X))}))}function vt(m){return decodeURIComponent(l.atob(m).split("").map(function(N){return"%"+("00"+N.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var it=l.performance&&l.performance.now?l.performance.now.bind(l.performance):Date.now.bind(Date),Y=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame,ft=l.cancelAnimationFrame||l.mozCancelAnimationFrame||l.webkitCancelAnimationFrame||l.msCancelAnimationFrame,ut,kt,It={now:it,frame:function(m){var N=Y(m);return{cancel:function(){return ft(N)}}},getImageData:function(m,N){N===void 0&&(N=0);var X=l.document.createElement("canvas"),wt=X.getContext("2d");if(!wt)throw new Error("failed to create canvas 2d context");return X.width=m.width,X.height=m.height,wt.drawImage(m,0,0,m.width,m.height),wt.getImageData(-N,-N,m.width+2*N,m.height+2*N)},resolveURL:function(m){return ut||(ut=l.document.createElement("a")),ut.href=m,ut.href},hardwareConcurrency:l.navigator&&l.navigator.hardwareConcurrency||4,get devicePixelRatio(){return l.devicePixelRatio},get prefersReducedMotion(){return l.matchMedia?(kt==null&&(kt=l.matchMedia("(prefers-reduced-motion: reduce)")),kt.matches):!1}},Pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},qt={supported:!1,testSupport:pe},Wt,Jt=!1,ge,fe=!1;l.document&&(ge=l.document.createElement("img"),ge.onload=function(){Wt&&se(Wt),Wt=null,fe=!0},ge.onerror=function(){Jt=!0,Wt=null},ge.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function pe(m){Jt||!ge||(fe?se(m):Wt=m)}function se(m){var N=m.createTexture();m.bindTexture(m.TEXTURE_2D,N);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,ge),m.isContextLost())return;qt.supported=!0}catch{}m.deleteTexture(N),Jt=!0}var Tt="01";function Lt(){for(var m="1",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",X="",wt=0;wt<10;wt++)X+=N[Math.floor(Math.random()*62)];var Ft=720*60*1e3,Zt=[m,Tt,X].join(""),ie=Date.now()+Ft;return{token:Zt,tokenExpiresAt:ie}}var Mt=function(m,N){this._transformRequestFn=m,this._customAccessToken=N,this._createSkuToken()};Mt.prototype._createSkuToken=function(){var m=Lt();this._skuToken=m.token,this._skuTokenExpiresAt=m.tokenExpiresAt},Mt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Mt.prototype.transformRequest=function(m,N){return this._transformRequestFn?this._transformRequestFn(m,N)||{url:m}:{url:m}},Mt.prototype.normalizeStyleURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/styles/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeGlyphsURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/fonts/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSourceURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/v4/"+X.authority+".json",X.params.push("secure"),this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSpriteURL=function(m,N,X,wt){var Ft=cr(m);return ee(m)?(Ft.path="/styles/v1"+Ft.path+"/sprite"+N+X,this._makeAPIURL(Ft,this._customAccessToken||wt)):(Ft.path+=""+N+X,ur(Ft))},Mt.prototype.normalizeTileURL=function(m,N){if(this._isSkuTokenExpired()&&this._createSkuToken(),m&&!ee(m))return m;var X=cr(m),wt=/(\.(png|jpg)\d*)(?=$)/,Ft=/^.+\/v4\//,Zt=It.devicePixelRatio>=2||N===512?"@2x":"",ie=qt.supported?".webp":"$1";X.path=X.path.replace(wt,""+Zt+ie),X.path=X.path.replace(Ft,"/"),X.path="/v4"+X.path;var Re=this._customAccessToken||He(X.params)||Pt.ACCESS_TOKEN;return Pt.REQUIRE_ACCESS_TOKEN&&Re&&this._skuToken&&X.params.push("sku="+this._skuToken),this._makeAPIURL(X,Re)},Mt.prototype.canonicalizeTileURL=function(m,N){var X="/v4/",wt=/\.[\w]+$/,Ft=cr(m);if(!Ft.path.match(/(^\/v4\/)/)||!Ft.path.match(wt))return m;var Zt="mapbox://tiles/";Zt+=Ft.path.replace(X,"");var ie=Ft.params;return N&&(ie=ie.filter(function(Re){return!Re.match(/^access_token=/)})),ie.length&&(Zt+="?"+ie.join("&")),Zt},Mt.prototype.canonicalizeTileset=function(m,N){for(var X=N?ee(N):!1,wt=[],Ft=0,Zt=m.tiles||[];Ft=0&&m.params.splice(Ft,1)}if(wt.path!=="/"&&(m.path=""+wt.path+m.path),!Pt.REQUIRE_ACCESS_TOKEN)return ur(m);if(N=N||Pt.ACCESS_TOKEN,!N)throw new Error("An API access token is required to use Mapbox GL. "+X);if(N[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+X);return m.params=m.params.filter(function(Zt){return Zt.indexOf("access_token")===-1}),m.params.push("access_token="+N),ur(m)};function ee(m){return m.indexOf("mapbox:")===0}var ve=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function oe(m){return ve.test(m)}function Te(m){return m.indexOf("sku=")>0&&oe(m)}function He(m){for(var N=0,X=m;N=1&&l.localStorage.setItem(N,JSON.stringify(this.eventData))}catch{q("Unable to write to LocalStorage")}},br.prototype.processRequests=function(m){},br.prototype.postEvent=function(m,N,X,wt){var Ft=this;if(Pt.EVENTS_URL){var Zt=cr(Pt.EVENTS_URL);Zt.params.push("access_token="+(wt||Pt.ACCESS_TOKEN||""));var ie={event:this.type,created:new Date(m).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Tt,userId:this.anonId},Re=N?C(ie,N):ie,Je={url:ur(Zt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Re])};this.pendingRequest=Mn(Je,function(yr){Ft.pendingRequest=null,X(yr),Ft.saveEventData(),Ft.processRequests(wt)})}},br.prototype.queueRequest=function(m,N){this.queue.push(m),this.processRequests(N)};var Xr=function(m){function N(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postMapLoadEvent=function(X,wt,Ft,Zt){this.skuToken=Ft,(Pt.EVENTS_URL&&Zt||Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(ie){return ee(ie)||oe(ie)}))&&this.queueRequest({id:wt,timestamp:Date.now()},Zt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){var Ft=this.queue.shift(),Zt=Ft.id,ie=Ft.timestamp;Zt&&this.success[Zt]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=k()),this.postEvent(ie,{skuToken:this.skuToken},function(Re){Re||Zt&&(wt.success[Zt]=!0)},X))}},N}(br),nn=function(m){function N(X){m.call(this,"appUserTurnstile"),this._customAccessToken=X}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postTurnstileEvent=function(X,wt){Pt.EVENTS_URL&&Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(Ft){return ee(Ft)||oe(Ft)})&&this.queueRequest(Date.now(),wt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ft=Wr(Pt.ACCESS_TOKEN),Zt=Ft?Ft.u:Pt.ACCESS_TOKEN,ie=Zt!==this.eventData.tokenU;R(this.anonId)||(this.anonId=k(),ie=!0);var Re=this.queue.shift();if(this.eventData.lastSuccess){var Je=new Date(this.eventData.lastSuccess),yr=new Date(Re),Cr=(Re-this.eventData.lastSuccess)/(1440*60*1e3);ie=ie||Cr>=1||Cr<-1||Je.getDate()!==yr.getDate()}else ie=!0;if(!ie)return this.processRequests();this.postEvent(Re,{"enabled.telemetry":!1},function(Kr){Kr||(wt.eventData.lastSuccess=Re,wt.eventData.tokenU=Zt)},X)}},N}(br),Le=new nn,Gt=Le.postTurnstileEvent.bind(Le),ne=new Xr,Ct=ne.postMapLoadEvent.bind(ne),gt="mapbox-tiles",St=500,Nt=50,re=1e3*60*7,le;function we(){l.caches&&!le&&(le=l.caches.open(gt))}var Ue;function qe(m,N){if(Ue===void 0)try{new Response(new ReadableStream),Ue=!0}catch{Ue=!1}Ue?N(m.body):m.blob().then(N)}function or(m,N,X){if(we(),!!le){var wt={status:N.status,statusText:N.statusText,headers:new l.Headers};N.headers.forEach(function(ie,Re){return wt.headers.set(Re,ie)});var Ft=st(N.headers.get("Cache-Control")||"");if(!Ft["no-store"]){Ft["max-age"]&&wt.headers.set("Expires",new Date(X+Ft["max-age"]*1e3).toUTCString());var Zt=new Date(wt.headers.get("Expires")).getTime()-X;ZtDate.now()&&!X["no-cache"]}var Qr=1/0;function Hn(m){Qr++,Qr>Nt&&(m.getActor().send("enforceCacheSizeLimit",St),Qr=0)}function Wn(m){we(),le&&le.then(function(N){N.keys().then(function(X){for(var wt=0;wt=200&&X.status<300||X.status===0)&&X.response!==null){var Ft=X.response;if(m.type==="json")try{Ft=JSON.parse(X.response)}catch(Zt){return N(Zt)}N(null,Ft,X.getResponseHeader("Cache-Control"),X.getResponseHeader("Expires"))}else N(new Zi(X.statusText,X.status,m.url))},X.send(m.body),{cancel:function(){return X.abort()}}}var tn=function(m,N){if(!nr(m.url)){if(l.fetch&&l.Request&&l.AbortController&&l.Request.prototype.hasOwnProperty("signal"))return fr(m,N);if(mt()&&self.worker&&self.worker.actor){var X=!0;return self.worker.actor.send("getResource",m,N,void 0,X)}}return _r(m,N)},Cn=function(m,N){return tn(C(m,{type:"json"}),N)},Tn=function(m,N){return tn(C(m,{type:"arrayBuffer"}),N)},Mn=function(m,N){return tn(C(m,{method:"POST"}),N)};function fi(m){var N=l.document.createElement("a");return N.href=m,N.protocol===l.document.location.protocol&&N.host===l.document.location.host}var ki="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oi(m,N,X,wt){var Ft=new l.Image,Zt=l.URL;Ft.onload=function(){N(null,Ft),Zt.revokeObjectURL(Ft.src),Ft.onload=null,l.requestAnimationFrame(function(){Ft.src=ki})},Ft.onerror=function(){return N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ie=new l.Blob([new Uint8Array(m)],{type:"image/png"});Ft.cacheControl=X,Ft.expires=wt,Ft.src=m.byteLength?Zt.createObjectURL(ie):ki}function ji(m,N){var X=new l.Blob([new Uint8Array(m)],{type:"image/png"});l.createImageBitmap(X).then(function(wt){N(null,wt)}).catch(function(wt){N(new Error("Could not load image because of "+wt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Xi,ci,za=function(){Xi=[],ci=0};za();var Wa=function(m,N){if(qt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),ci>=Pt.MAX_PARALLEL_IMAGE_REQUESTS){var X={requestParameters:m,callback:N,cancelled:!1,cancel:function(){this.cancelled=!0}};return Xi.push(X),X}ci++;var wt=!1,Ft=function(){if(!wt)for(wt=!0,ci--;Xi.length&&ci0||this._oneTimeListeners&&this._oneTimeListeners[m]&&this._oneTimeListeners[m].length>0||this._eventedParent&&this._eventedParent.listens(m)},Br.prototype.setEventedParent=function(m,N){return this._eventedParent=m,this._eventedParentData=N,this};var Yr=8,pn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},on={"*":{type:"source"}},Ce=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Hr={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:"*"}},_n={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Fn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Qn={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"}}},Pn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Zn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],La={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vi={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Qa={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ja={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Do={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yo={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Da={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ys={type:"array",value:"*"},os={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ul={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Zo={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ks={type:"array",value:"*",minimum:1},ss={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}},cl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Qs={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Nl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},cs={"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"}},Ps={"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"}},Lo={"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"}},As={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},kl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ql={"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"}},Jl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Us={"*":{type:"string"}},Pa={$version:Yr,$root:pn,sources:on,source:Ce,source_vector:dr,source_raster:Hr,source_raster_dem:_n,source_geojson:Fn,source_video:Qn,source_image:Pn,layer:En,layout:Zn,layout_background:La,layout_fill:Vi,layout_circle:Qa,layout_heatmap:Ja,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Do,layout_symbol:yo,layout_raster:Fo,layout_hillshade:Da,filter:ys,filter_operator:os,geometry_type:ul,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:Zo,expression:Ks,light:ss,paint:cl,paint_fill:Qs,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Nl,paint_circle:cs,paint_heatmap:Ps,paint_symbol:Lo,paint_raster:As,paint_hillshade:kl,paint_background:ql,transition:Jl,"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:Us},fo=function(m,N,X,wt){this.message=(m?m+": ":"")+X,wt&&(this.identifier=wt),N!=null&&N.__line__&&(this.line=N.__line__)};function qs(m){var N=m.key,X=m.value;return X?[new fo(N,X,"constants have been deprecated as of v8")]:[]}function Ql(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt":m.itemType.kind==="value"?"array":"array<"+N+">"}else return m.kind}var ac=[Ru,lo,Ms,Is,ou,bl,hl,tu(ts),Dl];function mh(m,N){if(N.kind==="error")return null;if(m.kind==="array"){if(N.kind==="array"&&(N.N===0&&N.itemType.kind==="value"||!mh(m.itemType,N.itemType))&&(typeof m.N!="number"||m.N===N.N))return null}else{if(m.kind===N.kind)return null;if(m.kind==="value")for(var X=0,wt=ac;X255?255:yr}function Ft(yr){return yr<0?0:yr>1?1:yr}function Zt(yr){return yr[yr.length-1]==="%"?wt(parseFloat(yr)/100*255):wt(parseInt(yr))}function ie(yr){return yr[yr.length-1]==="%"?Ft(parseFloat(yr)/100):Ft(parseFloat(yr))}function Re(yr,Cr,Kr){return Kr<0?Kr+=1:Kr>1&&(Kr-=1),Kr*6<1?yr+(Cr-yr)*Kr*6:Kr*2<1?Cr:Kr*3<2?yr+(Cr-yr)*(2/3-Kr)*6:yr}function Je(yr){var Cr=yr.replace(/ /g,"").toLowerCase();if(Cr in X)return X[Cr].slice();if(Cr[0]==="#"){if(Cr.length===4){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=4095?[(Kr&3840)>>4|(Kr&3840)>>8,Kr&240|(Kr&240)>>4,Kr&15|(Kr&15)<<4,1]:null}else if(Cr.length===7){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=16777215?[(Kr&16711680)>>16,(Kr&65280)>>8,Kr&255,1]:null}return null}var an=Cr.indexOf("("),gn=Cr.indexOf(")");if(an!==-1&&gn+1===Cr.length){var Rn=Cr.substr(0,an),gi=Cr.substr(an+1,gn-(an+1)).split(","),ua=1;switch(Rn){case"rgba":if(gi.length!==4)return null;ua=ie(gi.pop());case"rgb":return gi.length!==3?null:[Zt(gi[0]),Zt(gi[1]),Zt(gi[2]),ua];case"hsla":if(gi.length!==4)return null;ua=ie(gi.pop());case"hsl":if(gi.length!==3)return null;var oa=(parseFloat(gi[0])%360+360)%360/360,wa=ie(gi[1]),Ra=ie(gi[2]),xa=Ra<=.5?Ra*(wa+1):Ra+wa-Ra*wa,Xa=Ra*2-xa;return[wt(Re(Xa,xa,oa+1/3)*255),wt(Re(Xa,xa,oa)*255),wt(Re(Xa,xa,oa-1/3)*255),ua];default:return null}}return null}try{N.parseCSSColor=Je}catch{}}),Sf=Bf.parseCSSColor,Fl=function(m,N,X,wt){wt===void 0&&(wt=1),this.r=m,this.g=N,this.b=X,this.a=wt};Fl.parse=function(m){if(m){if(m instanceof Fl)return m;if(typeof m=="string"){var N=Sf(m);if(N)return new Fl(N[0]/255*N[3],N[1]/255*N[3],N[2]/255*N[3],N[3])}}},Fl.prototype.toString=function(){var m=this.toArray(),N=m[0],X=m[1],wt=m[2],Ft=m[3];return"rgba("+Math.round(N)+","+Math.round(X)+","+Math.round(wt)+","+Ft+")"},Fl.prototype.toArray=function(){var m=this,N=m.r,X=m.g,wt=m.b,Ft=m.a;return Ft===0?[0,0,0,0]:[N*255/Ft,X*255/Ft,wt*255/Ft,Ft]},Fl.black=new Fl(0,0,0,1),Fl.white=new Fl(1,1,1,1),Fl.transparent=new Fl(0,0,0,0),Fl.red=new Fl(1,0,0,1);var Bc=function(m,N,X){m?this.sensitivity=N?"variant":"case":this.sensitivity=N?"accent":"base",this.locale=X,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Bc.prototype.compare=function(m,N){return this.collator.compare(m,N)},Bc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Nf=function(m,N,X,wt,Ft){this.text=m,this.image=N,this.scale=X,this.fontStack=wt,this.textColor=Ft},hc=function(m){this.sections=m};hc.fromString=function(m){return new hc([new Nf(m,null,null,null,null)])},hc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(m){return m.text.length!==0||m.image&&m.image.name.length!==0})},hc.factory=function(m){return m instanceof hc?m:hc.fromString(m)},hc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(m){return m.text}).join("")},hc.prototype.serialize=function(){for(var m=["format"],N=0,X=this.sections;N=0&&m<=255&&typeof N=="number"&&N>=0&&N<=255&&typeof X=="number"&&X>=0&&X<=255)){var Ft=typeof wt=="number"?[m,N,X,wt]:[m,N,X];return"Invalid rgba value ["+Ft.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof wt>"u"||typeof wt=="number"&&wt>=0&&wt<=1?null:"Invalid rgba value ["+[m,N,X,wt].join(", ")+"]: 'a' must be between 0 and 1."}function oh(m){if(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number"||m instanceof Fl||m instanceof Bc||m instanceof hc||m instanceof oc)return!0;if(Array.isArray(m)){for(var N=0,X=m;N2){var ie=m[1];if(typeof ie!="string"||!(ie in Sh)||ie==="object")return N.error('The item type argument of "array" must be one of string, number, boolean',1);Zt=Sh[ie],X++}else Zt=ts;var Re;if(m.length>3){if(m[2]!==null&&(typeof m[2]!="number"||m[2]<0||m[2]!==Math.floor(m[2])))return N.error('The length argument to "array" must be a positive integer literal',2);Re=m[2],X++}wt=tu(Zt,Re)}else wt=Sh[Ft];for(var Je=[];X1)&&N.push(wt)}}return N.concat(this.args.map(function(Ft){return Ft.serialize()}))};var Uh=function(m){this.type=bl,this.sections=m};Uh.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[1];if(!Array.isArray(X)&&typeof X=="object")return N.error("First argument must be an image or text section.");for(var wt=[],Ft=!1,Zt=1;Zt<=m.length-1;++Zt){var ie=m[Zt];if(Ft&&typeof ie=="object"&&!Array.isArray(ie)){Ft=!1;var Re=null;if(ie["font-scale"]&&(Re=N.parse(ie["font-scale"],1,lo),!Re))return null;var Je=null;if(ie["text-font"]&&(Je=N.parse(ie["text-font"],1,tu(Ms)),!Je))return null;var yr=null;if(ie["text-color"]&&(yr=N.parse(ie["text-color"],1,ou),!yr))return null;var Cr=wt[wt.length-1];Cr.scale=Re,Cr.font=Je,Cr.textColor=yr}else{var Kr=N.parse(m[Zt],1,ts);if(!Kr)return null;var an=Kr.type.kind;if(an!=="string"&&an!=="value"&&an!=="null"&&an!=="resolvedImage")return N.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ft=!0,wt.push({content:Kr,scale:null,font:null,textColor:null})}}return new Uh(wt)},Uh.prototype.evaluate=function(m){var N=function(X){var wt=X.content.evaluate(m);return cu(wt)===Dl?new Nf("",wt,null,null,null):new Nf(sc(wt),null,X.scale?X.scale.evaluate(m):null,X.font?X.font.evaluate(m).join(","):null,X.textColor?X.textColor.evaluate(m):null)};return new hc(this.sections.map(N))},Uh.prototype.eachChild=function(m){for(var N=0,X=this.sections;N-1),X},_u.prototype.eachChild=function(m){m(this.input)},_u.prototype.outputDefined=function(){return!1},_u.prototype.serialize=function(){return["image",this.input.serialize()]};var Ed={"to-boolean":Is,"to-color":ou,"to-number":lo,"to-string":Ms},tl=function(m,N){this.type=m,this.args=N};tl.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[0];if((X==="to-boolean"||X==="to-string")&&m.length!==2)return N.error("Expected one argument.");for(var wt=Ed[X],Ft=[],Zt=1;Zt4?X="Invalid rbga value "+JSON.stringify(N)+": expected an array containing either three or four numeric values.":X=fc(N[0],N[1],N[2],N[3]),!X))return new Fl(N[0]/255,N[1]/255,N[2]/255,N[3])}throw new Yl(X||"Could not parse color from value '"+(typeof N=="string"?N:String(JSON.stringify(N)))+"'")}else if(this.type.kind==="number"){for(var Re=null,Je=0,yr=this.args;Je=N[2]||m[1]<=N[1]||m[3]>=N[3])}function hd(m,N){var X=Vh(m[0]),wt=yf(m[1]),Ft=Math.pow(2,N.z);return[Math.round(X*Ft*rc),Math.round(wt*Ft*rc)]}function Zf(m,N,X){var wt=m[0]-N[0],Ft=m[1]-N[1],Zt=m[0]-X[0],ie=m[1]-X[1];return wt*ie-Zt*Ft===0&&wt*Zt<=0&&Ft*ie<=0}function xf(m,N,X){return N[1]>m[1]!=X[1]>m[1]&&m[0]<(X[0]-N[0])*(m[1]-N[1])/(X[1]-N[1])+N[0]}function Hh(m,N){for(var X=!1,wt=0,Ft=N.length;wt0&&Kr<0||Cr<0&&Kr>0}function Gf(m,N,X,wt){var Ft=[N[0]-m[0],N[1]-m[1]],Zt=[wt[0]-X[0],wt[1]-X[1]];return Vf(Zt,Ft)===0?!1:!!(lh(m,N,X,wt)&&lh(X,wt,m,N))}function Eh(m,N,X){for(var wt=0,Ft=X;wtX[2]){var Ft=wt*.5,Zt=m[0]-X[0]>Ft?-wt:X[0]-m[0]>Ft?wt:0;Zt===0&&(Zt=m[0]-X[2]>Ft?-wt:X[2]-m[0]>Ft?wt:0),m[0]+=Zt}jf(N,m)}function Ef(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Cd(m,N,X,wt){for(var Ft=Math.pow(2,wt.z)*rc,Zt=[wt.x*rc,wt.y*rc],ie=[],Re=0,Je=m;Re=0)return!1;var X=!0;return m.eachChild(function(wt){X&&!jc(wt,N)&&(X=!1)}),X}var Wh=function(m,N){this.type=N.type,this.name=m,this.boundExpression=N};Wh.parse=function(m,N){if(m.length!==2||typeof m[1]!="string")return N.error("'var' expression requires exactly one string literal argument.");var X=m[1];return N.scope.has(X)?new Wh(X,N.scope.get(X)):N.error('Unknown variable "'+X+'". Make sure "'+X+'" has been bound in an enclosing "let" expression before using it.',1)},Wh.prototype.evaluate=function(m){return this.boundExpression.evaluate(m)},Wh.prototype.eachChild=function(){},Wh.prototype.outputDefined=function(){return!1},Wh.prototype.serialize=function(){return["var",this.name]};var hu=function(m,N,X,wt,Ft){N===void 0&&(N=[]),wt===void 0&&(wt=new Cl),Ft===void 0&&(Ft=[]),this.registry=m,this.path=N,this.key=N.map(function(Zt){return"["+Zt+"]"}).join(""),this.scope=wt,this.errors=Ft,this.expectedType=X};hu.prototype.parse=function(m,N,X,wt,Ft){return Ft===void 0&&(Ft={}),N?this.concat(N,X,wt)._parse(m,Ft):this._parse(m,Ft)},hu.prototype._parse=function(m,N){(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number")&&(m=["literal",m]);function X(yr,Cr,Kr){return Kr==="assert"?new Cc(Cr,[yr]):Kr==="coerce"?new tl(Cr,[yr]):yr}if(Array.isArray(m)){if(m.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var wt=m[0];if(typeof wt!="string")return this.error("Expression name must be a string, but found "+typeof wt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ft=this.registry[wt];if(Ft){var Zt=Ft.parse(m,this);if(!Zt)return null;if(this.expectedType){var ie=this.expectedType,Re=Zt.type;if((ie.kind==="string"||ie.kind==="number"||ie.kind==="boolean"||ie.kind==="object"||ie.kind==="array")&&Re.kind==="value")Zt=X(Zt,ie,N.typeAnnotation||"assert");else if((ie.kind==="color"||ie.kind==="formatted"||ie.kind==="resolvedImage")&&(Re.kind==="value"||Re.kind==="string"))Zt=X(Zt,ie,N.typeAnnotation||"coerce");else if(this.checkSubtype(ie,Re))return null}if(!(Zt instanceof rl)&&Zt.type.kind!=="resolvedImage"&&Ch(Zt)){var Je=new Ll;try{Zt=new rl(Zt.type,Zt.evaluate(Je))}catch(yr){return this.error(yr.message),null}}return Zt}return this.error('Unknown expression "'+wt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof m>"u"?this.error("'undefined' value invalid. Use null instead."):typeof m=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof m+" instead.")},hu.prototype.concat=function(m,N,X){var wt=typeof m=="number"?this.path.concat(m):this.path,Ft=X?this.scope.concat(X):this.scope;return new hu(this.registry,wt,N||null,Ft,this.errors)},hu.prototype.error=function(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];var wt=""+this.key+N.map(function(Ft){return"["+Ft+"]"}).join("");this.errors.push(new al(wt,m))},hu.prototype.checkSubtype=function(m,N){var X=mh(m,N);return X&&this.error(X),X};function Ch(m){if(m instanceof Wh)return Ch(m.boundExpression);if(m instanceof Qo&&m.name==="error"||m instanceof sh||m instanceof Nc)return!1;var N=m instanceof tl||m instanceof Cc,X=!0;return m.eachChild(function(wt){N?X=X&&Ch(wt):X=X&&wt instanceof rl}),X?Xf(m)&&jc(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Mc(m,N){for(var X=m.length-1,wt=0,Ft=X,Zt=0,ie,Re;wt<=Ft;)if(Zt=Math.floor((wt+Ft)/2),ie=m[Zt],Re=m[Zt+1],ie<=N){if(Zt===X||NN)Ft=Zt-1;else throw new Yl("Input is not a number.");return 0}var Uc=function(m,N,X){this.type=m,this.input=N,this.labels=[],this.outputs=[];for(var wt=0,Ft=X;wt=ie)return N.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Je);var Cr=N.parse(Re,yr,Ft);if(!Cr)return null;Ft=Ft||Cr.type,wt.push([ie,Cr])}return new Uc(Ft,X,wt)},Uc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt);return X[Zt].evaluate(m)},Uc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N0&&m.push(this.labels[N]),m.push(this.outputs[N].serialize());return m};function bu(m,N,X){return m*(1-X)+N*X}function uf(m,N,X){return new Fl(bu(m.r,N.r,X),bu(m.g,N.g,X),bu(m.b,N.b,X),bu(m.a,N.a,X))}function vh(m,N,X){return m.map(function(wt,Ft){return bu(wt,N[Ft],X)})}var qh=Object.freeze({__proto__:null,number:bu,color:uf,array:vh}),Cf=.95047,Ld=1,Jd=1.08883,cf=4/29,Lf=6/29,wc=3*Lf*Lf,hf=Lf*Lf*Lf,Qc=Math.PI/180,ff=180/Math.PI;function Pf(m){return m>hf?Math.pow(m,1/3):m/wc+cf}function yh(m){return m>Lf?m*m*m:wc*(m-cf)}function wu(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Lh(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Vc(m){var N=Lh(m.r),X=Lh(m.g),wt=Lh(m.b),Ft=Pf((.4124564*N+.3575761*X+.1804375*wt)/Cf),Zt=Pf((.2126729*N+.7151522*X+.072175*wt)/Ld),ie=Pf((.0193339*N+.119192*X+.9503041*wt)/Jd);return{l:116*Zt-16,a:500*(Ft-Zt),b:200*(Zt-ie),alpha:m.a}}function fd(m){var N=(m.l+16)/116,X=isNaN(m.a)?N:N+m.a/500,wt=isNaN(m.b)?N:N-m.b/200;return N=Ld*yh(N),X=Cf*yh(X),wt=Jd*yh(wt),new Fl(wu(3.2404542*X-1.5371385*N-.4985314*wt),wu(-.969266*X+1.8760108*N+.041556*wt),wu(.0556434*X-.2040259*N+1.0572252*wt),m.alpha)}function yu(m,N,X){return{l:bu(m.l,N.l,X),a:bu(m.a,N.a,X),b:bu(m.b,N.b,X),alpha:bu(m.alpha,N.alpha,X)}}function bf(m){var N=Vc(m),X=N.l,wt=N.a,Ft=N.b,Zt=Math.atan2(Ft,wt)*ff;return{h:Zt<0?Zt+360:Zt,c:Math.sqrt(wt*wt+Ft*Ft),l:X,alpha:m.a}}function $h(m){var N=m.h*Qc,X=m.c,wt=m.l;return fd({l:wt,a:Math.cos(N)*X,b:Math.sin(N)*X,alpha:m.alpha})}function th(m,N,X){var wt=N-m;return m+X*(wt>180||wt<-180?wt-360*Math.round(wt/360):wt)}function nf(m,N,X){return{h:th(m.h,N.h,X),c:bu(m.c,N.c,X),l:bu(m.l,N.l,X),alpha:bu(m.alpha,N.alpha,X)}}var Zh={forward:Vc,reverse:fd,interpolate:yu},wf={forward:bf,reverse:$h,interpolate:nf},Pd=Object.freeze({__proto__:null,lab:Zh,hcl:wf}),gc=function(m,N,X,wt,Ft){this.type=m,this.operator=N,this.interpolation=X,this.input=wt,this.labels=[],this.outputs=[];for(var Zt=0,ie=Ft;Zt1}))return N.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);wt={name:"cubic-bezier",controlPoints:Re}}else return N.error("Unknown interpolation type "+String(wt[0]),1,0);if(m.length-1<4)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if((m.length-1)%2!==0)return N.error("Expected an even number of arguments.");if(Ft=N.parse(Ft,2,lo),!Ft)return null;var Je=[],yr=null;X==="interpolate-hcl"||X==="interpolate-lab"?yr=ou:N.expectedType&&N.expectedType.kind!=="value"&&(yr=N.expectedType);for(var Cr=0;Cr=Kr)return N.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',gn);var gi=N.parse(an,Rn,yr);if(!gi)return null;yr=yr||gi.type,Je.push([Kr,gi])}return yr.kind!=="number"&&yr.kind!=="color"&&!(yr.kind==="array"&&yr.itemType.kind==="number"&&typeof yr.N=="number")?N.error("Type "+nu(yr)+" is not interpolatable."):new gc(yr,X,wt,Ft,Je)},gc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt),ie=N[Zt],Re=N[Zt+1],Je=gc.interpolationFactor(this.interpolation,wt,ie,Re),yr=X[Zt].evaluate(m),Cr=X[Zt+1].evaluate(m);return this.operator==="interpolate"?qh[this.type.kind.toLowerCase()](yr,Cr,Je):this.operator==="interpolate-hcl"?wf.reverse(wf.interpolate(wf.forward(yr),wf.forward(Cr),Je)):Zh.reverse(Zh.interpolate(Zh.forward(yr),Zh.forward(Cr),Je))},gc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N=X.length)throw new Yl("Array index out of bounds: "+N+" > "+(X.length-1)+".");if(N!==Math.floor(N))throw new Yl("Array index must be an integer, but found "+N+" instead.");return X[N]},xh.prototype.eachChild=function(m){m(this.index),m(this.input)},xh.prototype.outputDefined=function(){return!1},xh.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Bu=function(m,N){this.type=Is,this.needle=m,this.haystack=N};Bu.parse=function(m,N){if(m.length!==3)return N.error("Expected 2 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,ts);return!X||!wt?null:Jc(X.type,[Is,Ms,lo,Ru,ts])?new Bu(X,wt):N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead")},Bu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!X)return!1;if(!ah(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!ah(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");return X.indexOf(N)>=0},Bu.prototype.eachChild=function(m){m(this.needle),m(this.haystack)},Bu.prototype.outputDefined=function(){return!0},Bu.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var iu=function(m,N,X){this.type=lo,this.needle=m,this.haystack=N,this.fromIndex=X};iu.parse=function(m,N){if(m.length<=2||m.length>=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,ts);if(!X||!wt)return null;if(!Jc(X.type,[Is,Ms,lo,Ru,ts]))return N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,lo);return Ft?new iu(X,wt,Ft):null}else return new iu(X,wt)},iu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!ah(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!ah(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");if(this.fromIndex){var wt=this.fromIndex.evaluate(m);return X.indexOf(N,wt)}return X.indexOf(N)},iu.prototype.eachChild=function(m){m(this.needle),m(this.haystack),this.fromIndex&&m(this.fromIndex)},iu.prototype.outputDefined=function(){return!1},iu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var m=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),m]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var _h=function(m,N,X,wt,Ft,Zt){this.inputType=m,this.type=N,this.input=X,this.cases=wt,this.outputs=Ft,this.otherwise=Zt};_h.parse=function(m,N){if(m.length<5)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if(m.length%2!==1)return N.error("Expected an even number of arguments.");var X,wt;N.expectedType&&N.expectedType.kind!=="value"&&(wt=N.expectedType);for(var Ft={},Zt=[],ie=2;ieNumber.MAX_SAFE_INTEGER)return yr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof an=="number"&&Math.floor(an)!==an)return yr.error("Numeric branch labels must be integer values.");if(!X)X=cu(an);else if(yr.checkSubtype(X,cu(an)))return null;if(typeof Ft[String(an)]<"u")return yr.error("Branch labels must be unique.");Ft[String(an)]=Zt.length}var gn=N.parse(Je,ie,wt);if(!gn)return null;wt=wt||gn.type,Zt.push(gn)}var Rn=N.parse(m[1],1,ts);if(!Rn)return null;var gi=N.parse(m[m.length-1],m.length-1,wt);return!gi||Rn.type.kind!=="value"&&N.concat(1).checkSubtype(X,Rn.type)?null:new _h(X,wt,Rn,Ft,Zt,gi)},_h.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=cu(N)===this.inputType&&this.outputs[this.cases[N]]||this.otherwise;return X.evaluate(m)},_h.prototype.eachChild=function(m){m(this.input),this.outputs.forEach(m),m(this.otherwise)},_h.prototype.outputDefined=function(){return this.outputs.every(function(m){return m.outputDefined()})&&this.otherwise.outputDefined()},_h.prototype.serialize=function(){for(var m=this,N=["match",this.input.serialize()],X=Object.keys(this.cases).sort(),wt=[],Ft={},Zt=0,ie=X;Zt=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,lo);if(!X||!wt)return null;if(!Jc(X.type,[tu(ts),Ms,ts]))return N.error("Expected first argument to be of type array or string, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,lo);return Ft?new bh(X.type,X,wt,Ft):null}else return new bh(X.type,X,wt)},bh.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=this.beginIndex.evaluate(m);if(!ah(N,["string","array"]))throw new Yl("Expected first argument to be of type array or string, but found "+nu(cu(N))+" instead.");if(this.endIndex){var wt=this.endIndex.evaluate(m);return N.slice(X,wt)}return N.slice(X)},bh.prototype.eachChild=function(m){m(this.input),m(this.beginIndex),this.endIndex&&m(this.endIndex)},bh.prototype.outputDefined=function(){return!1},bh.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var m=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),m]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Wf(m,N){return m==="=="||m==="!="?N.kind==="boolean"||N.kind==="string"||N.kind==="number"||N.kind==="null"||N.kind==="value":N.kind==="string"||N.kind==="number"||N.kind==="value"}function gr(m,N,X){return N===X}function Ur(m,N,X){return N!==X}function wn(m,N,X){return NX}function qn(m,N,X){return N<=X}function di(m,N,X){return N>=X}function aa(m,N,X,wt){return wt.compare(N,X)===0}function va(m,N,X,wt){return!aa(m,N,X,wt)}function Ba(m,N,X,wt){return wt.compare(N,X)<0}function Za(m,N,X,wt){return wt.compare(N,X)>0}function ca(m,N,X,wt){return wt.compare(N,X)<=0}function Oa(m,N,X,wt){return wt.compare(N,X)>=0}function ka(m,N,X){var wt=m!=="=="&&m!=="!=";return function(){function Ft(Zt,ie,Re){this.type=Is,this.lhs=Zt,this.rhs=ie,this.collator=Re,this.hasUntypedArgument=Zt.type.kind==="value"||ie.type.kind==="value"}return Ft.parse=function(Zt,ie){if(Zt.length!==3&&Zt.length!==4)return ie.error("Expected two or three arguments.");var Re=Zt[0],Je=ie.parse(Zt[1],1,ts);if(!Je)return null;if(!Wf(Re,Je.type))return ie.concat(1).error('"'+Re+`" comparisons are not supported for type '`+nu(Je.type)+"'.");var yr=ie.parse(Zt[2],2,ts);if(!yr)return null;if(!Wf(Re,yr.type))return ie.concat(2).error('"'+Re+`" comparisons are not supported for type '`+nu(yr.type)+"'.");if(Je.type.kind!==yr.type.kind&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot compare types '"+nu(Je.type)+"' and '"+nu(yr.type)+"'.");wt&&(Je.type.kind==="value"&&yr.type.kind!=="value"?Je=new Cc(yr.type,[Je]):Je.type.kind!=="value"&&yr.type.kind==="value"&&(yr=new Cc(Je.type,[yr])));var Cr=null;if(Zt.length===4){if(Je.type.kind!=="string"&&yr.type.kind!=="string"&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot use collator to compare non-string types.");if(Cr=ie.parse(Zt[3],3,Gu),!Cr)return null}return new Ft(Je,yr,Cr)},Ft.prototype.evaluate=function(Zt){var ie=this.lhs.evaluate(Zt),Re=this.rhs.evaluate(Zt);if(wt&&this.hasUntypedArgument){var Je=cu(ie),yr=cu(Re);if(Je.kind!==yr.kind||!(Je.kind==="string"||Je.kind==="number"))throw new Yl('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+Je.kind+", "+yr.kind+") instead.")}if(this.collator&&!wt&&this.hasUntypedArgument){var Cr=cu(ie),Kr=cu(Re);if(Cr.kind!=="string"||Kr.kind!=="string")return N(Zt,ie,Re)}return this.collator?X(Zt,ie,Re,this.collator.evaluate(Zt)):N(Zt,ie,Re)},Ft.prototype.eachChild=function(Zt){Zt(this.lhs),Zt(this.rhs),this.collator&&Zt(this.collator)},Ft.prototype.outputDefined=function(){return!0},Ft.prototype.serialize=function(){var Zt=[m];return this.eachChild(function(ie){Zt.push(ie.serialize())}),Zt},Ft}()}var na=ka("==",gr,aa),io=ka("!=",Ur,va),ns=ka("<",wn,Ba),Ko=ka(">",hn,Za),ls=ka("<=",qn,ca),ps=ka(">=",di,Oa),oo=function(m,N,X,wt,Ft){this.type=Ms,this.number=m,this.locale=N,this.currency=X,this.minFractionDigits=wt,this.maxFractionDigits=Ft};oo.parse=function(m,N){if(m.length!==3)return N.error("Expected two arguments.");var X=N.parse(m[1],1,lo);if(!X)return null;var wt=m[2];if(typeof wt!="object"||Array.isArray(wt))return N.error("NumberFormat options argument must be an object.");var Ft=null;if(wt.locale&&(Ft=N.parse(wt.locale,1,Ms),!Ft))return null;var Zt=null;if(wt.currency&&(Zt=N.parse(wt.currency,1,Ms),!Zt))return null;var ie=null;if(wt["min-fraction-digits"]&&(ie=N.parse(wt["min-fraction-digits"],1,lo),!ie))return null;var Re=null;return wt["max-fraction-digits"]&&(Re=N.parse(wt["max-fraction-digits"],1,lo),!Re)?null:new oo(X,Ft,Zt,ie,Re)},oo.prototype.evaluate=function(m){return new Intl.NumberFormat(this.locale?this.locale.evaluate(m):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(m):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(m):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(m):void 0}).format(this.number.evaluate(m))},oo.prototype.eachChild=function(m){m(this.number),this.locale&&m(this.locale),this.currency&&m(this.currency),this.minFractionDigits&&m(this.minFractionDigits),this.maxFractionDigits&&m(this.maxFractionDigits)},oo.prototype.outputDefined=function(){return!1},oo.prototype.serialize=function(){var m={};return this.locale&&(m.locale=this.locale.serialize()),this.currency&&(m.currency=this.currency.serialize()),this.minFractionDigits&&(m["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(m["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),m]};var qa=function(m){this.type=lo,this.input=m};qa.parse=function(m,N){if(m.length!==2)return N.error("Expected 1 argument, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1);return X?X.type.kind!=="array"&&X.type.kind!=="string"&&X.type.kind!=="value"?N.error("Expected argument of type string or array, but found "+nu(X.type)+" instead."):new qa(X):null},qa.prototype.evaluate=function(m){var N=this.input.evaluate(m);if(typeof N=="string"||Array.isArray(N))return N.length;throw new Yl("Expected value to be of type string or array, but found "+nu(cu(N))+" instead.")},qa.prototype.eachChild=function(m){m(this.input)},qa.prototype.outputDefined=function(){return!1},qa.prototype.serialize=function(){var m=["length"];return this.eachChild(function(N){m.push(N.serialize())}),m};var gs={"==":na,"!=":io,">":Ko,"<":ns,">=":ps,"<=":ls,array:Cc,at:xh,boolean:Cc,case:df,coalesce:eh,collator:sh,format:Uh,image:_u,in:Bu,"index-of":iu,interpolate:gc,"interpolate-hcl":gc,"interpolate-lab":gc,length:qa,let:Ph,literal:rl,match:_h,number:Cc,"number-format":oo,object:Cc,slice:bh,step:Uc,string:Cc,"to-boolean":tl,"to-color":tl,"to-number":tl,"to-string":tl,var:Wh,within:Nc};function el(m,N){var X=N[0],wt=N[1],Ft=N[2],Zt=N[3];X=X.evaluate(m),wt=wt.evaluate(m),Ft=Ft.evaluate(m);var ie=Zt?Zt.evaluate(m):1,Re=fc(X,wt,Ft,ie);if(Re)throw new Yl(Re);return new Fl(X/255*ie,wt/255*ie,Ft/255*ie,ie)}function Pl(m,N){return m in N}function su(m,N){var X=N[m];return typeof X>"u"?null:X}function $l(m,N,X,wt){for(;X<=wt;){var Ft=X+wt>>1;if(N[Ft]===m)return!0;N[Ft]>m?wt=Ft-1:X=Ft+1}return!1}function lu(m){return{type:m}}Qo.register(gs,{error:[Su,[Ms],function(m,N){var X=N[0];throw new Yl(X.evaluate(m))}],typeof:[Ms,[ts],function(m,N){var X=N[0];return nu(cu(X.evaluate(m)))}],"to-rgba":[tu(lo,4),[ou],function(m,N){var X=N[0];return X.evaluate(m).toArray()}],rgb:[ou,[lo,lo,lo],el],rgba:[ou,[lo,lo,lo,lo],el],has:{type:Is,overloads:[[[Ms],function(m,N){var X=N[0];return Pl(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return Pl(X.evaluate(m),wt.evaluate(m))}]]},get:{type:ts,overloads:[[[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return su(X.evaluate(m),wt.evaluate(m))}]]},"feature-state":[ts,[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.featureState||{})}],properties:[hl,[],function(m){return m.properties()}],"geometry-type":[Ms,[],function(m){return m.geometryType()}],id:[ts,[],function(m){return m.id()}],zoom:[lo,[],function(m){return m.globals.zoom}],"heatmap-density":[lo,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[lo,[],function(m){return m.globals.lineProgress||0}],accumulated:[ts,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[lo,lu(lo),function(m,N){for(var X=0,wt=0,Ft=N;wt":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>Zt}],"filter-id->":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>Ft}],"filter-<=":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft<=Zt}],"filter-id-<=":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt<=Ft}],"filter->=":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>=Zt}],"filter-id->=":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>=Ft}],"filter-has":[Is,[ts],function(m,N){var X=N[0];return X.value in m.properties()}],"filter-has-id":[Is,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Is,[tu(Ms)],function(m,N){var X=N[0];return X.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Is,[tu(ts)],function(m,N){var X=N[0];return X.value.indexOf(m.id())>=0}],"filter-in-small":[Is,[Ms,tu(ts)],function(m,N){var X=N[0],wt=N[1];return wt.value.indexOf(m.properties()[X.value])>=0}],"filter-in-large":[Is,[Ms,tu(ts)],function(m,N){var X=N[0],wt=N[1];return $l(m.properties()[X.value],wt.value,0,wt.value.length-1)}],all:{type:Is,overloads:[[[Is,Is],function(m,N){var X=N[0],wt=N[1];return X.evaluate(m)&&wt.evaluate(m)}],[lu(Is),function(m,N){for(var X=0,wt=N;X-1}function Oo(m){return!!m.expression&&m.expression.interpolated}function Es(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function Kl(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Rl(m){return m}function vc(m,N){var X=N.type==="color",wt=m.stops&&typeof m.stops[0][0]=="object",Ft=wt||m.property!==void 0,Zt=wt||!Ft,ie=m.type||(Oo(N)?"exponential":"interval");if(X&&(m=Ql({},m),m.stops&&(m.stops=m.stops.map(function(Vo){return[Vo[0],Fl.parse(Vo[1])]})),m.default?m.default=Fl.parse(m.default):m.default=Fl.parse(N.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Pd[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Re,Je,yr;if(ie==="exponential")Re=Wc;else if(ie==="interval")Re=Ih;else if(ie==="categorical"){Re=Lc,Je=Object.create(null);for(var Cr=0,Kr=m.stops;Cr=m.stops[wt-1][0])return m.stops[wt-1][1];var Ft=Mc(m.stops.map(function(Zt){return Zt[0]}),X);return m.stops[Ft][1]}function Wc(m,N,X){var wt=m.base!==void 0?m.base:1;if(Es(X)!=="number")return Hc(m.default,N.default);var Ft=m.stops.length;if(Ft===1||X<=m.stops[0][0])return m.stops[0][1];if(X>=m.stops[Ft-1][0])return m.stops[Ft-1][1];var Zt=Mc(m.stops.map(function(Kr){return Kr[0]}),X),ie=Du(X,wt,m.stops[Zt][0],m.stops[Zt+1][0]),Re=m.stops[Zt][1],Je=m.stops[Zt+1][1],yr=qh[N.type]||Rl;if(m.colorSpace&&m.colorSpace!=="rgb"){var Cr=Pd[m.colorSpace];yr=function(Kr,an){return Cr.reverse(Cr.interpolate(Cr.forward(Kr),Cr.forward(an),ie))}}return typeof Re.evaluate=="function"?{evaluate:function(){for(var Kr=[],an=arguments.length;an--;)Kr[an]=arguments[an];var gn=Re.evaluate.apply(void 0,Kr),Rn=Je.evaluate.apply(void 0,Kr);if(!(gn===void 0||Rn===void 0))return yr(gn,Rn,ie)}}:yr(Re,Je,ie)}function zh(m,N,X){return N.type==="color"?X=Fl.parse(X):N.type==="formatted"?X=hc.fromString(X.toString()):N.type==="resolvedImage"?X=oc.fromString(X.toString()):Es(X)!==N.type&&(N.type!=="enum"||!N.values[X])&&(X=void 0),Hc(X,m.default,N.default)}function Du(m,N,X,wt){var Ft=wt-X,Zt=m-X;return Ft===0?0:N===1?Zt/Ft:(Math.pow(N,Zt)-1)/(Math.pow(N,Ft)-1)}var Oh=function(m,N){this.expression=m,this._warningHistory={},this._evaluator=new Ll,this._defaultValue=N?zt(N):null,this._enumValues=N&&N.type==="enum"?N.values:null};Oh.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._evaluator.globals=m,this._evaluator.feature=N,this._evaluator.featureState=X,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt,this.expression.evaluate(this._evaluator)},Oh.prototype.evaluate=function(m,N,X,wt,Ft,Zt){this._evaluator.globals=m,this._evaluator.feature=N||null,this._evaluator.featureState=X||null,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt||null;try{var ie=this.expression.evaluate(this._evaluator);if(ie==null||typeof ie=="number"&&ie!==ie)return this._defaultValue;if(this._enumValues&&!(ie in this._enumValues))throw new Yl("Expected value to be one of "+Object.keys(this._enumValues).map(function(Re){return JSON.stringify(Re)}).join(", ")+", but found "+JSON.stringify(ie)+" instead.");return ie}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console<"u"&&console.warn(Re.message)),this._defaultValue}};function rs(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in gs}function zs(m,N){var X=new hu(gs,[],N?Et(N):void 0),wt=X.parse(m,void 0,void 0,void 0,N&&N.type==="string"?{typeAnnotation:"coerce"}:void 0);return wt?ml(new Oh(wt,N)):qu(X.errors)}var qc=function(m,N){this.kind=m,this._styleExpression=N,this.isStateDependent=m!=="constant"&&!Ou(N.expression)};qc.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},qc.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)};var $u=function(m,N,X,wt){this.kind=m,this.zoomStops=X,this._styleExpression=N,this.isStateDependent=m!=="camera"&&!Ou(N.expression),this.interpolationType=wt};$u.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},$u.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)},$u.prototype.interpolationFactor=function(m,N,X){return this.interpolationType?gc.interpolationFactor(this.interpolationType,m,N,X):0};function qf(m,N){if(m=zs(m,N),m.result==="error")return m;var X=m.value.expression,wt=Xf(X);if(!wt&&!Iu(N))return qu([new al("","data expressions not supported")]);var Ft=jc(X,["zoom"]);if(!Ft&&!fu(N))return qu([new al("","zoom expressions not supported")]);var Zt=ht(X);if(!Zt&&!Ft)return qu([new al("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Zt instanceof al)return qu([Zt]);if(Zt instanceof gc&&!Oo(N))return qu([new al("",'"interpolate" expressions cannot be used with this property')]);if(!Zt)return ml(wt?new qc("constant",m.value):new qc("source",m.value));var ie=Zt instanceof gc?Zt.interpolation:void 0;return ml(wt?new $u("camera",m.value,Zt.labels,ie):new $u("composite",m.value,Zt.labels,ie))}var $t=function(m,N){this._parameters=m,this._specification=N,Ql(this,vc(this._parameters,this._specification))};$t.deserialize=function(m){return new $t(m._parameters,m._specification)},$t.serialize=function(m){return{_parameters:m._parameters,_specification:m._specification}};function z(m,N){if(Kl(m))return new $t(m,N);if(rs(m)){var X=qf(m,N);if(X.result==="error")throw new Error(X.value.map(function(Ft){return Ft.key+": "+Ft.message}).join(", "));return X.value}else{var wt=m;return typeof m=="string"&&N.type==="color"&&(wt=Fl.parse(m)),{kind:"constant",evaluate:function(){return wt}}}}function ht(m){var N=null;if(m instanceof Ph)N=ht(m.result);else if(m instanceof eh)for(var X=0,wt=m.args;Xwt.maximum?[new fo(N,X,X+" is greater than the maximum value "+wt.maximum)]:[]}function Ke(m){var N=m.valueSpec,X=Xo(m.value.type),wt,Ft={},Zt,ie,Re=X!=="categorical"&&m.value.property===void 0,Je=!Re,yr=Es(m.value.stops)==="array"&&Es(m.value.stops[0])==="array"&&Es(m.value.stops[0][0])==="object",Cr=Ht({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Kr,default:Rn}});return X==="identity"&&Re&&Cr.push(new fo(m.key,m.value,'missing required property "property"')),X!=="identity"&&!m.value.stops&&Cr.push(new fo(m.key,m.value,'missing required property "stops"')),X==="exponential"&&m.valueSpec.expression&&!Oo(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Je&&!Iu(m.valueSpec)?Cr.push(new fo(m.key,m.value,"property functions not supported")):Re&&!fu(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"zoom functions not supported"))),(X==="categorical"||yr)&&m.value.property===void 0&&Cr.push(new fo(m.key,m.value,'"property" property is required')),Cr;function Kr(gi){if(X==="identity")return[new fo(gi.key,gi.value,'identity function may not have a "stops" property')];var ua=[],oa=gi.value;return ua=ua.concat(ke({key:gi.key,value:oa,valueSpec:gi.valueSpec,style:gi.style,styleSpec:gi.styleSpec,arrayElementValidator:an})),Es(oa)==="array"&&oa.length===0&&ua.push(new fo(gi.key,oa,"array must have at least one stop")),ua}function an(gi){var ua=[],oa=gi.value,wa=gi.key;if(Es(oa)!=="array")return[new fo(wa,oa,"array expected, "+Es(oa)+" found")];if(oa.length!==2)return[new fo(wa,oa,"array length 2 expected, length "+oa.length+" found")];if(yr){if(Es(oa[0])!=="object")return[new fo(wa,oa,"object expected, "+Es(oa[0])+" found")];if(oa[0].zoom===void 0)return[new fo(wa,oa,"object stop key must have zoom")];if(oa[0].value===void 0)return[new fo(wa,oa,"object stop key must have value")];if(ie&&ie>Xo(oa[0].zoom))return[new fo(wa,oa[0].zoom,"stop zoom values must appear in ascending order")];Xo(oa[0].zoom)!==ie&&(ie=Xo(oa[0].zoom),Zt=void 0,Ft={}),ua=ua.concat(Ht({key:wa+"[0]",value:oa[0],valueSpec:{zoom:{}},style:gi.style,styleSpec:gi.styleSpec,objectElementValidators:{zoom:Fe,value:gn}}))}else ua=ua.concat(gn({key:wa+"[0]",value:oa[0],style:gi.style,styleSpec:gi.styleSpec},oa));return rs(Gl(oa[1]))?ua.concat([new fo(wa+"[1]",oa[1],"expressions are not allowed in function stops.")]):ua.concat(vl({key:wa+"[1]",value:oa[1],valueSpec:N,style:gi.style,styleSpec:gi.styleSpec}))}function gn(gi,ua){var oa=Es(gi.value),wa=Xo(gi.value),Ra=gi.value!==null?gi.value:ua;if(!wt)wt=oa;else if(oa!==wt)return[new fo(gi.key,Ra,oa+" stop domain type must match previous stop domain type "+wt)];if(oa!=="number"&&oa!=="string"&&oa!=="boolean")return[new fo(gi.key,Ra,"stop domain value must be a number, string, or boolean")];if(oa!=="number"&&X!=="categorical"){var xa="number expected, "+oa+" found";return Iu(N)&&X===void 0&&(xa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fo(gi.key,Ra,xa)]}return X==="categorical"&&oa==="number"&&(!isFinite(wa)||Math.floor(wa)!==wa)?[new fo(gi.key,Ra,"integer expected, found "+wa)]:X!=="categorical"&&oa==="number"&&Zt!==void 0&&wa=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var N=0,X=m.slice(1);NN?1:0}function Ae(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var N=1;N"||N==="<="||N===">="?Oe(m[1],m[2],N):N==="any"?$e(m.slice(1)):N==="all"?["all"].concat(m.slice(1).map(je)):N==="none"?["all"].concat(m.slice(1).map(je).map(Nr)):N==="in"?wr(m[1],m.slice(2)):N==="!in"?Nr(wr(m[1],m.slice(2))):N==="has"?Or(m[1]):N==="!has"?Nr(Or(m[1])):N==="within"?m:!0;return X}function Oe(m,N,X){switch(m){case"$type":return["filter-type-"+X,N];case"$id":return["filter-id-"+X,N];default:return["filter-"+X,m,N]}}function $e(m){return["any"].concat(m.map(je))}function wr(m,N){if(N.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",N]];case"$id":return["filter-id-in",["literal",N]];default:return N.length>200&&!N.some(function(X){return typeof X!=typeof N[0]})?["filter-in-large",m,["literal",N.sort(xe)]]:["filter-in-small",m,["literal",N]]}}function Or(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Nr(m){return["!",m]}function en(m){return Sn(Gl(m.value))?vr(Ql({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):vn(m)}function vn(m){var N=m.value,X=m.key;if(Es(N)!=="array")return[new fo(X,N,"array expected, "+Es(N)+" found")];var wt=m.styleSpec,Ft,Zt=[];if(N.length<1)return[new fo(X,N,"filter array must have at least 1 element")];switch(Zt=Zt.concat(un({key:X+"[0]",value:N[0],valueSpec:wt.filter_operator,style:m.style,styleSpec:m.styleSpec})),Xo(N[0])){case"<":case"<=":case">":case">=":N.length>=2&&Xo(N[1])==="$type"&&Zt.push(new fo(X,N,'"$type" cannot be use with operator "'+N[0]+'"'));case"==":case"!=":N.length!==3&&Zt.push(new fo(X,N,'filter array for operator "'+N[0]+'" must have 3 elements'));case"in":case"!in":N.length>=2&&(Ft=Es(N[1]),Ft!=="string"&&Zt.push(new fo(X+"[1]",N[1],"string expected, "+Ft+" found")));for(var ie=2;ie=Cr[gn+0]&&wt>=Cr[gn+1])?(ie[an]=!0,Zt.push(yr[an])):ie[an]=!1}}},ue.prototype._forEachCell=function(m,N,X,wt,Ft,Zt,ie,Re){for(var Je=this._convertToCellCoord(m),yr=this._convertToCellCoord(N),Cr=this._convertToCellCoord(X),Kr=this._convertToCellCoord(wt),an=Je;an<=Cr;an++)for(var gn=yr;gn<=Kr;gn++){var Rn=this.d*gn+an;if(!(Re&&!Re(this._convertFromCellCoord(an),this._convertFromCellCoord(gn),this._convertFromCellCoord(an+1),this._convertFromCellCoord(gn+1)))&&Ft.call(this,m,N,X,wt,Rn,Zt,ie,Re))return}},ue.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},ue.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},ue.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,N=Ut+this.cells.length+1+1,X=0,wt=0;wt=0)){var Kr=m[Cr];yr[Cr]=Ne[Je].shallow.indexOf(Cr)>=0?Kr:Jr(Kr,N)}m instanceof Error&&(yr.message=m.message)}if(yr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Je!=="Object"&&(yr.$name=Je),yr}throw new Error("can't serialize object of type "+typeof m)}function xn(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Er(m)||rn(m)||ArrayBuffer.isView(m)||m instanceof Me)return m;if(Array.isArray(m))return m.map(xn);if(typeof m=="object"){var N=m.$name||"Object",X=Ne[N],wt=X.klass;if(!wt)throw new Error("can't deserialize unregistered class "+N);if(wt.deserialize)return wt.deserialize(m);for(var Ft=Object.create(wt.prototype),Zt=0,ie=Object.keys(m);Zt=0?Je:xn(Je)}}return Ft}throw new Error("can't deserialize object of type "+typeof m)}var zn=function(){this.first=!0};zn.prototype.update=function(m,N){var X=Math.floor(m);return this.first?(this.first=!1,this.lastIntegerZoom=X,this.lastIntegerZoomTime=0,this.lastZoom=m,this.lastFloorZoom=X,!0):(this.lastFloorZoom>X?(this.lastIntegerZoom=X+1,this.lastIntegerZoomTime=N):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function Hi(m){for(var N=0,X=m;N=65097&&m<=65103)||On["CJK Compatibility Ideographs"](m)||On["CJK Compatibility"](m)||On["CJK Radicals Supplement"](m)||On["CJK Strokes"](m)||On["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||On["CJK Unified Ideographs Extension A"](m)||On["CJK Unified Ideographs"](m)||On["Enclosed CJK Letters and Months"](m)||On["Hangul Compatibility Jamo"](m)||On["Hangul Jamo Extended-A"](m)||On["Hangul Jamo Extended-B"](m)||On["Hangul Jamo"](m)||On["Hangul Syllables"](m)||On.Hiragana(m)||On["Ideographic Description Characters"](m)||On.Kanbun(m)||On["Kangxi Radicals"](m)||On["Katakana Phonetic Extensions"](m)||On.Katakana(m)&&m!==12540||On["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||On["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||On["Unified Canadian Aboriginal Syllabics"](m)||On["Unified Canadian Aboriginal Syllabics Extended"](m)||On["Vertical Forms"](m)||On["Yijing Hexagram Symbols"](m)||On["Yi Syllables"](m)||On["Yi Radicals"](m))}function Gi(m){return!!(On["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||On["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||On["Letterlike Symbols"](m)||On["Number Forms"](m)||On["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||On["Control Pictures"](m)&&m!==9251||On["Optical Character Recognition"](m)||On["Enclosed Alphanumerics"](m)||On["Geometric Shapes"](m)||On["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||On["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||On["CJK Symbols and Punctuation"](m)||On.Katakana(m)||On["Private Use Area"](m)||On["CJK Compatibility Forms"](m)||On["Small Form Variants"](m)||On["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Kn(m){return!(Ri(m)||Gi(m))}function Ua(m){return On.Arabic(m)||On["Arabic Supplement"](m)||On["Arabic Extended-A"](m)||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function Ha(m){return m>=1424&&m<=2303||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function ao(m,N){return!(!N&&Ha(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||On.Khmer(m))}function Po(m){for(var N=0,X=m;N-1&&(Go=Wo.error),ol&&ol(m)};function Ku(){du.fire(new $r("pluginStateChange",{pluginStatus:Go,pluginURL:vs}))}var du=new Br,_o=function(){return Go},Gs=function(m){return m({pluginStatus:Go,pluginURL:vs}),du.on("pluginStateChange",m),m},nl=function(m,N,X){if(X===void 0&&(X=!1),Go===Wo.deferred||Go===Wo.loading||Go===Wo.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");vs=It.resolveURL(m),Go=Wo.deferred,ol=N,Ku(),X||uu()},uu=function(){if(Go!==Wo.deferred||!vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Go=Wo.loading,Ku(),vs&&Tn({url:vs},function(m){m?Tl(m):(Go=Wo.loaded,Ku())})},Xl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Go===Wo.loaded||Xl.applyArabicShaping!=null},isLoading:function(){return Go===Wo.loading},setState:function(m){Go=m.pluginStatus,vs=m.pluginURL},isParsed:function(){return Xl.applyArabicShaping!=null&&Xl.processBidirectionalText!=null&&Xl.processStyledBidirectionalText!=null},getPluginURL:function(){return vs}},rh=function(){!Xl.isLoading()&&!Xl.isLoaded()&&_o()==="deferred"&&uu()},jl=function(m,N){this.zoom=m,N?(this.now=N.now,this.fadeDuration=N.fadeDuration,this.zoomHistory=N.zoomHistory,this.transition=N.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new zn,this.transition={})};jl.prototype.isSupportedScript=function(m){return Ro(m,Xl.isLoaded())},jl.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},jl.prototype.getCrossfadeParameters=function(){var m=this.zoom,N=m-Math.floor(m),X=this.crossFadingFactor();return m>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:N+(1-N)*X}:{fromScale:.5,toScale:1,t:1-(1-X)*N}};var ru=function(m,N){this.property=m,this.value=N,this.expression=z(N===void 0?m.specification.default:N,m.specification)};ru.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ru.prototype.possiblyEvaluate=function(m,N,X){return this.property.possiblyEvaluate(this,m,N,X)};var wh=function(m){this.property=m,this.value=new ru(m,void 0)};wh.prototype.transitioned=function(m,N){return new kr(this.property,this.value,N,C({},m.transition,this.transition),m.now)},wh.prototype.untransitioned=function(){return new kr(this.property,this.value,null,{},0)};var _e=function(m){this._properties=m,this._values=Object.create(m.defaultTransitionablePropertyValues)};_e.prototype.getValue=function(m){return F(this._values[m].value.value)},_e.prototype.setValue=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].value=new ru(this._values[m].property,N===null?void 0:F(N))},_e.prototype.getTransition=function(m){return F(this._values[m].transition)},_e.prototype.setTransition=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].transition=F(N)||void 0},_e.prototype.serialize=function(){for(var m={},N=0,X=Object.keys(this._values);Nthis.end)return this.prior=null,Ft;if(this.value.isDataDriven())return this.prior=null,Ft;if(wtZt.zoomHistory.lastIntegerZoom?{from:X,to:wt}:{from:Ft,to:wt}},N.prototype.interpolate=function(X){return X},N}(ai),$i=function(m){this.specification=m};$i.prototype.possiblyEvaluate=function(m,N,X,wt){if(m.value!==void 0)if(m.expression.kind==="constant"){var Ft=m.expression.evaluate(N,null,{},X,wt);return this._calculate(Ft,Ft,Ft,N)}else return this._calculate(m.expression.evaluate(new jl(Math.floor(N.zoom-1),N)),m.expression.evaluate(new jl(Math.floor(N.zoom),N)),m.expression.evaluate(new jl(Math.floor(N.zoom+1),N)),N)},$i.prototype._calculate=function(m,N,X,wt){var Ft=wt.zoom;return Ft>wt.zoomHistory.lastIntegerZoom?{from:m,to:N}:{from:X,to:N}},$i.prototype.interpolate=function(m){return m};var ya=function(m){this.specification=m};ya.prototype.possiblyEvaluate=function(m,N,X,wt){return!!m.expression.evaluate(N,null,{},X,wt)},ya.prototype.interpolate=function(){return!1};var $a=function(m){this.properties=m,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var N in m){var X=m[N];X.specification.overridable&&this.overridableProperties.push(N);var wt=this.defaultPropertyValues[N]=new ru(X,void 0),Ft=this.defaultTransitionablePropertyValues[N]=new wh(X);this.defaultTransitioningPropertyValues[N]=Ft.untransitioned(),this.defaultPossiblyEvaluatedValues[N]=wt.possiblyEvaluate({})}};sr("DataDrivenProperty",ai),sr("DataConstantProperty",yn),sr("CrossFadedDataDrivenProperty",ta),sr("CrossFadedProperty",$i),sr("ColorRampProperty",ya);var Na="-transition",ia=function(m){function N(X,wt){if(m.call(this),this.id=X.id,this.type=X.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},X.type!=="custom"&&(X=X,this.metadata=X.metadata,this.minzoom=X.minzoom,this.maxzoom=X.maxzoom,X.type!=="background"&&(this.source=X.source,this.sourceLayer=X["source-layer"],this.filter=X.filter),wt.layout&&(this._unevaluatedLayout=new Dn(wt.layout)),wt.paint)){this._transitionablePaint=new _e(wt.paint);for(var Ft in X.paint)this.setPaintProperty(Ft,X.paint[Ft],{validate:!1});for(var Zt in X.layout)this.setLayoutProperty(Zt,X.layout[Zt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ti(wt.paint)}}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},N.prototype.getLayoutProperty=function(X){return X==="visibility"?this.visibility:this._unevaluatedLayout.getValue(X)},N.prototype.setLayoutProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".layout."+X;if(this._validate(dc,Zt,X,wt,Ft))return}if(X==="visibility"){this.visibility=wt;return}this._unevaluatedLayout.setValue(X,wt)},N.prototype.getPaintProperty=function(X){return j(X,Na)?this._transitionablePaint.getTransition(X.slice(0,-Na.length)):this._transitionablePaint.getValue(X)},N.prototype.setPaintProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".paint."+X;if(this._validate(Yu,Zt,X,wt,Ft))return!1}if(j(X,Na))return this._transitionablePaint.setTransition(X.slice(0,-Na.length),wt||void 0),!1;var ie=this._transitionablePaint._values[X],Re=ie.property.specification["property-type"]==="cross-faded-data-driven",Je=ie.value.isDataDriven(),yr=ie.value;this._transitionablePaint.setValue(X,wt),this._handleSpecialPaintPropertyUpdate(X);var Cr=this._transitionablePaint._values[X].value,Kr=Cr.isDataDriven();return Kr||Je||Re||this._handleOverridablePaintPropertyUpdate(X,yr,Cr)},N.prototype._handleSpecialPaintPropertyUpdate=function(X){},N.prototype._handleOverridablePaintPropertyUpdate=function(X,wt,Ft){return!1},N.prototype.isHidden=function(X){return this.minzoom&&X=this.maxzoom?!0:this.visibility==="none"},N.prototype.updateTransitions=function(X){this._transitioningPaint=this._transitionablePaint.transitioned(X,this._transitioningPaint)},N.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},N.prototype.recalculate=function(X,wt){X.getCrossfadeParameters&&(this._crossfadeParameters=X.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(X,void 0,wt)),this.paint=this._transitioningPaint.possiblyEvaluate(X,void 0,wt)},N.prototype.serialize=function(){var X={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(X.layout=X.layout||{},X.layout.visibility=this.visibility),H(X,function(wt,Ft){return wt!==void 0&&!(Ft==="layout"&&!Object.keys(wt).length)&&!(Ft==="paint"&&!Object.keys(wt).length)})},N.prototype._validate=function(X,wt,Ft,Zt,ie){return ie===void 0&&(ie={}),ie&&ie.validate===!1?!1:$c(this,X.call($s,{key:wt,layerType:this.type,objectKey:Ft,value:Zt,styleSpec:Pa,style:{glyphs:!0,sprite:!0}}))},N.prototype.is3D=function(){return!1},N.prototype.isTileClipped=function(){return!1},N.prototype.hasOffscreenPass=function(){return!1},N.prototype.resize=function(){},N.prototype.isStateDependent=function(){for(var X in this.paint._values){var wt=this.paint.get(X);if(!(!(wt instanceof li)||!Iu(wt.property.specification))&&(wt.value.kind==="source"||wt.value.kind==="composite")&&wt.value.isStateDependent)return!0}return!1},N}(Br),Ai={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},fn=function(m,N){this._structArray=m,this._pos1=N*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},jn=128,Bi=5,Ti=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Ti.serialize=function(m,N){return m._trim(),N&&(m.isTransferred=!0,N.push(m.arrayBuffer)),{length:m.length,arrayBuffer:m.arrayBuffer}},Ti.deserialize=function(m){var N=Object.create(this.prototype);return N.arrayBuffer=m.arrayBuffer,N.length=m.length,N.capacity=m.arrayBuffer.byteLength/N.bytesPerElement,N._refreshViews(),N},Ti.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ti.prototype.clear=function(){this.length=0},Ti.prototype.resize=function(m){this.reserve(m),this.length=m},Ti.prototype.reserve=function(m){if(m>this.capacity){this.capacity=Math.max(m,Math.floor(this.capacity*Bi),jn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var N=this.uint8;this._refreshViews(),N&&this.uint8.set(N)}},Ti.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ei(m,N){N===void 0&&(N=1);var X=0,wt=0,Ft=m.map(function(ie){var Re=Sa(ie.type),Je=X=ha(X,Math.max(N,Re)),yr=ie.components||1;return wt=Math.max(wt,Re),X+=Re*yr,{name:ie.name,type:ie.type,components:yr,offset:Je}}),Zt=ha(X,Math.max(wt,N));return{members:Ft,size:Zt,alignment:N}}function Sa(m){return Ai[m].BYTES_PER_ELEMENT}function ha(m,N){return Math.ceil(m/N)*N}var Va=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.int16[Zt+0]=wt,this.int16[Zt+1]=Ft,X},N}(Ti);Va.prototype.bytesPerElement=4,sr("StructArrayLayout2i4",Va);var xi=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*4;return this.int16[Re+0]=wt,this.int16[Re+1]=Ft,this.int16[Re+2]=Zt,this.int16[Re+3]=ie,X},N}(Ti);xi.prototype.bytesPerElement=8,sr("StructArrayLayout4i8",xi);var ri=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Re,this.int16[yr+5]=Je,X},N}(Ti);ri.prototype.bytesPerElement=12,sr("StructArrayLayout2i4i12",ri);var Ea=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*4,Cr=X*8;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.uint8[Cr+4]=Zt,this.uint8[Cr+5]=ie,this.uint8[Cr+6]=Re,this.uint8[Cr+7]=Je,X},N}(Ti);Ea.prototype.bytesPerElement=8,sr("StructArrayLayout2i4ub8",Ea);var ma=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.float32[Zt+0]=wt,this.float32[Zt+1]=Ft,X},N}(Ti);ma.prototype.bytesPerElement=8,sr("StructArrayLayout2f8",ma);var Ki=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr){var an=this.length;return this.resize(an+1),this.emplace(an,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an){var gn=X*10;return this.uint16[gn+0]=wt,this.uint16[gn+1]=Ft,this.uint16[gn+2]=Zt,this.uint16[gn+3]=ie,this.uint16[gn+4]=Re,this.uint16[gn+5]=Je,this.uint16[gn+6]=yr,this.uint16[gn+7]=Cr,this.uint16[gn+8]=Kr,this.uint16[gn+9]=an,X},N}(Ti);Ki.prototype.bytesPerElement=20,sr("StructArrayLayout10ui20",Ki);var Ji=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn){var Rn=this.length;return this.resize(Rn+1),this.emplace(Rn,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn){var gi=X*12;return this.int16[gi+0]=wt,this.int16[gi+1]=Ft,this.int16[gi+2]=Zt,this.int16[gi+3]=ie,this.uint16[gi+4]=Re,this.uint16[gi+5]=Je,this.uint16[gi+6]=yr,this.uint16[gi+7]=Cr,this.int16[gi+8]=Kr,this.int16[gi+9]=an,this.int16[gi+10]=gn,this.int16[gi+11]=Rn,X},N}(Ti);Ji.prototype.bytesPerElement=24,sr("StructArrayLayout4i4ui4i24",Ji);var ba=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.float32[ie+0]=wt,this.float32[ie+1]=Ft,this.float32[ie+2]=Zt,X},N}(Ti);ba.prototype.bytesPerElement=12,sr("StructArrayLayout3f12",ba);var Io=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint32[Ft+0]=wt,X},N}(Ti);Io.prototype.bytesPerElement=4,sr("StructArrayLayout1ul4",Io);var wo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr){var Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,X,wt,Ft,Zt,ie,Re,Je,yr,Cr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr){var an=X*10,gn=X*5;return this.int16[an+0]=wt,this.int16[an+1]=Ft,this.int16[an+2]=Zt,this.int16[an+3]=ie,this.int16[an+4]=Re,this.int16[an+5]=Je,this.uint32[gn+3]=yr,this.uint16[an+8]=Cr,this.uint16[an+9]=Kr,X},N}(Ti);wo.prototype.bytesPerElement=20,sr("StructArrayLayout6i1ul2ui20",wo);var _a=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Re,this.int16[yr+5]=Je,X},N}(Ti);_a.prototype.bytesPerElement=12,sr("StructArrayLayout2i2i2i12",_a);var Fa=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie){var Re=this.length;return this.resize(Re+1),this.emplace(Re,X,wt,Ft,Zt,ie)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re){var Je=X*4,yr=X*8;return this.float32[Je+0]=wt,this.float32[Je+1]=Ft,this.float32[Je+2]=Zt,this.int16[yr+6]=ie,this.int16[yr+7]=Re,X},N}(Ti);Fa.prototype.bytesPerElement=16,sr("StructArrayLayout2f1f2i16",Fa);var vo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*12,Je=X*3;return this.uint8[Re+0]=wt,this.uint8[Re+1]=Ft,this.float32[Je+1]=Zt,this.float32[Je+2]=ie,X},N}(Ti);vo.prototype.bytesPerElement=12,sr("StructArrayLayout2ub2f12",vo);var Eo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.uint16[ie+0]=wt,this.uint16[ie+1]=Ft,this.uint16[ie+2]=Zt,X},N}(Ti);Eo.prototype.bytesPerElement=6,sr("StructArrayLayout3ui6",Eo);var es=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa){var Ra=this.length;return this.resize(Ra+1),this.emplace(Ra,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra){var xa=X*24,Xa=X*12,bo=X*48;return this.int16[xa+0]=wt,this.int16[xa+1]=Ft,this.uint16[xa+2]=Zt,this.uint16[xa+3]=ie,this.uint32[Xa+2]=Re,this.uint32[Xa+3]=Je,this.uint32[Xa+4]=yr,this.uint16[xa+10]=Cr,this.uint16[xa+11]=Kr,this.uint16[xa+12]=an,this.float32[Xa+7]=gn,this.float32[Xa+8]=Rn,this.uint8[bo+36]=gi,this.uint8[bo+37]=ua,this.uint8[bo+38]=oa,this.uint32[Xa+10]=wa,this.int16[xa+22]=Ra,X},N}(Ti);es.prototype.bytesPerElement=48,sr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",es);var Ul=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll){var Bs=this.length;return this.resize(Bs+1),this.emplace(Bs,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll,Bs){var Hs=X*34,Nu=X*17;return this.int16[Hs+0]=wt,this.int16[Hs+1]=Ft,this.int16[Hs+2]=Zt,this.int16[Hs+3]=ie,this.int16[Hs+4]=Re,this.int16[Hs+5]=Je,this.int16[Hs+6]=yr,this.int16[Hs+7]=Cr,this.uint16[Hs+8]=Kr,this.uint16[Hs+9]=an,this.uint16[Hs+10]=gn,this.uint16[Hs+11]=Rn,this.uint16[Hs+12]=gi,this.uint16[Hs+13]=ua,this.uint16[Hs+14]=oa,this.uint16[Hs+15]=wa,this.uint16[Hs+16]=Ra,this.uint16[Hs+17]=xa,this.uint16[Hs+18]=Xa,this.uint16[Hs+19]=bo,this.uint16[Hs+20]=Uo,this.uint16[Hs+21]=Vo,this.uint16[Hs+22]=ws,this.uint32[Nu+12]=ks,this.float32[Nu+13]=Rs,this.float32[Nu+14]=Ys,this.float32[Nu+15]=ll,this.float32[Nu+16]=Bs,X},N}(Ti);Ul.prototype.bytesPerElement=68,sr("StructArrayLayout8i15ui1ul4f68",Ul);var Al=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.float32[Ft+0]=wt,X},N}(Ti);Al.prototype.bytesPerElement=4,sr("StructArrayLayout1f4",Al);var hs=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.int16[ie+0]=wt,this.int16[ie+1]=Ft,this.int16[ie+2]=Zt,X},N}(Ti);hs.prototype.bytesPerElement=6,sr("StructArrayLayout3i6",hs);var ku=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*2,Re=X*4;return this.uint32[ie+0]=wt,this.uint16[Re+2]=Ft,this.uint16[Re+3]=Zt,X},N}(Ti);ku.prototype.bytesPerElement=8,sr("StructArrayLayout1ul2ui8",ku);var dl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.uint16[Zt+0]=wt,this.uint16[Zt+1]=Ft,X},N}(Ti);dl.prototype.bytesPerElement=4,sr("StructArrayLayout2ui4",dl);var Cu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint16[Ft+0]=wt,X},N}(Ti);Cu.prototype.bytesPerElement=2,sr("StructArrayLayout1ui2",Cu);var pc=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*4;return this.float32[Re+0]=wt,this.float32[Re+1]=Ft,this.float32[Re+2]=Zt,this.float32[Re+3]=ie,X},N}(Ti);pc.prototype.bytesPerElement=16,sr("StructArrayLayout4f16",pc);var yc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return X.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},X.x1.get=function(){return this._structArray.int16[this._pos2+2]},X.y1.get=function(){return this._structArray.int16[this._pos2+3]},X.x2.get=function(){return this._structArray.int16[this._pos2+4]},X.y2.get=function(){return this._structArray.int16[this._pos2+5]},X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(N.prototype,X),N}(fn);yc.prototype.size=20;var xu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new yc(this,X)},N}(wo);sr("CollisionBoxArray",xu);var pu=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},X.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},X.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},X.segment.get=function(){return this._structArray.uint16[this._pos2+10]},X.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},X.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},X.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},X.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},X.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},X.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},X.placedOrientation.set=function(wt){this._structArray.uint8[this._pos1+37]=wt},X.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},X.hidden.set=function(wt){this._structArray.uint8[this._pos1+38]=wt},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+10]=wt},X.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(N.prototype,X),N}(fn);pu.prototype.size=48;var Tu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new pu(this,X)},N}(es);sr("PlacedSymbolArray",Tu);var No=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},X.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},X.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},X.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},X.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},X.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},X.key.get=function(){return this._structArray.uint16[this._pos2+8]},X.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},X.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},X.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},X.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},X.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},X.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},X.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},X.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},X.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},X.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},X.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},X.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},X.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+12]=wt},X.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},X.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},X.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},X.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(N.prototype,X),N}(fn);No.prototype.size=68;var Au=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new No(this,X)},N}(Ul);sr("SymbolInstanceArray",Au);var sl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getoffsetX=function(X){return this.float32[X*1+0]},N}(Al);sr("GlyphOffsetArray",sl);var Lu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getx=function(X){return this.int16[X*3+0]},N.prototype.gety=function(X){return this.int16[X*3+1]},N.prototype.gettileUnitDistanceFromAnchor=function(X){return this.int16[X*3+2]},N}(hs);sr("SymbolLineVertexArray",Lu);var xc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(N.prototype,X),N}(fn);xc.prototype.size=8;var Co=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new xc(this,X)},N}(ku);sr("FeatureIndexArray",Co);var Cs=ei([{name:"a_pos",components:2,type:"Int16"}],4),Ml=Cs.members,yl=function(m){m===void 0&&(m=[]),this.segments=m};yl.prototype.prepareSegment=function(m,N,X,wt){var Ft=this.segments[this.segments.length-1];return m>yl.MAX_VERTEX_ARRAY_LENGTH&&q("Max vertices per segment is "+yl.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+m),(!Ft||Ft.vertexLength+m>yl.MAX_VERTEX_ARRAY_LENGTH||Ft.sortKey!==wt)&&(Ft={vertexOffset:N.length,primitiveOffset:X.length,vertexLength:0,primitiveLength:0},wt!==void 0&&(Ft.sortKey=wt),this.segments.push(Ft)),Ft},yl.prototype.get=function(){return this.segments},yl.prototype.destroy=function(){for(var m=0,N=this.segments;m>>16)*Je&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr,ie=ie<<13|ie>>>19,Re=(ie&65535)*5+(((ie>>>16)*5&65535)<<16)&4294967295,ie=(Re&65535)+27492+(((Re>>>16)+58964&65535)<<16);switch(Cr=0,Ft){case 3:Cr^=(X.charCodeAt(Kr+2)&255)<<16;case 2:Cr^=(X.charCodeAt(Kr+1)&255)<<8;case 1:Cr^=X.charCodeAt(Kr)&255,Cr=(Cr&65535)*Je+(((Cr>>>16)*Je&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr}return ie^=X.length,ie^=ie>>>16,ie=(ie&65535)*2246822507+(((ie>>>16)*2246822507&65535)<<16)&4294967295,ie^=ie>>>13,ie=(ie&65535)*3266489909+(((ie>>>16)*3266489909&65535)<<16)&4294967295,ie^=ie>>>16,ie>>>0}m.exports=N}),xt=e(function(m){function N(X,wt){for(var Ft=X.length,Zt=wt^Ft,ie=0,Re;Ft>=4;)Re=X.charCodeAt(ie)&255|(X.charCodeAt(++ie)&255)<<8|(X.charCodeAt(++ie)&255)<<16|(X.charCodeAt(++ie)&255)<<24,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Re^=Re>>>24,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)^Re,Ft-=4,++ie;switch(Ft){case 3:Zt^=(X.charCodeAt(ie+2)&255)<<16;case 2:Zt^=(X.charCodeAt(ie+1)&255)<<8;case 1:Zt^=X.charCodeAt(ie)&255,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)}return Zt^=Zt>>>13,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16),Zt^=Zt>>>15,Zt>>>0}m.exports=N}),Vt=et,de=et,ye=xt;Vt.murmur3=de,Vt.murmur2=ye;var Yt=function(){this.ids=[],this.positions=[],this.indexed=!1};Yt.prototype.add=function(m,N,X,wt){this.ids.push(Se(m)),this.positions.push(N,X,wt)},Yt.prototype.getPositions=function(m){for(var N=Se(m),X=0,wt=this.ids.length-1;X>1;this.ids[Ft]>=N?wt=Ft:X=Ft+1}for(var Zt=[];this.ids[X]===N;){var ie=this.positions[3*X],Re=this.positions[3*X+1],Je=this.positions[3*X+2];Zt.push({index:ie,start:Re,end:Je}),X++}return Zt},Yt.serialize=function(m,N){var X=new Float64Array(m.ids),wt=new Uint32Array(m.positions);return ir(X,wt,0,X.length-1),N&&N.push(X.buffer,wt.buffer),{ids:X,positions:wt}},Yt.deserialize=function(m){var N=new Yt;return N.ids=m.ids,N.positions=m.positions,N.indexed=!0,N};var ce=Math.pow(2,53)-1;function Se(m){var N=+m;return!isNaN(N)&&N<=ce?N:Vt(String(m))}function ir(m,N,X,wt){for(;X>1],Zt=X-1,ie=wt+1;;){do Zt++;while(m[Zt]Ft);if(Zt>=ie)break;Ye(m,Zt,ie),Ye(N,3*Zt,3*ie),Ye(N,3*Zt+1,3*ie+1),Ye(N,3*Zt+2,3*ie+2)}ie-Xie.x+1||Jeie.y+1)&&q("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return X}function Hl(m,N){return{type:m.type,id:m.id,properties:m.properties,geometry:N?pl(m):[]}}function _c(m,N,X,wt,Ft){m.emplaceBack(N*2+(wt+1)/2,X*2+(Ft+1)/2)}var Fs=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new Va,this.indexArray=new Eo,this.segments=new yl,this.programConfigurations=new Li(m.layers,m.zoom),this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Fs.prototype.populate=function(m,N,X){var wt=this.layers[0],Ft=[],Zt=null;wt.type==="circle"&&(Zt=wt.layout.get("circle-sort-key"));for(var ie=0,Re=m;ie=qo||Kr<0||Kr>=qo)){var an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,m.sortKey),gn=an.vertexLength;_c(this.layoutVertexArray,Cr,Kr,-1,-1),_c(this.layoutVertexArray,Cr,Kr,1,-1),_c(this.layoutVertexArray,Cr,Kr,1,1),_c(this.layoutVertexArray,Cr,Kr,-1,1),this.indexArray.emplaceBack(gn,gn+1,gn+2),this.indexArray.emplaceBack(gn,gn+3,gn+2),an.vertexLength+=4,an.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m,X,{},wt)},sr("CircleBucket",Fs,{omit:["layers"]});function Mu(m,N){for(var X=0;X=3){for(var Zt=0;Zt1){if(Tp(m,N))return!0;for(var wt=0;wt1?m.distSqr(X):m.distSqr(X.sub(N)._mult(Ft)._add(N))}function Mp(m,N){for(var X=!1,wt,Ft,Zt,ie=0;ieN.y!=Zt.y>N.y&&N.x<(Zt.x-Ft.x)*(N.y-Ft.y)/(Zt.y-Ft.y)+Ft.x&&(X=!X)}return X}function Hd(m,N){for(var X=!1,wt=0,Ft=m.length-1;wtN.y!=ie.y>N.y&&N.x<(ie.x-Zt.x)*(N.y-Zt.y)/(ie.y-Zt.y)+Zt.x&&(X=!X)}return X}function Q0(m,N,X,wt,Ft){for(var Zt=0,ie=m;Zt=Re.x&&Ft>=Re.y)return!0}var Je=[new o(N,X),new o(N,Ft),new o(wt,Ft),new o(wt,X)];if(m.length>2)for(var yr=0,Cr=Je;yrFt.x&&N.x>Ft.x||m.yFt.y&&N.y>Ft.y)return!1;var Zt=J(m,N,X[0]);return Zt!==J(m,N,X[1])||Zt!==J(m,N,X[2])||Zt!==J(m,N,X[3])}function Sp(m,N,X){var wt=N.paint.get(m).value;return wt.kind==="constant"?wt.value:X.programConfigurations.get(N.id).getMaxValue(m)}function Ep(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function tp(m,N,X,wt,Ft){if(!N[0]&&!N[1])return m;var Zt=o.convert(N)._mult(Ft);X==="viewport"&&Zt._rotate(-wt);for(var ie=[],Re=0;Re0&&(Zt=1/Math.sqrt(Zt)),m[0]=N[0]*Zt,m[1]=N[1]*Zt,m[2]=N[2]*Zt,m}function RT(m,N){return m[0]*N[0]+m[1]*N[1]+m[2]*N[2]}function BT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2],ie=X[0],Re=X[1],Je=X[2];return m[0]=Ft*Je-Zt*Re,m[1]=Zt*ie-wt*Je,m[2]=wt*Re-Ft*ie,m}function NT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2];return m[0]=wt*X[0]+Ft*X[3]+Zt*X[6],m[1]=wt*X[1]+Ft*X[4]+Zt*X[7],m[2]=wt*X[2]+Ft*X[5]+Zt*X[8],m}var jT=xb;(function(){var m=kx();return function(N,X,wt,Ft,Zt,ie){var Re,Je;for(X||(X=3),wt||(wt=0),Ft?Je=Math.min(Ft*X+wt,N.length):Je=N.length,Re=wt;Rem.width||Ft.height>m.height||X.x>m.width-Ft.width||X.y>m.height-Ft.height)throw new RangeError("out of range source coordinates for image copy");if(Ft.width>N.width||Ft.height>N.height||wt.x>N.width-Ft.width||wt.y>N.height-Ft.height)throw new RangeError("out of range destination coordinates for image copy");for(var ie=m.data,Re=N.data,Je=0;Je80*X){Re=yr=m[0],Je=Cr=m[1];for(var Rn=X;Rnyr&&(yr=Kr),an>Cr&&(Cr=an);gn=Math.max(yr-Re,Cr-Je),gn=gn!==0?1/gn:0}return Ng(Zt,ie,X,Re,Je,gn),ie}function kb(m,N,X,wt,Ft){var Zt,ie;if(Ft===Cb(m,N,X,wt)>0)for(Zt=N;Zt=N;Zt-=wt)ie=U3(Zt,m[Zt],m[Zt+1],ie);return ie&&Fv(ie,ie.next)&&(Q1(ie),ie=ie.next),ie}function Tm(m,N){if(!m)return m;N||(N=m);var X=m,wt;do if(wt=!1,!X.steiner&&(Fv(X,X.next)||pf(X.prev,X,X.next)===0)){if(Q1(X),X=N=X.prev,X===X.next)break;wt=!0}else X=X.next;while(wt||X!==N);return N}function Ng(m,N,X,wt,Ft,Zt,ie){if(m){!ie&&Zt&&Ab(m,wt,Ft,Zt);for(var Re=m,Je,yr;m.prev!==m.next;){if(Je=m.prev,yr=m.next,Zt?ZT(m,wt,Ft,Zt):Tb(m)){N.push(Je.i/X),N.push(m.i/X),N.push(yr.i/X),Q1(m),m=yr.next,Re=yr.next;continue}if(m=yr,m===Re){ie?ie===1?(m=GT(Tm(m),N,X),Ng(m,N,X,wt,Ft,Zt,2)):ie===2&&B3(m,N,X,wt,Ft,Zt):Ng(Tm(m),N,X,wt,Ft,Zt,1);break}}}}function Tb(m){var N=m.prev,X=m,wt=m.next;if(pf(N,X,wt)>=0)return!1;for(var Ft=m.next.next;Ft!==m.prev;){if(Qm(N.x,N.y,X.x,X.y,wt.x,wt.y,Ft.x,Ft.y)&&pf(Ft.prev,Ft,Ft.next)>=0)return!1;Ft=Ft.next}return!0}function ZT(m,N,X,wt){var Ft=m.prev,Zt=m,ie=m.next;if(pf(Ft,Zt,ie)>=0)return!1;for(var Re=Ft.xZt.x?Ft.x>ie.x?Ft.x:ie.x:Zt.x>ie.x?Zt.x:ie.x,Cr=Ft.y>Zt.y?Ft.y>ie.y?Ft.y:ie.y:Zt.y>ie.y?Zt.y:ie.y,Kr=Mb(Re,Je,N,X,wt),an=Mb(yr,Cr,N,X,wt),gn=m.prevZ,Rn=m.nextZ;gn&&gn.z>=Kr&&Rn&&Rn.z<=an;){if(gn!==m.prev&&gn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0||(gn=gn.prevZ,Rn!==m.prev&&Rn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0))return!1;Rn=Rn.nextZ}for(;gn&&gn.z>=Kr;){if(gn!==m.prev&&gn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0)return!1;gn=gn.prevZ}for(;Rn&&Rn.z<=an;){if(Rn!==m.prev&&Rn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0)return!1;Rn=Rn.nextZ}return!0}function GT(m,N,X){var wt=m;do{var Ft=wt.prev,Zt=wt.next.next;!Fv(Ft,Zt)&&jg(Ft,wt,wt.next,Zt)&&Rv(Ft,Zt)&&Rv(Zt,Ft)&&(N.push(Ft.i/X),N.push(wt.i/X),N.push(Zt.i/X),Q1(wt),Q1(wt.next),wt=m=Zt),wt=wt.next}while(wt!==m);return Tm(wt)}function B3(m,N,X,wt,Ft,Zt){var ie=m;do{for(var Re=ie.next.next;Re!==ie.prev;){if(ie.i!==Re.i&&KT(ie,Re)){var Je=Eb(ie,Re);ie=Tm(ie,ie.next),Je=Tm(Je,Je.next),Ng(ie,N,X,wt,Ft,Zt),Ng(Je,N,X,wt,Ft,Zt);return}Re=Re.next}ie=ie.next}while(ie!==m)}function N3(m,N,X,wt){var Ft=[],Zt,ie,Re,Je,yr;for(Zt=0,ie=N.length;Zt=X.next.y&&X.next.y!==X.y){var Re=X.x+(Ft-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(Re<=wt&&Re>Zt){if(Zt=Re,Re===wt){if(Ft===X.y)return X;if(Ft===X.next.y)return X.next}ie=X.x=X.x&&X.x>=yr&&wt!==X.x&&Qm(Ftie.x||X.x===ie.x&&j3(ie,X)))&&(ie=X,Kr=an)),X=X.next;while(X!==Je);return ie}function j3(m,N){return pf(m.prev,m,N.prev)<0&&pf(N.next,m,m.next)<0}function Ab(m,N,X,wt){var Ft=m;do Ft.z===null&&(Ft.z=Mb(Ft.x,Ft.y,N,X,wt)),Ft.prevZ=Ft.prev,Ft.nextZ=Ft.next,Ft=Ft.next;while(Ft!==m);Ft.prevZ.nextZ=null,Ft.prevZ=null,YT(Ft)}function YT(m){var N,X,wt,Ft,Zt,ie,Re,Je,yr=1;do{for(X=m,m=null,Zt=null,ie=0;X;){for(ie++,wt=X,Re=0,N=0;N0||Je>0&&wt;)Re!==0&&(Je===0||!wt||X.z<=wt.z)?(Ft=X,X=X.nextZ,Re--):(Ft=wt,wt=wt.nextZ,Je--),Zt?Zt.nextZ=Ft:m=Ft,Ft.prevZ=Zt,Zt=Ft;X=wt}Zt.nextZ=null,yr*=2}while(ie>1);return m}function Mb(m,N,X,wt,Ft){return m=32767*(m-X)*Ft,N=32767*(N-wt)*Ft,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,m|N<<1}function Ix(m){var N=m,X=m;do(N.x=0&&(m-ie)*(wt-Re)-(X-ie)*(N-Re)>=0&&(X-ie)*(Zt-Re)-(Ft-ie)*(wt-Re)>=0}function KT(m,N){return m.next.i!==N.i&&m.prev.i!==N.i&&!Sb(m,N)&&(Rv(m,N)&&Rv(N,m)&&zx(m,N)&&(pf(m.prev,m,N.prev)||pf(m,N.prev,N))||Fv(m,N)&&pf(m.prev,m,m.next)>0&&pf(N.prev,N,N.next)>0)}function pf(m,N,X){return(N.y-m.y)*(X.x-N.x)-(N.x-m.x)*(X.y-N.y)}function Fv(m,N){return m.x===N.x&&m.y===N.y}function jg(m,N,X,wt){var Ft=J1(pf(m,N,X)),Zt=J1(pf(m,N,wt)),ie=J1(pf(X,wt,m)),Re=J1(pf(X,wt,N));return!!(Ft!==Zt&&ie!==Re||Ft===0&&X1(m,X,N)||Zt===0&&X1(m,wt,N)||ie===0&&X1(X,m,wt)||Re===0&&X1(X,N,wt))}function X1(m,N,X){return N.x<=Math.max(m.x,X.x)&&N.x>=Math.min(m.x,X.x)&&N.y<=Math.max(m.y,X.y)&&N.y>=Math.min(m.y,X.y)}function J1(m){return m>0?1:m<0?-1:0}function Sb(m,N){var X=m;do{if(X.i!==m.i&&X.next.i!==m.i&&X.i!==N.i&&X.next.i!==N.i&&jg(X,X.next,m,N))return!0;X=X.next}while(X!==m);return!1}function Rv(m,N){return pf(m.prev,m,m.next)<0?pf(m,N,m.next)>=0&&pf(m,m.prev,N)>=0:pf(m,N,m.prev)<0||pf(m,m.next,N)<0}function zx(m,N){var X=m,wt=!1,Ft=(m.x+N.x)/2,Zt=(m.y+N.y)/2;do X.y>Zt!=X.next.y>Zt&&X.next.y!==X.y&&Ft<(X.next.x-X.x)*(Zt-X.y)/(X.next.y-X.y)+X.x&&(wt=!wt),X=X.next;while(X!==m);return wt}function Eb(m,N){var X=new Ox(m.i,m.x,m.y),wt=new Ox(N.i,N.x,N.y),Ft=m.next,Zt=N.prev;return m.next=N,N.prev=m,X.next=Ft,Ft.prev=X,wt.next=X,X.prev=wt,Zt.next=wt,wt.prev=Zt,wt}function U3(m,N,X,wt){var Ft=new Ox(m,N,X);return wt?(Ft.next=wt.next,Ft.prev=wt,wt.next.prev=Ft,wt.next=Ft):(Ft.prev=Ft,Ft.next=Ft),Ft}function Q1(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function Ox(m,N,X){this.i=m,this.x=N,this.y=X,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Px.deviation=function(m,N,X,wt){var Ft=N&&N.length,Zt=Ft?N[0]*X:m.length,ie=Math.abs(Cb(m,0,Zt,X));if(Ft)for(var Re=0,Je=N.length;Re0&&(wt+=m[Ft-1].length,X.holes.push(wt))}return X},Lx.default=R3;function XT(m,N,X,wt,Ft){V3(m,N,X,wt||m.length-1,Ft||Lb)}function V3(m,N,X,wt,Ft){for(;wt>X;){if(wt-X>600){var Zt=wt-X+1,ie=N-X+1,Re=Math.log(Zt),Je=.5*Math.exp(2*Re/3),yr=.5*Math.sqrt(Re*Je*(Zt-Je)/Zt)*(ie-Zt/2<0?-1:1),Cr=Math.max(X,Math.floor(N-ie*Je/Zt+yr)),Kr=Math.min(wt,Math.floor(N+(Zt-ie)*Je/Zt+yr));V3(m,N,Cr,Kr,Ft)}var an=m[N],gn=X,Rn=wt;for(ty(m,X,N),Ft(m[wt],an)>0&&ty(m,X,wt);gn0;)Rn--}Ft(m[X],an)===0?ty(m,X,Rn):(Rn++,ty(m,Rn,wt)),Rn<=N&&(X=Rn+1),N<=Rn&&(wt=Rn-1)}}function ty(m,N,X){var wt=m[N];m[N]=m[X],m[X]=wt}function Lb(m,N){return mN?1:0}function em(m,N){var X=m.length;if(X<=1)return[m];for(var wt=[],Ft,Zt,ie=0;ie1)for(var Je=0;Je>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),X===1&&(Re&&ie.push(Re),Re=[]),Re.push(new o(Ft,Zt));else if(X===7)Re&&Re.push(Re[0].clone());else throw new Error("unknown command "+X)}return Re&&ie.push(Re),ie},Ug.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var N=m.readVarint()+m.pos,X=1,wt=0,Ft=0,Zt=0,ie=1/0,Re=-1/0,Je=1/0,yr=-1/0;m.pos>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),FtRe&&(Re=Ft),Ztyr&&(yr=Zt);else if(X!==7)throw new Error("unknown command "+X)}return[ie,Je,Re,yr]},Ug.prototype.toGeoJSON=function(m,N,X){var wt=this.extent*Math.pow(2,X),Ft=this.extent*m,Zt=this.extent*N,ie=this.loadGeometry(),Re=Ug.types[this.type],Je,yr;function Cr(gn){for(var Rn=0;Rn>3;N=wt===1?m.readString():wt===2?m.readFloat():wt===3?m.readDouble():wt===4?m.readVarint64():wt===5?m.readVarint():wt===6?m.readSVarint():wt===7?m.readBoolean():null}return N}X3.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var N=this._pbf.readVarint()+this._pbf.pos;return new Bv(this._pbf,N,this.extent,this._keys,this._values)};var Q3=t5;function t5(m,N){this.layers=m.readFields(e5,{},N)}function e5(m,N,X){if(m===3){var wt=new zb(X,X.readVarint()+X.pos);wt.length&&(N[wt.name]=wt)}}var r5=Q3,JT=Bv,QT=zb,Vg={VectorTile:r5,VectorTileFeature:JT,VectorTileLayer:QT},Nv=Vg.VectorTileFeature.types,n5=500,jv=Math.pow(2,13);function Uv(m,N,X,wt,Ft,Zt,ie,Re){m.emplaceBack(N,X,Math.floor(wt*jv)*2+ie,Ft*jv*2,Zt*jv*2,Math.round(Re))}var Up=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new ri,this.indexArray=new Eo,this.programConfigurations=new Li(m.layers,m.zoom),this.segments=new yl,this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Up.prototype.populate=function(m,N,X){this.features=[],this.hasPattern=Dx("fill-extrusion",this.layers,N);for(var wt=0,Ft=m;wt=1){var Ra=gi[oa-1];if(!Rx(wa,Ra)){an.vertexLength+4>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var xa=wa.sub(Ra)._perp()._unit(),Xa=Ra.dist(wa);ua+Xa>32768&&(ua=0),Uv(this.layoutVertexArray,wa.x,wa.y,xa.x,xa.y,0,0,ua),Uv(this.layoutVertexArray,wa.x,wa.y,xa.x,xa.y,0,1,ua),ua+=Xa,Uv(this.layoutVertexArray,Ra.x,Ra.y,xa.x,xa.y,0,0,ua),Uv(this.layoutVertexArray,Ra.x,Ra.y,xa.x,xa.y,0,1,ua);var bo=an.vertexLength;this.indexArray.emplaceBack(bo,bo+2,bo+1),this.indexArray.emplaceBack(bo+1,bo+2,bo+3),an.vertexLength+=4,an.primitiveLength+=2}}}}if(an.vertexLength+Je>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(Je,this.layoutVertexArray,this.indexArray)),Nv[m.type]==="Polygon"){for(var Uo=[],Vo=[],ws=an.vertexLength,ks=0,Rs=Re;ksqo)||m.y===N.y&&(m.y<0||m.y>qo)}function Bx(m){return m.every(function(N){return N.x<0})||m.every(function(N){return N.x>qo})||m.every(function(N){return N.y<0})||m.every(function(N){return N.y>qo})}var t8=new $a({"fill-extrusion-opacity":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ta(Pa["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),e8={paint:t8},r8=function(m){function N(X){m.call(this,X,e8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.createBucket=function(X){return new Up(X)},N.prototype.queryRadius=function(){return Ep(this.paint.get("fill-extrusion-translate"))},N.prototype.is3D=function(){return!0},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Re,Je,yr){var Cr=tp(X,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Re.angle,Je),Kr=this.paint.get("fill-extrusion-height").evaluate(wt,Ft),an=this.paint.get("fill-extrusion-base").evaluate(wt,Ft),gn=i5(Cr,yr,Re,0),Rn=Ob(Zt,an,Kr,yr),gi=Rn[0],ua=Rn[1];return eg(gi,ua,gn)},N}(ia);function rm(m,N){return m.x*N.x+m.y*N.y}function Id(m,N){if(m.length===1){for(var X=0,wt=N[X++],Ft;!Ft||wt.equals(Ft);)if(Ft=N[X++],!Ft)return 1/0;for(;X=2&&m[Je-1].equals(m[Je-2]);)Je--;for(var yr=0;yr0;if(Uo&&oa>yr){var ws=an.dist(gn);if(ws>2*Cr){var ks=an.sub(an.sub(gn)._mult(Cr/ws)._round());this.updateDistance(gn,ks),this.addCurrentVertex(ks,gi,0,0,Kr),gn=ks}}var Rs=gn&&Rn,Ys=Rs?X:Re?"butt":wt;if(Rs&&Ys==="round"&&(XaFt&&(Ys="bevel"),Ys==="bevel"&&(Xa>2&&(Ys="flipbevel"),Xa100)wa=ua.mult(-1);else{var ll=Xa*gi.add(ua).mag()/gi.sub(ua).mag();wa._perp()._mult(ll*(Vo?-1:1))}this.addCurrentVertex(an,wa,0,0,Kr),this.addCurrentVertex(an,wa.mult(-1),0,0,Kr)}else if(Ys==="bevel"||Ys==="fakeround"){var Bs=-Math.sqrt(Xa*Xa-1),Hs=Vo?Bs:0,Nu=Vo?0:Bs;if(gn&&this.addCurrentVertex(an,gi,Hs,Nu,Kr),Ys==="fakeround")for(var zc=Math.round(bo*180/Math.PI/Rb),hh=1;hh2*Cr){var id=an.add(Rn.sub(an)._mult(Cr/Gd)._round());this.updateDistance(an,id),this.addCurrentVertex(id,ua,0,0,Kr),an=id}}}}},qd.prototype.addCurrentVertex=function(m,N,X,wt,Ft,Zt){Zt===void 0&&(Zt=!1);var ie=N.x+N.y*X,Re=N.y-N.x*X,Je=-N.x+N.y*wt,yr=-N.y-N.x*wt;this.addHalfVertex(m,ie,Re,Zt,!1,X,Ft),this.addHalfVertex(m,Je,yr,Zt,!0,-wt,Ft),this.distance>Nx/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(m,N,X,wt,Ft,Zt))},qd.prototype.addHalfVertex=function(m,N,X,wt,Ft,Zt,ie){var Re=m.x,Je=m.y,yr=this.lineClips?this.scaledDistance*(Nx-1):this.scaledDistance,Cr=yr*Vv;if(this.layoutVertexArray.emplaceBack((Re<<1)+(wt?1:0),(Je<<1)+(Ft?1:0),Math.round(l5*N)+128,Math.round(l5*X)+128,(Zt===0?0:Zt<0?-1:1)+1|(Cr&63)<<2,Cr>>6),this.lineClips){var Kr=this.scaledDistance-this.lineClips.start,an=this.lineClips.end-this.lineClips.start,gn=Kr/an;this.layoutVertexArray2.emplaceBack(gn,this.lineClipsArray.length)}var Rn=ie.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rn),ie.primitiveLength++),Ft?this.e2=Rn:this.e1=Rn},qd.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},qd.prototype.updateDistance=function(m,N){this.distance+=m.dist(N),this.updateScaledDistance()},sr("LineBucket",qd,{omit:["layers","patternFeatures"]});var Bb=new $a({"line-cap":new yn(Pa.layout_line["line-cap"]),"line-join":new ai(Pa.layout_line["line-join"]),"line-miter-limit":new yn(Pa.layout_line["line-miter-limit"]),"line-round-limit":new yn(Pa.layout_line["line-round-limit"]),"line-sort-key":new ai(Pa.layout_line["line-sort-key"])}),jx=new $a({"line-opacity":new ai(Pa.paint_line["line-opacity"]),"line-color":new ai(Pa.paint_line["line-color"]),"line-translate":new yn(Pa.paint_line["line-translate"]),"line-translate-anchor":new yn(Pa.paint_line["line-translate-anchor"]),"line-width":new ai(Pa.paint_line["line-width"]),"line-gap-width":new ai(Pa.paint_line["line-gap-width"]),"line-offset":new ai(Pa.paint_line["line-offset"]),"line-blur":new ai(Pa.paint_line["line-blur"]),"line-dasharray":new $i(Pa.paint_line["line-dasharray"]),"line-pattern":new ta(Pa.paint_line["line-pattern"]),"line-gradient":new ya(Pa.paint_line["line-gradient"])}),Hv={paint:jx,layout:Bb},Nb=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.possiblyEvaluate=function(X,wt){return wt=new jl(Math.floor(wt.zoom),{now:wt.now,fadeDuration:wt.fadeDuration,zoomHistory:wt.zoomHistory,transition:wt.transition}),m.prototype.possiblyEvaluate.call(this,X,wt)},N.prototype.evaluate=function(X,wt,Ft,Zt){return wt=C({},wt,{zoom:Math.floor(wt.zoom)}),m.prototype.evaluate.call(this,X,wt,Ft,Zt)},N}(ai),Ux=new Nb(Hv.paint.properties["line-width"].specification);Ux.useIntegerZoom=!0;var jb=function(m){function N(X){m.call(this,X,Hv),this.gradientVersion=0}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._handleSpecialPaintPropertyUpdate=function(X){if(X==="line-gradient"){var wt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=wt._styleExpression.expression instanceof Uc,this.gradientVersion=(this.gradientVersion+1)%x}},N.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},N.prototype.recalculate=function(X,wt){m.prototype.recalculate.call(this,X,wt),this.paint._values["line-floorwidth"]=Ux.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,X)},N.prototype.createBucket=function(X){return new qd(X)},N.prototype.queryRadius=function(X){var wt=X,Ft=h5(Sp("line-width",this,wt),Sp("line-gap-width",this,wt)),Zt=Sp("line-offset",this,wt);return Ft/2+Math.abs(Zt)+Ep(this.paint.get("line-translate"))},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Re,Je){var yr=tp(X,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Re.angle,Je),Cr=Je/2*h5(this.paint.get("line-width").evaluate(wt,Ft),this.paint.get("line-gap-width").evaluate(wt,Ft)),Kr=this.paint.get("line-offset").evaluate(wt,Ft);return Kr&&(Zt=G(Zt,Kr*Je)),jp(yr,Zt,Cr)},N.prototype.isTileClipped=function(){return!0},N}(ia);function h5(m,N){return N>0?N+2*m:m}function G(m,N){for(var X=[],wt=new o(0,0),Ft=0;Ft":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xr(m){for(var N="",X=0;X>1,Cr=-7,Kr=X?Ft-1:0,an=X?-1:1,gn=m[N+Kr];for(Kr+=an,Zt=gn&(1<<-Cr)-1,gn>>=-Cr,Cr+=Re;Cr>0;Zt=Zt*256+m[N+Kr],Kr+=an,Cr-=8);for(ie=Zt&(1<<-Cr)-1,Zt>>=-Cr,Cr+=wt;Cr>0;ie=ie*256+m[N+Kr],Kr+=an,Cr-=8);if(Zt===0)Zt=1-yr;else{if(Zt===Je)return ie?NaN:(gn?-1:1)*(1/0);ie=ie+Math.pow(2,wt),Zt=Zt-yr}return(gn?-1:1)*ie*Math.pow(2,Zt-wt)},ln=function(m,N,X,wt,Ft,Zt){var ie,Re,Je,yr=Zt*8-Ft-1,Cr=(1<>1,an=Ft===23?Math.pow(2,-24)-Math.pow(2,-77):0,gn=wt?0:Zt-1,Rn=wt?1:-1,gi=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(Re=isNaN(N)?1:0,ie=Cr):(ie=Math.floor(Math.log(N)/Math.LN2),N*(Je=Math.pow(2,-ie))<1&&(ie--,Je*=2),ie+Kr>=1?N+=an/Je:N+=an*Math.pow(2,1-Kr),N*Je>=2&&(ie++,Je/=2),ie+Kr>=Cr?(Re=0,ie=Cr):ie+Kr>=1?(Re=(N*Je-1)*Math.pow(2,Ft),ie=ie+Kr):(Re=N*Math.pow(2,Kr-1)*Math.pow(2,Ft),ie=0));Ft>=8;m[X+gn]=Re&255,gn+=Rn,Re/=256,Ft-=8);for(ie=ie<0;m[X+gn]=ie&255,gn+=Rn,ie/=256,yr-=8);m[X+gn-Rn]|=gi*128},bn={read:Zr,write:ln},Ln=Gn;function Gn(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Gn.Varint=0,Gn.Fixed64=1,Gn.Bytes=2,Gn.Fixed32=5;var Mi=65536*65536,Aa=1/Mi,ra=12,ga=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Gn.prototype={destroy:function(){this.buf=null},readFields:function(m,N,X){for(X=X||this.length;this.pos>3,Zt=this.pos;this.type=wt&7,m(Ft,N,this),this.pos===Zt&&this.skip(wt)}return N},readMessage:function(m,N){return this.readFields(m,N,this.readVarint()+this.pos)},readFixed32:function(){var m=Cp(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=td(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Cp(this.buf,this.pos)+Cp(this.buf,this.pos+4)*Mi;return this.pos+=8,m},readSFixed64:function(){var m=Cp(this.buf,this.pos)+td(this.buf,this.pos+4)*Mi;return this.pos+=8,m},readFloat:function(){var m=bn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=bn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var N=this.buf,X,wt;return wt=N[this.pos++],X=wt&127,wt<128||(wt=N[this.pos++],X|=(wt&127)<<7,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<14,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<21,wt<128)?X:(wt=N[this.pos],X|=(wt&15)<<28,Ya(X,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,N=this.pos;return this.pos=m,m-N>=ra&&ga?pp(this.buf,N,m):dp(this.buf,N,m)},readBytes:function(){var m=this.readVarint()+this.pos,N=this.buf.subarray(this.pos,m);return this.pos=m,N},readPackedVarint:function(m,N){if(this.type!==Gn.Bytes)return m.push(this.readVarint(N));var X=Ao(this);for(m=m||[];this.pos127;);else if(N===Gn.Bytes)this.pos=this.readVarint()+this.pos;else if(N===Gn.Fixed32)this.pos+=4;else if(N===Gn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+N)},writeTag:function(m,N){this.writeVarint(m<<3|N)},realloc:function(m){for(var N=this.length||16;N268435455||m<0){Sl(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var N=this.pos;this.pos=mp(this.buf,m,this.pos);var X=this.pos-N;X>=128&&Xs(N,X,this),this.pos=N-1,this.writeVarint(X),this.pos+=X},writeFloat:function(m){this.realloc(4),bn.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),bn.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var N=m.length;this.writeVarint(N),this.realloc(N);for(var X=0;X=128&&Xs(X,wt,this),this.pos=X-1,this.writeVarint(wt),this.pos+=wt},writeMessage:function(m,N,X){this.writeTag(m,Gn.Bytes),this.writeRawMessage(N,X)},writePackedVarint:function(m,N){N.length&&this.writeMessage(m,js,N)},writePackedSVarint:function(m,N){N.length&&this.writeMessage(m,Os,N)},writePackedBoolean:function(m,N){N.length&&this.writeMessage(m,Js,N)},writePackedFloat:function(m,N){N.length&&this.writeMessage(m,uo,N)},writePackedDouble:function(m,N){N.length&&this.writeMessage(m,il,N)},writePackedFixed32:function(m,N){N.length&&this.writeMessage(m,Zl,N)},writePackedSFixed32:function(m,N){N.length&&this.writeMessage(m,uh,N)},writePackedFixed64:function(m,N){N.length&&this.writeMessage(m,nh,N)},writePackedSFixed64:function(m,N){N.length&&this.writeMessage(m,gd,N)},writeBytesField:function(m,N){this.writeTag(m,Gn.Bytes),this.writeBytes(N)},writeFixed32Field:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeFixed32(N)},writeSFixed32Field:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeSFixed32(N)},writeFixed64Field:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeFixed64(N)},writeSFixed64Field:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeSFixed64(N)},writeVarintField:function(m,N){this.writeTag(m,Gn.Varint),this.writeVarint(N)},writeSVarintField:function(m,N){this.writeTag(m,Gn.Varint),this.writeSVarint(N)},writeStringField:function(m,N){this.writeTag(m,Gn.Bytes),this.writeString(N)},writeFloatField:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeFloat(N)},writeDoubleField:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeDouble(N)},writeBooleanField:function(m,N){this.writeVarintField(m,!!N)}};function Ya(m,N,X){var wt=X.buf,Ft,Zt;if(Zt=wt[X.pos++],Ft=(Zt&112)>>4,Zt<128||(Zt=wt[X.pos++],Ft|=(Zt&127)<<3,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<10,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<17,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<24,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&1)<<31,Zt<128))return Ss(m,Ft,N);throw new Error("Expected varint not more than 10 bytes")}function Ao(m){return m.type===Gn.Bytes?m.readVarint()+m.pos:m.pos+1}function Ss(m,N,X){return X?N*4294967296+(m>>>0):(N>>>0)*4294967296+(m>>>0)}function Sl(m,N){var X,wt;if(m>=0?(X=m%4294967296|0,wt=m/4294967296|0):(X=~(-m%4294967296),wt=~(-m/4294967296),X^4294967295?X=X+1|0:(X=0,wt=wt+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");N.realloc(10),_s(X,wt,N),fs(wt,N)}function _s(m,N,X){X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos]=m&127}function fs(m,N){var X=(m&7)<<4;N.buf[N.pos++]|=X|((m>>>=3)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127)))))}function Xs(m,N,X){var wt=N<=16383?1:N<=2097151?2:N<=268435455?3:Math.floor(Math.log(N)/(Math.LN2*7));X.realloc(wt);for(var Ft=X.pos-1;Ft>=m;Ft--)X.buf[Ft+wt]=X.buf[Ft]}function js(m,N){for(var X=0;X>>8,m[X+2]=N>>>16,m[X+3]=N>>>24}function td(m,N){return(m[N]|m[N+1]<<8|m[N+2]<<16)+(m[N+3]<<24)}function dp(m,N,X){for(var wt="",Ft=N;Ft239?4:Zt>223?3:Zt>191?2:1;if(Ft+Re>X)break;var Je,yr,Cr;Re===1?Zt<128&&(ie=Zt):Re===2?(Je=m[Ft+1],(Je&192)===128&&(ie=(Zt&31)<<6|Je&63,ie<=127&&(ie=null))):Re===3?(Je=m[Ft+1],yr=m[Ft+2],(Je&192)===128&&(yr&192)===128&&(ie=(Zt&15)<<12|(Je&63)<<6|yr&63,(ie<=2047||ie>=55296&&ie<=57343)&&(ie=null))):Re===4&&(Je=m[Ft+1],yr=m[Ft+2],Cr=m[Ft+3],(Je&192)===128&&(yr&192)===128&&(Cr&192)===128&&(ie=(Zt&15)<<18|(Je&63)<<12|(yr&63)<<6|Cr&63,(ie<=65535||ie>=1114112)&&(ie=null))),ie===null?(ie=65533,Re=1):ie>65535&&(ie-=65536,wt+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|ie&1023),wt+=String.fromCharCode(ie),Ft+=Re}return wt}function pp(m,N,X){return ga.decode(m.subarray(N,X))}function mp(m,N,X){for(var wt=0,Ft,Zt;wt55295&&Ft<57344)if(Zt)if(Ft<56320){m[X++]=239,m[X++]=191,m[X++]=189,Zt=Ft;continue}else Ft=Zt-55296<<10|Ft-56320|65536,Zt=null;else{Ft>56319||wt+1===N.length?(m[X++]=239,m[X++]=191,m[X++]=189):Zt=Ft;continue}else Zt&&(m[X++]=239,m[X++]=191,m[X++]=189,Zt=null);Ft<128?m[X++]=Ft:(Ft<2048?m[X++]=Ft>>6|192:(Ft<65536?m[X++]=Ft>>12|224:(m[X++]=Ft>>18|240,m[X++]=Ft>>12&63|128),m[X++]=Ft>>6&63|128),m[X++]=Ft&63|128)}return X}var sf=3;function vd(m,N,X){m===1&&X.readMessage(ep,N)}function ep(m,N,X){if(m===3){var wt=X.readMessage($d,{}),Ft=wt.id,Zt=wt.bitmap,ie=wt.width,Re=wt.height,Je=wt.left,yr=wt.top,Cr=wt.advance;N.push({id:Ft,bitmap:new Qf({width:ie+2*sf,height:Re+2*sf},Zt),metrics:{width:ie,height:Re,left:Je,top:yr,advance:Cr}})}}function $d(m,N,X){m===1?N.id=X.readVarint():m===2?N.bitmap=X.readBytes():m===3?N.width=X.readVarint():m===4?N.height=X.readVarint():m===5?N.left=X.readSVarint():m===6?N.top=X.readSVarint():m===7&&(N.advance=X.readVarint())}function gp(m){return new Ln(m).readFields(vd,[])}var zd=sf;function Vp(m){for(var N=0,X=0,wt=0,Ft=m;wt=0;gn--){var Rn=Re[gn];if(!(an.w>Rn.w||an.h>Rn.h)){if(an.x=Rn.x,an.y=Rn.y,yr=Math.max(yr,an.y+an.h),Je=Math.max(Je,an.x+an.w),an.w===Rn.w&&an.h===Rn.h){var gi=Re.pop();gn=0&&wt>=m&&Hp[this.text.charCodeAt(wt)];wt--)X--;this.text=this.text.substring(m,X),this.sectionIndex=this.sectionIndex.slice(m,X)},ch.prototype.substring=function(m,N){var X=new ch;return X.text=this.text.substring(m,N),X.sectionIndex=this.sectionIndex.slice(m,N),X.sections=this.sections,X},ch.prototype.toString=function(){return this.text},ch.prototype.getMaxScale=function(){var m=this;return this.sectionIndex.reduce(function(N,X){return Math.max(N,m.sections[X].scale)},0)},ch.prototype.addTextSection=function(m,N){this.text+=m.text,this.sections.push(rp.forText(m.scale,m.fontStack||N));for(var X=this.sections.length-1,wt=0;wt=U0?null:++this.imageSectionID:(this.imageSectionID=j0,this.imageSectionID)};function Od(m,N){for(var X=[],wt=m.text,Ft=0,Zt=0,ie=N;Zt=0,Cr=0,Kr=0;Kr0&&ih>ws&&(ws=ih)}else{var Of=X[Rs.fontStack],Gd=Of&&Of[ll];if(Gd&&Gd.rect)Nu=Gd.rect,Hs=Gd.metrics;else{var id=N[Rs.fontStack],yp=id&&id[ll];if(!yp)continue;Hs=yp.metrics}Bs=(Xa-Rs.scale)*Lr}Xu?(m.verticalizable=!0,Vo.push({glyph:ll,imageName:zc,x:an,y:gn+Bs,vertical:Xu,scale:Rs.scale,fontStack:Rs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),an+=hh*Rs.scale+yr):(Vo.push({glyph:ll,imageName:zc,x:an,y:gn+Bs,vertical:Xu,scale:Rs.scale,fontStack:Rs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),an+=Hs.advance*Rs.scale+yr)}if(Vo.length!==0){var xp=an-yr;Rn=Math.max(xp,Rn),a8(Vo,0,Vo.length-1,ua,ws)}an=0;var _p=Zt*Xa+ws;Uo.lineOffset=Math.max(ws,bo),gn+=_p,gi=Math.max(_p,gi),++oa}var Fd=gn-Th,Lp=$b(ie),Pp=Lp.horizontalAlign,yd=Lp.verticalAlign;o8(m.positionedLines,ua,Pp,yd,Rn,gi,Zt,Fd,Ft.length),m.top+=-yd*Fd,m.bottom=m.top+Fd,m.left+=-Pp*Rn,m.right=m.left+Rn}function a8(m,N,X,wt,Ft){if(!(!wt&&!Ft))for(var Zt=m[X],ie=Zt.metrics.advance*Zt.scale,Re=(m[X].x+ie)*wt,Je=N;Je<=X;Je++)m[Je].x-=Re,m[Je].y+=Ft}function o8(m,N,X,wt,Ft,Zt,ie,Re,Je){var yr=(N-X)*Ft,Cr=0;Zt!==ie?Cr=-Re*wt-Th:Cr=(-wt*Je+.5)*ie;for(var Kr=0,an=m;Kr-X/2;){if(ie--,ie<0)return!1;Re-=m[ie].dist(Zt),Zt=m[ie]}Re+=m[ie].dist(m[ie+1]),ie++;for(var Je=[],yr=0;Rewt;)yr-=Je.shift().angleDelta;if(yr>Ft)return!1;ie++,Re+=Kr.dist(an)}return!0}function Zd(m){for(var N=0,X=0;Xyr){var Rn=(yr-Je)/gn,gi=bu(Kr.x,an.x,Rn),ua=bu(Kr.y,an.y,Rn),oa=new qv(gi,ua,an.angleTo(Kr),Cr);return oa._round(),!ie||p5(m,oa,Re,ie,N)?oa:void 0}Je+=gn}}function Hg(m,N,X,wt,Ft,Zt,ie,Re,Je){var yr=Wp(wt,Zt,ie),Cr=rg(wt,Ft),Kr=Cr*ie,an=m[0].x===0||m[0].x===Je||m[0].y===0||m[0].y===Je;N-Kr=0&&xa=0&&Xa=0&&an+yr<=Cr){var bo=new qv(xa,Xa,wa,Rn);bo._round(),(!wt||p5(m,bo,Zt,wt,Ft))&&gn.push(bo)}}Kr+=oa}return!Re&&!gn.length&&!ie&&(gn=H0(m,Kr/2,X,wt,Ft,Zt,ie,!0,Je)),gn}function hC(m,N,X,wt,Ft){for(var Zt=[],ie=0;ie=wt&&Kr.x>=wt)&&(Cr.x>=wt?Cr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round():Kr.x>=wt&&(Kr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round()),!(Cr.y>=Ft&&Kr.y>=Ft)&&(Cr.y>=Ft?Cr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round():Kr.y>=Ft&&(Kr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round()),(!Je||!Cr.equals(Je[Je.length-1]))&&(Je=[Cr],Zt.push(Je)),Je.push(Kr)))))}return Zt}var Hx=kh;function fC(m,N,X,wt){var Ft=[],Zt=m.image,ie=Zt.pixelRatio,Re=Zt.paddedRect.w-2*Hx,Je=Zt.paddedRect.h-2*Hx,yr=m.right-m.left,Cr=m.bottom-m.top,Kr=Zt.stretchX||[[0,Re]],an=Zt.stretchY||[[0,Je]],gn=function(Oc,ju){return Oc+ju[1]-ju[0]},Rn=Kr.reduce(gn,0),gi=an.reduce(gn,0),ua=Re-Rn,oa=Je-gi,wa=0,Ra=Rn,xa=0,Xa=gi,bo=0,Uo=ua,Vo=0,ws=oa;if(Zt.content&&wt){var ks=Zt.content;wa=m5(Kr,0,ks[0]),xa=m5(an,0,ks[1]),Ra=m5(Kr,ks[0],ks[2]),Xa=m5(an,ks[1],ks[3]),bo=ks[0]-wa,Vo=ks[1]-xa,Uo=ks[2]-ks[0]-Ra,ws=ks[3]-ks[1]-Xa}var Rs=function(Oc,ju,Dh,ih){var Of=g5(Oc.stretch-wa,Ra,yr,m.left),Gd=v5(Oc.fixed-bo,Uo,Oc.stretch,Rn),id=g5(ju.stretch-xa,Xa,Cr,m.top),yp=v5(ju.fixed-Vo,ws,ju.stretch,gi),xp=g5(Dh.stretch-wa,Ra,yr,m.left),_p=v5(Dh.fixed-bo,Uo,Dh.stretch,Rn),Fd=g5(ih.stretch-xa,Xa,Cr,m.top),Lp=v5(ih.fixed-Vo,ws,ih.stretch,gi),Pp=new o(Of,id),yd=new o(xp,id),Ip=new o(xp,Fd),T0=new o(Of,Fd),$g=new o(Gd/ie,yp/ie),Yv=new o(_p/ie,Lp/ie),Kv=N*Math.PI/180;if(Kv){var Xv=Math.sin(Kv),Xx=Math.cos(Kv),nm=[Xx,-Xv,Xv,Xx];Pp._matMult(nm),yd._matMult(nm),T0._matMult(nm),Ip._matMult(nm)}var k5=Oc.stretch+Oc.fixed,g8=Dh.stretch+Dh.fixed,T5=ju.stretch+ju.fixed,v8=ih.stretch+ih.fixed,W0={x:Zt.paddedRect.x+Hx+k5,y:Zt.paddedRect.y+Hx+T5,w:g8-k5,h:v8-T5},Jx=Uo/ie/yr,A5=ws/ie/Cr;return{tl:Pp,tr:yd,bl:T0,br:Ip,tex:W0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:$g,pixelOffsetBR:Yv,minFontScaleX:Jx,minFontScaleY:A5,isSDF:X}};if(!wt||!Zt.stretchX&&!Zt.stretchY)Ft.push(Rs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Re+1},{fixed:0,stretch:Je+1}));else for(var Ys=dC(Kr,ua,Rn),ll=dC(an,oa,gi),Bs=0;Bs0&&(gn=Math.max(10,gn),this.circleDiameter=gn)}else{var Rn=Zt.top*ie-Re,gi=Zt.bottom*ie+Re,ua=Zt.left*ie-Re,oa=Zt.right*ie+Re,wa=Zt.collisionPadding;if(wa&&(ua-=wa[0]*ie,Rn-=wa[1]*ie,oa+=wa[2]*ie,gi+=wa[3]*ie),yr){var Ra=new o(ua,Rn),xa=new o(oa,Rn),Xa=new o(ua,gi),bo=new o(oa,gi),Uo=yr*Math.PI/180;Ra._rotate(Uo),xa._rotate(Uo),Xa._rotate(Uo),bo._rotate(Uo),ua=Math.min(Ra.x,xa.x,Xa.x,bo.x),oa=Math.max(Ra.x,xa.x,Xa.x,bo.x),Rn=Math.min(Ra.y,xa.y,Xa.y,bo.y),gi=Math.max(Ra.y,xa.y,Xa.y,bo.y)}m.emplaceBack(N.x,N.y,ua,Rn,oa,gi,X,wt,Ft)}this.boxEndIndex=m.length},Wx=function(m,N){if(m===void 0&&(m=[]),N===void 0&&(N=EZ),this.data=m,this.length=this.data.length,this.compare=N,this.length>0)for(var X=(this.length>>1)-1;X>=0;X--)this._down(X)};Wx.prototype.push=function(m){this.data.push(m),this.length++,this._up(this.length-1)},Wx.prototype.pop=function(){if(this.length!==0){var m=this.data[0],N=this.data.pop();return this.length--,this.length>0&&(this.data[0]=N,this._down(0)),m}},Wx.prototype.peek=function(){return this.data[0]},Wx.prototype._up=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=X[m];m>0;){var Zt=m-1>>1,ie=X[Zt];if(wt(Ft,ie)>=0)break;X[m]=ie,m=Zt}X[m]=Ft},Wx.prototype._down=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=this.length>>1,Zt=X[m];m=0)break;X[m]=Re,m=ie}X[m]=Zt};function EZ(m,N){return mN?1:0}function CZ(m,N,X){X===void 0&&(X=!1);for(var wt=1/0,Ft=1/0,Zt=-1/0,ie=-1/0,Re=m[0],Je=0;JeZt)&&(Zt=yr.x),(!Je||yr.y>ie)&&(ie=yr.y)}var Cr=Zt-wt,Kr=ie-Ft,an=Math.min(Cr,Kr),gn=an/2,Rn=new Wx([],LZ);if(an===0)return new o(wt,Ft);for(var gi=wt;gioa.d||!oa.d)&&(oa=Ra,X&&console.log("found best %d after %d probes",Math.round(1e4*Ra.d)/1e4,wa)),!(Ra.max-oa.d<=N)&&(gn=Ra.h/2,Rn.push(new qx(Ra.p.x-gn,Ra.p.y-gn,gn,m)),Rn.push(new qx(Ra.p.x+gn,Ra.p.y-gn,gn,m)),Rn.push(new qx(Ra.p.x-gn,Ra.p.y+gn,gn,m)),Rn.push(new qx(Ra.p.x+gn,Ra.p.y+gn,gn,m)),wa+=4)}return X&&(console.log("num probes: "+wa),console.log("best distance: "+oa.d)),oa.p}function LZ(m,N){return N.max-m.max}function qx(m,N,X,wt){this.p=new o(m,N),this.h=X,this.d=PZ(this.p,wt),this.max=this.d+this.h*Math.SQRT2}function PZ(m,N){for(var X=!1,wt=1/0,Ft=0;Ftm.y!=Cr.y>m.y&&m.x<(Cr.x-yr.x)*(m.y-yr.y)/(Cr.y-yr.y)+yr.x&&(X=!X),wt=Math.min(wt,Qd(m,yr,Cr))}return(X?1:-1)*Math.sqrt(wt)}function IZ(m){for(var N=0,X=0,wt=0,Ft=m[0],Zt=0,ie=Ft.length,Re=ie-1;Zt=qo||nm.y<0||nm.y>=qo||DZ(m,nm,Xx,X,wt,Ft,ll,m.layers[0],m.collisionBoxArray,N.index,N.sourceLayerIndex,m.index,oa,Xa,Vo,Je,Ra,bo,ws,gn,N,Zt,yr,Cr,ie)};if(ks==="line")for(var Hs=0,Nu=hC(N.geometry,0,0,qo,qo);Hs1){var id=V0(Gd,Uo,X.vertical||Rn,wt,gi,wa);id&&Bs(Gd,id)}}else if(N.type==="Polygon")for(var yp=0,xp=em(N.geometry,0);ypZv&&q(m.layerIds[0]+': Value for "text-size" is >= '+Gb+'. Reduce your "text-size".')):ua.kind==="composite"&&(oa=[ed*gn.compositeTextSizes[0].evaluate(ie,{},Rn),ed*gn.compositeTextSizes[1].evaluate(ie,{},Rn)],(oa[0]>Zv||oa[1]>Zv)&&q(m.layerIds[0]+': Value for "text-size" is >= '+Gb+'. Reduce your "text-size".')),m.addSymbols(m.text,gi,oa,Re,Zt,ie,yr,N,Je.lineStartIndex,Je.lineLength,an,Rn);for(var wa=0,Ra=Cr;waZv&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Gb+'. Reduce your "icon-size".')):Pp.kind==="composite"&&(yd=[ed*Xa.compositeIconSizes[0].evaluate(xa,{},Uo),ed*Xa.compositeIconSizes[1].evaluate(xa,{},Uo)],(yd[0]>Zv||yd[1]>Zv)&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Gb+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Fd,yd,Ra,wa,xa,!1,N,ks.lineStartIndex,ks.lineLength,-1,Uo),Xu=m.icon.placedSymbolArray.length-1,Lp&&(Nu=Lp.length*4,m.addSymbols(m.icon,Lp,yd,Ra,wa,xa,Gh.vertical,N,ks.lineStartIndex,ks.lineLength,-1,Uo),Oc=m.icon.placedSymbolArray.length-1)}for(var Ip in wt.horizontal){var T0=wt.horizontal[Ip];if(!Rs){Dh=Vt(T0.text);var $g=Re.layout.get("text-rotate").evaluate(xa,{},Uo);Rs=new y5(Je,N,yr,Cr,Kr,T0,an,gn,Rn,$g)}var Yv=T0.positionedLines.length===1;if(zc+=mC(m,N,T0,Zt,Re,Rn,xa,gi,ks,wt.vertical?Gh.horizontal:Gh.horizontalOnly,Yv?Object.keys(wt.horizontal):[Ip],ju,Xu,Xa,Uo),Yv)break}wt.vertical&&(hh+=mC(m,N,wt.vertical,Zt,Re,Rn,xa,gi,ks,Gh.vertical,["vertical"],ju,Oc,Xa,Uo));var Kv=Rs?Rs.boxStartIndex:m.collisionBoxArray.length,Xv=Rs?Rs.boxEndIndex:m.collisionBoxArray.length,Xx=ll?ll.boxStartIndex:m.collisionBoxArray.length,nm=ll?ll.boxEndIndex:m.collisionBoxArray.length,k5=Ys?Ys.boxStartIndex:m.collisionBoxArray.length,g8=Ys?Ys.boxEndIndex:m.collisionBoxArray.length,T5=Bs?Bs.boxStartIndex:m.collisionBoxArray.length,v8=Bs?Bs.boxEndIndex:m.collisionBoxArray.length,W0=-1,Jx=function(Xb,IC){return Xb&&Xb.circleDiameter?Math.max(Xb.circleDiameter,IC):IC};W0=Jx(Rs,W0),W0=Jx(ll,W0),W0=Jx(Ys,W0),W0=Jx(Bs,W0);var A5=W0>-1?1:0;A5&&(W0*=Vo/Lr),m.glyphOffsetArray.length>=Gc.MAX_GLYPHS&&q("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xa.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xa.sortKey),m.symbolInstances.emplaceBack(N.x,N.y,ju.right>=0?ju.right:-1,ju.center>=0?ju.center:-1,ju.left>=0?ju.left:-1,ju.vertical||-1,Xu,Oc,Dh,Kv,Xv,Xx,nm,k5,g8,T5,v8,yr,zc,hh,Hs,Nu,A5,0,an,ih,Of,W0)}function FZ(m,N,X,wt){var Ft=m.compareText;if(!(N in Ft))Ft[N]=[];else for(var Zt=Ft[N],ie=Zt.length-1;ie>=0;ie--)if(wt.dist(Zt[ie])0)&&(Zt.value.kind!=="constant"||Zt.value.value.length>0),yr=Re.value.kind!=="constant"||!!Re.value.value||Object.keys(Re.parameters).length>0,Cr=Ft.get("symbol-sort-key");if(this.features=[],!(!Je&&!yr)){for(var Kr=N.iconDependencies,an=N.glyphDependencies,gn=N.availableImages,Rn=new jl(this.zoom),gi=0,ua=m;gi=0;for(var zc=0,hh=Vo.sections;zc=0;Re--)Zt[Re]={x:N[Re].x,y:N[Re].y,tileUnitDistanceFromAnchor:Ft},Re>0&&(Ft+=N[Re-1].dist(N[Re]));for(var Je=0;Je0},Gc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Gc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Gc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Gc.prototype.addIndicesForPlacedSymbol=function(m,N){for(var X=m.placedSymbolArray.get(N),wt=X.vertexStartIndex+X.numGlyphs*4,Ft=X.vertexStartIndex;Ft1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(m),this.sortedAngle=m,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var X=0,wt=this.symbolInstanceIndexes;X=0&&Je.indexOf(ie)===Re&&N.addIndicesForPlacedSymbol(N.text,ie)}),Zt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Zt.verticalPlacedTextSymbolIndex),Zt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.placedIconSymbolIndex),Zt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sr("SymbolBucket",Gc,{omit:["layers","collisionBoxArray","features","compareText"]}),Gc.MAX_GLYPHS=65535,Gc.addDynamicAttributes=h8;function jZ(m,N){return N.replace(/{([^{}]+)}/g,function(X,wt){return wt in m?String(m[wt]):""})}var UZ=new $a({"symbol-placement":new yn(Pa.layout_symbol["symbol-placement"]),"symbol-spacing":new yn(Pa.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new yn(Pa.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ai(Pa.layout_symbol["symbol-sort-key"]),"symbol-z-order":new yn(Pa.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new yn(Pa.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new yn(Pa.layout_symbol["icon-ignore-placement"]),"icon-optional":new yn(Pa.layout_symbol["icon-optional"]),"icon-rotation-alignment":new yn(Pa.layout_symbol["icon-rotation-alignment"]),"icon-size":new ai(Pa.layout_symbol["icon-size"]),"icon-text-fit":new yn(Pa.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new yn(Pa.layout_symbol["icon-text-fit-padding"]),"icon-image":new ai(Pa.layout_symbol["icon-image"]),"icon-rotate":new ai(Pa.layout_symbol["icon-rotate"]),"icon-padding":new yn(Pa.layout_symbol["icon-padding"]),"icon-keep-upright":new yn(Pa.layout_symbol["icon-keep-upright"]),"icon-offset":new ai(Pa.layout_symbol["icon-offset"]),"icon-anchor":new ai(Pa.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new yn(Pa.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new yn(Pa.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new yn(Pa.layout_symbol["text-rotation-alignment"]),"text-field":new ai(Pa.layout_symbol["text-field"]),"text-font":new ai(Pa.layout_symbol["text-font"]),"text-size":new ai(Pa.layout_symbol["text-size"]),"text-max-width":new ai(Pa.layout_symbol["text-max-width"]),"text-line-height":new yn(Pa.layout_symbol["text-line-height"]),"text-letter-spacing":new ai(Pa.layout_symbol["text-letter-spacing"]),"text-justify":new ai(Pa.layout_symbol["text-justify"]),"text-radial-offset":new ai(Pa.layout_symbol["text-radial-offset"]),"text-variable-anchor":new yn(Pa.layout_symbol["text-variable-anchor"]),"text-anchor":new ai(Pa.layout_symbol["text-anchor"]),"text-max-angle":new yn(Pa.layout_symbol["text-max-angle"]),"text-writing-mode":new yn(Pa.layout_symbol["text-writing-mode"]),"text-rotate":new ai(Pa.layout_symbol["text-rotate"]),"text-padding":new yn(Pa.layout_symbol["text-padding"]),"text-keep-upright":new yn(Pa.layout_symbol["text-keep-upright"]),"text-transform":new ai(Pa.layout_symbol["text-transform"]),"text-offset":new ai(Pa.layout_symbol["text-offset"]),"text-allow-overlap":new yn(Pa.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new yn(Pa.layout_symbol["text-ignore-placement"]),"text-optional":new yn(Pa.layout_symbol["text-optional"])}),VZ=new $a({"icon-opacity":new ai(Pa.paint_symbol["icon-opacity"]),"icon-color":new ai(Pa.paint_symbol["icon-color"]),"icon-halo-color":new ai(Pa.paint_symbol["icon-halo-color"]),"icon-halo-width":new ai(Pa.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ai(Pa.paint_symbol["icon-halo-blur"]),"icon-translate":new yn(Pa.paint_symbol["icon-translate"]),"icon-translate-anchor":new yn(Pa.paint_symbol["icon-translate-anchor"]),"text-opacity":new ai(Pa.paint_symbol["text-opacity"]),"text-color":new ai(Pa.paint_symbol["text-color"],{runtimeType:ou,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new ai(Pa.paint_symbol["text-halo-color"]),"text-halo-width":new ai(Pa.paint_symbol["text-halo-width"]),"text-halo-blur":new ai(Pa.paint_symbol["text-halo-blur"]),"text-translate":new yn(Pa.paint_symbol["text-translate"]),"text-translate-anchor":new yn(Pa.paint_symbol["text-translate-anchor"])}),f8={paint:VZ,layout:UZ},Gx=function(m){this.type=m.property.overrides?m.property.overrides.runtimeType:Ru,this.defaultValue=m};Gx.prototype.evaluate=function(m){if(m.formattedSection){var N=this.defaultValue.property.overrides;if(N&&N.hasOverride(m.formattedSection))return N.getOverride(m.formattedSection)}return m.feature&&m.featureState?this.defaultValue.evaluate(m.feature,m.featureState):this.defaultValue.property.specification.default},Gx.prototype.eachChild=function(m){if(!this.defaultValue.isConstant()){var N=this.defaultValue.value;m(N._styleExpression.expression)}},Gx.prototype.outputDefined=function(){return!1},Gx.prototype.serialize=function(){return null},sr("FormatSectionOverride",Gx,{omit:["defaultValue"]});var HZ=function(m){function N(X){m.call(this,X,f8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.recalculate=function(X,wt){if(m.prototype.recalculate.call(this,X,wt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ft=this.layout.get("text-writing-mode");if(Ft){for(var Zt=[],ie=0,Re=Ft;ie",targetMapId:wt,sourceMapId:Zt.mapId})}}},Yx.prototype.receive=function(m){var N=m.data,X=N.id;if(X&&!(N.targetMapId&&this.mapId!==N.targetMapId))if(N.type===""){delete this.tasks[X];var wt=this.cancelCallbacks[X];delete this.cancelCallbacks[X],wt&&wt()}else mt()||N.mustQueue?(this.tasks[X]=N,this.taskQueue.push(X),this.invoker.trigger()):this.processTask(X,N)},Yx.prototype.process=function(){if(this.taskQueue.length){var m=this.taskQueue.shift(),N=this.tasks[m];delete this.tasks[m],this.taskQueue.length&&this.invoker.trigger(),N&&this.processTask(m,N)}},Yx.prototype.processTask=function(m,N){var X=this;if(N.type===""){var wt=this.callbacks[m];delete this.callbacks[m],wt&&(N.error?wt(xn(N.error)):wt(null,xn(N.data)))}else{var Ft=!1,Zt=dt(this.globalScope)?void 0:[],ie=N.hasCallback?function(Kr,an){Ft=!0,delete X.cancelCallbacks[m],X.target.postMessage({id:m,type:"",sourceMapId:X.mapId,error:Kr?Jr(Kr):null,data:Jr(an,Zt)},Zt)}:function(Kr){Ft=!0},Re=null,Je=xn(N.data);if(this.parent[N.type])Re=this.parent[N.type](N.sourceMapId,Je,ie);else if(this.parent.getWorkerSource){var yr=N.type.split("."),Cr=this.parent.getWorkerSource(N.sourceMapId,yr[0],Je.source);Re=Cr[yr[1]](Je,ie)}else ie(new Error("Could not find function "+N.type));!Ft&&Re&&Re.cancel&&(this.cancelCallbacks[m]=Re.cancel)}},Yx.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function tG(m,N,X){N=Math.pow(2,X)-N-1;var wt=bC(m*256,N*256,X),Ft=bC((m+1)*256,(N+1)*256,X);return wt[0]+","+wt[1]+","+Ft[0]+","+Ft[1]}function bC(m,N,X){var wt=2*Math.PI*6378137/256/Math.pow(2,X),Ft=m*wt-2*Math.PI*6378137/2,Zt=N*wt-2*Math.PI*6378137/2;return[Ft,Zt]}var rd=function(m,N){m&&(N?this.setSouthWest(m).setNorthEast(N):m.length===4?this.setSouthWest([m[0],m[1]]).setNorthEast([m[2],m[3]]):this.setSouthWest(m[0]).setNorthEast(m[1]))};rd.prototype.setNorthEast=function(m){return this._ne=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},rd.prototype.setSouthWest=function(m){return this._sw=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},rd.prototype.extend=function(m){var N=this._sw,X=this._ne,wt,Ft;if(m instanceof Yh)wt=m,Ft=m;else if(m instanceof rd){if(wt=m._sw,Ft=m._ne,!wt||!Ft)return this}else{if(Array.isArray(m))if(m.length===4||m.every(Array.isArray)){var Zt=m;return this.extend(rd.convert(Zt))}else{var ie=m;return this.extend(Yh.convert(ie))}return this}return!N&&!X?(this._sw=new Yh(wt.lng,wt.lat),this._ne=new Yh(Ft.lng,Ft.lat)):(N.lng=Math.min(wt.lng,N.lng),N.lat=Math.min(wt.lat,N.lat),X.lng=Math.max(Ft.lng,X.lng),X.lat=Math.max(Ft.lat,X.lat)),this},rd.prototype.getCenter=function(){return new Yh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},rd.prototype.getSouthWest=function(){return this._sw},rd.prototype.getNorthEast=function(){return this._ne},rd.prototype.getNorthWest=function(){return new Yh(this.getWest(),this.getNorth())},rd.prototype.getSouthEast=function(){return new Yh(this.getEast(),this.getSouth())},rd.prototype.getWest=function(){return this._sw.lng},rd.prototype.getSouth=function(){return this._sw.lat},rd.prototype.getEast=function(){return this._ne.lng},rd.prototype.getNorth=function(){return this._ne.lat},rd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},rd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},rd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},rd.prototype.contains=function(m){var N=Yh.convert(m),X=N.lng,wt=N.lat,Ft=this._sw.lat<=wt&&wt<=this._ne.lat,Zt=this._sw.lng<=X&&X<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Zt=this._sw.lng>=X&&X>=this._ne.lng),Ft&&Zt},rd.convert=function(m){return!m||m instanceof rd?m:new rd(m)};var wC=63710088e-1,Yh=function(m,N){if(isNaN(m)||isNaN(N))throw new Error("Invalid LngLat object: ("+m+", "+N+")");if(this.lng=+m,this.lat=+N,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Yh.prototype.wrap=function(){return new Yh(b(this.lng,-180,180),this.lat)},Yh.prototype.toArray=function(){return[this.lng,this.lat]},Yh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Yh.prototype.distanceTo=function(m){var N=Math.PI/180,X=this.lat*N,wt=m.lat*N,Ft=Math.sin(X)*Math.sin(wt)+Math.cos(X)*Math.cos(wt)*Math.cos((m.lng-this.lng)*N),Zt=wC*Math.acos(Math.min(Ft,1));return Zt},Yh.prototype.toBounds=function(m){m===void 0&&(m=0);var N=40075017,X=360*m/N,wt=X/Math.cos(Math.PI/180*this.lat);return new rd(new Yh(this.lng-wt,this.lat-X),new Yh(this.lng+wt,this.lat+X))},Yh.convert=function(m){if(m instanceof Yh)return m;if(Array.isArray(m)&&(m.length===2||m.length===3))return new Yh(Number(m[0]),Number(m[1]));if(!Array.isArray(m)&&typeof m=="object"&&m!==null)return new Yh(Number("lng"in m?m.lng:m.lon),Number(m.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var kC=2*Math.PI*wC;function TC(m){return kC*Math.cos(m*Math.PI/180)}function AC(m){return(180+m)/360}function MC(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function SC(m,N){return m/TC(N)}function eG(m){return m*360-180}function p8(m){var N=180-m*360;return 360/Math.PI*Math.atan(Math.exp(N*Math.PI/180))-90}function rG(m,N){return m*TC(p8(N))}function nG(m){return 1/Math.cos(m*Math.PI/180)}var ny=function(m,N,X){X===void 0&&(X=0),this.x=+m,this.y=+N,this.z=+X};ny.fromLngLat=function(m,N){N===void 0&&(N=0);var X=Yh.convert(m);return new ny(AC(X.lng),MC(X.lat),SC(N,X.lat))},ny.prototype.toLngLat=function(){return new Yh(eG(this.x),p8(this.y))},ny.prototype.toAltitude=function(){return rG(this.z,this.y)},ny.prototype.meterInMercatorCoordinateUnits=function(){return 1/kC*nG(p8(this.y))};var iy=function(m,N,X){this.z=m,this.x=N,this.y=X,this.key=Kb(0,m,m,N,X)};iy.prototype.equals=function(m){return this.z===m.z&&this.x===m.x&&this.y===m.y},iy.prototype.url=function(m,N){var X=tG(this.x,this.y,this.z),wt=iG(this.z,this.x,this.y);return m[(this.x+this.y)%m.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(N==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",wt).replace("{bbox-epsg-3857}",X)},iy.prototype.getTilePoint=function(m){var N=Math.pow(2,this.z);return new o((m.x*N-this.x)*qo,(m.y*N-this.y)*qo)},iy.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var EC=function(m,N){this.wrap=m,this.canonical=N,this.key=Kb(m,N.z,N.z,N.x,N.y)},nd=function(m,N,X,wt,Ft){this.overscaledZ=m,this.wrap=N,this.canonical=new iy(X,+wt,+Ft),this.key=Kb(N,m,X,wt,Ft)};nd.prototype.equals=function(m){return this.overscaledZ===m.overscaledZ&&this.wrap===m.wrap&&this.canonical.equals(m.canonical)},nd.prototype.scaledTo=function(m){var N=this.canonical.z-m;return m>this.canonical.z?new nd(m,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nd(m,this.wrap,m,this.canonical.x>>N,this.canonical.y>>N)},nd.prototype.calculateScaledKey=function(m,N){var X=this.canonical.z-m;return m>this.canonical.z?Kb(this.wrap*+N,m,this.canonical.z,this.canonical.x,this.canonical.y):Kb(this.wrap*+N,m,m,this.canonical.x>>X,this.canonical.y>>X)},nd.prototype.isChildOf=function(m){if(m.wrap!==this.wrap)return!1;var N=this.canonical.z-m.canonical.z;return m.overscaledZ===0||m.overscaledZ>N&&m.canonical.y===this.canonical.y>>N},nd.prototype.children=function(m){if(this.overscaledZ>=m)return[new nd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var N=this.canonical.z+1,X=this.canonical.x*2,wt=this.canonical.y*2;return[new nd(N,this.wrap,N,X,wt),new nd(N,this.wrap,N,X+1,wt),new nd(N,this.wrap,N,X,wt+1),new nd(N,this.wrap,N,X+1,wt+1)]},nd.prototype.isLessThan=function(m){return this.wrapm.wrap?!1:this.overscaledZm.overscaledZ?!1:this.canonical.xm.canonical.x?!1:this.canonical.y0;Zt--)Ft=1<=this.dim+1||N<-1||N>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(N+1)*this.stride+(m+1)},Wg.prototype._unpackMapbox=function(m,N,X){return(m*256*256+N*256+X)/10-1e4},Wg.prototype._unpackTerrarium=function(m,N,X){return m*256+N+X/256-32768},Wg.prototype.getPixels=function(){return new Wd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Wg.prototype.backfillBorder=function(m,N,X){if(this.dim!==m.dim)throw new Error("dem dimension mismatch");var wt=N*this.dim,Ft=N*this.dim+this.dim,Zt=X*this.dim,ie=X*this.dim+this.dim;switch(N){case-1:wt=Ft-1;break;case 1:Ft=wt+1;break}switch(X){case-1:Zt=ie-1;break;case 1:ie=Zt+1;break}for(var Re=-N*this.dim,Je=-X*this.dim,yr=Zt;yr=0&&Cr[3]>=0&&Re.insert(ie,Cr[0],Cr[1],Cr[2],Cr[3])}},qg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vg.VectorTile(new Ln(this.rawTileData)).layers,this.sourceLayerCoder=new b5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},qg.prototype.query=function(m,N,X,wt){var Ft=this;this.loadVTLayers();for(var Zt=m.params||{},ie=qo/m.tileSize/m.scale,Re=ae(Zt.filter),Je=m.queryGeometry,yr=m.queryPadding*ie,Cr=LC(Je),Kr=this.grid.query(Cr.minX-yr,Cr.minY-yr,Cr.maxX+yr,Cr.maxY+yr),an=LC(m.cameraQueryGeometry),gn=this.grid3D.query(an.minX-yr,an.minY-yr,an.maxX+yr,an.maxY+yr,function(Xa,bo,Uo,Vo){return Q0(m.cameraQueryGeometry,Xa-yr,bo-yr,Uo+yr,Vo+yr)}),Rn=0,gi=gn;Rnwt)Ft=!1;else if(!N)Ft=!0;else if(this.expirationTime=Br.maxzoom)&&Br.visibility!=="none"){f(Gr,this.zoom,fr);var Yr=fi[Br.id]=Br.createBucket({index:Mn.bucketLayerIDs.length,layers:Gr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ci,sourceID:this.source});Yr.populate(za,ki,this.tileID.canonical),Mn.bucketLayerIDs.push(Gr.map(function(Pn){return Pn.id}))}}}}var pn,on,Ce,dr,Hr=t.mapObject(ki.glyphDependencies,function(Pn){return Object.keys(Pn).map(Number)});Object.keys(Hr).length?_r.send("getGlyphs",{uid:this.uid,stacks:Hr},function(Pn,En){pn||(pn=Pn,on=En,Qn.call(Cn))}):on={};var _n=Object.keys(ki.iconDependencies);_n.length?_r.send("getImages",{icons:_n,source:this.source,tileID:this.tileID,type:"icons"},function(Pn,En){pn||(pn=Pn,Ce=En,Qn.call(Cn))}):Ce={};var Fn=Object.keys(ki.patternDependencies);Fn.length?_r.send("getImages",{icons:Fn,source:this.source,tileID:this.tileID,type:"patterns"},function(Pn,En){pn||(pn=Pn,dr=En,Qn.call(Cn))}):dr={},Qn.call(this);function Qn(){if(pn)return tn(pn);if(on&&Ce&&dr){var Pn=new i(on),En=new t.ImageAtlas(Ce,dr);for(var Zn in fi){var La=fi[Zn];La instanceof t.SymbolBucket?(f(La.layers,this.zoom,fr),t.performSymbolLayout(La,on,Pn.positions,Ce,En.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):La.hasPattern&&(La instanceof t.LineBucket||La instanceof t.FillBucket||La instanceof t.FillExtrusionBucket)&&(f(La.layers,this.zoom,fr),La.addFeatures(ki,this.tileID.canonical,En.patternPositions))}this.status="done",tn(null,{buckets:t.values(fi).filter(function(Vi){return!Vi.isEmpty()}),featureIndex:Mn,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Pn.image,imageAtlas:En,glyphMap:this.returnDependencies?on:null,iconMap:this.returnDependencies?Ce:null,glyphPositions:this.returnDependencies?Pn.positions:null})}}};function f(We,nr,fr){for(var _r=new t.EvaluationParameters(nr),tn=0,Cn=We;tn=0!=!!nr&&We.reverse()}var M=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,C=function(We){this._feature=We,this.extent=t.EXTENT,this.type=We.type,this.properties=We.tags,"id"in We&&!isNaN(We.id)&&(this.id=parseInt(We.id,10))};C.prototype.loadGeometry=function(){if(this._feature.type===1){for(var We=[],nr=0,fr=this._feature.geometry;nr"u"&&(_r.push(Mn),fi=_r.length-1,Cn[Mn]=fi),nr.writeVarint(fi);var ki=fr.properties[Mn],Oi=typeof ki;Oi!=="string"&&Oi!=="boolean"&&Oi!=="number"&&(ki=JSON.stringify(ki));var ji=Oi+":"+ki,Xi=Tn[ji];typeof Xi>"u"&&(tn.push(ki),Xi=tn.length-1,Tn[ji]=Xi),nr.writeVarint(Xi)}}function lt(We,nr){return(nr<<3)+(We&7)}function yt(We){return We<<1^We>>31}function mt(We,nr){for(var fr=We.loadGeometry(),_r=We.type,tn=0,Cn=0,Tn=fr.length,Mn=0;Mn>1;dt(We,nr,Tn,_r,tn,Cn%2),tt(We,nr,fr,_r,Tn-1,Cn+1),tt(We,nr,fr,Tn+1,tn,Cn+1)}}function dt(We,nr,fr,_r,tn,Cn){for(;tn>_r;){if(tn-_r>600){var Tn=tn-_r+1,Mn=fr-_r+1,fi=Math.log(Tn),ki=.5*Math.exp(2*fi/3),Oi=.5*Math.sqrt(fi*ki*(Tn-ki)/Tn)*(Mn-Tn/2<0?-1:1),ji=Math.max(_r,Math.floor(fr-Mn*ki/Tn+Oi)),Xi=Math.min(tn,Math.floor(fr+(Tn-Mn)*ki/Tn+Oi));dt(We,nr,fr,ji,Xi,Cn)}var ci=nr[2*fr+Cn],za=_r,Wa=tn;for(rt(We,nr,_r,fr),nr[2*tn+Cn]>ci&&rt(We,nr,_r,tn);zaci;)Wa--}nr[2*_r+Cn]===ci?rt(We,nr,_r,Wa):(Wa++,rt(We,nr,Wa,tn)),Wa<=fr&&(_r=Wa+1),fr<=Wa&&(tn=Wa-1)}}function rt(We,nr,fr,_r){at(We,fr,_r),at(nr,2*fr,2*_r),at(nr,2*fr+1,2*_r+1)}function at(We,nr,fr){var _r=We[nr];We[nr]=We[fr],We[fr]=_r}function vt(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=[0,We.length-1,0],fi=[],ki,Oi;Mn.length;){var ji=Mn.pop(),Xi=Mn.pop(),ci=Mn.pop();if(Xi-ci<=Tn){for(var za=ci;za<=Xi;za++)ki=nr[2*za],Oi=nr[2*za+1],ki>=fr&&ki<=tn&&Oi>=_r&&Oi<=Cn&&fi.push(We[za]);continue}var Wa=Math.floor((ci+Xi)/2);ki=nr[2*Wa],Oi=nr[2*Wa+1],ki>=fr&&ki<=tn&&Oi>=_r&&Oi<=Cn&&fi.push(We[Wa]);var ze=(ji+1)%2;(ji===0?fr<=ki:_r<=Oi)&&(Mn.push(ci),Mn.push(Wa-1),Mn.push(ze)),(ji===0?tn>=ki:Cn>=Oi)&&(Mn.push(Wa+1),Mn.push(Xi),Mn.push(ze))}return fi}function it(We,nr,fr,_r,tn,Cn){for(var Tn=[0,We.length-1,0],Mn=[],fi=tn*tn;Tn.length;){var ki=Tn.pop(),Oi=Tn.pop(),ji=Tn.pop();if(Oi-ji<=Cn){for(var Xi=ji;Xi<=Oi;Xi++)Y(nr[2*Xi],nr[2*Xi+1],fr,_r)<=fi&&Mn.push(We[Xi]);continue}var ci=Math.floor((ji+Oi)/2),za=nr[2*ci],Wa=nr[2*ci+1];Y(za,Wa,fr,_r)<=fi&&Mn.push(We[ci]);var ze=(ki+1)%2;(ki===0?fr-tn<=za:_r-tn<=Wa)&&(Tn.push(ji),Tn.push(ci-1),Tn.push(ze)),(ki===0?fr+tn>=za:_r+tn>=Wa)&&(Tn.push(ci+1),Tn.push(Oi),Tn.push(ze))}return Mn}function Y(We,nr,fr,_r){var tn=We-fr,Cn=nr-_r;return tn*tn+Cn*Cn}var ft=function(We){return We[0]},ut=function(We){return We[1]},kt=function(We,nr,fr,_r,tn){nr===void 0&&(nr=ft),fr===void 0&&(fr=ut),_r===void 0&&(_r=64),tn===void 0&&(tn=Float64Array),this.nodeSize=_r,this.points=We;for(var Cn=We.length<65536?Uint16Array:Uint32Array,Tn=this.ids=new Cn(We.length),Mn=this.coords=new tn(We.length*2),fi=0;fi=_r;ki--){var Oi=+Date.now();Mn=this._cluster(Mn,ki),this.trees[ki]=new kt(Mn,Mt,ee,Cn,Float32Array),fr&&console.log("z%d: %d clusters in %dms",ki,Mn.length,+Date.now()-Oi)}return fr&&console.timeEnd("total time"),this},Pt.prototype.getClusters=function(We,nr){var fr=((We[0]+180)%360+360)%360-180,_r=Math.max(-90,Math.min(90,We[1])),tn=We[2]===180?180:((We[2]+180)%360+360)%360-180,Cn=Math.max(-90,Math.min(90,We[3]));if(We[2]-We[0]>=360)fr=-180,tn=180;else if(fr>tn){var Tn=this.getClusters([fr,_r,180,Cn],nr),Mn=this.getClusters([-180,_r,tn,Cn],nr);return Tn.concat(Mn)}for(var fi=this.trees[this._limitZoom(nr)],ki=fi.range(fe(fr),pe(Cn),fe(tn),pe(_r)),Oi=[],ji=0,Xi=ki;jinr&&(za+=Rr.numPoints||1)}if(za>=Mn){for(var $r=Oi.x*ci,Gr=Oi.y*ci,Br=Tn&&ci>1?this._map(Oi,!0):null,Yr=(ki<<5)+(nr+1)+this.points.length,pn=0,on=Xi;pn1)for(var _n=0,Fn=Xi;_n>5},Pt.prototype._getOriginZoom=function(We){return(We-this.points.length)%32},Pt.prototype._map=function(We,nr){if(We.numPoints)return nr?Lt({},We.properties):We.properties;var fr=this.points[We.index].properties,_r=this.options.map(fr);return nr&&_r===fr?Lt({},_r):_r};function qt(We,nr,fr,_r,tn){return{x:We,y:nr,zoom:1/0,id:fr,parentId:-1,numPoints:_r,properties:tn}}function Wt(We,nr){var fr=We.geometry.coordinates,_r=fr[0],tn=fr[1];return{x:fe(_r),y:pe(tn),zoom:1/0,index:nr,parentId:-1}}function Jt(We){return{type:"Feature",id:We.id,properties:ge(We),geometry:{type:"Point",coordinates:[se(We.x),Tt(We.y)]}}}function ge(We){var nr=We.numPoints,fr=nr>=1e4?Math.round(nr/1e3)+"k":nr>=1e3?Math.round(nr/100)/10+"k":nr;return Lt(Lt({},We.properties),{cluster:!0,cluster_id:We.id,point_count:nr,point_count_abbreviated:fr})}function fe(We){return We/360+.5}function pe(We){var nr=Math.sin(We*Math.PI/180),fr=.5-.25*Math.log((1+nr)/(1-nr))/Math.PI;return fr<0?0:fr>1?1:fr}function se(We){return(We-.5)*360}function Tt(We){var nr=(180-We*360)*Math.PI/180;return 360*Math.atan(Math.exp(nr))/Math.PI-90}function Lt(We,nr){for(var fr in nr)We[fr]=nr[fr];return We}function Mt(We){return We.x}function ee(We){return We.y}function ve(We,nr,fr,_r){for(var tn=_r,Cn=fr-nr>>1,Tn=fr-nr,Mn,fi=We[nr],ki=We[nr+1],Oi=We[fr],ji=We[fr+1],Xi=nr+3;Xitn)Mn=Xi,tn=ci;else if(ci===tn){var za=Math.abs(Xi-Cn);za_r&&(Mn-nr>3&&ve(We,nr,Mn,_r),We[Mn+2]=tn,fr-Mn>3&&ve(We,Mn,fr,_r))}function oe(We,nr,fr,_r,tn,Cn){var Tn=tn-fr,Mn=Cn-_r;if(Tn!==0||Mn!==0){var fi=((We-fr)*Tn+(nr-_r)*Mn)/(Tn*Tn+Mn*Mn);fi>1?(fr=tn,_r=Cn):fi>0&&(fr+=Tn*fi,_r+=Mn*fi)}return Tn=We-fr,Mn=nr-_r,Tn*Tn+Mn*Mn}function Te(We,nr,fr,_r){var tn={id:typeof We>"u"?null:We,type:nr,geometry:fr,tags:_r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return He(tn),tn}function He(We){var nr=We.geometry,fr=We.type;if(fr==="Point"||fr==="MultiPoint"||fr==="LineString")Ge(We,nr);else if(fr==="Polygon"||fr==="MultiLineString")for(var _r=0;_r0&&(_r?Tn+=(tn*ki-fi*Cn)/2:Tn+=Math.sqrt(Math.pow(fi-tn,2)+Math.pow(ki-Cn,2))),tn=fi,Cn=ki}var Oi=nr.length-3;nr[2]=1,ve(nr,0,Oi,fr),nr[Oi+2]=1,nr.size=Math.abs(Tn),nr.start=0,nr.end=nr.size}function br(We,nr,fr,_r){for(var tn=0;tn1?1:fr}function Le(We,nr,fr,_r,tn,Cn,Tn,Mn){if(fr/=nr,_r/=nr,Cn>=fr&&Tn<_r)return We;if(Tn=_r)return null;for(var fi=[],ki=0;ki=fr&&za<_r){fi.push(Oi);continue}else if(za=_r)continue;var Wa=[];if(Xi==="Point"||Xi==="MultiPoint")Gt(ji,Wa,fr,_r,tn);else if(Xi==="LineString")ne(ji,Wa,fr,_r,tn,!1,Mn.lineMetrics);else if(Xi==="MultiLineString")gt(ji,Wa,fr,_r,tn,!1);else if(Xi==="Polygon")gt(ji,Wa,fr,_r,tn,!0);else if(Xi==="MultiPolygon")for(var ze=0;ze=fr&&Tn<=_r&&(nr.push(We[Cn]),nr.push(We[Cn+1]),nr.push(We[Cn+2]))}}function ne(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=Ct(We),fi=tn===0?Nt:re,ki=We.start,Oi,ji,Xi=0;Xifr&&(ji=fi(Mn,ci,za,ze,Ie,fr),Tn&&(Mn.start=ki+Oi*ji)):Rr>_r?$r<_r&&(ji=fi(Mn,ci,za,ze,Ie,_r),Tn&&(Mn.start=ki+Oi*ji)):St(Mn,ci,za,Wa),$r=fr&&(ji=fi(Mn,ci,za,ze,Ie,fr),Gr=!0),$r>_r&&Rr<=_r&&(ji=fi(Mn,ci,za,ze,Ie,_r),Gr=!0),!Cn&&Gr&&(Tn&&(Mn.end=ki+Oi*ji),nr.push(Mn),Mn=Ct(We)),Tn&&(ki+=Oi)}var Br=We.length-3;ci=We[Br],za=We[Br+1],Wa=We[Br+2],Rr=tn===0?ci:za,Rr>=fr&&Rr<=_r&&St(Mn,ci,za,Wa),Br=Mn.length-3,Cn&&Br>=3&&(Mn[Br]!==Mn[0]||Mn[Br+1]!==Mn[1])&&St(Mn,Mn[0],Mn[1],Mn[2]),Mn.length&&nr.push(Mn)}function Ct(We){var nr=[];return nr.size=We.size,nr.start=We.start,nr.end=We.end,nr}function gt(We,nr,fr,_r,tn,Cn){for(var Tn=0;TnTn.maxX&&(Tn.maxX=Oi),ji>Tn.maxY&&(Tn.maxY=ji)}return Tn}function Ar(We,nr,fr,_r){var tn=nr.geometry,Cn=nr.type,Tn=[];if(Cn==="Point"||Cn==="MultiPoint")for(var Mn=0;Mn0&&nr.size<(tn?Tn:_r)){fr.numPoints+=nr.length/3;return}for(var Mn=[],fi=0;fiTn)&&(fr.numSimplified++,Mn.push(nr[fi]),Mn.push(nr[fi+1])),fr.numPoints++;tn&&Qr(Mn,Cn),We.push(Mn)}function Qr(We,nr){for(var fr=0,_r=0,tn=We.length,Cn=tn-2;_r0===nr)for(_r=0,tn=We.length;_r24)throw new Error("maxZoom should be in the 0-24 range");if(nr.promoteId&&nr.generateId)throw new Error("promoteId and generateId cannot be used together.");var _r=cr(We,nr);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",nr.indexMaxZoom,nr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),_r=le(_r,nr),_r.length&&this.splitTile(_r,0,0,0),fr&&(_r.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)))}Wn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Wn.prototype.splitTile=function(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=[We,nr,fr,_r],fi=this.options,ki=fi.debug;Mn.length;){_r=Mn.pop(),fr=Mn.pop(),nr=Mn.pop(),We=Mn.pop();var Oi=1<1&&console.time("creation"),Xi=this.tiles[ji]=Sr(We,nr,fr,_r,fi),this.tileCoords.push({z:nr,x:fr,y:_r}),ki)){ki>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",nr,fr,_r,Xi.numFeatures,Xi.numPoints,Xi.numSimplified),console.timeEnd("creation"));var ci="z"+nr;this.stats[ci]=(this.stats[ci]||0)+1,this.total++}if(Xi.source=We,tn){if(nr===fi.maxZoom||nr===tn)continue;var za=1<1&&console.time("clipping");var Wa=.5*fi.buffer/fi.extent,ze=.5-Wa,Ie=.5+Wa,Rr=1+Wa,$r,Gr,Br,Yr,pn,on;$r=Gr=Br=Yr=null,pn=Le(We,Oi,fr-Wa,fr+Ie,0,Xi.minX,Xi.maxX,fi),on=Le(We,Oi,fr+ze,fr+Rr,0,Xi.minX,Xi.maxX,fi),We=null,pn&&($r=Le(pn,Oi,_r-Wa,_r+Ie,1,Xi.minY,Xi.maxY,fi),Gr=Le(pn,Oi,_r+ze,_r+Rr,1,Xi.minY,Xi.maxY,fi),pn=null),on&&(Br=Le(on,Oi,_r-Wa,_r+Ie,1,Xi.minY,Xi.maxY,fi),Yr=Le(on,Oi,_r+ze,_r+Rr,1,Xi.minY,Xi.maxY,fi),on=null),ki>1&&console.timeEnd("clipping"),Mn.push($r||[],nr+1,fr*2,_r*2),Mn.push(Gr||[],nr+1,fr*2,_r*2+1),Mn.push(Br||[],nr+1,fr*2+1,_r*2),Mn.push(Yr||[],nr+1,fr*2+1,_r*2+1)}}},Wn.prototype.getTile=function(We,nr,fr){var _r=this.options,tn=_r.extent,Cn=_r.debug;if(We<0||We>24)return null;var Tn=1<1&&console.log("drilling down to z%d-%d-%d",We,nr,fr);for(var fi=We,ki=nr,Oi=fr,ji;!ji&&fi>0;)fi--,ki=Math.floor(ki/2),Oi=Math.floor(Oi/2),ji=this.tiles[Xn(fi,ki,Oi)];return!ji||!ji.source?null:(Cn>1&&console.log("found parent tile z%d-%d-%d",fi,ki,Oi),Cn>1&&console.time("drilling down"),this.splitTile(ji.source,fi,ki,Oi,We,nr,fr),Cn>1&&console.timeEnd("drilling down"),this.tiles[Mn]?qe(this.tiles[Mn],tn):null)};function Xn(We,nr,fr){return((1<=0?0:$.button},r.remove=function($){$.parentNode&&$.parentNode.removeChild($)};function v($,ot,et){var xt,Vt,de,ye=t.browser.devicePixelRatio>1?"@2x":"",Yt=t.getJSON(ot.transformRequest(ot.normalizeSpriteURL($,ye,".json"),t.ResourceType.SpriteJSON),function(ir,Ye){Yt=null,de||(de=ir,xt=Ye,Se())}),ce=t.getImage(ot.transformRequest(ot.normalizeSpriteURL($,ye,".png"),t.ResourceType.SpriteImage),function(ir,Ye){ce=null,de||(de=ir,Vt=Ye,Se())});function Se(){if(de)et(de);else if(xt&&Vt){var ir=t.browser.getImageData(Vt),Ye={};for(var tr in xt){var lr=xt[tr],hr=lr.width,Ve=lr.height,Xe=lr.x,Ze=lr.y,Pr=lr.sdf,sn=lr.pixelRatio,dn=lr.stretchX,pi=lr.stretchY,ui=lr.content,Yn=new t.RGBAImage({width:hr,height:Ve});t.RGBAImage.copy(ir,Yn,{x:Xe,y:Ze},{x:0,y:0},{width:hr,height:Ve}),Ye[tr]={data:Yn,pixelRatio:sn,sdf:Pr,stretchX:dn,stretchY:pi,content:ui}}et(null,Ye)}}return{cancel:function(){Yt&&(Yt.cancel(),Yt=null),ce&&(ce.cancel(),ce=null)}}}function T($){var ot=$.userImage;if(ot&&ot.render){var et=ot.render();if(et)return $.data.replace(new Uint8Array(ot.data.buffer)),!0}return!1}var u=1,b=function($){function ot(){$.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.isLoaded=function(){return this.loaded},ot.prototype.setLoaded=function(et){if(this.loaded!==et&&(this.loaded=et,et)){for(var xt=0,Vt=this.requestors;xt=0?1.2:1))}A.prototype.draw=function($){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText($,this.buffer,this.middle);for(var ot=this.ctx.getImageData(0,0,this.size,this.size),et=new Uint8ClampedArray(this.size*this.size),xt=0;xt65535){Se(new Error("glyphs > 65535 not supported"));return}if(tr.ranges[hr]){Se(null,{stack:ir,id:Ye,glyph:lr});return}var Ve=tr.requests[hr];Ve||(Ve=tr.requests[hr]=[],k.loadGlyphRange(ir,hr,et.url,et.requestManager,function(Xe,Ze){if(Ze){for(var Pr in Ze)et._doesCharSupportLocalGlyph(+Pr)||(tr.glyphs[+Pr]=Ze[+Pr]);tr.ranges[hr]=!0}for(var sn=0,dn=Ve;sn1&&(ce=$[++Yt]);var ir=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(ir,Ye),lr=void 0,hr=Vt/et*(xt+1);if(ce.isDash){var Ve=xt-Math.abs(hr);lr=Math.sqrt(tr*tr+Ve*Ve)}else lr=xt-Math.sqrt(tr*tr+hr*hr);this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addRegularDash=function($){for(var ot=$.length-1;ot>=0;--ot){var et=$[ot],xt=$[ot+1];et.zeroLength?$.splice(ot,1):xt&&xt.isDash===et.isDash&&(xt.left=et.left,$.splice(ot,1))}var Vt=$[0],de=$[$.length-1];Vt.isDash===de.isDash&&(Vt.left=de.left-this.width,de.right=Vt.right+this.width);for(var ye=this.width*this.nextRow,Yt=0,ce=$[Yt],Se=0;Se1&&(ce=$[++Yt]);var ir=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(ir,Ye),lr=ce.isDash?tr:-tr;this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addDash=function($,ot){var et=ot?7:0,xt=2*et+1;if(this.nextRow+xt>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Vt=0,de=0;de<$.length;de++)Vt+=$[de];if(Vt!==0){var ye=this.width/Vt,Yt=this.getDashRanges($,this.width,ye);ot?this.addRoundDash(Yt,ye,et):this.addRegularDash(Yt)}var ce={y:(this.nextRow+et+.5)/this.height,height:2*et/this.height,width:Vt};return this.nextRow+=xt,this.dirty=!0,ce},V.prototype.bind=function($){var ot=$.gl;this.texture?(ot.bindTexture(ot.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ot.texSubImage2D(ot.TEXTURE_2D,0,0,0,this.width,this.height,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))):(this.texture=ot.createTexture(),ot.bindTexture(ot.TEXTURE_2D,this.texture),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_S,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_T,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MIN_FILTER,ot.LINEAR),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MAG_FILTER,ot.LINEAR),ot.texImage2D(ot.TEXTURE_2D,0,ot.ALPHA,this.width,this.height,0,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))};var H=function $(ot,et){this.workerPool=ot,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var xt=this.workerPool.acquire(this.id),Vt=0;Vt=et.minX&&$.x=et.minY&&$.y0&&(Se[new t.OverscaledTileID(et.overscaledZ,ye,xt.z,de,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,et.wrap,xt.z,xt.x,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,ce,xt.z,Yt,xt.y-1).key]={backfilled:!1}),xt.y+10&&(Vt.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new t.Event("data",Vt))})},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setData=function(et){var xt=this;return this._data=et,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Vt){if(Vt){xt.fire(new t.ErrorEvent(Vt));return}var de={dataType:"source",sourceDataType:"content"};xt._collectResourceTiming&&xt._resourceTiming&&xt._resourceTiming.length>0&&(de.resourceTiming=xt._resourceTiming,xt._resourceTiming=[]),xt.fire(new t.Event("data",de))}),this},ot.prototype.getClusterExpansionZoom=function(et,xt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterChildren=function(et,xt){return this.actor.send("geojson.getClusterChildren",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterLeaves=function(et,xt,Vt,de){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:et,limit:xt,offset:Vt},de),this},ot.prototype._updateWorkerData=function(et){var xt=this;this._loaded=!1;var Vt=t.extend({},this.workerOptions),de=this._data;typeof de=="string"?(Vt.request=this.map._requestManager.transformRequest(t.browser.resolveURL(de),t.ResourceType.Source),Vt.request.collectResourceTiming=this._collectResourceTiming):Vt.data=JSON.stringify(de),this.actor.send(this.type+".loadData",Vt,function(ye,Yt){xt._removed||Yt&&Yt.abandoned||(xt._loaded=!0,Yt&&Yt.resourceTiming&&Yt.resourceTiming[xt.id]&&(xt._resourceTiming=Yt.resourceTiming[xt.id].slice(0)),xt.actor.send(xt.type+".coalesce",{source:Vt.source},null),et(ye))})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.loadTile=function(et,xt){var Vt=this,de=et.actor?"reloadTile":"loadTile";et.actor=this.actor;var ye={type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};et.request=this.actor.send(de,ye,function(Yt,ce){return delete et.request,et.unloadVectorData(),et.aborted?xt(null):Yt?xt(Yt):(et.loadVectorData(ce,Vt.map.painter,de==="reloadTile"),xt(null))})},ot.prototype.abortTile=function(et){et.request&&(et.request.cancel(),delete et.request),et.aborted=!0},ot.prototype.unloadTile=function(et){et.unloadVectorData(),this.actor.send("removeTile",{uid:et.uid,type:this.type,source:this.id})},ot.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ot.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented),yt=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),mt=function($){function ot(et,xt,Vt,de){$.call(this),this.id=et,this.dispatcher=Vt,this.coordinates=xt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=xt}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(et,xt){var Vt=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(de,ye){Vt._loaded=!0,de?Vt.fire(new t.ErrorEvent(de)):ye&&(Vt.image=ye,et&&(Vt.coordinates=et),xt&&xt(),Vt._finishLoading())})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.updateImage=function(et){var xt=this;return!this.image||!et.url?this:(this.options.url=et.url,this.load(et.coordinates,function(){xt.texture=null}),this)},ot.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setCoordinates=function(et){var xt=this;this.coordinates=et;var Vt=et.map(t.MercatorCoordinate.fromLngLat);this.tileID=st(Vt),this.minzoom=this.maxzoom=this.tileID.z;var de=Vt.map(function(ye){return xt.tileID.getTilePoint(ye)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(de[2].x,de[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(et,this.image,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.loadTile=function(et,xt){this.tileID&&this.tileID.equals(et.tileID.canonical)?(this.tiles[String(et.tileID.wrap)]=et,et.buckets={},xt(null)):(et.state="errored",xt(null))},ot.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented);function st($){for(var ot=1/0,et=1/0,xt=-1/0,Vt=-1/0,de=0,ye=$;dext.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xt.start(0)+" and "+xt.end(0)+"-second mark."))):this.video.currentTime=et}},ot.prototype.getVideo=function(){return this.video},ot.prototype.onAdd=function(et){this.map||(this.map=et,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),xt.texSubImage2D(xt.TEXTURE_2D,0,0,0,xt.RGBA,xt.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(et,this.video,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this.video&&!this.video.paused},ot}(mt),dt=function($){function ot(et,xt,Vt,de){$.call(this,et,xt,Vt,de),xt.coordinates?(!Array.isArray(xt.coordinates)||xt.coordinates.length!==4||xt.coordinates.some(function(ye){return!Array.isArray(ye)||ye.length!==2||ye.some(function(Yt){return typeof Yt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "coordinates"'))),xt.animate&&typeof xt.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'optional "animate" property must be a boolean value'))),xt.canvas?typeof xt.canvas!="string"&&!(xt.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "canvas"'))),this.options=xt,this.animate=xt.animate!==void 0?xt.animate:!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ot.prototype.getCanvas=function(){return this.canvas},ot.prototype.onAdd=function(et){this.map=et,this.load(),this.canvas&&this.animate&&this.play()},ot.prototype.onRemove=function(){this.pause()},ot.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xt=this.map.painter.context,Vt=xt.gl;this.boundsBuffer||(this.boundsBuffer=xt.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xt,this.canvas,Vt.RGBA,{premultiply:!0});for(var de in this.tiles){var ye=this.tiles[de];ye.state!=="loaded"&&(ye.state="loaded",ye.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this._playing},ot.prototype._hasInvalidDimensions=function(){for(var et=0,xt=[this.canvas.width,this.canvas.height];etthis.max){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Wt.prototype.has=function($){return $.wrapped().key in this.data},Wt.prototype.getAndRemove=function($){return this.has($)?this._getAndRemoveByKey($.wrapped().key):null},Wt.prototype._getAndRemoveByKey=function($){var ot=this.data[$].shift();return ot.timeout&&clearTimeout(ot.timeout),this.data[$].length===0&&delete this.data[$],this.order.splice(this.order.indexOf($),1),ot.value},Wt.prototype.getByKey=function($){var ot=this.data[$];return ot?ot[0].value:null},Wt.prototype.get=function($){if(!this.has($))return null;var ot=this.data[$.wrapped().key][0];return ot.value},Wt.prototype.remove=function($,ot){if(!this.has($))return this;var et=$.wrapped().key,xt=ot===void 0?0:this.data[et].indexOf(ot),Vt=this.data[et][xt];return this.data[et].splice(xt,1),Vt.timeout&&clearTimeout(Vt.timeout),this.data[et].length===0&&delete this.data[et],this.onRemove(Vt.value),this.order.splice(this.order.indexOf(et),1),this},Wt.prototype.setMaxSize=function($){for(this.max=$;this.order.length>this.max;){var ot=this._getAndRemoveByKey(this.order[0]);ot&&this.onRemove(ot)}return this},Wt.prototype.filter=function($){var ot=[];for(var et in this.data)for(var xt=0,Vt=this.data[et];xt1||(Math.abs(ir)>1&&(Math.abs(ir+tr)===1?ir+=tr:Math.abs(ir-tr)===1&&(ir-=tr)),!(!Se.dem||!ce.dem)&&(ce.dem.backfillBorder(Se.dem,ir,Ye),ce.neighboringTiles&&ce.neighboringTiles[lr]&&(ce.neighboringTiles[lr].backfilled=!0)))}},ot.prototype.getTile=function(et){return this.getTileByID(et.key)},ot.prototype.getTileByID=function(et){return this._tiles[et]},ot.prototype._retainLoadedChildren=function(et,xt,Vt,de){for(var ye in this._tiles){var Yt=this._tiles[ye];if(!(de[ye]||!Yt.hasData()||Yt.tileID.overscaledZ<=xt||Yt.tileID.overscaledZ>Vt)){for(var ce=Yt.tileID;Yt&&Yt.tileID.overscaledZ>xt+1;){var Se=Yt.tileID.scaledTo(Yt.tileID.overscaledZ-1);Yt=this._tiles[Se.key],Yt&&Yt.hasData()&&(ce=Se)}for(var ir=ce;ir.overscaledZ>xt;)if(ir=ir.scaledTo(ir.overscaledZ-1),et[ir.key]){de[ce.key]=ce;break}}}},ot.prototype.findLoadedParent=function(et,xt){if(et.key in this._loadedParentTiles){var Vt=this._loadedParentTiles[et.key];return Vt&&Vt.tileID.overscaledZ>=xt?Vt:null}for(var de=et.overscaledZ-1;de>=xt;de--){var ye=et.scaledTo(de),Yt=this._getLoadedTile(ye);if(Yt)return Yt}},ot.prototype._getLoadedTile=function(et){var xt=this._tiles[et.key];if(xt&&xt.hasData())return xt;var Vt=this._cache.getByKey(et.wrapped().key);return Vt},ot.prototype.updateCacheSize=function(et){var xt=Math.ceil(et.width/this._source.tileSize)+1,Vt=Math.ceil(et.height/this._source.tileSize)+1,de=xt*Vt,ye=5,Yt=Math.floor(de*ye),ce=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Yt):Yt;this._cache.setMaxSize(ce)},ot.prototype.handleWrapJump=function(et){var xt=this._prevLng===void 0?et:this._prevLng,Vt=et-xt,de=Vt/360,ye=Math.round(de);if(this._prevLng=et,ye){var Yt={};for(var ce in this._tiles){var Se=this._tiles[ce];Se.tileID=Se.tileID.unwrapTo(Se.tileID.wrap+ye),Yt[Se.tileID.key]=Se}this._tiles=Yt;for(var ir in this._timers)clearTimeout(this._timers[ir]),delete this._timers[ir];for(var Ye in this._tiles){var tr=this._tiles[Ye];this._setTileReloadTimer(Ye,tr)}}},ot.prototype.update=function(et){var xt=this;if(this.transform=et,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Vt;this.used?this._source.tileID?Vt=et.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(mi){return new t.OverscaledTileID(mi.canonical.z,mi.wrap,mi.canonical.z,mi.canonical.x,mi.canonical.y)}):(Vt=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Vt=Vt.filter(function(mi){return xt._source.hasTile(mi)}))):Vt=[];var de=et.coveringZoomLevel(this._source),ye=Math.max(de-ot.maxOverzooming,this._source.minzoom),Yt=Math.max(de+ot.maxUnderzooming,this._source.minzoom),ce=this._updateRetainedTiles(Vt,de);if(fi(this._source.type)){for(var Se={},ir={},Ye=Object.keys(ce),tr=0,lr=Ye;trthis._source.maxzoom){var Ze=Ve.children(this._source.maxzoom)[0],Pr=this.getTile(Ze);if(Pr&&Pr.hasData()){Vt[Ze.key]=Ze;continue}}else{var sn=Ve.children(this._source.maxzoom);if(Vt[sn[0].key]&&Vt[sn[1].key]&&Vt[sn[2].key]&&Vt[sn[3].key])continue}for(var dn=Xe.wasRequested(),pi=Ve.overscaledZ-1;pi>=ye;--pi){var ui=Ve.scaledTo(pi);if(de[ui.key]||(de[ui.key]=!0,Xe=this.getTile(ui),!Xe&&dn&&(Xe=this._addTile(ui)),Xe&&(Vt[ui.key]=ui,dn=Xe.wasRequested(),Xe.hasData())))break}}}return Vt},ot.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var et in this._tiles){for(var xt=[],Vt=void 0,de=this._tiles[et].tileID;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){Vt=this._loadedParentTiles[de.key];break}xt.push(de.key);var ye=de.scaledTo(de.overscaledZ-1);if(Vt=this._getLoadedTile(ye),Vt)break;de=ye}for(var Yt=0,ce=xt;Yt0)&&(xt.hasData()&&xt.state!=="reloading"?this._cache.add(xt.tileID,xt,xt.getExpiryTimeout()):(xt.aborted=!0,this._abortTile(xt),this._unloadTile(xt))))},ot.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var et in this._tiles)this._removeTile(et);this._cache.reset()},ot.prototype.tilesIn=function(et,xt,Vt){var de=this,ye=[],Yt=this.transform;if(!Yt)return ye;for(var ce=Vt?Yt.getCameraQueryGeometry(et):et,Se=et.map(function(pi){return Yt.pointCoordinate(pi)}),ir=ce.map(function(pi){return Yt.pointCoordinate(pi)}),Ye=this.getIds(),tr=1/0,lr=1/0,hr=-1/0,Ve=-1/0,Xe=0,Ze=ir;Xe=0&&ea[1].y+mi>=0){var Ei=Se.map(function(la){return Yn.getTilePoint(la)}),Li=ir.map(function(la){return Yn.getTilePoint(la)});ye.push({tile:ui,tileID:Yn,queryGeometry:Ei,cameraQueryGeometry:Li,scale:Ci})}}},dn=0;dn=t.browser.now())return!0}return!1},ot.prototype.setFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.updateState(et,xt,Vt)},ot.prototype.removeFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.removeFeatureState(et,xt,Vt)},ot.prototype.getFeatureState=function(et,xt){return et=et||"_geojsonTileLayer",this._state.getState(et,xt)},ot.prototype.setDependencies=function(et,xt,Vt){var de=this._tiles[et];de&&de.setDependencies(xt,Vt)},ot.prototype.reloadTilesForDependencies=function(et,xt){for(var Vt in this._tiles){var de=this._tiles[Vt];de.hasDependency(et,xt)&&this._reloadTile(Vt,"reloading")}this._cache.filter(function(ye){return!ye.hasDependency(et,xt)})},ot}(t.Evented);Tn.maxOverzooming=10,Tn.maxUnderzooming=3;function Mn($,ot){var et=Math.abs($.wrap*2)-+($.wrap<0),xt=Math.abs(ot.wrap*2)-+(ot.wrap<0);return $.overscaledZ-ot.overscaledZ||xt-et||ot.canonical.y-$.canonical.y||ot.canonical.x-$.canonical.x}function fi($){return $==="raster"||$==="image"||$==="video"}function ki(){return new t.window.Worker(yl.workerUrl)}var Oi="mapboxgl_preloaded_worker_pool",ji=function(){this.active={}};ji.prototype.acquire=function($){if(!this.workers)for(this.workers=[];this.workers.length0?(xt-de)/ye:0;return this.points[Vt].mult(1-Yt).add(this.points[ot].mult(Yt))};var En=function($,ot,et){var xt=this.boxCells=[],Vt=this.circleCells=[];this.xCellCount=Math.ceil($/et),this.yCellCount=Math.ceil(ot/et);for(var de=0;dethis.width||xt<0||ot>this.height)return Vt?!1:[];var ye=[];if($<=0&&ot<=0&&this.width<=et&&this.height<=xt){if(Vt)return!0;for(var Yt=0;Yt0:ye}},En.prototype._queryCircle=function($,ot,et,xt,Vt){var de=$-et,ye=$+et,Yt=ot-et,ce=ot+et;if(ye<0||de>this.width||ce<0||Yt>this.height)return xt?!1:[];var Se=[],ir={hitTest:xt,circle:{x:$,y:ot,radius:et},seenUids:{box:{},circle:{}}};return this._forEachCell(de,Yt,ye,ce,this._queryCellCircle,Se,ir,Vt),xt?Se.length>0:Se},En.prototype.query=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!1,Vt)},En.prototype.hitTest=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!0,Vt)},En.prototype.hitTestCircle=function($,ot,et,xt){return this._queryCircle($,ot,et,!0,xt)},En.prototype._queryCell=function($,ot,et,xt,Vt,de,ye,Yt){var ce=ye.seenUids,Se=this.boxCells[Vt];if(Se!==null)for(var ir=this.bboxes,Ye=0,tr=Se;Ye=ir[hr+0]&&xt>=ir[hr+1]&&(!Yt||Yt(this.boxKeys[lr]))){if(ye.hitTest)return de.push(!0),!0;de.push({key:this.boxKeys[lr],x1:ir[hr],y1:ir[hr+1],x2:ir[hr+2],y2:ir[hr+3]})}}}var Ve=this.circleCells[Vt];if(Ve!==null)for(var Xe=this.circles,Ze=0,Pr=Ve;Zeye*ye+Yt*Yt},En.prototype._circleAndRectCollide=function($,ot,et,xt,Vt,de,ye){var Yt=(de-xt)/2,ce=Math.abs($-(xt+Yt));if(ce>Yt+et)return!1;var Se=(ye-Vt)/2,ir=Math.abs(ot-(Vt+Se));if(ir>Se+et)return!1;if(ce<=Yt||ir<=Se)return!0;var Ye=ce-Yt,tr=ir-Se;return Ye*Ye+tr*tr<=et*et};function Zn($,ot,et,xt,Vt){var de=t.create();return ot?(t.scale(de,de,[1/Vt,1/Vt,1]),et||t.rotateZ(de,de,xt.angle)):t.multiply(de,xt.labelPlaneMatrix,$),de}function La($,ot,et,xt,Vt){if(ot){var de=t.clone($);return t.scale(de,de,[Vt,Vt,1]),et||t.rotateZ(de,de,-xt.angle),de}else return xt.glCoordMatrix}function Vi($,ot){var et=[$.x,$.y,0,1];Ks(et,et,ot);var xt=et[3];return{point:new t.Point(et[0]/xt,et[1]/xt),signedDistanceFromCamera:xt}}function Qa($,ot){return .5+.5*($/ot)}function Ja($,ot){var et=$[0]/$[3],xt=$[1]/$[3],Vt=et>=-ot[0]&&et<=ot[0]&&xt>=-ot[1]&&xt<=ot[1];return Vt}function Do($,ot,et,xt,Vt,de,ye,Yt){var ce=xt?$.textSizeData:$.iconSizeData,Se=t.evaluateSizeForZoom(ce,et.transform.zoom),ir=[256/et.width*2+1,256/et.height*2+1],Ye=xt?$.text.dynamicLayoutVertexArray:$.icon.dynamicLayoutVertexArray;Ye.clear();for(var tr=$.lineVertexArray,lr=xt?$.text.placedSymbolArray:$.icon.placedSymbolArray,hr=et.transform.width/et.transform.height,Ve=!1,Xe=0;Xede)return{useVertical:!0}}return($===t.WritingMode.vertical?ot.yet.x)?{needsFlipping:!0}:null}function Da($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir,Ye,tr,lr){var hr=ot/24,Ve=$.lineOffsetX*hr,Xe=$.lineOffsetY*hr,Ze;if($.numGlyphs>1){var Pr=$.glyphStartIndex+$.numGlyphs,sn=$.lineStartIndex,dn=$.lineStartIndex+$.lineLength,pi=yo(hr,Yt,Ve,Xe,et,ir,Ye,$,ce,de,tr);if(!pi)return{notEnoughRoom:!0};var ui=Vi(pi.first.point,ye).point,Yn=Vi(pi.last.point,ye).point;if(xt&&!et){var Ci=Fo($.writingMode,ui,Yn,lr);if(Ci)return Ci}Ze=[pi.first];for(var mi=$.glyphStartIndex+1;mi0?la.point:ys(Ye,Li,ea,1,Vt),co=Fo($.writingMode,ea,to,lr);if(co)return co}var qo=os(hr*Yt.getoffsetX($.glyphStartIndex),Ve,Xe,et,ir,Ye,$.segment,$.lineStartIndex,$.lineStartIndex+$.lineLength,ce,de,tr);if(!qo)return{notEnoughRoom:!0};Ze=[qo]}for(var xs=0,Il=Ze;xs0?1:-1,hr=0;xt&&(lr*=-1,hr=Math.PI),lr<0&&(hr+=Math.PI);for(var Ve=lr>0?Yt+ye:Yt+ye+1,Xe=Vt,Ze=Vt,Pr=0,sn=0,dn=Math.abs(tr),pi=[];Pr+sn<=dn;){if(Ve+=lr,Ve=ce)return null;if(Ze=Xe,pi.push(Xe),Xe=Ye[Ve],Xe===void 0){var ui=new t.Point(Se.getx(Ve),Se.gety(Ve)),Yn=Vi(ui,ir);if(Yn.signedDistanceFromCamera>0)Xe=Ye[Ve]=Yn.point;else{var Ci=Ve-lr,mi=Pr===0?de:new t.Point(Se.getx(Ci),Se.gety(Ci));Xe=ys(mi,ui,Ze,dn-Pr+1,ir)}}Pr+=sn,sn=Ze.dist(Xe)}var ea=(dn-Pr)/sn,Ei=Xe.sub(Ze),Li=Ei.mult(ea)._add(Ze);Li._add(Ei._unit()._perp()._mult(et*lr));var la=hr+Math.atan2(Xe.y-Ze.y,Xe.x-Ze.x);return pi.push(Li),{point:Li,angle:la,path:pi}}var ul=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Zo($,ot){for(var et=0;et<$;et++){var xt=ot.length;ot.resize(xt+4),ot.float32.set(ul,xt*3)}}function Ks($,ot,et){var xt=ot[0],Vt=ot[1];return $[0]=et[0]*xt+et[4]*Vt+et[12],$[1]=et[1]*xt+et[5]*Vt+et[13],$[3]=et[3]*xt+et[7]*Vt+et[15],$}var ss=100,cl=function($,ot,et){ot===void 0&&(ot=new En($.width+2*ss,$.height+2*ss,25)),et===void 0&&(et=new En($.width+2*ss,$.height+2*ss,25)),this.transform=$,this.grid=ot,this.ignoredGrid=et,this.pitchfactor=Math.cos($._pitch)*$.cameraToCenterDistance,this.screenRightBoundary=$.width+ss,this.screenBottomBoundary=$.height+ss,this.gridRightBoundary=$.width+2*ss,this.gridBottomBoundary=$.height+2*ss};cl.prototype.placeCollisionBox=function($,ot,et,xt,Vt){var de=this.projectAndGetPerspectiveRatio(xt,$.anchorPointX,$.anchorPointY),ye=et*de.perspectiveRatio,Yt=$.x1*ye+de.point.x,ce=$.y1*ye+de.point.y,Se=$.x2*ye+de.point.x,ir=$.y2*ye+de.point.y;return!this.isInsideGrid(Yt,ce,Se,ir)||!ot&&this.grid.hitTest(Yt,ce,Se,ir,Vt)?{box:[],offscreen:!1}:{box:[Yt,ce,Se,ir],offscreen:this.isOffscreen(Yt,ce,Se,ir)}},cl.prototype.placeCollisionCircles=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir,Ye,tr){var lr=[],hr=new t.Point(ot.anchorX,ot.anchorY),Ve=Vi(hr,de),Xe=Qa(this.transform.cameraToCenterDistance,Ve.signedDistanceFromCamera),Ze=Se?Vt/Xe:Vt*Xe,Pr=Ze/t.ONE_EM,sn=Vi(hr,ye).point,dn={},pi=ot.lineOffsetX*Pr,ui=ot.lineOffsetY*Pr,Yn=yo(Pr,xt,pi,ui,!1,sn,hr,ot,et,ye,dn),Ci=!1,mi=!1,ea=!0;if(Yn){for(var Ei=Ye*.5*Xe+tr,Li=new t.Point(-ss,-ss),la=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),to=new Pn,co=Yn.first,qo=Yn.last,xs=[],Il=co.path.length-1;Il>=1;Il--)xs.push(co.path[Il]);for(var Vl=1;Vl0){for(var Fs=xs[0].clone(),Mu=xs[0].clone(),af=1;af=Li.x&&Mu.x<=la.x&&Fs.y>=Li.y&&Mu.y<=la.y?_c=[xs]:Mu.xla.x||Mu.yla.y?_c=[]:_c=t.clipLine([xs],Li.x,Li.y,la.x,la.y)}for(var If=0,jp=_c;If=this.screenRightBoundary||xtthis.screenBottomBoundary},cl.prototype.isInsideGrid=function($,ot,et,xt){return et>=0&&$=0&&ot0){var sn;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID].text&&(sn=this.prevPlacement.variableOffsets[Ye.crossTileID].anchor),this.variableOffsets[Ye.crossTileID]={textOffset:Ve,width:et,height:xt,anchor:$,textBoxScale:Vt,prevAnchor:sn},this.markUsedJustification(tr,$,Ye,lr),tr.allowVerticalPlacement&&(this.markUsedOrientation(tr,lr,Ye),this.placedOrientations[Ye.crossTileID]=lr),{shift:Xe,placedGlyphBoxes:Ze}}},Us.prototype.placeLayerBucketPart=function($,ot,et){var xt=this,Vt=$.parameters,de=Vt.bucket,ye=Vt.layout,Yt=Vt.posMatrix,ce=Vt.textLabelPlaneMatrix,Se=Vt.labelToScreenMatrix,ir=Vt.textPixelRatio,Ye=Vt.holdingForFade,tr=Vt.collisionBoxArray,lr=Vt.partiallyEvaluatedTextSize,hr=Vt.collisionGroup,Ve=ye.get("text-optional"),Xe=ye.get("icon-optional"),Ze=ye.get("text-allow-overlap"),Pr=ye.get("icon-allow-overlap"),sn=ye.get("text-rotation-alignment")==="map",dn=ye.get("text-pitch-alignment")==="map",pi=ye.get("icon-text-fit")!=="none",ui=ye.get("symbol-z-order")==="viewport-y",Yn=Ze&&(Pr||!de.hasIconData()||Xe),Ci=Pr&&(Ze||!de.hasTextData()||Ve);!de.collisionArrays&&tr&&de.deserializeCollisionBoxes(tr);var mi=function(co,qo){if(!ot[co.crossTileID]){if(Ye){xt.placements[co.crossTileID]=new Ps(!1,!1,!1);return}var xs=!1,Il=!1,Vl=!0,pl=null,Hl={box:null,offscreen:null},_c={box:null,offscreen:null},Fs=null,Mu=null,af=null,If=0,jp=0,b0=0;qo.textFeatureIndex?If=qo.textFeatureIndex:co.useRuntimeCollisionCircles&&(If=co.featureIndex),qo.verticalTextFeatureIndex&&(jp=qo.verticalTextFeatureIndex);var Tp=qo.textBox;if(Tp){var Ap=function(of){var md=t.WritingMode.horizontal;if(de.allowVerticalPlacement&&!of&&xt.prevPlacement){var bc=xt.prevPlacement.placedOrientations[co.crossTileID];bc&&(xt.placedOrientations[co.crossTileID]=bc,md=bc,xt.markUsedOrientation(de,md,co))}return md},R0=function(of,md){if(de.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&qo.verticalTextBox)for(var bc=0,Rg=de.writingModes;bc0&&(Qd=Qd.filter(function(of){return of!==Mp.anchor}),Qd.unshift(Mp.anchor))}var Hd=function(of,md,bc){for(var Rg=of.x2-of.x1,Pv=of.y2-of.y1,wx=co.textBoxScale,Pc=pi&&!Pr?md:null,km={box:[],offscreen:!1},kx=Ze?Qd.length*2:Qd.length,Bg=0;Bg=Qd.length,Iv=xt.attemptAnchorPlacement(N0,of,Rg,Pv,wx,sn,dn,ir,Yt,hr,xb,co,de,bc,Pc);if(Iv&&(km=Iv.placedGlyphBoxes,km&&km.box&&km.box.length)){xs=!0,pl=Iv.shift;break}}return km},Q0=function(){return Hd(Tp,qo.iconBox,t.WritingMode.horizontal)},Zm=function(){var of=qo.verticalTextBox,md=Hl&&Hl.box&&Hl.box.length;return de.allowVerticalPlacement&&!md&&co.numVerticalGlyphVertices>0&&of?Hd(of,qo.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Q0,Zm),Hl&&(xs=Hl.box,Vl=Hl.offscreen);var Sp=Ap(Hl&&Hl.box);if(!xs&&xt.prevPlacement){var Ep=xt.prevPlacement.variableOffsets[co.crossTileID];Ep&&(xt.variableOffsets[co.crossTileID]=Ep,xt.markUsedJustification(de,Ep.anchor,co,Sp))}}else{var tp=function(of,md){var bc=xt.collisionIndex.placeCollisionBox(of,Ze,ir,Yt,hr.predicate);return bc&&bc.box&&bc.box.length&&(xt.markUsedOrientation(de,md,co),xt.placedOrientations[co.crossTileID]=md),bc},Gm=function(){return tp(Tp,t.WritingMode.horizontal)},Og=function(){var of=qo.verticalTextBox;return de.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&of?tp(of,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Gm,Og),Ap(Hl&&Hl.box&&Hl.box.length)}}if(Fs=Hl,xs=Fs&&Fs.box&&Fs.box.length>0,Vl=Fs&&Fs.offscreen,co.useRuntimeCollisionCircles){var Ym=de.text.placedSymbolArray.get(co.centerJustifiedTextSymbolIndex),dd=t.evaluateSizeForFeature(de.textSizeData,lr,Ym),wm=ye.get("text-padding"),Dg=co.collisionCircleDiameter;Mu=xt.collisionIndex.placeCollisionCircles(Ze,Ym,de.lineVertexArray,de.glyphOffsetArray,dd,Yt,ce,Se,et,dn,hr.predicate,Dg,wm),xs=Ze||Mu.circles.length>0&&!Mu.collisionDetected,Vl=Vl&&Mu.offscreen}if(qo.iconFeatureIndex&&(b0=qo.iconFeatureIndex),qo.iconBox){var pd=function(of){var md=pi&&pl?Jl(of,pl.x,pl.y,sn,dn,xt.transform.angle):of;return xt.collisionIndex.placeCollisionBox(md,Pr,ir,Yt,hr.predicate)};_c&&_c.box&&_c.box.length&&qo.verticalIconBox?(af=pd(qo.verticalIconBox),Il=af.box.length>0):(af=pd(qo.iconBox),Il=af.box.length>0),Vl=Vl&&af.offscreen}var Km=Ve||co.numHorizontalGlyphVertices===0&&co.numVerticalGlyphVertices===0,Cv=Xe||co.numIconVertices===0;if(!Km&&!Cv?Il=xs=Il&&xs:Cv?Km||(Il=Il&&xs):xs=Il&&xs,xs&&Fs&&Fs.box&&(_c&&_c.box&&jp?xt.collisionIndex.insertCollisionBox(Fs.box,ye.get("text-ignore-placement"),de.bucketInstanceId,jp,hr.ID):xt.collisionIndex.insertCollisionBox(Fs.box,ye.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID)),Il&&af&&xt.collisionIndex.insertCollisionBox(af.box,ye.get("icon-ignore-placement"),de.bucketInstanceId,b0,hr.ID),Mu&&(xs&&xt.collisionIndex.insertCollisionCircles(Mu.circles,ye.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID),et)){var Lv=de.bucketInstanceId,B0=xt.collisionCircleArrays[Lv];B0===void 0&&(B0=xt.collisionCircleArrays[Lv]=new Lo);for(var Fg=0;Fg=0;--Ei){var Li=ea[Ei];mi(de.symbolInstances.get(Li),de.collisionArrays[Li])}else for(var la=$.symbolInstanceStart;la<$.symbolInstanceEnd;la++)mi(de.symbolInstances.get(la),de.collisionArrays[la]);if(et&&de.bucketInstanceId in this.collisionCircleArrays){var to=this.collisionCircleArrays[de.bucketInstanceId];t.invert(to.invProjMatrix,Yt),to.viewportMatrix=this.collisionIndex.getViewportMatrix()}de.justReloaded=!1},Us.prototype.markUsedJustification=function($,ot,et,xt){var Vt={left:et.leftJustifiedTextSymbolIndex,center:et.centerJustifiedTextSymbolIndex,right:et.rightJustifiedTextSymbolIndex},de;xt===t.WritingMode.vertical?de=et.verticalPlacedTextSymbolIndex:de=Vt[t.getAnchorJustification(ot)];for(var ye=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex,et.verticalPlacedTextSymbolIndex],Yt=0,ce=ye;Yt=0&&(de>=0&&Se!==de?$.text.placedSymbolArray.get(Se).crossTileID=0:$.text.placedSymbolArray.get(Se).crossTileID=et.crossTileID)}},Us.prototype.markUsedOrientation=function($,ot,et){for(var xt=ot===t.WritingMode.horizontal||ot===t.WritingMode.horizontalOnly?ot:0,Vt=ot===t.WritingMode.vertical?ot:0,de=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex],ye=0,Yt=de;ye0||dn>0,mi=Pr.numIconVertices>0,ea=xt.placedOrientations[Pr.crossTileID],Ei=ea===t.WritingMode.vertical,Li=ea===t.WritingMode.horizontal||ea===t.WritingMode.horizontalOnly;if(Ci){var la=Ru(Yn.text),to=Ei?lo:la;lr($.text,sn,to);var co=Li?lo:la;lr($.text,dn,co);var qo=Yn.text.isHidden();[Pr.rightJustifiedTextSymbolIndex,Pr.centerJustifiedTextSymbolIndex,Pr.leftJustifiedTextSymbolIndex].forEach(function(b0){b0>=0&&($.text.placedSymbolArray.get(b0).hidden=qo||Ei?1:0)}),Pr.verticalPlacedTextSymbolIndex>=0&&($.text.placedSymbolArray.get(Pr.verticalPlacedTextSymbolIndex).hidden=qo||Li?1:0);var xs=xt.variableOffsets[Pr.crossTileID];xs&&xt.markUsedJustification($,xs.anchor,Pr,ea);var Il=xt.placedOrientations[Pr.crossTileID];Il&&(xt.markUsedJustification($,"left",Pr,Il),xt.markUsedOrientation($,Il,Pr))}if(mi){var Vl=Ru(Yn.icon),pl=!(Ye&&Pr.verticalPlacedIconSymbolIndex&&Ei);if(Pr.placedIconSymbolIndex>=0){var Hl=pl?Vl:lo;lr($.icon,Pr.numIconVertices,Hl),$.icon.placedSymbolArray.get(Pr.placedIconSymbolIndex).hidden=Yn.icon.isHidden()}if(Pr.verticalPlacedIconSymbolIndex>=0){var _c=pl?lo:Vl;lr($.icon,Pr.numVerticalIconVertices,_c),$.icon.placedSymbolArray.get(Pr.verticalPlacedIconSymbolIndex).hidden=Yn.icon.isHidden()}}if($.hasIconCollisionBoxData()||$.hasTextCollisionBoxData()){var Fs=$.collisionArrays[Ze];if(Fs){var Mu=new t.Point(0,0);if(Fs.textBox||Fs.verticalTextBox){var af=!0;if(ce){var If=xt.variableOffsets[pi];If?(Mu=ql(If.anchor,If.width,If.height,If.textOffset,If.textBoxScale),Se&&Mu._rotate(ir?xt.transform.angle:-xt.transform.angle)):af=!1}Fs.textBox&&Pa($.textCollisionBox.collisionVertexArray,Yn.text.placed,!af||Ei,Mu.x,Mu.y),Fs.verticalTextBox&&Pa($.textCollisionBox.collisionVertexArray,Yn.text.placed,!af||Li,Mu.x,Mu.y)}var jp=!!(!Li&&Fs.verticalIconBox);Fs.iconBox&&Pa($.iconCollisionBox.collisionVertexArray,Yn.icon.placed,jp,Ye?Mu.x:0,Ye?Mu.y:0),Fs.verticalIconBox&&Pa($.iconCollisionBox.collisionVertexArray,Yn.icon.placed,!jp,Ye?Mu.x:0,Ye?Mu.y:0)}}},Ve=0;Ve<$.symbolInstances.length;Ve++)hr(Ve);if($.sortFeatures(this.transform.angle),this.retainedQueryData[$.bucketInstanceId]&&(this.retainedQueryData[$.bucketInstanceId].featureSortOrder=$.featureSortOrder),$.hasTextData()&&$.text.opacityVertexBuffer&&$.text.opacityVertexBuffer.updateData($.text.opacityVertexArray),$.hasIconData()&&$.icon.opacityVertexBuffer&&$.icon.opacityVertexBuffer.updateData($.icon.opacityVertexArray),$.hasIconCollisionBoxData()&&$.iconCollisionBox.collisionVertexBuffer&&$.iconCollisionBox.collisionVertexBuffer.updateData($.iconCollisionBox.collisionVertexArray),$.hasTextCollisionBoxData()&&$.textCollisionBox.collisionVertexBuffer&&$.textCollisionBox.collisionVertexBuffer.updateData($.textCollisionBox.collisionVertexArray),$.bucketInstanceId in this.collisionCircleArrays){var Xe=this.collisionCircleArrays[$.bucketInstanceId];$.placementInvProjMatrix=Xe.invProjMatrix,$.placementViewportMatrix=Xe.viewportMatrix,$.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[$.bucketInstanceId]}},Us.prototype.symbolFadeChange=function($){return this.fadeDuration===0?1:($-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Us.prototype.zoomAdjustment=function($){return Math.max(0,(this.transform.zoom-$)/1.5)},Us.prototype.hasTransitions=function($){return this.stale||$-this.lastPlacementChangeTime$},Us.prototype.setStale=function(){this.stale=!0};function Pa($,ot,et,xt,Vt){$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0)}var fo=Math.pow(2,25),qs=Math.pow(2,24),Ql=Math.pow(2,17),Xo=Math.pow(2,16),Gl=Math.pow(2,9),al=Math.pow(2,8),Cl=Math.pow(2,1);function Ru($){if($.opacity===0&&!$.placed)return 0;if($.opacity===1&&$.placed)return 4294967295;var ot=$.placed?1:0,et=Math.floor($.opacity*127);return et*fo+ot*qs+et*Ql+ot*Xo+et*Gl+ot*al+et*Cl+ot}var lo=0,Ms=function($){this._sortAcrossTiles=$.layout.get("symbol-z-order")!=="viewport-y"&&$.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ms.prototype.continuePlacement=function($,ot,et,xt,Vt){for(var de=this._bucketParts;this._currentTileIndex<$.length;){var ye=$[this._currentTileIndex];if(ot.getBucketParts(de,xt,ye,this._sortAcrossTiles),this._currentTileIndex++,Vt())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,de.sort(function(ce,Se){return ce.sortKey-Se.sortKey}));this._currentPartIndex2};this._currentPlacementIndex>=0;){var ye=$[this._currentPlacementIndex],Yt=ot[ye],ce=this.placement.collisionIndex.transform.zoom;if(Yt.type==="symbol"&&(!Yt.minzoom||Yt.minzoom<=ce)&&(!Yt.maxzoom||Yt.maxzoom>ce)){this._inProgressLayer||(this._inProgressLayer=new Ms(Yt));var Se=this._inProgressLayer.continuePlacement(et[Yt.source],this.placement,this._showCollisionBoxes,Yt,de);if(Se)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Is.prototype.commit=function($){return this.placement.commit($),this.placement};var ou=512/t.EXTENT/2,hl=function($,ot,et){this.tileID=$,this.indexedSymbolInstances={},this.bucketInstanceId=et;for(var xt=0;xt$.overscaledZ)for(var ce in Yt){var Se=Yt[ce];Se.tileID.isChildOf($)&&Se.findMatches(ot.symbolInstances,$,de)}else{var ir=$.scaledTo(Number(ye)),Ye=Yt[ir.key];Ye&&Ye.findMatches(ot.symbolInstances,$,de)}}for(var tr=0;tr0)throw new Error("Unimplemented: "+de.map(function(ye){return ye.command}).join(", ")+".");return Vt.forEach(function(ye){ye.command!=="setTransition"&&xt[ye.command].apply(xt,ye.args)}),this.stylesheet=et,!0},ot.prototype.addImage=function(et,xt){if(this.getImage(et))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,xt),this._afterImageUpdated(et)},ot.prototype.updateImage=function(et,xt){this.imageManager.updateImage(et,xt)},ot.prototype.getImage=function(et){return this.imageManager.getImage(et)},ot.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},ot.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},ot.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ot.prototype.addSource=function(et,xt,Vt){var de=this;if(Vt===void 0&&(Vt={}),this._checkLoaded(),this.sourceCaches[et]!==void 0)throw new Error("There is already a source with this ID");if(!xt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(xt).join(", ")+".");var ye=["vector","raster","geojson","video","image"],Yt=ye.indexOf(xt.type)>=0;if(!(Yt&&this._validate(t.validateStyle.source,"sources."+et,xt,null,Vt))){this.map&&this.map._collectResourceTiming&&(xt.collectResourceTiming=!0);var ce=this.sourceCaches[et]=new Tn(et,xt,this.dispatcher);ce.style=this,ce.setEventedParent(this,function(){return{isSourceLoaded:de.loaded(),source:ce.serialize(),sourceId:et}}),ce.onAdd(this.map),this._changed=!0}},ot.prototype.removeSource=function(et){if(this._checkLoaded(),this.sourceCaches[et]===void 0)throw new Error("There is no source with this ID");for(var xt in this._layers)if(this._layers[xt].source===et)return this.fire(new t.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+xt+'" is using it.')));var Vt=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],Vt.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),Vt.setEventedParent(null),Vt.clearTiles(),Vt.onRemove&&Vt.onRemove(this.map),this._changed=!0},ot.prototype.setGeoJSONSourceData=function(et,xt){this._checkLoaded();var Vt=this.sourceCaches[et].getSource();Vt.setData(xt),this._changed=!0},ot.prototype.getSource=function(et){return this.sourceCaches[et]&&this.sourceCaches[et].getSource()},ot.prototype.addLayer=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=et.id;if(this.getLayer(de)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+de+'" already exists on this map')));return}var ye;if(et.type==="custom"){if(bl(this,t.validateCustomStyleLayer(et)))return;ye=t.createStyleLayer(et)}else{if(typeof et.source=="object"&&(this.addSource(de,et.source),et=t.clone$1(et),et=t.extend(et,{source:de})),this._validate(t.validateStyle.layer,"layers."+de,et,{arrayIndex:-1},Vt))return;ye=t.createStyleLayer(et),this._validateLayer(ye),ye.setEventedParent(this,{layer:{id:de}}),this._serializedLayers[ye.id]=ye.serialize()}var Yt=xt?this._order.indexOf(xt):this._order.length;if(xt&&Yt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}if(this._order.splice(Yt,0,de),this._layerOrderChanged=!0,this._layers[de]=ye,this._removedLayers[de]&&ye.source&&ye.type!=="custom"){var ce=this._removedLayers[de];delete this._removedLayers[de],ce.type!==ye.type?this._updatedSources[ye.source]="clear":(this._updatedSources[ye.source]="reload",this.sourceCaches[ye.source].pause())}this._updateLayer(ye),ye.onAdd&&ye.onAdd(this.map)},ot.prototype.moveLayer=function(et,xt){this._checkLoaded(),this._changed=!0;var Vt=this._layers[et];if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")));return}if(et!==xt){var de=this._order.indexOf(et);this._order.splice(de,1);var ye=xt?this._order.indexOf(xt):this._order.length;if(xt&&ye===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}this._order.splice(ye,0,et),this._layerOrderChanged=!0}},ot.prototype.removeLayer=function(et){this._checkLoaded();var xt=this._layers[et];if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")));return}xt.setEventedParent(null);var Vt=this._order.indexOf(et);this._order.splice(Vt,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=xt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],xt.onRemove&&xt.onRemove(this.map)},ot.prototype.getLayer=function(et){return this._layers[et]},ot.prototype.hasLayer=function(et){return et in this._layers},ot.prototype.setLayerZoomRange=function(et,xt,Vt){this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")));return}de.minzoom===xt&&de.maxzoom===Vt||(xt!=null&&(de.minzoom=xt),Vt!=null&&(de.maxzoom=Vt),this._updateLayer(de))},ot.prototype.setFilter=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(de.filter,xt)){if(xt==null){de.filter=void 0,this._updateLayer(de);return}this._validate(t.validateStyle.filter,"layers."+de.id+".filter",xt,null,Vt)||(de.filter=t.clone$1(xt),this._updateLayer(de))}},ot.prototype.getFilter=function(et){return t.clone$1(this.getLayer(et).filter)},ot.prototype.setLayoutProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(ye.getLayoutProperty(xt),Vt)||(ye.setLayoutProperty(xt,Vt,de),this._updateLayer(ye))},ot.prototype.getLayoutProperty=function(et,xt){var Vt=this.getLayer(et);if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")));return}return Vt.getLayoutProperty(xt)},ot.prototype.setPaintProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(ye.getPaintProperty(xt),Vt)){var Yt=ye.setPaintProperty(xt,Vt,de);Yt&&this._updateLayer(ye),this._changed=!0,this._updatedPaintProps[et]=!0}},ot.prototype.getPaintProperty=function(et,xt){return this.getLayer(et).getPaintProperty(xt)},ot.prototype.setFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=et.sourceLayer,ye=this.sourceCaches[Vt];if(ye===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var Yt=ye.getSource().type;if(Yt==="geojson"&&de){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Yt==="vector"&&!de){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),ye.setFeatureState(de,et.id,xt)},ot.prototype.removeFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=this.sourceCaches[Vt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var ye=de.getSource().type,Yt=ye==="vector"?et.sourceLayer:void 0;if(ye==="vector"&&!Yt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xt&&typeof et.id!="string"&&typeof et.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}de.removeFeatureState(Yt,et.id,xt)},ot.prototype.getFeatureState=function(et){this._checkLoaded();var xt=et.source,Vt=et.sourceLayer,de=this.sourceCaches[xt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xt+"' does not exist in the map's style.")));return}var ye=de.getSource().type;if(ye==="vector"&&!Vt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),de.getFeatureState(Vt,et.id)},ot.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ot.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(et){return et.serialize()}),layers:this._serializeLayers(this._order)},function(et){return et!==void 0})},ot.prototype._updateLayer=function(et){this._updatedLayers[et.id]=!0,et.source&&!this._updatedSources[et.source]&&this.sourceCaches[et.source].getSource().type!=="raster"&&(this._updatedSources[et.source]="reload",this.sourceCaches[et.source].pause()),this._changed=!0},ot.prototype._flattenAndSortRenderedFeatures=function(et){for(var xt=this,Vt=function(Li){return xt._layers[Li].type==="fill-extrusion"},de={},ye=[],Yt=this._order.length-1;Yt>=0;Yt--){var ce=this._order[Yt];if(Vt(ce)){de[ce]=Yt;for(var Se=0,ir=et;Se=0;Ze--){var Pr=this._order[Ze];if(Vt(Pr))for(var sn=ye.length-1;sn>=0;sn--){var dn=ye[sn].feature;if(de[dn.layer.id] .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}),I3=Dt((Q,Z)=>{var c=kn(),g=pi().defaultLine,I=Uh().attributes,S=ma(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=Lv(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("mapbox",".layers",!0)],domain:I({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:a.styleValuesMapbox.concat(a.styleValuesNonMapbox),dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},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:g}},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:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),bT=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=z0(),t=xx(),e=ef(),r=I3(),a=qo(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=I3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.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:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),kE=Dt((Q,Z)=>{var c=["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"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),NW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=O0(),t=x0(),e=D0(),r=bT(),a=kE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),TE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),AE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),jW=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=sa().BADNUM,S=q1(),t=Xc(),e=Vs(),r=wg(),a=Tc(),n=kE().isSupportedFont,o=AE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),B=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||B)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),B)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),B;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(B=0;B850?B+=" Black":p>750?B+=" Extra Bold":p>650?B+=" Bold":p>550?B+=" Semi Bold":p>450?B+=" Medium":p>350?B+=" Regular":p>250?B+=" Light":p>150?B+=" Extra Light":B+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(B="Open Sans",p>750?B+=" Extrabold":p>650?B+=" Bold":p>550?B+=" Semibold":p>350?B+=" Regular":B+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(B="Klokantech Noto Sans",k[3]==="CJK"&&(B+=" CJK"),B+=p>500?" Bold":" Regular")),w&&(B+=" Italic"),B==="Open Sans Regular Italic"?B="Open Sans Italic":B==="Open Sans Regular Bold"?B="Open Sans Bold":B==="Open Sans Regular Bold Italic"?B="Open Sans Bold Italic":B==="Klokantech Noto Sans Regular Italic"&&(B="Klokantech Noto Sans Italic"),n(B)||(B=A);var O=B.split(", ");return O}}),UW=Dt((Q,Z)=>{var c=kn(),g=jW(),I=Lv().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermapbox",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Bu(),S=g.fillText,t=sa().BADNUM,e=Lv().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),B=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=B-O,n.y1=B+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),VW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),HW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=sa().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=c||self,c.mapboxgl=g())})(Q,function(){var c,g,I;function S(t,e){if(!c)c=e;else if(!g)g=e;else{var r="var sharedChunk = {}; ("+c+")(sharedChunk); ("+g+")(sharedChunk);",a={};c(a),I=e(a),typeof window<"u"&&(I.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return S(["exports"],function(t){function e(m,N){return N={exports:{}},m(N,N.exports),N.exports}var r="1.13.4",a=n;function n(m,N,X,wt){this.cx=3*m,this.bx=3*(X-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*N,this.by=3*(wt-N)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=wt,this.p2x=X,this.p2y=wt}n.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},n.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},n.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},n.prototype.solveCurveX=function(m,N){typeof N>"u"&&(N=1e-6);var X,wt,Ft,Zt,ie;for(Ft=m,ie=0;ie<8;ie++){if(Zt=this.sampleCurveX(Ft)-m,Math.abs(Zt)wt)return wt;for(;XZt?X=Ft:wt=Ft,Ft=(wt-X)*.5+X}return Ft},n.prototype.solve=function(m,N){return this.sampleCurveY(this.solveCurveX(m,N))};var o=i;function i(m,N){this.x=m,this.y=N}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,N){return this.clone()._rotateAround(m,N)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var N=m.x-this.x,X=m.y-this.y;return N*N+X*X},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,N){return Math.atan2(this.x*N-this.y*m,this.x*m+this.y*N)},_matMult:function(m){var N=m[0]*this.x+m[1]*this.y,X=m[2]*this.x+m[3]*this.y;return this.x=N,this.y=X,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var N=Math.cos(m),X=Math.sin(m),wt=N*this.x-X*this.y,Ft=X*this.x+N*this.y;return this.x=wt,this.y=Ft,this},_rotateAround:function(m,N){var X=Math.cos(m),wt=Math.sin(m),Ft=N.x+X*(this.x-N.x)-wt*(this.y-N.y),Zt=N.y+wt*(this.x-N.x)+X*(this.y-N.y);return this.x=Ft,this.y=Zt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(m){return m instanceof i?m:Array.isArray(m)?new i(m[0],m[1]):m};var l=typeof self<"u"?self:{};function f(m,N){if(Array.isArray(m)){if(!Array.isArray(N)||m.length!==N.length)return!1;for(var X=0;X=1)return 1;var N=m*m,X=N*m;return 4*(m<.5?X:3*(m-N)+X-.75)}function v(m,N,X,wt){var Ft=new a(m,N,X,wt);return function(Zt){return Ft.solve(Zt)}}var T=v(.25,.1,.25,1);function u(m,N,X){return Math.min(X,Math.max(N,m))}function b(m,N,X){var wt=X-N,Ft=((m-N)%wt+wt)%wt+N;return Ft===N?X:Ft}function _(m,N,X){if(!m.length)return X(null,[]);var wt=m.length,Ft=new Array(m.length),Zt=null;m.forEach(function(ie,Be){N(ie,function(Qe,yr){Qe&&(Zt=Qe),Ft[Be]=yr,--wt===0&&X(Zt,Ft)})})}function P(m){var N=[];for(var X in m)N.push(m[X]);return N}function M(m,N){var X=[];for(var wt in m)wt in N||X.push(wt);return X}function C(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt>N/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function w(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function B(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,N){m.forEach(function(X){N[X]&&(N[X]=N[X].bind(N))})}function j(m,N){return m.indexOf(N,m.length-N.length)!==-1}function V(m,N,X){var wt={};for(var Ft in m)wt[Ft]=N.call(X||this,m[Ft],Ft,m);return wt}function H(m,N,X){var wt={};for(var Ft in m)N.call(X||this,m[Ft],Ft,m)&&(wt[Ft]=m[Ft]);return wt}function F(m){return Array.isArray(m)?m.map(F):typeof m=="object"&&m?V(m,F):m}function U(m,N){for(var X=0;X=0)return!0;return!1}var W={};function q(m){W[m]||(typeof console<"u"&&console.warn(m),W[m]=!0)}function J(m,N,X){return(X.y-m.y)*(N.x-m.x)>(N.y-m.y)*(X.x-m.x)}function lt(m){for(var N=0,X=0,wt=m.length,Ft=wt-1,Zt=void 0,ie=void 0;X@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,X={};if(m.replace(N,function(Ft,Zt,ie,Be){var Qe=ie||Be;return X[Zt]=Qe?Qe.toLowerCase():!0,""}),X["max-age"]){var wt=parseInt(X["max-age"],10);isNaN(wt)?delete X["max-age"]:X["max-age"]=wt}return X}var tt=null;function pt(m){if(tt==null){var N=m.navigator?m.navigator.userAgent:null;tt=!!m.safari||!!(N&&(/\b(iPad|iPhone|iPod)\b/.test(N)||N.match("Safari")&&!N.match("Chrome")))}return tt}function rt(m){try{var N=l[m];return N.setItem("_mapbox_test_",1),N.removeItem("_mapbox_test_"),!0}catch{return!1}}function at(m){return l.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(N,X){return String.fromCharCode(+("0x"+X))}))}function vt(m){return decodeURIComponent(l.atob(m).split("").map(function(N){return"%"+("00"+N.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var it=l.performance&&l.performance.now?l.performance.now.bind(l.performance):Date.now.bind(Date),K=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame,ft=l.cancelAnimationFrame||l.mozCancelAnimationFrame||l.webkitCancelAnimationFrame||l.msCancelAnimationFrame,ut,kt,It={now:it,frame:function(m){var N=K(m);return{cancel:function(){return ft(N)}}},getImageData:function(m,N){N===void 0&&(N=0);var X=l.document.createElement("canvas"),wt=X.getContext("2d");if(!wt)throw new Error("failed to create canvas 2d context");return X.width=m.width,X.height=m.height,wt.drawImage(m,0,0,m.width,m.height),wt.getImageData(-N,-N,m.width+2*N,m.height+2*N)},resolveURL:function(m){return ut||(ut=l.document.createElement("a")),ut.href=m,ut.href},hardwareConcurrency:l.navigator&&l.navigator.hardwareConcurrency||4,get devicePixelRatio(){return l.devicePixelRatio},get prefersReducedMotion(){return l.matchMedia?(kt==null&&(kt=l.matchMedia("(prefers-reduced-motion: reduce)")),kt.matches):!1}},Pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},qt={supported:!1,testSupport:pe},Wt,Jt=!1,ge,fe=!1;l.document&&(ge=l.document.createElement("img"),ge.onload=function(){Wt&&se(Wt),Wt=null,fe=!0},ge.onerror=function(){Jt=!0,Wt=null},ge.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function pe(m){Jt||!ge||(fe?se(m):Wt=m)}function se(m){var N=m.createTexture();m.bindTexture(m.TEXTURE_2D,N);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,ge),m.isContextLost())return;qt.supported=!0}catch{}m.deleteTexture(N),Jt=!0}var Tt="01";function Lt(){for(var m="1",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",X="",wt=0;wt<10;wt++)X+=N[Math.floor(Math.random()*62)];var Ft=720*60*1e3,Zt=[m,Tt,X].join(""),ie=Date.now()+Ft;return{token:Zt,tokenExpiresAt:ie}}var Mt=function(m,N){this._transformRequestFn=m,this._customAccessToken=N,this._createSkuToken()};Mt.prototype._createSkuToken=function(){var m=Lt();this._skuToken=m.token,this._skuTokenExpiresAt=m.tokenExpiresAt},Mt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Mt.prototype.transformRequest=function(m,N){return this._transformRequestFn?this._transformRequestFn(m,N)||{url:m}:{url:m}},Mt.prototype.normalizeStyleURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/styles/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeGlyphsURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/fonts/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSourceURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/v4/"+X.authority+".json",X.params.push("secure"),this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSpriteURL=function(m,N,X,wt){var Ft=cr(m);return ee(m)?(Ft.path="/styles/v1"+Ft.path+"/sprite"+N+X,this._makeAPIURL(Ft,this._customAccessToken||wt)):(Ft.path+=""+N+X,ur(Ft))},Mt.prototype.normalizeTileURL=function(m,N){if(this._isSkuTokenExpired()&&this._createSkuToken(),m&&!ee(m))return m;var X=cr(m),wt=/(\.(png|jpg)\d*)(?=$)/,Ft=/^.+\/v4\//,Zt=It.devicePixelRatio>=2||N===512?"@2x":"",ie=qt.supported?".webp":"$1";X.path=X.path.replace(wt,""+Zt+ie),X.path=X.path.replace(Ft,"/"),X.path="/v4"+X.path;var Be=this._customAccessToken||He(X.params)||Pt.ACCESS_TOKEN;return Pt.REQUIRE_ACCESS_TOKEN&&Be&&this._skuToken&&X.params.push("sku="+this._skuToken),this._makeAPIURL(X,Be)},Mt.prototype.canonicalizeTileURL=function(m,N){var X="/v4/",wt=/\.[\w]+$/,Ft=cr(m);if(!Ft.path.match(/(^\/v4\/)/)||!Ft.path.match(wt))return m;var Zt="mapbox://tiles/";Zt+=Ft.path.replace(X,"");var ie=Ft.params;return N&&(ie=ie.filter(function(Be){return!Be.match(/^access_token=/)})),ie.length&&(Zt+="?"+ie.join("&")),Zt},Mt.prototype.canonicalizeTileset=function(m,N){for(var X=N?ee(N):!1,wt=[],Ft=0,Zt=m.tiles||[];Ft=0&&m.params.splice(Ft,1)}if(wt.path!=="/"&&(m.path=""+wt.path+m.path),!Pt.REQUIRE_ACCESS_TOKEN)return ur(m);if(N=N||Pt.ACCESS_TOKEN,!N)throw new Error("An API access token is required to use Mapbox GL. "+X);if(N[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+X);return m.params=m.params.filter(function(Zt){return Zt.indexOf("access_token")===-1}),m.params.push("access_token="+N),ur(m)};function ee(m){return m.indexOf("mapbox:")===0}var ve=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function oe(m){return ve.test(m)}function Ae(m){return m.indexOf("sku=")>0&&oe(m)}function He(m){for(var N=0,X=m;N=1&&l.localStorage.setItem(N,JSON.stringify(this.eventData))}catch{q("Unable to write to LocalStorage")}},br.prototype.processRequests=function(m){},br.prototype.postEvent=function(m,N,X,wt){var Ft=this;if(Pt.EVENTS_URL){var Zt=cr(Pt.EVENTS_URL);Zt.params.push("access_token="+(wt||Pt.ACCESS_TOKEN||""));var ie={event:this.type,created:new Date(m).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Tt,userId:this.anonId},Be=N?C(ie,N):ie,Qe={url:ur(Zt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Be])};this.pendingRequest=Mn(Qe,function(yr){Ft.pendingRequest=null,X(yr),Ft.saveEventData(),Ft.processRequests(wt)})}},br.prototype.queueRequest=function(m,N){this.queue.push(m),this.processRequests(N)};var Xr=function(m){function N(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postMapLoadEvent=function(X,wt,Ft,Zt){this.skuToken=Ft,(Pt.EVENTS_URL&&Zt||Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(ie){return ee(ie)||oe(ie)}))&&this.queueRequest({id:wt,timestamp:Date.now()},Zt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){var Ft=this.queue.shift(),Zt=Ft.id,ie=Ft.timestamp;Zt&&this.success[Zt]||(this.anonId||this.fetchEventData(),B(this.anonId)||(this.anonId=k()),this.postEvent(ie,{skuToken:this.skuToken},function(Be){Be||Zt&&(wt.success[Zt]=!0)},X))}},N}(br),nn=function(m){function N(X){m.call(this,"appUserTurnstile"),this._customAccessToken=X}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postTurnstileEvent=function(X,wt){Pt.EVENTS_URL&&Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(Ft){return ee(Ft)||oe(Ft)})&&this.queueRequest(Date.now(),wt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ft=qr(Pt.ACCESS_TOKEN),Zt=Ft?Ft.u:Pt.ACCESS_TOKEN,ie=Zt!==this.eventData.tokenU;B(this.anonId)||(this.anonId=k(),ie=!0);var Be=this.queue.shift();if(this.eventData.lastSuccess){var Qe=new Date(this.eventData.lastSuccess),yr=new Date(Be),Cr=(Be-this.eventData.lastSuccess)/(1440*60*1e3);ie=ie||Cr>=1||Cr<-1||Qe.getDate()!==yr.getDate()}else ie=!0;if(!ie)return this.processRequests();this.postEvent(Be,{"enabled.telemetry":!1},function(Kr){Kr||(wt.eventData.lastSuccess=Be,wt.eventData.tokenU=Zt)},X)}},N}(br),Le=new nn,Gt=Le.postTurnstileEvent.bind(Le),ne=new Xr,Ct=ne.postMapLoadEvent.bind(ne),gt="mapbox-tiles",St=500,Nt=50,re=1e3*60*7,le;function ke(){l.caches&&!le&&(le=l.caches.open(gt))}var Ue;function qe(m,N){if(Ue===void 0)try{new Response(new ReadableStream),Ue=!0}catch{Ue=!1}Ue?N(m.body):m.blob().then(N)}function or(m,N,X){if(ke(),!!le){var wt={status:N.status,statusText:N.statusText,headers:new l.Headers};N.headers.forEach(function(ie,Be){return wt.headers.set(Be,ie)});var Ft=st(N.headers.get("Cache-Control")||"");if(!Ft["no-store"]){Ft["max-age"]&&wt.headers.set("Expires",new Date(X+Ft["max-age"]*1e3).toUTCString());var Zt=new Date(wt.headers.get("Expires")).getTime()-X;ZtDate.now()&&!X["no-cache"]}var Qr=1/0;function Wn(m){Qr++,Qr>Nt&&(m.getActor().send("enforceCacheSizeLimit",St),Qr=0)}function qn(m){ke(),le&&le.then(function(N){N.keys().then(function(X){for(var wt=0;wt=200&&X.status<300||X.status===0)&&X.response!==null){var Ft=X.response;if(m.type==="json")try{Ft=JSON.parse(X.response)}catch(Zt){return N(Zt)}N(null,Ft,X.getResponseHeader("Cache-Control"),X.getResponseHeader("Expires"))}else N(new Yi(X.statusText,X.status,m.url))},X.send(m.body),{cancel:function(){return X.abort()}}}var tn=function(m,N){if(!nr(m.url)){if(l.fetch&&l.Request&&l.AbortController&&l.Request.prototype.hasOwnProperty("signal"))return dr(m,N);if(mt()&&self.worker&&self.worker.actor){var X=!0;return self.worker.actor.send("getResource",m,N,void 0,X)}}return _r(m,N)},Cn=function(m,N){return tn(C(m,{type:"json"}),N)},Tn=function(m,N){return tn(C(m,{type:"arrayBuffer"}),N)},Mn=function(m,N){return tn(C(m,{method:"POST"}),N)};function mi(m){var N=l.document.createElement("a");return N.href=m,N.protocol===l.document.location.protocol&&N.host===l.document.location.host}var Mi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ni(m,N,X,wt){var Ft=new l.Image,Zt=l.URL;Ft.onload=function(){N(null,Ft),Zt.revokeObjectURL(Ft.src),Ft.onload=null,l.requestAnimationFrame(function(){Ft.src=Mi})},Ft.onerror=function(){return N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ie=new l.Blob([new Uint8Array(m)],{type:"image/png"});Ft.cacheControl=X,Ft.expires=wt,Ft.src=m.byteLength?Zt.createObjectURL(ie):Mi}function Hi(m,N){var X=new l.Blob([new Uint8Array(m)],{type:"image/png"});l.createImageBitmap(X).then(function(wt){N(null,wt)}).catch(function(wt){N(new Error("Could not load image because of "+wt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Ji,di,za=function(){Ji=[],di=0};za();var qa=function(m,N){if(qt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),di>=Pt.MAX_PARALLEL_IMAGE_REQUESTS){var X={requestParameters:m,callback:N,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ji.push(X),X}di++;var wt=!1,Ft=function(){if(!wt)for(wt=!0,di--;Ji.length&&di0||this._oneTimeListeners&&this._oneTimeListeners[m]&&this._oneTimeListeners[m].length>0||this._eventedParent&&this._eventedParent.listens(m)},Rr.prototype.setEventedParent=function(m,N){return this._eventedParent=m,this._eventedParentData=N,this};var Yr=8,mn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},on={"*":{type:"source"}},Ce=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],pr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Hr={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:"*"}},_n={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Bn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},ri={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"}}},Pn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Yn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],La={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qi={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Qa={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ja={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Do={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yo={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Bo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Da={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ys={type:"array",value:"*"},os={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ul={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Go={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ks={type:"array",value:"*",minimum:1},ss={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}},cl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Qs={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},jl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},cs={"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"}},Ps={"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"}},Po={"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"}},As={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},kl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ql={"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"}},Jl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Us={"*":{type:"string"}},Pa={$version:Yr,$root:mn,sources:on,source:Ce,source_vector:pr,source_raster:Hr,source_raster_dem:_n,source_geojson:Bn,source_video:ri,source_image:Pn,layer:En,layout:Yn,layout_background:La,layout_fill:qi,layout_circle:Qa,layout_heatmap:Ja,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Do,layout_symbol:yo,layout_raster:Bo,layout_hillshade:Da,filter:ys,filter_operator:os,geometry_type:ul,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:Go,expression:Ks,light:ss,paint:cl,paint_fill:Qs,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:jl,paint_circle:cs,paint_heatmap:Ps,paint_symbol:Po,paint_raster:As,paint_hillshade:kl,paint_background:ql,transition:Jl,"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:Us},fo=function(m,N,X,wt){this.message=(m?m+": ":"")+X,wt&&(this.identifier=wt),N!=null&&N.__line__&&(this.line=N.__line__)};function qs(m){var N=m.key,X=m.value;return X?[new fo(N,X,"constants have been deprecated as of v8")]:[]}function Ql(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt":m.itemType.kind==="value"?"array":"array<"+N+">"}else return m.kind}var ac=[Ru,uo,Ms,Is,ou,bl,hl,tu(es),Fl];function gh(m,N){if(N.kind==="error")return null;if(m.kind==="array"){if(N.kind==="array"&&(N.N===0&&N.itemType.kind==="value"||!gh(m.itemType,N.itemType))&&(typeof m.N!="number"||m.N===N.N))return null}else{if(m.kind===N.kind)return null;if(m.kind==="value")for(var X=0,wt=ac;X255?255:yr}function Ft(yr){return yr<0?0:yr>1?1:yr}function Zt(yr){return yr[yr.length-1]==="%"?wt(parseFloat(yr)/100*255):wt(parseInt(yr))}function ie(yr){return yr[yr.length-1]==="%"?Ft(parseFloat(yr)/100):Ft(parseFloat(yr))}function Be(yr,Cr,Kr){return Kr<0?Kr+=1:Kr>1&&(Kr-=1),Kr*6<1?yr+(Cr-yr)*Kr*6:Kr*2<1?Cr:Kr*3<2?yr+(Cr-yr)*(2/3-Kr)*6:yr}function Qe(yr){var Cr=yr.replace(/ /g,"").toLowerCase();if(Cr in X)return X[Cr].slice();if(Cr[0]==="#"){if(Cr.length===4){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=4095?[(Kr&3840)>>4|(Kr&3840)>>8,Kr&240|(Kr&240)>>4,Kr&15|(Kr&15)<<4,1]:null}else if(Cr.length===7){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=16777215?[(Kr&16711680)>>16,(Kr&65280)>>8,Kr&255,1]:null}return null}var an=Cr.indexOf("("),gn=Cr.indexOf(")");if(an!==-1&&gn+1===Cr.length){var Rn=Cr.substr(0,an),xi=Cr.substr(an+1,gn-(an+1)).split(","),ha=1;switch(Rn){case"rgba":if(xi.length!==4)return null;ha=ie(xi.pop());case"rgb":return xi.length!==3?null:[Zt(xi[0]),Zt(xi[1]),Zt(xi[2]),ha];case"hsla":if(xi.length!==4)return null;ha=ie(xi.pop());case"hsl":if(xi.length!==3)return null;var oa=(parseFloat(xi[0])%360+360)%360/360,Ta=ie(xi[1]),Ba=ie(xi[2]),ba=Ba<=.5?Ba*(Ta+1):Ba+Ta-Ba*Ta,Xa=Ba*2-ba;return[wt(Be(Xa,ba,oa+1/3)*255),wt(Be(Xa,ba,oa)*255),wt(Be(Xa,ba,oa-1/3)*255),ha];default:return null}}return null}try{N.parseCSSColor=Qe}catch{}}),Sf=jf.parseCSSColor,Bl=function(m,N,X,wt){wt===void 0&&(wt=1),this.r=m,this.g=N,this.b=X,this.a=wt};Bl.parse=function(m){if(m){if(m instanceof Bl)return m;if(typeof m=="string"){var N=Sf(m);if(N)return new Bl(N[0]/255*N[3],N[1]/255*N[3],N[2]/255*N[3],N[3])}}},Bl.prototype.toString=function(){var m=this.toArray(),N=m[0],X=m[1],wt=m[2],Ft=m[3];return"rgba("+Math.round(N)+","+Math.round(X)+","+Math.round(wt)+","+Ft+")"},Bl.prototype.toArray=function(){var m=this,N=m.r,X=m.g,wt=m.b,Ft=m.a;return Ft===0?[0,0,0,0]:[N*255/Ft,X*255/Ft,wt*255/Ft,Ft]},Bl.black=new Bl(0,0,0,1),Bl.white=new Bl(1,1,1,1),Bl.transparent=new Bl(0,0,0,0),Bl.red=new Bl(1,0,0,1);var Rc=function(m,N,X){m?this.sensitivity=N?"variant":"case":this.sensitivity=N?"accent":"base",this.locale=X,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Rc.prototype.compare=function(m,N){return this.collator.compare(m,N)},Rc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Uf=function(m,N,X,wt,Ft){this.text=m,this.image=N,this.scale=X,this.fontStack=wt,this.textColor=Ft},hc=function(m){this.sections=m};hc.fromString=function(m){return new hc([new Uf(m,null,null,null,null)])},hc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(m){return m.text.length!==0||m.image&&m.image.name.length!==0})},hc.factory=function(m){return m instanceof hc?m:hc.fromString(m)},hc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(m){return m.text}).join("")},hc.prototype.serialize=function(){for(var m=["format"],N=0,X=this.sections;N=0&&m<=255&&typeof N=="number"&&N>=0&&N<=255&&typeof X=="number"&&X>=0&&X<=255)){var Ft=typeof wt=="number"?[m,N,X,wt]:[m,N,X];return"Invalid rgba value ["+Ft.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof wt>"u"||typeof wt=="number"&&wt>=0&&wt<=1?null:"Invalid rgba value ["+[m,N,X,wt].join(", ")+"]: 'a' must be between 0 and 1."}function sh(m){if(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number"||m instanceof Bl||m instanceof Rc||m instanceof hc||m instanceof oc)return!0;if(Array.isArray(m)){for(var N=0,X=m;N2){var ie=m[1];if(typeof ie!="string"||!(ie in Eh)||ie==="object")return N.error('The item type argument of "array" must be one of string, number, boolean',1);Zt=Eh[ie],X++}else Zt=es;var Be;if(m.length>3){if(m[2]!==null&&(typeof m[2]!="number"||m[2]<0||m[2]!==Math.floor(m[2])))return N.error('The length argument to "array" must be a positive integer literal',2);Be=m[2],X++}wt=tu(Zt,Be)}else wt=Eh[Ft];for(var Qe=[];X1)&&N.push(wt)}}return N.concat(this.args.map(function(Ft){return Ft.serialize()}))};var Vh=function(m){this.type=bl,this.sections=m};Vh.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[1];if(!Array.isArray(X)&&typeof X=="object")return N.error("First argument must be an image or text section.");for(var wt=[],Ft=!1,Zt=1;Zt<=m.length-1;++Zt){var ie=m[Zt];if(Ft&&typeof ie=="object"&&!Array.isArray(ie)){Ft=!1;var Be=null;if(ie["font-scale"]&&(Be=N.parse(ie["font-scale"],1,uo),!Be))return null;var Qe=null;if(ie["text-font"]&&(Qe=N.parse(ie["text-font"],1,tu(Ms)),!Qe))return null;var yr=null;if(ie["text-color"]&&(yr=N.parse(ie["text-color"],1,ou),!yr))return null;var Cr=wt[wt.length-1];Cr.scale=Be,Cr.font=Qe,Cr.textColor=yr}else{var Kr=N.parse(m[Zt],1,es);if(!Kr)return null;var an=Kr.type.kind;if(an!=="string"&&an!=="value"&&an!=="null"&&an!=="resolvedImage")return N.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ft=!0,wt.push({content:Kr,scale:null,font:null,textColor:null})}}return new Vh(wt)},Vh.prototype.evaluate=function(m){var N=function(X){var wt=X.content.evaluate(m);return cu(wt)===Fl?new Uf("",wt,null,null,null):new Uf(sc(wt),null,X.scale?X.scale.evaluate(m):null,X.font?X.font.evaluate(m).join(","):null,X.textColor?X.textColor.evaluate(m):null)};return new hc(this.sections.map(N))},Vh.prototype.eachChild=function(m){for(var N=0,X=this.sections;N-1),X},bu.prototype.eachChild=function(m){m(this.input)},bu.prototype.outputDefined=function(){return!1},bu.prototype.serialize=function(){return["image",this.input.serialize()]};var Ed={"to-boolean":Is,"to-color":ou,"to-number":uo,"to-string":Ms},tl=function(m,N){this.type=m,this.args=N};tl.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[0];if((X==="to-boolean"||X==="to-string")&&m.length!==2)return N.error("Expected one argument.");for(var wt=Ed[X],Ft=[],Zt=1;Zt4?X="Invalid rbga value "+JSON.stringify(N)+": expected an array containing either three or four numeric values.":X=fc(N[0],N[1],N[2],N[3]),!X))return new Bl(N[0]/255,N[1]/255,N[2]/255,N[3])}throw new Yl(X||"Could not parse color from value '"+(typeof N=="string"?N:String(JSON.stringify(N)))+"'")}else if(this.type.kind==="number"){for(var Be=null,Qe=0,yr=this.args;Qe=N[2]||m[1]<=N[1]||m[3]>=N[3])}function hd(m,N){var X=Hh(m[0]),wt=yf(m[1]),Ft=Math.pow(2,N.z);return[Math.round(X*Ft*rc),Math.round(wt*Ft*rc)]}function Gf(m,N,X){var wt=m[0]-N[0],Ft=m[1]-N[1],Zt=m[0]-X[0],ie=m[1]-X[1];return wt*ie-Zt*Ft===0&&wt*Zt<=0&&Ft*ie<=0}function xf(m,N,X){return N[1]>m[1]!=X[1]>m[1]&&m[0]<(X[0]-N[0])*(m[1]-N[1])/(X[1]-N[1])+N[0]}function Wh(m,N){for(var X=!1,wt=0,Ft=N.length;wt0&&Kr<0||Cr<0&&Kr>0}function Yf(m,N,X,wt){var Ft=[N[0]-m[0],N[1]-m[1]],Zt=[wt[0]-X[0],wt[1]-X[1]];return Wf(Zt,Ft)===0?!1:!!(uh(m,N,X,wt)&&uh(X,wt,m,N))}function Ch(m,N,X){for(var wt=0,Ft=X;wtX[2]){var Ft=wt*.5,Zt=m[0]-X[0]>Ft?-wt:X[0]-m[0]>Ft?wt:0;Zt===0&&(Zt=m[0]-X[2]>Ft?-wt:X[2]-m[0]>Ft?wt:0),m[0]+=Zt}Vf(N,m)}function Ef(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Cd(m,N,X,wt){for(var Ft=Math.pow(2,wt.z)*rc,Zt=[wt.x*rc,wt.y*rc],ie=[],Be=0,Qe=m;Be=0)return!1;var X=!0;return m.eachChild(function(wt){X&&!jc(wt,N)&&(X=!1)}),X}var qh=function(m,N){this.type=N.type,this.name=m,this.boundExpression=N};qh.parse=function(m,N){if(m.length!==2||typeof m[1]!="string")return N.error("'var' expression requires exactly one string literal argument.");var X=m[1];return N.scope.has(X)?new qh(X,N.scope.get(X)):N.error('Unknown variable "'+X+'". Make sure "'+X+'" has been bound in an enclosing "let" expression before using it.',1)},qh.prototype.evaluate=function(m){return this.boundExpression.evaluate(m)},qh.prototype.eachChild=function(){},qh.prototype.outputDefined=function(){return!1},qh.prototype.serialize=function(){return["var",this.name]};var hu=function(m,N,X,wt,Ft){N===void 0&&(N=[]),wt===void 0&&(wt=new Ll),Ft===void 0&&(Ft=[]),this.registry=m,this.path=N,this.key=N.map(function(Zt){return"["+Zt+"]"}).join(""),this.scope=wt,this.errors=Ft,this.expectedType=X};hu.prototype.parse=function(m,N,X,wt,Ft){return Ft===void 0&&(Ft={}),N?this.concat(N,X,wt)._parse(m,Ft):this._parse(m,Ft)},hu.prototype._parse=function(m,N){(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number")&&(m=["literal",m]);function X(yr,Cr,Kr){return Kr==="assert"?new Lc(Cr,[yr]):Kr==="coerce"?new tl(Cr,[yr]):yr}if(Array.isArray(m)){if(m.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var wt=m[0];if(typeof wt!="string")return this.error("Expression name must be a string, but found "+typeof wt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ft=this.registry[wt];if(Ft){var Zt=Ft.parse(m,this);if(!Zt)return null;if(this.expectedType){var ie=this.expectedType,Be=Zt.type;if((ie.kind==="string"||ie.kind==="number"||ie.kind==="boolean"||ie.kind==="object"||ie.kind==="array")&&Be.kind==="value")Zt=X(Zt,ie,N.typeAnnotation||"assert");else if((ie.kind==="color"||ie.kind==="formatted"||ie.kind==="resolvedImage")&&(Be.kind==="value"||Be.kind==="string"))Zt=X(Zt,ie,N.typeAnnotation||"coerce");else if(this.checkSubtype(ie,Be))return null}if(!(Zt instanceof rl)&&Zt.type.kind!=="resolvedImage"&&Lh(Zt)){var Qe=new Pl;try{Zt=new rl(Zt.type,Zt.evaluate(Qe))}catch(yr){return this.error(yr.message),null}}return Zt}return this.error('Unknown expression "'+wt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof m>"u"?this.error("'undefined' value invalid. Use null instead."):typeof m=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof m+" instead.")},hu.prototype.concat=function(m,N,X){var wt=typeof m=="number"?this.path.concat(m):this.path,Ft=X?this.scope.concat(X):this.scope;return new hu(this.registry,wt,N||null,Ft,this.errors)},hu.prototype.error=function(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];var wt=""+this.key+N.map(function(Ft){return"["+Ft+"]"}).join("");this.errors.push(new al(wt,m))},hu.prototype.checkSubtype=function(m,N){var X=gh(m,N);return X&&this.error(X),X};function Lh(m){if(m instanceof qh)return Lh(m.boundExpression);if(m instanceof ts&&m.name==="error"||m instanceof lh||m instanceof Nc)return!1;var N=m instanceof tl||m instanceof Lc,X=!0;return m.eachChild(function(wt){N?X=X&&Lh(wt):X=X&&wt instanceof rl}),X?Jf(m)&&jc(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Mc(m,N){for(var X=m.length-1,wt=0,Ft=X,Zt=0,ie,Be;wt<=Ft;)if(Zt=Math.floor((wt+Ft)/2),ie=m[Zt],Be=m[Zt+1],ie<=N){if(Zt===X||NN)Ft=Zt-1;else throw new Yl("Input is not a number.");return 0}var Uc=function(m,N,X){this.type=m,this.input=N,this.labels=[],this.outputs=[];for(var wt=0,Ft=X;wt=ie)return N.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Qe);var Cr=N.parse(Be,yr,Ft);if(!Cr)return null;Ft=Ft||Cr.type,wt.push([ie,Cr])}return new Uc(Ft,X,wt)},Uc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt);return X[Zt].evaluate(m)},Uc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N0&&m.push(this.labels[N]),m.push(this.outputs[N].serialize());return m};function wu(m,N,X){return m*(1-X)+N*X}function uf(m,N,X){return new Bl(wu(m.r,N.r,X),wu(m.g,N.g,X),wu(m.b,N.b,X),wu(m.a,N.a,X))}function yh(m,N,X){return m.map(function(wt,Ft){return wu(wt,N[Ft],X)})}var $h=Object.freeze({__proto__:null,number:wu,color:uf,array:yh}),Cf=.95047,Ld=1,Jd=1.08883,cf=4/29,Lf=6/29,wc=3*Lf*Lf,hf=Lf*Lf*Lf,Qc=Math.PI/180,ff=180/Math.PI;function Pf(m){return m>hf?Math.pow(m,1/3):m/wc+cf}function xh(m){return m>Lf?m*m*m:wc*(m-cf)}function ku(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Ph(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Vc(m){var N=Ph(m.r),X=Ph(m.g),wt=Ph(m.b),Ft=Pf((.4124564*N+.3575761*X+.1804375*wt)/Cf),Zt=Pf((.2126729*N+.7151522*X+.072175*wt)/Ld),ie=Pf((.0193339*N+.119192*X+.9503041*wt)/Jd);return{l:116*Zt-16,a:500*(Ft-Zt),b:200*(Zt-ie),alpha:m.a}}function fd(m){var N=(m.l+16)/116,X=isNaN(m.a)?N:N+m.a/500,wt=isNaN(m.b)?N:N-m.b/200;return N=Ld*xh(N),X=Cf*xh(X),wt=Jd*xh(wt),new Bl(ku(3.2404542*X-1.5371385*N-.4985314*wt),ku(-.969266*X+1.8760108*N+.041556*wt),ku(.0556434*X-.2040259*N+1.0572252*wt),m.alpha)}function yu(m,N,X){return{l:wu(m.l,N.l,X),a:wu(m.a,N.a,X),b:wu(m.b,N.b,X),alpha:wu(m.alpha,N.alpha,X)}}function bf(m){var N=Vc(m),X=N.l,wt=N.a,Ft=N.b,Zt=Math.atan2(Ft,wt)*ff;return{h:Zt<0?Zt+360:Zt,c:Math.sqrt(wt*wt+Ft*Ft),l:X,alpha:m.a}}function Zh(m){var N=m.h*Qc,X=m.c,wt=m.l;return fd({l:wt,a:Math.cos(N)*X,b:Math.sin(N)*X,alpha:m.alpha})}function th(m,N,X){var wt=N-m;return m+X*(wt>180||wt<-180?wt-360*Math.round(wt/360):wt)}function nf(m,N,X){return{h:th(m.h,N.h,X),c:wu(m.c,N.c,X),l:wu(m.l,N.l,X),alpha:wu(m.alpha,N.alpha,X)}}var Gh={forward:Vc,reverse:fd,interpolate:yu},wf={forward:bf,reverse:Zh,interpolate:nf},Pd=Object.freeze({__proto__:null,lab:Gh,hcl:wf}),gc=function(m,N,X,wt,Ft){this.type=m,this.operator=N,this.interpolation=X,this.input=wt,this.labels=[],this.outputs=[];for(var Zt=0,ie=Ft;Zt1}))return N.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);wt={name:"cubic-bezier",controlPoints:Be}}else return N.error("Unknown interpolation type "+String(wt[0]),1,0);if(m.length-1<4)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if((m.length-1)%2!==0)return N.error("Expected an even number of arguments.");if(Ft=N.parse(Ft,2,uo),!Ft)return null;var Qe=[],yr=null;X==="interpolate-hcl"||X==="interpolate-lab"?yr=ou:N.expectedType&&N.expectedType.kind!=="value"&&(yr=N.expectedType);for(var Cr=0;Cr=Kr)return N.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',gn);var xi=N.parse(an,Rn,yr);if(!xi)return null;yr=yr||xi.type,Qe.push([Kr,xi])}return yr.kind!=="number"&&yr.kind!=="color"&&!(yr.kind==="array"&&yr.itemType.kind==="number"&&typeof yr.N=="number")?N.error("Type "+nu(yr)+" is not interpolatable."):new gc(yr,X,wt,Ft,Qe)},gc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt),ie=N[Zt],Be=N[Zt+1],Qe=gc.interpolationFactor(this.interpolation,wt,ie,Be),yr=X[Zt].evaluate(m),Cr=X[Zt+1].evaluate(m);return this.operator==="interpolate"?$h[this.type.kind.toLowerCase()](yr,Cr,Qe):this.operator==="interpolate-hcl"?wf.reverse(wf.interpolate(wf.forward(yr),wf.forward(Cr),Qe)):Gh.reverse(Gh.interpolate(Gh.forward(yr),Gh.forward(Cr),Qe))},gc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N=X.length)throw new Yl("Array index out of bounds: "+N+" > "+(X.length-1)+".");if(N!==Math.floor(N))throw new Yl("Array index must be an integer, but found "+N+" instead.");return X[N]},_h.prototype.eachChild=function(m){m(this.index),m(this.input)},_h.prototype.outputDefined=function(){return!1},_h.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Nu=function(m,N){this.type=Is,this.needle=m,this.haystack=N};Nu.parse=function(m,N){if(m.length!==3)return N.error("Expected 2 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,es),wt=N.parse(m[2],2,es);return!X||!wt?null:Jc(X.type,[Is,Ms,uo,Ru,es])?new Nu(X,wt):N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead")},Nu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!X)return!1;if(!oh(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!oh(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");return X.indexOf(N)>=0},Nu.prototype.eachChild=function(m){m(this.needle),m(this.haystack)},Nu.prototype.outputDefined=function(){return!0},Nu.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var iu=function(m,N,X){this.type=uo,this.needle=m,this.haystack=N,this.fromIndex=X};iu.parse=function(m,N){if(m.length<=2||m.length>=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,es),wt=N.parse(m[2],2,es);if(!X||!wt)return null;if(!Jc(X.type,[Is,Ms,uo,Ru,es]))return N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,uo);return Ft?new iu(X,wt,Ft):null}else return new iu(X,wt)},iu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!oh(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!oh(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");if(this.fromIndex){var wt=this.fromIndex.evaluate(m);return X.indexOf(N,wt)}return X.indexOf(N)},iu.prototype.eachChild=function(m){m(this.needle),m(this.haystack),this.fromIndex&&m(this.fromIndex)},iu.prototype.outputDefined=function(){return!1},iu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var m=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),m]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var bh=function(m,N,X,wt,Ft,Zt){this.inputType=m,this.type=N,this.input=X,this.cases=wt,this.outputs=Ft,this.otherwise=Zt};bh.parse=function(m,N){if(m.length<5)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if(m.length%2!==1)return N.error("Expected an even number of arguments.");var X,wt;N.expectedType&&N.expectedType.kind!=="value"&&(wt=N.expectedType);for(var Ft={},Zt=[],ie=2;ieNumber.MAX_SAFE_INTEGER)return yr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof an=="number"&&Math.floor(an)!==an)return yr.error("Numeric branch labels must be integer values.");if(!X)X=cu(an);else if(yr.checkSubtype(X,cu(an)))return null;if(typeof Ft[String(an)]<"u")return yr.error("Branch labels must be unique.");Ft[String(an)]=Zt.length}var gn=N.parse(Qe,ie,wt);if(!gn)return null;wt=wt||gn.type,Zt.push(gn)}var Rn=N.parse(m[1],1,es);if(!Rn)return null;var xi=N.parse(m[m.length-1],m.length-1,wt);return!xi||Rn.type.kind!=="value"&&N.concat(1).checkSubtype(X,Rn.type)?null:new bh(X,wt,Rn,Ft,Zt,xi)},bh.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=cu(N)===this.inputType&&this.outputs[this.cases[N]]||this.otherwise;return X.evaluate(m)},bh.prototype.eachChild=function(m){m(this.input),this.outputs.forEach(m),m(this.otherwise)},bh.prototype.outputDefined=function(){return this.outputs.every(function(m){return m.outputDefined()})&&this.otherwise.outputDefined()},bh.prototype.serialize=function(){for(var m=this,N=["match",this.input.serialize()],X=Object.keys(this.cases).sort(),wt=[],Ft={},Zt=0,ie=X;Zt=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,es),wt=N.parse(m[2],2,uo);if(!X||!wt)return null;if(!Jc(X.type,[tu(es),Ms,es]))return N.error("Expected first argument to be of type array or string, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,uo);return Ft?new wh(X.type,X,wt,Ft):null}else return new wh(X.type,X,wt)},wh.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=this.beginIndex.evaluate(m);if(!oh(N,["string","array"]))throw new Yl("Expected first argument to be of type array or string, but found "+nu(cu(N))+" instead.");if(this.endIndex){var wt=this.endIndex.evaluate(m);return N.slice(X,wt)}return N.slice(X)},wh.prototype.eachChild=function(m){m(this.input),m(this.beginIndex),this.endIndex&&m(this.endIndex)},wh.prototype.outputDefined=function(){return!1},wh.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var m=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),m]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function $f(m,N){return m==="=="||m==="!="?N.kind==="boolean"||N.kind==="string"||N.kind==="number"||N.kind==="null"||N.kind==="value":N.kind==="string"||N.kind==="number"||N.kind==="value"}function gr(m,N,X){return N===X}function Ur(m,N,X){return N!==X}function wn(m,N,X){return NX}function Zn(m,N,X){return N<=X}function gi(m,N,X){return N>=X}function aa(m,N,X,wt){return wt.compare(N,X)===0}function xa(m,N,X,wt){return!aa(m,N,X,wt)}function Ra(m,N,X,wt){return wt.compare(N,X)<0}function Ga(m,N,X,wt){return wt.compare(N,X)>0}function fa(m,N,X,wt){return wt.compare(N,X)<=0}function Oa(m,N,X,wt){return wt.compare(N,X)>=0}function Aa(m,N,X){var wt=m!=="=="&&m!=="!=";return function(){function Ft(Zt,ie,Be){this.type=Is,this.lhs=Zt,this.rhs=ie,this.collator=Be,this.hasUntypedArgument=Zt.type.kind==="value"||ie.type.kind==="value"}return Ft.parse=function(Zt,ie){if(Zt.length!==3&&Zt.length!==4)return ie.error("Expected two or three arguments.");var Be=Zt[0],Qe=ie.parse(Zt[1],1,es);if(!Qe)return null;if(!$f(Be,Qe.type))return ie.concat(1).error('"'+Be+`" comparisons are not supported for type '`+nu(Qe.type)+"'.");var yr=ie.parse(Zt[2],2,es);if(!yr)return null;if(!$f(Be,yr.type))return ie.concat(2).error('"'+Be+`" comparisons are not supported for type '`+nu(yr.type)+"'.");if(Qe.type.kind!==yr.type.kind&&Qe.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot compare types '"+nu(Qe.type)+"' and '"+nu(yr.type)+"'.");wt&&(Qe.type.kind==="value"&&yr.type.kind!=="value"?Qe=new Lc(yr.type,[Qe]):Qe.type.kind!=="value"&&yr.type.kind==="value"&&(yr=new Lc(Qe.type,[yr])));var Cr=null;if(Zt.length===4){if(Qe.type.kind!=="string"&&yr.type.kind!=="string"&&Qe.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot use collator to compare non-string types.");if(Cr=ie.parse(Zt[3],3,Gu),!Cr)return null}return new Ft(Qe,yr,Cr)},Ft.prototype.evaluate=function(Zt){var ie=this.lhs.evaluate(Zt),Be=this.rhs.evaluate(Zt);if(wt&&this.hasUntypedArgument){var Qe=cu(ie),yr=cu(Be);if(Qe.kind!==yr.kind||!(Qe.kind==="string"||Qe.kind==="number"))throw new Yl('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+Qe.kind+", "+yr.kind+") instead.")}if(this.collator&&!wt&&this.hasUntypedArgument){var Cr=cu(ie),Kr=cu(Be);if(Cr.kind!=="string"||Kr.kind!=="string")return N(Zt,ie,Be)}return this.collator?X(Zt,ie,Be,this.collator.evaluate(Zt)):N(Zt,ie,Be)},Ft.prototype.eachChild=function(Zt){Zt(this.lhs),Zt(this.rhs),this.collator&&Zt(this.collator)},Ft.prototype.outputDefined=function(){return!0},Ft.prototype.serialize=function(){var Zt=[m];return this.eachChild(function(ie){Zt.push(ie.serialize())}),Zt},Ft}()}var na=Aa("==",gr,aa),ao=Aa("!=",Ur,xa),is=Aa("<",wn,Ra),Xo=Aa(">",hn,Ga),ls=Aa("<=",Zn,fa),ps=Aa(">=",gi,Oa),so=function(m,N,X,wt,Ft){this.type=Ms,this.number=m,this.locale=N,this.currency=X,this.minFractionDigits=wt,this.maxFractionDigits=Ft};so.parse=function(m,N){if(m.length!==3)return N.error("Expected two arguments.");var X=N.parse(m[1],1,uo);if(!X)return null;var wt=m[2];if(typeof wt!="object"||Array.isArray(wt))return N.error("NumberFormat options argument must be an object.");var Ft=null;if(wt.locale&&(Ft=N.parse(wt.locale,1,Ms),!Ft))return null;var Zt=null;if(wt.currency&&(Zt=N.parse(wt.currency,1,Ms),!Zt))return null;var ie=null;if(wt["min-fraction-digits"]&&(ie=N.parse(wt["min-fraction-digits"],1,uo),!ie))return null;var Be=null;return wt["max-fraction-digits"]&&(Be=N.parse(wt["max-fraction-digits"],1,uo),!Be)?null:new so(X,Ft,Zt,ie,Be)},so.prototype.evaluate=function(m){return new Intl.NumberFormat(this.locale?this.locale.evaluate(m):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(m):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(m):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(m):void 0}).format(this.number.evaluate(m))},so.prototype.eachChild=function(m){m(this.number),this.locale&&m(this.locale),this.currency&&m(this.currency),this.minFractionDigits&&m(this.minFractionDigits),this.maxFractionDigits&&m(this.maxFractionDigits)},so.prototype.outputDefined=function(){return!1},so.prototype.serialize=function(){var m={};return this.locale&&(m.locale=this.locale.serialize()),this.currency&&(m.currency=this.currency.serialize()),this.minFractionDigits&&(m["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(m["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),m]};var $a=function(m){this.type=uo,this.input=m};$a.parse=function(m,N){if(m.length!==2)return N.error("Expected 1 argument, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1);return X?X.type.kind!=="array"&&X.type.kind!=="string"&&X.type.kind!=="value"?N.error("Expected argument of type string or array, but found "+nu(X.type)+" instead."):new $a(X):null},$a.prototype.evaluate=function(m){var N=this.input.evaluate(m);if(typeof N=="string"||Array.isArray(N))return N.length;throw new Yl("Expected value to be of type string or array, but found "+nu(cu(N))+" instead.")},$a.prototype.eachChild=function(m){m(this.input)},$a.prototype.outputDefined=function(){return!1},$a.prototype.serialize=function(){var m=["length"];return this.eachChild(function(N){m.push(N.serialize())}),m};var gs={"==":na,"!=":ao,">":Xo,"<":is,">=":ps,"<=":ls,array:Lc,at:_h,boolean:Lc,case:df,coalesce:eh,collator:lh,format:Vh,image:bu,in:Nu,"index-of":iu,interpolate:gc,"interpolate-hcl":gc,"interpolate-lab":gc,length:$a,let:Ih,literal:rl,match:bh,number:Lc,"number-format":so,object:Lc,slice:wh,step:Uc,string:Lc,"to-boolean":tl,"to-color":tl,"to-number":tl,"to-string":tl,var:qh,within:Nc};function el(m,N){var X=N[0],wt=N[1],Ft=N[2],Zt=N[3];X=X.evaluate(m),wt=wt.evaluate(m),Ft=Ft.evaluate(m);var ie=Zt?Zt.evaluate(m):1,Be=fc(X,wt,Ft,ie);if(Be)throw new Yl(Be);return new Bl(X/255*ie,wt/255*ie,Ft/255*ie,ie)}function Il(m,N){return m in N}function su(m,N){var X=N[m];return typeof X>"u"?null:X}function $l(m,N,X,wt){for(;X<=wt;){var Ft=X+wt>>1;if(N[Ft]===m)return!0;N[Ft]>m?wt=Ft-1:X=Ft+1}return!1}function lu(m){return{type:m}}ts.register(gs,{error:[Cu,[Ms],function(m,N){var X=N[0];throw new Yl(X.evaluate(m))}],typeof:[Ms,[es],function(m,N){var X=N[0];return nu(cu(X.evaluate(m)))}],"to-rgba":[tu(uo,4),[ou],function(m,N){var X=N[0];return X.evaluate(m).toArray()}],rgb:[ou,[uo,uo,uo],el],rgba:[ou,[uo,uo,uo,uo],el],has:{type:Is,overloads:[[[Ms],function(m,N){var X=N[0];return Il(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return Il(X.evaluate(m),wt.evaluate(m))}]]},get:{type:es,overloads:[[[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return su(X.evaluate(m),wt.evaluate(m))}]]},"feature-state":[es,[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.featureState||{})}],properties:[hl,[],function(m){return m.properties()}],"geometry-type":[Ms,[],function(m){return m.geometryType()}],id:[es,[],function(m){return m.id()}],zoom:[uo,[],function(m){return m.globals.zoom}],"heatmap-density":[uo,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[uo,[],function(m){return m.globals.lineProgress||0}],accumulated:[es,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[uo,lu(uo),function(m,N){for(var X=0,wt=0,Ft=N;wt":[Is,[Ms,es],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>Zt}],"filter-id->":[Is,[es],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>Ft}],"filter-<=":[Is,[Ms,es],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft<=Zt}],"filter-id-<=":[Is,[es],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt<=Ft}],"filter->=":[Is,[Ms,es],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>=Zt}],"filter-id->=":[Is,[es],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>=Ft}],"filter-has":[Is,[es],function(m,N){var X=N[0];return X.value in m.properties()}],"filter-has-id":[Is,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Is,[tu(Ms)],function(m,N){var X=N[0];return X.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Is,[tu(es)],function(m,N){var X=N[0];return X.value.indexOf(m.id())>=0}],"filter-in-small":[Is,[Ms,tu(es)],function(m,N){var X=N[0],wt=N[1];return wt.value.indexOf(m.properties()[X.value])>=0}],"filter-in-large":[Is,[Ms,tu(es)],function(m,N){var X=N[0],wt=N[1];return $l(m.properties()[X.value],wt.value,0,wt.value.length-1)}],all:{type:Is,overloads:[[[Is,Is],function(m,N){var X=N[0],wt=N[1];return X.evaluate(m)&&wt.evaluate(m)}],[lu(Is),function(m,N){for(var X=0,wt=N;X-1}function Oo(m){return!!m.expression&&m.expression.interpolated}function Es(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function Kl(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Rl(m){return m}function vc(m,N){var X=N.type==="color",wt=m.stops&&typeof m.stops[0][0]=="object",Ft=wt||m.property!==void 0,Zt=wt||!Ft,ie=m.type||(Oo(N)?"exponential":"interval");if(X&&(m=Ql({},m),m.stops&&(m.stops=m.stops.map(function(Ho){return[Ho[0],Bl.parse(Ho[1])]})),m.default?m.default=Bl.parse(m.default):m.default=Bl.parse(N.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Pd[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Be,Qe,yr;if(ie==="exponential")Be=Wc;else if(ie==="interval")Be=zh;else if(ie==="categorical"){Be=Pc,Qe=Object.create(null);for(var Cr=0,Kr=m.stops;Cr=m.stops[wt-1][0])return m.stops[wt-1][1];var Ft=Mc(m.stops.map(function(Zt){return Zt[0]}),X);return m.stops[Ft][1]}function Wc(m,N,X){var wt=m.base!==void 0?m.base:1;if(Es(X)!=="number")return Hc(m.default,N.default);var Ft=m.stops.length;if(Ft===1||X<=m.stops[0][0])return m.stops[0][1];if(X>=m.stops[Ft-1][0])return m.stops[Ft-1][1];var Zt=Mc(m.stops.map(function(Kr){return Kr[0]}),X),ie=Fu(X,wt,m.stops[Zt][0],m.stops[Zt+1][0]),Be=m.stops[Zt][1],Qe=m.stops[Zt+1][1],yr=$h[N.type]||Rl;if(m.colorSpace&&m.colorSpace!=="rgb"){var Cr=Pd[m.colorSpace];yr=function(Kr,an){return Cr.reverse(Cr.interpolate(Cr.forward(Kr),Cr.forward(an),ie))}}return typeof Be.evaluate=="function"?{evaluate:function(){for(var Kr=[],an=arguments.length;an--;)Kr[an]=arguments[an];var gn=Be.evaluate.apply(void 0,Kr),Rn=Qe.evaluate.apply(void 0,Kr);if(!(gn===void 0||Rn===void 0))return yr(gn,Rn,ie)}}:yr(Be,Qe,ie)}function Oh(m,N,X){return N.type==="color"?X=Bl.parse(X):N.type==="formatted"?X=hc.fromString(X.toString()):N.type==="resolvedImage"?X=oc.fromString(X.toString()):Es(X)!==N.type&&(N.type!=="enum"||!N.values[X])&&(X=void 0),Hc(X,m.default,N.default)}function Fu(m,N,X,wt){var Ft=wt-X,Zt=m-X;return Ft===0?0:N===1?Zt/Ft:(Math.pow(N,Zt)-1)/(Math.pow(N,Ft)-1)}var Dh=function(m,N){this.expression=m,this._warningHistory={},this._evaluator=new Pl,this._defaultValue=N?Ot(N):null,this._enumValues=N&&N.type==="enum"?N.values:null};Dh.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._evaluator.globals=m,this._evaluator.feature=N,this._evaluator.featureState=X,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt,this.expression.evaluate(this._evaluator)},Dh.prototype.evaluate=function(m,N,X,wt,Ft,Zt){this._evaluator.globals=m,this._evaluator.feature=N||null,this._evaluator.featureState=X||null,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt||null;try{var ie=this.expression.evaluate(this._evaluator);if(ie==null||typeof ie=="number"&&ie!==ie)return this._defaultValue;if(this._enumValues&&!(ie in this._enumValues))throw new Yl("Expected value to be one of "+Object.keys(this._enumValues).map(function(Be){return JSON.stringify(Be)}).join(", ")+", but found "+JSON.stringify(ie)+" instead.");return ie}catch(Be){return this._warningHistory[Be.message]||(this._warningHistory[Be.message]=!0,typeof console<"u"&&console.warn(Be.message)),this._defaultValue}};function ns(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in gs}function zs(m,N){var X=new hu(gs,[],N?Et(N):void 0),wt=X.parse(m,void 0,void 0,void 0,N&&N.type==="string"?{typeAnnotation:"coerce"}:void 0);return wt?ml(new Dh(wt,N)):qu(X.errors)}var qc=function(m,N){this.kind=m,this._styleExpression=N,this.isStateDependent=m!=="constant"&&!Du(N.expression)};qc.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},qc.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)};var $u=function(m,N,X,wt){this.kind=m,this.zoomStops=X,this._styleExpression=N,this.isStateDependent=m!=="camera"&&!Du(N.expression),this.interpolationType=wt};$u.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},$u.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)},$u.prototype.interpolationFactor=function(m,N,X){return this.interpolationType?gc.interpolationFactor(this.interpolationType,m,N,X):0};function Zf(m,N){if(m=zs(m,N),m.result==="error")return m;var X=m.value.expression,wt=Jf(X);if(!wt&&!zu(N))return qu([new al("","data expressions not supported")]);var Ft=jc(X,["zoom"]);if(!Ft&&!fu(N))return qu([new al("","zoom expressions not supported")]);var Zt=ht(X);if(!Zt&&!Ft)return qu([new al("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Zt instanceof al)return qu([Zt]);if(Zt instanceof gc&&!Oo(N))return qu([new al("",'"interpolate" expressions cannot be used with this property')]);if(!Zt)return ml(wt?new qc("constant",m.value):new qc("source",m.value));var ie=Zt instanceof gc?Zt.interpolation:void 0;return ml(wt?new $u("camera",m.value,Zt.labels,ie):new $u("composite",m.value,Zt.labels,ie))}var $t=function(m,N){this._parameters=m,this._specification=N,Ql(this,vc(this._parameters,this._specification))};$t.deserialize=function(m){return new $t(m._parameters,m._specification)},$t.serialize=function(m){return{_parameters:m._parameters,_specification:m._specification}};function z(m,N){if(Kl(m))return new $t(m,N);if(ns(m)){var X=Zf(m,N);if(X.result==="error")throw new Error(X.value.map(function(Ft){return Ft.key+": "+Ft.message}).join(", "));return X.value}else{var wt=m;return typeof m=="string"&&N.type==="color"&&(wt=Bl.parse(m)),{kind:"constant",evaluate:function(){return wt}}}}function ht(m){var N=null;if(m instanceof Ih)N=ht(m.result);else if(m instanceof eh)for(var X=0,wt=m.args;Xwt.maximum?[new fo(N,X,X+" is greater than the maximum value "+wt.maximum)]:[]}function Ke(m){var N=m.valueSpec,X=Jo(m.value.type),wt,Ft={},Zt,ie,Be=X!=="categorical"&&m.value.property===void 0,Qe=!Be,yr=Es(m.value.stops)==="array"&&Es(m.value.stops[0])==="array"&&Es(m.value.stops[0][0])==="object",Cr=Ht({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Kr,default:Rn}});return X==="identity"&&Be&&Cr.push(new fo(m.key,m.value,'missing required property "property"')),X!=="identity"&&!m.value.stops&&Cr.push(new fo(m.key,m.value,'missing required property "stops"')),X==="exponential"&&m.valueSpec.expression&&!Oo(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Qe&&!zu(m.valueSpec)?Cr.push(new fo(m.key,m.value,"property functions not supported")):Be&&!fu(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"zoom functions not supported"))),(X==="categorical"||yr)&&m.value.property===void 0&&Cr.push(new fo(m.key,m.value,'"property" property is required')),Cr;function Kr(xi){if(X==="identity")return[new fo(xi.key,xi.value,'identity function may not have a "stops" property')];var ha=[],oa=xi.value;return ha=ha.concat(Te({key:xi.key,value:oa,valueSpec:xi.valueSpec,style:xi.style,styleSpec:xi.styleSpec,arrayElementValidator:an})),Es(oa)==="array"&&oa.length===0&&ha.push(new fo(xi.key,oa,"array must have at least one stop")),ha}function an(xi){var ha=[],oa=xi.value,Ta=xi.key;if(Es(oa)!=="array")return[new fo(Ta,oa,"array expected, "+Es(oa)+" found")];if(oa.length!==2)return[new fo(Ta,oa,"array length 2 expected, length "+oa.length+" found")];if(yr){if(Es(oa[0])!=="object")return[new fo(Ta,oa,"object expected, "+Es(oa[0])+" found")];if(oa[0].zoom===void 0)return[new fo(Ta,oa,"object stop key must have zoom")];if(oa[0].value===void 0)return[new fo(Ta,oa,"object stop key must have value")];if(ie&&ie>Jo(oa[0].zoom))return[new fo(Ta,oa[0].zoom,"stop zoom values must appear in ascending order")];Jo(oa[0].zoom)!==ie&&(ie=Jo(oa[0].zoom),Zt=void 0,Ft={}),ha=ha.concat(Ht({key:Ta+"[0]",value:oa[0],valueSpec:{zoom:{}},style:xi.style,styleSpec:xi.styleSpec,objectElementValidators:{zoom:Fe,value:gn}}))}else ha=ha.concat(gn({key:Ta+"[0]",value:oa[0],style:xi.style,styleSpec:xi.styleSpec},oa));return ns(Gl(oa[1]))?ha.concat([new fo(Ta+"[1]",oa[1],"expressions are not allowed in function stops.")]):ha.concat(vl({key:Ta+"[1]",value:oa[1],valueSpec:N,style:xi.style,styleSpec:xi.styleSpec}))}function gn(xi,ha){var oa=Es(xi.value),Ta=Jo(xi.value),Ba=xi.value!==null?xi.value:ha;if(!wt)wt=oa;else if(oa!==wt)return[new fo(xi.key,Ba,oa+" stop domain type must match previous stop domain type "+wt)];if(oa!=="number"&&oa!=="string"&&oa!=="boolean")return[new fo(xi.key,Ba,"stop domain value must be a number, string, or boolean")];if(oa!=="number"&&X!=="categorical"){var ba="number expected, "+oa+" found";return zu(N)&&X===void 0&&(ba+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fo(xi.key,Ba,ba)]}return X==="categorical"&&oa==="number"&&(!isFinite(Ta)||Math.floor(Ta)!==Ta)?[new fo(xi.key,Ba,"integer expected, found "+Ta)]:X!=="categorical"&&oa==="number"&&Zt!==void 0&&Ta=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var N=0,X=m.slice(1);NN?1:0}function Me(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var N=1;N"||N==="<="||N===">="?De(m[1],m[2],N):N==="any"?$e(m.slice(1)):N==="all"?["all"].concat(m.slice(1).map(je)):N==="none"?["all"].concat(m.slice(1).map(je).map(Nr)):N==="in"?wr(m[1],m.slice(2)):N==="!in"?Nr(wr(m[1],m.slice(2))):N==="has"?Or(m[1]):N==="!has"?Nr(Or(m[1])):N==="within"?m:!0;return X}function De(m,N,X){switch(m){case"$type":return["filter-type-"+X,N];case"$id":return["filter-id-"+X,N];default:return["filter-"+X,m,N]}}function $e(m){return["any"].concat(m.map(je))}function wr(m,N){if(N.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",N]];case"$id":return["filter-id-in",["literal",N]];default:return N.length>200&&!N.some(function(X){return typeof X!=typeof N[0]})?["filter-in-large",m,["literal",N.sort(_e)]]:["filter-in-small",m,["literal",N]]}}function Or(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Nr(m){return["!",m]}function en(m){return Sn(Gl(m.value))?vr(Ql({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):vn(m)}function vn(m){var N=m.value,X=m.key;if(Es(N)!=="array")return[new fo(X,N,"array expected, "+Es(N)+" found")];var wt=m.styleSpec,Ft,Zt=[];if(N.length<1)return[new fo(X,N,"filter array must have at least 1 element")];switch(Zt=Zt.concat(un({key:X+"[0]",value:N[0],valueSpec:wt.filter_operator,style:m.style,styleSpec:m.styleSpec})),Jo(N[0])){case"<":case"<=":case">":case">=":N.length>=2&&Jo(N[1])==="$type"&&Zt.push(new fo(X,N,'"$type" cannot be use with operator "'+N[0]+'"'));case"==":case"!=":N.length!==3&&Zt.push(new fo(X,N,'filter array for operator "'+N[0]+'" must have 3 elements'));case"in":case"!in":N.length>=2&&(Ft=Es(N[1]),Ft!=="string"&&Zt.push(new fo(X+"[1]",N[1],"string expected, "+Ft+" found")));for(var ie=2;ie=Cr[gn+0]&&wt>=Cr[gn+1])?(ie[an]=!0,Zt.push(yr[an])):ie[an]=!1}}},ue.prototype._forEachCell=function(m,N,X,wt,Ft,Zt,ie,Be){for(var Qe=this._convertToCellCoord(m),yr=this._convertToCellCoord(N),Cr=this._convertToCellCoord(X),Kr=this._convertToCellCoord(wt),an=Qe;an<=Cr;an++)for(var gn=yr;gn<=Kr;gn++){var Rn=this.d*gn+an;if(!(Be&&!Be(this._convertFromCellCoord(an),this._convertFromCellCoord(gn),this._convertFromCellCoord(an+1),this._convertFromCellCoord(gn+1)))&&Ft.call(this,m,N,X,wt,Rn,Zt,ie,Be))return}},ue.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},ue.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},ue.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,N=Ut+this.cells.length+1+1,X=0,wt=0;wt=0)){var Kr=m[Cr];yr[Cr]=Ne[Qe].shallow.indexOf(Cr)>=0?Kr:Jr(Kr,N)}m instanceof Error&&(yr.message=m.message)}if(yr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Qe!=="Object"&&(yr.$name=Qe),yr}throw new Error("can't serialize object of type "+typeof m)}function xn(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Er(m)||rn(m)||ArrayBuffer.isView(m)||m instanceof Se)return m;if(Array.isArray(m))return m.map(xn);if(typeof m=="object"){var N=m.$name||"Object",X=Ne[N],wt=X.klass;if(!wt)throw new Error("can't deserialize unregistered class "+N);if(wt.deserialize)return wt.deserialize(m);for(var Ft=Object.create(wt.prototype),Zt=0,ie=Object.keys(m);Zt=0?Qe:xn(Qe)}}return Ft}throw new Error("can't deserialize object of type "+typeof m)}var zn=function(){this.first=!0};zn.prototype.update=function(m,N){var X=Math.floor(m);return this.first?(this.first=!1,this.lastIntegerZoom=X,this.lastIntegerZoomTime=0,this.lastZoom=m,this.lastFloorZoom=X,!0):(this.lastFloorZoom>X?(this.lastIntegerZoom=X+1,this.lastIntegerZoomTime=N):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function $i(m){for(var N=0,X=m;N=65097&&m<=65103)||On["CJK Compatibility Ideographs"](m)||On["CJK Compatibility"](m)||On["CJK Radicals Supplement"](m)||On["CJK Strokes"](m)||On["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||On["CJK Unified Ideographs Extension A"](m)||On["CJK Unified Ideographs"](m)||On["Enclosed CJK Letters and Months"](m)||On["Hangul Compatibility Jamo"](m)||On["Hangul Jamo Extended-A"](m)||On["Hangul Jamo Extended-B"](m)||On["Hangul Jamo"](m)||On["Hangul Syllables"](m)||On.Hiragana(m)||On["Ideographic Description Characters"](m)||On.Kanbun(m)||On["Kangxi Radicals"](m)||On["Katakana Phonetic Extensions"](m)||On.Katakana(m)&&m!==12540||On["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||On["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||On["Unified Canadian Aboriginal Syllabics"](m)||On["Unified Canadian Aboriginal Syllabics Extended"](m)||On["Vertical Forms"](m)||On["Yijing Hexagram Symbols"](m)||On["Yi Syllables"](m)||On["Yi Radicals"](m))}function Ki(m){return!!(On["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||On["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||On["Letterlike Symbols"](m)||On["Number Forms"](m)||On["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||On["Control Pictures"](m)&&m!==9251||On["Optical Character Recognition"](m)||On["Enclosed Alphanumerics"](m)||On["Geometric Shapes"](m)||On["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||On["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||On["CJK Symbols and Punctuation"](m)||On.Katakana(m)||On["Private Use Area"](m)||On["CJK Compatibility Forms"](m)||On["Small Form Variants"](m)||On["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Jn(m){return!(ji(m)||Ki(m))}function Ua(m){return On.Arabic(m)||On["Arabic Supplement"](m)||On["Arabic Extended-A"](m)||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function Wa(m){return m>=1424&&m<=2303||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function oo(m,N){return!(!N&&Wa(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||On.Khmer(m))}function Io(m){for(var N=0,X=m;N-1&&(Yo=$o.error),ol&&ol(m)};function Ku(){du.fire(new $r("pluginStateChange",{pluginStatus:Yo,pluginURL:vs}))}var du=new Rr,_o=function(){return Yo},Gs=function(m){return m({pluginStatus:Yo,pluginURL:vs}),du.on("pluginStateChange",m),m},nl=function(m,N,X){if(X===void 0&&(X=!1),Yo===$o.deferred||Yo===$o.loading||Yo===$o.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");vs=It.resolveURL(m),Yo=$o.deferred,ol=N,Ku(),X||uu()},uu=function(){if(Yo!==$o.deferred||!vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Yo=$o.loading,Ku(),vs&&Tn({url:vs},function(m){m?Tl(m):(Yo=$o.loaded,Ku())})},Xl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Yo===$o.loaded||Xl.applyArabicShaping!=null},isLoading:function(){return Yo===$o.loading},setState:function(m){Yo=m.pluginStatus,vs=m.pluginURL},isParsed:function(){return Xl.applyArabicShaping!=null&&Xl.processBidirectionalText!=null&&Xl.processStyledBidirectionalText!=null},getPluginURL:function(){return vs}},rh=function(){!Xl.isLoading()&&!Xl.isLoaded()&&_o()==="deferred"&&uu()},Ul=function(m,N){this.zoom=m,N?(this.now=N.now,this.fadeDuration=N.fadeDuration,this.zoomHistory=N.zoomHistory,this.transition=N.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new zn,this.transition={})};Ul.prototype.isSupportedScript=function(m){return Ro(m,Xl.isLoaded())},Ul.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ul.prototype.getCrossfadeParameters=function(){var m=this.zoom,N=m-Math.floor(m),X=this.crossFadingFactor();return m>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:N+(1-N)*X}:{fromScale:.5,toScale:1,t:1-(1-X)*N}};var ru=function(m,N){this.property=m,this.value=N,this.expression=z(N===void 0?m.specification.default:N,m.specification)};ru.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ru.prototype.possiblyEvaluate=function(m,N,X){return this.property.possiblyEvaluate(this,m,N,X)};var kh=function(m){this.property=m,this.value=new ru(m,void 0)};kh.prototype.transitioned=function(m,N){return new Tr(this.property,this.value,N,C({},m.transition,this.transition),m.now)},kh.prototype.untransitioned=function(){return new Tr(this.property,this.value,null,{},0)};var be=function(m){this._properties=m,this._values=Object.create(m.defaultTransitionablePropertyValues)};be.prototype.getValue=function(m){return F(this._values[m].value.value)},be.prototype.setValue=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new kh(this._values[m].property)),this._values[m].value=new ru(this._values[m].property,N===null?void 0:F(N))},be.prototype.getTransition=function(m){return F(this._values[m].transition)},be.prototype.setTransition=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new kh(this._values[m].property)),this._values[m].transition=F(N)||void 0},be.prototype.serialize=function(){for(var m={},N=0,X=Object.keys(this._values);Nthis.end)return this.prior=null,Ft;if(this.value.isDataDriven())return this.prior=null,Ft;if(wtZt.zoomHistory.lastIntegerZoom?{from:X,to:wt}:{from:Ft,to:wt}},N.prototype.interpolate=function(X){return X},N}(li),Gi=function(m){this.specification=m};Gi.prototype.possiblyEvaluate=function(m,N,X,wt){if(m.value!==void 0)if(m.expression.kind==="constant"){var Ft=m.expression.evaluate(N,null,{},X,wt);return this._calculate(Ft,Ft,Ft,N)}else return this._calculate(m.expression.evaluate(new Ul(Math.floor(N.zoom-1),N)),m.expression.evaluate(new Ul(Math.floor(N.zoom),N)),m.expression.evaluate(new Ul(Math.floor(N.zoom+1),N)),N)},Gi.prototype._calculate=function(m,N,X,wt){var Ft=wt.zoom;return Ft>wt.zoomHistory.lastIntegerZoom?{from:m,to:N}:{from:X,to:N}},Gi.prototype.interpolate=function(m){return m};var _a=function(m){this.specification=m};_a.prototype.possiblyEvaluate=function(m,N,X,wt){return!!m.expression.evaluate(N,null,{},X,wt)},_a.prototype.interpolate=function(){return!1};var Za=function(m){this.properties=m,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var N in m){var X=m[N];X.specification.overridable&&this.overridableProperties.push(N);var wt=this.defaultPropertyValues[N]=new ru(X,void 0),Ft=this.defaultTransitionablePropertyValues[N]=new kh(X);this.defaultTransitioningPropertyValues[N]=Ft.untransitioned(),this.defaultPossiblyEvaluatedValues[N]=wt.possiblyEvaluate({})}};sr("DataDrivenProperty",li),sr("DataConstantProperty",yn),sr("CrossFadedDataDrivenProperty",ta),sr("CrossFadedProperty",Gi),sr("ColorRampProperty",_a);var Na="-transition",ia=function(m){function N(X,wt){if(m.call(this),this.id=X.id,this.type=X.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},X.type!=="custom"&&(X=X,this.metadata=X.metadata,this.minzoom=X.minzoom,this.maxzoom=X.maxzoom,X.type!=="background"&&(this.source=X.source,this.sourceLayer=X["source-layer"],this.filter=X.filter),wt.layout&&(this._unevaluatedLayout=new Fn(wt.layout)),wt.paint)){this._transitionablePaint=new be(wt.paint);for(var Ft in X.paint)this.setPaintProperty(Ft,X.paint[Ft],{validate:!1});for(var Zt in X.layout)this.setLayoutProperty(Zt,X.layout[Zt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ni(wt.paint)}}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},N.prototype.getLayoutProperty=function(X){return X==="visibility"?this.visibility:this._unevaluatedLayout.getValue(X)},N.prototype.setLayoutProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".layout."+X;if(this._validate(dc,Zt,X,wt,Ft))return}if(X==="visibility"){this.visibility=wt;return}this._unevaluatedLayout.setValue(X,wt)},N.prototype.getPaintProperty=function(X){return j(X,Na)?this._transitionablePaint.getTransition(X.slice(0,-Na.length)):this._transitionablePaint.getValue(X)},N.prototype.setPaintProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".paint."+X;if(this._validate(Yu,Zt,X,wt,Ft))return!1}if(j(X,Na))return this._transitionablePaint.setTransition(X.slice(0,-Na.length),wt||void 0),!1;var ie=this._transitionablePaint._values[X],Be=ie.property.specification["property-type"]==="cross-faded-data-driven",Qe=ie.value.isDataDriven(),yr=ie.value;this._transitionablePaint.setValue(X,wt),this._handleSpecialPaintPropertyUpdate(X);var Cr=this._transitionablePaint._values[X].value,Kr=Cr.isDataDriven();return Kr||Qe||Be||this._handleOverridablePaintPropertyUpdate(X,yr,Cr)},N.prototype._handleSpecialPaintPropertyUpdate=function(X){},N.prototype._handleOverridablePaintPropertyUpdate=function(X,wt,Ft){return!1},N.prototype.isHidden=function(X){return this.minzoom&&X=this.maxzoom?!0:this.visibility==="none"},N.prototype.updateTransitions=function(X){this._transitioningPaint=this._transitionablePaint.transitioned(X,this._transitioningPaint)},N.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},N.prototype.recalculate=function(X,wt){X.getCrossfadeParameters&&(this._crossfadeParameters=X.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(X,void 0,wt)),this.paint=this._transitioningPaint.possiblyEvaluate(X,void 0,wt)},N.prototype.serialize=function(){var X={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(X.layout=X.layout||{},X.layout.visibility=this.visibility),H(X,function(wt,Ft){return wt!==void 0&&!(Ft==="layout"&&!Object.keys(wt).length)&&!(Ft==="paint"&&!Object.keys(wt).length)})},N.prototype._validate=function(X,wt,Ft,Zt,ie){return ie===void 0&&(ie={}),ie&&ie.validate===!1?!1:$c(this,X.call($s,{key:wt,layerType:this.type,objectKey:Ft,value:Zt,styleSpec:Pa,style:{glyphs:!0,sprite:!0}}))},N.prototype.is3D=function(){return!1},N.prototype.isTileClipped=function(){return!1},N.prototype.hasOffscreenPass=function(){return!1},N.prototype.resize=function(){},N.prototype.isStateDependent=function(){for(var X in this.paint._values){var wt=this.paint.get(X);if(!(!(wt instanceof hi)||!zu(wt.property.specification))&&(wt.value.kind==="source"||wt.value.kind==="composite")&&wt.value.isStateDependent)return!0}return!1},N}(Rr),Ei={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},dn=function(m,N){this._structArray=m,this._pos1=N*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Un=128,Ui=5,Si=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Si.serialize=function(m,N){return m._trim(),N&&(m.isTransferred=!0,N.push(m.arrayBuffer)),{length:m.length,arrayBuffer:m.arrayBuffer}},Si.deserialize=function(m){var N=Object.create(this.prototype);return N.arrayBuffer=m.arrayBuffer,N.length=m.length,N.capacity=m.arrayBuffer.byteLength/N.bytesPerElement,N._refreshViews(),N},Si.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Si.prototype.clear=function(){this.length=0},Si.prototype.resize=function(m){this.reserve(m),this.length=m},Si.prototype.reserve=function(m){if(m>this.capacity){this.capacity=Math.max(m,Math.floor(this.capacity*Ui),Un),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var N=this.uint8;this._refreshViews(),N&&this.uint8.set(N)}},Si.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ai(m,N){N===void 0&&(N=1);var X=0,wt=0,Ft=m.map(function(ie){var Be=Ea(ie.type),Qe=X=da(X,Math.max(N,Be)),yr=ie.components||1;return wt=Math.max(wt,Be),X+=Be*yr,{name:ie.name,type:ie.type,components:yr,offset:Qe}}),Zt=da(X,Math.max(wt,N));return{members:Ft,size:Zt,alignment:N}}function Ea(m){return Ei[m].BYTES_PER_ELEMENT}function da(m,N){return Math.ceil(m/N)*N}var Va=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.int16[Zt+0]=wt,this.int16[Zt+1]=Ft,X},N}(Si);Va.prototype.bytesPerElement=4,sr("StructArrayLayout2i4",Va);var ki=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Be=X*4;return this.int16[Be+0]=wt,this.int16[Be+1]=Ft,this.int16[Be+2]=Zt,this.int16[Be+3]=ie,X},N}(Si);ki.prototype.bytesPerElement=8,sr("StructArrayLayout4i8",ki);var oi=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,X,wt,Ft,Zt,ie,Be)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Be,this.int16[yr+5]=Qe,X},N}(Si);oi.prototype.bytesPerElement=12,sr("StructArrayLayout2i4i12",oi);var Ca=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,X,wt,Ft,Zt,ie,Be)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe){var yr=X*4,Cr=X*8;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.uint8[Cr+4]=Zt,this.uint8[Cr+5]=ie,this.uint8[Cr+6]=Be,this.uint8[Cr+7]=Qe,X},N}(Si);Ca.prototype.bytesPerElement=8,sr("StructArrayLayout2i4ub8",Ca);var va=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.float32[Zt+0]=wt,this.float32[Zt+1]=Ft,X},N}(Si);va.prototype.bytesPerElement=8,sr("StructArrayLayout2f8",va);var Xi=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr){var an=this.length;return this.resize(an+1),this.emplace(an,X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an){var gn=X*10;return this.uint16[gn+0]=wt,this.uint16[gn+1]=Ft,this.uint16[gn+2]=Zt,this.uint16[gn+3]=ie,this.uint16[gn+4]=Be,this.uint16[gn+5]=Qe,this.uint16[gn+6]=yr,this.uint16[gn+7]=Cr,this.uint16[gn+8]=Kr,this.uint16[gn+9]=an,X},N}(Si);Xi.prototype.bytesPerElement=20,sr("StructArrayLayout10ui20",Xi);var Qi=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn){var Rn=this.length;return this.resize(Rn+1),this.emplace(Rn,X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn){var xi=X*12;return this.int16[xi+0]=wt,this.int16[xi+1]=Ft,this.int16[xi+2]=Zt,this.int16[xi+3]=ie,this.uint16[xi+4]=Be,this.uint16[xi+5]=Qe,this.uint16[xi+6]=yr,this.uint16[xi+7]=Cr,this.int16[xi+8]=Kr,this.int16[xi+9]=an,this.int16[xi+10]=gn,this.int16[xi+11]=Rn,X},N}(Si);Qi.prototype.bytesPerElement=24,sr("StructArrayLayout4i4ui4i24",Qi);var ka=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.float32[ie+0]=wt,this.float32[ie+1]=Ft,this.float32[ie+2]=Zt,X},N}(Si);ka.prototype.bytesPerElement=12,sr("StructArrayLayout3f12",ka);var zo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint32[Ft+0]=wt,X},N}(Si);zo.prototype.bytesPerElement=4,sr("StructArrayLayout1ul4",zo);var wo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr){var Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,X,wt,Ft,Zt,ie,Be,Qe,yr,Cr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr){var an=X*10,gn=X*5;return this.int16[an+0]=wt,this.int16[an+1]=Ft,this.int16[an+2]=Zt,this.int16[an+3]=ie,this.int16[an+4]=Be,this.int16[an+5]=Qe,this.uint32[gn+3]=yr,this.uint16[an+8]=Cr,this.uint16[an+9]=Kr,X},N}(Si);wo.prototype.bytesPerElement=20,sr("StructArrayLayout6i1ul2ui20",wo);var wa=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,X,wt,Ft,Zt,ie,Be)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Be,this.int16[yr+5]=Qe,X},N}(Si);wa.prototype.bytesPerElement=12,sr("StructArrayLayout2i2i2i12",wa);var Fa=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie){var Be=this.length;return this.resize(Be+1),this.emplace(Be,X,wt,Ft,Zt,ie)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be){var Qe=X*4,yr=X*8;return this.float32[Qe+0]=wt,this.float32[Qe+1]=Ft,this.float32[Qe+2]=Zt,this.int16[yr+6]=ie,this.int16[yr+7]=Be,X},N}(Si);Fa.prototype.bytesPerElement=16,sr("StructArrayLayout2f1f2i16",Fa);var vo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Be=X*12,Qe=X*3;return this.uint8[Be+0]=wt,this.uint8[Be+1]=Ft,this.float32[Qe+1]=Zt,this.float32[Qe+2]=ie,X},N}(Si);vo.prototype.bytesPerElement=12,sr("StructArrayLayout2ub2f12",vo);var Co=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.uint16[ie+0]=wt,this.uint16[ie+1]=Ft,this.uint16[ie+2]=Zt,X},N}(Si);Co.prototype.bytesPerElement=6,sr("StructArrayLayout3ui6",Co);var rs=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta){var Ba=this.length;return this.resize(Ba+1),this.emplace(Ba,X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta,Ba){var ba=X*24,Xa=X*12,bo=X*48;return this.int16[ba+0]=wt,this.int16[ba+1]=Ft,this.uint16[ba+2]=Zt,this.uint16[ba+3]=ie,this.uint32[Xa+2]=Be,this.uint32[Xa+3]=Qe,this.uint32[Xa+4]=yr,this.uint16[ba+10]=Cr,this.uint16[ba+11]=Kr,this.uint16[ba+12]=an,this.float32[Xa+7]=gn,this.float32[Xa+8]=Rn,this.uint8[bo+36]=xi,this.uint8[bo+37]=ha,this.uint8[bo+38]=oa,this.uint32[Xa+10]=Ta,this.int16[ba+22]=Ba,X},N}(Si);rs.prototype.bytesPerElement=48,sr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",rs);var Vl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta,Ba,ba,Xa,bo,Vo,Ho,ws,ks,Bs,Ys,ll){var Rs=this.length;return this.resize(Rs+1),this.emplace(Rs,X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta,Ba,ba,Xa,bo,Vo,Ho,ws,ks,Bs,Ys,ll)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Be,Qe,yr,Cr,Kr,an,gn,Rn,xi,ha,oa,Ta,Ba,ba,Xa,bo,Vo,Ho,ws,ks,Bs,Ys,ll,Rs){var Hs=X*34,ju=X*17;return this.int16[Hs+0]=wt,this.int16[Hs+1]=Ft,this.int16[Hs+2]=Zt,this.int16[Hs+3]=ie,this.int16[Hs+4]=Be,this.int16[Hs+5]=Qe,this.int16[Hs+6]=yr,this.int16[Hs+7]=Cr,this.uint16[Hs+8]=Kr,this.uint16[Hs+9]=an,this.uint16[Hs+10]=gn,this.uint16[Hs+11]=Rn,this.uint16[Hs+12]=xi,this.uint16[Hs+13]=ha,this.uint16[Hs+14]=oa,this.uint16[Hs+15]=Ta,this.uint16[Hs+16]=Ba,this.uint16[Hs+17]=ba,this.uint16[Hs+18]=Xa,this.uint16[Hs+19]=bo,this.uint16[Hs+20]=Vo,this.uint16[Hs+21]=Ho,this.uint16[Hs+22]=ws,this.uint32[ju+12]=ks,this.float32[ju+13]=Bs,this.float32[ju+14]=Ys,this.float32[ju+15]=ll,this.float32[ju+16]=Rs,X},N}(Si);Vl.prototype.bytesPerElement=68,sr("StructArrayLayout8i15ui1ul4f68",Vl);var Al=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.float32[Ft+0]=wt,X},N}(Si);Al.prototype.bytesPerElement=4,sr("StructArrayLayout1f4",Al);var hs=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.int16[ie+0]=wt,this.int16[ie+1]=Ft,this.int16[ie+2]=Zt,X},N}(Si);hs.prototype.bytesPerElement=6,sr("StructArrayLayout3i6",hs);var Tu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*2,Be=X*4;return this.uint32[ie+0]=wt,this.uint16[Be+2]=Ft,this.uint16[Be+3]=Zt,X},N}(Si);Tu.prototype.bytesPerElement=8,sr("StructArrayLayout1ul2ui8",Tu);var dl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.uint16[Zt+0]=wt,this.uint16[Zt+1]=Ft,X},N}(Si);dl.prototype.bytesPerElement=4,sr("StructArrayLayout2ui4",dl);var Pu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint16[Ft+0]=wt,X},N}(Si);Pu.prototype.bytesPerElement=2,sr("StructArrayLayout1ui2",Pu);var pc=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Be=X*4;return this.float32[Be+0]=wt,this.float32[Be+1]=Ft,this.float32[Be+2]=Zt,this.float32[Be+3]=ie,X},N}(Si);pc.prototype.bytesPerElement=16,sr("StructArrayLayout4f16",pc);var yc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return X.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},X.x1.get=function(){return this._structArray.int16[this._pos2+2]},X.y1.get=function(){return this._structArray.int16[this._pos2+3]},X.x2.get=function(){return this._structArray.int16[this._pos2+4]},X.y2.get=function(){return this._structArray.int16[this._pos2+5]},X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(N.prototype,X),N}(dn);yc.prototype.size=20;var xu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new yc(this,X)},N}(wo);sr("CollisionBoxArray",xu);var pu=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},X.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},X.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},X.segment.get=function(){return this._structArray.uint16[this._pos2+10]},X.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},X.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},X.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},X.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},X.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},X.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},X.placedOrientation.set=function(wt){this._structArray.uint8[this._pos1+37]=wt},X.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},X.hidden.set=function(wt){this._structArray.uint8[this._pos1+38]=wt},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+10]=wt},X.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(N.prototype,X),N}(dn);pu.prototype.size=48;var Au=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new pu(this,X)},N}(rs);sr("PlacedSymbolArray",Au);var jo=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},X.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},X.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},X.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},X.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},X.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},X.key.get=function(){return this._structArray.uint16[this._pos2+8]},X.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},X.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},X.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},X.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},X.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},X.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},X.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},X.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},X.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},X.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},X.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},X.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},X.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+12]=wt},X.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},X.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},X.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},X.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(N.prototype,X),N}(dn);jo.prototype.size=68;var Mu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new jo(this,X)},N}(Vl);sr("SymbolInstanceArray",Mu);var sl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getoffsetX=function(X){return this.float32[X*1+0]},N}(Al);sr("GlyphOffsetArray",sl);var Iu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getx=function(X){return this.int16[X*3+0]},N.prototype.gety=function(X){return this.int16[X*3+1]},N.prototype.gettileUnitDistanceFromAnchor=function(X){return this.int16[X*3+2]},N}(hs);sr("SymbolLineVertexArray",Iu);var xc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(N.prototype,X),N}(dn);xc.prototype.size=8;var Lo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new xc(this,X)},N}(Tu);sr("FeatureIndexArray",Lo);var Cs=ai([{name:"a_pos",components:2,type:"Int16"}],4),Ml=Cs.members,yl=function(m){m===void 0&&(m=[]),this.segments=m};yl.prototype.prepareSegment=function(m,N,X,wt){var Ft=this.segments[this.segments.length-1];return m>yl.MAX_VERTEX_ARRAY_LENGTH&&q("Max vertices per segment is "+yl.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+m),(!Ft||Ft.vertexLength+m>yl.MAX_VERTEX_ARRAY_LENGTH||Ft.sortKey!==wt)&&(Ft={vertexOffset:N.length,primitiveOffset:X.length,vertexLength:0,primitiveLength:0},wt!==void 0&&(Ft.sortKey=wt),this.segments.push(Ft)),Ft},yl.prototype.get=function(){return this.segments},yl.prototype.destroy=function(){for(var m=0,N=this.segments;m>>16)*Qe&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr,ie=ie<<13|ie>>>19,Be=(ie&65535)*5+(((ie>>>16)*5&65535)<<16)&4294967295,ie=(Be&65535)+27492+(((Be>>>16)+58964&65535)<<16);switch(Cr=0,Ft){case 3:Cr^=(X.charCodeAt(Kr+2)&255)<<16;case 2:Cr^=(X.charCodeAt(Kr+1)&255)<<8;case 1:Cr^=X.charCodeAt(Kr)&255,Cr=(Cr&65535)*Qe+(((Cr>>>16)*Qe&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr}return ie^=X.length,ie^=ie>>>16,ie=(ie&65535)*2246822507+(((ie>>>16)*2246822507&65535)<<16)&4294967295,ie^=ie>>>13,ie=(ie&65535)*3266489909+(((ie>>>16)*3266489909&65535)<<16)&4294967295,ie^=ie>>>16,ie>>>0}m.exports=N}),xt=e(function(m){function N(X,wt){for(var Ft=X.length,Zt=wt^Ft,ie=0,Be;Ft>=4;)Be=X.charCodeAt(ie)&255|(X.charCodeAt(++ie)&255)<<8|(X.charCodeAt(++ie)&255)<<16|(X.charCodeAt(++ie)&255)<<24,Be=(Be&65535)*1540483477+(((Be>>>16)*1540483477&65535)<<16),Be^=Be>>>24,Be=(Be&65535)*1540483477+(((Be>>>16)*1540483477&65535)<<16),Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)^Be,Ft-=4,++ie;switch(Ft){case 3:Zt^=(X.charCodeAt(ie+2)&255)<<16;case 2:Zt^=(X.charCodeAt(ie+1)&255)<<8;case 1:Zt^=X.charCodeAt(ie)&255,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)}return Zt^=Zt>>>13,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16),Zt^=Zt>>>15,Zt>>>0}m.exports=N}),Vt=et,de=et,xe=xt;Vt.murmur3=de,Vt.murmur2=xe;var Yt=function(){this.ids=[],this.positions=[],this.indexed=!1};Yt.prototype.add=function(m,N,X,wt){this.ids.push(Ee(m)),this.positions.push(N,X,wt)},Yt.prototype.getPositions=function(m){for(var N=Ee(m),X=0,wt=this.ids.length-1;X>1;this.ids[Ft]>=N?wt=Ft:X=Ft+1}for(var Zt=[];this.ids[X]===N;){var ie=this.positions[3*X],Be=this.positions[3*X+1],Qe=this.positions[3*X+2];Zt.push({index:ie,start:Be,end:Qe}),X++}return Zt},Yt.serialize=function(m,N){var X=new Float64Array(m.ids),wt=new Uint32Array(m.positions);return ir(X,wt,0,X.length-1),N&&N.push(X.buffer,wt.buffer),{ids:X,positions:wt}},Yt.deserialize=function(m){var N=new Yt;return N.ids=m.ids,N.positions=m.positions,N.indexed=!0,N};var he=Math.pow(2,53)-1;function Ee(m){var N=+m;return!isNaN(N)&&N<=he?N:Vt(String(m))}function ir(m,N,X,wt){for(;X>1],Zt=X-1,ie=wt+1;;){do Zt++;while(m[Zt]Ft);if(Zt>=ie)break;Ye(m,Zt,ie),Ye(N,3*Zt,3*ie),Ye(N,3*Zt+1,3*ie+1),Ye(N,3*Zt+2,3*ie+2)}ie-Xie.x+1||Qeie.y+1)&&q("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return X}function Wl(m,N){return{type:m.type,id:m.id,properties:m.properties,geometry:N?pl(m):[]}}function _c(m,N,X,wt,Ft){m.emplaceBack(N*2+(wt+1)/2,X*2+(Ft+1)/2)}var Fs=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new Va,this.indexArray=new Co,this.segments=new yl,this.programConfigurations=new Oi(m.layers,m.zoom),this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Fs.prototype.populate=function(m,N,X){var wt=this.layers[0],Ft=[],Zt=null;wt.type==="circle"&&(Zt=wt.layout.get("circle-sort-key"));for(var ie=0,Be=m;ie=Zo||Kr<0||Kr>=Zo)){var an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,m.sortKey),gn=an.vertexLength;_c(this.layoutVertexArray,Cr,Kr,-1,-1),_c(this.layoutVertexArray,Cr,Kr,1,-1),_c(this.layoutVertexArray,Cr,Kr,1,1),_c(this.layoutVertexArray,Cr,Kr,-1,1),this.indexArray.emplaceBack(gn,gn+1,gn+2),this.indexArray.emplaceBack(gn,gn+3,gn+2),an.vertexLength+=4,an.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m,X,{},wt)},sr("CircleBucket",Fs,{omit:["layers"]});function Su(m,N){for(var X=0;X=3){for(var Zt=0;Zt1){if(Tp(m,N))return!0;for(var wt=0;wt1?m.distSqr(X):m.distSqr(X.sub(N)._mult(Ft)._add(N))}function Mp(m,N){for(var X=!1,wt,Ft,Zt,ie=0;ieN.y!=Zt.y>N.y&&N.x<(Zt.x-Ft.x)*(N.y-Ft.y)/(Zt.y-Ft.y)+Ft.x&&(X=!X)}return X}function Hd(m,N){for(var X=!1,wt=0,Ft=m.length-1;wtN.y!=ie.y>N.y&&N.x<(ie.x-Zt.x)*(N.y-Zt.y)/(ie.y-Zt.y)+Zt.x&&(X=!X)}return X}function tm(m,N,X,wt,Ft){for(var Zt=0,ie=m;Zt=Be.x&&Ft>=Be.y)return!0}var Qe=[new o(N,X),new o(N,Ft),new o(wt,Ft),new o(wt,X)];if(m.length>2)for(var yr=0,Cr=Qe;yrFt.x&&N.x>Ft.x||m.yFt.y&&N.y>Ft.y)return!1;var Zt=J(m,N,X[0]);return Zt!==J(m,N,X[1])||Zt!==J(m,N,X[2])||Zt!==J(m,N,X[3])}function Sp(m,N,X){var wt=N.paint.get(m).value;return wt.kind==="constant"?wt.value:X.programConfigurations.get(N.id).getMaxValue(m)}function Ep(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function tp(m,N,X,wt,Ft){if(!N[0]&&!N[1])return m;var Zt=o.convert(N)._mult(Ft);X==="viewport"&&Zt._rotate(-wt);for(var ie=[],Be=0;Be0&&(Zt=1/Math.sqrt(Zt)),m[0]=N[0]*Zt,m[1]=N[1]*Zt,m[2]=N[2]*Zt,m}function RT(m,N){return m[0]*N[0]+m[1]*N[1]+m[2]*N[2]}function NT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2],ie=X[0],Be=X[1],Qe=X[2];return m[0]=Ft*Qe-Zt*Be,m[1]=Zt*ie-wt*Qe,m[2]=wt*Be-Ft*ie,m}function jT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2];return m[0]=wt*X[0]+Ft*X[3]+Zt*X[6],m[1]=wt*X[1]+Ft*X[4]+Zt*X[7],m[2]=wt*X[2]+Ft*X[5]+Zt*X[8],m}var UT=_b;(function(){var m=Ax();return function(N,X,wt,Ft,Zt,ie){var Be,Qe;for(X||(X=3),wt||(wt=0),Ft?Qe=Math.min(Ft*X+wt,N.length):Qe=N.length,Be=wt;Bem.width||Ft.height>m.height||X.x>m.width-Ft.width||X.y>m.height-Ft.height)throw new RangeError("out of range source coordinates for image copy");if(Ft.width>N.width||Ft.height>N.height||wt.x>N.width-Ft.width||wt.y>N.height-Ft.height)throw new RangeError("out of range destination coordinates for image copy");for(var ie=m.data,Be=N.data,Qe=0;Qe80*X){Be=yr=m[0],Qe=Cr=m[1];for(var Rn=X;Rnyr&&(yr=Kr),an>Cr&&(Cr=an);gn=Math.max(yr-Be,Cr-Qe),gn=gn!==0?1/gn:0}return jg(Zt,ie,X,Be,Qe,gn),ie}function Tb(m,N,X,wt,Ft){var Zt,ie;if(Ft===Lb(m,N,X,wt)>0)for(Zt=N;Zt=N;Zt-=wt)ie=V3(Zt,m[Zt],m[Zt+1],ie);return ie&&Rv(ie,ie.next)&&(ey(ie),ie=ie.next),ie}function Tm(m,N){if(!m)return m;N||(N=m);var X=m,wt;do if(wt=!1,!X.steiner&&(Rv(X,X.next)||pf(X.prev,X,X.next)===0)){if(ey(X),X=N=X.prev,X===X.next)break;wt=!0}else X=X.next;while(wt||X!==N);return N}function jg(m,N,X,wt,Ft,Zt,ie){if(m){!ie&&Zt&&Mb(m,wt,Ft,Zt);for(var Be=m,Qe,yr;m.prev!==m.next;){if(Qe=m.prev,yr=m.next,Zt?GT(m,wt,Ft,Zt):Ab(m)){N.push(Qe.i/X),N.push(m.i/X),N.push(yr.i/X),ey(m),m=yr.next,Be=yr.next;continue}if(m=yr,m===Be){ie?ie===1?(m=YT(Tm(m),N,X),jg(m,N,X,wt,Ft,Zt,2)):ie===2&&N3(m,N,X,wt,Ft,Zt):jg(Tm(m),N,X,wt,Ft,Zt,1);break}}}}function Ab(m){var N=m.prev,X=m,wt=m.next;if(pf(N,X,wt)>=0)return!1;for(var Ft=m.next.next;Ft!==m.prev;){if(tg(N.x,N.y,X.x,X.y,wt.x,wt.y,Ft.x,Ft.y)&&pf(Ft.prev,Ft,Ft.next)>=0)return!1;Ft=Ft.next}return!0}function GT(m,N,X,wt){var Ft=m.prev,Zt=m,ie=m.next;if(pf(Ft,Zt,ie)>=0)return!1;for(var Be=Ft.xZt.x?Ft.x>ie.x?Ft.x:ie.x:Zt.x>ie.x?Zt.x:ie.x,Cr=Ft.y>Zt.y?Ft.y>ie.y?Ft.y:ie.y:Zt.y>ie.y?Zt.y:ie.y,Kr=Sb(Be,Qe,N,X,wt),an=Sb(yr,Cr,N,X,wt),gn=m.prevZ,Rn=m.nextZ;gn&&gn.z>=Kr&&Rn&&Rn.z<=an;){if(gn!==m.prev&&gn!==m.next&&tg(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0||(gn=gn.prevZ,Rn!==m.prev&&Rn!==m.next&&tg(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0))return!1;Rn=Rn.nextZ}for(;gn&&gn.z>=Kr;){if(gn!==m.prev&&gn!==m.next&&tg(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0)return!1;gn=gn.prevZ}for(;Rn&&Rn.z<=an;){if(Rn!==m.prev&&Rn!==m.next&&tg(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0)return!1;Rn=Rn.nextZ}return!0}function YT(m,N,X){var wt=m;do{var Ft=wt.prev,Zt=wt.next.next;!Rv(Ft,Zt)&&Ug(Ft,wt,wt.next,Zt)&&Nv(Ft,Zt)&&Nv(Zt,Ft)&&(N.push(Ft.i/X),N.push(wt.i/X),N.push(Zt.i/X),ey(wt),ey(wt.next),wt=m=Zt),wt=wt.next}while(wt!==m);return Tm(wt)}function N3(m,N,X,wt,Ft,Zt){var ie=m;do{for(var Be=ie.next.next;Be!==ie.prev;){if(ie.i!==Be.i&&XT(ie,Be)){var Qe=Cb(ie,Be);ie=Tm(ie,ie.next),Qe=Tm(Qe,Qe.next),jg(ie,N,X,wt,Ft,Zt),jg(Qe,N,X,wt,Ft,Zt);return}Be=Be.next}ie=ie.next}while(ie!==m)}function j3(m,N,X,wt){var Ft=[],Zt,ie,Be,Qe,yr;for(Zt=0,ie=N.length;Zt=X.next.y&&X.next.y!==X.y){var Be=X.x+(Ft-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(Be<=wt&&Be>Zt){if(Zt=Be,Be===wt){if(Ft===X.y)return X;if(Ft===X.next.y)return X.next}ie=X.x=X.x&&X.x>=yr&&wt!==X.x&&tg(Ftie.x||X.x===ie.x&&U3(ie,X)))&&(ie=X,Kr=an)),X=X.next;while(X!==Qe);return ie}function U3(m,N){return pf(m.prev,m,N.prev)<0&&pf(N.next,m,m.next)<0}function Mb(m,N,X,wt){var Ft=m;do Ft.z===null&&(Ft.z=Sb(Ft.x,Ft.y,N,X,wt)),Ft.prevZ=Ft.prev,Ft.nextZ=Ft.next,Ft=Ft.next;while(Ft!==m);Ft.prevZ.nextZ=null,Ft.prevZ=null,KT(Ft)}function KT(m){var N,X,wt,Ft,Zt,ie,Be,Qe,yr=1;do{for(X=m,m=null,Zt=null,ie=0;X;){for(ie++,wt=X,Be=0,N=0;N0||Qe>0&&wt;)Be!==0&&(Qe===0||!wt||X.z<=wt.z)?(Ft=X,X=X.nextZ,Be--):(Ft=wt,wt=wt.nextZ,Qe--),Zt?Zt.nextZ=Ft:m=Ft,Ft.prevZ=Zt,Zt=Ft;X=wt}Zt.nextZ=null,yr*=2}while(ie>1);return m}function Sb(m,N,X,wt,Ft){return m=32767*(m-X)*Ft,N=32767*(N-wt)*Ft,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,m|N<<1}function Ox(m){var N=m,X=m;do(N.x=0&&(m-ie)*(wt-Be)-(X-ie)*(N-Be)>=0&&(X-ie)*(Zt-Be)-(Ft-ie)*(wt-Be)>=0}function XT(m,N){return m.next.i!==N.i&&m.prev.i!==N.i&&!Eb(m,N)&&(Nv(m,N)&&Nv(N,m)&&Dx(m,N)&&(pf(m.prev,m,N.prev)||pf(m,N.prev,N))||Rv(m,N)&&pf(m.prev,m,m.next)>0&&pf(N.prev,N,N.next)>0)}function pf(m,N,X){return(N.y-m.y)*(X.x-N.x)-(N.x-m.x)*(X.y-N.y)}function Rv(m,N){return m.x===N.x&&m.y===N.y}function Ug(m,N,X,wt){var Ft=ty(pf(m,N,X)),Zt=ty(pf(m,N,wt)),ie=ty(pf(X,wt,m)),Be=ty(pf(X,wt,N));return!!(Ft!==Zt&&ie!==Be||Ft===0&&Q1(m,X,N)||Zt===0&&Q1(m,wt,N)||ie===0&&Q1(X,m,wt)||Be===0&&Q1(X,N,wt))}function Q1(m,N,X){return N.x<=Math.max(m.x,X.x)&&N.x>=Math.min(m.x,X.x)&&N.y<=Math.max(m.y,X.y)&&N.y>=Math.min(m.y,X.y)}function ty(m){return m>0?1:m<0?-1:0}function Eb(m,N){var X=m;do{if(X.i!==m.i&&X.next.i!==m.i&&X.i!==N.i&&X.next.i!==N.i&&Ug(X,X.next,m,N))return!0;X=X.next}while(X!==m);return!1}function Nv(m,N){return pf(m.prev,m,m.next)<0?pf(m,N,m.next)>=0&&pf(m,m.prev,N)>=0:pf(m,N,m.prev)<0||pf(m,m.next,N)<0}function Dx(m,N){var X=m,wt=!1,Ft=(m.x+N.x)/2,Zt=(m.y+N.y)/2;do X.y>Zt!=X.next.y>Zt&&X.next.y!==X.y&&Ft<(X.next.x-X.x)*(Zt-X.y)/(X.next.y-X.y)+X.x&&(wt=!wt),X=X.next;while(X!==m);return wt}function Cb(m,N){var X=new Fx(m.i,m.x,m.y),wt=new Fx(N.i,N.x,N.y),Ft=m.next,Zt=N.prev;return m.next=N,N.prev=m,X.next=Ft,Ft.prev=X,wt.next=X,X.prev=wt,Zt.next=wt,wt.prev=Zt,wt}function V3(m,N,X,wt){var Ft=new Fx(m,N,X);return wt?(Ft.next=wt.next,Ft.prev=wt,wt.next.prev=Ft,wt.next=Ft):(Ft.prev=Ft,Ft.next=Ft),Ft}function ey(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function Fx(m,N,X){this.i=m,this.x=N,this.y=X,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}zx.deviation=function(m,N,X,wt){var Ft=N&&N.length,Zt=Ft?N[0]*X:m.length,ie=Math.abs(Lb(m,0,Zt,X));if(Ft)for(var Be=0,Qe=N.length;Be0&&(wt+=m[Ft-1].length,X.holes.push(wt))}return X},Ix.default=R3;function JT(m,N,X,wt,Ft){H3(m,N,X,wt||m.length-1,Ft||Pb)}function H3(m,N,X,wt,Ft){for(;wt>X;){if(wt-X>600){var Zt=wt-X+1,ie=N-X+1,Be=Math.log(Zt),Qe=.5*Math.exp(2*Be/3),yr=.5*Math.sqrt(Be*Qe*(Zt-Qe)/Zt)*(ie-Zt/2<0?-1:1),Cr=Math.max(X,Math.floor(N-ie*Qe/Zt+yr)),Kr=Math.min(wt,Math.floor(N+(Zt-ie)*Qe/Zt+yr));H3(m,N,Cr,Kr,Ft)}var an=m[N],gn=X,Rn=wt;for(ry(m,X,N),Ft(m[wt],an)>0&&ry(m,X,wt);gn0;)Rn--}Ft(m[X],an)===0?ry(m,X,Rn):(Rn++,ry(m,Rn,wt)),Rn<=N&&(X=Rn+1),N<=Rn&&(wt=Rn-1)}}function ry(m,N,X){var wt=m[N];m[N]=m[X],m[X]=wt}function Pb(m,N){return mN?1:0}function rm(m,N){var X=m.length;if(X<=1)return[m];for(var wt=[],Ft,Zt,ie=0;ie1)for(var Qe=0;Qe>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),X===1&&(Be&&ie.push(Be),Be=[]),Be.push(new o(Ft,Zt));else if(X===7)Be&&Be.push(Be[0].clone());else throw new Error("unknown command "+X)}return Be&&ie.push(Be),ie},Vg.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var N=m.readVarint()+m.pos,X=1,wt=0,Ft=0,Zt=0,ie=1/0,Be=-1/0,Qe=1/0,yr=-1/0;m.pos>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),FtBe&&(Be=Ft),Ztyr&&(yr=Zt);else if(X!==7)throw new Error("unknown command "+X)}return[ie,Qe,Be,yr]},Vg.prototype.toGeoJSON=function(m,N,X){var wt=this.extent*Math.pow(2,X),Ft=this.extent*m,Zt=this.extent*N,ie=this.loadGeometry(),Be=Vg.types[this.type],Qe,yr;function Cr(gn){for(var Rn=0;Rn>3;N=wt===1?m.readString():wt===2?m.readFloat():wt===3?m.readDouble():wt===4?m.readVarint64():wt===5?m.readVarint():wt===6?m.readSVarint():wt===7?m.readBoolean():null}return N}J3.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var N=this._pbf.readVarint()+this._pbf.pos;return new jv(this._pbf,N,this.extent,this._keys,this._values)};var t5=e5;function e5(m,N){this.layers=m.readFields(r5,{},N)}function r5(m,N,X){if(m===3){var wt=new Ob(X,X.readVarint()+X.pos);wt.length&&(N[wt.name]=wt)}}var n5=t5,QT=jv,t8=Ob,Hg={VectorTile:n5,VectorTileFeature:QT,VectorTileLayer:t8},Uv=Hg.VectorTileFeature.types,i5=500,Vv=Math.pow(2,13);function Hv(m,N,X,wt,Ft,Zt,ie,Be){m.emplaceBack(N,X,Math.floor(wt*Vv)*2+ie,Ft*Vv*2,Zt*Vv*2,Math.round(Be))}var Up=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new oi,this.indexArray=new Co,this.programConfigurations=new Oi(m.layers,m.zoom),this.segments=new yl,this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Up.prototype.populate=function(m,N,X){this.features=[],this.hasPattern=Bx("fill-extrusion",this.layers,N);for(var wt=0,Ft=m;wt=1){var Ba=xi[oa-1];if(!Nx(Ta,Ba)){an.vertexLength+4>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ba=Ta.sub(Ba)._perp()._unit(),Xa=Ba.dist(Ta);ha+Xa>32768&&(ha=0),Hv(this.layoutVertexArray,Ta.x,Ta.y,ba.x,ba.y,0,0,ha),Hv(this.layoutVertexArray,Ta.x,Ta.y,ba.x,ba.y,0,1,ha),ha+=Xa,Hv(this.layoutVertexArray,Ba.x,Ba.y,ba.x,ba.y,0,0,ha),Hv(this.layoutVertexArray,Ba.x,Ba.y,ba.x,ba.y,0,1,ha);var bo=an.vertexLength;this.indexArray.emplaceBack(bo,bo+2,bo+1),this.indexArray.emplaceBack(bo+1,bo+2,bo+3),an.vertexLength+=4,an.primitiveLength+=2}}}}if(an.vertexLength+Qe>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(Qe,this.layoutVertexArray,this.indexArray)),Uv[m.type]==="Polygon"){for(var Vo=[],Ho=[],ws=an.vertexLength,ks=0,Bs=Be;ksZo)||m.y===N.y&&(m.y<0||m.y>Zo)}function jx(m){return m.every(function(N){return N.x<0})||m.every(function(N){return N.x>Zo})||m.every(function(N){return N.y<0})||m.every(function(N){return N.y>Zo})}var e8=new Za({"fill-extrusion-opacity":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new li(Pa["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ta(Pa["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new li(Pa["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new li(Pa["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),r8={paint:e8},n8=function(m){function N(X){m.call(this,X,r8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.createBucket=function(X){return new Up(X)},N.prototype.queryRadius=function(){return Ep(this.paint.get("fill-extrusion-translate"))},N.prototype.is3D=function(){return!0},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Be,Qe,yr){var Cr=tp(X,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Be.angle,Qe),Kr=this.paint.get("fill-extrusion-height").evaluate(wt,Ft),an=this.paint.get("fill-extrusion-base").evaluate(wt,Ft),gn=a5(Cr,yr,Be,0),Rn=Db(Zt,an,Kr,yr),xi=Rn[0],ha=Rn[1];return rg(xi,ha,gn)},N}(ia);function nm(m,N){return m.x*N.x+m.y*N.y}function Id(m,N){if(m.length===1){for(var X=0,wt=N[X++],Ft;!Ft||wt.equals(Ft);)if(Ft=N[X++],!Ft)return 1/0;for(;X=2&&m[Qe-1].equals(m[Qe-2]);)Qe--;for(var yr=0;yr0;if(Vo&&oa>yr){var ws=an.dist(gn);if(ws>2*Cr){var ks=an.sub(an.sub(gn)._mult(Cr/ws)._round());this.updateDistance(gn,ks),this.addCurrentVertex(ks,xi,0,0,Kr),gn=ks}}var Bs=gn&&Rn,Ys=Bs?X:Be?"butt":wt;if(Bs&&Ys==="round"&&(XaFt&&(Ys="bevel"),Ys==="bevel"&&(Xa>2&&(Ys="flipbevel"),Xa100)Ta=ha.mult(-1);else{var ll=Xa*xi.add(ha).mag()/xi.sub(ha).mag();Ta._perp()._mult(ll*(Ho?-1:1))}this.addCurrentVertex(an,Ta,0,0,Kr),this.addCurrentVertex(an,Ta.mult(-1),0,0,Kr)}else if(Ys==="bevel"||Ys==="fakeround"){var Rs=-Math.sqrt(Xa*Xa-1),Hs=Ho?Rs:0,ju=Ho?0:Rs;if(gn&&this.addCurrentVertex(an,xi,Hs,ju,Kr),Ys==="fakeround")for(var Oc=Math.round(bo*180/Math.PI/Rb),fh=1;fh2*Cr){var ad=an.add(Rn.sub(an)._mult(Cr/Gd)._round());this.updateDistance(an,ad),this.addCurrentVertex(ad,ha,0,0,Kr),an=ad}}}}},qd.prototype.addCurrentVertex=function(m,N,X,wt,Ft,Zt){Zt===void 0&&(Zt=!1);var ie=N.x+N.y*X,Be=N.y-N.x*X,Qe=-N.x+N.y*wt,yr=-N.y-N.x*wt;this.addHalfVertex(m,ie,Be,Zt,!1,X,Ft),this.addHalfVertex(m,Qe,yr,Zt,!0,-wt,Ft),this.distance>Ux/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(m,N,X,wt,Ft,Zt))},qd.prototype.addHalfVertex=function(m,N,X,wt,Ft,Zt,ie){var Be=m.x,Qe=m.y,yr=this.lineClips?this.scaledDistance*(Ux-1):this.scaledDistance,Cr=yr*Wv;if(this.layoutVertexArray.emplaceBack((Be<<1)+(wt?1:0),(Qe<<1)+(Ft?1:0),Math.round(u5*N)+128,Math.round(u5*X)+128,(Zt===0?0:Zt<0?-1:1)+1|(Cr&63)<<2,Cr>>6),this.lineClips){var Kr=this.scaledDistance-this.lineClips.start,an=this.lineClips.end-this.lineClips.start,gn=Kr/an;this.layoutVertexArray2.emplaceBack(gn,this.lineClipsArray.length)}var Rn=ie.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rn),ie.primitiveLength++),Ft?this.e2=Rn:this.e1=Rn},qd.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},qd.prototype.updateDistance=function(m,N){this.distance+=m.dist(N),this.updateScaledDistance()},sr("LineBucket",qd,{omit:["layers","patternFeatures"]});var Nb=new Za({"line-cap":new yn(Pa.layout_line["line-cap"]),"line-join":new li(Pa.layout_line["line-join"]),"line-miter-limit":new yn(Pa.layout_line["line-miter-limit"]),"line-round-limit":new yn(Pa.layout_line["line-round-limit"]),"line-sort-key":new li(Pa.layout_line["line-sort-key"])}),Vx=new Za({"line-opacity":new li(Pa.paint_line["line-opacity"]),"line-color":new li(Pa.paint_line["line-color"]),"line-translate":new yn(Pa.paint_line["line-translate"]),"line-translate-anchor":new yn(Pa.paint_line["line-translate-anchor"]),"line-width":new li(Pa.paint_line["line-width"]),"line-gap-width":new li(Pa.paint_line["line-gap-width"]),"line-offset":new li(Pa.paint_line["line-offset"]),"line-blur":new li(Pa.paint_line["line-blur"]),"line-dasharray":new Gi(Pa.paint_line["line-dasharray"]),"line-pattern":new ta(Pa.paint_line["line-pattern"]),"line-gradient":new _a(Pa.paint_line["line-gradient"])}),qv={paint:Vx,layout:Nb},jb=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.possiblyEvaluate=function(X,wt){return wt=new Ul(Math.floor(wt.zoom),{now:wt.now,fadeDuration:wt.fadeDuration,zoomHistory:wt.zoomHistory,transition:wt.transition}),m.prototype.possiblyEvaluate.call(this,X,wt)},N.prototype.evaluate=function(X,wt,Ft,Zt){return wt=C({},wt,{zoom:Math.floor(wt.zoom)}),m.prototype.evaluate.call(this,X,wt,Ft,Zt)},N}(li),Hx=new jb(qv.paint.properties["line-width"].specification);Hx.useIntegerZoom=!0;var Ub=function(m){function N(X){m.call(this,X,qv),this.gradientVersion=0}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._handleSpecialPaintPropertyUpdate=function(X){if(X==="line-gradient"){var wt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=wt._styleExpression.expression instanceof Uc,this.gradientVersion=(this.gradientVersion+1)%x}},N.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},N.prototype.recalculate=function(X,wt){m.prototype.recalculate.call(this,X,wt),this.paint._values["line-floorwidth"]=Hx.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,X)},N.prototype.createBucket=function(X){return new qd(X)},N.prototype.queryRadius=function(X){var wt=X,Ft=f5(Sp("line-width",this,wt),Sp("line-gap-width",this,wt)),Zt=Sp("line-offset",this,wt);return Ft/2+Math.abs(Zt)+Ep(this.paint.get("line-translate"))},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Be,Qe){var yr=tp(X,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Be.angle,Qe),Cr=Qe/2*f5(this.paint.get("line-width").evaluate(wt,Ft),this.paint.get("line-gap-width").evaluate(wt,Ft)),Kr=this.paint.get("line-offset").evaluate(wt,Ft);return Kr&&(Zt=G(Zt,Kr*Qe)),jp(yr,Zt,Cr)},N.prototype.isTileClipped=function(){return!0},N}(ia);function f5(m,N){return N>0?N+2*m:m}function G(m,N){for(var X=[],wt=new o(0,0),Ft=0;Ft":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xr(m){for(var N="",X=0;X>1,Cr=-7,Kr=X?Ft-1:0,an=X?-1:1,gn=m[N+Kr];for(Kr+=an,Zt=gn&(1<<-Cr)-1,gn>>=-Cr,Cr+=Be;Cr>0;Zt=Zt*256+m[N+Kr],Kr+=an,Cr-=8);for(ie=Zt&(1<<-Cr)-1,Zt>>=-Cr,Cr+=wt;Cr>0;ie=ie*256+m[N+Kr],Kr+=an,Cr-=8);if(Zt===0)Zt=1-yr;else{if(Zt===Qe)return ie?NaN:(gn?-1:1)*(1/0);ie=ie+Math.pow(2,wt),Zt=Zt-yr}return(gn?-1:1)*ie*Math.pow(2,Zt-wt)},ln=function(m,N,X,wt,Ft,Zt){var ie,Be,Qe,yr=Zt*8-Ft-1,Cr=(1<>1,an=Ft===23?Math.pow(2,-24)-Math.pow(2,-77):0,gn=wt?0:Zt-1,Rn=wt?1:-1,xi=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(Be=isNaN(N)?1:0,ie=Cr):(ie=Math.floor(Math.log(N)/Math.LN2),N*(Qe=Math.pow(2,-ie))<1&&(ie--,Qe*=2),ie+Kr>=1?N+=an/Qe:N+=an*Math.pow(2,1-Kr),N*Qe>=2&&(ie++,Qe/=2),ie+Kr>=Cr?(Be=0,ie=Cr):ie+Kr>=1?(Be=(N*Qe-1)*Math.pow(2,Ft),ie=ie+Kr):(Be=N*Math.pow(2,Kr-1)*Math.pow(2,Ft),ie=0));Ft>=8;m[X+gn]=Be&255,gn+=Rn,Be/=256,Ft-=8);for(ie=ie<0;m[X+gn]=ie&255,gn+=Rn,ie/=256,yr-=8);m[X+gn-Rn]|=xi*128},bn={read:Zr,write:ln},Ln=Kn;function Kn(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Kn.Varint=0,Kn.Fixed64=1,Kn.Bytes=2,Kn.Fixed32=5;var Ci=65536*65536,Sa=1/Ci,ra=12,ya=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Kn.prototype={destroy:function(){this.buf=null},readFields:function(m,N,X){for(X=X||this.length;this.pos>3,Zt=this.pos;this.type=wt&7,m(Ft,N,this),this.pos===Zt&&this.skip(wt)}return N},readMessage:function(m,N){return this.readFields(m,N,this.readVarint()+this.pos)},readFixed32:function(){var m=Cp(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=ed(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Cp(this.buf,this.pos)+Cp(this.buf,this.pos+4)*Ci;return this.pos+=8,m},readSFixed64:function(){var m=Cp(this.buf,this.pos)+ed(this.buf,this.pos+4)*Ci;return this.pos+=8,m},readFloat:function(){var m=bn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=bn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var N=this.buf,X,wt;return wt=N[this.pos++],X=wt&127,wt<128||(wt=N[this.pos++],X|=(wt&127)<<7,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<14,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<21,wt<128)?X:(wt=N[this.pos],X|=(wt&15)<<28,Ya(X,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,N=this.pos;return this.pos=m,m-N>=ra&&ya?mp(this.buf,N,m):pp(this.buf,N,m)},readBytes:function(){var m=this.readVarint()+this.pos,N=this.buf.subarray(this.pos,m);return this.pos=m,N},readPackedVarint:function(m,N){if(this.type!==Kn.Bytes)return m.push(this.readVarint(N));var X=Ao(this);for(m=m||[];this.pos127;);else if(N===Kn.Bytes)this.pos=this.readVarint()+this.pos;else if(N===Kn.Fixed32)this.pos+=4;else if(N===Kn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+N)},writeTag:function(m,N){this.writeVarint(m<<3|N)},realloc:function(m){for(var N=this.length||16;N268435455||m<0){Sl(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var N=this.pos;this.pos=gp(this.buf,m,this.pos);var X=this.pos-N;X>=128&&Xs(N,X,this),this.pos=N-1,this.writeVarint(X),this.pos+=X},writeFloat:function(m){this.realloc(4),bn.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),bn.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var N=m.length;this.writeVarint(N),this.realloc(N);for(var X=0;X=128&&Xs(X,wt,this),this.pos=X-1,this.writeVarint(wt),this.pos+=wt},writeMessage:function(m,N,X){this.writeTag(m,Kn.Bytes),this.writeRawMessage(N,X)},writePackedVarint:function(m,N){N.length&&this.writeMessage(m,js,N)},writePackedSVarint:function(m,N){N.length&&this.writeMessage(m,Os,N)},writePackedBoolean:function(m,N){N.length&&this.writeMessage(m,Js,N)},writePackedFloat:function(m,N){N.length&&this.writeMessage(m,co,N)},writePackedDouble:function(m,N){N.length&&this.writeMessage(m,il,N)},writePackedFixed32:function(m,N){N.length&&this.writeMessage(m,Zl,N)},writePackedSFixed32:function(m,N){N.length&&this.writeMessage(m,ch,N)},writePackedFixed64:function(m,N){N.length&&this.writeMessage(m,nh,N)},writePackedSFixed64:function(m,N){N.length&&this.writeMessage(m,gd,N)},writeBytesField:function(m,N){this.writeTag(m,Kn.Bytes),this.writeBytes(N)},writeFixed32Field:function(m,N){this.writeTag(m,Kn.Fixed32),this.writeFixed32(N)},writeSFixed32Field:function(m,N){this.writeTag(m,Kn.Fixed32),this.writeSFixed32(N)},writeFixed64Field:function(m,N){this.writeTag(m,Kn.Fixed64),this.writeFixed64(N)},writeSFixed64Field:function(m,N){this.writeTag(m,Kn.Fixed64),this.writeSFixed64(N)},writeVarintField:function(m,N){this.writeTag(m,Kn.Varint),this.writeVarint(N)},writeSVarintField:function(m,N){this.writeTag(m,Kn.Varint),this.writeSVarint(N)},writeStringField:function(m,N){this.writeTag(m,Kn.Bytes),this.writeString(N)},writeFloatField:function(m,N){this.writeTag(m,Kn.Fixed32),this.writeFloat(N)},writeDoubleField:function(m,N){this.writeTag(m,Kn.Fixed64),this.writeDouble(N)},writeBooleanField:function(m,N){this.writeVarintField(m,!!N)}};function Ya(m,N,X){var wt=X.buf,Ft,Zt;if(Zt=wt[X.pos++],Ft=(Zt&112)>>4,Zt<128||(Zt=wt[X.pos++],Ft|=(Zt&127)<<3,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<10,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<17,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<24,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&1)<<31,Zt<128))return Ss(m,Ft,N);throw new Error("Expected varint not more than 10 bytes")}function Ao(m){return m.type===Kn.Bytes?m.readVarint()+m.pos:m.pos+1}function Ss(m,N,X){return X?N*4294967296+(m>>>0):(N>>>0)*4294967296+(m>>>0)}function Sl(m,N){var X,wt;if(m>=0?(X=m%4294967296|0,wt=m/4294967296|0):(X=~(-m%4294967296),wt=~(-m/4294967296),X^4294967295?X=X+1|0:(X=0,wt=wt+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");N.realloc(10),_s(X,wt,N),fs(wt,N)}function _s(m,N,X){X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos]=m&127}function fs(m,N){var X=(m&7)<<4;N.buf[N.pos++]|=X|((m>>>=3)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127)))))}function Xs(m,N,X){var wt=N<=16383?1:N<=2097151?2:N<=268435455?3:Math.floor(Math.log(N)/(Math.LN2*7));X.realloc(wt);for(var Ft=X.pos-1;Ft>=m;Ft--)X.buf[Ft+wt]=X.buf[Ft]}function js(m,N){for(var X=0;X>>8,m[X+2]=N>>>16,m[X+3]=N>>>24}function ed(m,N){return(m[N]|m[N+1]<<8|m[N+2]<<16)+(m[N+3]<<24)}function pp(m,N,X){for(var wt="",Ft=N;Ft239?4:Zt>223?3:Zt>191?2:1;if(Ft+Be>X)break;var Qe,yr,Cr;Be===1?Zt<128&&(ie=Zt):Be===2?(Qe=m[Ft+1],(Qe&192)===128&&(ie=(Zt&31)<<6|Qe&63,ie<=127&&(ie=null))):Be===3?(Qe=m[Ft+1],yr=m[Ft+2],(Qe&192)===128&&(yr&192)===128&&(ie=(Zt&15)<<12|(Qe&63)<<6|yr&63,(ie<=2047||ie>=55296&&ie<=57343)&&(ie=null))):Be===4&&(Qe=m[Ft+1],yr=m[Ft+2],Cr=m[Ft+3],(Qe&192)===128&&(yr&192)===128&&(Cr&192)===128&&(ie=(Zt&15)<<18|(Qe&63)<<12|(yr&63)<<6|Cr&63,(ie<=65535||ie>=1114112)&&(ie=null))),ie===null?(ie=65533,Be=1):ie>65535&&(ie-=65536,wt+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|ie&1023),wt+=String.fromCharCode(ie),Ft+=Be}return wt}function mp(m,N,X){return ya.decode(m.subarray(N,X))}function gp(m,N,X){for(var wt=0,Ft,Zt;wt55295&&Ft<57344)if(Zt)if(Ft<56320){m[X++]=239,m[X++]=191,m[X++]=189,Zt=Ft;continue}else Ft=Zt-55296<<10|Ft-56320|65536,Zt=null;else{Ft>56319||wt+1===N.length?(m[X++]=239,m[X++]=191,m[X++]=189):Zt=Ft;continue}else Zt&&(m[X++]=239,m[X++]=191,m[X++]=189,Zt=null);Ft<128?m[X++]=Ft:(Ft<2048?m[X++]=Ft>>6|192:(Ft<65536?m[X++]=Ft>>12|224:(m[X++]=Ft>>18|240,m[X++]=Ft>>12&63|128),m[X++]=Ft>>6&63|128),m[X++]=Ft&63|128)}return X}var sf=3;function vd(m,N,X){m===1&&X.readMessage(ep,N)}function ep(m,N,X){if(m===3){var wt=X.readMessage($d,{}),Ft=wt.id,Zt=wt.bitmap,ie=wt.width,Be=wt.height,Qe=wt.left,yr=wt.top,Cr=wt.advance;N.push({id:Ft,bitmap:new td({width:ie+2*sf,height:Be+2*sf},Zt),metrics:{width:ie,height:Be,left:Qe,top:yr,advance:Cr}})}}function $d(m,N,X){m===1?N.id=X.readVarint():m===2?N.bitmap=X.readBytes():m===3?N.width=X.readVarint():m===4?N.height=X.readVarint():m===5?N.left=X.readSVarint():m===6?N.top=X.readSVarint():m===7&&(N.advance=X.readVarint())}function vp(m){return new Ln(m).readFields(vd,[])}var zd=sf;function Vp(m){for(var N=0,X=0,wt=0,Ft=m;wt=0;gn--){var Rn=Be[gn];if(!(an.w>Rn.w||an.h>Rn.h)){if(an.x=Rn.x,an.y=Rn.y,yr=Math.max(yr,an.y+an.h),Qe=Math.max(Qe,an.x+an.w),an.w===Rn.w&&an.h===Rn.h){var xi=Be.pop();gn=0&&wt>=m&&Hp[this.text.charCodeAt(wt)];wt--)X--;this.text=this.text.substring(m,X),this.sectionIndex=this.sectionIndex.slice(m,X)},hh.prototype.substring=function(m,N){var X=new hh;return X.text=this.text.substring(m,N),X.sectionIndex=this.sectionIndex.slice(m,N),X.sections=this.sections,X},hh.prototype.toString=function(){return this.text},hh.prototype.getMaxScale=function(){var m=this;return this.sectionIndex.reduce(function(N,X){return Math.max(N,m.sections[X].scale)},0)},hh.prototype.addTextSection=function(m,N){this.text+=m.text,this.sections.push(rp.forText(m.scale,m.fontStack||N));for(var X=this.sections.length-1,wt=0;wt=V0?null:++this.imageSectionID:(this.imageSectionID=U0,this.imageSectionID)};function Od(m,N){for(var X=[],wt=m.text,Ft=0,Zt=0,ie=N;Zt=0,Cr=0,Kr=0;Kr0&&ih>ws&&(ws=ih)}else{var Of=X[Bs.fontStack],Gd=Of&&Of[ll];if(Gd&&Gd.rect)ju=Gd.rect,Hs=Gd.metrics;else{var ad=N[Bs.fontStack],xp=ad&&ad[ll];if(!xp)continue;Hs=xp.metrics}Rs=(Xa-Bs.scale)*Lr}Xu?(m.verticalizable=!0,Ho.push({glyph:ll,imageName:Oc,x:an,y:gn+Rs,vertical:Xu,scale:Bs.scale,fontStack:Bs.fontStack,sectionIndex:Ys,metrics:Hs,rect:ju}),an+=fh*Bs.scale+yr):(Ho.push({glyph:ll,imageName:Oc,x:an,y:gn+Rs,vertical:Xu,scale:Bs.scale,fontStack:Bs.fontStack,sectionIndex:Ys,metrics:Hs,rect:ju}),an+=Hs.advance*Bs.scale+yr)}if(Ho.length!==0){var _p=an-yr;Rn=Math.max(_p,Rn),o8(Ho,0,Ho.length-1,ha,ws)}an=0;var bp=Zt*Xa+ws;Vo.lineOffset=Math.max(ws,bo),gn+=bp,xi=Math.max(bp,xi),++oa}var Fd=gn-Ah,Lp=Zb(ie),Pp=Lp.horizontalAlign,yd=Lp.verticalAlign;s8(m.positionedLines,ha,Pp,yd,Rn,xi,Zt,Fd,Ft.length),m.top+=-yd*Fd,m.bottom=m.top+Fd,m.left+=-Pp*Rn,m.right=m.left+Rn}function o8(m,N,X,wt,Ft){if(!(!wt&&!Ft))for(var Zt=m[X],ie=Zt.metrics.advance*Zt.scale,Be=(m[X].x+ie)*wt,Qe=N;Qe<=X;Qe++)m[Qe].x-=Be,m[Qe].y+=Ft}function s8(m,N,X,wt,Ft,Zt,ie,Be,Qe){var yr=(N-X)*Ft,Cr=0;Zt!==ie?Cr=-Be*wt-Ah:Cr=(-wt*Qe+.5)*ie;for(var Kr=0,an=m;Kr-X/2;){if(ie--,ie<0)return!1;Be-=m[ie].dist(Zt),Zt=m[ie]}Be+=m[ie].dist(m[ie+1]),ie++;for(var Qe=[],yr=0;Bewt;)yr-=Qe.shift().angleDelta;if(yr>Ft)return!1;ie++,Be+=Kr.dist(an)}return!0}function Zd(m){for(var N=0,X=0;Xyr){var Rn=(yr-Qe)/gn,xi=wu(Kr.x,an.x,Rn),ha=wu(Kr.y,an.y,Rn),oa=new Zv(xi,ha,an.angleTo(Kr),Cr);return oa._round(),!ie||m5(m,oa,Be,ie,N)?oa:void 0}Qe+=gn}}function Wg(m,N,X,wt,Ft,Zt,ie,Be,Qe){var yr=Wp(wt,Zt,ie),Cr=ng(wt,Ft),Kr=Cr*ie,an=m[0].x===0||m[0].x===Qe||m[0].y===0||m[0].y===Qe;N-Kr=0&&ba=0&&Xa=0&&an+yr<=Cr){var bo=new Zv(ba,Xa,Ta,Rn);bo._round(),(!wt||m5(m,bo,Zt,wt,Ft))&&gn.push(bo)}}Kr+=oa}return!Be&&!gn.length&&!ie&&(gn=W0(m,Kr/2,X,wt,Ft,Zt,ie,!0,Qe)),gn}function dC(m,N,X,wt,Ft){for(var Zt=[],ie=0;ie=wt&&Kr.x>=wt)&&(Cr.x>=wt?Cr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round():Kr.x>=wt&&(Kr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round()),!(Cr.y>=Ft&&Kr.y>=Ft)&&(Cr.y>=Ft?Cr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round():Kr.y>=Ft&&(Kr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round()),(!Qe||!Cr.equals(Qe[Qe.length-1]))&&(Qe=[Cr],Zt.push(Qe)),Qe.push(Kr)))))}return Zt}var qx=Th;function pC(m,N,X,wt){var Ft=[],Zt=m.image,ie=Zt.pixelRatio,Be=Zt.paddedRect.w-2*qx,Qe=Zt.paddedRect.h-2*qx,yr=m.right-m.left,Cr=m.bottom-m.top,Kr=Zt.stretchX||[[0,Be]],an=Zt.stretchY||[[0,Qe]],gn=function(Dc,Uu){return Dc+Uu[1]-Uu[0]},Rn=Kr.reduce(gn,0),xi=an.reduce(gn,0),ha=Be-Rn,oa=Qe-xi,Ta=0,Ba=Rn,ba=0,Xa=xi,bo=0,Vo=ha,Ho=0,ws=oa;if(Zt.content&&wt){var ks=Zt.content;Ta=g5(Kr,0,ks[0]),ba=g5(an,0,ks[1]),Ba=g5(Kr,ks[0],ks[2]),Xa=g5(an,ks[1],ks[3]),bo=ks[0]-Ta,Ho=ks[1]-ba,Vo=ks[2]-ks[0]-Ba,ws=ks[3]-ks[1]-Xa}var Bs=function(Dc,Uu,Fh,ih){var Of=v5(Dc.stretch-Ta,Ba,yr,m.left),Gd=y5(Dc.fixed-bo,Vo,Dc.stretch,Rn),ad=v5(Uu.stretch-ba,Xa,Cr,m.top),xp=y5(Uu.fixed-Ho,ws,Uu.stretch,xi),_p=v5(Fh.stretch-Ta,Ba,yr,m.left),bp=y5(Fh.fixed-bo,Vo,Fh.stretch,Rn),Fd=v5(ih.stretch-ba,Xa,Cr,m.top),Lp=y5(ih.fixed-Ho,ws,ih.stretch,xi),Pp=new o(Of,ad),yd=new o(_p,ad),Ip=new o(_p,Fd),T0=new o(Of,Fd),Zg=new o(Gd/ie,xp/ie),Xv=new o(bp/ie,Lp/ie),Jv=N*Math.PI/180;if(Jv){var Qv=Math.sin(Jv),Qx=Math.cos(Jv),im=[Qx,-Qv,Qv,Qx];Pp._matMult(im),yd._matMult(im),T0._matMult(im),Ip._matMult(im)}var T5=Dc.stretch+Dc.fixed,v8=Fh.stretch+Fh.fixed,A5=Uu.stretch+Uu.fixed,y8=ih.stretch+ih.fixed,q0={x:Zt.paddedRect.x+qx+T5,y:Zt.paddedRect.y+qx+A5,w:v8-T5,h:y8-A5},t_=Vo/ie/yr,M5=ws/ie/Cr;return{tl:Pp,tr:yd,bl:T0,br:Ip,tex:q0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zg,pixelOffsetBR:Xv,minFontScaleX:t_,minFontScaleY:M5,isSDF:X}};if(!wt||!Zt.stretchX&&!Zt.stretchY)Ft.push(Bs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Be+1},{fixed:0,stretch:Qe+1}));else for(var Ys=mC(Kr,ha,Rn),ll=mC(an,oa,xi),Rs=0;Rs0&&(gn=Math.max(10,gn),this.circleDiameter=gn)}else{var Rn=Zt.top*ie-Be,xi=Zt.bottom*ie+Be,ha=Zt.left*ie-Be,oa=Zt.right*ie+Be,Ta=Zt.collisionPadding;if(Ta&&(ha-=Ta[0]*ie,Rn-=Ta[1]*ie,oa+=Ta[2]*ie,xi+=Ta[3]*ie),yr){var Ba=new o(ha,Rn),ba=new o(oa,Rn),Xa=new o(ha,xi),bo=new o(oa,xi),Vo=yr*Math.PI/180;Ba._rotate(Vo),ba._rotate(Vo),Xa._rotate(Vo),bo._rotate(Vo),ha=Math.min(Ba.x,ba.x,Xa.x,bo.x),oa=Math.max(Ba.x,ba.x,Xa.x,bo.x),Rn=Math.min(Ba.y,ba.y,Xa.y,bo.y),xi=Math.max(Ba.y,ba.y,Xa.y,bo.y)}m.emplaceBack(N.x,N.y,ha,Rn,oa,xi,X,wt,Ft)}this.boxEndIndex=m.length},$x=function(m,N){if(m===void 0&&(m=[]),N===void 0&&(N=qZ),this.data=m,this.length=this.data.length,this.compare=N,this.length>0)for(var X=(this.length>>1)-1;X>=0;X--)this._down(X)};$x.prototype.push=function(m){this.data.push(m),this.length++,this._up(this.length-1)},$x.prototype.pop=function(){if(this.length!==0){var m=this.data[0],N=this.data.pop();return this.length--,this.length>0&&(this.data[0]=N,this._down(0)),m}},$x.prototype.peek=function(){return this.data[0]},$x.prototype._up=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=X[m];m>0;){var Zt=m-1>>1,ie=X[Zt];if(wt(Ft,ie)>=0)break;X[m]=ie,m=Zt}X[m]=Ft},$x.prototype._down=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=this.length>>1,Zt=X[m];m=0)break;X[m]=Be,m=ie}X[m]=Zt};function qZ(m,N){return mN?1:0}function $Z(m,N,X){X===void 0&&(X=!1);for(var wt=1/0,Ft=1/0,Zt=-1/0,ie=-1/0,Be=m[0],Qe=0;QeZt)&&(Zt=yr.x),(!Qe||yr.y>ie)&&(ie=yr.y)}var Cr=Zt-wt,Kr=ie-Ft,an=Math.min(Cr,Kr),gn=an/2,Rn=new $x([],ZZ);if(an===0)return new o(wt,Ft);for(var xi=wt;xioa.d||!oa.d)&&(oa=Ba,X&&console.log("found best %d after %d probes",Math.round(1e4*Ba.d)/1e4,Ta)),!(Ba.max-oa.d<=N)&&(gn=Ba.h/2,Rn.push(new Zx(Ba.p.x-gn,Ba.p.y-gn,gn,m)),Rn.push(new Zx(Ba.p.x+gn,Ba.p.y-gn,gn,m)),Rn.push(new Zx(Ba.p.x-gn,Ba.p.y+gn,gn,m)),Rn.push(new Zx(Ba.p.x+gn,Ba.p.y+gn,gn,m)),Ta+=4)}return X&&(console.log("num probes: "+Ta),console.log("best distance: "+oa.d)),oa.p}function ZZ(m,N){return N.max-m.max}function Zx(m,N,X,wt){this.p=new o(m,N),this.h=X,this.d=GZ(this.p,wt),this.max=this.d+this.h*Math.SQRT2}function GZ(m,N){for(var X=!1,wt=1/0,Ft=0;Ftm.y!=Cr.y>m.y&&m.x<(Cr.x-yr.x)*(m.y-yr.y)/(Cr.y-yr.y)+yr.x&&(X=!X),wt=Math.min(wt,Qd(m,yr,Cr))}return(X?1:-1)*Math.sqrt(wt)}function YZ(m){for(var N=0,X=0,wt=0,Ft=m[0],Zt=0,ie=Ft.length,Be=ie-1;Zt=Zo||im.y<0||im.y>=Zo||JZ(m,im,Qx,X,wt,Ft,ll,m.layers[0],m.collisionBoxArray,N.index,N.sourceLayerIndex,m.index,oa,Xa,Ho,Qe,Ba,bo,ws,gn,N,Zt,yr,Cr,ie)};if(ks==="line")for(var Hs=0,ju=dC(N.geometry,0,0,Zo,Zo);Hs1){var ad=H0(Gd,Vo,X.vertical||Rn,wt,xi,Ta);ad&&Rs(Gd,ad)}}else if(N.type==="Polygon")for(var xp=0,_p=rm(N.geometry,0);xp<_p.length;xp+=1){var bp=_p[xp],Fd=$Z(bp,16);Rs(bp[0],new Zv(Fd.x,Fd.y,0))}else if(N.type==="LineString")for(var Lp=0,Pp=N.geometry;LpYv&&q(m.layerIds[0]+': Value for "text-size" is >= '+Yb+'. Reduce your "text-size".')):ha.kind==="composite"&&(oa=[rd*gn.compositeTextSizes[0].evaluate(ie,{},Rn),rd*gn.compositeTextSizes[1].evaluate(ie,{},Rn)],(oa[0]>Yv||oa[1]>Yv)&&q(m.layerIds[0]+': Value for "text-size" is >= '+Yb+'. Reduce your "text-size".')),m.addSymbols(m.text,xi,oa,Be,Zt,ie,yr,N,Qe.lineStartIndex,Qe.lineLength,an,Rn);for(var Ta=0,Ba=Cr;TaYv&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Yb+'. Reduce your "icon-size".')):Pp.kind==="composite"&&(yd=[rd*Xa.compositeIconSizes[0].evaluate(ba,{},Vo),rd*Xa.compositeIconSizes[1].evaluate(ba,{},Vo)],(yd[0]>Yv||yd[1]>Yv)&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Yb+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Fd,yd,Ba,Ta,ba,!1,N,ks.lineStartIndex,ks.lineLength,-1,Vo),Xu=m.icon.placedSymbolArray.length-1,Lp&&(ju=Lp.length*4,m.addSymbols(m.icon,Lp,yd,Ba,Ta,ba,Yh.vertical,N,ks.lineStartIndex,ks.lineLength,-1,Vo),Dc=m.icon.placedSymbolArray.length-1)}for(var Ip in wt.horizontal){var T0=wt.horizontal[Ip];if(!Bs){Fh=Vt(T0.text);var Zg=Be.layout.get("text-rotate").evaluate(ba,{},Vo);Bs=new x5(Qe,N,yr,Cr,Kr,T0,an,gn,Rn,Zg)}var Xv=T0.positionedLines.length===1;if(Oc+=vC(m,N,T0,Zt,Be,Rn,ba,xi,ks,wt.vertical?Yh.horizontal:Yh.horizontalOnly,Xv?Object.keys(wt.horizontal):[Ip],Uu,Xu,Xa,Vo),Xv)break}wt.vertical&&(fh+=vC(m,N,wt.vertical,Zt,Be,Rn,ba,xi,ks,Yh.vertical,["vertical"],Uu,Dc,Xa,Vo));var Jv=Bs?Bs.boxStartIndex:m.collisionBoxArray.length,Qv=Bs?Bs.boxEndIndex:m.collisionBoxArray.length,Qx=ll?ll.boxStartIndex:m.collisionBoxArray.length,im=ll?ll.boxEndIndex:m.collisionBoxArray.length,T5=Ys?Ys.boxStartIndex:m.collisionBoxArray.length,v8=Ys?Ys.boxEndIndex:m.collisionBoxArray.length,A5=Rs?Rs.boxStartIndex:m.collisionBoxArray.length,y8=Rs?Rs.boxEndIndex:m.collisionBoxArray.length,q0=-1,t_=function(Jb,OC){return Jb&&Jb.circleDiameter?Math.max(Jb.circleDiameter,OC):OC};q0=t_(Bs,q0),q0=t_(ll,q0),q0=t_(Ys,q0),q0=t_(Rs,q0);var M5=q0>-1?1:0;M5&&(q0*=Ho/Lr),m.glyphOffsetArray.length>=Gc.MAX_GLYPHS&&q("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ba.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,ba.sortKey),m.symbolInstances.emplaceBack(N.x,N.y,Uu.right>=0?Uu.right:-1,Uu.center>=0?Uu.center:-1,Uu.left>=0?Uu.left:-1,Uu.vertical||-1,Xu,Dc,Fh,Jv,Qv,Qx,im,T5,v8,A5,y8,yr,Oc,fh,Hs,ju,M5,0,an,ih,Of,q0)}function QZ(m,N,X,wt){var Ft=m.compareText;if(!(N in Ft))Ft[N]=[];else for(var Zt=Ft[N],ie=Zt.length-1;ie>=0;ie--)if(wt.dist(Zt[ie])0)&&(Zt.value.kind!=="constant"||Zt.value.value.length>0),yr=Be.value.kind!=="constant"||!!Be.value.value||Object.keys(Be.parameters).length>0,Cr=Ft.get("symbol-sort-key");if(this.features=[],!(!Qe&&!yr)){for(var Kr=N.iconDependencies,an=N.glyphDependencies,gn=N.availableImages,Rn=new Ul(this.zoom),xi=0,ha=m;xi=0;for(var Oc=0,fh=Ho.sections;Oc=0;Be--)Zt[Be]={x:N[Be].x,y:N[Be].y,tileUnitDistanceFromAnchor:Ft},Be>0&&(Ft+=N[Be-1].dist(N[Be]));for(var Qe=0;Qe0},Gc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Gc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Gc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Gc.prototype.addIndicesForPlacedSymbol=function(m,N){for(var X=m.placedSymbolArray.get(N),wt=X.vertexStartIndex+X.numGlyphs*4,Ft=X.vertexStartIndex;Ft1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(m),this.sortedAngle=m,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var X=0,wt=this.symbolInstanceIndexes;X=0&&Qe.indexOf(ie)===Be&&N.addIndicesForPlacedSymbol(N.text,ie)}),Zt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Zt.verticalPlacedTextSymbolIndex),Zt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.placedIconSymbolIndex),Zt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sr("SymbolBucket",Gc,{omit:["layers","collisionBoxArray","features","compareText"]}),Gc.MAX_GLYPHS=65535,Gc.addDynamicAttributes=f8;function nG(m,N){return N.replace(/{([^{}]+)}/g,function(X,wt){return wt in m?String(m[wt]):""})}var iG=new Za({"symbol-placement":new yn(Pa.layout_symbol["symbol-placement"]),"symbol-spacing":new yn(Pa.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new yn(Pa.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new li(Pa.layout_symbol["symbol-sort-key"]),"symbol-z-order":new yn(Pa.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new yn(Pa.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new yn(Pa.layout_symbol["icon-ignore-placement"]),"icon-optional":new yn(Pa.layout_symbol["icon-optional"]),"icon-rotation-alignment":new yn(Pa.layout_symbol["icon-rotation-alignment"]),"icon-size":new li(Pa.layout_symbol["icon-size"]),"icon-text-fit":new yn(Pa.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new yn(Pa.layout_symbol["icon-text-fit-padding"]),"icon-image":new li(Pa.layout_symbol["icon-image"]),"icon-rotate":new li(Pa.layout_symbol["icon-rotate"]),"icon-padding":new yn(Pa.layout_symbol["icon-padding"]),"icon-keep-upright":new yn(Pa.layout_symbol["icon-keep-upright"]),"icon-offset":new li(Pa.layout_symbol["icon-offset"]),"icon-anchor":new li(Pa.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new yn(Pa.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new yn(Pa.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new yn(Pa.layout_symbol["text-rotation-alignment"]),"text-field":new li(Pa.layout_symbol["text-field"]),"text-font":new li(Pa.layout_symbol["text-font"]),"text-size":new li(Pa.layout_symbol["text-size"]),"text-max-width":new li(Pa.layout_symbol["text-max-width"]),"text-line-height":new yn(Pa.layout_symbol["text-line-height"]),"text-letter-spacing":new li(Pa.layout_symbol["text-letter-spacing"]),"text-justify":new li(Pa.layout_symbol["text-justify"]),"text-radial-offset":new li(Pa.layout_symbol["text-radial-offset"]),"text-variable-anchor":new yn(Pa.layout_symbol["text-variable-anchor"]),"text-anchor":new li(Pa.layout_symbol["text-anchor"]),"text-max-angle":new yn(Pa.layout_symbol["text-max-angle"]),"text-writing-mode":new yn(Pa.layout_symbol["text-writing-mode"]),"text-rotate":new li(Pa.layout_symbol["text-rotate"]),"text-padding":new yn(Pa.layout_symbol["text-padding"]),"text-keep-upright":new yn(Pa.layout_symbol["text-keep-upright"]),"text-transform":new li(Pa.layout_symbol["text-transform"]),"text-offset":new li(Pa.layout_symbol["text-offset"]),"text-allow-overlap":new yn(Pa.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new yn(Pa.layout_symbol["text-ignore-placement"]),"text-optional":new yn(Pa.layout_symbol["text-optional"])}),aG=new Za({"icon-opacity":new li(Pa.paint_symbol["icon-opacity"]),"icon-color":new li(Pa.paint_symbol["icon-color"]),"icon-halo-color":new li(Pa.paint_symbol["icon-halo-color"]),"icon-halo-width":new li(Pa.paint_symbol["icon-halo-width"]),"icon-halo-blur":new li(Pa.paint_symbol["icon-halo-blur"]),"icon-translate":new yn(Pa.paint_symbol["icon-translate"]),"icon-translate-anchor":new yn(Pa.paint_symbol["icon-translate-anchor"]),"text-opacity":new li(Pa.paint_symbol["text-opacity"]),"text-color":new li(Pa.paint_symbol["text-color"],{runtimeType:ou,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new li(Pa.paint_symbol["text-halo-color"]),"text-halo-width":new li(Pa.paint_symbol["text-halo-width"]),"text-halo-blur":new li(Pa.paint_symbol["text-halo-blur"]),"text-translate":new yn(Pa.paint_symbol["text-translate"]),"text-translate-anchor":new yn(Pa.paint_symbol["text-translate-anchor"])}),d8={paint:aG,layout:iG},Kx=function(m){this.type=m.property.overrides?m.property.overrides.runtimeType:Ru,this.defaultValue=m};Kx.prototype.evaluate=function(m){if(m.formattedSection){var N=this.defaultValue.property.overrides;if(N&&N.hasOverride(m.formattedSection))return N.getOverride(m.formattedSection)}return m.feature&&m.featureState?this.defaultValue.evaluate(m.feature,m.featureState):this.defaultValue.property.specification.default},Kx.prototype.eachChild=function(m){if(!this.defaultValue.isConstant()){var N=this.defaultValue.value;m(N._styleExpression.expression)}},Kx.prototype.outputDefined=function(){return!1},Kx.prototype.serialize=function(){return null},sr("FormatSectionOverride",Kx,{omit:["defaultValue"]});var oG=function(m){function N(X){m.call(this,X,d8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.recalculate=function(X,wt){if(m.prototype.recalculate.call(this,X,wt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ft=this.layout.get("text-writing-mode");if(Ft){for(var Zt=[],ie=0,Be=Ft;ie",targetMapId:wt,sourceMapId:Zt.mapId})}}},Xx.prototype.receive=function(m){var N=m.data,X=N.id;if(X&&!(N.targetMapId&&this.mapId!==N.targetMapId))if(N.type===""){delete this.tasks[X];var wt=this.cancelCallbacks[X];delete this.cancelCallbacks[X],wt&&wt()}else mt()||N.mustQueue?(this.tasks[X]=N,this.taskQueue.push(X),this.invoker.trigger()):this.processTask(X,N)},Xx.prototype.process=function(){if(this.taskQueue.length){var m=this.taskQueue.shift(),N=this.tasks[m];delete this.tasks[m],this.taskQueue.length&&this.invoker.trigger(),N&&this.processTask(m,N)}},Xx.prototype.processTask=function(m,N){var X=this;if(N.type===""){var wt=this.callbacks[m];delete this.callbacks[m],wt&&(N.error?wt(xn(N.error)):wt(null,xn(N.data)))}else{var Ft=!1,Zt=pt(this.globalScope)?void 0:[],ie=N.hasCallback?function(Kr,an){Ft=!0,delete X.cancelCallbacks[m],X.target.postMessage({id:m,type:"",sourceMapId:X.mapId,error:Kr?Jr(Kr):null,data:Jr(an,Zt)},Zt)}:function(Kr){Ft=!0},Be=null,Qe=xn(N.data);if(this.parent[N.type])Be=this.parent[N.type](N.sourceMapId,Qe,ie);else if(this.parent.getWorkerSource){var yr=N.type.split("."),Cr=this.parent.getWorkerSource(N.sourceMapId,yr[0],Qe.source);Be=Cr[yr[1]](Qe,ie)}else ie(new Error("Could not find function "+N.type));!Ft&&Be&&Be.cancel&&(this.cancelCallbacks[m]=Be.cancel)}},Xx.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function vG(m,N,X){N=Math.pow(2,X)-N-1;var wt=kC(m*256,N*256,X),Ft=kC((m+1)*256,(N+1)*256,X);return wt[0]+","+wt[1]+","+Ft[0]+","+Ft[1]}function kC(m,N,X){var wt=2*Math.PI*6378137/256/Math.pow(2,X),Ft=m*wt-2*Math.PI*6378137/2,Zt=N*wt-2*Math.PI*6378137/2;return[Ft,Zt]}var nd=function(m,N){m&&(N?this.setSouthWest(m).setNorthEast(N):m.length===4?this.setSouthWest([m[0],m[1]]).setNorthEast([m[2],m[3]]):this.setSouthWest(m[0]).setNorthEast(m[1]))};nd.prototype.setNorthEast=function(m){return this._ne=m instanceof Kh?new Kh(m.lng,m.lat):Kh.convert(m),this},nd.prototype.setSouthWest=function(m){return this._sw=m instanceof Kh?new Kh(m.lng,m.lat):Kh.convert(m),this},nd.prototype.extend=function(m){var N=this._sw,X=this._ne,wt,Ft;if(m instanceof Kh)wt=m,Ft=m;else if(m instanceof nd){if(wt=m._sw,Ft=m._ne,!wt||!Ft)return this}else{if(Array.isArray(m))if(m.length===4||m.every(Array.isArray)){var Zt=m;return this.extend(nd.convert(Zt))}else{var ie=m;return this.extend(Kh.convert(ie))}return this}return!N&&!X?(this._sw=new Kh(wt.lng,wt.lat),this._ne=new Kh(Ft.lng,Ft.lat)):(N.lng=Math.min(wt.lng,N.lng),N.lat=Math.min(wt.lat,N.lat),X.lng=Math.max(Ft.lng,X.lng),X.lat=Math.max(Ft.lat,X.lat)),this},nd.prototype.getCenter=function(){return new Kh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},nd.prototype.getSouthWest=function(){return this._sw},nd.prototype.getNorthEast=function(){return this._ne},nd.prototype.getNorthWest=function(){return new Kh(this.getWest(),this.getNorth())},nd.prototype.getSouthEast=function(){return new Kh(this.getEast(),this.getSouth())},nd.prototype.getWest=function(){return this._sw.lng},nd.prototype.getSouth=function(){return this._sw.lat},nd.prototype.getEast=function(){return this._ne.lng},nd.prototype.getNorth=function(){return this._ne.lat},nd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},nd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},nd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},nd.prototype.contains=function(m){var N=Kh.convert(m),X=N.lng,wt=N.lat,Ft=this._sw.lat<=wt&&wt<=this._ne.lat,Zt=this._sw.lng<=X&&X<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Zt=this._sw.lng>=X&&X>=this._ne.lng),Ft&&Zt},nd.convert=function(m){return!m||m instanceof nd?m:new nd(m)};var TC=63710088e-1,Kh=function(m,N){if(isNaN(m)||isNaN(N))throw new Error("Invalid LngLat object: ("+m+", "+N+")");if(this.lng=+m,this.lat=+N,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Kh.prototype.wrap=function(){return new Kh(b(this.lng,-180,180),this.lat)},Kh.prototype.toArray=function(){return[this.lng,this.lat]},Kh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Kh.prototype.distanceTo=function(m){var N=Math.PI/180,X=this.lat*N,wt=m.lat*N,Ft=Math.sin(X)*Math.sin(wt)+Math.cos(X)*Math.cos(wt)*Math.cos((m.lng-this.lng)*N),Zt=TC*Math.acos(Math.min(Ft,1));return Zt},Kh.prototype.toBounds=function(m){m===void 0&&(m=0);var N=40075017,X=360*m/N,wt=X/Math.cos(Math.PI/180*this.lat);return new nd(new Kh(this.lng-wt,this.lat-X),new Kh(this.lng+wt,this.lat+X))},Kh.convert=function(m){if(m instanceof Kh)return m;if(Array.isArray(m)&&(m.length===2||m.length===3))return new Kh(Number(m[0]),Number(m[1]));if(!Array.isArray(m)&&typeof m=="object"&&m!==null)return new Kh(Number("lng"in m?m.lng:m.lon),Number(m.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var AC=2*Math.PI*TC;function MC(m){return AC*Math.cos(m*Math.PI/180)}function SC(m){return(180+m)/360}function EC(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function CC(m,N){return m/MC(N)}function yG(m){return m*360-180}function m8(m){var N=180-m*360;return 360/Math.PI*Math.atan(Math.exp(N*Math.PI/180))-90}function xG(m,N){return m*MC(m8(N))}function _G(m){return 1/Math.cos(m*Math.PI/180)}var ay=function(m,N,X){X===void 0&&(X=0),this.x=+m,this.y=+N,this.z=+X};ay.fromLngLat=function(m,N){N===void 0&&(N=0);var X=Kh.convert(m);return new ay(SC(X.lng),EC(X.lat),CC(N,X.lat))},ay.prototype.toLngLat=function(){return new Kh(yG(this.x),m8(this.y))},ay.prototype.toAltitude=function(){return xG(this.z,this.y)},ay.prototype.meterInMercatorCoordinateUnits=function(){return 1/AC*_G(m8(this.y))};var oy=function(m,N,X){this.z=m,this.x=N,this.y=X,this.key=Xb(0,m,m,N,X)};oy.prototype.equals=function(m){return this.z===m.z&&this.x===m.x&&this.y===m.y},oy.prototype.url=function(m,N){var X=vG(this.x,this.y,this.z),wt=bG(this.z,this.x,this.y);return m[(this.x+this.y)%m.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(N==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",wt).replace("{bbox-epsg-3857}",X)},oy.prototype.getTilePoint=function(m){var N=Math.pow(2,this.z);return new o((m.x*N-this.x)*Zo,(m.y*N-this.y)*Zo)},oy.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var LC=function(m,N){this.wrap=m,this.canonical=N,this.key=Xb(m,N.z,N.z,N.x,N.y)},id=function(m,N,X,wt,Ft){this.overscaledZ=m,this.wrap=N,this.canonical=new oy(X,+wt,+Ft),this.key=Xb(N,m,X,wt,Ft)};id.prototype.equals=function(m){return this.overscaledZ===m.overscaledZ&&this.wrap===m.wrap&&this.canonical.equals(m.canonical)},id.prototype.scaledTo=function(m){var N=this.canonical.z-m;return m>this.canonical.z?new id(m,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new id(m,this.wrap,m,this.canonical.x>>N,this.canonical.y>>N)},id.prototype.calculateScaledKey=function(m,N){var X=this.canonical.z-m;return m>this.canonical.z?Xb(this.wrap*+N,m,this.canonical.z,this.canonical.x,this.canonical.y):Xb(this.wrap*+N,m,m,this.canonical.x>>X,this.canonical.y>>X)},id.prototype.isChildOf=function(m){if(m.wrap!==this.wrap)return!1;var N=this.canonical.z-m.canonical.z;return m.overscaledZ===0||m.overscaledZ>N&&m.canonical.y===this.canonical.y>>N},id.prototype.children=function(m){if(this.overscaledZ>=m)return[new id(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var N=this.canonical.z+1,X=this.canonical.x*2,wt=this.canonical.y*2;return[new id(N,this.wrap,N,X,wt),new id(N,this.wrap,N,X+1,wt),new id(N,this.wrap,N,X,wt+1),new id(N,this.wrap,N,X+1,wt+1)]},id.prototype.isLessThan=function(m){return this.wrapm.wrap?!1:this.overscaledZm.overscaledZ?!1:this.canonical.xm.canonical.x?!1:this.canonical.y0;Zt--)Ft=1<=this.dim+1||N<-1||N>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(N+1)*this.stride+(m+1)},qg.prototype._unpackMapbox=function(m,N,X){return(m*256*256+N*256+X)/10-1e4},qg.prototype._unpackTerrarium=function(m,N,X){return m*256+N+X/256-32768},qg.prototype.getPixels=function(){return new Wd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},qg.prototype.backfillBorder=function(m,N,X){if(this.dim!==m.dim)throw new Error("dem dimension mismatch");var wt=N*this.dim,Ft=N*this.dim+this.dim,Zt=X*this.dim,ie=X*this.dim+this.dim;switch(N){case-1:wt=Ft-1;break;case 1:Ft=wt+1;break}switch(X){case-1:Zt=ie-1;break;case 1:ie=Zt+1;break}for(var Be=-N*this.dim,Qe=-X*this.dim,yr=Zt;yr=0&&Cr[3]>=0&&Be.insert(ie,Cr[0],Cr[1],Cr[2],Cr[3])}},$g.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Hg.VectorTile(new Ln(this.rawTileData)).layers,this.sourceLayerCoder=new w5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},$g.prototype.query=function(m,N,X,wt){var Ft=this;this.loadVTLayers();for(var Zt=m.params||{},ie=Zo/m.tileSize/m.scale,Be=ae(Zt.filter),Qe=m.queryGeometry,yr=m.queryPadding*ie,Cr=IC(Qe),Kr=this.grid.query(Cr.minX-yr,Cr.minY-yr,Cr.maxX+yr,Cr.maxY+yr),an=IC(m.cameraQueryGeometry),gn=this.grid3D.query(an.minX-yr,an.minY-yr,an.maxX+yr,an.maxY+yr,function(Xa,bo,Vo,Ho){return tm(m.cameraQueryGeometry,Xa-yr,bo-yr,Vo+yr,Ho+yr)}),Rn=0,xi=gn;Rnwt)Ft=!1;else if(!N)Ft=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){f(Gr,this.zoom,dr);var Yr=mi[Rr.id]=Rr.createBucket({index:Mn.bucketLayerIDs.length,layers:Gr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:di,sourceID:this.source});Yr.populate(za,Mi,this.tileID.canonical),Mn.bucketLayerIDs.push(Gr.map(function(Pn){return Pn.id}))}}}}var mn,on,Ce,pr,Hr=t.mapObject(Mi.glyphDependencies,function(Pn){return Object.keys(Pn).map(Number)});Object.keys(Hr).length?_r.send("getGlyphs",{uid:this.uid,stacks:Hr},function(Pn,En){mn||(mn=Pn,on=En,ri.call(Cn))}):on={};var _n=Object.keys(Mi.iconDependencies);_n.length?_r.send("getImages",{icons:_n,source:this.source,tileID:this.tileID,type:"icons"},function(Pn,En){mn||(mn=Pn,Ce=En,ri.call(Cn))}):Ce={};var Bn=Object.keys(Mi.patternDependencies);Bn.length?_r.send("getImages",{icons:Bn,source:this.source,tileID:this.tileID,type:"patterns"},function(Pn,En){mn||(mn=Pn,pr=En,ri.call(Cn))}):pr={},ri.call(this);function ri(){if(mn)return tn(mn);if(on&&Ce&&pr){var Pn=new i(on),En=new t.ImageAtlas(Ce,pr);for(var Yn in mi){var La=mi[Yn];La instanceof t.SymbolBucket?(f(La.layers,this.zoom,dr),t.performSymbolLayout(La,on,Pn.positions,Ce,En.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):La.hasPattern&&(La instanceof t.LineBucket||La instanceof t.FillBucket||La instanceof t.FillExtrusionBucket)&&(f(La.layers,this.zoom,dr),La.addFeatures(Mi,this.tileID.canonical,En.patternPositions))}this.status="done",tn(null,{buckets:t.values(mi).filter(function(qi){return!qi.isEmpty()}),featureIndex:Mn,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Pn.image,imageAtlas:En,glyphMap:this.returnDependencies?on:null,iconMap:this.returnDependencies?Ce:null,glyphPositions:this.returnDependencies?Pn.positions:null})}}};function f(We,nr,dr){for(var _r=new t.EvaluationParameters(nr),tn=0,Cn=We;tn=0!=!!nr&&We.reverse()}var M=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,C=function(We){this._feature=We,this.extent=t.EXTENT,this.type=We.type,this.properties=We.tags,"id"in We&&!isNaN(We.id)&&(this.id=parseInt(We.id,10))};C.prototype.loadGeometry=function(){if(this._feature.type===1){for(var We=[],nr=0,dr=this._feature.geometry;nr"u"&&(_r.push(Mn),mi=_r.length-1,Cn[Mn]=mi),nr.writeVarint(mi);var Mi=dr.properties[Mn],Ni=typeof Mi;Ni!=="string"&&Ni!=="boolean"&&Ni!=="number"&&(Mi=JSON.stringify(Mi));var Hi=Ni+":"+Mi,Ji=Tn[Hi];typeof Ji>"u"&&(tn.push(Mi),Ji=tn.length-1,Tn[Hi]=Ji),nr.writeVarint(Ji)}}function lt(We,nr){return(nr<<3)+(We&7)}function yt(We){return We<<1^We>>31}function mt(We,nr){for(var dr=We.loadGeometry(),_r=We.type,tn=0,Cn=0,Tn=dr.length,Mn=0;Mn>1;pt(We,nr,Tn,_r,tn,Cn%2),tt(We,nr,dr,_r,Tn-1,Cn+1),tt(We,nr,dr,Tn+1,tn,Cn+1)}}function pt(We,nr,dr,_r,tn,Cn){for(;tn>_r;){if(tn-_r>600){var Tn=tn-_r+1,Mn=dr-_r+1,mi=Math.log(Tn),Mi=.5*Math.exp(2*mi/3),Ni=.5*Math.sqrt(mi*Mi*(Tn-Mi)/Tn)*(Mn-Tn/2<0?-1:1),Hi=Math.max(_r,Math.floor(dr-Mn*Mi/Tn+Ni)),Ji=Math.min(tn,Math.floor(dr+(Tn-Mn)*Mi/Tn+Ni));pt(We,nr,dr,Hi,Ji,Cn)}var di=nr[2*dr+Cn],za=_r,qa=tn;for(rt(We,nr,_r,dr),nr[2*tn+Cn]>di&&rt(We,nr,_r,tn);zadi;)qa--}nr[2*_r+Cn]===di?rt(We,nr,_r,qa):(qa++,rt(We,nr,qa,tn)),qa<=dr&&(_r=qa+1),dr<=qa&&(tn=qa-1)}}function rt(We,nr,dr,_r){at(We,dr,_r),at(nr,2*dr,2*_r),at(nr,2*dr+1,2*_r+1)}function at(We,nr,dr){var _r=We[nr];We[nr]=We[dr],We[dr]=_r}function vt(We,nr,dr,_r,tn,Cn,Tn){for(var Mn=[0,We.length-1,0],mi=[],Mi,Ni;Mn.length;){var Hi=Mn.pop(),Ji=Mn.pop(),di=Mn.pop();if(Ji-di<=Tn){for(var za=di;za<=Ji;za++)Mi=nr[2*za],Ni=nr[2*za+1],Mi>=dr&&Mi<=tn&&Ni>=_r&&Ni<=Cn&&mi.push(We[za]);continue}var qa=Math.floor((di+Ji)/2);Mi=nr[2*qa],Ni=nr[2*qa+1],Mi>=dr&&Mi<=tn&&Ni>=_r&&Ni<=Cn&&mi.push(We[qa]);var Oe=(Hi+1)%2;(Hi===0?dr<=Mi:_r<=Ni)&&(Mn.push(di),Mn.push(qa-1),Mn.push(Oe)),(Hi===0?tn>=Mi:Cn>=Ni)&&(Mn.push(qa+1),Mn.push(Ji),Mn.push(Oe))}return mi}function it(We,nr,dr,_r,tn,Cn){for(var Tn=[0,We.length-1,0],Mn=[],mi=tn*tn;Tn.length;){var Mi=Tn.pop(),Ni=Tn.pop(),Hi=Tn.pop();if(Ni-Hi<=Cn){for(var Ji=Hi;Ji<=Ni;Ji++)K(nr[2*Ji],nr[2*Ji+1],dr,_r)<=mi&&Mn.push(We[Ji]);continue}var di=Math.floor((Hi+Ni)/2),za=nr[2*di],qa=nr[2*di+1];K(za,qa,dr,_r)<=mi&&Mn.push(We[di]);var Oe=(Mi+1)%2;(Mi===0?dr-tn<=za:_r-tn<=qa)&&(Tn.push(Hi),Tn.push(di-1),Tn.push(Oe)),(Mi===0?dr+tn>=za:_r+tn>=qa)&&(Tn.push(di+1),Tn.push(Ni),Tn.push(Oe))}return Mn}function K(We,nr,dr,_r){var tn=We-dr,Cn=nr-_r;return tn*tn+Cn*Cn}var ft=function(We){return We[0]},ut=function(We){return We[1]},kt=function(We,nr,dr,_r,tn){nr===void 0&&(nr=ft),dr===void 0&&(dr=ut),_r===void 0&&(_r=64),tn===void 0&&(tn=Float64Array),this.nodeSize=_r,this.points=We;for(var Cn=We.length<65536?Uint16Array:Uint32Array,Tn=this.ids=new Cn(We.length),Mn=this.coords=new tn(We.length*2),mi=0;mi=_r;Mi--){var Ni=+Date.now();Mn=this._cluster(Mn,Mi),this.trees[Mi]=new kt(Mn,Mt,ee,Cn,Float32Array),dr&&console.log("z%d: %d clusters in %dms",Mi,Mn.length,+Date.now()-Ni)}return dr&&console.timeEnd("total time"),this},Pt.prototype.getClusters=function(We,nr){var dr=((We[0]+180)%360+360)%360-180,_r=Math.max(-90,Math.min(90,We[1])),tn=We[2]===180?180:((We[2]+180)%360+360)%360-180,Cn=Math.max(-90,Math.min(90,We[3]));if(We[2]-We[0]>=360)dr=-180,tn=180;else if(dr>tn){var Tn=this.getClusters([dr,_r,180,Cn],nr),Mn=this.getClusters([-180,_r,tn,Cn],nr);return Tn.concat(Mn)}for(var mi=this.trees[this._limitZoom(nr)],Mi=mi.range(fe(dr),pe(Cn),fe(tn),pe(_r)),Ni=[],Hi=0,Ji=Mi;Hinr&&(za+=Br.numPoints||1)}if(za>=Mn){for(var $r=Ni.x*di,Gr=Ni.y*di,Rr=Tn&&di>1?this._map(Ni,!0):null,Yr=(Mi<<5)+(nr+1)+this.points.length,mn=0,on=Ji;mn1)for(var _n=0,Bn=Ji;_n>5},Pt.prototype._getOriginZoom=function(We){return(We-this.points.length)%32},Pt.prototype._map=function(We,nr){if(We.numPoints)return nr?Lt({},We.properties):We.properties;var dr=this.points[We.index].properties,_r=this.options.map(dr);return nr&&_r===dr?Lt({},_r):_r};function qt(We,nr,dr,_r,tn){return{x:We,y:nr,zoom:1/0,id:dr,parentId:-1,numPoints:_r,properties:tn}}function Wt(We,nr){var dr=We.geometry.coordinates,_r=dr[0],tn=dr[1];return{x:fe(_r),y:pe(tn),zoom:1/0,index:nr,parentId:-1}}function Jt(We){return{type:"Feature",id:We.id,properties:ge(We),geometry:{type:"Point",coordinates:[se(We.x),Tt(We.y)]}}}function ge(We){var nr=We.numPoints,dr=nr>=1e4?Math.round(nr/1e3)+"k":nr>=1e3?Math.round(nr/100)/10+"k":nr;return Lt(Lt({},We.properties),{cluster:!0,cluster_id:We.id,point_count:nr,point_count_abbreviated:dr})}function fe(We){return We/360+.5}function pe(We){var nr=Math.sin(We*Math.PI/180),dr=.5-.25*Math.log((1+nr)/(1-nr))/Math.PI;return dr<0?0:dr>1?1:dr}function se(We){return(We-.5)*360}function Tt(We){var nr=(180-We*360)*Math.PI/180;return 360*Math.atan(Math.exp(nr))/Math.PI-90}function Lt(We,nr){for(var dr in nr)We[dr]=nr[dr];return We}function Mt(We){return We.x}function ee(We){return We.y}function ve(We,nr,dr,_r){for(var tn=_r,Cn=dr-nr>>1,Tn=dr-nr,Mn,mi=We[nr],Mi=We[nr+1],Ni=We[dr],Hi=We[dr+1],Ji=nr+3;Jitn)Mn=Ji,tn=di;else if(di===tn){var za=Math.abs(Ji-Cn);za_r&&(Mn-nr>3&&ve(We,nr,Mn,_r),We[Mn+2]=tn,dr-Mn>3&&ve(We,Mn,dr,_r))}function oe(We,nr,dr,_r,tn,Cn){var Tn=tn-dr,Mn=Cn-_r;if(Tn!==0||Mn!==0){var mi=((We-dr)*Tn+(nr-_r)*Mn)/(Tn*Tn+Mn*Mn);mi>1?(dr=tn,_r=Cn):mi>0&&(dr+=Tn*mi,_r+=Mn*mi)}return Tn=We-dr,Mn=nr-_r,Tn*Tn+Mn*Mn}function Ae(We,nr,dr,_r){var tn={id:typeof We>"u"?null:We,type:nr,geometry:dr,tags:_r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return He(tn),tn}function He(We){var nr=We.geometry,dr=We.type;if(dr==="Point"||dr==="MultiPoint"||dr==="LineString")Ge(We,nr);else if(dr==="Polygon"||dr==="MultiLineString")for(var _r=0;_r0&&(_r?Tn+=(tn*Mi-mi*Cn)/2:Tn+=Math.sqrt(Math.pow(mi-tn,2)+Math.pow(Mi-Cn,2))),tn=mi,Cn=Mi}var Ni=nr.length-3;nr[2]=1,ve(nr,0,Ni,dr),nr[Ni+2]=1,nr.size=Math.abs(Tn),nr.start=0,nr.end=nr.size}function br(We,nr,dr,_r){for(var tn=0;tn1?1:dr}function Le(We,nr,dr,_r,tn,Cn,Tn,Mn){if(dr/=nr,_r/=nr,Cn>=dr&&Tn<_r)return We;if(Tn=_r)return null;for(var mi=[],Mi=0;Mi=dr&&za<_r){mi.push(Ni);continue}else if(za=_r)continue;var qa=[];if(Ji==="Point"||Ji==="MultiPoint")Gt(Hi,qa,dr,_r,tn);else if(Ji==="LineString")ne(Hi,qa,dr,_r,tn,!1,Mn.lineMetrics);else if(Ji==="MultiLineString")gt(Hi,qa,dr,_r,tn,!1);else if(Ji==="Polygon")gt(Hi,qa,dr,_r,tn,!0);else if(Ji==="MultiPolygon")for(var Oe=0;Oe=dr&&Tn<=_r&&(nr.push(We[Cn]),nr.push(We[Cn+1]),nr.push(We[Cn+2]))}}function ne(We,nr,dr,_r,tn,Cn,Tn){for(var Mn=Ct(We),mi=tn===0?Nt:re,Mi=We.start,Ni,Hi,Ji=0;Jidr&&(Hi=mi(Mn,di,za,Oe,ze,dr),Tn&&(Mn.start=Mi+Ni*Hi)):Br>_r?$r<_r&&(Hi=mi(Mn,di,za,Oe,ze,_r),Tn&&(Mn.start=Mi+Ni*Hi)):St(Mn,di,za,qa),$r=dr&&(Hi=mi(Mn,di,za,Oe,ze,dr),Gr=!0),$r>_r&&Br<=_r&&(Hi=mi(Mn,di,za,Oe,ze,_r),Gr=!0),!Cn&&Gr&&(Tn&&(Mn.end=Mi+Ni*Hi),nr.push(Mn),Mn=Ct(We)),Tn&&(Mi+=Ni)}var Rr=We.length-3;di=We[Rr],za=We[Rr+1],qa=We[Rr+2],Br=tn===0?di:za,Br>=dr&&Br<=_r&&St(Mn,di,za,qa),Rr=Mn.length-3,Cn&&Rr>=3&&(Mn[Rr]!==Mn[0]||Mn[Rr+1]!==Mn[1])&&St(Mn,Mn[0],Mn[1],Mn[2]),Mn.length&&nr.push(Mn)}function Ct(We){var nr=[];return nr.size=We.size,nr.start=We.start,nr.end=We.end,nr}function gt(We,nr,dr,_r,tn,Cn){for(var Tn=0;TnTn.maxX&&(Tn.maxX=Ni),Hi>Tn.maxY&&(Tn.maxY=Hi)}return Tn}function Mr(We,nr,dr,_r){var tn=nr.geometry,Cn=nr.type,Tn=[];if(Cn==="Point"||Cn==="MultiPoint")for(var Mn=0;Mn0&&nr.size<(tn?Tn:_r)){dr.numPoints+=nr.length/3;return}for(var Mn=[],mi=0;miTn)&&(dr.numSimplified++,Mn.push(nr[mi]),Mn.push(nr[mi+1])),dr.numPoints++;tn&&Qr(Mn,Cn),We.push(Mn)}function Qr(We,nr){for(var dr=0,_r=0,tn=We.length,Cn=tn-2;_r0===nr)for(_r=0,tn=We.length;_r24)throw new Error("maxZoom should be in the 0-24 range");if(nr.promoteId&&nr.generateId)throw new Error("promoteId and generateId cannot be used together.");var _r=cr(We,nr);this.tiles={},this.tileCoords=[],dr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",nr.indexMaxZoom,nr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),_r=le(_r,nr),_r.length&&this.splitTile(_r,0,0,0),dr&&(_r.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)))}qn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},qn.prototype.splitTile=function(We,nr,dr,_r,tn,Cn,Tn){for(var Mn=[We,nr,dr,_r],mi=this.options,Mi=mi.debug;Mn.length;){_r=Mn.pop(),dr=Mn.pop(),nr=Mn.pop(),We=Mn.pop();var Ni=1<1&&console.time("creation"),Ji=this.tiles[Hi]=Sr(We,nr,dr,_r,mi),this.tileCoords.push({z:nr,x:dr,y:_r}),Mi)){Mi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",nr,dr,_r,Ji.numFeatures,Ji.numPoints,Ji.numSimplified),console.timeEnd("creation"));var di="z"+nr;this.stats[di]=(this.stats[di]||0)+1,this.total++}if(Ji.source=We,tn){if(nr===mi.maxZoom||nr===tn)continue;var za=1<1&&console.time("clipping");var qa=.5*mi.buffer/mi.extent,Oe=.5-qa,ze=.5+qa,Br=1+qa,$r,Gr,Rr,Yr,mn,on;$r=Gr=Rr=Yr=null,mn=Le(We,Ni,dr-qa,dr+ze,0,Ji.minX,Ji.maxX,mi),on=Le(We,Ni,dr+Oe,dr+Br,0,Ji.minX,Ji.maxX,mi),We=null,mn&&($r=Le(mn,Ni,_r-qa,_r+ze,1,Ji.minY,Ji.maxY,mi),Gr=Le(mn,Ni,_r+Oe,_r+Br,1,Ji.minY,Ji.maxY,mi),mn=null),on&&(Rr=Le(on,Ni,_r-qa,_r+ze,1,Ji.minY,Ji.maxY,mi),Yr=Le(on,Ni,_r+Oe,_r+Br,1,Ji.minY,Ji.maxY,mi),on=null),Mi>1&&console.timeEnd("clipping"),Mn.push($r||[],nr+1,dr*2,_r*2),Mn.push(Gr||[],nr+1,dr*2,_r*2+1),Mn.push(Rr||[],nr+1,dr*2+1,_r*2),Mn.push(Yr||[],nr+1,dr*2+1,_r*2+1)}}},qn.prototype.getTile=function(We,nr,dr){var _r=this.options,tn=_r.extent,Cn=_r.debug;if(We<0||We>24)return null;var Tn=1<1&&console.log("drilling down to z%d-%d-%d",We,nr,dr);for(var mi=We,Mi=nr,Ni=dr,Hi;!Hi&&mi>0;)mi--,Mi=Math.floor(Mi/2),Ni=Math.floor(Ni/2),Hi=this.tiles[ei(mi,Mi,Ni)];return!Hi||!Hi.source?null:(Cn>1&&console.log("found parent tile z%d-%d-%d",mi,Mi,Ni),Cn>1&&console.time("drilling down"),this.splitTile(Hi.source,mi,Mi,Ni,We,nr,dr),Cn>1&&console.timeEnd("drilling down"),this.tiles[Mn]?qe(this.tiles[Mn],tn):null)};function ei(We,nr,dr){return((1<=0?0:$.button},r.remove=function($){$.parentNode&&$.parentNode.removeChild($)};function v($,ot,et){var xt,Vt,de,xe=t.browser.devicePixelRatio>1?"@2x":"",Yt=t.getJSON(ot.transformRequest(ot.normalizeSpriteURL($,xe,".json"),t.ResourceType.SpriteJSON),function(ir,Ye){Yt=null,de||(de=ir,xt=Ye,Ee())}),he=t.getImage(ot.transformRequest(ot.normalizeSpriteURL($,xe,".png"),t.ResourceType.SpriteImage),function(ir,Ye){he=null,de||(de=ir,Vt=Ye,Ee())});function Ee(){if(de)et(de);else if(xt&&Vt){var ir=t.browser.getImageData(Vt),Ye={};for(var er in xt){var lr=xt[er],hr=lr.width,Ve=lr.height,Xe=lr.x,Ze=lr.y,Pr=lr.sdf,sn=lr.pixelRatio,pn=lr.stretchX,vi=lr.stretchY,fi=lr.content,Xn=new t.RGBAImage({width:hr,height:Ve});t.RGBAImage.copy(ir,Xn,{x:Xe,y:Ze},{x:0,y:0},{width:hr,height:Ve}),Ye[er]={data:Xn,pixelRatio:sn,sdf:Pr,stretchX:pn,stretchY:vi,content:fi}}et(null,Ye)}}return{cancel:function(){Yt&&(Yt.cancel(),Yt=null),he&&(he.cancel(),he=null)}}}function T($){var ot=$.userImage;if(ot&&ot.render){var et=ot.render();if(et)return $.data.replace(new Uint8Array(ot.data.buffer)),!0}return!1}var u=1,b=function($){function ot(){$.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.isLoaded=function(){return this.loaded},ot.prototype.setLoaded=function(et){if(this.loaded!==et&&(this.loaded=et,et)){for(var xt=0,Vt=this.requestors;xt=0?1.2:1))}A.prototype.draw=function($){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText($,this.buffer,this.middle);for(var ot=this.ctx.getImageData(0,0,this.size,this.size),et=new Uint8ClampedArray(this.size*this.size),xt=0;xt65535){Ee(new Error("glyphs > 65535 not supported"));return}if(er.ranges[hr]){Ee(null,{stack:ir,id:Ye,glyph:lr});return}var Ve=er.requests[hr];Ve||(Ve=er.requests[hr]=[],k.loadGlyphRange(ir,hr,et.url,et.requestManager,function(Xe,Ze){if(Ze){for(var Pr in Ze)et._doesCharSupportLocalGlyph(+Pr)||(er.glyphs[+Pr]=Ze[+Pr]);er.ranges[hr]=!0}for(var sn=0,pn=Ve;sn1&&(he=$[++Yt]);var ir=Math.abs(Ee-he.left),Ye=Math.abs(Ee-he.right),er=Math.min(ir,Ye),lr=void 0,hr=Vt/et*(xt+1);if(he.isDash){var Ve=xt-Math.abs(hr);lr=Math.sqrt(er*er+Ve*Ve)}else lr=xt-Math.sqrt(er*er+hr*hr);this.data[xe+Ee]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addRegularDash=function($){for(var ot=$.length-1;ot>=0;--ot){var et=$[ot],xt=$[ot+1];et.zeroLength?$.splice(ot,1):xt&&xt.isDash===et.isDash&&(xt.left=et.left,$.splice(ot,1))}var Vt=$[0],de=$[$.length-1];Vt.isDash===de.isDash&&(Vt.left=de.left-this.width,de.right=Vt.right+this.width);for(var xe=this.width*this.nextRow,Yt=0,he=$[Yt],Ee=0;Ee1&&(he=$[++Yt]);var ir=Math.abs(Ee-he.left),Ye=Math.abs(Ee-he.right),er=Math.min(ir,Ye),lr=he.isDash?er:-er;this.data[xe+Ee]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addDash=function($,ot){var et=ot?7:0,xt=2*et+1;if(this.nextRow+xt>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Vt=0,de=0;de<$.length;de++)Vt+=$[de];if(Vt!==0){var xe=this.width/Vt,Yt=this.getDashRanges($,this.width,xe);ot?this.addRoundDash(Yt,xe,et):this.addRegularDash(Yt)}var he={y:(this.nextRow+et+.5)/this.height,height:2*et/this.height,width:Vt};return this.nextRow+=xt,this.dirty=!0,he},V.prototype.bind=function($){var ot=$.gl;this.texture?(ot.bindTexture(ot.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ot.texSubImage2D(ot.TEXTURE_2D,0,0,0,this.width,this.height,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))):(this.texture=ot.createTexture(),ot.bindTexture(ot.TEXTURE_2D,this.texture),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_S,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_T,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MIN_FILTER,ot.LINEAR),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MAG_FILTER,ot.LINEAR),ot.texImage2D(ot.TEXTURE_2D,0,ot.ALPHA,this.width,this.height,0,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))};var H=function $(ot,et){this.workerPool=ot,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var xt=this.workerPool.acquire(this.id),Vt=0;Vt=et.minX&&$.x=et.minY&&$.y0&&(Ee[new t.OverscaledTileID(et.overscaledZ,xe,xt.z,de,xt.y-1).key]={backfilled:!1},Ee[new t.OverscaledTileID(et.overscaledZ,et.wrap,xt.z,xt.x,xt.y-1).key]={backfilled:!1},Ee[new t.OverscaledTileID(et.overscaledZ,he,xt.z,Yt,xt.y-1).key]={backfilled:!1}),xt.y+10&&(Vt.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new t.Event("data",Vt))})},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setData=function(et){var xt=this;return this._data=et,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Vt){if(Vt){xt.fire(new t.ErrorEvent(Vt));return}var de={dataType:"source",sourceDataType:"content"};xt._collectResourceTiming&&xt._resourceTiming&&xt._resourceTiming.length>0&&(de.resourceTiming=xt._resourceTiming,xt._resourceTiming=[]),xt.fire(new t.Event("data",de))}),this},ot.prototype.getClusterExpansionZoom=function(et,xt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterChildren=function(et,xt){return this.actor.send("geojson.getClusterChildren",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterLeaves=function(et,xt,Vt,de){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:et,limit:xt,offset:Vt},de),this},ot.prototype._updateWorkerData=function(et){var xt=this;this._loaded=!1;var Vt=t.extend({},this.workerOptions),de=this._data;typeof de=="string"?(Vt.request=this.map._requestManager.transformRequest(t.browser.resolveURL(de),t.ResourceType.Source),Vt.request.collectResourceTiming=this._collectResourceTiming):Vt.data=JSON.stringify(de),this.actor.send(this.type+".loadData",Vt,function(xe,Yt){xt._removed||Yt&&Yt.abandoned||(xt._loaded=!0,Yt&&Yt.resourceTiming&&Yt.resourceTiming[xt.id]&&(xt._resourceTiming=Yt.resourceTiming[xt.id].slice(0)),xt.actor.send(xt.type+".coalesce",{source:Vt.source},null),et(xe))})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.loadTile=function(et,xt){var Vt=this,de=et.actor?"reloadTile":"loadTile";et.actor=this.actor;var xe={type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};et.request=this.actor.send(de,xe,function(Yt,he){return delete et.request,et.unloadVectorData(),et.aborted?xt(null):Yt?xt(Yt):(et.loadVectorData(he,Vt.map.painter,de==="reloadTile"),xt(null))})},ot.prototype.abortTile=function(et){et.request&&(et.request.cancel(),delete et.request),et.aborted=!0},ot.prototype.unloadTile=function(et){et.unloadVectorData(),this.actor.send("removeTile",{uid:et.uid,type:this.type,source:this.id})},ot.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ot.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented),yt=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),mt=function($){function ot(et,xt,Vt,de){$.call(this),this.id=et,this.dispatcher=Vt,this.coordinates=xt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=xt}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(et,xt){var Vt=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(de,xe){Vt._loaded=!0,de?Vt.fire(new t.ErrorEvent(de)):xe&&(Vt.image=xe,et&&(Vt.coordinates=et),xt&&xt(),Vt._finishLoading())})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.updateImage=function(et){var xt=this;return!this.image||!et.url?this:(this.options.url=et.url,this.load(et.coordinates,function(){xt.texture=null}),this)},ot.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setCoordinates=function(et){var xt=this;this.coordinates=et;var Vt=et.map(t.MercatorCoordinate.fromLngLat);this.tileID=st(Vt),this.minzoom=this.maxzoom=this.tileID.z;var de=Vt.map(function(xe){return xt.tileID.getTilePoint(xe)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(de[2].x,de[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(et,this.image,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.loadTile=function(et,xt){this.tileID&&this.tileID.equals(et.tileID.canonical)?(this.tiles[String(et.tileID.wrap)]=et,et.buckets={},xt(null)):(et.state="errored",xt(null))},ot.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented);function st($){for(var ot=1/0,et=1/0,xt=-1/0,Vt=-1/0,de=0,xe=$;dext.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xt.start(0)+" and "+xt.end(0)+"-second mark."))):this.video.currentTime=et}},ot.prototype.getVideo=function(){return this.video},ot.prototype.onAdd=function(et){this.map||(this.map=et,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),xt.texSubImage2D(xt.TEXTURE_2D,0,0,0,xt.RGBA,xt.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(et,this.video,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this.video&&!this.video.paused},ot}(mt),pt=function($){function ot(et,xt,Vt,de){$.call(this,et,xt,Vt,de),xt.coordinates?(!Array.isArray(xt.coordinates)||xt.coordinates.length!==4||xt.coordinates.some(function(xe){return!Array.isArray(xe)||xe.length!==2||xe.some(function(Yt){return typeof Yt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "coordinates"'))),xt.animate&&typeof xt.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'optional "animate" property must be a boolean value'))),xt.canvas?typeof xt.canvas!="string"&&!(xt.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "canvas"'))),this.options=xt,this.animate=xt.animate!==void 0?xt.animate:!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ot.prototype.getCanvas=function(){return this.canvas},ot.prototype.onAdd=function(et){this.map=et,this.load(),this.canvas&&this.animate&&this.play()},ot.prototype.onRemove=function(){this.pause()},ot.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xt=this.map.painter.context,Vt=xt.gl;this.boundsBuffer||(this.boundsBuffer=xt.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xt,this.canvas,Vt.RGBA,{premultiply:!0});for(var de in this.tiles){var xe=this.tiles[de];xe.state!=="loaded"&&(xe.state="loaded",xe.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this._playing},ot.prototype._hasInvalidDimensions=function(){for(var et=0,xt=[this.canvas.width,this.canvas.height];etthis.max){var xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this},Wt.prototype.has=function($){return $.wrapped().key in this.data},Wt.prototype.getAndRemove=function($){return this.has($)?this._getAndRemoveByKey($.wrapped().key):null},Wt.prototype._getAndRemoveByKey=function($){var ot=this.data[$].shift();return ot.timeout&&clearTimeout(ot.timeout),this.data[$].length===0&&delete this.data[$],this.order.splice(this.order.indexOf($),1),ot.value},Wt.prototype.getByKey=function($){var ot=this.data[$];return ot?ot[0].value:null},Wt.prototype.get=function($){if(!this.has($))return null;var ot=this.data[$.wrapped().key][0];return ot.value},Wt.prototype.remove=function($,ot){if(!this.has($))return this;var et=$.wrapped().key,xt=ot===void 0?0:this.data[et].indexOf(ot),Vt=this.data[et][xt];return this.data[et].splice(xt,1),Vt.timeout&&clearTimeout(Vt.timeout),this.data[et].length===0&&delete this.data[et],this.onRemove(Vt.value),this.order.splice(this.order.indexOf(et),1),this},Wt.prototype.setMaxSize=function($){for(this.max=$;this.order.length>this.max;){var ot=this._getAndRemoveByKey(this.order[0]);ot&&this.onRemove(ot)}return this},Wt.prototype.filter=function($){var ot=[];for(var et in this.data)for(var xt=0,Vt=this.data[et];xt1||(Math.abs(ir)>1&&(Math.abs(ir+er)===1?ir+=er:Math.abs(ir-er)===1&&(ir-=er)),!(!Ee.dem||!he.dem)&&(he.dem.backfillBorder(Ee.dem,ir,Ye),he.neighboringTiles&&he.neighboringTiles[lr]&&(he.neighboringTiles[lr].backfilled=!0)))}},ot.prototype.getTile=function(et){return this.getTileByID(et.key)},ot.prototype.getTileByID=function(et){return this._tiles[et]},ot.prototype._retainLoadedChildren=function(et,xt,Vt,de){for(var xe in this._tiles){var Yt=this._tiles[xe];if(!(de[xe]||!Yt.hasData()||Yt.tileID.overscaledZ<=xt||Yt.tileID.overscaledZ>Vt)){for(var he=Yt.tileID;Yt&&Yt.tileID.overscaledZ>xt+1;){var Ee=Yt.tileID.scaledTo(Yt.tileID.overscaledZ-1);Yt=this._tiles[Ee.key],Yt&&Yt.hasData()&&(he=Ee)}for(var ir=he;ir.overscaledZ>xt;)if(ir=ir.scaledTo(ir.overscaledZ-1),et[ir.key]){de[he.key]=he;break}}}},ot.prototype.findLoadedParent=function(et,xt){if(et.key in this._loadedParentTiles){var Vt=this._loadedParentTiles[et.key];return Vt&&Vt.tileID.overscaledZ>=xt?Vt:null}for(var de=et.overscaledZ-1;de>=xt;de--){var xe=et.scaledTo(de),Yt=this._getLoadedTile(xe);if(Yt)return Yt}},ot.prototype._getLoadedTile=function(et){var xt=this._tiles[et.key];if(xt&&xt.hasData())return xt;var Vt=this._cache.getByKey(et.wrapped().key);return Vt},ot.prototype.updateCacheSize=function(et){var xt=Math.ceil(et.width/this._source.tileSize)+1,Vt=Math.ceil(et.height/this._source.tileSize)+1,de=xt*Vt,xe=5,Yt=Math.floor(de*xe),he=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Yt):Yt;this._cache.setMaxSize(he)},ot.prototype.handleWrapJump=function(et){var xt=this._prevLng===void 0?et:this._prevLng,Vt=et-xt,de=Vt/360,xe=Math.round(de);if(this._prevLng=et,xe){var Yt={};for(var he in this._tiles){var Ee=this._tiles[he];Ee.tileID=Ee.tileID.unwrapTo(Ee.tileID.wrap+xe),Yt[Ee.tileID.key]=Ee}this._tiles=Yt;for(var ir in this._timers)clearTimeout(this._timers[ir]),delete this._timers[ir];for(var Ye in this._tiles){var er=this._tiles[Ye];this._setTileReloadTimer(Ye,er)}}},ot.prototype.update=function(et){var xt=this;if(this.transform=et,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Vt;this.used?this._source.tileID?Vt=et.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(yi){return new t.OverscaledTileID(yi.canonical.z,yi.wrap,yi.canonical.z,yi.canonical.x,yi.canonical.y)}):(Vt=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Vt=Vt.filter(function(yi){return xt._source.hasTile(yi)}))):Vt=[];var de=et.coveringZoomLevel(this._source),xe=Math.max(de-ot.maxOverzooming,this._source.minzoom),Yt=Math.max(de+ot.maxUnderzooming,this._source.minzoom),he=this._updateRetainedTiles(Vt,de);if(mi(this._source.type)){for(var Ee={},ir={},Ye=Object.keys(he),er=0,lr=Ye;erthis._source.maxzoom){var Ze=Ve.children(this._source.maxzoom)[0],Pr=this.getTile(Ze);if(Pr&&Pr.hasData()){Vt[Ze.key]=Ze;continue}}else{var sn=Ve.children(this._source.maxzoom);if(Vt[sn[0].key]&&Vt[sn[1].key]&&Vt[sn[2].key]&&Vt[sn[3].key])continue}for(var pn=Xe.wasRequested(),vi=Ve.overscaledZ-1;vi>=xe;--vi){var fi=Ve.scaledTo(vi);if(de[fi.key]||(de[fi.key]=!0,Xe=this.getTile(fi),!Xe&&pn&&(Xe=this._addTile(fi)),Xe&&(Vt[fi.key]=fi,pn=Xe.wasRequested(),Xe.hasData())))break}}}return Vt},ot.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var et in this._tiles){for(var xt=[],Vt=void 0,de=this._tiles[et].tileID;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){Vt=this._loadedParentTiles[de.key];break}xt.push(de.key);var xe=de.scaledTo(de.overscaledZ-1);if(Vt=this._getLoadedTile(xe),Vt)break;de=xe}for(var Yt=0,he=xt;Yt0)&&(xt.hasData()&&xt.state!=="reloading"?this._cache.add(xt.tileID,xt,xt.getExpiryTimeout()):(xt.aborted=!0,this._abortTile(xt),this._unloadTile(xt))))},ot.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var et in this._tiles)this._removeTile(et);this._cache.reset()},ot.prototype.tilesIn=function(et,xt,Vt){var de=this,xe=[],Yt=this.transform;if(!Yt)return xe;for(var he=Vt?Yt.getCameraQueryGeometry(et):et,Ee=et.map(function(vi){return Yt.pointCoordinate(vi)}),ir=he.map(function(vi){return Yt.pointCoordinate(vi)}),Ye=this.getIds(),er=1/0,lr=1/0,hr=-1/0,Ve=-1/0,Xe=0,Ze=ir;Xe=0&&ea[1].y+yi>=0){var Ii=Ee.map(function(ca){return Xn.getTilePoint(ca)}),Oi=ir.map(function(ca){return Xn.getTilePoint(ca)});xe.push({tile:fi,tileID:Xn,queryGeometry:Ii,cameraQueryGeometry:Oi,scale:zi})}}},pn=0;pn=t.browser.now())return!0}return!1},ot.prototype.setFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.updateState(et,xt,Vt)},ot.prototype.removeFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.removeFeatureState(et,xt,Vt)},ot.prototype.getFeatureState=function(et,xt){return et=et||"_geojsonTileLayer",this._state.getState(et,xt)},ot.prototype.setDependencies=function(et,xt,Vt){var de=this._tiles[et];de&&de.setDependencies(xt,Vt)},ot.prototype.reloadTilesForDependencies=function(et,xt){for(var Vt in this._tiles){var de=this._tiles[Vt];de.hasDependency(et,xt)&&this._reloadTile(Vt,"reloading")}this._cache.filter(function(xe){return!xe.hasDependency(et,xt)})},ot}(t.Evented);Tn.maxOverzooming=10,Tn.maxUnderzooming=3;function Mn($,ot){var et=Math.abs($.wrap*2)-+($.wrap<0),xt=Math.abs(ot.wrap*2)-+(ot.wrap<0);return $.overscaledZ-ot.overscaledZ||xt-et||ot.canonical.y-$.canonical.y||ot.canonical.x-$.canonical.x}function mi($){return $==="raster"||$==="image"||$==="video"}function Mi(){return new t.window.Worker(yl.workerUrl)}var Ni="mapboxgl_preloaded_worker_pool",Hi=function(){this.active={}};Hi.prototype.acquire=function($){if(!this.workers)for(this.workers=[];this.workers.length0?(xt-de)/xe:0;return this.points[Vt].mult(1-Yt).add(this.points[ot].mult(Yt))};var En=function($,ot,et){var xt=this.boxCells=[],Vt=this.circleCells=[];this.xCellCount=Math.ceil($/et),this.yCellCount=Math.ceil(ot/et);for(var de=0;dethis.width||xt<0||ot>this.height)return Vt?!1:[];var xe=[];if($<=0&&ot<=0&&this.width<=et&&this.height<=xt){if(Vt)return!0;for(var Yt=0;Yt0:xe}},En.prototype._queryCircle=function($,ot,et,xt,Vt){var de=$-et,xe=$+et,Yt=ot-et,he=ot+et;if(xe<0||de>this.width||he<0||Yt>this.height)return xt?!1:[];var Ee=[],ir={hitTest:xt,circle:{x:$,y:ot,radius:et},seenUids:{box:{},circle:{}}};return this._forEachCell(de,Yt,xe,he,this._queryCellCircle,Ee,ir,Vt),xt?Ee.length>0:Ee},En.prototype.query=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!1,Vt)},En.prototype.hitTest=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!0,Vt)},En.prototype.hitTestCircle=function($,ot,et,xt){return this._queryCircle($,ot,et,!0,xt)},En.prototype._queryCell=function($,ot,et,xt,Vt,de,xe,Yt){var he=xe.seenUids,Ee=this.boxCells[Vt];if(Ee!==null)for(var ir=this.bboxes,Ye=0,er=Ee;Ye=ir[hr+0]&&xt>=ir[hr+1]&&(!Yt||Yt(this.boxKeys[lr]))){if(xe.hitTest)return de.push(!0),!0;de.push({key:this.boxKeys[lr],x1:ir[hr],y1:ir[hr+1],x2:ir[hr+2],y2:ir[hr+3]})}}}var Ve=this.circleCells[Vt];if(Ve!==null)for(var Xe=this.circles,Ze=0,Pr=Ve;Zexe*xe+Yt*Yt},En.prototype._circleAndRectCollide=function($,ot,et,xt,Vt,de,xe){var Yt=(de-xt)/2,he=Math.abs($-(xt+Yt));if(he>Yt+et)return!1;var Ee=(xe-Vt)/2,ir=Math.abs(ot-(Vt+Ee));if(ir>Ee+et)return!1;if(he<=Yt||ir<=Ee)return!0;var Ye=he-Yt,er=ir-Ee;return Ye*Ye+er*er<=et*et};function Yn($,ot,et,xt,Vt){var de=t.create();return ot?(t.scale(de,de,[1/Vt,1/Vt,1]),et||t.rotateZ(de,de,xt.angle)):t.multiply(de,xt.labelPlaneMatrix,$),de}function La($,ot,et,xt,Vt){if(ot){var de=t.clone($);return t.scale(de,de,[Vt,Vt,1]),et||t.rotateZ(de,de,-xt.angle),de}else return xt.glCoordMatrix}function qi($,ot){var et=[$.x,$.y,0,1];Ks(et,et,ot);var xt=et[3];return{point:new t.Point(et[0]/xt,et[1]/xt),signedDistanceFromCamera:xt}}function Qa($,ot){return .5+.5*($/ot)}function Ja($,ot){var et=$[0]/$[3],xt=$[1]/$[3],Vt=et>=-ot[0]&&et<=ot[0]&&xt>=-ot[1]&&xt<=ot[1];return Vt}function Do($,ot,et,xt,Vt,de,xe,Yt){var he=xt?$.textSizeData:$.iconSizeData,Ee=t.evaluateSizeForZoom(he,et.transform.zoom),ir=[256/et.width*2+1,256/et.height*2+1],Ye=xt?$.text.dynamicLayoutVertexArray:$.icon.dynamicLayoutVertexArray;Ye.clear();for(var er=$.lineVertexArray,lr=xt?$.text.placedSymbolArray:$.icon.placedSymbolArray,hr=et.transform.width/et.transform.height,Ve=!1,Xe=0;Xede)return{useVertical:!0}}return($===t.WritingMode.vertical?ot.yet.x)?{needsFlipping:!0}:null}function Da($,ot,et,xt,Vt,de,xe,Yt,he,Ee,ir,Ye,er,lr){var hr=ot/24,Ve=$.lineOffsetX*hr,Xe=$.lineOffsetY*hr,Ze;if($.numGlyphs>1){var Pr=$.glyphStartIndex+$.numGlyphs,sn=$.lineStartIndex,pn=$.lineStartIndex+$.lineLength,vi=yo(hr,Yt,Ve,Xe,et,ir,Ye,$,he,de,er);if(!vi)return{notEnoughRoom:!0};var fi=qi(vi.first.point,xe).point,Xn=qi(vi.last.point,xe).point;if(xt&&!et){var zi=Bo($.writingMode,fi,Xn,lr);if(zi)return zi}Ze=[vi.first];for(var yi=$.glyphStartIndex+1;yi0?ca.point:ys(Ye,Oi,ea,1,Vt),ho=Bo($.writingMode,ea,to,lr);if(ho)return ho}var Zo=os(hr*Yt.getoffsetX($.glyphStartIndex),Ve,Xe,et,ir,Ye,$.segment,$.lineStartIndex,$.lineStartIndex+$.lineLength,he,de,er);if(!Zo)return{notEnoughRoom:!0};Ze=[Zo]}for(var xs=0,zl=Ze;xs0?1:-1,hr=0;xt&&(lr*=-1,hr=Math.PI),lr<0&&(hr+=Math.PI);for(var Ve=lr>0?Yt+xe:Yt+xe+1,Xe=Vt,Ze=Vt,Pr=0,sn=0,pn=Math.abs(er),vi=[];Pr+sn<=pn;){if(Ve+=lr,Ve=he)return null;if(Ze=Xe,vi.push(Xe),Xe=Ye[Ve],Xe===void 0){var fi=new t.Point(Ee.getx(Ve),Ee.gety(Ve)),Xn=qi(fi,ir);if(Xn.signedDistanceFromCamera>0)Xe=Ye[Ve]=Xn.point;else{var zi=Ve-lr,yi=Pr===0?de:new t.Point(Ee.getx(zi),Ee.gety(zi));Xe=ys(yi,fi,Ze,pn-Pr+1,ir)}}Pr+=sn,sn=Ze.dist(Xe)}var ea=(pn-Pr)/sn,Ii=Xe.sub(Ze),Oi=Ii.mult(ea)._add(Ze);Oi._add(Ii._unit()._perp()._mult(et*lr));var ca=hr+Math.atan2(Xe.y-Ze.y,Xe.x-Ze.x);return vi.push(Oi),{point:Oi,angle:ca,path:vi}}var ul=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Go($,ot){for(var et=0;et<$;et++){var xt=ot.length;ot.resize(xt+4),ot.float32.set(ul,xt*3)}}function Ks($,ot,et){var xt=ot[0],Vt=ot[1];return $[0]=et[0]*xt+et[4]*Vt+et[12],$[1]=et[1]*xt+et[5]*Vt+et[13],$[3]=et[3]*xt+et[7]*Vt+et[15],$}var ss=100,cl=function($,ot,et){ot===void 0&&(ot=new En($.width+2*ss,$.height+2*ss,25)),et===void 0&&(et=new En($.width+2*ss,$.height+2*ss,25)),this.transform=$,this.grid=ot,this.ignoredGrid=et,this.pitchfactor=Math.cos($._pitch)*$.cameraToCenterDistance,this.screenRightBoundary=$.width+ss,this.screenBottomBoundary=$.height+ss,this.gridRightBoundary=$.width+2*ss,this.gridBottomBoundary=$.height+2*ss};cl.prototype.placeCollisionBox=function($,ot,et,xt,Vt){var de=this.projectAndGetPerspectiveRatio(xt,$.anchorPointX,$.anchorPointY),xe=et*de.perspectiveRatio,Yt=$.x1*xe+de.point.x,he=$.y1*xe+de.point.y,Ee=$.x2*xe+de.point.x,ir=$.y2*xe+de.point.y;return!this.isInsideGrid(Yt,he,Ee,ir)||!ot&&this.grid.hitTest(Yt,he,Ee,ir,Vt)?{box:[],offscreen:!1}:{box:[Yt,he,Ee,ir],offscreen:this.isOffscreen(Yt,he,Ee,ir)}},cl.prototype.placeCollisionCircles=function($,ot,et,xt,Vt,de,xe,Yt,he,Ee,ir,Ye,er){var lr=[],hr=new t.Point(ot.anchorX,ot.anchorY),Ve=qi(hr,de),Xe=Qa(this.transform.cameraToCenterDistance,Ve.signedDistanceFromCamera),Ze=Ee?Vt/Xe:Vt*Xe,Pr=Ze/t.ONE_EM,sn=qi(hr,xe).point,pn={},vi=ot.lineOffsetX*Pr,fi=ot.lineOffsetY*Pr,Xn=yo(Pr,xt,vi,fi,!1,sn,hr,ot,et,xe,pn),zi=!1,yi=!1,ea=!0;if(Xn){for(var Ii=Ye*.5*Xe+er,Oi=new t.Point(-ss,-ss),ca=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),to=new Pn,ho=Xn.first,Zo=Xn.last,xs=[],zl=ho.path.length-1;zl>=1;zl--)xs.push(ho.path[zl]);for(var Hl=1;Hl0){for(var Fs=xs[0].clone(),Su=xs[0].clone(),af=1;af=Oi.x&&Su.x<=ca.x&&Fs.y>=Oi.y&&Su.y<=ca.y?_c=[xs]:Su.xca.x||Su.yca.y?_c=[]:_c=t.clipLine([xs],Oi.x,Oi.y,ca.x,ca.y)}for(var If=0,jp=_c;If=this.screenRightBoundary||xtthis.screenBottomBoundary},cl.prototype.isInsideGrid=function($,ot,et,xt){return et>=0&&$=0&&ot0){var sn;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID].text&&(sn=this.prevPlacement.variableOffsets[Ye.crossTileID].anchor),this.variableOffsets[Ye.crossTileID]={textOffset:Ve,width:et,height:xt,anchor:$,textBoxScale:Vt,prevAnchor:sn},this.markUsedJustification(er,$,Ye,lr),er.allowVerticalPlacement&&(this.markUsedOrientation(er,lr,Ye),this.placedOrientations[Ye.crossTileID]=lr),{shift:Xe,placedGlyphBoxes:Ze}}},Us.prototype.placeLayerBucketPart=function($,ot,et){var xt=this,Vt=$.parameters,de=Vt.bucket,xe=Vt.layout,Yt=Vt.posMatrix,he=Vt.textLabelPlaneMatrix,Ee=Vt.labelToScreenMatrix,ir=Vt.textPixelRatio,Ye=Vt.holdingForFade,er=Vt.collisionBoxArray,lr=Vt.partiallyEvaluatedTextSize,hr=Vt.collisionGroup,Ve=xe.get("text-optional"),Xe=xe.get("icon-optional"),Ze=xe.get("text-allow-overlap"),Pr=xe.get("icon-allow-overlap"),sn=xe.get("text-rotation-alignment")==="map",pn=xe.get("text-pitch-alignment")==="map",vi=xe.get("icon-text-fit")!=="none",fi=xe.get("symbol-z-order")==="viewport-y",Xn=Ze&&(Pr||!de.hasIconData()||Xe),zi=Pr&&(Ze||!de.hasTextData()||Ve);!de.collisionArrays&&er&&de.deserializeCollisionBoxes(er);var yi=function(ho,Zo){if(!ot[ho.crossTileID]){if(Ye){xt.placements[ho.crossTileID]=new Ps(!1,!1,!1);return}var xs=!1,zl=!1,Hl=!0,pl=null,Wl={box:null,offscreen:null},_c={box:null,offscreen:null},Fs=null,Su=null,af=null,If=0,jp=0,b0=0;Zo.textFeatureIndex?If=Zo.textFeatureIndex:ho.useRuntimeCollisionCircles&&(If=ho.featureIndex),Zo.verticalTextFeatureIndex&&(jp=Zo.verticalTextFeatureIndex);var Tp=Zo.textBox;if(Tp){var Ap=function(of){var md=t.WritingMode.horizontal;if(de.allowVerticalPlacement&&!of&&xt.prevPlacement){var bc=xt.prevPlacement.placedOrientations[ho.crossTileID];bc&&(xt.placedOrientations[ho.crossTileID]=bc,md=bc,xt.markUsedOrientation(de,md,ho))}return md},R0=function(of,md){if(de.allowVerticalPlacement&&ho.numVerticalGlyphVertices>0&&Zo.verticalTextBox)for(var bc=0,Rg=de.writingModes;bc0&&(Qd=Qd.filter(function(of){return of!==Mp.anchor}),Qd.unshift(Mp.anchor))}var Hd=function(of,md,bc){for(var Rg=of.x2-of.x1,zv=of.y2-of.y1,Tx=ho.textBoxScale,Ic=vi&&!Pr?md:null,km={box:[],offscreen:!1},Ax=Ze?Qd.length*2:Qd.length,Ng=0;Ng=Qd.length,Ov=xt.attemptAnchorPlacement(j0,of,Rg,zv,Tx,sn,pn,ir,Yt,hr,_b,ho,de,bc,Ic);if(Ov&&(km=Ov.placedGlyphBoxes,km&&km.box&&km.box.length)){xs=!0,pl=Ov.shift;break}}return km},tm=function(){return Hd(Tp,Zo.iconBox,t.WritingMode.horizontal)},Gm=function(){var of=Zo.verticalTextBox,md=Wl&&Wl.box&&Wl.box.length;return de.allowVerticalPlacement&&!md&&ho.numVerticalGlyphVertices>0&&of?Hd(of,Zo.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};R0(tm,Gm),Wl&&(xs=Wl.box,Hl=Wl.offscreen);var Sp=Ap(Wl&&Wl.box);if(!xs&&xt.prevPlacement){var Ep=xt.prevPlacement.variableOffsets[ho.crossTileID];Ep&&(xt.variableOffsets[ho.crossTileID]=Ep,xt.markUsedJustification(de,Ep.anchor,ho,Sp))}}else{var tp=function(of,md){var bc=xt.collisionIndex.placeCollisionBox(of,Ze,ir,Yt,hr.predicate);return bc&&bc.box&&bc.box.length&&(xt.markUsedOrientation(de,md,ho),xt.placedOrientations[ho.crossTileID]=md),bc},Ym=function(){return tp(Tp,t.WritingMode.horizontal)},Dg=function(){var of=Zo.verticalTextBox;return de.allowVerticalPlacement&&ho.numVerticalGlyphVertices>0&&of?tp(of,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Ym,Dg),Ap(Wl&&Wl.box&&Wl.box.length)}}if(Fs=Wl,xs=Fs&&Fs.box&&Fs.box.length>0,Hl=Fs&&Fs.offscreen,ho.useRuntimeCollisionCircles){var Km=de.text.placedSymbolArray.get(ho.centerJustifiedTextSymbolIndex),dd=t.evaluateSizeForFeature(de.textSizeData,lr,Km),wm=xe.get("text-padding"),Fg=ho.collisionCircleDiameter;Su=xt.collisionIndex.placeCollisionCircles(Ze,Km,de.lineVertexArray,de.glyphOffsetArray,dd,Yt,he,Ee,et,pn,hr.predicate,Fg,wm),xs=Ze||Su.circles.length>0&&!Su.collisionDetected,Hl=Hl&&Su.offscreen}if(Zo.iconFeatureIndex&&(b0=Zo.iconFeatureIndex),Zo.iconBox){var pd=function(of){var md=vi&&pl?Jl(of,pl.x,pl.y,sn,pn,xt.transform.angle):of;return xt.collisionIndex.placeCollisionBox(md,Pr,ir,Yt,hr.predicate)};_c&&_c.box&&_c.box.length&&Zo.verticalIconBox?(af=pd(Zo.verticalIconBox),zl=af.box.length>0):(af=pd(Zo.iconBox),zl=af.box.length>0),Hl=Hl&&af.offscreen}var Xm=Ve||ho.numHorizontalGlyphVertices===0&&ho.numVerticalGlyphVertices===0,Pv=Xe||ho.numIconVertices===0;if(!Xm&&!Pv?zl=xs=zl&&xs:Pv?Xm||(zl=zl&&xs):xs=zl&&xs,xs&&Fs&&Fs.box&&(_c&&_c.box&&jp?xt.collisionIndex.insertCollisionBox(Fs.box,xe.get("text-ignore-placement"),de.bucketInstanceId,jp,hr.ID):xt.collisionIndex.insertCollisionBox(Fs.box,xe.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID)),zl&&af&&xt.collisionIndex.insertCollisionBox(af.box,xe.get("icon-ignore-placement"),de.bucketInstanceId,b0,hr.ID),Su&&(xs&&xt.collisionIndex.insertCollisionCircles(Su.circles,xe.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID),et)){var Iv=de.bucketInstanceId,N0=xt.collisionCircleArrays[Iv];N0===void 0&&(N0=xt.collisionCircleArrays[Iv]=new Po);for(var Bg=0;Bg=0;--Ii){var Oi=ea[Ii];yi(de.symbolInstances.get(Oi),de.collisionArrays[Oi])}else for(var ca=$.symbolInstanceStart;ca<$.symbolInstanceEnd;ca++)yi(de.symbolInstances.get(ca),de.collisionArrays[ca]);if(et&&de.bucketInstanceId in this.collisionCircleArrays){var to=this.collisionCircleArrays[de.bucketInstanceId];t.invert(to.invProjMatrix,Yt),to.viewportMatrix=this.collisionIndex.getViewportMatrix()}de.justReloaded=!1},Us.prototype.markUsedJustification=function($,ot,et,xt){var Vt={left:et.leftJustifiedTextSymbolIndex,center:et.centerJustifiedTextSymbolIndex,right:et.rightJustifiedTextSymbolIndex},de;xt===t.WritingMode.vertical?de=et.verticalPlacedTextSymbolIndex:de=Vt[t.getAnchorJustification(ot)];for(var xe=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex,et.verticalPlacedTextSymbolIndex],Yt=0,he=xe;Yt=0&&(de>=0&&Ee!==de?$.text.placedSymbolArray.get(Ee).crossTileID=0:$.text.placedSymbolArray.get(Ee).crossTileID=et.crossTileID)}},Us.prototype.markUsedOrientation=function($,ot,et){for(var xt=ot===t.WritingMode.horizontal||ot===t.WritingMode.horizontalOnly?ot:0,Vt=ot===t.WritingMode.vertical?ot:0,de=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex],xe=0,Yt=de;xe0||pn>0,yi=Pr.numIconVertices>0,ea=xt.placedOrientations[Pr.crossTileID],Ii=ea===t.WritingMode.vertical,Oi=ea===t.WritingMode.horizontal||ea===t.WritingMode.horizontalOnly;if(zi){var ca=Ru(Xn.text),to=Ii?uo:ca;lr($.text,sn,to);var ho=Oi?uo:ca;lr($.text,pn,ho);var Zo=Xn.text.isHidden();[Pr.rightJustifiedTextSymbolIndex,Pr.centerJustifiedTextSymbolIndex,Pr.leftJustifiedTextSymbolIndex].forEach(function(b0){b0>=0&&($.text.placedSymbolArray.get(b0).hidden=Zo||Ii?1:0)}),Pr.verticalPlacedTextSymbolIndex>=0&&($.text.placedSymbolArray.get(Pr.verticalPlacedTextSymbolIndex).hidden=Zo||Oi?1:0);var xs=xt.variableOffsets[Pr.crossTileID];xs&&xt.markUsedJustification($,xs.anchor,Pr,ea);var zl=xt.placedOrientations[Pr.crossTileID];zl&&(xt.markUsedJustification($,"left",Pr,zl),xt.markUsedOrientation($,zl,Pr))}if(yi){var Hl=Ru(Xn.icon),pl=!(Ye&&Pr.verticalPlacedIconSymbolIndex&&Ii);if(Pr.placedIconSymbolIndex>=0){var Wl=pl?Hl:uo;lr($.icon,Pr.numIconVertices,Wl),$.icon.placedSymbolArray.get(Pr.placedIconSymbolIndex).hidden=Xn.icon.isHidden()}if(Pr.verticalPlacedIconSymbolIndex>=0){var _c=pl?uo:Hl;lr($.icon,Pr.numVerticalIconVertices,_c),$.icon.placedSymbolArray.get(Pr.verticalPlacedIconSymbolIndex).hidden=Xn.icon.isHidden()}}if($.hasIconCollisionBoxData()||$.hasTextCollisionBoxData()){var Fs=$.collisionArrays[Ze];if(Fs){var Su=new t.Point(0,0);if(Fs.textBox||Fs.verticalTextBox){var af=!0;if(he){var If=xt.variableOffsets[vi];If?(Su=ql(If.anchor,If.width,If.height,If.textOffset,If.textBoxScale),Ee&&Su._rotate(ir?xt.transform.angle:-xt.transform.angle)):af=!1}Fs.textBox&&Pa($.textCollisionBox.collisionVertexArray,Xn.text.placed,!af||Ii,Su.x,Su.y),Fs.verticalTextBox&&Pa($.textCollisionBox.collisionVertexArray,Xn.text.placed,!af||Oi,Su.x,Su.y)}var jp=!!(!Oi&&Fs.verticalIconBox);Fs.iconBox&&Pa($.iconCollisionBox.collisionVertexArray,Xn.icon.placed,jp,Ye?Su.x:0,Ye?Su.y:0),Fs.verticalIconBox&&Pa($.iconCollisionBox.collisionVertexArray,Xn.icon.placed,!jp,Ye?Su.x:0,Ye?Su.y:0)}}},Ve=0;Ve<$.symbolInstances.length;Ve++)hr(Ve);if($.sortFeatures(this.transform.angle),this.retainedQueryData[$.bucketInstanceId]&&(this.retainedQueryData[$.bucketInstanceId].featureSortOrder=$.featureSortOrder),$.hasTextData()&&$.text.opacityVertexBuffer&&$.text.opacityVertexBuffer.updateData($.text.opacityVertexArray),$.hasIconData()&&$.icon.opacityVertexBuffer&&$.icon.opacityVertexBuffer.updateData($.icon.opacityVertexArray),$.hasIconCollisionBoxData()&&$.iconCollisionBox.collisionVertexBuffer&&$.iconCollisionBox.collisionVertexBuffer.updateData($.iconCollisionBox.collisionVertexArray),$.hasTextCollisionBoxData()&&$.textCollisionBox.collisionVertexBuffer&&$.textCollisionBox.collisionVertexBuffer.updateData($.textCollisionBox.collisionVertexArray),$.bucketInstanceId in this.collisionCircleArrays){var Xe=this.collisionCircleArrays[$.bucketInstanceId];$.placementInvProjMatrix=Xe.invProjMatrix,$.placementViewportMatrix=Xe.viewportMatrix,$.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[$.bucketInstanceId]}},Us.prototype.symbolFadeChange=function($){return this.fadeDuration===0?1:($-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Us.prototype.zoomAdjustment=function($){return Math.max(0,(this.transform.zoom-$)/1.5)},Us.prototype.hasTransitions=function($){return this.stale||$-this.lastPlacementChangeTime$},Us.prototype.setStale=function(){this.stale=!0};function Pa($,ot,et,xt,Vt){$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0)}var fo=Math.pow(2,25),qs=Math.pow(2,24),Ql=Math.pow(2,17),Jo=Math.pow(2,16),Gl=Math.pow(2,9),al=Math.pow(2,8),Ll=Math.pow(2,1);function Ru($){if($.opacity===0&&!$.placed)return 0;if($.opacity===1&&$.placed)return 4294967295;var ot=$.placed?1:0,et=Math.floor($.opacity*127);return et*fo+ot*qs+et*Ql+ot*Jo+et*Gl+ot*al+et*Ll+ot}var uo=0,Ms=function($){this._sortAcrossTiles=$.layout.get("symbol-z-order")!=="viewport-y"&&$.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ms.prototype.continuePlacement=function($,ot,et,xt,Vt){for(var de=this._bucketParts;this._currentTileIndex<$.length;){var xe=$[this._currentTileIndex];if(ot.getBucketParts(de,xt,xe,this._sortAcrossTiles),this._currentTileIndex++,Vt())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,de.sort(function(he,Ee){return he.sortKey-Ee.sortKey}));this._currentPartIndex2};this._currentPlacementIndex>=0;){var xe=$[this._currentPlacementIndex],Yt=ot[xe],he=this.placement.collisionIndex.transform.zoom;if(Yt.type==="symbol"&&(!Yt.minzoom||Yt.minzoom<=he)&&(!Yt.maxzoom||Yt.maxzoom>he)){this._inProgressLayer||(this._inProgressLayer=new Ms(Yt));var Ee=this._inProgressLayer.continuePlacement(et[Yt.source],this.placement,this._showCollisionBoxes,Yt,de);if(Ee)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Is.prototype.commit=function($){return this.placement.commit($),this.placement};var ou=512/t.EXTENT/2,hl=function($,ot,et){this.tileID=$,this.indexedSymbolInstances={},this.bucketInstanceId=et;for(var xt=0;xt$.overscaledZ)for(var he in Yt){var Ee=Yt[he];Ee.tileID.isChildOf($)&&Ee.findMatches(ot.symbolInstances,$,de)}else{var ir=$.scaledTo(Number(xe)),Ye=Yt[ir.key];Ye&&Ye.findMatches(ot.symbolInstances,$,de)}}for(var er=0;er0)throw new Error("Unimplemented: "+de.map(function(xe){return xe.command}).join(", ")+".");return Vt.forEach(function(xe){xe.command!=="setTransition"&&xt[xe.command].apply(xt,xe.args)}),this.stylesheet=et,!0},ot.prototype.addImage=function(et,xt){if(this.getImage(et))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,xt),this._afterImageUpdated(et)},ot.prototype.updateImage=function(et,xt){this.imageManager.updateImage(et,xt)},ot.prototype.getImage=function(et){return this.imageManager.getImage(et)},ot.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},ot.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},ot.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ot.prototype.addSource=function(et,xt,Vt){var de=this;if(Vt===void 0&&(Vt={}),this._checkLoaded(),this.sourceCaches[et]!==void 0)throw new Error("There is already a source with this ID");if(!xt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(xt).join(", ")+".");var xe=["vector","raster","geojson","video","image"],Yt=xe.indexOf(xt.type)>=0;if(!(Yt&&this._validate(t.validateStyle.source,"sources."+et,xt,null,Vt))){this.map&&this.map._collectResourceTiming&&(xt.collectResourceTiming=!0);var he=this.sourceCaches[et]=new Tn(et,xt,this.dispatcher);he.style=this,he.setEventedParent(this,function(){return{isSourceLoaded:de.loaded(),source:he.serialize(),sourceId:et}}),he.onAdd(this.map),this._changed=!0}},ot.prototype.removeSource=function(et){if(this._checkLoaded(),this.sourceCaches[et]===void 0)throw new Error("There is no source with this ID");for(var xt in this._layers)if(this._layers[xt].source===et)return this.fire(new t.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+xt+'" is using it.')));var Vt=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],Vt.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),Vt.setEventedParent(null),Vt.clearTiles(),Vt.onRemove&&Vt.onRemove(this.map),this._changed=!0},ot.prototype.setGeoJSONSourceData=function(et,xt){this._checkLoaded();var Vt=this.sourceCaches[et].getSource();Vt.setData(xt),this._changed=!0},ot.prototype.getSource=function(et){return this.sourceCaches[et]&&this.sourceCaches[et].getSource()},ot.prototype.addLayer=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=et.id;if(this.getLayer(de)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+de+'" already exists on this map')));return}var xe;if(et.type==="custom"){if(bl(this,t.validateCustomStyleLayer(et)))return;xe=t.createStyleLayer(et)}else{if(typeof et.source=="object"&&(this.addSource(de,et.source),et=t.clone$1(et),et=t.extend(et,{source:de})),this._validate(t.validateStyle.layer,"layers."+de,et,{arrayIndex:-1},Vt))return;xe=t.createStyleLayer(et),this._validateLayer(xe),xe.setEventedParent(this,{layer:{id:de}}),this._serializedLayers[xe.id]=xe.serialize()}var Yt=xt?this._order.indexOf(xt):this._order.length;if(xt&&Yt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}if(this._order.splice(Yt,0,de),this._layerOrderChanged=!0,this._layers[de]=xe,this._removedLayers[de]&&xe.source&&xe.type!=="custom"){var he=this._removedLayers[de];delete this._removedLayers[de],he.type!==xe.type?this._updatedSources[xe.source]="clear":(this._updatedSources[xe.source]="reload",this.sourceCaches[xe.source].pause())}this._updateLayer(xe),xe.onAdd&&xe.onAdd(this.map)},ot.prototype.moveLayer=function(et,xt){this._checkLoaded(),this._changed=!0;var Vt=this._layers[et];if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")));return}if(et!==xt){var de=this._order.indexOf(et);this._order.splice(de,1);var xe=xt?this._order.indexOf(xt):this._order.length;if(xt&&xe===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}this._order.splice(xe,0,et),this._layerOrderChanged=!0}},ot.prototype.removeLayer=function(et){this._checkLoaded();var xt=this._layers[et];if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")));return}xt.setEventedParent(null);var Vt=this._order.indexOf(et);this._order.splice(Vt,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=xt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],xt.onRemove&&xt.onRemove(this.map)},ot.prototype.getLayer=function(et){return this._layers[et]},ot.prototype.hasLayer=function(et){return et in this._layers},ot.prototype.setLayerZoomRange=function(et,xt,Vt){this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")));return}de.minzoom===xt&&de.maxzoom===Vt||(xt!=null&&(de.minzoom=xt),Vt!=null&&(de.maxzoom=Vt),this._updateLayer(de))},ot.prototype.setFilter=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(de.filter,xt)){if(xt==null){de.filter=void 0,this._updateLayer(de);return}this._validate(t.validateStyle.filter,"layers."+de.id+".filter",xt,null,Vt)||(de.filter=t.clone$1(xt),this._updateLayer(de))}},ot.prototype.getFilter=function(et){return t.clone$1(this.getLayer(et).filter)},ot.prototype.setLayoutProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var xe=this.getLayer(et);if(!xe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(xe.getLayoutProperty(xt),Vt)||(xe.setLayoutProperty(xt,Vt,de),this._updateLayer(xe))},ot.prototype.getLayoutProperty=function(et,xt){var Vt=this.getLayer(et);if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")));return}return Vt.getLayoutProperty(xt)},ot.prototype.setPaintProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var xe=this.getLayer(et);if(!xe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(xe.getPaintProperty(xt),Vt)){var Yt=xe.setPaintProperty(xt,Vt,de);Yt&&this._updateLayer(xe),this._changed=!0,this._updatedPaintProps[et]=!0}},ot.prototype.getPaintProperty=function(et,xt){return this.getLayer(et).getPaintProperty(xt)},ot.prototype.setFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=et.sourceLayer,xe=this.sourceCaches[Vt];if(xe===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var Yt=xe.getSource().type;if(Yt==="geojson"&&de){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Yt==="vector"&&!de){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),xe.setFeatureState(de,et.id,xt)},ot.prototype.removeFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=this.sourceCaches[Vt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var xe=de.getSource().type,Yt=xe==="vector"?et.sourceLayer:void 0;if(xe==="vector"&&!Yt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xt&&typeof et.id!="string"&&typeof et.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}de.removeFeatureState(Yt,et.id,xt)},ot.prototype.getFeatureState=function(et){this._checkLoaded();var xt=et.source,Vt=et.sourceLayer,de=this.sourceCaches[xt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xt+"' does not exist in the map's style.")));return}var xe=de.getSource().type;if(xe==="vector"&&!Vt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),de.getFeatureState(Vt,et.id)},ot.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ot.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(et){return et.serialize()}),layers:this._serializeLayers(this._order)},function(et){return et!==void 0})},ot.prototype._updateLayer=function(et){this._updatedLayers[et.id]=!0,et.source&&!this._updatedSources[et.source]&&this.sourceCaches[et.source].getSource().type!=="raster"&&(this._updatedSources[et.source]="reload",this.sourceCaches[et.source].pause()),this._changed=!0},ot.prototype._flattenAndSortRenderedFeatures=function(et){for(var xt=this,Vt=function(Oi){return xt._layers[Oi].type==="fill-extrusion"},de={},xe=[],Yt=this._order.length-1;Yt>=0;Yt--){var he=this._order[Yt];if(Vt(he)){de[he]=Yt;for(var Ee=0,ir=et;Ee=0;Ze--){var Pr=this._order[Ze];if(Vt(Pr))for(var sn=xe.length-1;sn>=0;sn--){var pn=xe[sn].feature;if(de[pn.layer.id] 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Zf=`#ifdef GL_ES +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Gf=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,xf="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Hh=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +}`,xf="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Wh=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Uf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Vf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,Hf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Wf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3075,7 +3075,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,lh=` +}`,uh=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color @@ -3091,7 +3091,7 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Gf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Yf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { @@ -3101,7 +3101,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Eh=` +}`,Ch=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur @@ -3115,7 +3115,7 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,gh=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,vh=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from @@ -3174,7 +3174,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Hf=` +}`,qf=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; @@ -3205,7 +3205,7 @@ lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)* #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Yf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +}`,Kf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity @@ -3228,7 +3228,7 @@ float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scal #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Kf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +}`,Xf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3265,7 +3265,7 @@ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float ga #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Xf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +}`,Jf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3279,58 +3279,58 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Ou=yu(Jc,ah),jc=yu(Bf,Sf),Wh=yu(Fl,Bc),hu=yu(Nf,hc),Ch=yu(oc,fc),Mc=yu(oh,cu),Uc=yu(sc,rl),bu=yu(Yl,Sh),uf=yu(Cc,Uh),vh=yu(_u,Ed),qh=yu(tl,Vd),Cf=yu(Ll,Qo),Ld=yu(lf,sh),Jd=yu(rc,jf),cf=yu(Vh,yf),Lf=yu(lc,hd),wc=yu(Zf,xf),hf=yu(Hh,Uf),Qc=yu(Vf,lh),ff=yu(Gf,Eh),Pf=yu(gh,uc),yh=yu(rf,Hf),wu=yu(eu,Ef),Lh=yu(Cd,Yf),Vc=yu(_f,Kf),fd=yu(Nc,Xf);function yu($,ot){var et=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,xt=ot.match(/attribute ([\w]+) ([\w]+)/g),Vt=$.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=ot.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ye=de?de.concat(Vt):Vt,Yt={};return $=$.replace(et,function(ce,Se,ir,Ye,tr){return Yt[tr]=!0,Se==="define"?` -#ifndef HAS_UNIFORM_u_`+tr+` -varying `+ir+" "+Ye+" "+tr+`; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Du=yu(Jc,oh),jc=yu(jf,Sf),qh=yu(Bl,Rc),hu=yu(Uf,hc),Lh=yu(oc,fc),Mc=yu(sh,cu),Uc=yu(sc,rl),wu=yu(Yl,Eh),uf=yu(Lc,Vh),yh=yu(bu,Ed),$h=yu(tl,Vd),Cf=yu(Pl,ts),Ld=yu(lf,lh),Jd=yu(rc,Vf),cf=yu(Hh,yf),Lf=yu(lc,hd),wc=yu(Gf,xf),hf=yu(Wh,Hf),Qc=yu(Wf,uh),ff=yu(Yf,Ch),Pf=yu(vh,uc),xh=yu(rf,qf),ku=yu(eu,Ef),Ph=yu(Cd,Kf),Vc=yu(_f,Xf),fd=yu(Nc,Jf);function yu($,ot){var et=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,xt=ot.match(/attribute ([\w]+) ([\w]+)/g),Vt=$.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=ot.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),xe=de?de.concat(Vt):Vt,Yt={};return $=$.replace(et,function(he,Ee,ir,Ye,er){return Yt[er]=!0,Ee==="define"?` +#ifndef HAS_UNIFORM_u_`+er+` +varying `+ir+" "+Ye+" "+er+`; #else -uniform `+ir+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+er+`; #endif `:` -#ifdef HAS_UNIFORM_u_`+tr+` - `+ir+" "+Ye+" "+tr+" = u_"+tr+`; +#ifdef HAS_UNIFORM_u_`+er+` + `+ir+" "+Ye+" "+er+" = u_"+er+`; #endif -`}),ot=ot.replace(et,function(ce,Se,ir,Ye,tr){var lr=Ye==="float"?"vec2":"vec4",hr=tr.match(/color/)?"color":lr;return Yt[tr]?Se==="define"?` -#ifndef HAS_UNIFORM_u_`+tr+` -uniform lowp float u_`+tr+`_t; -attribute `+ir+" "+lr+" a_"+tr+`; -varying `+ir+" "+Ye+" "+tr+`; +`}),ot=ot.replace(et,function(he,Ee,ir,Ye,er){var lr=Ye==="float"?"vec2":"vec4",hr=er.match(/color/)?"color":lr;return Yt[er]?Ee==="define"?` +#ifndef HAS_UNIFORM_u_`+er+` +uniform lowp float u_`+er+`_t; +attribute `+ir+" "+lr+" a_"+er+`; +varying `+ir+" "+Ye+" "+er+`; #else -uniform `+ir+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+er+`; #endif `:hr==="vec4"?` -#ifndef HAS_UNIFORM_u_`+tr+` - `+tr+" = a_"+tr+`; +#ifndef HAS_UNIFORM_u_`+er+` + `+er+" = a_"+er+`; #else - `+ir+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+er+" = u_"+er+`; #endif `:` -#ifndef HAS_UNIFORM_u_`+tr+` - `+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); +#ifndef HAS_UNIFORM_u_`+er+` + `+er+" = unpack_mix_"+hr+"(a_"+er+", u_"+er+`_t); #else - `+ir+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+er+" = u_"+er+`; #endif -`:Se==="define"?` -#ifndef HAS_UNIFORM_u_`+tr+` -uniform lowp float u_`+tr+`_t; -attribute `+ir+" "+lr+" a_"+tr+`; +`:Ee==="define"?` +#ifndef HAS_UNIFORM_u_`+er+` +uniform lowp float u_`+er+`_t; +attribute `+ir+" "+lr+" a_"+er+`; #else -uniform `+ir+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+er+`; #endif `:hr==="vec4"?` -#ifndef HAS_UNIFORM_u_`+tr+` - `+ir+" "+Ye+" "+tr+" = a_"+tr+`; +#ifndef HAS_UNIFORM_u_`+er+` + `+ir+" "+Ye+" "+er+" = a_"+er+`; #else - `+ir+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+er+" = u_"+er+`; #endif `:` -#ifndef HAS_UNIFORM_u_`+tr+` - `+ir+" "+Ye+" "+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); +#ifndef HAS_UNIFORM_u_`+er+` + `+ir+" "+Ye+" "+er+" = unpack_mix_"+hr+"(a_"+er+", u_"+er+`_t); #else - `+ir+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+er+" = u_"+er+`; #endif -`}),{fragmentSource:$,vertexSource:ot,staticAttributes:xt,staticUniforms:ye}}var bf=Object.freeze({__proto__:null,prelude:Ou,background:jc,backgroundPattern:Wh,circle:hu,clippingMask:Ch,heatmap:Mc,heatmapTexture:Uc,collisionBox:bu,collisionCircle:uf,debug:vh,fill:qh,fillOutline:Cf,fillOutlinePattern:Ld,fillPattern:Jd,fillExtrusion:cf,fillExtrusionPattern:Lf,hillshadePrepare:wc,hillshade:hf,line:Qc,lineGradient:ff,linePattern:Pf,lineSDF:yh,raster:wu,symbolIcon:Lh,symbolSDF:Vc,symbolTextAndIcon:fd}),$h=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};$h.prototype.bind=function($,ot,et,xt,Vt,de,ye,Yt){this.context=$;for(var ce=this.boundPaintVertexBuffers.length!==xt.length,Se=0;!ce&&Se>16,Yt>>16],u_pixel_coord_lower:[ye&65535,Yt&65535]}}function wf($,ot,et,xt){var Vt=et.imageManager.getPattern($.from.toString()),de=et.imageManager.getPattern($.to.toString()),ye=et.imageManager.getPixelSize(),Yt=ye.width,ce=ye.height,Se=Math.pow(2,xt.tileID.overscaledZ),ir=xt.tileSize*Math.pow(2,et.transform.tileZoom)/Se,Ye=ir*(xt.tileID.canonical.x+xt.tileID.wrap*Se),tr=ir*xt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Vt.tl,u_pattern_br_a:Vt.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[Yt,ce],u_mix:ot.t,u_pattern_size_a:Vt.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:ot.fromScale,u_scale_b:ot.toScale,u_tile_units_to_pixels:1/Qs(xt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ye>>16,tr>>16],u_pixel_coord_lower:[Ye&65535,tr&65535]}}var Pd=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_opacity:new t.Uniform1f($,ot.u_opacity)}},gc=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_height_factor:new t.Uniform1f($,ot.u_height_factor),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade),u_opacity:new t.Uniform1f($,ot.u_opacity)}},Jf=function($,ot,et,xt){var Vt=ot.style.light,de=Vt.properties.get("position"),ye=[de.x,de.y,de.z],Yt=t.create$1();Vt.properties.get("anchor")==="viewport"&&t.fromRotation(Yt,-ot.transform.angle),t.transformMat3(ye,ye,Yt);var ce=Vt.properties.get("color");return{u_matrix:$,u_lightpos:ye,u_lightintensity:Vt.properties.get("intensity"),u_lightcolor:[ce.r,ce.g,ce.b],u_vertical_gradient:+et,u_opacity:xt}},eh=function($,ot,et,xt,Vt,de,ye){return t.extend(Jf($,ot,et,xt),Zh(de,ot,ye),{u_height_factor:-Math.pow(2,Vt.overscaledZ)/ye.tileSize/8})},Ph=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},xh=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},Bu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world)}},iu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},_h=function($){return{u_matrix:$}},df=function($,ot,et,xt){return t.extend(_h($),Zh(et,ot,xt))},bh=function($,ot){return{u_matrix:$,u_world:ot}},Wf=function($,ot,et,xt,Vt){return t.extend(df($,ot,et,xt),{u_world:Vt})},gr=function($,ot){return{u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i($,ot.u_scale_with_map),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Ur=function($,ot,et,xt){var Vt=$.transform,de,ye;if(xt.paint.get("circle-pitch-alignment")==="map"){var Yt=Qs(et,1,Vt.zoom);de=!0,ye=[Yt,Yt]}else de=!1,ye=Vt.pixelsToGLUnits;return{u_camera_to_center_distance:Vt.cameraToCenterDistance,u_scale_with_map:+(xt.paint.get("circle-pitch-scale")==="map"),u_matrix:$.translatePosMatrix(ot.posMatrix,et,xt.paint.get("circle-translate"),xt.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:ye}},wn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f($,ot.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_overscale_factor:new t.Uniform1f($,ot.u_overscale_factor)}},hn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_inv_matrix:new t.UniformMatrix4f($,ot.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f($,ot.u_viewport_size)}},qn=function($,ot,et){var xt=Qs(et,1,ot.zoom),Vt=Math.pow(2,ot.zoom-et.tileID.overscaledZ),de=et.tileID.overscaleFactor();return{u_matrix:$,u_camera_to_center_distance:ot.cameraToCenterDistance,u_pixels_to_tile_units:xt,u_extrude_scale:[ot.pixelsToGLUnits[0]/(xt*Vt),ot.pixelsToGLUnits[1]/(xt*Vt)],u_overscale_factor:de}},di=function($,ot,et){return{u_matrix:$,u_inv_matrix:ot,u_camera_to_center_distance:et.cameraToCenterDistance,u_viewport_size:[et.width,et.height]}},aa=function($,ot){return{u_color:new t.UniformColor($,ot.u_color),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_overlay:new t.Uniform1i($,ot.u_overlay),u_overlay_scale:new t.Uniform1f($,ot.u_overlay_scale)}},va=function($,ot,et){return et===void 0&&(et=1),{u_matrix:$,u_color:ot,u_overlay:0,u_overlay_scale:et}},Ba=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Za=function($){return{u_matrix:$}},ca=function($,ot){return{u_extrude_scale:new t.Uniform1f($,ot.u_extrude_scale),u_intensity:new t.Uniform1f($,ot.u_intensity),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Oa=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_color_ramp:new t.Uniform1i($,ot.u_color_ramp),u_opacity:new t.Uniform1f($,ot.u_opacity)}},ka=function($,ot,et,xt){return{u_matrix:$,u_extrude_scale:Qs(ot,1,et),u_intensity:xt}},na=function($,ot,et,xt){var Vt=t.create();t.ortho(Vt,0,$.width,$.height,0,0,1);var de=$.context.gl;return{u_matrix:Vt,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:et,u_color_ramp:xt,u_opacity:ot.paint.get("heatmap-opacity")}},io=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_latrange:new t.Uniform2f($,ot.u_latrange),u_light:new t.Uniform2f($,ot.u_light),u_shadow:new t.UniformColor($,ot.u_shadow),u_highlight:new t.UniformColor($,ot.u_highlight),u_accent:new t.UniformColor($,ot.u_accent)}},ns=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_dimension:new t.Uniform2f($,ot.u_dimension),u_zoom:new t.Uniform1f($,ot.u_zoom),u_unpack:new t.Uniform4f($,ot.u_unpack)}},Ko=function($,ot,et){var xt=et.paint.get("hillshade-shadow-color"),Vt=et.paint.get("hillshade-highlight-color"),de=et.paint.get("hillshade-accent-color"),ye=et.paint.get("hillshade-illumination-direction")*(Math.PI/180);et.paint.get("hillshade-illumination-anchor")==="viewport"&&(ye-=$.transform.angle);var Yt=!$.options.moving;return{u_matrix:$.transform.calculatePosMatrix(ot.tileID.toUnwrapped(),Yt),u_image:0,u_latrange:ps($,ot.tileID),u_light:[et.paint.get("hillshade-exaggeration"),ye],u_shadow:xt,u_highlight:Vt,u_accent:de}},ls=function($,ot){var et=ot.stride,xt=t.create();return t.ortho(xt,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xt,xt,[0,-t.EXTENT,0]),{u_matrix:xt,u_image:1,u_dimension:[et,et],u_zoom:$.overscaledZ,u_unpack:ot.getUnpackVector()}};function ps($,ot){var et=Math.pow(2,ot.canonical.z),xt=ot.canonical.y;return[new t.MercatorCoordinate(0,xt/et).toLngLat().lat,new t.MercatorCoordinate(0,(xt+1)/et).toLngLat().lat]}var oo=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels)}},qa=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_image:new t.Uniform1i($,ot.u_image),u_image_height:new t.Uniform1f($,ot.u_image_height)}},gs=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_texsize:new t.Uniform2f($,ot.u_texsize),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_image:new t.Uniform1i($,ot.u_image),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},el=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_patternscale_a:new t.Uniform2f($,ot.u_patternscale_a),u_patternscale_b:new t.Uniform2f($,ot.u_patternscale_b),u_sdfgamma:new t.Uniform1f($,ot.u_sdfgamma),u_image:new t.Uniform1i($,ot.u_image),u_tex_y_a:new t.Uniform1f($,ot.u_tex_y_a),u_tex_y_b:new t.Uniform1f($,ot.u_tex_y_b),u_mix:new t.Uniform1f($,ot.u_mix)}},Pl=function($,ot,et){var xt=$.transform;return{u_matrix:qu($,ot,et),u_ratio:1/Qs(ot,1,xt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/xt.pixelsToGLUnits[0],1/xt.pixelsToGLUnits[1]]}},su=function($,ot,et,xt){return t.extend(Pl($,ot,et),{u_image:0,u_image_height:xt})},$l=function($,ot,et,xt){var Vt=$.transform,de=ml(ot,Vt);return{u_matrix:qu($,ot,et),u_texsize:ot.imageAtlasTexture.size,u_ratio:1/Qs(ot,1,Vt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[de,xt.fromScale,xt.toScale],u_fade:xt.t,u_units_to_pixels:[1/Vt.pixelsToGLUnits[0],1/Vt.pixelsToGLUnits[1]]}},lu=function($,ot,et,xt,Vt){var de=$.transform,ye=$.lineAtlas,Yt=ml(ot,de),ce=et.layout.get("line-cap")==="round",Se=ye.getDash(xt.from,ce),ir=ye.getDash(xt.to,ce),Ye=Se.width*Vt.fromScale,tr=ir.width*Vt.toScale;return t.extend(Pl($,ot,et),{u_patternscale_a:[Yt/Ye,-Se.height/2],u_patternscale_b:[Yt/tr,-ir.height/2],u_sdfgamma:ye.width/(Math.min(Ye,tr)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Se.y,u_tex_y_b:ir.y,u_mix:Vt.t})};function ml($,ot){return 1/Qs($,1,ot.tileZoom)}function qu($,ot,et){return $.translatePosMatrix(ot.tileID.posMatrix,ot,et.paint.get("line-translate"),et.paint.get("line-translate-anchor"))}var Iu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_tl_parent:new t.Uniform2f($,ot.u_tl_parent),u_scale_parent:new t.Uniform1f($,ot.u_scale_parent),u_buffer_scale:new t.Uniform1f($,ot.u_buffer_scale),u_fade_t:new t.Uniform1f($,ot.u_fade_t),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image0:new t.Uniform1i($,ot.u_image0),u_image1:new t.Uniform1i($,ot.u_image1),u_brightness_low:new t.Uniform1f($,ot.u_brightness_low),u_brightness_high:new t.Uniform1f($,ot.u_brightness_high),u_saturation_factor:new t.Uniform1f($,ot.u_saturation_factor),u_contrast_factor:new t.Uniform1f($,ot.u_contrast_factor),u_spin_weights:new t.Uniform3f($,ot.u_spin_weights)}},fu=function($,ot,et,xt,Vt){return{u_matrix:$,u_tl_parent:ot,u_scale_parent:et,u_buffer_scale:1,u_fade_t:xt.mix,u_opacity:xt.opacity*Vt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Vt.paint.get("raster-brightness-min"),u_brightness_high:Vt.paint.get("raster-brightness-max"),u_saturation_factor:Kl(Vt.paint.get("raster-saturation")),u_contrast_factor:Es(Vt.paint.get("raster-contrast")),u_spin_weights:Oo(Vt.paint.get("raster-hue-rotate"))}};function Oo($){$*=Math.PI/180;var ot=Math.sin($),et=Math.cos($);return[(2*et+1)/3,(-Math.sqrt(3)*ot-et+1)/3,(Math.sqrt(3)*ot-et+1)/3]}function Es($){return $>0?1/(1-$):1+$}function Kl($){return $>0?1-1/(1.001-$):-$}var Rl=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture)}},vc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Hc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texsize_icon:new t.Uniform2f($,ot.u_texsize_icon),u_texture:new t.Uniform1i($,ot.u_texture),u_texture_icon:new t.Uniform1i($,ot.u_texture_icon),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Lc=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se){var ir=Vt.transform;return{u_is_size_zoom_constant:+($==="constant"||$==="source"),u_is_size_feature_constant:+($==="constant"||$==="camera"),u_size_t:ot?ot.uSizeT:0,u_size:ot?ot.uSize:0,u_camera_to_center_distance:ir.cameraToCenterDistance,u_pitch:ir.pitch/360*2*Math.PI,u_rotate_symbol:+et,u_aspect_ratio:ir.width/ir.height,u_fade_change:Vt.options.fadeDuration?Vt.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ye,u_coord_matrix:Yt,u_is_text:+ce,u_pitch_with_map:+xt,u_texsize:Se,u_texture:0}},Ih=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir){var Ye=Vt.transform;return t.extend(Lc($,ot,et,xt,Vt,de,ye,Yt,ce,Se),{u_gamma_scale:xt?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Wc=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se){return t.extend(Ih($,ot,et,xt,Vt,de,ye,Yt,!0,ce),{u_texsize_icon:Se,u_texture_icon:1})},zh=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_color:new t.UniformColor($,ot.u_color)}},Du=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image:new t.Uniform1i($,ot.u_image),u_pattern_tl_a:new t.Uniform2f($,ot.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f($,ot.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f($,ot.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f($,ot.u_pattern_br_b),u_texsize:new t.Uniform2f($,ot.u_texsize),u_mix:new t.Uniform1f($,ot.u_mix),u_pattern_size_a:new t.Uniform2f($,ot.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f($,ot.u_pattern_size_b),u_scale_a:new t.Uniform1f($,ot.u_scale_a),u_scale_b:new t.Uniform1f($,ot.u_scale_b),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f($,ot.u_tile_units_to_pixels)}},Oh=function($,ot,et){return{u_matrix:$,u_opacity:ot,u_color:et}},rs=function($,ot,et,xt,Vt,de){return t.extend(wf(xt,de,et,Vt),{u_matrix:$,u_opacity:ot})},zs={fillExtrusion:Pd,fillExtrusionPattern:gc,fill:Ph,fillPattern:xh,fillOutline:Bu,fillOutlinePattern:iu,circle:gr,collisionBox:wn,collisionCircle:hn,debug:aa,clippingMask:Ba,heatmap:ca,heatmapTexture:Oa,hillshade:io,hillshadePrepare:ns,line:oo,lineGradient:qa,linePattern:gs,lineSDF:el,raster:Iu,symbolIcon:Rl,symbolSDF:vc,symbolTextAndIcon:Hc,background:zh,backgroundPattern:Du},qc;function $u($,ot,et,xt,Vt,de,ye){for(var Yt=$.context,ce=Yt.gl,Se=$.useProgram("collisionBox"),ir=[],Ye=0,tr=0,lr=0;lr0){var dn=t.create(),pi=Ze;t.mul(dn,Xe.placementInvProjMatrix,$.transform.glCoordMatrix),t.mul(dn,dn,Xe.placementViewportMatrix),ir.push({circleArray:sn,circleOffset:tr,transform:pi,invTransform:dn}),Ye+=sn.length/4,tr=Ye}Pr&&Se.draw(Yt,ce.LINES,Xn.disabled,$n.disabled,$.colorModeForRenderPass(),tn.disabled,qn(Ze,$.transform,Ve),et.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,null,$.transform.zoom,null,null,Pr.collisionVertexBuffer)}}if(!(!ye||!ir.length)){var ui=$.useProgram("collisionCircle"),Yn=new t.StructArrayLayout2f1f2i16;Yn.resize(Ye*4),Yn._trim();for(var Ci=0,mi=0,ea=ir;mi=0&&(hr[Xe.associatedIconIndex]={shiftedAnchor:la,angle:to})}}if(ir){lr.clear();for(var qo=$.icon.placedSymbolArray,xs=0;xs0){var ye=t.browser.now(),Yt=(ye-$.timeAdded)/de,ce=ot?(ye-ot.timeAdded)/de:-1,Se=et.getSource(),ir=Vt.coveringZoomLevel({tileSize:Se.tileSize,roundZoom:Se.roundZoom}),Ye=!ot||Math.abs(ot.tileID.overscaledZ-ir)>Math.abs($.tileID.overscaledZ-ir),tr=Ye&&$.refreshedUponExpiration?1:t.clamp(Ye?Yt:1-ce,0,1);return $.refreshedUponExpiration&&Yt>=1&&($.refreshedUponExpiration=!1),ot?{opacity:1,mix:1-tr}:{opacity:tr,mix:0}}else return{opacity:1,mix:0}}function Nr($,ot,et){var xt=et.paint.get("background-color"),Vt=et.paint.get("background-opacity");if(Vt!==0){var de=$.context,ye=de.gl,Yt=$.transform,ce=Yt.tileSize,Se=et.paint.get("background-pattern");if(!$.isPatternMissing(Se)){var ir=!Se&&xt.a===1&&Vt===1&&$.opaquePassEnabledForLayer()?"opaque":"translucent";if($.renderPass===ir){var Ye=$n.disabled,tr=$.depthModeForSublayer(0,ir==="opaque"?Xn.ReadWrite:Xn.ReadOnly),lr=$.colorModeForRenderPass(),hr=$.useProgram(Se?"backgroundPattern":"background"),Ve=Yt.coveringTiles({tileSize:ce});Se&&(de.activeTexture.set(ye.TEXTURE0),$.imageManager.bind($.context));for(var Xe=et.getCrossfadeParameters(),Ze=0,Pr=Ve;Ze "+et.overscaledZ);var Ze=Xe+" "+lr+"kb";ds($,Ze),ye.draw(xt,Vt.TRIANGLES,Yt,ce,nr.alphaBlended,tn.disabled,va(de,t.Color.transparent,Ve),ir,$.debugBuffer,$.quadTriangleIndexBuffer,$.debugSegments)}function ds($,ot){$.initDebugOverlayCanvas();var et=$.debugOverlayCanvas,xt=$.context.gl,Vt=$.debugOverlayCanvas.getContext("2d");Vt.clearRect(0,0,et.width,et.height),Vt.shadowColor="white",Vt.shadowBlur=2,Vt.lineWidth=1.5,Vt.strokeStyle="white",Vt.textBaseline="top",Vt.font="bold 36px Open Sans, sans-serif",Vt.fillText(ot,5,5),Vt.strokeText(ot,5,5),$.debugOverlayTexture.update(et),$.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}function fl($,ot,et){var xt=$.context,Vt=et.implementation;if($.renderPass==="offscreen"){var de=Vt.prerender;de&&($.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),de.call(Vt,xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState())}else if($.renderPass==="translucent"){$.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),xt.setStencilMode($n.disabled);var ye=Vt.renderingMode==="3d"?new Xn($.context.gl.LEQUAL,Xn.ReadWrite,$.depthRangeFor3D):$.depthModeForSublayer(0,Xn.ReadOnly);xt.setDepthMode(ye),Vt.render(xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState(),xt.bindFramebuffer.set(null)}}var vl={symbol:z,circle:Ke,heatmap:vr,line:Sn,fill:Xt,"fill-extrusion":xe,hillshade:je,raster:wr,background:Nr,debug:Bo,custom:fl},Ds=function($,ot){this.context=new Cn($),this.transform=ot,this._tileTextures={},this.setup(),this.numSublayers=Tn.maxUnderzooming+Tn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gu,this.gpuTimers={}};Ds.prototype.resize=function($,ot){if(this.width=$*t.browser.devicePixelRatio,this.height=ot*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var et=0,xt=this.style._order;et256&&this.clearStencil(),et.setColorMode(nr.disabled),et.setDepthMode(Xn.disabled);var Vt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var de=0,ye=ot;de256&&this.clearStencil();var $=this.nextStencilID++,ot=this.context.gl;return new $n({func:ot.NOTEQUAL,mask:255},$,255,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilModeForClipping=function($){var ot=this.context.gl;return new $n({func:ot.EQUAL,mask:255},this._tileClippingMaskIDs[$.key],0,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilConfigForOverlap=function($){var ot,et=this.context.gl,xt=$.sort(function(ce,Se){return Se.overscaledZ-ce.overscaledZ}),Vt=xt[xt.length-1].overscaledZ,de=xt[0].overscaledZ-Vt+1;if(de>1){this.currentStencilSource=void 0,this.nextStencilID+de>256&&this.clearStencil();for(var ye={},Yt=0;Yt=0;this.currentLayer--){var sn=this.style._layers[xt[this.currentLayer]],dn=Vt[sn.source],pi=Yt[sn.source];this._renderTileClippingMasks(sn,pi),this.renderLayer(this,dn,sn,pi)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ot.pop():null},Ds.prototype.isPatternMissing=function($){if(!$)return!1;if(!$.from||!$.to)return!0;var ot=this.imageManager.getPattern($.from.toString()),et=this.imageManager.getPattern($.to.toString());return!ot||!et},Ds.prototype.useProgram=function($,ot){this.cache=this.cache||{};var et=""+$+(ot?ot.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[et]||(this.cache[et]=new nf(this.context,$,bf[$],ot,zs[$],this._showOverdrawInspector)),this.cache[et]},Ds.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ds.prototype.setBaseState=function(){var $=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set($.FUNC_ADD)},Ds.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var $=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,$.RGBA)}},Ds.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wl=function($,ot){this.points=$,this.planes=ot};wl.fromInvProjectionMatrix=function($,ot,et){var xt=[[-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]],Vt=Math.pow(2,et),de=xt.map(function(ce){return t.transformMat4([],ce,$)}).map(function(ce){return t.scale$1([],ce,1/ce[3]/ot*Vt)}),ye=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Yt=ye.map(function(ce){var Se=t.sub([],de[ce[0]],de[ce[1]]),ir=t.sub([],de[ce[2]],de[ce[1]]),Ye=t.normalize([],t.cross([],Se,ir)),tr=-t.dot(Ye,de[ce[1]]);return Ye.concat(tr)});return new wl(de,Yt)};var Eu=function($,ot){this.min=$,this.max=ot,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Eu.prototype.quadrant=function($){for(var ot=[$%2===0,$<2],et=t.clone$2(this.min),xt=t.clone$2(this.max),Vt=0;Vt=0;if(de===0)return 0;de!==ot.length&&(et=!1)}if(et)return 2;for(var Yt=0;Yt<3;Yt++){for(var ce=Number.MAX_VALUE,Se=-Number.MAX_VALUE,ir=0;ir<$.points.length;ir++){var Ye=$.points[ir][Yt]-this.min[Yt];ce=Math.min(ce,Ye),Se=Math.max(Se,Ye)}if(Se<0||ce>this.max[Yt]-this.min[Yt])return 0}return 1};var gu=function($,ot,et,xt){if($===void 0&&($=0),ot===void 0&&(ot=0),et===void 0&&(et=0),xt===void 0&&(xt=0),isNaN($)||$<0||isNaN(ot)||ot<0||isNaN(et)||et<0||isNaN(xt)||xt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=$,this.bottom=ot,this.left=et,this.right=xt};gu.prototype.interpolate=function($,ot,et){return ot.top!=null&&$.top!=null&&(this.top=t.number($.top,ot.top,et)),ot.bottom!=null&&$.bottom!=null&&(this.bottom=t.number($.bottom,ot.bottom,et)),ot.left!=null&&$.left!=null&&(this.left=t.number($.left,ot.left,et)),ot.right!=null&&$.right!=null&&(this.right=t.number($.right,ot.right,et)),this},gu.prototype.getCenter=function($,ot){var et=t.clamp((this.left+$-this.right)/2,0,$),xt=t.clamp((this.top+ot-this.bottom)/2,0,ot);return new t.Point(et,xt)},gu.prototype.equals=function($){return this.top===$.top&&this.bottom===$.bottom&&this.left===$.left&&this.right===$.right},gu.prototype.clone=function(){return new gu(this.top,this.bottom,this.left,this.right)},gu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var $s=function($,ot,et,xt,Vt){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Vt===void 0?!0:Vt,this._minZoom=$||0,this._maxZoom=ot||22,this._minPitch=et??0,this._maxPitch=xt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gu,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zs={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};$s.prototype.clone=function(){var $=new $s(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return $.tileSize=this.tileSize,$.latRange=this.latRange,$.width=this.width,$.height=this.height,$._center=this._center,$.zoom=this.zoom,$.angle=this.angle,$._fov=this._fov,$._pitch=this._pitch,$._unmodified=this._unmodified,$._edgeInsets=this._edgeInsets.clone(),$._calcMatrices(),$},Zs.minZoom.get=function(){return this._minZoom},Zs.minZoom.set=function($){this._minZoom!==$&&(this._minZoom=$,this.zoom=Math.max(this.zoom,$))},Zs.maxZoom.get=function(){return this._maxZoom},Zs.maxZoom.set=function($){this._maxZoom!==$&&(this._maxZoom=$,this.zoom=Math.min(this.zoom,$))},Zs.minPitch.get=function(){return this._minPitch},Zs.minPitch.set=function($){this._minPitch!==$&&(this._minPitch=$,this.pitch=Math.max(this.pitch,$))},Zs.maxPitch.get=function(){return this._maxPitch},Zs.maxPitch.set=function($){this._maxPitch!==$&&(this._maxPitch=$,this.pitch=Math.min(this.pitch,$))},Zs.renderWorldCopies.get=function(){return this._renderWorldCopies},Zs.renderWorldCopies.set=function($){$===void 0?$=!0:$===null&&($=!1),this._renderWorldCopies=$},Zs.worldSize.get=function(){return this.tileSize*this.scale},Zs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zs.size.get=function(){return new t.Point(this.width,this.height)},Zs.bearing.get=function(){return-this.angle/Math.PI*180},Zs.bearing.set=function($){var ot=-t.wrap($,-180,180)*Math.PI/180;this.angle!==ot&&(this._unmodified=!1,this.angle=ot,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zs.pitch.get=function(){return this._pitch/Math.PI*180},Zs.pitch.set=function($){var ot=t.clamp($,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ot&&(this._unmodified=!1,this._pitch=ot,this._calcMatrices())},Zs.fov.get=function(){return this._fov/Math.PI*180},Zs.fov.set=function($){$=Math.max(.01,Math.min(60,$)),this._fov!==$&&(this._unmodified=!1,this._fov=$/180*Math.PI,this._calcMatrices())},Zs.zoom.get=function(){return this._zoom},Zs.zoom.set=function($){var ot=Math.min(Math.max($,this.minZoom),this.maxZoom);this._zoom!==ot&&(this._unmodified=!1,this._zoom=ot,this.scale=this.zoomScale(ot),this.tileZoom=Math.floor(ot),this.zoomFraction=ot-this.tileZoom,this._constrain(),this._calcMatrices())},Zs.center.get=function(){return this._center},Zs.center.set=function($){$.lat===this._center.lat&&$.lng===this._center.lng||(this._unmodified=!1,this._center=$,this._constrain(),this._calcMatrices())},Zs.padding.get=function(){return this._edgeInsets.toJSON()},Zs.padding.set=function($){this._edgeInsets.equals($)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,$,1),this._calcMatrices())},Zs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},$s.prototype.isPaddingEqual=function($){return this._edgeInsets.equals($)},$s.prototype.interpolatePadding=function($,ot,et){this._unmodified=!1,this._edgeInsets.interpolate($,ot,et),this._constrain(),this._calcMatrices()},$s.prototype.coveringZoomLevel=function($){var ot=($.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/$.tileSize));return Math.max(0,ot)},$s.prototype.getVisibleUnwrappedCoordinates=function($){var ot=[new t.UnwrappedTileID(0,$)];if(this._renderWorldCopies)for(var et=this.pointCoordinate(new t.Point(0,0)),xt=this.pointCoordinate(new t.Point(this.width,0)),Vt=this.pointCoordinate(new t.Point(this.width,this.height)),de=this.pointCoordinate(new t.Point(0,this.height)),ye=Math.floor(Math.min(et.x,xt.x,Vt.x,de.x)),Yt=Math.floor(Math.max(et.x,xt.x,Vt.x,de.x)),ce=1,Se=ye-ce;Se<=Yt+ce;Se++)Se!==0&&ot.push(new t.UnwrappedTileID(Se,$));return ot},$s.prototype.coveringTiles=function($){var ot=this.coveringZoomLevel($),et=ot;if($.minzoom!==void 0&&ot<$.minzoom)return[];$.maxzoom!==void 0&&ot>$.maxzoom&&(ot=$.maxzoom);var xt=t.MercatorCoordinate.fromLngLat(this.center),Vt=Math.pow(2,ot),de=[Vt*xt.x,Vt*xt.y,0],ye=wl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ot),Yt=$.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Yt=ot);var ce=3,Se=function(Ei){return{aabb:new Eu([Ei*Vt,0,0],[(Ei+1)*Vt,Vt,0]),zoom:0,x:0,y:0,wrap:Ei,fullyVisible:!1}},ir=[],Ye=[],tr=ot,lr=$.reparseOverscaled?et:ot;if(this._renderWorldCopies)for(var hr=1;hr<=3;hr++)ir.push(Se(-hr)),ir.push(Se(hr));for(ir.push(Se(0));ir.length>0;){var Ve=ir.pop(),Xe=Ve.x,Ze=Ve.y,Pr=Ve.fullyVisible;if(!Pr){var sn=Ve.aabb.intersects(ye);if(sn===0)continue;Pr=sn===2}var dn=Ve.aabb.distanceX(de),pi=Ve.aabb.distanceY(de),ui=Math.max(Math.abs(dn),Math.abs(pi)),Yn=ce+(1<Yn&&Ve.zoom>=Yt){Ye.push({tileID:new t.OverscaledTileID(Ve.zoom===tr?lr:Ve.zoom,Ve.wrap,Ve.zoom,Xe,Ze),distanceSq:t.sqrLen([de[0]-.5-Xe,de[1]-.5-Ze])});continue}for(var Ci=0;Ci<4;Ci++){var mi=(Xe<<1)+Ci%2,ea=(Ze<<1)+(Ci>>1);ir.push({aabb:Ve.aabb.quadrant(Ci),zoom:Ve.zoom+1,x:mi,y:ea,wrap:Ve.wrap,fullyVisible:Pr})}}return Ye.sort(function(Ei,Li){return Ei.distanceSq-Li.distanceSq}).map(function(Ei){return Ei.tileID})},$s.prototype.resize=function($,ot){this.width=$,this.height=ot,this.pixelsToGLUnits=[2/$,-2/ot],this._constrain(),this._calcMatrices()},Zs.unmodified.get=function(){return this._unmodified},$s.prototype.zoomScale=function($){return Math.pow(2,$)},$s.prototype.scaleZoom=function($){return Math.log($)/Math.LN2},$s.prototype.project=function($){var ot=t.clamp($.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng($.lng)*this.worldSize,t.mercatorYfromLat(ot)*this.worldSize)},$s.prototype.unproject=function($){return new t.MercatorCoordinate($.x/this.worldSize,$.y/this.worldSize).toLngLat()},Zs.point.get=function(){return this.project(this.center)},$s.prototype.setLocationAtPoint=function($,ot){var et=this.pointCoordinate(ot),xt=this.pointCoordinate(this.centerPoint),Vt=this.locationCoordinate($),de=new t.MercatorCoordinate(Vt.x-(et.x-xt.x),Vt.y-(et.y-xt.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())},$s.prototype.locationPoint=function($){return this.coordinatePoint(this.locationCoordinate($))},$s.prototype.pointLocation=function($){return this.coordinateLocation(this.pointCoordinate($))},$s.prototype.locationCoordinate=function($){return t.MercatorCoordinate.fromLngLat($)},$s.prototype.coordinateLocation=function($){return $.toLngLat()},$s.prototype.pointCoordinate=function($){var ot=0,et=[$.x,$.y,0,1],xt=[$.x,$.y,1,1];t.transformMat4(et,et,this.pixelMatrixInverse),t.transformMat4(xt,xt,this.pixelMatrixInverse);var Vt=et[3],de=xt[3],ye=et[0]/Vt,Yt=xt[0]/de,ce=et[1]/Vt,Se=xt[1]/de,ir=et[2]/Vt,Ye=xt[2]/de,tr=ir===Ye?0:(ot-ir)/(Ye-ir);return new t.MercatorCoordinate(t.number(ye,Yt,tr)/this.worldSize,t.number(ce,Se,tr)/this.worldSize)},$s.prototype.coordinatePoint=function($){var ot=[$.x*this.worldSize,$.y*this.worldSize,0,1];return t.transformMat4(ot,ot,this.pixelMatrix),new t.Point(ot[0]/ot[3],ot[1]/ot[3])},$s.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},$s.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},$s.prototype.setMaxBounds=function($){$?(this.lngRange=[$.getWest(),$.getEast()],this.latRange=[$.getSouth(),$.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},$s.prototype.calculatePosMatrix=function($,ot){ot===void 0&&(ot=!1);var et=$.key,xt=ot?this._alignedPosMatrixCache:this._posMatrixCache;if(xt[et])return xt[et];var Vt=$.canonical,de=this.worldSize/this.zoomScale(Vt.z),ye=Vt.x+Math.pow(2,Vt.z)*$.wrap,Yt=t.identity(new Float64Array(16));return t.translate(Yt,Yt,[ye*de,Vt.y*de,0]),t.scale(Yt,Yt,[de/t.EXTENT,de/t.EXTENT,1]),t.multiply(Yt,ot?this.alignedProjMatrix:this.projMatrix,Yt),xt[et]=new Float32Array(Yt),xt[et]},$s.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},$s.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var $=-90,ot=90,et=-180,xt=180,Vt,de,ye,Yt,ce=this.size,Se=this._unmodified;if(this.latRange){var ir=this.latRange;$=t.mercatorYfromLat(ir[1])*this.worldSize,ot=t.mercatorYfromLat(ir[0])*this.worldSize,Vt=ot-$ot&&(Yt=ot-Ve)}if(this.lngRange){var Xe=tr.x,Ze=ce.x/2;Xe-Zext&&(ye=xt-Ze)}(ye!==void 0||Yt!==void 0)&&(this.center=this.unproject(new t.Point(ye!==void 0?ye:tr.x,Yt!==void 0?Yt:tr.y))),this._unmodified=Se,this._constraining=!1}},$s.prototype._calcMatrices=function(){if(this.height){var $=this._fov/2,ot=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan($)*this.height;var et=Math.PI/2+this._pitch,xt=this._fov*(.5+ot.y/this.height),Vt=Math.sin(xt)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-et-xt,.01,Math.PI-.01)),de=this.point,ye=de.x,Yt=de.y,ce=Math.cos(Math.PI/2-this._pitch)*Vt+this.cameraToCenterDistance,Se=ce*1.01,ir=this.height/50,Ye=new Float64Array(16);t.perspective(Ye,this._fov,this.width/this.height,ir,Se),Ye[8]=-ot.x*2/this.width,Ye[9]=ot.y*2/this.height,t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[0,0,-this.cameraToCenterDistance]),t.rotateX(Ye,Ye,this._pitch),t.rotateZ(Ye,Ye,this.angle),t.translate(Ye,Ye,[-ye,-Yt,0]),this.mercatorMatrix=t.scale([],Ye,[this.worldSize,this.worldSize,this.worldSize]),t.scale(Ye,Ye,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Ye,this.invProjMatrix=t.invert([],this.projMatrix);var tr=this.width%2/2,lr=this.height%2/2,hr=Math.cos(this.angle),Ve=Math.sin(this.angle),Xe=ye-Math.round(ye)+hr*tr+Ve*lr,Ze=Yt-Math.round(Yt)+hr*lr+Ve*tr,Pr=new Float64Array(Ye);if(t.translate(Pr,Pr,[Xe>.5?Xe-1:Xe,Ze>.5?Ze-1:Ze,0]),this.alignedProjMatrix=Pr,Ye=t.create(),t.scale(Ye,Ye,[this.width/2,-this.height/2,1]),t.translate(Ye,Ye,[1,-1,0]),this.labelPlaneMatrix=Ye,Ye=t.create(),t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[-1,-1,0]),t.scale(Ye,Ye,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ye,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Ye=t.invert(new Float64Array(16),this.pixelMatrix),!Ye)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ye,this._posMatrixCache={},this._alignedPosMatrixCache={}}},$s.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var $=this.pointCoordinate(new t.Point(0,0)),ot=[$.x*this.worldSize,$.y*this.worldSize,0,1],et=t.transformMat4(ot,ot,this.pixelMatrix);return et[3]/this.cameraToCenterDistance},$s.prototype.getCameraPoint=function(){var $=this._pitch,ot=Math.tan($)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ot))},$s.prototype.getCameraQueryGeometry=function($){var ot=this.getCameraPoint();if($.length===1)return[$[0],ot];for(var et=ot.x,xt=ot.y,Vt=ot.x,de=ot.y,ye=0,Yt=$;ye=3&&!$.some(function(et){return isNaN(et)})){var ot=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+($[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+$[2],+$[1]],zoom:+$[0],bearing:ot,pitch:+($[4]||0)}),!0}return!1},dc.prototype._updateHashUnthrottled=function(){var $=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,$)}catch{}};var $c={linearity:.3,easing:t.bezier(0,0,.3,1)},At=t.extend({deceleration:2500,maxSpeed:1400},$c),Ut=t.extend({deceleration:20,maxSpeed:1400},$c),ue=t.extend({deceleration:1e3,maxSpeed:360},$c),Me=t.extend({deceleration:1e3,maxSpeed:90},$c),Pe=function($){this._map=$,this.clear()};Pe.prototype.clear=function(){this._inertiaBuffer=[]},Pe.prototype.record=function($){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:$})},Pe.prototype._drainInertiaBuffer=function(){for(var $=this._inertiaBuffer,ot=t.browser.now(),et=160;$.length>0&&ot-$[0].time>et;)$.shift()},Pe.prototype._onMoveEnd=function($){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ot={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},et=0,xt=this._inertiaBuffer;et=this._clickTolerance||this._map.fire(new ar($.type,this._map,$))},Jr.prototype.dblclick=function($){return this._firePreventable(new ar($.type,this._map,$))},Jr.prototype.mouseover=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.mouseout=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.touchstart=function($){return this._firePreventable(new Er($.type,this._map,$))},Jr.prototype.touchmove=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchend=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchcancel=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype._firePreventable=function($){if(this._map.fire($),$.defaultPrevented)return{}},Jr.prototype.isEnabled=function(){return!0},Jr.prototype.isActive=function(){return!1},Jr.prototype.enable=function(){},Jr.prototype.disable=function(){};var xn=function($){this._map=$};xn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},xn.prototype.mousemove=function($){this._map.fire(new ar($.type,this._map,$))},xn.prototype.mousedown=function(){this._delayContextMenu=!0},xn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ar("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},xn.prototype.contextmenu=function($){this._delayContextMenu?this._contextMenuEvent=$:this._map.fire(new ar($.type,this._map,$)),this._map.listens("contextmenu")&&$.preventDefault()},xn.prototype.isEnabled=function(){return!0},xn.prototype.isActive=function(){return!1},xn.prototype.enable=function(){},xn.prototype.disable=function(){};var zn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._container=$.getContainer(),this._clickTolerance=ot.clickTolerance||1};zn.prototype.isEnabled=function(){return!!this._enabled},zn.prototype.isActive=function(){return!!this._active},zn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},zn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},zn.prototype.mousedown=function($,ot){this.isEnabled()&&$.shiftKey&&$.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ot,this._active=!0)},zn.prototype.mousemoveWindow=function($,ot){if(this._active){var et=ot;if(!(this._lastPos.equals(et)||!this._box&&et.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=$.timeStamp),et.length===this.numTouches&&(this.centroid=Hi(ot),this.touches=On(et,ot)))},Ri.prototype.touchmove=function($,ot,et){if(!(this.aborted||!this.centroid)){var xt=On(et,ot);for(var Vt in this.touches){var de=this.touches[Vt],ye=xt[Vt];(!ye||ye.dist(de)>Si)&&(this.aborted=!0)}}},Ri.prototype.touchend=function($,ot,et){if((!this.centroid||$.timeStamp-this.startTime>yi)&&(this.aborted=!0),et.length===0){var xt=!this.aborted&&this.centroid;if(this.reset(),xt)return xt}};var Gi=function($){this.singleTap=new Ri($),this.numTaps=$.numTaps,this.reset()};Gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Gi.prototype.touchstart=function($,ot,et){this.singleTap.touchstart($,ot,et)},Gi.prototype.touchmove=function($,ot,et){this.singleTap.touchmove($,ot,et)},Gi.prototype.touchend=function($,ot,et){var xt=this.singleTap.touchend($,ot,et);if(xt){var Vt=$.timeStamp-this.lastTime0&&(this._active=!0);var xt=On(et,ot),Vt=new t.Point(0,0),de=new t.Point(0,0),ye=0;for(var Yt in xt){var ce=xt[Yt],Se=this._touches[Yt];Se&&(Vt._add(ce),de._add(ce.sub(Se)),ye++,xt[Yt]=ce)}if(this._touches=xt,!(yeMath.abs($.x)}var jl=100,ru=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.reset=function(){$.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ot.prototype._start=function(et){this._lastPoints=et,rh(et[0].sub(et[1]))&&(this._valid=!1)},ot.prototype._move=function(et,xt,Vt){var de=et[0].sub(this._lastPoints[0]),ye=et[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(de,ye,Vt.timeStamp),!!this._valid){this._lastPoints=et,this._active=!0;var Yt=(de.y+ye.y)/2,ce=-.5;return{pitchDelta:Yt*ce}}},ot.prototype.gestureBeginsVertically=function(et,xt,Vt){if(this._valid!==void 0)return this._valid;var de=2,ye=et.mag()>=de,Yt=xt.mag()>=de;if(!(!ye&&!Yt)){if(!ye||!Yt)return this._firstMove===void 0&&(this._firstMove=Vt),Vt-this._firstMove0==xt.y>0;return rh(et)&&rh(xt)&&ce}},ot}(Tl),wh={panStep:100,bearingStep:15,pitchStep:10},_e=function(){var $=wh;this._panStep=$.panStep,this._bearingStep=$.bearingStep,this._pitchStep=$.pitchStep,this._rotationDisabled=!1};_e.prototype.reset=function(){this._active=!1},_e.prototype.keydown=function($){var ot=this;if(!($.altKey||$.ctrlKey||$.metaKey)){var et=0,xt=0,Vt=0,de=0,ye=0;switch($.keyCode){case 61:case 107:case 171:case 187:et=1;break;case 189:case 109:case 173:et=-1;break;case 37:$.shiftKey?xt=-1:($.preventDefault(),de=-1);break;case 39:$.shiftKey?xt=1:($.preventDefault(),de=1);break;case 38:$.shiftKey?Vt=1:($.preventDefault(),ye=-1);break;case 40:$.shiftKey?Vt=-1:($.preventDefault(),ye=1);break;default:return}return this._rotationDisabled&&(xt=0,Vt=0),{cameraAnimation:function(Yt){var ce=Yt.getZoom();Yt.easeTo({duration:300,easeId:"keyboardHandler",easing:kr,zoom:et?Math.round(ce)+et*($.shiftKey?2:1):ce,bearing:Yt.getBearing()+xt*ot._bearingStep,pitch:Yt.getPitch()+Vt*ot._pitchStep,offset:[-de*ot._panStep,-ye*ot._panStep],center:Yt.getCenter()},{originalEvent:$})}}}},_e.prototype.enable=function(){this._enabled=!0},_e.prototype.disable=function(){this._enabled=!1,this.reset()},_e.prototype.isEnabled=function(){return this._enabled},_e.prototype.isActive=function(){return this._active},_e.prototype.disableRotation=function(){this._rotationDisabled=!0},_e.prototype.enableRotation=function(){this._rotationDisabled=!1};function kr($){return $*(2-$)}var Ir=4.000244140625,Dn=1/100,li=1/450,ti=2,yn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._handler=ot,this._delta=0,this._defaultZoomRate=Dn,this._wheelZoomRate=li,t.bindAll(["_onTimeout"],this)};yn.prototype.setZoomRate=function($){this._defaultZoomRate=$},yn.prototype.setWheelZoomRate=function($){this._wheelZoomRate=$},yn.prototype.isEnabled=function(){return!!this._enabled},yn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},yn.prototype.isZooming=function(){return!!this._zooming},yn.prototype.enable=function($){this.isEnabled()||(this._enabled=!0,this._aroundCenter=$&&$.around==="center")},yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yn.prototype.wheel=function($){if(this.isEnabled()){var ot=$.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?$.deltaY*40:$.deltaY,et=t.browser.now(),xt=et-(this._lastWheelEventTime||0);this._lastWheelEventTime=et,ot!==0&&ot%Ir===0?this._type="wheel":ot!==0&&Math.abs(ot)<4?this._type="trackpad":xt>400?(this._type=null,this._lastValue=ot,this._timeout=setTimeout(this._onTimeout,40,$)):this._type||(this._type=Math.abs(xt*ot)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ot+=this._lastValue)),$.shiftKey&&ot&&(ot=ot/4),this._type&&(this._lastWheelEvent=$,this._delta-=ot,this._active||this._start($)),$.preventDefault()}},yn.prototype._onTimeout=function($){this._type="wheel",this._delta-=this._lastValue,this._active||this._start($)},yn.prototype._start=function($){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ot=r.mousePos(this._el,$);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ot)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},yn.prototype.renderFrame=function(){var $=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ot=this._map.transform;if(this._delta!==0){var et=this._type==="wheel"&&Math.abs(this._delta)>Ir?this._wheelZoomRate:this._defaultZoomRate,xt=ti/(1+Math.exp(-Math.abs(this._delta*et)));this._delta<0&&xt!==0&&(xt=1/xt);var Vt=typeof this._targetZoom=="number"?ot.zoomScale(this._targetZoom):ot.scale;this._targetZoom=Math.min(ot.maxZoom,Math.max(ot.minZoom,ot.scaleZoom(Vt*xt))),this._type==="wheel"&&(this._startZoom=ot.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var de=typeof this._targetZoom=="number"?this._targetZoom:ot.zoom,ye=this._startZoom,Yt=this._easing,ce=!1,Se;if(this._type==="wheel"&&ye&&Yt){var ir=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),Ye=Yt(ir);Se=t.number(ye,de,Ye),ir<1?this._frameId||(this._frameId=!0):ce=!0}else Se=de,ce=!0;return this._active=!0,ce&&(this._active=!1,this._finishTimeout=setTimeout(function(){$._zooming=!1,$._handler._triggerRenderFrame(),delete $._targetZoom,delete $._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ce,zoomDelta:Se-ot.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},yn.prototype._smoothOutEasing=function($){var ot=t.ease;if(this._prevEase){var et=this._prevEase,xt=(t.browser.now()-et.start)/et.duration,Vt=et.easing(xt+.01)-et.easing(xt),de=.27/Math.sqrt(Vt*Vt+1e-4)*.01,ye=Math.sqrt(.27*.27-de*de);ot=t.bezier(de,ye,.25,1)}return this._prevEase={start:t.browser.now(),duration:$,easing:ot},ot},yn.prototype.reset=function(){this._active=!1};var ai=function($,ot){this._clickZoom=$,this._tapZoom=ot};ai.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ai.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ai.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ai.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ta=function(){this.reset()};ta.prototype.reset=function(){this._active=!1},ta.prototype.dblclick=function($,ot){return $.preventDefault(),{cameraAnimation:function(et){et.easeTo({duration:300,zoom:et.getZoom()+($.shiftKey?-1:1),around:et.unproject(ot)},{originalEvent:$})}}},ta.prototype.enable=function(){this._enabled=!0},ta.prototype.disable=function(){this._enabled=!1,this.reset()},ta.prototype.isEnabled=function(){return this._enabled},ta.prototype.isActive=function(){return this._active};var $i=function(){this._tap=new Gi({numTouches:1,numTaps:1}),this.reset()};$i.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},$i.prototype.touchstart=function($,ot,et){this._swipePoint||(this._tapTime&&$.timeStamp-this._tapTime>Vn&&this.reset(),this._tapTime?et.length>0&&(this._swipePoint=ot[0],this._swipeTouch=et[0].identifier):this._tap.touchstart($,ot,et))},$i.prototype.touchmove=function($,ot,et){if(!this._tapTime)this._tap.touchmove($,ot,et);else if(this._swipePoint){if(et[0].identifier!==this._swipeTouch)return;var xt=ot[0],Vt=xt.y-this._swipePoint.y;return this._swipePoint=xt,$.preventDefault(),this._active=!0,{zoomDelta:Vt/128}}},$i.prototype.touchend=function($,ot,et){if(this._tapTime)this._swipePoint&&et.length===0&&this.reset();else{var xt=this._tap.touchend($,ot,et);xt&&(this._tapTime=$.timeStamp)}},$i.prototype.touchcancel=function(){this.reset()},$i.prototype.enable=function(){this._enabled=!0},$i.prototype.disable=function(){this._enabled=!1,this.reset()},$i.prototype.isEnabled=function(){return this._enabled},$i.prototype.isActive=function(){return this._active};var ya=function($,ot,et){this._el=$,this._mousePan=ot,this._touchPan=et};ya.prototype.enable=function($){this._inertiaOptions=$||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ya.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ya.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ya.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var $a=function($,ot,et){this._pitchWithRotate=$.pitchWithRotate,this._mouseRotate=ot,this._mousePitch=et};$a.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},$a.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},$a.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},$a.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Na=function($,ot,et,xt){this._el=$,this._touchZoom=ot,this._touchRotate=et,this._tapDragZoom=xt,this._rotationDisabled=!1,this._enabled=!0};Na.prototype.enable=function($){this._touchZoom.enable($),this._rotationDisabled||this._touchRotate.enable($),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Na.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Na.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Na.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Na.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Na.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ia=function($){return $.zoom||$.drag||$.pitch||$.rotate},Ai=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot}(t.Event);function fn($){return $.panDelta&&$.panDelta.mag()||$.zoomDelta||$.bearingDelta||$.pitchDelta}var jn=function($,ot){this._map=$,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pe($),this._bearingSnap=ot.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ot),t.bindAll(["handleEvent","handleWindowEvent"],this);var et=this._el;this._listeners=[[et,"touchstart",{passive:!0}],[et,"touchmove",{passive:!1}],[et,"touchend",void 0],[et,"touchcancel",void 0],[et,"mousedown",void 0],[et,"mousemove",void 0],[et,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[et,"mouseover",void 0],[et,"mouseout",void 0],[et,"dblclick",void 0],[et,"click",void 0],[et,"keydown",{capture:!1}],[et,"keyup",void 0],[et,"wheel",{passive:!1}],[et,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xt=0,Vt=this._listeners;xtye?Math.min(2,dn):Math.max(.5,dn),Ei=Math.pow(ea,1-Ci),Li=de.unproject(Pr.add(sn.mult(Ci*Ei)).mult(mi));de.setLocationAtPoint(de.renderWorldCopies?Li.wrap():Li,Ve)}Vt._fireMoveEvents(xt)},function(Ci){Vt._afterEase(xt,Ci)},et),this},ot.prototype._prepareEase=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._moving=!0,!xt&&!Vt.moving&&this.fire(new t.Event("movestart",et)),this._zooming&&!Vt.zooming&&this.fire(new t.Event("zoomstart",et)),this._rotating&&!Vt.rotating&&this.fire(new t.Event("rotatestart",et)),this._pitching&&!Vt.pitching&&this.fire(new t.Event("pitchstart",et))},ot.prototype._fireMoveEvents=function(et){this.fire(new t.Event("move",et)),this._zooming&&this.fire(new t.Event("zoom",et)),this._rotating&&this.fire(new t.Event("rotate",et)),this._pitching&&this.fire(new t.Event("pitch",et))},ot.prototype._afterEase=function(et,xt){if(!(this._easeId&&xt&&this._easeId===xt)){delete this._easeId;var Vt=this._zooming,de=this._rotating,ye=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Vt&&this.fire(new t.Event("zoomend",et)),de&&this.fire(new t.Event("rotateend",et)),ye&&this.fire(new t.Event("pitchend",et)),this.fire(new t.Event("moveend",et))}},ot.prototype.flyTo=function(et,xt){var Vt=this;if(!et.essential&&t.browser.prefersReducedMotion){var de=t.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(de,xt)}this.stop(),et=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},et);var ye=this.transform,Yt=this.getZoom(),ce=this.getBearing(),Se=this.getPitch(),ir=this.getPadding(),Ye="zoom"in et?t.clamp(+et.zoom,ye.minZoom,ye.maxZoom):Yt,tr="bearing"in et?this._normalizeBearing(et.bearing,ce):ce,lr="pitch"in et?+et.pitch:Se,hr="padding"in et?et.padding:ye.padding,Ve=ye.zoomScale(Ye-Yt),Xe=t.Point.convert(et.offset),Ze=ye.centerPoint.add(Xe),Pr=ye.pointLocation(Ze),sn=t.LngLat.convert(et.center||Pr);this._normalizeCenter(sn);var dn=ye.project(Pr),pi=ye.project(sn).sub(dn),ui=et.curve,Yn=Math.max(ye.width,ye.height),Ci=Yn/Ve,mi=pi.mag();if("minZoom"in et){var ea=t.clamp(Math.min(et.minZoom,Yt,Ye),ye.minZoom,ye.maxZoom),Ei=Yn/ye.zoomScale(ea-Yt);ui=Math.sqrt(Ei/mi*2)}var Li=ui*ui;function la(Fs){var Mu=(Ci*Ci-Yn*Yn+(Fs?-1:1)*Li*Li*mi*mi)/(2*(Fs?Ci:Yn)*Li*mi);return Math.log(Math.sqrt(Mu*Mu+1)-Mu)}function to(Fs){return(Math.exp(Fs)-Math.exp(-Fs))/2}function co(Fs){return(Math.exp(Fs)+Math.exp(-Fs))/2}function qo(Fs){return to(Fs)/co(Fs)}var xs=la(0),Il=function(Fs){return co(xs)/co(xs+ui*Fs)},Vl=function(Fs){return Yn*((co(xs)*qo(xs+ui*Fs)-to(xs))/Li)/mi},pl=(la(1)-xs)/ui;if(Math.abs(mi)<1e-6||!isFinite(pl)){if(Math.abs(Yn-Ci)<1e-6)return this.easeTo(et,xt);var Hl=Ciet.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=ce!==tr,this._pitching=lr!==Se,this._padding=!ye.isPaddingEqual(hr),this._prepareEase(xt,!1),this._ease(function(Fs){var Mu=Fs*pl,af=1/Il(Mu);ye.zoom=Fs===1?Ye:Yt+ye.scaleZoom(af),Vt._rotating&&(ye.bearing=t.number(ce,tr,Fs)),Vt._pitching&&(ye.pitch=t.number(Se,lr,Fs)),Vt._padding&&(ye.interpolatePadding(ir,hr,Fs),Ze=ye.centerPoint.add(Xe));var If=Fs===1?sn:ye.unproject(dn.add(pi.mult(Vl(Mu))).mult(af));ye.setLocationAtPoint(ye.renderWorldCopies?If.wrap():If,Ze),Vt._fireMoveEvents(xt)},function(){return Vt._afterEase(xt)},et),this},ot.prototype.isEasing=function(){return!!this._easeFrameId},ot.prototype.stop=function(){return this._stop()},ot.prototype._stop=function(et,xt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Vt=this._onEaseEnd;delete this._onEaseEnd,Vt.call(this,xt)}if(!et){var de=this.handlers;de&&de.stop(!1)}return this},ot.prototype._ease=function(et,xt,Vt){Vt.animate===!1||Vt.duration===0?(et(1),xt()):(this._easeStart=t.browser.now(),this._easeOptions=Vt,this._onEaseFrame=et,this._onEaseEnd=xt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ot.prototype._renderFrameCallback=function(){var et=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ot.prototype._normalizeBearing=function(et,xt){et=t.wrap(et,-180,180);var Vt=Math.abs(et-xt);return Math.abs(et-360-xt)180?-360:Vt<-180?360:0}},ot}(t.Evented),Ti=function($){$===void 0&&($={}),this.options=$,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ti.prototype.getDefaultPosition=function(){return"bottom-right"},Ti.prototype.onAdd=function($){var ot=this.options&&this.options.compact;return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ot&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ot===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ti.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ti.prototype._setElementTitle=function($,ot){var et=this._map._getUIString("AttributionControl."+ot);$.title=et,$.setAttribute("aria-label",et)},Ti.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Ti.prototype._updateEditLink=function(){var $=this._editLink;$||($=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ot=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if($){var et=ot.reduce(function(xt,Vt,de){return Vt.value&&(xt+=Vt.key+"="+Vt.value+(de=0)return!1;return!0});var ye=$.join(" | ");ye!==this._attribHTML&&(this._attribHTML=ye,$.length?(this._innerContainer.innerHTML=ye,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ti.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ei=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};ei.prototype.onAdd=function($){this._map=$,this._container=r.create("div","mapboxgl-ctrl");var ot=r.create("a","mapboxgl-ctrl-logo");return ot.target="_blank",ot.rel="noopener nofollow",ot.href="https://www.mapbox.com/",ot.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ot.setAttribute("rel","noopener nofollow"),this._container.appendChild(ot),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ei.prototype.getDefaultPosition=function(){return"bottom-left"},ei.prototype._updateLogo=function($){(!$||$.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ei.prototype._logoRequired=function(){if(this._map.style){var $=this._map.style.sourceCaches;for(var ot in $){var et=$[ot].getSource();if(et.mapbox_logo)return!0}return!1}},ei.prototype._updateCompact=function(){var $=this._container.children;if($.length){var ot=$[0];this._map.getCanvasContainer().offsetWidth<250?ot.classList.add("mapboxgl-compact"):ot.classList.remove("mapboxgl-compact")}};var Sa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Sa.prototype.add=function($){var ot=++this._id,et=this._queue;return et.push({callback:$,id:ot,cancelled:!1}),ot},Sa.prototype.remove=function($){for(var ot=this._currentlyRunning,et=ot?this._queue.concat(ot):this._queue,xt=0,Vt=et;xtxt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(xt.minPitch!=null&&xt.maxPitch!=null&&xt.minPitch>xt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(xt.minPitch!=null&&xt.minPitchJi)throw new Error("maxPitch must be less than or equal to "+Ji);var de=new $s(xt.minZoom,xt.maxZoom,xt.minPitch,xt.maxPitch,xt.renderWorldCopies);if($.call(this,de,xt),this._interactive=xt.interactive,this._maxTileCacheSize=xt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=xt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=xt.preserveDrawingBuffer,this._antialias=xt.antialias,this._trackResize=xt.trackResize,this._bearingSnap=xt.bearingSnap,this._refreshExpiredTiles=xt.refreshExpiredTiles,this._fadeDuration=xt.fadeDuration,this._crossSourceCollisions=xt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=xt.collectResourceTiming,this._renderTaskQueue=new Sa,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ha,xt.locale),this._clickTolerance=xt.clickTolerance,this._requestManager=new t.RequestManager(xt.transformRequest,xt.accessToken),typeof xt.container=="string"){if(this._container=t.window.document.getElementById(xt.container),!this._container)throw new Error("Container '"+xt.container+"' not found.")}else if(xt.container instanceof xi)this._container=xt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(xt.maxBounds&&this.setMaxBounds(xt.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Vt._update(!1)}),this.on("moveend",function(){return Vt._update(!1)}),this.on("zoom",function(){return Vt._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new jn(this,xt);var ye=typeof xt.hash=="string"&&xt.hash||void 0;this._hash=xt.hash&&new dc(ye).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:xt.center,zoom:xt.zoom,bearing:xt.bearing,pitch:xt.pitch}),xt.bounds&&(this.resize(),this.fitBounds(xt.bounds,t.extend({},xt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=xt.localIdeographFontFamily,xt.style&&this.setStyle(xt.style,{localIdeographFontFamily:xt.localIdeographFontFamily}),xt.attributionControl&&this.addControl(new Ti({customAttribution:xt.customAttribution})),this.addControl(new ei,xt.logoPosition),this.on("style.load",function(){Vt.transform.unmodified&&Vt.jumpTo(Vt.style.stylesheet)}),this.on("data",function(Yt){Vt._update(Yt.dataType==="style"),Vt.fire(new t.Event(Yt.dataType+"data",Yt))}),this.on("dataloading",function(Yt){Vt.fire(new t.Event(Yt.dataType+"dataloading",Yt))})}$&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot;var et={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ot.prototype._getMapId=function(){return this._mapId},ot.prototype.addControl=function(xt,Vt){if(Vt===void 0&&(xt.getDefaultPosition?Vt=xt.getDefaultPosition():Vt="top-right"),!xt||!xt.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var de=xt.onAdd(this);this._controls.push(xt);var ye=this._controlPositions[Vt];return Vt.indexOf("bottom")!==-1?ye.insertBefore(de,ye.firstChild):ye.appendChild(de),this},ot.prototype.removeControl=function(xt){if(!xt||!xt.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Vt=this._controls.indexOf(xt);return Vt>-1&&this._controls.splice(Vt,1),xt.onRemove(this),this},ot.prototype.hasControl=function(xt){return this._controls.indexOf(xt)>-1},ot.prototype.resize=function(xt){var Vt=this._containerDimensions(),de=Vt[0],ye=Vt[1];this._resizeCanvas(de,ye),this.transform.resize(de,ye),this.painter.resize(de,ye);var Yt=!this._moving;return Yt&&(this.stop(),this.fire(new t.Event("movestart",xt)).fire(new t.Event("move",xt))),this.fire(new t.Event("resize",xt)),Yt&&this.fire(new t.Event("moveend",xt)),this},ot.prototype.getBounds=function(){return this.transform.getBounds()},ot.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ot.prototype.setMaxBounds=function(xt){return this.transform.setMaxBounds(t.LngLatBounds.convert(xt)),this._update()},ot.prototype.setMinZoom=function(xt){if(xt=xt??Ea,xt>=Ea&&xt<=this.transform.maxZoom)return this.transform.minZoom=xt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xt,this._update(),this.getZoom()>xt&&this.setZoom(xt),this;throw new Error("maxZoom must be greater than the current minZoom")},ot.prototype.getMaxZoom=function(){return this.transform.maxZoom},ot.prototype.setMinPitch=function(xt){if(xt=xt??Ki,xt=Ki&&xt<=this.transform.maxPitch)return this.transform.minPitch=xt,this._update(),this.getPitch()Ji)throw new Error("maxPitch must be less than or equal to "+Ji);if(xt>=this.transform.minPitch)return this.transform.maxPitch=xt,this._update(),this.getPitch()>xt&&this.setPitch(xt),this;throw new Error("maxPitch must be greater than the current minPitch")},ot.prototype.getMaxPitch=function(){return this.transform.maxPitch},ot.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ot.prototype.setRenderWorldCopies=function(xt){return this.transform.renderWorldCopies=xt,this._update()},ot.prototype.project=function(xt){return this.transform.locationPoint(t.LngLat.convert(xt))},ot.prototype.unproject=function(xt){return this.transform.pointLocation(t.Point.convert(xt))},ot.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ot.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ot.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ot.prototype._createDelegatedListener=function(xt,Vt,de){var ye=this,Yt;if(xt==="mouseenter"||xt==="mouseover"){var ce=!1,Se=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?ce||(ce=!0,de.call(ye,new ar(xt,ye,Ve.originalEvent,{features:Xe}))):ce=!1},ir=function(){ce=!1};return{layer:Vt,listener:de,delegates:{mousemove:Se,mouseout:ir}}}else if(xt==="mouseleave"||xt==="mouseout"){var Ye=!1,tr=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?Ye=!0:Ye&&(Ye=!1,de.call(ye,new ar(xt,ye,Ve.originalEvent)))},lr=function(Ve){Ye&&(Ye=!1,de.call(ye,new ar(xt,ye,Ve.originalEvent)))};return{layer:Vt,listener:de,delegates:{mousemove:tr,mouseout:lr}}}else{var hr=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length&&(Ve.features=Xe,de.call(ye,Ve),delete Ve.features)};return{layer:Vt,listener:de,delegates:(Yt={},Yt[xt]=hr,Yt)}}},ot.prototype.on=function(xt,Vt,de){if(de===void 0)return $.prototype.on.call(this,xt,Vt);var ye=this._createDelegatedListener(xt,Vt,de);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xt]=this._delegatedListeners[xt]||[],this._delegatedListeners[xt].push(ye);for(var Yt in ye.delegates)this.on(Yt,ye.delegates[Yt]);return this},ot.prototype.once=function(xt,Vt,de){if(de===void 0)return $.prototype.once.call(this,xt,Vt);var ye=this._createDelegatedListener(xt,Vt,de);for(var Yt in ye.delegates)this.once(Yt,ye.delegates[Yt]);return this},ot.prototype.off=function(xt,Vt,de){var ye=this;if(de===void 0)return $.prototype.off.call(this,xt,Vt);var Yt=function(ce){for(var Se=ce[xt],ir=0;ir180;){var ye=et.locationPoint($);if(ye.x>=0&&ye.y>=0&&ye.x<=et.width&&ye.y<=et.height)break;$.lng>et.center.lng?$.lng-=360:$.lng+=360}return $}var es={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Ul($,ot,et){var xt=$.classList;for(var Vt in es)xt.remove("mapboxgl-"+et+"-anchor-"+Vt);xt.add("mapboxgl-"+et+"-anchor-"+ot)}var Al=function($){function ot(et,xt){if($.call(this),(et instanceof t.window.HTMLElement||xt)&&(et=t.extend({element:et},xt)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=et&&et.anchor||"center",this._color=et&&et.color||"#3FB1CE",this._scale=et&&et.scale||1,this._draggable=et&&et.draggable||!1,this._clickTolerance=et&&et.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=et&&et.rotation||0,this._rotationAlignment=et&&et.rotationAlignment||"auto",this._pitchAlignment=et&&et.pitchAlignment&&et.pitchAlignment!=="auto"?et.pitchAlignment:this._rotationAlignment,!et||!et.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var Vt=r.createNS("http://www.w3.org/2000/svg","svg"),de=41,ye=27;Vt.setAttributeNS(null,"display","block"),Vt.setAttributeNS(null,"height",de+"px"),Vt.setAttributeNS(null,"width",ye+"px"),Vt.setAttributeNS(null,"viewBox","0 0 "+ye+" "+de);var Yt=r.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"stroke","none"),Yt.setAttributeNS(null,"stroke-width","1"),Yt.setAttributeNS(null,"fill","none"),Yt.setAttributeNS(null,"fill-rule","evenodd");var ce=r.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"fill-rule","nonzero");var Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Se.setAttributeNS(null,"fill","#000000");for(var ir=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Ye=0,tr=ir;Ye=xt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},ot.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},ot.prototype._addDragHandler=function(et){this._element.contains(et.originalEvent.target)&&(et.preventDefault(),this._positionDelta=et.point.sub(this._pos).add(this._offset),this._pointerdownPos=et.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))},ot.prototype.setDraggable=function(et){return this._draggable=!!et,this._map&&(et?(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},ot.prototype.isDraggable=function(){return this._draggable},ot.prototype.setRotation=function(et){return this._rotation=et||0,this._update(),this},ot.prototype.getRotation=function(){return this._rotation},ot.prototype.setRotationAlignment=function(et){return this._rotationAlignment=et||"auto",this._update(),this},ot.prototype.getRotationAlignment=function(){return this._rotationAlignment},ot.prototype.setPitchAlignment=function(et){return this._pitchAlignment=et&&et!=="auto"?et:this._rotationAlignment,this._update(),this},ot.prototype.getPitchAlignment=function(){return this._pitchAlignment},ot}(t.Evented),hs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ku;function dl($){ku!==void 0?$(ku):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(ot){ku=ot.state!=="denied",$(ku)}):(ku=!!t.window.navigator.geolocation,$(ku))}var Cu=0,pc=!1,yc=function($){function ot(et){$.call(this),this.options=t.extend({},hs,et),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.onAdd=function(et){return this._map=et,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),dl(this._setupUI),this._container},ot.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Cu=0,pc=!1},ot.prototype._isOutOfMapMaxBounds=function(et){var xt=this._map.getMaxBounds(),Vt=et.coords;return xt&&(Vt.longitudext.getEast()||Vt.latitudext.getNorth())},ot.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ot.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",et)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(et),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",et)),this._finish()}},ot.prototype._updateCamera=function(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude),Vt=et.coords.accuracy,de=this._map.getBearing(),ye=t.extend({bearing:de},this.options.fitBoundsOptions);this._map.fitBounds(xt.toBounds(Vt),ye,{geolocateSource:!0})},ot.prototype._updateMarker=function(et){if(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(xt).addTo(this._map),this._userLocationDotMarker.setLngLat(xt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ot.prototype._updateCircleRadius=function(){var et=this._map._container.clientHeight/2,xt=this._map.unproject([0,et]),Vt=this._map.unproject([1,et]),de=xt.distanceTo(Vt),ye=Math.ceil(2*this._accuracy/de);this._circleElement.style.width=ye+"px",this._circleElement.style.height=ye+"px"},ot.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ot.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(et.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(et.code===3&&pc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",et)),this._finish()}},ot.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ot.prototype._setupUI=function(et){var xt=this;if(this._container.addEventListener("contextmenu",function(ye){return ye.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",et===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Vt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Vt,this._geolocateButton.setAttribute("aria-label",Vt)}else{var de=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Al(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Al({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ye){var Yt=ye.originalEvent&&ye.originalEvent.type==="resize";!ye.geolocateSource&&xt._watchState==="ACTIVE_LOCK"&&!Yt&&(xt._watchState="BACKGROUND",xt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xt.fire(new t.Event("trackuserlocationend")))})},ot.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Cu--,pc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Cu++;var et;Cu>1?(et={maximumAge:6e5,timeout:0},pc=!0):(et=this.options.positionOptions,pc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ot.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ot}(t.Evented),xu={maxWidth:100,unit:"metric"},pu=function($){this.options=t.extend({},xu,$),t.bindAll(["_onMove","setUnit"],this)};pu.prototype.getDefaultPosition=function(){return"bottom-left"},pu.prototype._onMove=function(){Tu(this._map,this._container,this.options)},pu.prototype.onAdd=function($){return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",$.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},pu.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},pu.prototype.setUnit=function($){this.options.unit=$,Tu(this._map,this._container,this.options)};function Tu($,ot,et){var xt=et&&et.maxWidth||100,Vt=$._container.clientHeight/2,de=$.unproject([0,Vt]),ye=$.unproject([xt,Vt]),Yt=de.distanceTo(ye);if(et&&et.unit==="imperial"){var ce=3.2808*Yt;if(ce>5280){var Se=ce/5280;No(ot,xt,Se,$._getUIString("ScaleControl.Miles"))}else No(ot,xt,ce,$._getUIString("ScaleControl.Feet"))}else if(et&&et.unit==="nautical"){var ir=Yt/1852;No(ot,xt,ir,$._getUIString("ScaleControl.NauticalMiles"))}else Yt>=1e3?No(ot,xt,Yt/1e3,$._getUIString("ScaleControl.Kilometers")):No(ot,xt,Yt,$._getUIString("ScaleControl.Meters"))}function No($,ot,et,xt){var Vt=sl(et),de=Vt/et;$.style.width=ot*de+"px",$.innerHTML=Vt+" "+xt}function Au($){var ot=Math.pow(10,Math.ceil(-Math.log($)/Math.LN10));return Math.round($*ot)/ot}function sl($){var ot=Math.pow(10,(""+Math.floor($)).length-1),et=$/ot;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:Au(et),ot*et}var Lu=function($){this._fullscreen=!1,$&&$.container&&($.container instanceof t.window.HTMLElement?this._container=$.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Lu.prototype.onAdd=function($){return this._map=$,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Lu.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Lu.prototype._setupUI=function(){var $=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",$).setAttribute("aria-hidden",!0),$.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._updateTitle=function(){var $=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$),this._fullscreenButton.title=$},Lu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Lu.prototype._isFullscreen=function(){return this._fullscreen},Lu.prototype._changeIcon=function(){var $=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;$===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Lu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Co=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Cs=function($){function ot(et){$.call(this),this.options=t.extend(Object.create(xc),et),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ot.prototype.isOpen=function(){return!!this._map},ot.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ot.prototype.getLngLat=function(){return this._lngLat},ot.prototype.setLngLat=function(et){return this._lngLat=t.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ot.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ot.prototype.getElement=function(){return this._container},ot.prototype.setText=function(et){return this.setDOMContent(t.window.document.createTextNode(et))},ot.prototype.setHTML=function(et){var xt=t.window.document.createDocumentFragment(),Vt=t.window.document.createElement("body"),de;for(Vt.innerHTML=et;de=Vt.firstChild,!!de;)xt.appendChild(de);return this.setDOMContent(xt)},ot.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ot.prototype.setMaxWidth=function(et){return this.options.maxWidth=et,this._update(),this},ot.prototype.setDOMContent=function(et){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(et),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ot.prototype.addClassName=function(et){this._container&&this._container.classList.add(et)},ot.prototype.removeClassName=function(et){this._container&&this._container.classList.remove(et)},ot.prototype.setOffset=function(et){return this.options.offset=et,this._update(),this},ot.prototype.toggleClassName=function(et){if(this._container)return this._container.classList.toggle(et)},ot.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ot.prototype._onMouseUp=function(et){this._update(et.point)},ot.prototype._onMouseMove=function(et){this._update(et.point)},ot.prototype._onDrag=function(et){this._update(et.point)},ot.prototype._update=function(et){var xt=this,Vt=this._lngLat||this._trackPointer;if(!(!this._map||!Vt||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(tr){return xt._container.classList.add(tr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Eo(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!et))){var de=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),ye=this.options.anchor,Yt=Ml(this.options.offset);if(!ye){var ce=this._container.offsetWidth,Se=this._container.offsetHeight,ir;de.y+Yt.bottom.ythis._map.transform.height-Se?ir=["bottom"]:ir=[],de.xthis._map.transform.width-ce/2&&ir.push("right"),ir.length===0?ye="bottom":ye=ir.join("-")}var Ye=de.add(Yt[ye]).round();r.setTransform(this._container,es[ye]+" translate("+Ye.x+"px,"+Ye.y+"px)"),Ul(this._container,ye,"popup")}},ot.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var et=this._container.querySelector(Co);et&&et.focus()}},ot.prototype._onClose=function(){this.remove()},ot}(t.Evented);function Ml($){if($)if(typeof $=="number"){var ot=Math.round(Math.sqrt(.5*Math.pow($,2)));return{center:new t.Point(0,0),top:new t.Point(0,$),"top-left":new t.Point(ot,ot),"top-right":new t.Point(-ot,ot),bottom:new t.Point(0,-$),"bottom-left":new t.Point(ot,-ot),"bottom-right":new t.Point(-ot,-ot),left:new t.Point($,0),right:new t.Point(-$,0)}}else if($ instanceof t.Point||Array.isArray($)){var et=t.Point.convert($);return{center:et,top:et,"top-left":et,"top-right":et,bottom:et,"bottom-left":et,"bottom-right":et,left:et,right:et}}else return{center:t.Point.convert($.center||[0,0]),top:t.Point.convert($.top||[0,0]),"top-left":t.Point.convert($["top-left"]||[0,0]),"top-right":t.Point.convert($["top-right"]||[0,0]),bottom:t.Point.convert($.bottom||[0,0]),"bottom-left":t.Point.convert($["bottom-left"]||[0,0]),"bottom-right":t.Point.convert($["bottom-right"]||[0,0]),left:t.Point.convert($.left||[0,0]),right:t.Point.convert($.right||[0,0])};else return Ml(new t.Point(0,0))}var yl={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Io,NavigationControl:Fa,GeolocateControl:yc,AttributionControl:Ti,ScaleControl:pu,FullscreenControl:Lu,Popup:Cs,Marker:Al,Style:ac,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Wa,clearPrewarmedResources:ze,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken($){t.config.ACCESS_TOKEN=$},get baseApiUrl(){return t.config.API_URL},set baseApiUrl($){t.config.API_URL=$},get workerCount(){return ji.workerCount},set workerCount($){ji.workerCount=$},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests($){t.config.MAX_PARALLEL_IMAGE_REQUESTS=$},clearStorage:function($){t.clearTileCache($)},workerUrl:""};return yl}),I})}),SW=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=kE(),S=Ev();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapboxLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapboxLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),EW=Dt((Q,Z)=>{var c=TE(),g=kn(),I=W1(),S=Jo(),t=Ls(),e=up(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=Ev(),v=SW();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k=A[p.id];p.map&&k.accesstoken!==p.accessToken&&(p.map.remove(),p.map=null,p.styleObj=null,p.traceHash={},p.layerList=[]);var w;p.map?w=new Promise(function(R,O){p.updateMap(C,A,R,O)}):w=new Promise(function(R,O){p.createMap(C,A,R,O)}),h.push(w)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style,A);k.accessToken=w.accesstoken;var O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0}));V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var H=[];H.push(new Promise(function(F){V.once("load",F)})),H=H.concat(I.fetchTraceGeoData(C)),Promise.all(H).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],j=_(R.style,A);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,R;R=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=z1(),I=Ad(),S=P3();Z.exports=function(r,a,n){g(r,a,n,{type:"mapbox",attributes:S,handleDefaults:t,partition:"y",accessToken:a._mapboxAccessToken})};function t(r,a,n,o){n("accesstoken",o.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),l=n("bounds.east"),f=n("bounds.south"),x=n("bounds.north");(i===void 0||l===void 0||f===void 0||x===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),wT=Dt(Q=>{var Z=TE(),c=kn(),g=c.strTranslate,I=c.strScale,S=ud().getSubplotCalcData,t=Dp(),e=qr(),r=Vs(),a=ec(),n=EW(),o="mapbox",i=Q.constants=Ev();Q.name=o,Q.attr="subplot",Q.idRoot=o,Q.idRegex=Q.attrRegex=c.counterRegex(o);var l=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Q.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Q.layoutAttributes=P3(),Q.supplyLayoutDefaults=CW();var f=!0;Q.plot=function(v){f&&(f=!1,c.warn(l));var T=v._fullLayout,u=v.calcdata,b=T._subplots[o];if(Z.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var _=x(v,b);Z.accessToken=_;for(var P=0;PH/2){var F=R.split("|").join("
");j.text(F).attr("data-unformatted",F).call(a.convertToTspans,v),V=r.bBox(j.node())}j.attr("transform",g(-3,-V.height+8)),O.insert("rect",".static-attribution").attr({x:-V.width-6,y:-V.height-3,width:V.width+6,height:V.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;V.width+6>H&&(U=H/(V.width+6));var W=[b.l+b.w*M.x[1],b.t+b.h*(1-M.y[0])];O.attr("transform",g(W[0],W[1])+I(U))}};function x(v,T){var u=v._fullLayout,b=v._context;if(b.mapboxAccessToken==="")return"";for(var _=[],P=[],M=!1,C=!1,A=0;A1&&c.warn(i.multipleTokensErrorMsg),_[0]):(P.length&&c.log(["Listed mapbox access token(s)",P.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(v){return typeof v=="string"&&(i.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Q.updateFx=function(v){for(var T=v._fullLayout,u=T._subplots[o],b=0;b{Z.exports={attributes:_T(),supplyDefaults:wW(),colorbar:xo(),formatLabels:wE(),calc:tT(),plot:TW(),hoverPoints:bT().hoverPoints,eventData:AW(),selectPoints:MW(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermapbox",basePlotModule:wT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}),PW=Dt((Q,Z)=>{Z.exports=LW()}),AE=Dt((Q,Z)=>{var c=gb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ho(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),IW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=AE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),ME=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=ME().convert,g=ME().convertOnSelect,I=Ev().traceLayerPrefix;function S(e,r){this.type="choroplethmapbox",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),OW=Dt((Q,Z)=>{Z.exports={attributes:AE(),supplyDefaults:IW(),colorbar:I1(),calc:iT(),plot:zW(),hoverPoints:oT(),eventData:sT(),selectPoints:lT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=OW()}),SE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ho(),t=_T(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),FW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=SE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),RW=Dt((Q,Z)=>{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Yi(),g=kn(),I=hi(),S=Xc(),t=Ca().BADNUM,e=H1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=BW(),g=Ev().traceLayerPrefix;function I(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),jW=Dt((Q,Z)=>{var c=Ls(),g=bT().hoverPoints,I=bT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),UW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),VW=Dt((Q,Z)=>{Z.exports={attributes:SE(),supplyDefaults:FW(),colorbar:I1(),formatLabels:wE(),calc:RW(),plot:NW(),hoverPoints:jW(),eventData:UW(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=VW()}),WW=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +`}),{fragmentSource:$,vertexSource:ot,staticAttributes:xt,staticUniforms:xe}}var bf=Object.freeze({__proto__:null,prelude:Du,background:jc,backgroundPattern:qh,circle:hu,clippingMask:Lh,heatmap:Mc,heatmapTexture:Uc,collisionBox:wu,collisionCircle:uf,debug:yh,fill:$h,fillOutline:Cf,fillOutlinePattern:Ld,fillPattern:Jd,fillExtrusion:cf,fillExtrusionPattern:Lf,hillshadePrepare:wc,hillshade:hf,line:Qc,lineGradient:ff,linePattern:Pf,lineSDF:xh,raster:ku,symbolIcon:Ph,symbolSDF:Vc,symbolTextAndIcon:fd}),Zh=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Zh.prototype.bind=function($,ot,et,xt,Vt,de,xe,Yt){this.context=$;for(var he=this.boundPaintVertexBuffers.length!==xt.length,Ee=0;!he&&Ee>16,Yt>>16],u_pixel_coord_lower:[xe&65535,Yt&65535]}}function wf($,ot,et,xt){var Vt=et.imageManager.getPattern($.from.toString()),de=et.imageManager.getPattern($.to.toString()),xe=et.imageManager.getPixelSize(),Yt=xe.width,he=xe.height,Ee=Math.pow(2,xt.tileID.overscaledZ),ir=xt.tileSize*Math.pow(2,et.transform.tileZoom)/Ee,Ye=ir*(xt.tileID.canonical.x+xt.tileID.wrap*Ee),er=ir*xt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Vt.tl,u_pattern_br_a:Vt.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[Yt,he],u_mix:ot.t,u_pattern_size_a:Vt.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:ot.fromScale,u_scale_b:ot.toScale,u_tile_units_to_pixels:1/Qs(xt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ye>>16,er>>16],u_pixel_coord_lower:[Ye&65535,er&65535]}}var Pd=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_opacity:new t.Uniform1f($,ot.u_opacity)}},gc=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_height_factor:new t.Uniform1f($,ot.u_height_factor),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade),u_opacity:new t.Uniform1f($,ot.u_opacity)}},Qf=function($,ot,et,xt){var Vt=ot.style.light,de=Vt.properties.get("position"),xe=[de.x,de.y,de.z],Yt=t.create$1();Vt.properties.get("anchor")==="viewport"&&t.fromRotation(Yt,-ot.transform.angle),t.transformMat3(xe,xe,Yt);var he=Vt.properties.get("color");return{u_matrix:$,u_lightpos:xe,u_lightintensity:Vt.properties.get("intensity"),u_lightcolor:[he.r,he.g,he.b],u_vertical_gradient:+et,u_opacity:xt}},eh=function($,ot,et,xt,Vt,de,xe){return t.extend(Qf($,ot,et,xt),Gh(de,ot,xe),{u_height_factor:-Math.pow(2,Vt.overscaledZ)/xe.tileSize/8})},Ih=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},_h=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},Nu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world)}},iu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},bh=function($){return{u_matrix:$}},df=function($,ot,et,xt){return t.extend(bh($),Gh(et,ot,xt))},wh=function($,ot){return{u_matrix:$,u_world:ot}},$f=function($,ot,et,xt,Vt){return t.extend(df($,ot,et,xt),{u_world:Vt})},gr=function($,ot){return{u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i($,ot.u_scale_with_map),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Ur=function($,ot,et,xt){var Vt=$.transform,de,xe;if(xt.paint.get("circle-pitch-alignment")==="map"){var Yt=Qs(et,1,Vt.zoom);de=!0,xe=[Yt,Yt]}else de=!1,xe=Vt.pixelsToGLUnits;return{u_camera_to_center_distance:Vt.cameraToCenterDistance,u_scale_with_map:+(xt.paint.get("circle-pitch-scale")==="map"),u_matrix:$.translatePosMatrix(ot.posMatrix,et,xt.paint.get("circle-translate"),xt.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:xe}},wn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f($,ot.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_overscale_factor:new t.Uniform1f($,ot.u_overscale_factor)}},hn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_inv_matrix:new t.UniformMatrix4f($,ot.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f($,ot.u_viewport_size)}},Zn=function($,ot,et){var xt=Qs(et,1,ot.zoom),Vt=Math.pow(2,ot.zoom-et.tileID.overscaledZ),de=et.tileID.overscaleFactor();return{u_matrix:$,u_camera_to_center_distance:ot.cameraToCenterDistance,u_pixels_to_tile_units:xt,u_extrude_scale:[ot.pixelsToGLUnits[0]/(xt*Vt),ot.pixelsToGLUnits[1]/(xt*Vt)],u_overscale_factor:de}},gi=function($,ot,et){return{u_matrix:$,u_inv_matrix:ot,u_camera_to_center_distance:et.cameraToCenterDistance,u_viewport_size:[et.width,et.height]}},aa=function($,ot){return{u_color:new t.UniformColor($,ot.u_color),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_overlay:new t.Uniform1i($,ot.u_overlay),u_overlay_scale:new t.Uniform1f($,ot.u_overlay_scale)}},xa=function($,ot,et){return et===void 0&&(et=1),{u_matrix:$,u_color:ot,u_overlay:0,u_overlay_scale:et}},Ra=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Ga=function($){return{u_matrix:$}},fa=function($,ot){return{u_extrude_scale:new t.Uniform1f($,ot.u_extrude_scale),u_intensity:new t.Uniform1f($,ot.u_intensity),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Oa=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_color_ramp:new t.Uniform1i($,ot.u_color_ramp),u_opacity:new t.Uniform1f($,ot.u_opacity)}},Aa=function($,ot,et,xt){return{u_matrix:$,u_extrude_scale:Qs(ot,1,et),u_intensity:xt}},na=function($,ot,et,xt){var Vt=t.create();t.ortho(Vt,0,$.width,$.height,0,0,1);var de=$.context.gl;return{u_matrix:Vt,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:et,u_color_ramp:xt,u_opacity:ot.paint.get("heatmap-opacity")}},ao=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_latrange:new t.Uniform2f($,ot.u_latrange),u_light:new t.Uniform2f($,ot.u_light),u_shadow:new t.UniformColor($,ot.u_shadow),u_highlight:new t.UniformColor($,ot.u_highlight),u_accent:new t.UniformColor($,ot.u_accent)}},is=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_dimension:new t.Uniform2f($,ot.u_dimension),u_zoom:new t.Uniform1f($,ot.u_zoom),u_unpack:new t.Uniform4f($,ot.u_unpack)}},Xo=function($,ot,et){var xt=et.paint.get("hillshade-shadow-color"),Vt=et.paint.get("hillshade-highlight-color"),de=et.paint.get("hillshade-accent-color"),xe=et.paint.get("hillshade-illumination-direction")*(Math.PI/180);et.paint.get("hillshade-illumination-anchor")==="viewport"&&(xe-=$.transform.angle);var Yt=!$.options.moving;return{u_matrix:$.transform.calculatePosMatrix(ot.tileID.toUnwrapped(),Yt),u_image:0,u_latrange:ps($,ot.tileID),u_light:[et.paint.get("hillshade-exaggeration"),xe],u_shadow:xt,u_highlight:Vt,u_accent:de}},ls=function($,ot){var et=ot.stride,xt=t.create();return t.ortho(xt,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xt,xt,[0,-t.EXTENT,0]),{u_matrix:xt,u_image:1,u_dimension:[et,et],u_zoom:$.overscaledZ,u_unpack:ot.getUnpackVector()}};function ps($,ot){var et=Math.pow(2,ot.canonical.z),xt=ot.canonical.y;return[new t.MercatorCoordinate(0,xt/et).toLngLat().lat,new t.MercatorCoordinate(0,(xt+1)/et).toLngLat().lat]}var so=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels)}},$a=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_image:new t.Uniform1i($,ot.u_image),u_image_height:new t.Uniform1f($,ot.u_image_height)}},gs=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_texsize:new t.Uniform2f($,ot.u_texsize),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_image:new t.Uniform1i($,ot.u_image),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},el=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_patternscale_a:new t.Uniform2f($,ot.u_patternscale_a),u_patternscale_b:new t.Uniform2f($,ot.u_patternscale_b),u_sdfgamma:new t.Uniform1f($,ot.u_sdfgamma),u_image:new t.Uniform1i($,ot.u_image),u_tex_y_a:new t.Uniform1f($,ot.u_tex_y_a),u_tex_y_b:new t.Uniform1f($,ot.u_tex_y_b),u_mix:new t.Uniform1f($,ot.u_mix)}},Il=function($,ot,et){var xt=$.transform;return{u_matrix:qu($,ot,et),u_ratio:1/Qs(ot,1,xt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/xt.pixelsToGLUnits[0],1/xt.pixelsToGLUnits[1]]}},su=function($,ot,et,xt){return t.extend(Il($,ot,et),{u_image:0,u_image_height:xt})},$l=function($,ot,et,xt){var Vt=$.transform,de=ml(ot,Vt);return{u_matrix:qu($,ot,et),u_texsize:ot.imageAtlasTexture.size,u_ratio:1/Qs(ot,1,Vt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[de,xt.fromScale,xt.toScale],u_fade:xt.t,u_units_to_pixels:[1/Vt.pixelsToGLUnits[0],1/Vt.pixelsToGLUnits[1]]}},lu=function($,ot,et,xt,Vt){var de=$.transform,xe=$.lineAtlas,Yt=ml(ot,de),he=et.layout.get("line-cap")==="round",Ee=xe.getDash(xt.from,he),ir=xe.getDash(xt.to,he),Ye=Ee.width*Vt.fromScale,er=ir.width*Vt.toScale;return t.extend(Il($,ot,et),{u_patternscale_a:[Yt/Ye,-Ee.height/2],u_patternscale_b:[Yt/er,-ir.height/2],u_sdfgamma:xe.width/(Math.min(Ye,er)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Ee.y,u_tex_y_b:ir.y,u_mix:Vt.t})};function ml($,ot){return 1/Qs($,1,ot.tileZoom)}function qu($,ot,et){return $.translatePosMatrix(ot.tileID.posMatrix,ot,et.paint.get("line-translate"),et.paint.get("line-translate-anchor"))}var zu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_tl_parent:new t.Uniform2f($,ot.u_tl_parent),u_scale_parent:new t.Uniform1f($,ot.u_scale_parent),u_buffer_scale:new t.Uniform1f($,ot.u_buffer_scale),u_fade_t:new t.Uniform1f($,ot.u_fade_t),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image0:new t.Uniform1i($,ot.u_image0),u_image1:new t.Uniform1i($,ot.u_image1),u_brightness_low:new t.Uniform1f($,ot.u_brightness_low),u_brightness_high:new t.Uniform1f($,ot.u_brightness_high),u_saturation_factor:new t.Uniform1f($,ot.u_saturation_factor),u_contrast_factor:new t.Uniform1f($,ot.u_contrast_factor),u_spin_weights:new t.Uniform3f($,ot.u_spin_weights)}},fu=function($,ot,et,xt,Vt){return{u_matrix:$,u_tl_parent:ot,u_scale_parent:et,u_buffer_scale:1,u_fade_t:xt.mix,u_opacity:xt.opacity*Vt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Vt.paint.get("raster-brightness-min"),u_brightness_high:Vt.paint.get("raster-brightness-max"),u_saturation_factor:Kl(Vt.paint.get("raster-saturation")),u_contrast_factor:Es(Vt.paint.get("raster-contrast")),u_spin_weights:Oo(Vt.paint.get("raster-hue-rotate"))}};function Oo($){$*=Math.PI/180;var ot=Math.sin($),et=Math.cos($);return[(2*et+1)/3,(-Math.sqrt(3)*ot-et+1)/3,(Math.sqrt(3)*ot-et+1)/3]}function Es($){return $>0?1/(1-$):1+$}function Kl($){return $>0?1-1/(1.001-$):-$}var Rl=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture)}},vc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Hc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texsize_icon:new t.Uniform2f($,ot.u_texsize_icon),u_texture:new t.Uniform1i($,ot.u_texture),u_texture_icon:new t.Uniform1i($,ot.u_texture_icon),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Pc=function($,ot,et,xt,Vt,de,xe,Yt,he,Ee){var ir=Vt.transform;return{u_is_size_zoom_constant:+($==="constant"||$==="source"),u_is_size_feature_constant:+($==="constant"||$==="camera"),u_size_t:ot?ot.uSizeT:0,u_size:ot?ot.uSize:0,u_camera_to_center_distance:ir.cameraToCenterDistance,u_pitch:ir.pitch/360*2*Math.PI,u_rotate_symbol:+et,u_aspect_ratio:ir.width/ir.height,u_fade_change:Vt.options.fadeDuration?Vt.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:xe,u_coord_matrix:Yt,u_is_text:+he,u_pitch_with_map:+xt,u_texsize:Ee,u_texture:0}},zh=function($,ot,et,xt,Vt,de,xe,Yt,he,Ee,ir){var Ye=Vt.transform;return t.extend(Pc($,ot,et,xt,Vt,de,xe,Yt,he,Ee),{u_gamma_scale:xt?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Wc=function($,ot,et,xt,Vt,de,xe,Yt,he,Ee){return t.extend(zh($,ot,et,xt,Vt,de,xe,Yt,!0,he),{u_texsize_icon:Ee,u_texture_icon:1})},Oh=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_color:new t.UniformColor($,ot.u_color)}},Fu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image:new t.Uniform1i($,ot.u_image),u_pattern_tl_a:new t.Uniform2f($,ot.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f($,ot.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f($,ot.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f($,ot.u_pattern_br_b),u_texsize:new t.Uniform2f($,ot.u_texsize),u_mix:new t.Uniform1f($,ot.u_mix),u_pattern_size_a:new t.Uniform2f($,ot.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f($,ot.u_pattern_size_b),u_scale_a:new t.Uniform1f($,ot.u_scale_a),u_scale_b:new t.Uniform1f($,ot.u_scale_b),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f($,ot.u_tile_units_to_pixels)}},Dh=function($,ot,et){return{u_matrix:$,u_opacity:ot,u_color:et}},ns=function($,ot,et,xt,Vt,de){return t.extend(wf(xt,de,et,Vt),{u_matrix:$,u_opacity:ot})},zs={fillExtrusion:Pd,fillExtrusionPattern:gc,fill:Ih,fillPattern:_h,fillOutline:Nu,fillOutlinePattern:iu,circle:gr,collisionBox:wn,collisionCircle:hn,debug:aa,clippingMask:Ra,heatmap:fa,heatmapTexture:Oa,hillshade:ao,hillshadePrepare:is,line:so,lineGradient:$a,linePattern:gs,lineSDF:el,raster:zu,symbolIcon:Rl,symbolSDF:vc,symbolTextAndIcon:Hc,background:Oh,backgroundPattern:Fu},qc;function $u($,ot,et,xt,Vt,de,xe){for(var Yt=$.context,he=Yt.gl,Ee=$.useProgram("collisionBox"),ir=[],Ye=0,er=0,lr=0;lr0){var pn=t.create(),vi=Ze;t.mul(pn,Xe.placementInvProjMatrix,$.transform.glCoordMatrix),t.mul(pn,pn,Xe.placementViewportMatrix),ir.push({circleArray:sn,circleOffset:er,transform:vi,invTransform:pn}),Ye+=sn.length/4,er=Ye}Pr&&Ee.draw(Yt,he.LINES,ei.disabled,Gn.disabled,$.colorModeForRenderPass(),tn.disabled,Zn(Ze,$.transform,Ve),et.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,null,$.transform.zoom,null,null,Pr.collisionVertexBuffer)}}if(!(!xe||!ir.length)){var fi=$.useProgram("collisionCircle"),Xn=new t.StructArrayLayout2f1f2i16;Xn.resize(Ye*4),Xn._trim();for(var zi=0,yi=0,ea=ir;yi=0&&(hr[Xe.associatedIconIndex]={shiftedAnchor:ca,angle:to})}}if(ir){lr.clear();for(var Zo=$.icon.placedSymbolArray,xs=0;xs0){var xe=t.browser.now(),Yt=(xe-$.timeAdded)/de,he=ot?(xe-ot.timeAdded)/de:-1,Ee=et.getSource(),ir=Vt.coveringZoomLevel({tileSize:Ee.tileSize,roundZoom:Ee.roundZoom}),Ye=!ot||Math.abs(ot.tileID.overscaledZ-ir)>Math.abs($.tileID.overscaledZ-ir),er=Ye&&$.refreshedUponExpiration?1:t.clamp(Ye?Yt:1-he,0,1);return $.refreshedUponExpiration&&Yt>=1&&($.refreshedUponExpiration=!1),ot?{opacity:1,mix:1-er}:{opacity:er,mix:0}}else return{opacity:1,mix:0}}function Nr($,ot,et){var xt=et.paint.get("background-color"),Vt=et.paint.get("background-opacity");if(Vt!==0){var de=$.context,xe=de.gl,Yt=$.transform,he=Yt.tileSize,Ee=et.paint.get("background-pattern");if(!$.isPatternMissing(Ee)){var ir=!Ee&&xt.a===1&&Vt===1&&$.opaquePassEnabledForLayer()?"opaque":"translucent";if($.renderPass===ir){var Ye=Gn.disabled,er=$.depthModeForSublayer(0,ir==="opaque"?ei.ReadWrite:ei.ReadOnly),lr=$.colorModeForRenderPass(),hr=$.useProgram(Ee?"backgroundPattern":"background"),Ve=Yt.coveringTiles({tileSize:he});Ee&&(de.activeTexture.set(xe.TEXTURE0),$.imageManager.bind($.context));for(var Xe=et.getCrossfadeParameters(),Ze=0,Pr=Ve;Ze "+et.overscaledZ);var Ze=Xe+" "+lr+"kb";ds($,Ze),xe.draw(xt,Vt.TRIANGLES,Yt,he,nr.alphaBlended,tn.disabled,xa(de,t.Color.transparent,Ve),ir,$.debugBuffer,$.quadTriangleIndexBuffer,$.debugSegments)}function ds($,ot){$.initDebugOverlayCanvas();var et=$.debugOverlayCanvas,xt=$.context.gl,Vt=$.debugOverlayCanvas.getContext("2d");Vt.clearRect(0,0,et.width,et.height),Vt.shadowColor="white",Vt.shadowBlur=2,Vt.lineWidth=1.5,Vt.strokeStyle="white",Vt.textBaseline="top",Vt.font="bold 36px Open Sans, sans-serif",Vt.fillText(ot,5,5),Vt.strokeText(ot,5,5),$.debugOverlayTexture.update(et),$.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}function fl($,ot,et){var xt=$.context,Vt=et.implementation;if($.renderPass==="offscreen"){var de=Vt.prerender;de&&($.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),de.call(Vt,xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState())}else if($.renderPass==="translucent"){$.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),xt.setStencilMode(Gn.disabled);var xe=Vt.renderingMode==="3d"?new ei($.context.gl.LEQUAL,ei.ReadWrite,$.depthRangeFor3D):$.depthModeForSublayer(0,ei.ReadOnly);xt.setDepthMode(xe),Vt.render(xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState(),xt.bindFramebuffer.set(null)}}var vl={symbol:z,circle:Ke,heatmap:vr,line:Sn,fill:Xt,"fill-extrusion":_e,hillshade:je,raster:wr,background:Nr,debug:No,custom:fl},Ds=function($,ot){this.context=new Cn($),this.transform=ot,this._tileTextures={},this.setup(),this.numSublayers=Tn.maxUnderzooming+Tn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gu,this.gpuTimers={}};Ds.prototype.resize=function($,ot){if(this.width=$*t.browser.devicePixelRatio,this.height=ot*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var et=0,xt=this.style._order;et256&&this.clearStencil(),et.setColorMode(nr.disabled),et.setDepthMode(ei.disabled);var Vt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var de=0,xe=ot;de256&&this.clearStencil();var $=this.nextStencilID++,ot=this.context.gl;return new Gn({func:ot.NOTEQUAL,mask:255},$,255,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilModeForClipping=function($){var ot=this.context.gl;return new Gn({func:ot.EQUAL,mask:255},this._tileClippingMaskIDs[$.key],0,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilConfigForOverlap=function($){var ot,et=this.context.gl,xt=$.sort(function(he,Ee){return Ee.overscaledZ-he.overscaledZ}),Vt=xt[xt.length-1].overscaledZ,de=xt[0].overscaledZ-Vt+1;if(de>1){this.currentStencilSource=void 0,this.nextStencilID+de>256&&this.clearStencil();for(var xe={},Yt=0;Yt=0;this.currentLayer--){var sn=this.style._layers[xt[this.currentLayer]],pn=Vt[sn.source],vi=Yt[sn.source];this._renderTileClippingMasks(sn,vi),this.renderLayer(this,pn,sn,vi)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ot.pop():null},Ds.prototype.isPatternMissing=function($){if(!$)return!1;if(!$.from||!$.to)return!0;var ot=this.imageManager.getPattern($.from.toString()),et=this.imageManager.getPattern($.to.toString());return!ot||!et},Ds.prototype.useProgram=function($,ot){this.cache=this.cache||{};var et=""+$+(ot?ot.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[et]||(this.cache[et]=new nf(this.context,$,bf[$],ot,zs[$],this._showOverdrawInspector)),this.cache[et]},Ds.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ds.prototype.setBaseState=function(){var $=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set($.FUNC_ADD)},Ds.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var $=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,$.RGBA)}},Ds.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wl=function($,ot){this.points=$,this.planes=ot};wl.fromInvProjectionMatrix=function($,ot,et){var xt=[[-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]],Vt=Math.pow(2,et),de=xt.map(function(he){return t.transformMat4([],he,$)}).map(function(he){return t.scale$1([],he,1/he[3]/ot*Vt)}),xe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Yt=xe.map(function(he){var Ee=t.sub([],de[he[0]],de[he[1]]),ir=t.sub([],de[he[2]],de[he[1]]),Ye=t.normalize([],t.cross([],Ee,ir)),er=-t.dot(Ye,de[he[1]]);return Ye.concat(er)});return new wl(de,Yt)};var Lu=function($,ot){this.min=$,this.max=ot,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Lu.prototype.quadrant=function($){for(var ot=[$%2===0,$<2],et=t.clone$2(this.min),xt=t.clone$2(this.max),Vt=0;Vt=0;if(de===0)return 0;de!==ot.length&&(et=!1)}if(et)return 2;for(var Yt=0;Yt<3;Yt++){for(var he=Number.MAX_VALUE,Ee=-Number.MAX_VALUE,ir=0;ir<$.points.length;ir++){var Ye=$.points[ir][Yt]-this.min[Yt];he=Math.min(he,Ye),Ee=Math.max(Ee,Ye)}if(Ee<0||he>this.max[Yt]-this.min[Yt])return 0}return 1};var gu=function($,ot,et,xt){if($===void 0&&($=0),ot===void 0&&(ot=0),et===void 0&&(et=0),xt===void 0&&(xt=0),isNaN($)||$<0||isNaN(ot)||ot<0||isNaN(et)||et<0||isNaN(xt)||xt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=$,this.bottom=ot,this.left=et,this.right=xt};gu.prototype.interpolate=function($,ot,et){return ot.top!=null&&$.top!=null&&(this.top=t.number($.top,ot.top,et)),ot.bottom!=null&&$.bottom!=null&&(this.bottom=t.number($.bottom,ot.bottom,et)),ot.left!=null&&$.left!=null&&(this.left=t.number($.left,ot.left,et)),ot.right!=null&&$.right!=null&&(this.right=t.number($.right,ot.right,et)),this},gu.prototype.getCenter=function($,ot){var et=t.clamp((this.left+$-this.right)/2,0,$),xt=t.clamp((this.top+ot-this.bottom)/2,0,ot);return new t.Point(et,xt)},gu.prototype.equals=function($){return this.top===$.top&&this.bottom===$.bottom&&this.left===$.left&&this.right===$.right},gu.prototype.clone=function(){return new gu(this.top,this.bottom,this.left,this.right)},gu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var $s=function($,ot,et,xt,Vt){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Vt===void 0?!0:Vt,this._minZoom=$||0,this._maxZoom=ot||22,this._minPitch=et??0,this._maxPitch=xt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gu,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zs={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};$s.prototype.clone=function(){var $=new $s(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return $.tileSize=this.tileSize,$.latRange=this.latRange,$.width=this.width,$.height=this.height,$._center=this._center,$.zoom=this.zoom,$.angle=this.angle,$._fov=this._fov,$._pitch=this._pitch,$._unmodified=this._unmodified,$._edgeInsets=this._edgeInsets.clone(),$._calcMatrices(),$},Zs.minZoom.get=function(){return this._minZoom},Zs.minZoom.set=function($){this._minZoom!==$&&(this._minZoom=$,this.zoom=Math.max(this.zoom,$))},Zs.maxZoom.get=function(){return this._maxZoom},Zs.maxZoom.set=function($){this._maxZoom!==$&&(this._maxZoom=$,this.zoom=Math.min(this.zoom,$))},Zs.minPitch.get=function(){return this._minPitch},Zs.minPitch.set=function($){this._minPitch!==$&&(this._minPitch=$,this.pitch=Math.max(this.pitch,$))},Zs.maxPitch.get=function(){return this._maxPitch},Zs.maxPitch.set=function($){this._maxPitch!==$&&(this._maxPitch=$,this.pitch=Math.min(this.pitch,$))},Zs.renderWorldCopies.get=function(){return this._renderWorldCopies},Zs.renderWorldCopies.set=function($){$===void 0?$=!0:$===null&&($=!1),this._renderWorldCopies=$},Zs.worldSize.get=function(){return this.tileSize*this.scale},Zs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zs.size.get=function(){return new t.Point(this.width,this.height)},Zs.bearing.get=function(){return-this.angle/Math.PI*180},Zs.bearing.set=function($){var ot=-t.wrap($,-180,180)*Math.PI/180;this.angle!==ot&&(this._unmodified=!1,this.angle=ot,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zs.pitch.get=function(){return this._pitch/Math.PI*180},Zs.pitch.set=function($){var ot=t.clamp($,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ot&&(this._unmodified=!1,this._pitch=ot,this._calcMatrices())},Zs.fov.get=function(){return this._fov/Math.PI*180},Zs.fov.set=function($){$=Math.max(.01,Math.min(60,$)),this._fov!==$&&(this._unmodified=!1,this._fov=$/180*Math.PI,this._calcMatrices())},Zs.zoom.get=function(){return this._zoom},Zs.zoom.set=function($){var ot=Math.min(Math.max($,this.minZoom),this.maxZoom);this._zoom!==ot&&(this._unmodified=!1,this._zoom=ot,this.scale=this.zoomScale(ot),this.tileZoom=Math.floor(ot),this.zoomFraction=ot-this.tileZoom,this._constrain(),this._calcMatrices())},Zs.center.get=function(){return this._center},Zs.center.set=function($){$.lat===this._center.lat&&$.lng===this._center.lng||(this._unmodified=!1,this._center=$,this._constrain(),this._calcMatrices())},Zs.padding.get=function(){return this._edgeInsets.toJSON()},Zs.padding.set=function($){this._edgeInsets.equals($)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,$,1),this._calcMatrices())},Zs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},$s.prototype.isPaddingEqual=function($){return this._edgeInsets.equals($)},$s.prototype.interpolatePadding=function($,ot,et){this._unmodified=!1,this._edgeInsets.interpolate($,ot,et),this._constrain(),this._calcMatrices()},$s.prototype.coveringZoomLevel=function($){var ot=($.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/$.tileSize));return Math.max(0,ot)},$s.prototype.getVisibleUnwrappedCoordinates=function($){var ot=[new t.UnwrappedTileID(0,$)];if(this._renderWorldCopies)for(var et=this.pointCoordinate(new t.Point(0,0)),xt=this.pointCoordinate(new t.Point(this.width,0)),Vt=this.pointCoordinate(new t.Point(this.width,this.height)),de=this.pointCoordinate(new t.Point(0,this.height)),xe=Math.floor(Math.min(et.x,xt.x,Vt.x,de.x)),Yt=Math.floor(Math.max(et.x,xt.x,Vt.x,de.x)),he=1,Ee=xe-he;Ee<=Yt+he;Ee++)Ee!==0&&ot.push(new t.UnwrappedTileID(Ee,$));return ot},$s.prototype.coveringTiles=function($){var ot=this.coveringZoomLevel($),et=ot;if($.minzoom!==void 0&&ot<$.minzoom)return[];$.maxzoom!==void 0&&ot>$.maxzoom&&(ot=$.maxzoom);var xt=t.MercatorCoordinate.fromLngLat(this.center),Vt=Math.pow(2,ot),de=[Vt*xt.x,Vt*xt.y,0],xe=wl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ot),Yt=$.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Yt=ot);var he=3,Ee=function(Ii){return{aabb:new Lu([Ii*Vt,0,0],[(Ii+1)*Vt,Vt,0]),zoom:0,x:0,y:0,wrap:Ii,fullyVisible:!1}},ir=[],Ye=[],er=ot,lr=$.reparseOverscaled?et:ot;if(this._renderWorldCopies)for(var hr=1;hr<=3;hr++)ir.push(Ee(-hr)),ir.push(Ee(hr));for(ir.push(Ee(0));ir.length>0;){var Ve=ir.pop(),Xe=Ve.x,Ze=Ve.y,Pr=Ve.fullyVisible;if(!Pr){var sn=Ve.aabb.intersects(xe);if(sn===0)continue;Pr=sn===2}var pn=Ve.aabb.distanceX(de),vi=Ve.aabb.distanceY(de),fi=Math.max(Math.abs(pn),Math.abs(vi)),Xn=he+(1<Xn&&Ve.zoom>=Yt){Ye.push({tileID:new t.OverscaledTileID(Ve.zoom===er?lr:Ve.zoom,Ve.wrap,Ve.zoom,Xe,Ze),distanceSq:t.sqrLen([de[0]-.5-Xe,de[1]-.5-Ze])});continue}for(var zi=0;zi<4;zi++){var yi=(Xe<<1)+zi%2,ea=(Ze<<1)+(zi>>1);ir.push({aabb:Ve.aabb.quadrant(zi),zoom:Ve.zoom+1,x:yi,y:ea,wrap:Ve.wrap,fullyVisible:Pr})}}return Ye.sort(function(Ii,Oi){return Ii.distanceSq-Oi.distanceSq}).map(function(Ii){return Ii.tileID})},$s.prototype.resize=function($,ot){this.width=$,this.height=ot,this.pixelsToGLUnits=[2/$,-2/ot],this._constrain(),this._calcMatrices()},Zs.unmodified.get=function(){return this._unmodified},$s.prototype.zoomScale=function($){return Math.pow(2,$)},$s.prototype.scaleZoom=function($){return Math.log($)/Math.LN2},$s.prototype.project=function($){var ot=t.clamp($.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng($.lng)*this.worldSize,t.mercatorYfromLat(ot)*this.worldSize)},$s.prototype.unproject=function($){return new t.MercatorCoordinate($.x/this.worldSize,$.y/this.worldSize).toLngLat()},Zs.point.get=function(){return this.project(this.center)},$s.prototype.setLocationAtPoint=function($,ot){var et=this.pointCoordinate(ot),xt=this.pointCoordinate(this.centerPoint),Vt=this.locationCoordinate($),de=new t.MercatorCoordinate(Vt.x-(et.x-xt.x),Vt.y-(et.y-xt.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())},$s.prototype.locationPoint=function($){return this.coordinatePoint(this.locationCoordinate($))},$s.prototype.pointLocation=function($){return this.coordinateLocation(this.pointCoordinate($))},$s.prototype.locationCoordinate=function($){return t.MercatorCoordinate.fromLngLat($)},$s.prototype.coordinateLocation=function($){return $.toLngLat()},$s.prototype.pointCoordinate=function($){var ot=0,et=[$.x,$.y,0,1],xt=[$.x,$.y,1,1];t.transformMat4(et,et,this.pixelMatrixInverse),t.transformMat4(xt,xt,this.pixelMatrixInverse);var Vt=et[3],de=xt[3],xe=et[0]/Vt,Yt=xt[0]/de,he=et[1]/Vt,Ee=xt[1]/de,ir=et[2]/Vt,Ye=xt[2]/de,er=ir===Ye?0:(ot-ir)/(Ye-ir);return new t.MercatorCoordinate(t.number(xe,Yt,er)/this.worldSize,t.number(he,Ee,er)/this.worldSize)},$s.prototype.coordinatePoint=function($){var ot=[$.x*this.worldSize,$.y*this.worldSize,0,1];return t.transformMat4(ot,ot,this.pixelMatrix),new t.Point(ot[0]/ot[3],ot[1]/ot[3])},$s.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},$s.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},$s.prototype.setMaxBounds=function($){$?(this.lngRange=[$.getWest(),$.getEast()],this.latRange=[$.getSouth(),$.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},$s.prototype.calculatePosMatrix=function($,ot){ot===void 0&&(ot=!1);var et=$.key,xt=ot?this._alignedPosMatrixCache:this._posMatrixCache;if(xt[et])return xt[et];var Vt=$.canonical,de=this.worldSize/this.zoomScale(Vt.z),xe=Vt.x+Math.pow(2,Vt.z)*$.wrap,Yt=t.identity(new Float64Array(16));return t.translate(Yt,Yt,[xe*de,Vt.y*de,0]),t.scale(Yt,Yt,[de/t.EXTENT,de/t.EXTENT,1]),t.multiply(Yt,ot?this.alignedProjMatrix:this.projMatrix,Yt),xt[et]=new Float32Array(Yt),xt[et]},$s.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},$s.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var $=-90,ot=90,et=-180,xt=180,Vt,de,xe,Yt,he=this.size,Ee=this._unmodified;if(this.latRange){var ir=this.latRange;$=t.mercatorYfromLat(ir[1])*this.worldSize,ot=t.mercatorYfromLat(ir[0])*this.worldSize,Vt=ot-$ot&&(Yt=ot-Ve)}if(this.lngRange){var Xe=er.x,Ze=he.x/2;Xe-Zext&&(xe=xt-Ze)}(xe!==void 0||Yt!==void 0)&&(this.center=this.unproject(new t.Point(xe!==void 0?xe:er.x,Yt!==void 0?Yt:er.y))),this._unmodified=Ee,this._constraining=!1}},$s.prototype._calcMatrices=function(){if(this.height){var $=this._fov/2,ot=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan($)*this.height;var et=Math.PI/2+this._pitch,xt=this._fov*(.5+ot.y/this.height),Vt=Math.sin(xt)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-et-xt,.01,Math.PI-.01)),de=this.point,xe=de.x,Yt=de.y,he=Math.cos(Math.PI/2-this._pitch)*Vt+this.cameraToCenterDistance,Ee=he*1.01,ir=this.height/50,Ye=new Float64Array(16);t.perspective(Ye,this._fov,this.width/this.height,ir,Ee),Ye[8]=-ot.x*2/this.width,Ye[9]=ot.y*2/this.height,t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[0,0,-this.cameraToCenterDistance]),t.rotateX(Ye,Ye,this._pitch),t.rotateZ(Ye,Ye,this.angle),t.translate(Ye,Ye,[-xe,-Yt,0]),this.mercatorMatrix=t.scale([],Ye,[this.worldSize,this.worldSize,this.worldSize]),t.scale(Ye,Ye,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Ye,this.invProjMatrix=t.invert([],this.projMatrix);var er=this.width%2/2,lr=this.height%2/2,hr=Math.cos(this.angle),Ve=Math.sin(this.angle),Xe=xe-Math.round(xe)+hr*er+Ve*lr,Ze=Yt-Math.round(Yt)+hr*lr+Ve*er,Pr=new Float64Array(Ye);if(t.translate(Pr,Pr,[Xe>.5?Xe-1:Xe,Ze>.5?Ze-1:Ze,0]),this.alignedProjMatrix=Pr,Ye=t.create(),t.scale(Ye,Ye,[this.width/2,-this.height/2,1]),t.translate(Ye,Ye,[1,-1,0]),this.labelPlaneMatrix=Ye,Ye=t.create(),t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[-1,-1,0]),t.scale(Ye,Ye,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ye,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Ye=t.invert(new Float64Array(16),this.pixelMatrix),!Ye)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ye,this._posMatrixCache={},this._alignedPosMatrixCache={}}},$s.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var $=this.pointCoordinate(new t.Point(0,0)),ot=[$.x*this.worldSize,$.y*this.worldSize,0,1],et=t.transformMat4(ot,ot,this.pixelMatrix);return et[3]/this.cameraToCenterDistance},$s.prototype.getCameraPoint=function(){var $=this._pitch,ot=Math.tan($)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ot))},$s.prototype.getCameraQueryGeometry=function($){var ot=this.getCameraPoint();if($.length===1)return[$[0],ot];for(var et=ot.x,xt=ot.y,Vt=ot.x,de=ot.y,xe=0,Yt=$;xe=3&&!$.some(function(et){return isNaN(et)})){var ot=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+($[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+$[2],+$[1]],zoom:+$[0],bearing:ot,pitch:+($[4]||0)}),!0}return!1},dc.prototype._updateHashUnthrottled=function(){var $=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,$)}catch{}};var $c={linearity:.3,easing:t.bezier(0,0,.3,1)},At=t.extend({deceleration:2500,maxSpeed:1400},$c),Ut=t.extend({deceleration:20,maxSpeed:1400},$c),ue=t.extend({deceleration:1e3,maxSpeed:360},$c),Se=t.extend({deceleration:1e3,maxSpeed:90},$c),Pe=function($){this._map=$,this.clear()};Pe.prototype.clear=function(){this._inertiaBuffer=[]},Pe.prototype.record=function($){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:$})},Pe.prototype._drainInertiaBuffer=function(){for(var $=this._inertiaBuffer,ot=t.browser.now(),et=160;$.length>0&&ot-$[0].time>et;)$.shift()},Pe.prototype._onMoveEnd=function($){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ot={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},et=0,xt=this._inertiaBuffer;et=this._clickTolerance||this._map.fire(new ar($.type,this._map,$))},Jr.prototype.dblclick=function($){return this._firePreventable(new ar($.type,this._map,$))},Jr.prototype.mouseover=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.mouseout=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.touchstart=function($){return this._firePreventable(new Er($.type,this._map,$))},Jr.prototype.touchmove=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchend=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchcancel=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype._firePreventable=function($){if(this._map.fire($),$.defaultPrevented)return{}},Jr.prototype.isEnabled=function(){return!0},Jr.prototype.isActive=function(){return!1},Jr.prototype.enable=function(){},Jr.prototype.disable=function(){};var xn=function($){this._map=$};xn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},xn.prototype.mousemove=function($){this._map.fire(new ar($.type,this._map,$))},xn.prototype.mousedown=function(){this._delayContextMenu=!0},xn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ar("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},xn.prototype.contextmenu=function($){this._delayContextMenu?this._contextMenuEvent=$:this._map.fire(new ar($.type,this._map,$)),this._map.listens("contextmenu")&&$.preventDefault()},xn.prototype.isEnabled=function(){return!0},xn.prototype.isActive=function(){return!1},xn.prototype.enable=function(){},xn.prototype.disable=function(){};var zn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._container=$.getContainer(),this._clickTolerance=ot.clickTolerance||1};zn.prototype.isEnabled=function(){return!!this._enabled},zn.prototype.isActive=function(){return!!this._active},zn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},zn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},zn.prototype.mousedown=function($,ot){this.isEnabled()&&$.shiftKey&&$.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ot,this._active=!0)},zn.prototype.mousemoveWindow=function($,ot){if(this._active){var et=ot;if(!(this._lastPos.equals(et)||!this._box&&et.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=$.timeStamp),et.length===this.numTouches&&(this.centroid=$i(ot),this.touches=On(et,ot)))},ji.prototype.touchmove=function($,ot,et){if(!(this.aborted||!this.centroid)){var xt=On(et,ot);for(var Vt in this.touches){var de=this.touches[Vt],xe=xt[Vt];(!xe||xe.dist(de)>Pi)&&(this.aborted=!0)}}},ji.prototype.touchend=function($,ot,et){if((!this.centroid||$.timeStamp-this.startTime>bi)&&(this.aborted=!0),et.length===0){var xt=!this.aborted&&this.centroid;if(this.reset(),xt)return xt}};var Ki=function($){this.singleTap=new ji($),this.numTaps=$.numTaps,this.reset()};Ki.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ki.prototype.touchstart=function($,ot,et){this.singleTap.touchstart($,ot,et)},Ki.prototype.touchmove=function($,ot,et){this.singleTap.touchmove($,ot,et)},Ki.prototype.touchend=function($,ot,et){var xt=this.singleTap.touchend($,ot,et);if(xt){var Vt=$.timeStamp-this.lastTime0&&(this._active=!0);var xt=On(et,ot),Vt=new t.Point(0,0),de=new t.Point(0,0),xe=0;for(var Yt in xt){var he=xt[Yt],Ee=this._touches[Yt];Ee&&(Vt._add(he),de._add(he.sub(Ee)),xe++,xt[Yt]=he)}if(this._touches=xt,!(xeMath.abs($.x)}var Ul=100,ru=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.reset=function(){$.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ot.prototype._start=function(et){this._lastPoints=et,rh(et[0].sub(et[1]))&&(this._valid=!1)},ot.prototype._move=function(et,xt,Vt){var de=et[0].sub(this._lastPoints[0]),xe=et[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(de,xe,Vt.timeStamp),!!this._valid){this._lastPoints=et,this._active=!0;var Yt=(de.y+xe.y)/2,he=-.5;return{pitchDelta:Yt*he}}},ot.prototype.gestureBeginsVertically=function(et,xt,Vt){if(this._valid!==void 0)return this._valid;var de=2,xe=et.mag()>=de,Yt=xt.mag()>=de;if(!(!xe&&!Yt)){if(!xe||!Yt)return this._firstMove===void 0&&(this._firstMove=Vt),Vt-this._firstMove0==xt.y>0;return rh(et)&&rh(xt)&&he}},ot}(Tl),kh={panStep:100,bearingStep:15,pitchStep:10},be=function(){var $=kh;this._panStep=$.panStep,this._bearingStep=$.bearingStep,this._pitchStep=$.pitchStep,this._rotationDisabled=!1};be.prototype.reset=function(){this._active=!1},be.prototype.keydown=function($){var ot=this;if(!($.altKey||$.ctrlKey||$.metaKey)){var et=0,xt=0,Vt=0,de=0,xe=0;switch($.keyCode){case 61:case 107:case 171:case 187:et=1;break;case 189:case 109:case 173:et=-1;break;case 37:$.shiftKey?xt=-1:($.preventDefault(),de=-1);break;case 39:$.shiftKey?xt=1:($.preventDefault(),de=1);break;case 38:$.shiftKey?Vt=1:($.preventDefault(),xe=-1);break;case 40:$.shiftKey?Vt=-1:($.preventDefault(),xe=1);break;default:return}return this._rotationDisabled&&(xt=0,Vt=0),{cameraAnimation:function(Yt){var he=Yt.getZoom();Yt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tr,zoom:et?Math.round(he)+et*($.shiftKey?2:1):he,bearing:Yt.getBearing()+xt*ot._bearingStep,pitch:Yt.getPitch()+Vt*ot._pitchStep,offset:[-de*ot._panStep,-xe*ot._panStep],center:Yt.getCenter()},{originalEvent:$})}}}},be.prototype.enable=function(){this._enabled=!0},be.prototype.disable=function(){this._enabled=!1,this.reset()},be.prototype.isEnabled=function(){return this._enabled},be.prototype.isActive=function(){return this._active},be.prototype.disableRotation=function(){this._rotationDisabled=!0},be.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tr($){return $*(2-$)}var Ir=4.000244140625,Fn=1/100,hi=1/450,ni=2,yn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._handler=ot,this._delta=0,this._defaultZoomRate=Fn,this._wheelZoomRate=hi,t.bindAll(["_onTimeout"],this)};yn.prototype.setZoomRate=function($){this._defaultZoomRate=$},yn.prototype.setWheelZoomRate=function($){this._wheelZoomRate=$},yn.prototype.isEnabled=function(){return!!this._enabled},yn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},yn.prototype.isZooming=function(){return!!this._zooming},yn.prototype.enable=function($){this.isEnabled()||(this._enabled=!0,this._aroundCenter=$&&$.around==="center")},yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yn.prototype.wheel=function($){if(this.isEnabled()){var ot=$.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?$.deltaY*40:$.deltaY,et=t.browser.now(),xt=et-(this._lastWheelEventTime||0);this._lastWheelEventTime=et,ot!==0&&ot%Ir===0?this._type="wheel":ot!==0&&Math.abs(ot)<4?this._type="trackpad":xt>400?(this._type=null,this._lastValue=ot,this._timeout=setTimeout(this._onTimeout,40,$)):this._type||(this._type=Math.abs(xt*ot)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ot+=this._lastValue)),$.shiftKey&&ot&&(ot=ot/4),this._type&&(this._lastWheelEvent=$,this._delta-=ot,this._active||this._start($)),$.preventDefault()}},yn.prototype._onTimeout=function($){this._type="wheel",this._delta-=this._lastValue,this._active||this._start($)},yn.prototype._start=function($){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ot=r.mousePos(this._el,$);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ot)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},yn.prototype.renderFrame=function(){var $=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ot=this._map.transform;if(this._delta!==0){var et=this._type==="wheel"&&Math.abs(this._delta)>Ir?this._wheelZoomRate:this._defaultZoomRate,xt=ni/(1+Math.exp(-Math.abs(this._delta*et)));this._delta<0&&xt!==0&&(xt=1/xt);var Vt=typeof this._targetZoom=="number"?ot.zoomScale(this._targetZoom):ot.scale;this._targetZoom=Math.min(ot.maxZoom,Math.max(ot.minZoom,ot.scaleZoom(Vt*xt))),this._type==="wheel"&&(this._startZoom=ot.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var de=typeof this._targetZoom=="number"?this._targetZoom:ot.zoom,xe=this._startZoom,Yt=this._easing,he=!1,Ee;if(this._type==="wheel"&&xe&&Yt){var ir=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),Ye=Yt(ir);Ee=t.number(xe,de,Ye),ir<1?this._frameId||(this._frameId=!0):he=!0}else Ee=de,he=!0;return this._active=!0,he&&(this._active=!1,this._finishTimeout=setTimeout(function(){$._zooming=!1,$._handler._triggerRenderFrame(),delete $._targetZoom,delete $._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!he,zoomDelta:Ee-ot.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},yn.prototype._smoothOutEasing=function($){var ot=t.ease;if(this._prevEase){var et=this._prevEase,xt=(t.browser.now()-et.start)/et.duration,Vt=et.easing(xt+.01)-et.easing(xt),de=.27/Math.sqrt(Vt*Vt+1e-4)*.01,xe=Math.sqrt(.27*.27-de*de);ot=t.bezier(de,xe,.25,1)}return this._prevEase={start:t.browser.now(),duration:$,easing:ot},ot},yn.prototype.reset=function(){this._active=!1};var li=function($,ot){this._clickZoom=$,this._tapZoom=ot};li.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},li.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},li.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},li.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ta=function(){this.reset()};ta.prototype.reset=function(){this._active=!1},ta.prototype.dblclick=function($,ot){return $.preventDefault(),{cameraAnimation:function(et){et.easeTo({duration:300,zoom:et.getZoom()+($.shiftKey?-1:1),around:et.unproject(ot)},{originalEvent:$})}}},ta.prototype.enable=function(){this._enabled=!0},ta.prototype.disable=function(){this._enabled=!1,this.reset()},ta.prototype.isEnabled=function(){return this._enabled},ta.prototype.isActive=function(){return this._active};var Gi=function(){this._tap=new Ki({numTouches:1,numTaps:1}),this.reset()};Gi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Gi.prototype.touchstart=function($,ot,et){this._swipePoint||(this._tapTime&&$.timeStamp-this._tapTime>Vn&&this.reset(),this._tapTime?et.length>0&&(this._swipePoint=ot[0],this._swipeTouch=et[0].identifier):this._tap.touchstart($,ot,et))},Gi.prototype.touchmove=function($,ot,et){if(!this._tapTime)this._tap.touchmove($,ot,et);else if(this._swipePoint){if(et[0].identifier!==this._swipeTouch)return;var xt=ot[0],Vt=xt.y-this._swipePoint.y;return this._swipePoint=xt,$.preventDefault(),this._active=!0,{zoomDelta:Vt/128}}},Gi.prototype.touchend=function($,ot,et){if(this._tapTime)this._swipePoint&&et.length===0&&this.reset();else{var xt=this._tap.touchend($,ot,et);xt&&(this._tapTime=$.timeStamp)}},Gi.prototype.touchcancel=function(){this.reset()},Gi.prototype.enable=function(){this._enabled=!0},Gi.prototype.disable=function(){this._enabled=!1,this.reset()},Gi.prototype.isEnabled=function(){return this._enabled},Gi.prototype.isActive=function(){return this._active};var _a=function($,ot,et){this._el=$,this._mousePan=ot,this._touchPan=et};_a.prototype.enable=function($){this._inertiaOptions=$||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},_a.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},_a.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},_a.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Za=function($,ot,et){this._pitchWithRotate=$.pitchWithRotate,this._mouseRotate=ot,this._mousePitch=et};Za.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Za.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Za.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Za.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Na=function($,ot,et,xt){this._el=$,this._touchZoom=ot,this._touchRotate=et,this._tapDragZoom=xt,this._rotationDisabled=!1,this._enabled=!0};Na.prototype.enable=function($){this._touchZoom.enable($),this._rotationDisabled||this._touchRotate.enable($),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Na.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Na.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Na.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Na.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Na.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ia=function($){return $.zoom||$.drag||$.pitch||$.rotate},Ei=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot}(t.Event);function dn($){return $.panDelta&&$.panDelta.mag()||$.zoomDelta||$.bearingDelta||$.pitchDelta}var Un=function($,ot){this._map=$,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pe($),this._bearingSnap=ot.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ot),t.bindAll(["handleEvent","handleWindowEvent"],this);var et=this._el;this._listeners=[[et,"touchstart",{passive:!0}],[et,"touchmove",{passive:!1}],[et,"touchend",void 0],[et,"touchcancel",void 0],[et,"mousedown",void 0],[et,"mousemove",void 0],[et,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[et,"mouseover",void 0],[et,"mouseout",void 0],[et,"dblclick",void 0],[et,"click",void 0],[et,"keydown",{capture:!1}],[et,"keyup",void 0],[et,"wheel",{passive:!1}],[et,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xt=0,Vt=this._listeners;xtxe?Math.min(2,pn):Math.max(.5,pn),Ii=Math.pow(ea,1-zi),Oi=de.unproject(Pr.add(sn.mult(zi*Ii)).mult(yi));de.setLocationAtPoint(de.renderWorldCopies?Oi.wrap():Oi,Ve)}Vt._fireMoveEvents(xt)},function(zi){Vt._afterEase(xt,zi)},et),this},ot.prototype._prepareEase=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._moving=!0,!xt&&!Vt.moving&&this.fire(new t.Event("movestart",et)),this._zooming&&!Vt.zooming&&this.fire(new t.Event("zoomstart",et)),this._rotating&&!Vt.rotating&&this.fire(new t.Event("rotatestart",et)),this._pitching&&!Vt.pitching&&this.fire(new t.Event("pitchstart",et))},ot.prototype._fireMoveEvents=function(et){this.fire(new t.Event("move",et)),this._zooming&&this.fire(new t.Event("zoom",et)),this._rotating&&this.fire(new t.Event("rotate",et)),this._pitching&&this.fire(new t.Event("pitch",et))},ot.prototype._afterEase=function(et,xt){if(!(this._easeId&&xt&&this._easeId===xt)){delete this._easeId;var Vt=this._zooming,de=this._rotating,xe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Vt&&this.fire(new t.Event("zoomend",et)),de&&this.fire(new t.Event("rotateend",et)),xe&&this.fire(new t.Event("pitchend",et)),this.fire(new t.Event("moveend",et))}},ot.prototype.flyTo=function(et,xt){var Vt=this;if(!et.essential&&t.browser.prefersReducedMotion){var de=t.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(de,xt)}this.stop(),et=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},et);var xe=this.transform,Yt=this.getZoom(),he=this.getBearing(),Ee=this.getPitch(),ir=this.getPadding(),Ye="zoom"in et?t.clamp(+et.zoom,xe.minZoom,xe.maxZoom):Yt,er="bearing"in et?this._normalizeBearing(et.bearing,he):he,lr="pitch"in et?+et.pitch:Ee,hr="padding"in et?et.padding:xe.padding,Ve=xe.zoomScale(Ye-Yt),Xe=t.Point.convert(et.offset),Ze=xe.centerPoint.add(Xe),Pr=xe.pointLocation(Ze),sn=t.LngLat.convert(et.center||Pr);this._normalizeCenter(sn);var pn=xe.project(Pr),vi=xe.project(sn).sub(pn),fi=et.curve,Xn=Math.max(xe.width,xe.height),zi=Xn/Ve,yi=vi.mag();if("minZoom"in et){var ea=t.clamp(Math.min(et.minZoom,Yt,Ye),xe.minZoom,xe.maxZoom),Ii=Xn/xe.zoomScale(ea-Yt);fi=Math.sqrt(Ii/yi*2)}var Oi=fi*fi;function ca(Fs){var Su=(zi*zi-Xn*Xn+(Fs?-1:1)*Oi*Oi*yi*yi)/(2*(Fs?zi:Xn)*Oi*yi);return Math.log(Math.sqrt(Su*Su+1)-Su)}function to(Fs){return(Math.exp(Fs)-Math.exp(-Fs))/2}function ho(Fs){return(Math.exp(Fs)+Math.exp(-Fs))/2}function Zo(Fs){return to(Fs)/ho(Fs)}var xs=ca(0),zl=function(Fs){return ho(xs)/ho(xs+fi*Fs)},Hl=function(Fs){return Xn*((ho(xs)*Zo(xs+fi*Fs)-to(xs))/Oi)/yi},pl=(ca(1)-xs)/fi;if(Math.abs(yi)<1e-6||!isFinite(pl)){if(Math.abs(Xn-zi)<1e-6)return this.easeTo(et,xt);var Wl=ziet.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=he!==er,this._pitching=lr!==Ee,this._padding=!xe.isPaddingEqual(hr),this._prepareEase(xt,!1),this._ease(function(Fs){var Su=Fs*pl,af=1/zl(Su);xe.zoom=Fs===1?Ye:Yt+xe.scaleZoom(af),Vt._rotating&&(xe.bearing=t.number(he,er,Fs)),Vt._pitching&&(xe.pitch=t.number(Ee,lr,Fs)),Vt._padding&&(xe.interpolatePadding(ir,hr,Fs),Ze=xe.centerPoint.add(Xe));var If=Fs===1?sn:xe.unproject(pn.add(vi.mult(Hl(Su))).mult(af));xe.setLocationAtPoint(xe.renderWorldCopies?If.wrap():If,Ze),Vt._fireMoveEvents(xt)},function(){return Vt._afterEase(xt)},et),this},ot.prototype.isEasing=function(){return!!this._easeFrameId},ot.prototype.stop=function(){return this._stop()},ot.prototype._stop=function(et,xt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Vt=this._onEaseEnd;delete this._onEaseEnd,Vt.call(this,xt)}if(!et){var de=this.handlers;de&&de.stop(!1)}return this},ot.prototype._ease=function(et,xt,Vt){Vt.animate===!1||Vt.duration===0?(et(1),xt()):(this._easeStart=t.browser.now(),this._easeOptions=Vt,this._onEaseFrame=et,this._onEaseEnd=xt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ot.prototype._renderFrameCallback=function(){var et=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ot.prototype._normalizeBearing=function(et,xt){et=t.wrap(et,-180,180);var Vt=Math.abs(et-xt);return Math.abs(et-360-xt)180?-360:Vt<-180?360:0}},ot}(t.Evented),Si=function($){$===void 0&&($={}),this.options=$,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Si.prototype.getDefaultPosition=function(){return"bottom-right"},Si.prototype.onAdd=function($){var ot=this.options&&this.options.compact;return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ot&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ot===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Si.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Si.prototype._setElementTitle=function($,ot){var et=this._map._getUIString("AttributionControl."+ot);$.title=et,$.setAttribute("aria-label",et)},Si.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Si.prototype._updateEditLink=function(){var $=this._editLink;$||($=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ot=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if($){var et=ot.reduce(function(xt,Vt,de){return Vt.value&&(xt+=Vt.key+"="+Vt.value+(de=0)return!1;return!0});var xe=$.join(" | ");xe!==this._attribHTML&&(this._attribHTML=xe,$.length?(this._innerContainer.innerHTML=xe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Si.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ai=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};ai.prototype.onAdd=function($){this._map=$,this._container=r.create("div","mapboxgl-ctrl");var ot=r.create("a","mapboxgl-ctrl-logo");return ot.target="_blank",ot.rel="noopener nofollow",ot.href="https://www.mapbox.com/",ot.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ot.setAttribute("rel","noopener nofollow"),this._container.appendChild(ot),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ai.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ai.prototype.getDefaultPosition=function(){return"bottom-left"},ai.prototype._updateLogo=function($){(!$||$.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ai.prototype._logoRequired=function(){if(this._map.style){var $=this._map.style.sourceCaches;for(var ot in $){var et=$[ot].getSource();if(et.mapbox_logo)return!0}return!1}},ai.prototype._updateCompact=function(){var $=this._container.children;if($.length){var ot=$[0];this._map.getCanvasContainer().offsetWidth<250?ot.classList.add("mapboxgl-compact"):ot.classList.remove("mapboxgl-compact")}};var Ea=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ea.prototype.add=function($){var ot=++this._id,et=this._queue;return et.push({callback:$,id:ot,cancelled:!1}),ot},Ea.prototype.remove=function($){for(var ot=this._currentlyRunning,et=ot?this._queue.concat(ot):this._queue,xt=0,Vt=et;xtxt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(xt.minPitch!=null&&xt.maxPitch!=null&&xt.minPitch>xt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(xt.minPitch!=null&&xt.minPitchQi)throw new Error("maxPitch must be less than or equal to "+Qi);var de=new $s(xt.minZoom,xt.maxZoom,xt.minPitch,xt.maxPitch,xt.renderWorldCopies);if($.call(this,de,xt),this._interactive=xt.interactive,this._maxTileCacheSize=xt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=xt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=xt.preserveDrawingBuffer,this._antialias=xt.antialias,this._trackResize=xt.trackResize,this._bearingSnap=xt.bearingSnap,this._refreshExpiredTiles=xt.refreshExpiredTiles,this._fadeDuration=xt.fadeDuration,this._crossSourceCollisions=xt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=xt.collectResourceTiming,this._renderTaskQueue=new Ea,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},da,xt.locale),this._clickTolerance=xt.clickTolerance,this._requestManager=new t.RequestManager(xt.transformRequest,xt.accessToken),typeof xt.container=="string"){if(this._container=t.window.document.getElementById(xt.container),!this._container)throw new Error("Container '"+xt.container+"' not found.")}else if(xt.container instanceof ki)this._container=xt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(xt.maxBounds&&this.setMaxBounds(xt.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Vt._update(!1)}),this.on("moveend",function(){return Vt._update(!1)}),this.on("zoom",function(){return Vt._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Un(this,xt);var xe=typeof xt.hash=="string"&&xt.hash||void 0;this._hash=xt.hash&&new dc(xe).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:xt.center,zoom:xt.zoom,bearing:xt.bearing,pitch:xt.pitch}),xt.bounds&&(this.resize(),this.fitBounds(xt.bounds,t.extend({},xt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=xt.localIdeographFontFamily,xt.style&&this.setStyle(xt.style,{localIdeographFontFamily:xt.localIdeographFontFamily}),xt.attributionControl&&this.addControl(new Si({customAttribution:xt.customAttribution})),this.addControl(new ai,xt.logoPosition),this.on("style.load",function(){Vt.transform.unmodified&&Vt.jumpTo(Vt.style.stylesheet)}),this.on("data",function(Yt){Vt._update(Yt.dataType==="style"),Vt.fire(new t.Event(Yt.dataType+"data",Yt))}),this.on("dataloading",function(Yt){Vt.fire(new t.Event(Yt.dataType+"dataloading",Yt))})}$&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot;var et={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ot.prototype._getMapId=function(){return this._mapId},ot.prototype.addControl=function(xt,Vt){if(Vt===void 0&&(xt.getDefaultPosition?Vt=xt.getDefaultPosition():Vt="top-right"),!xt||!xt.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var de=xt.onAdd(this);this._controls.push(xt);var xe=this._controlPositions[Vt];return Vt.indexOf("bottom")!==-1?xe.insertBefore(de,xe.firstChild):xe.appendChild(de),this},ot.prototype.removeControl=function(xt){if(!xt||!xt.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Vt=this._controls.indexOf(xt);return Vt>-1&&this._controls.splice(Vt,1),xt.onRemove(this),this},ot.prototype.hasControl=function(xt){return this._controls.indexOf(xt)>-1},ot.prototype.resize=function(xt){var Vt=this._containerDimensions(),de=Vt[0],xe=Vt[1];this._resizeCanvas(de,xe),this.transform.resize(de,xe),this.painter.resize(de,xe);var Yt=!this._moving;return Yt&&(this.stop(),this.fire(new t.Event("movestart",xt)).fire(new t.Event("move",xt))),this.fire(new t.Event("resize",xt)),Yt&&this.fire(new t.Event("moveend",xt)),this},ot.prototype.getBounds=function(){return this.transform.getBounds()},ot.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ot.prototype.setMaxBounds=function(xt){return this.transform.setMaxBounds(t.LngLatBounds.convert(xt)),this._update()},ot.prototype.setMinZoom=function(xt){if(xt=xt??Ca,xt>=Ca&&xt<=this.transform.maxZoom)return this.transform.minZoom=xt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xt,this._update(),this.getZoom()>xt&&this.setZoom(xt),this;throw new Error("maxZoom must be greater than the current minZoom")},ot.prototype.getMaxZoom=function(){return this.transform.maxZoom},ot.prototype.setMinPitch=function(xt){if(xt=xt??Xi,xt=Xi&&xt<=this.transform.maxPitch)return this.transform.minPitch=xt,this._update(),this.getPitch()Qi)throw new Error("maxPitch must be less than or equal to "+Qi);if(xt>=this.transform.minPitch)return this.transform.maxPitch=xt,this._update(),this.getPitch()>xt&&this.setPitch(xt),this;throw new Error("maxPitch must be greater than the current minPitch")},ot.prototype.getMaxPitch=function(){return this.transform.maxPitch},ot.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ot.prototype.setRenderWorldCopies=function(xt){return this.transform.renderWorldCopies=xt,this._update()},ot.prototype.project=function(xt){return this.transform.locationPoint(t.LngLat.convert(xt))},ot.prototype.unproject=function(xt){return this.transform.pointLocation(t.Point.convert(xt))},ot.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ot.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ot.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ot.prototype._createDelegatedListener=function(xt,Vt,de){var xe=this,Yt;if(xt==="mouseenter"||xt==="mouseover"){var he=!1,Ee=function(Ve){var Xe=xe.getLayer(Vt)?xe.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?he||(he=!0,de.call(xe,new ar(xt,xe,Ve.originalEvent,{features:Xe}))):he=!1},ir=function(){he=!1};return{layer:Vt,listener:de,delegates:{mousemove:Ee,mouseout:ir}}}else if(xt==="mouseleave"||xt==="mouseout"){var Ye=!1,er=function(Ve){var Xe=xe.getLayer(Vt)?xe.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?Ye=!0:Ye&&(Ye=!1,de.call(xe,new ar(xt,xe,Ve.originalEvent)))},lr=function(Ve){Ye&&(Ye=!1,de.call(xe,new ar(xt,xe,Ve.originalEvent)))};return{layer:Vt,listener:de,delegates:{mousemove:er,mouseout:lr}}}else{var hr=function(Ve){var Xe=xe.getLayer(Vt)?xe.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length&&(Ve.features=Xe,de.call(xe,Ve),delete Ve.features)};return{layer:Vt,listener:de,delegates:(Yt={},Yt[xt]=hr,Yt)}}},ot.prototype.on=function(xt,Vt,de){if(de===void 0)return $.prototype.on.call(this,xt,Vt);var xe=this._createDelegatedListener(xt,Vt,de);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xt]=this._delegatedListeners[xt]||[],this._delegatedListeners[xt].push(xe);for(var Yt in xe.delegates)this.on(Yt,xe.delegates[Yt]);return this},ot.prototype.once=function(xt,Vt,de){if(de===void 0)return $.prototype.once.call(this,xt,Vt);var xe=this._createDelegatedListener(xt,Vt,de);for(var Yt in xe.delegates)this.once(Yt,xe.delegates[Yt]);return this},ot.prototype.off=function(xt,Vt,de){var xe=this;if(de===void 0)return $.prototype.off.call(this,xt,Vt);var Yt=function(he){for(var Ee=he[xt],ir=0;ir180;){var xe=et.locationPoint($);if(xe.x>=0&&xe.y>=0&&xe.x<=et.width&&xe.y<=et.height)break;$.lng>et.center.lng?$.lng-=360:$.lng+=360}return $}var rs={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Vl($,ot,et){var xt=$.classList;for(var Vt in rs)xt.remove("mapboxgl-"+et+"-anchor-"+Vt);xt.add("mapboxgl-"+et+"-anchor-"+ot)}var Al=function($){function ot(et,xt){if($.call(this),(et instanceof t.window.HTMLElement||xt)&&(et=t.extend({element:et},xt)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=et&&et.anchor||"center",this._color=et&&et.color||"#3FB1CE",this._scale=et&&et.scale||1,this._draggable=et&&et.draggable||!1,this._clickTolerance=et&&et.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=et&&et.rotation||0,this._rotationAlignment=et&&et.rotationAlignment||"auto",this._pitchAlignment=et&&et.pitchAlignment&&et.pitchAlignment!=="auto"?et.pitchAlignment:this._rotationAlignment,!et||!et.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var Vt=r.createNS("http://www.w3.org/2000/svg","svg"),de=41,xe=27;Vt.setAttributeNS(null,"display","block"),Vt.setAttributeNS(null,"height",de+"px"),Vt.setAttributeNS(null,"width",xe+"px"),Vt.setAttributeNS(null,"viewBox","0 0 "+xe+" "+de);var Yt=r.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"stroke","none"),Yt.setAttributeNS(null,"stroke-width","1"),Yt.setAttributeNS(null,"fill","none"),Yt.setAttributeNS(null,"fill-rule","evenodd");var he=r.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"fill-rule","nonzero");var Ee=r.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ee.setAttributeNS(null,"fill","#000000");for(var ir=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Ye=0,er=ir;Ye=xt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},ot.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},ot.prototype._addDragHandler=function(et){this._element.contains(et.originalEvent.target)&&(et.preventDefault(),this._positionDelta=et.point.sub(this._pos).add(this._offset),this._pointerdownPos=et.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))},ot.prototype.setDraggable=function(et){return this._draggable=!!et,this._map&&(et?(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},ot.prototype.isDraggable=function(){return this._draggable},ot.prototype.setRotation=function(et){return this._rotation=et||0,this._update(),this},ot.prototype.getRotation=function(){return this._rotation},ot.prototype.setRotationAlignment=function(et){return this._rotationAlignment=et||"auto",this._update(),this},ot.prototype.getRotationAlignment=function(){return this._rotationAlignment},ot.prototype.setPitchAlignment=function(et){return this._pitchAlignment=et&&et!=="auto"?et:this._rotationAlignment,this._update(),this},ot.prototype.getPitchAlignment=function(){return this._pitchAlignment},ot}(t.Evented),hs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Tu;function dl($){Tu!==void 0?$(Tu):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(ot){Tu=ot.state!=="denied",$(Tu)}):(Tu=!!t.window.navigator.geolocation,$(Tu))}var Pu=0,pc=!1,yc=function($){function ot(et){$.call(this),this.options=t.extend({},hs,et),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.onAdd=function(et){return this._map=et,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),dl(this._setupUI),this._container},ot.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Pu=0,pc=!1},ot.prototype._isOutOfMapMaxBounds=function(et){var xt=this._map.getMaxBounds(),Vt=et.coords;return xt&&(Vt.longitudext.getEast()||Vt.latitudext.getNorth())},ot.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ot.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",et)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(et),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",et)),this._finish()}},ot.prototype._updateCamera=function(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude),Vt=et.coords.accuracy,de=this._map.getBearing(),xe=t.extend({bearing:de},this.options.fitBoundsOptions);this._map.fitBounds(xt.toBounds(Vt),xe,{geolocateSource:!0})},ot.prototype._updateMarker=function(et){if(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(xt).addTo(this._map),this._userLocationDotMarker.setLngLat(xt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ot.prototype._updateCircleRadius=function(){var et=this._map._container.clientHeight/2,xt=this._map.unproject([0,et]),Vt=this._map.unproject([1,et]),de=xt.distanceTo(Vt),xe=Math.ceil(2*this._accuracy/de);this._circleElement.style.width=xe+"px",this._circleElement.style.height=xe+"px"},ot.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ot.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(et.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(et.code===3&&pc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",et)),this._finish()}},ot.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ot.prototype._setupUI=function(et){var xt=this;if(this._container.addEventListener("contextmenu",function(xe){return xe.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",et===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Vt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Vt,this._geolocateButton.setAttribute("aria-label",Vt)}else{var de=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Al(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Al({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(xe){var Yt=xe.originalEvent&&xe.originalEvent.type==="resize";!xe.geolocateSource&&xt._watchState==="ACTIVE_LOCK"&&!Yt&&(xt._watchState="BACKGROUND",xt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xt.fire(new t.Event("trackuserlocationend")))})},ot.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Pu--,pc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Pu++;var et;Pu>1?(et={maximumAge:6e5,timeout:0},pc=!0):(et=this.options.positionOptions,pc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ot.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ot}(t.Evented),xu={maxWidth:100,unit:"metric"},pu=function($){this.options=t.extend({},xu,$),t.bindAll(["_onMove","setUnit"],this)};pu.prototype.getDefaultPosition=function(){return"bottom-left"},pu.prototype._onMove=function(){Au(this._map,this._container,this.options)},pu.prototype.onAdd=function($){return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",$.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},pu.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},pu.prototype.setUnit=function($){this.options.unit=$,Au(this._map,this._container,this.options)};function Au($,ot,et){var xt=et&&et.maxWidth||100,Vt=$._container.clientHeight/2,de=$.unproject([0,Vt]),xe=$.unproject([xt,Vt]),Yt=de.distanceTo(xe);if(et&&et.unit==="imperial"){var he=3.2808*Yt;if(he>5280){var Ee=he/5280;jo(ot,xt,Ee,$._getUIString("ScaleControl.Miles"))}else jo(ot,xt,he,$._getUIString("ScaleControl.Feet"))}else if(et&&et.unit==="nautical"){var ir=Yt/1852;jo(ot,xt,ir,$._getUIString("ScaleControl.NauticalMiles"))}else Yt>=1e3?jo(ot,xt,Yt/1e3,$._getUIString("ScaleControl.Kilometers")):jo(ot,xt,Yt,$._getUIString("ScaleControl.Meters"))}function jo($,ot,et,xt){var Vt=sl(et),de=Vt/et;$.style.width=ot*de+"px",$.innerHTML=Vt+" "+xt}function Mu($){var ot=Math.pow(10,Math.ceil(-Math.log($)/Math.LN10));return Math.round($*ot)/ot}function sl($){var ot=Math.pow(10,(""+Math.floor($)).length-1),et=$/ot;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:Mu(et),ot*et}var Iu=function($){this._fullscreen=!1,$&&$.container&&($.container instanceof t.window.HTMLElement?this._container=$.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Iu.prototype.onAdd=function($){return this._map=$,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Iu.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Iu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Iu.prototype._setupUI=function(){var $=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",$).setAttribute("aria-hidden",!0),$.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Iu.prototype._updateTitle=function(){var $=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$),this._fullscreenButton.title=$},Iu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Iu.prototype._isFullscreen=function(){return this._fullscreen},Iu.prototype._changeIcon=function(){var $=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;$===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Iu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Lo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Cs=function($){function ot(et){$.call(this),this.options=t.extend(Object.create(xc),et),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ot.prototype.isOpen=function(){return!!this._map},ot.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ot.prototype.getLngLat=function(){return this._lngLat},ot.prototype.setLngLat=function(et){return this._lngLat=t.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ot.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ot.prototype.getElement=function(){return this._container},ot.prototype.setText=function(et){return this.setDOMContent(t.window.document.createTextNode(et))},ot.prototype.setHTML=function(et){var xt=t.window.document.createDocumentFragment(),Vt=t.window.document.createElement("body"),de;for(Vt.innerHTML=et;de=Vt.firstChild,!!de;)xt.appendChild(de);return this.setDOMContent(xt)},ot.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ot.prototype.setMaxWidth=function(et){return this.options.maxWidth=et,this._update(),this},ot.prototype.setDOMContent=function(et){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(et),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ot.prototype.addClassName=function(et){this._container&&this._container.classList.add(et)},ot.prototype.removeClassName=function(et){this._container&&this._container.classList.remove(et)},ot.prototype.setOffset=function(et){return this.options.offset=et,this._update(),this},ot.prototype.toggleClassName=function(et){if(this._container)return this._container.classList.toggle(et)},ot.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ot.prototype._onMouseUp=function(et){this._update(et.point)},ot.prototype._onMouseMove=function(et){this._update(et.point)},ot.prototype._onDrag=function(et){this._update(et.point)},ot.prototype._update=function(et){var xt=this,Vt=this._lngLat||this._trackPointer;if(!(!this._map||!Vt||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(er){return xt._container.classList.add(er)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Co(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!et))){var de=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),xe=this.options.anchor,Yt=Ml(this.options.offset);if(!xe){var he=this._container.offsetWidth,Ee=this._container.offsetHeight,ir;de.y+Yt.bottom.ythis._map.transform.height-Ee?ir=["bottom"]:ir=[],de.xthis._map.transform.width-he/2&&ir.push("right"),ir.length===0?xe="bottom":xe=ir.join("-")}var Ye=de.add(Yt[xe]).round();r.setTransform(this._container,rs[xe]+" translate("+Ye.x+"px,"+Ye.y+"px)"),Vl(this._container,xe,"popup")}},ot.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var et=this._container.querySelector(Lo);et&&et.focus()}},ot.prototype._onClose=function(){this.remove()},ot}(t.Evented);function Ml($){if($)if(typeof $=="number"){var ot=Math.round(Math.sqrt(.5*Math.pow($,2)));return{center:new t.Point(0,0),top:new t.Point(0,$),"top-left":new t.Point(ot,ot),"top-right":new t.Point(-ot,ot),bottom:new t.Point(0,-$),"bottom-left":new t.Point(ot,-ot),"bottom-right":new t.Point(-ot,-ot),left:new t.Point($,0),right:new t.Point(-$,0)}}else if($ instanceof t.Point||Array.isArray($)){var et=t.Point.convert($);return{center:et,top:et,"top-left":et,"top-right":et,bottom:et,"bottom-left":et,"bottom-right":et,left:et,right:et}}else return{center:t.Point.convert($.center||[0,0]),top:t.Point.convert($.top||[0,0]),"top-left":t.Point.convert($["top-left"]||[0,0]),"top-right":t.Point.convert($["top-right"]||[0,0]),bottom:t.Point.convert($.bottom||[0,0]),"bottom-left":t.Point.convert($["bottom-left"]||[0,0]),"bottom-right":t.Point.convert($["bottom-right"]||[0,0]),left:t.Point.convert($.left||[0,0]),right:t.Point.convert($.right||[0,0])};else return Ml(new t.Point(0,0))}var yl={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:zo,NavigationControl:Fa,GeolocateControl:yc,AttributionControl:Si,ScaleControl:pu,FullscreenControl:Iu,Popup:Cs,Marker:Al,Style:ac,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:qa,clearPrewarmedResources:Oe,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken($){t.config.ACCESS_TOKEN=$},get baseApiUrl(){return t.config.API_URL},set baseApiUrl($){t.config.API_URL=$},get workerCount(){return Hi.workerCount},set workerCount($){Hi.workerCount=$},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests($){t.config.MAX_PARALLEL_IMAGE_REQUESTS=$},clearStorage:function($){t.clearTileCache($)},workerUrl:""};return yl}),I})}),WW=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=AE(),S=Lv();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapboxLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapboxLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),qW=Dt((Q,Z)=>{var c=ME(),g=kn(),I=$1(),S=Qo(),t=Ls(),e=cp(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=Lv(),v=WW();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k=A[p.id];p.map&&k.accesstoken!==p.accessToken&&(p.map.remove(),p.map=null,p.styleObj=null,p.traceHash={},p.layerList=[]);var w;p.map?w=new Promise(function(B,O){p.updateMap(C,A,B,O)}):w=new Promise(function(B,O){p.createMap(C,A,B,O)}),h.push(w)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],B=k.styleObj=_(w.style,A);k.accessToken=w.accesstoken;var O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:B.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0}));V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var H=[];H.push(new Promise(function(F){V.once("load",F)})),H=H.concat(I.fetchTraceGeoData(C)),Promise.all(H).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,B=A[this.id];k.rejectOnError(p);var O=[],j=_(B.style,A);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,B=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,B;B=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:B},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=D1(),I=Ad(),S=I3();Z.exports=function(r,a,n){g(r,a,n,{type:"mapbox",attributes:S,handleDefaults:t,partition:"y",accessToken:a._mapboxAccessToken})};function t(r,a,n,o){n("accesstoken",o.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),l=n("bounds.east"),f=n("bounds.south"),x=n("bounds.north");(i===void 0||l===void 0||f===void 0||x===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),kT=Dt(Q=>{var Z=ME(),c=kn(),g=c.strTranslate,I=c.strScale,S=ud().getSubplotCalcData,t=Dp(),e=Wr(),r=Vs(),a=ec(),n=qW(),o="mapbox",i=Q.constants=Lv();Q.name=o,Q.attr="subplot",Q.idRoot=o,Q.idRegex=Q.attrRegex=c.counterRegex(o);var l=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Q.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Q.layoutAttributes=I3(),Q.supplyLayoutDefaults=$W();var f=!0;Q.plot=function(v){f&&(f=!1,c.warn(l));var T=v._fullLayout,u=v.calcdata,b=T._subplots[o];if(Z.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var _=x(v,b);Z.accessToken=_;for(var P=0;PH/2){var F=B.split("|").join("
");j.text(F).attr("data-unformatted",F).call(a.convertToTspans,v),V=r.bBox(j.node())}j.attr("transform",g(-3,-V.height+8)),O.insert("rect",".static-attribution").attr({x:-V.width-6,y:-V.height-3,width:V.width+6,height:V.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;V.width+6>H&&(U=H/(V.width+6));var W=[b.l+b.w*M.x[1],b.t+b.h*(1-M.y[0])];O.attr("transform",g(W[0],W[1])+I(U))}};function x(v,T){var u=v._fullLayout,b=v._context;if(b.mapboxAccessToken==="")return"";for(var _=[],P=[],M=!1,C=!1,A=0;A1&&c.warn(i.multipleTokensErrorMsg),_[0]):(P.length&&c.log(["Listed mapbox access token(s)",P.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(v){return typeof v=="string"&&(i.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Q.updateFx=function(v){for(var T=v._fullLayout,u=T._subplots[o],b=0;b{Z.exports={attributes:bT(),supplyDefaults:NW(),colorbar:xo(),formatLabels:TE(),calc:eT(),plot:UW(),hoverPoints:wT().hoverPoints,eventData:VW(),selectPoints:HW(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermapbox",basePlotModule:kT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}),GW=Dt((Q,Z)=>{Z.exports=ZW()}),SE=Dt((Q,Z)=>{var c=vb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=qo(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),YW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=SE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),EE=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=Xc(),S=Vs(),t=q1().makeBlank,e=$1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=EE().convert,g=EE().convertOnSelect,I=Lv().traceLayerPrefix;function S(e,r){this.type="choroplethmapbox",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),XW=Dt((Q,Z)=>{Z.exports={attributes:SE(),supplyDefaults:YW(),colorbar:O1(),calc:aT(),plot:KW(),hoverPoints:sT(),eventData:lT(),selectPoints:uT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=XW()}),CE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=qo(),t=bT(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),QW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=CE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),tq=Dt((Q,Z)=>{var c=Hn(),g=kn().isArrayOrTypedArray,I=sa().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Hn(),g=kn(),I=pi(),S=Xc(),t=sa().BADNUM,e=q1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=eq(),g=Lv().traceLayerPrefix;function I(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),nq=Dt((Q,Z)=>{var c=Ls(),g=wT().hoverPoints,I=wT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),iq=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),aq=Dt((Q,Z)=>{Z.exports={attributes:CE(),supplyDefaults:QW(),colorbar:O1(),formatLabels:TE(),calc:tq(),plot:rq(),hoverPoints:nq(),eventData:iq(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=aq()}),sq=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -3341,10 +3341,10 @@ uniform `+ir+" "+Ye+" u_"+tr+`; {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"}}),qW=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}),G1=Dt((Q,Z)=>{var c=G0(),g=WW(),I=qW(),S='© OpenStreetMap contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:t,dark:e,satellite:I,"satellite-streets":g,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,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":t,"carto-darkmatter":e,"carto-voyager":r,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":n,"carto-voyager-nolabels":o},l=c(i);Z.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",l.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error."}}),I3=Dt((Q,Z)=>{var c=kn(),g=hi().defaultLine,I=jh().attributes,S=da(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=G1(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("map",".layers",!0)],domain:I({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},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:g}},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:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),kT=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=vx(),e=ef(),r=I3(),a=Ho(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=I3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.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:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),EE=Dt((Q,Z)=>{var c=["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"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),$W=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=kT(),a=EE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),CE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),LE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),ZW=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ca().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Tc(),n=EE().isSupportedFont,o=LE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||R)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),GW=Dt((Q,Z)=>{var c=kn(),g=ZW(),I=G1().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermap",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Fu(),S=g.fillText,t=Ca().BADNUM,e=G1().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),YW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),KW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=Ca().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=typeof globalThis<"u"?globalThis:c||self,c.maplibregl=g())})(Q,function(){var c={},g={};function I(t,e,r){if(g[t]=r,t==="index"){var a="var sharedModule = {}; ("+g.shared+")(sharedModule); ("+g.worker+")(sharedModule);",n={};return g.shared(n),g.index(c,n),typeof window<"u"&&c.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),c}}I("shared",["exports"],function(t){function e(G,D,nt,bt){return new(nt||(nt=Promise))(function(Rt,Kt){function Qt(rr){try{Be(bt.next(rr))}catch(xr){Kt(xr)}}function be(rr){try{Be(bt.throw(rr))}catch(xr){Kt(xr)}}function Be(rr){var xr;rr.done?Rt(rr.value):(xr=rr.value,xr instanceof nt?xr:new nt(function(Lr){Lr(xr)})).then(Qt,be)}Be((bt=bt.apply(G,D||[])).next())})}function r(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}typeof SuppressedError=="function"&&SuppressedError;var a=n;function n(G,D){this.x=G,this.y=D}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(G){return this.clone()._add(G)},sub:function(G){return this.clone()._sub(G)},multByPoint:function(G){return this.clone()._multByPoint(G)},divByPoint:function(G){return this.clone()._divByPoint(G)},mult:function(G){return this.clone()._mult(G)},div:function(G){return this.clone()._div(G)},rotate:function(G){return this.clone()._rotate(G)},rotateAround:function(G,D){return this.clone()._rotateAround(G,D)},matMult:function(G){return this.clone()._matMult(G)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(G){return this.x===G.x&&this.y===G.y},dist:function(G){return Math.sqrt(this.distSqr(G))},distSqr:function(G){var D=G.x-this.x,nt=G.y-this.y;return D*D+nt*nt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(G){return Math.atan2(this.y-G.y,this.x-G.x)},angleWith:function(G){return this.angleWithSep(G.x,G.y)},angleWithSep:function(G,D){return Math.atan2(this.x*D-this.y*G,this.x*G+this.y*D)},_matMult:function(G){var D=G[2]*this.x+G[3]*this.y;return this.x=G[0]*this.x+G[1]*this.y,this.y=D,this},_add:function(G){return this.x+=G.x,this.y+=G.y,this},_sub:function(G){return this.x-=G.x,this.y-=G.y,this},_mult:function(G){return this.x*=G,this.y*=G,this},_div:function(G){return this.x/=G,this.y/=G,this},_multByPoint:function(G){return this.x*=G.x,this.y*=G.y,this},_divByPoint:function(G){return this.x/=G.x,this.y/=G.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var G=this.y;return this.y=this.x,this.x=-G,this},_rotate:function(G){var D=Math.cos(G),nt=Math.sin(G),bt=nt*this.x+D*this.y;return this.x=D*this.x-nt*this.y,this.y=bt,this},_rotateAround:function(G,D){var nt=Math.cos(G),bt=Math.sin(G),Rt=D.y+bt*(this.x-D.x)+nt*(this.y-D.y);return this.x=D.x+nt*(this.x-D.x)-bt*(this.y-D.y),this.y=Rt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(G){return G instanceof n?G:Array.isArray(G)?new n(G[0],G[1]):G};var o=r(a),i=l;function l(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}l.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var f=r(i);let x,y;function v(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function T(){if(y==null&&(y=!1,v())){let G=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(G){for(let nt=0;nt<25;nt++){let bt=4*nt;G.fillStyle=`rgb(${bt},${bt+1},${bt+2})`,G.fillRect(nt%5,Math.floor(nt/5),1,1)}let D=G.getImageData(0,0,5,5).data;for(let nt=0;nt<100;nt++)if(nt%4!=3&&D[nt]!==nt){y=!0;break}}}return y||!1}function u(G,D,nt,bt){let Rt=new f(G,D,nt,bt);return Kt=>Rt.solve(Kt)}let b=u(.25,.1,.25,1);function _(G,D,nt){return Math.min(nt,Math.max(D,G))}function P(G,D,nt){let bt=nt-D,Rt=((G-D)%bt+bt)%bt+D;return Rt===D?nt:Rt}function M(G,...D){for(let nt of D)for(let bt in nt)G[bt]=nt[bt];return G}let C=1;function A(G,D,nt){let bt={};for(let Rt in G)bt[Rt]=D.call(this,G[Rt],Rt,G);return bt}function h(G,D,nt){let bt={};for(let Rt in G)D.call(this,G[Rt],Rt,G)&&(bt[Rt]=G[Rt]);return bt}function p(G){return Array.isArray(G)?G.map(p):typeof G=="object"&&G?A(G,p):G}let k={};function w(G){k[G]||(typeof console<"u"&&console.warn(G),k[G]=!0)}function R(G,D,nt){return(nt.y-G.y)*(D.x-G.x)>(D.y-G.y)*(nt.x-G.x)}function O(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let j=null;function V(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function F(G,D,nt,bt,Rt){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Kt=new VideoFrame(G,{timestamp:0});try{let Qt=Kt?.format;if(!Qt||!Qt.startsWith("BGR")&&!Qt.startsWith("RGB"))throw new Error(`Unrecognized format ${Qt}`);let be=Qt.startsWith("BGR"),Be=new Uint8ClampedArray(bt*Rt*4);if(yield Kt.copyTo(Be,function(rr,xr,Lr,Zr,ln){let bn=4*Math.max(-xr,0),Ln=(Math.max(0,Lr)-Lr)*Zr*4+bn,Gn=4*Zr,Mi=Math.max(0,xr),Aa=Math.max(0,Lr);return{rect:{x:Mi,y:Aa,width:Math.min(rr.width,xr+Zr)-Mi,height:Math.min(rr.height,Lr+ln)-Aa},layout:[{offset:Ln,stride:Gn}]}}(G,D,nt,bt,Rt)),be)for(let rr=0;rrO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,dt=function(G,D){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let bt=yt(G.url);if(bt)return bt(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:mt},D)}if(!(/^file:/.test(nt=G.url)||/^file:/.test(tt())&&!/^\w+:/.test(nt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(bt,Rt){return e(this,void 0,void 0,function*(){let Kt=new Request(bt.url,{method:bt.method||"GET",body:bt.body,credentials:bt.credentials,headers:bt.headers,cache:bt.cache,referrer:tt(),signal:Rt.signal});bt.type!=="json"||Kt.headers.has("Accept")||Kt.headers.set("Accept","application/json");let Qt=yield fetch(Kt);if(!Qt.ok){let rr=yield Qt.blob();throw new st(Qt.status,Qt.statusText,bt.url,rr)}let be;be=bt.type==="arrayBuffer"||bt.type==="image"?Qt.arrayBuffer():bt.type==="json"?Qt.json():Qt.text();let Be=yield be;if(Rt.signal.aborted)throw J();return{data:Be,cacheControl:Qt.headers.get("Cache-Control"),expires:Qt.headers.get("Expires")}})}(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:mt},D)}var nt;return function(bt,Rt){return new Promise((Kt,Qt)=>{var be;let Be=new XMLHttpRequest;Be.open(bt.method||"GET",bt.url,!0),bt.type!=="arrayBuffer"&&bt.type!=="image"||(Be.responseType="arraybuffer");for(let rr in bt.headers)Be.setRequestHeader(rr,bt.headers[rr]);bt.type==="json"&&(Be.responseType="text",!((be=bt.headers)===null||be===void 0)&&be.Accept||Be.setRequestHeader("Accept","application/json")),Be.withCredentials=bt.credentials==="include",Be.onerror=()=>{Qt(new Error(Be.statusText))},Be.onload=()=>{if(!Rt.signal.aborted)if((Be.status>=200&&Be.status<300||Be.status===0)&&Be.response!==null){let rr=Be.response;if(bt.type==="json")try{rr=JSON.parse(Be.response)}catch(xr){return void Qt(xr)}Kt({data:rr,cacheControl:Be.getResponseHeader("Cache-Control"),expires:Be.getResponseHeader("Expires")})}else{let rr=new Blob([Be.response],{type:Be.getResponseHeader("Content-Type")});Qt(new st(Be.status,Be.statusText,bt.url,rr))}},Rt.signal.addEventListener("abort",()=>{Be.abort(),Qt(J())}),Be.send(bt.body)})}(G,D)};function rt(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let D=new URL(G),nt=window.location;return D.protocol===nt.protocol&&D.host===nt.host}function at(G,D,nt){nt[G]&&nt[G].indexOf(D)!==-1||(nt[G]=nt[G]||[],nt[G].push(D))}function vt(G,D,nt){if(nt&&nt[G]){let bt=nt[G].indexOf(D);bt!==-1&&nt[G].splice(bt,1)}}class it{constructor(D,nt={}){M(this,nt),this.type=D}}class Y extends it{constructor(D,nt={}){super("error",M({error:D},nt))}}class ft{on(D,nt){return this._listeners=this._listeners||{},at(D,nt,this._listeners),this}off(D,nt){return vt(D,nt,this._listeners),vt(D,nt,this._oneTimeListeners),this}once(D,nt){return nt?(this._oneTimeListeners=this._oneTimeListeners||{},at(D,nt,this._oneTimeListeners),this):new Promise(bt=>this.once(D,bt))}fire(D,nt){typeof D=="string"&&(D=new it(D,nt||{}));let bt=D.type;if(this.listens(bt)){D.target=this;let Rt=this._listeners&&this._listeners[bt]?this._listeners[bt].slice():[];for(let be of Rt)be.call(this,D);let Kt=this._oneTimeListeners&&this._oneTimeListeners[bt]?this._oneTimeListeners[bt].slice():[];for(let be of Kt)vt(bt,be,this._oneTimeListeners),be.call(this,D);let Qt=this._eventedParent;Qt&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Qt.fire(D))}else D instanceof Y&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,nt){return this._eventedParent=D,this._eventedParentData=nt,this}}var ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let kt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function It(G,D){let nt={};for(let bt in G)bt!=="ref"&&(nt[bt]=G[bt]);return kt.forEach(bt=>{bt in D&&(nt[bt]=D[bt])}),nt}function Pt(G,D){if(Array.isArray(G)){if(!Array.isArray(D)||G.length!==D.length)return!1;for(let nt=0;nt`:G.itemType.kind==="value"?"array":`array<${D}>`}return G.kind}let Ct=[oe,Te,He,Ge,cr,br,ur,Gt(jr),Xr,nn,Le];function gt(G,D){if(D.kind==="error")return null;if(G.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!gt(G.itemType,D.itemType))&&(typeof G.N!="number"||G.N===D.N))return null}else{if(G.kind===D.kind)return null;if(G.kind==="value"){for(let nt of Ct)if(!gt(nt,D))return null}}return`Expected ${ne(G)} but found ${ne(D)} instead.`}function St(G,D){return D.some(nt=>nt.kind===G.kind)}function Nt(G,D){return D.some(nt=>nt==="null"?G===null:nt==="array"?Array.isArray(G):nt==="object"?G&&!Array.isArray(G)&&typeof G=="object":nt===typeof G)}function re(G,D){return G.kind==="array"&&D.kind==="array"?G.itemType.kind===D.itemType.kind&&typeof G.N=="number":G.kind===D.kind}let le=.96422,we=.82521,Ue=4/29,qe=6/29,or=3*qe*qe,Sr=qe*qe*qe,Ar=Math.PI/180,mr=180/Math.PI;function Qr(G){return(G%=360)<0&&(G+=360),G}function Hn([G,D,nt,bt]){let Rt,Kt,Qt=Xn((.2225045*(G=Wn(G))+.7168786*(D=Wn(D))+.0606169*(nt=Wn(nt)))/1);G===D&&D===nt?Rt=Kt=Qt:(Rt=Xn((.4360747*G+.3850649*D+.1430804*nt)/le),Kt=Xn((.0139322*G+.0971045*D+.7141733*nt)/we));let be=116*Qt-16;return[be<0?0:be,500*(Rt-Qt),200*(Qt-Kt),bt]}function Wn(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function Xn(G){return G>Sr?Math.pow(G,1/3):G/or+Ue}function Ii([G,D,nt,bt]){let Rt=(G+16)/116,Kt=isNaN(D)?Rt:Rt+D/500,Qt=isNaN(nt)?Rt:Rt-nt/200;return Rt=1*$n(Rt),Kt=le*$n(Kt),Qt=we*$n(Qt),[oi(3.1338561*Kt-1.6168667*Rt-.4906146*Qt),oi(-.9787684*Kt+1.9161415*Rt+.033454*Qt),oi(.0719453*Kt-.2289914*Rt+1.4052427*Qt),bt]}function oi(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function $n(G){return G>qe?G*G*G:or*(G-Ue)}function sa(G){return parseInt(G.padEnd(2,G),16)/255}function Zi(G,D){return We(D?G/100:G,0,1)}function We(G,D,nt){return Math.min(Math.max(D,G),nt)}function nr(G){return!G.some(Number.isNaN)}let fr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class _r{constructor(D,nt,bt,Rt=1,Kt=!0){this.r=D,this.g=nt,this.b=bt,this.a=Rt,Kt||(this.r*=Rt,this.g*=Rt,this.b*=Rt,Rt||this.overwriteGetter("rgb",[D,nt,bt,Rt]))}static parse(D){if(D instanceof _r)return D;if(typeof D!="string")return;let nt=function(bt){if((bt=bt.toLowerCase().trim())==="transparent")return[0,0,0,0];let Rt=fr[bt];if(Rt){let[Qt,be,Be]=Rt;return[Qt/255,be/255,Be/255,1]}if(bt.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(bt)){let Qt=bt.length<6?1:2,be=1;return[sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+Qt)||"ff")]}if(bt.startsWith("rgb")){let Qt=bt.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qt){let[be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa]=Qt,ra=[xr||" ",ln||" ",Gn].join("");if(ra===" "||ra===" /"||ra===",,"||ra===",,,"){let ga=[rr,Zr,Ln].join(""),Ya=ga==="%%%"?100:ga===""?255:0;if(Ya){let Ao=[We(+Be/Ya,0,1),We(+Lr/Ya,0,1),We(+bn/Ya,0,1),Mi?Zi(+Mi,Aa):1];if(nr(Ao))return Ao}}return}}let Kt=bt.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Kt){let[Qt,be,Be,rr,xr,Lr,Zr,ln,bn]=Kt,Ln=[Be||" ",xr||" ",Zr].join("");if(Ln===" "||Ln===" /"||Ln===",,"||Ln===",,,"){let Gn=[+be,We(+rr,0,100),We(+Lr,0,100),ln?Zi(+ln,bn):1];if(nr(Gn))return function([Mi,Aa,ra,ga]){function Ya(Ao){let Ss=(Ao+Mi/30)%12,Sl=Aa*Math.min(ra,1-ra);return ra-Sl*Math.max(-1,Math.min(Ss-3,9-Ss,1))}return Mi=Qr(Mi),Aa/=100,ra/=100,[Ya(0),Ya(8),Ya(4),ga]}(Gn)}}}(D);return nt?new _r(...nt,!1):void 0}get rgb(){let{r:D,g:nt,b:bt,a:Rt}=this,Kt=Rt||1/0;return this.overwriteGetter("rgb",[D/Kt,nt/Kt,bt/Kt,Rt])}get hcl(){return this.overwriteGetter("hcl",function(D){let[nt,bt,Rt,Kt]=Hn(D),Qt=Math.sqrt(bt*bt+Rt*Rt);return[Math.round(1e4*Qt)?Qr(Math.atan2(Rt,bt)*mr):NaN,Qt,nt,Kt]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Hn(this.rgb))}overwriteGetter(D,nt){return Object.defineProperty(this,D,{value:nt}),nt}toString(){let[D,nt,bt,Rt]=this.rgb;return`rgba(${[D,nt,bt].map(Kt=>Math.round(255*Kt)).join(",")},${Rt})`}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1);class tn{constructor(D,nt,bt){this.sensitivity=D?nt?"variant":"case":nt?"accent":"base",this.locale=bt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,nt){return this.collator.compare(D,nt)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cn{constructor(D,nt,bt,Rt,Kt){this.text=D,this.image=nt,this.scale=bt,this.fontStack=Rt,this.textColor=Kt}}class Tn{constructor(D){this.sections=D}static fromString(D){return new Tn([new Cn(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof Tn?D:Tn.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class Mn{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Mn)return D;if(typeof D=="number")return new Mn([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let nt of D)if(typeof nt!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new Mn(D)}}toString(){return JSON.stringify(this.values)}}let fi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class ki{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ki)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let nt=0;nt=0&&G<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof nt=="number"&&nt>=0&&nt<=255?bt===void 0||typeof bt=="number"&&bt>=0&&bt<=1?null:`Invalid rgba value [${[G,D,nt,bt].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof bt=="number"?[G,D,nt,bt]:[G,D,nt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Xi(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof _r||G instanceof tn||G instanceof Tn||G instanceof Mn||G instanceof ki||G instanceof Oi)return!0;if(Array.isArray(G)){for(let D of G)if(!Xi(D))return!1;return!0}if(typeof G=="object"){for(let D in G)if(!Xi(G[D]))return!1;return!0}return!1}function ci(G){if(G===null)return oe;if(typeof G=="string")return He;if(typeof G=="boolean")return Ge;if(typeof G=="number")return Te;if(G instanceof _r)return cr;if(G instanceof tn)return Wr;if(G instanceof Tn)return br;if(G instanceof Mn)return Xr;if(G instanceof ki)return Le;if(G instanceof Oi)return nn;if(Array.isArray(G)){let D=G.length,nt;for(let bt of G){let Rt=ci(bt);if(nt){if(nt===Rt)continue;nt=jr;break}nt=Rt}return Gt(nt||jr,D)}return ur}function za(G){let D=typeof G;return G===null?"":D==="string"||D==="number"||D==="boolean"?String(G):G instanceof _r||G instanceof Tn||G instanceof Mn||G instanceof ki||G instanceof Oi?G.toString():JSON.stringify(G)}class Wa{constructor(D,nt){this.type=D,this.value=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!Xi(D[1]))return nt.error("invalid value");let bt=D[1],Rt=ci(bt),Kt=nt.expectedType;return Rt.kind!=="array"||Rt.N!==0||!Kt||Kt.kind!=="array"||typeof Kt.N=="number"&&Kt.N!==0||(Rt=Kt),new Wa(Rt,bt)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ze{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Ie={string:He,number:Te,boolean:Ge,object:ur};class Rr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt,Rt=1,Kt=D[0];if(Kt==="array"){let be,Be;if(D.length>2){let rr=D[1];if(typeof rr!="string"||!(rr in Ie)||rr==="object")return nt.error('The item type argument of "array" must be one of string, number, boolean',1);be=Ie[rr],Rt++}else be=jr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return nt.error('The length argument to "array" must be a positive integer literal',2);Be=D[2],Rt++}bt=Gt(be,Be)}else{if(!Ie[Kt])throw new Error(`Types doesn't contain name = ${Kt}`);bt=Ie[Kt]}let Qt=[];for(;RtD.outputDefined())}}let $r={"to-boolean":Ge,"to-color":cr,"to-number":Te,"to-string":He};class Gr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[0];if(!$r[bt])throw new Error(`Can't parse ${bt} as it is not part of the known types`);if((bt==="to-boolean"||bt==="to-string")&&D.length!==2)return nt.error("Expected one argument.");let Rt=$r[bt],Kt=[];for(let Qt=1;Qt4?`Invalid rbga value ${JSON.stringify(nt)}: expected an array containing either three or four numeric values.`:ji(nt[0],nt[1],nt[2],nt[3]),!bt))return new _r(nt[0]/255,nt[1]/255,nt[2]/255,nt[3])}throw new ze(bt||`Could not parse color from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"padding":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Rt=Mn.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse padding from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"variableAnchorOffsetCollection":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Rt=ki.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse variableAnchorOffsetCollection from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"number":{let nt=null;for(let bt of this.args){if(nt=bt.evaluate(D),nt===null)return 0;let Rt=Number(nt);if(!isNaN(Rt))return Rt}throw new ze(`Could not convert ${JSON.stringify(nt)} to number.`)}case"formatted":return Tn.fromString(za(this.args[0].evaluate(D)));case"resolvedImage":return Oi.fromString(za(this.args[0].evaluate(D)));default:return za(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br=["Unknown","Point","LineString","Polygon"];class Yr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Br[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let nt=this._parseColorCache[D];return nt||(nt=this._parseColorCache[D]=_r.parse(D)),nt}}class pn{constructor(D,nt,bt=[],Rt,Kt=new ve,Qt=[]){this.registry=D,this.path=bt,this.key=bt.map(be=>`[${be}]`).join(""),this.scope=Kt,this.errors=Qt,this.expectedType=Rt,this._isConstant=nt}parse(D,nt,bt,Rt,Kt={}){return nt?this.concat(nt,bt,Rt)._parse(D,Kt):this._parse(D,Kt)}_parse(D,nt){function bt(Rt,Kt,Qt){return Qt==="assert"?new Rr(Kt,[Rt]):Qt==="coerce"?new Gr(Kt,[Rt]):Rt}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Rt=D[0];if(typeof Rt!="string")return this.error(`Expression name must be a string, but found ${typeof Rt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Kt=this.registry[Rt];if(Kt){let Qt=Kt.parse(D,this);if(!Qt)return null;if(this.expectedType){let be=this.expectedType,Be=Qt.type;if(be.kind!=="string"&&be.kind!=="number"&&be.kind!=="boolean"&&be.kind!=="object"&&be.kind!=="array"||Be.kind!=="value")if(be.kind!=="color"&&be.kind!=="formatted"&&be.kind!=="resolvedImage"||Be.kind!=="value"&&Be.kind!=="string")if(be.kind!=="padding"||Be.kind!=="value"&&Be.kind!=="number"&&Be.kind!=="array")if(be.kind!=="variableAnchorOffsetCollection"||Be.kind!=="value"&&Be.kind!=="array"){if(this.checkSubtype(be,Be))return null}else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"assert")}if(!(Qt instanceof Wa)&&Qt.type.kind!=="resolvedImage"&&this._isConstant(Qt)){let be=new Yr;try{Qt=new Wa(Qt.type,Qt.evaluate(be))}catch(Be){return this.error(Be.message),null}}return Qt}return this.error(`Unknown expression "${Rt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,nt,bt){let Rt=typeof D=="number"?this.path.concat(D):this.path,Kt=bt?this.scope.concat(bt):this.scope;return new pn(this.registry,this._isConstant,Rt,nt||null,Kt,this.errors)}error(D,...nt){let bt=`${this.key}${nt.map(Rt=>`[${Rt}]`).join("")}`;this.errors.push(new ee(bt,D))}checkSubtype(D,nt){let bt=gt(D,nt);return bt&&this.error(bt),bt}}class on{constructor(D,nt){this.type=nt.type,this.bindings=[].concat(D),this.result=nt}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let nt of this.bindings)D(nt[1]);D(this.result)}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let bt=[];for(let Kt=1;Kt=bt.length)throw new ze(`Array index out of bounds: ${nt} > ${bt.length-1}.`);if(nt!==Math.floor(nt))throw new ze(`Array index must be an integer, but found ${nt} instead.`);return bt[nt]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class Hr{constructor(D,nt){this.type=Ge,this.needle=D,this.haystack=nt}static parse(D,nt){if(D.length!==3)return nt.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);return bt&&Rt?St(bt.type,[Ge,He,Te,oe,jr])?new Hr(bt,Rt):nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`):null}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!bt)return!1;if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ci(nt))} instead.`);if(!Nt(bt,["string","array"]))throw new ze(`Expected second argument to be of type array or string, but found ${ne(ci(bt))} instead.`);return bt.indexOf(nt)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class _n{constructor(D,nt,bt){this.type=Te,this.needle=D,this.haystack=nt,this.fromIndex=bt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);if(!bt||!Rt)return null;if(!St(bt.type,[Ge,He,Te,oe,jr]))return nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new _n(bt,Rt,Kt):null}return new _n(bt,Rt)}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ci(nt))} instead.`);let Rt;if(this.fromIndex&&(Rt=this.fromIndex.evaluate(D)),Nt(bt,["string"])){let Kt=bt.indexOf(nt,Rt);return Kt===-1?-1:[...bt.slice(0,Kt)].length}if(Nt(bt,["array"]))return bt.indexOf(nt,Rt);throw new ze(`Expected second argument to be of type array or string, but found ${ne(ci(bt))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Fn{constructor(D,nt,bt,Rt,Kt,Qt){this.inputType=D,this.type=nt,this.input=bt,this.cases=Rt,this.outputs=Kt,this.otherwise=Qt}static parse(D,nt){if(D.length<5)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return nt.error("Expected an even number of arguments.");let bt,Rt;nt.expectedType&&nt.expectedType.kind!=="value"&&(Rt=nt.expectedType);let Kt={},Qt=[];for(let rr=2;rrNumber.MAX_SAFE_INTEGER)return Zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bn=="number"&&Math.floor(bn)!==bn)return Zr.error("Numeric branch labels must be integer values.");if(bt){if(Zr.checkSubtype(bt,ci(bn)))return null}else bt=ci(bn);if(Kt[String(bn)]!==void 0)return Zr.error("Branch labels must be unique.");Kt[String(bn)]=Qt.length}let ln=nt.parse(Lr,rr,Rt);if(!ln)return null;Rt=Rt||ln.type,Qt.push(ln)}let be=nt.parse(D[1],1,jr);if(!be)return null;let Be=nt.parse(D[D.length-1],D.length-1,Rt);return Be?be.type.kind!=="value"&&nt.concat(1).checkSubtype(bt,be.type)?null:new Fn(bt,Rt,be,Kt,Qt,Be):null}evaluate(D){let nt=this.input.evaluate(D);return(ci(nt)===this.inputType&&this.outputs[this.cases[nt]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Qn{constructor(D,nt,bt){this.type=D,this.branches=nt,this.otherwise=bt}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return nt.error("Expected an odd number of arguments.");let bt;nt.expectedType&&nt.expectedType.kind!=="value"&&(bt=nt.expectedType);let Rt=[];for(let Qt=1;Qtnt.outputDefined())&&this.otherwise.outputDefined()}}class Pn{constructor(D,nt,bt,Rt){this.type=D,this.input=nt,this.beginIndex=bt,this.endIndex=Rt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,Te);if(!bt||!Rt)return null;if(!St(bt.type,[Gt(jr),He,jr]))return nt.error(`Expected first argument to be of type array or string, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new Pn(bt.type,bt,Rt,Kt):null}return new Pn(bt.type,bt,Rt)}evaluate(D){let nt=this.input.evaluate(D),bt=this.beginIndex.evaluate(D),Rt;if(this.endIndex&&(Rt=this.endIndex.evaluate(D)),Nt(nt,["string"]))return[...nt].slice(bt,Rt).join("");if(Nt(nt,["array"]))return nt.slice(bt,Rt);throw new ze(`Expected first argument to be of type array or string, but found ${ne(ci(nt))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function En(G,D){let nt=G.length-1,bt,Rt,Kt=0,Qt=nt,be=0;for(;Kt<=Qt;)if(be=Math.floor((Kt+Qt)/2),bt=G[be],Rt=G[be+1],bt<=D){if(be===nt||DD))throw new ze("Input is not a number.");Qt=be-1}return 0}class Zn{constructor(D,nt,bt){this.type=D,this.input=nt,this.labels=[],this.outputs=[];for(let[Rt,Kt]of bt)this.labels.push(Rt),this.outputs.push(Kt)}static parse(D,nt){if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");let bt=nt.parse(D[1],1,Te);if(!bt)return null;let Rt=[],Kt=null;nt.expectedType&&nt.expectedType.kind!=="value"&&(Kt=nt.expectedType);for(let Qt=1;Qt=be)return nt.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',rr);let Lr=nt.parse(Be,xr,Kt);if(!Lr)return null;Kt=Kt||Lr.type,Rt.push([be,Lr])}return new Zn(Kt,bt,Rt)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;return Rt>=nt[Kt-1]?bt[Kt-1].evaluate(D):bt[En(nt,Rt)].evaluate(D)}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function La(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var Vi=Qa;function Qa(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}Qa.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var Ja=La(Vi);function Do(G,D,nt){return G+nt*(D-G)}function yo(G,D,nt){return G.map((bt,Rt)=>Do(bt,D[Rt],nt))}let Fo={number:Do,color:function(G,D,nt,bt="rgb"){switch(bt){case"rgb":{let[Rt,Kt,Qt,be]=yo(G.rgb,D.rgb,nt);return new _r(Rt,Kt,Qt,be,!1)}case"hcl":{let[Rt,Kt,Qt,be]=G.hcl,[Be,rr,xr,Lr]=D.hcl,Zr,ln;if(isNaN(Rt)||isNaN(Be))isNaN(Rt)?isNaN(Be)?Zr=NaN:(Zr=Be,Qt!==1&&Qt!==0||(ln=rr)):(Zr=Rt,xr!==1&&xr!==0||(ln=Kt));else{let Aa=Be-Rt;Be>Rt&&Aa>180?Aa-=360:Be180&&(Aa+=360),Zr=Rt+nt*Aa}let[bn,Ln,Gn,Mi]=function([Aa,ra,ga,Ya]){return Aa=isNaN(Aa)?0:Aa*Ar,Ii([ga,Math.cos(Aa)*ra,Math.sin(Aa)*ra,Ya])}([Zr,ln??Do(Kt,rr,nt),Do(Qt,xr,nt),Do(be,Lr,nt)]);return new _r(bn,Ln,Gn,Mi,!1)}case"lab":{let[Rt,Kt,Qt,be]=Ii(yo(G.lab,D.lab,nt));return new _r(Rt,Kt,Qt,be,!1)}}},array:yo,padding:function(G,D,nt){return new Mn(yo(G.values,D.values,nt))},variableAnchorOffsetCollection:function(G,D,nt){let bt=G.values,Rt=D.values;if(bt.length!==Rt.length)throw new ze(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${D.toString()}`);let Kt=[];for(let Qt=0;Qttypeof xr!="number"||xr<0||xr>1))return nt.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Rt={name:"cubic-bezier",controlPoints:rr}}}if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");if(Kt=nt.parse(Kt,2,Te),!Kt)return null;let be=[],Be=null;bt==="interpolate-hcl"||bt==="interpolate-lab"?Be=cr:nt.expectedType&&nt.expectedType.kind!=="value"&&(Be=nt.expectedType);for(let rr=0;rr=xr)return nt.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zr);let bn=nt.parse(Lr,ln,Be);if(!bn)return null;Be=Be||bn.type,be.push([xr,bn])}return re(Be,Te)||re(Be,cr)||re(Be,Xr)||re(Be,Le)||re(Be,Gt(Te))?new Da(Be,bt,Rt,Kt,be):nt.error(`Type ${ne(Be)} is not interpolatable.`)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;if(Rt>=nt[Kt-1])return bt[Kt-1].evaluate(D);let Qt=En(nt,Rt),be=Da.interpolationFactor(this.interpolation,Rt,nt[Qt],nt[Qt+1]),Be=bt[Qt].evaluate(D),rr=bt[Qt+1].evaluate(D);switch(this.operator){case"interpolate":return Fo[this.type.kind](Be,rr,be);case"interpolate-hcl":return Fo.color(Be,rr,be,"hcl");case"interpolate-lab":return Fo.color(Be,rr,be,"lab")}}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function ys(G,D,nt,bt){let Rt=bt-nt,Kt=G-nt;return Rt===0?0:D===1?Kt/Rt:(Math.pow(D,Kt)-1)/(Math.pow(D,Rt)-1)}class os{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expectected at least one argument.");let bt=null,Rt=nt.expectedType;Rt&&Rt.kind!=="value"&&(bt=Rt);let Kt=[];for(let be of D.slice(1)){let Be=nt.parse(be,1+Kt.length,bt,void 0,{typeAnnotation:"omit"});if(!Be)return null;bt=bt||Be.type,Kt.push(Be)}if(!bt)throw new Error("No output type");let Qt=Rt&&Kt.some(be=>gt(Rt,be.type));return new os(Qt?jr:bt,Kt)}evaluate(D){let nt,bt=null,Rt=0;for(let Kt of this.args)if(Rt++,bt=Kt.evaluate(D),bt&&bt instanceof Oi&&!bt.available&&(nt||(nt=bt.name),bt=null,Rt===this.args.length&&(bt=nt)),bt!==null)break;return bt}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function ul(G,D){return G==="=="||G==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Zo(G,D,nt,bt){return bt.compare(D,nt)===0}function Ks(G,D,nt){let bt=G!=="=="&&G!=="!=";return class fF{constructor(Kt,Qt,be){this.type=Ge,this.lhs=Kt,this.rhs=Qt,this.collator=be,this.hasUntypedArgument=Kt.type.kind==="value"||Qt.type.kind==="value"}static parse(Kt,Qt){if(Kt.length!==3&&Kt.length!==4)return Qt.error("Expected two or three arguments.");let be=Kt[0],Be=Qt.parse(Kt[1],1,jr);if(!Be)return null;if(!ul(be,Be.type))return Qt.concat(1).error(`"${be}" comparisons are not supported for type '${ne(Be.type)}'.`);let rr=Qt.parse(Kt[2],2,jr);if(!rr)return null;if(!ul(be,rr.type))return Qt.concat(2).error(`"${be}" comparisons are not supported for type '${ne(rr.type)}'.`);if(Be.type.kind!==rr.type.kind&&Be.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error(`Cannot compare types '${ne(Be.type)}' and '${ne(rr.type)}'.`);bt&&(Be.type.kind==="value"&&rr.type.kind!=="value"?Be=new Rr(rr.type,[Be]):Be.type.kind!=="value"&&rr.type.kind==="value"&&(rr=new Rr(Be.type,[rr])));let xr=null;if(Kt.length===4){if(Be.type.kind!=="string"&&rr.type.kind!=="string"&&Be.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error("Cannot use collator to compare non-string types.");if(xr=Qt.parse(Kt[3],3,Wr),!xr)return null}return new fF(Be,rr,xr)}evaluate(Kt){let Qt=this.lhs.evaluate(Kt),be=this.rhs.evaluate(Kt);if(bt&&this.hasUntypedArgument){let Be=ci(Qt),rr=ci(be);if(Be.kind!==rr.kind||Be.kind!=="string"&&Be.kind!=="number")throw new ze(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${Be.kind}, ${rr.kind}) instead.`)}if(this.collator&&!bt&&this.hasUntypedArgument){let Be=ci(Qt),rr=ci(be);if(Be.kind!=="string"||rr.kind!=="string")return D(Kt,Qt,be)}return this.collator?nt(Kt,Qt,be,this.collator.evaluate(Kt)):D(Kt,Qt,be)}eachChild(Kt){Kt(this.lhs),Kt(this.rhs),this.collator&&Kt(this.collator)}outputDefined(){return!0}}}let ss=Ks("==",function(G,D,nt){return D===nt},Zo),cl=Ks("!=",function(G,D,nt){return D!==nt},function(G,D,nt,bt){return!Zo(0,D,nt,bt)}),Qs=Ks("<",function(G,D,nt){return D",function(G,D,nt){return D>nt},function(G,D,nt,bt){return bt.compare(D,nt)>0}),cs=Ks("<=",function(G,D,nt){return D<=nt},function(G,D,nt,bt){return bt.compare(D,nt)<=0}),Ps=Ks(">=",function(G,D,nt){return D>=nt},function(G,D,nt,bt){return bt.compare(D,nt)>=0});class Lo{constructor(D,nt,bt){this.type=Wr,this.locale=bt,this.caseSensitive=D,this.diacriticSensitive=nt}static parse(D,nt){if(D.length!==2)return nt.error("Expected one argument.");let bt=D[1];if(typeof bt!="object"||Array.isArray(bt))return nt.error("Collator options argument must be an object.");let Rt=nt.parse(bt["case-sensitive"]!==void 0&&bt["case-sensitive"],1,Ge);if(!Rt)return null;let Kt=nt.parse(bt["diacritic-sensitive"]!==void 0&&bt["diacritic-sensitive"],1,Ge);if(!Kt)return null;let Qt=null;return bt.locale&&(Qt=nt.parse(bt.locale,1,He),!Qt)?null:new Lo(Rt,Kt,Qt)}evaluate(D){return new tn(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class As{constructor(D,nt,bt,Rt,Kt){this.type=He,this.number=D,this.locale=nt,this.currency=bt,this.minFractionDigits=Rt,this.maxFractionDigits=Kt}static parse(D,nt){if(D.length!==3)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,Te);if(!bt)return null;let Rt=D[2];if(typeof Rt!="object"||Array.isArray(Rt))return nt.error("NumberFormat options argument must be an object.");let Kt=null;if(Rt.locale&&(Kt=nt.parse(Rt.locale,1,He),!Kt))return null;let Qt=null;if(Rt.currency&&(Qt=nt.parse(Rt.currency,1,He),!Qt))return null;let be=null;if(Rt["min-fraction-digits"]&&(be=nt.parse(Rt["min-fraction-digits"],1,Te),!be))return null;let Be=null;return Rt["max-fraction-digits"]&&(Be=nt.parse(Rt["max-fraction-digits"],1,Te),!Be)?null:new As(bt,Kt,Qt,be,Be)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class kl{constructor(D){this.type=br,this.sections=D}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[1];if(!Array.isArray(bt)&&typeof bt=="object")return nt.error("First argument must be an image or text section.");let Rt=[],Kt=!1;for(let Qt=1;Qt<=D.length-1;++Qt){let be=D[Qt];if(Kt&&typeof be=="object"&&!Array.isArray(be)){Kt=!1;let Be=null;if(be["font-scale"]&&(Be=nt.parse(be["font-scale"],1,Te),!Be))return null;let rr=null;if(be["text-font"]&&(rr=nt.parse(be["text-font"],1,Gt(He)),!rr))return null;let xr=null;if(be["text-color"]&&(xr=nt.parse(be["text-color"],1,cr),!xr))return null;let Lr=Rt[Rt.length-1];Lr.scale=Be,Lr.font=rr,Lr.textColor=xr}else{let Be=nt.parse(D[Qt],1,jr);if(!Be)return null;let rr=Be.type.kind;if(rr!=="string"&&rr!=="value"&&rr!=="null"&&rr!=="resolvedImage")return nt.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Kt=!0,Rt.push({content:Be,scale:null,font:null,textColor:null})}}return new kl(Rt)}evaluate(D){return new Tn(this.sections.map(nt=>{let bt=nt.content.evaluate(D);return ci(bt)===nn?new Cn("",bt,null,null,null):new Cn(za(bt),null,nt.scale?nt.scale.evaluate(D):null,nt.font?nt.font.evaluate(D).join(","):null,nt.textColor?nt.textColor.evaluate(D):null)}))}eachChild(D){for(let nt of this.sections)D(nt.content),nt.scale&&D(nt.scale),nt.font&&D(nt.font),nt.textColor&&D(nt.textColor)}outputDefined(){return!1}}class ql{constructor(D){this.type=nn,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,He);return bt?new ql(bt):nt.error("No image name provided.")}evaluate(D){let nt=this.input.evaluate(D),bt=Oi.fromString(nt);return bt&&D.availableImages&&(bt.available=D.availableImages.indexOf(nt)>-1),bt}eachChild(D){D(this.input)}outputDefined(){return!1}}class Jl{constructor(D){this.type=Te,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error(`Expected 1 argument, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1);return bt?bt.type.kind!=="array"&&bt.type.kind!=="string"&&bt.type.kind!=="value"?nt.error(`Expected argument of type string or array, but found ${ne(bt.type)} instead.`):new Jl(bt):null}evaluate(D){let nt=this.input.evaluate(D);if(typeof nt=="string")return[...nt].length;if(Array.isArray(nt))return nt.length;throw new ze(`Expected value to be of type string or array, but found ${ne(ci(nt))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Us=8192;function Pa(G,D){let nt=(180+G[0])/360,bt=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,Rt=Math.pow(2,D.z);return[Math.round(nt*Rt*Us),Math.round(bt*Rt*Us)]}function fo(G,D){let nt=Math.pow(2,D.z);return[(Rt=(G[0]/Us+D.x)/nt,360*Rt-180),(bt=(G[1]/Us+D.y)/nt,360/Math.PI*Math.atan(Math.exp((180-360*bt)*Math.PI/180))-90)];var bt,Rt}function qs(G,D){G[0]=Math.min(G[0],D[0]),G[1]=Math.min(G[1],D[1]),G[2]=Math.max(G[2],D[0]),G[3]=Math.max(G[3],D[1])}function Ql(G,D){return!(G[0]<=D[0]||G[2]>=D[2]||G[1]<=D[1]||G[3]>=D[3])}function Xo(G,D,nt){let bt=G[0]-D[0],Rt=G[1]-D[1],Kt=G[0]-nt[0],Qt=G[1]-nt[1];return bt*Qt-Kt*Rt==0&&bt*Kt<=0&&Rt*Qt<=0}function Gl(G,D,nt,bt){return(Rt=[bt[0]-nt[0],bt[1]-nt[1]])[0]*(Kt=[D[0]-G[0],D[1]-G[1]])[1]-Rt[1]*Kt[0]!=0&&!(!Is(G,D,nt,bt)||!Is(nt,bt,G,D));var Rt,Kt}function al(G,D,nt){for(let bt of nt)for(let Rt=0;Rt(Rt=G)[1]!=(Qt=be[Be+1])[1]>Rt[1]&&Rt[0]<(Qt[0]-Kt[0])*(Rt[1]-Kt[1])/(Qt[1]-Kt[1])+Kt[0]&&(bt=!bt)}var Rt,Kt,Qt;return bt}function Ru(G,D){for(let nt of D)if(Cl(G,nt))return!0;return!1}function lo(G,D){for(let nt of G)if(!Cl(nt,D))return!1;for(let nt=0;nt0&&be<0||Qt<0&&be>0}function ou(G,D,nt){let bt=[];for(let Rt=0;Rtnt[2]){let Rt=.5*bt,Kt=G[0]-nt[0]>Rt?-bt:nt[0]-G[0]>Rt?bt:0;Kt===0&&(Kt=G[0]-nt[2]>Rt?-bt:nt[2]-G[0]>Rt?bt:0),G[0]+=Kt}qs(D,G)}function Su(G,D,nt,bt){let Rt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let be of G)for(let Be of be){let rr=[Be.x+Kt[0],Be.y+Kt[1]];ts(rr,D,nt,Rt),Qt.push(rr)}return Qt}function Gu(G,D,nt,bt){let Rt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let Be of G){let rr=[];for(let xr of Be){let Lr=[xr.x+Kt[0],xr.y+Kt[1]];qs(D,Lr),rr.push(Lr)}Qt.push(rr)}if(D[2]-D[0]<=Rt/2){(be=D)[0]=be[1]=1/0,be[2]=be[3]=-1/0;for(let Be of Qt)for(let rr of Be)ts(rr,D,nt,Rt)}var be;return Qt}class bl{constructor(D,nt){this.type=Ge,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Xi(D[1])){let bt=D[1];if(bt.type==="FeatureCollection"){let Rt=[];for(let Kt of bt.features){let{type:Qt,coordinates:be}=Kt.geometry;Qt==="Polygon"&&Rt.push(be),Qt==="MultiPolygon"&&Rt.push(...be)}if(Rt.length)return new bl(bt,{type:"MultiPolygon",coordinates:Rt})}else if(bt.type==="Feature"){let Rt=bt.geometry.type;if(Rt==="Polygon"||Rt==="MultiPolygon")return new bl(bt,bt.geometry)}else if(bt.type==="Polygon"||bt.type==="MultiPolygon")return new bl(bt,bt)}return nt.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let be=ou(bt.coordinates,Kt,Qt),Be=Su(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Cl(rr,be))return!1}if(bt.type==="MultiPolygon"){let be=hl(bt.coordinates,Kt,Qt),Be=Su(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Ru(rr,be))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let be=ou(bt.coordinates,Kt,Qt),Be=Gu(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!lo(rr,be))return!1}if(bt.type==="MultiPolygon"){let be=hl(bt.coordinates,Kt,Qt),Be=Gu(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Ms(rr,be))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Dl=class{constructor(G=[],D=(nt,bt)=>ntbt?1:0){if(this.data=G,this.length=this.data.length,this.compare=D,this.length>0)for(let nt=(this.length>>1)-1;nt>=0;nt--)this._down(nt)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:D,compare:nt}=this,bt=D[G];for(;G>0;){let Rt=G-1>>1,Kt=D[Rt];if(nt(bt,Kt)>=0)break;D[G]=Kt,G=Rt}D[G]=bt}_down(G){let{data:D,compare:nt}=this,bt=this.length>>1,Rt=D[G];for(;G=0)break;D[G]=D[Kt],G=Kt}D[G]=Rt}};function tu(G,D,nt,bt,Rt){nu(G,D,nt,bt||G.length-1,Rt||mh)}function nu(G,D,nt,bt,Rt){for(;bt>nt;){if(bt-nt>600){var Kt=bt-nt+1,Qt=D-nt+1,be=Math.log(Kt),Be=.5*Math.exp(2*be/3),rr=.5*Math.sqrt(be*Be*(Kt-Be)/Kt)*(Qt-Kt/2<0?-1:1);nu(G,D,Math.max(nt,Math.floor(D-Qt*Be/Kt+rr)),Math.min(bt,Math.floor(D+(Kt-Qt)*Be/Kt+rr)),Rt)}var xr=G[D],Lr=nt,Zr=bt;for(ac(G,nt,D),Rt(G[bt],xr)>0&&ac(G,nt,bt);Lr0;)Zr--}Rt(G[nt],xr)===0?ac(G,nt,Zr):ac(G,++Zr,bt),Zr<=D&&(nt=Zr+1),D<=Zr&&(bt=Zr-1)}}function ac(G,D,nt){var bt=G[D];G[D]=G[nt],G[nt]=bt}function mh(G,D){return GD?1:0}function Jc(G,D){if(G.length<=1)return[G];let nt=[],bt,Rt;for(let Kt of G){let Qt=Bf(Kt);Qt!==0&&(Kt.area=Math.abs(Qt),Rt===void 0&&(Rt=Qt<0),Rt===Qt<0?(bt&&nt.push(bt),bt=[Kt]):bt.push(Kt))}if(bt&&nt.push(bt),D>1)for(let Kt=0;Kt1?(rr=D[Be+1][0],xr=D[Be+1][1]):ln>0&&(rr+=Lr/this.kx*ln,xr+=Zr/this.ky*ln)),Lr=this.wrap(nt[0]-rr)*this.kx,Zr=(nt[1]-xr)*this.ky;let bn=Lr*Lr+Zr*Zr;bn180;)D-=360;return D}}function hc(G,D){return D[0]-G[0]}function oc(G){return G[1]-G[0]+1}function fc(G,D){return G[1]>=G[0]&&G[1]G[1])return[null,null];let nt=oc(G);if(D){if(nt===2)return[G,null];let Rt=Math.floor(nt/2);return[[G[0],G[0]+Rt],[G[0]+Rt,G[1]]]}if(nt===1)return[G,null];let bt=Math.floor(nt/2)-1;return[[G[0],G[0]+bt],[G[0]+bt+1,G[1]]]}function cu(G,D){if(!fc(D,G.length))return[1/0,1/0,-1/0,-1/0];let nt=[1/0,1/0,-1/0,-1/0];for(let bt=D[0];bt<=D[1];++bt)qs(nt,G[bt]);return nt}function sc(G){let D=[1/0,1/0,-1/0,-1/0];for(let nt of G)for(let bt of nt)qs(D,bt);return D}function rl(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function Yl(G,D,nt){if(!rl(G)||!rl(D))return NaN;let bt=0,Rt=0;return G[2]D[2]&&(bt=G[0]-D[2]),G[1]>D[3]&&(Rt=G[1]-D[3]),G[3]=bt)return bt;if(Ql(Rt,Kt)){if(Vd(G,D))return 0}else if(Vd(D,G))return 0;let Qt=1/0;for(let be of G)for(let Be=0,rr=be.length,xr=rr-1;Be0;){let Be=Qt.pop();if(Be[0]>=Kt)continue;let rr=Be[1],xr=D?50:100;if(oc(rr)<=xr){if(!fc(rr,G.length))return NaN;if(D){let Lr=tl(G,rr,nt,bt);if(isNaN(Lr)||Lr===0)return Lr;Kt=Math.min(Kt,Lr)}else for(let Lr=rr[0];Lr<=rr[1];++Lr){let Zr=Ed(G[Lr],nt,bt);if(Kt=Math.min(Kt,Zr),Kt===0)return 0}}else{let Lr=oh(rr,D);Qo(Qt,Kt,bt,G,be,Lr[0]),Qo(Qt,Kt,bt,G,be,Lr[1])}}return Kt}function rc(G,D,nt,bt,Rt,Kt=1/0){let Qt=Math.min(Kt,Rt.distance(G[0],nt[0]));if(Qt===0)return Qt;let be=new Dl([[0,[0,G.length-1],[0,nt.length-1]]],hc);for(;be.length>0;){let Be=be.pop();if(Be[0]>=Qt)continue;let rr=Be[1],xr=Be[2],Lr=D?50:100,Zr=bt?50:100;if(oc(rr)<=Lr&&oc(xr)<=Zr){if(!fc(rr,G.length)&&fc(xr,nt.length))return NaN;let ln;if(D&&bt)ln=Uh(G,rr,nt,xr,Rt),Qt=Math.min(Qt,ln);else if(D&&!bt){let bn=G.slice(rr[0],rr[1]+1);for(let Ln=xr[0];Ln<=xr[1];++Ln)if(ln=Sh(nt[Ln],bn,Rt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else if(!D&&bt){let bn=nt.slice(xr[0],xr[1]+1);for(let Ln=rr[0];Ln<=rr[1];++Ln)if(ln=Sh(G[Ln],bn,Rt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else ln=_u(G,rr,nt,xr,Rt),Qt=Math.min(Qt,ln)}else{let ln=oh(rr,D),bn=oh(xr,bt);lf(be,Qt,Rt,G,nt,ln[0],bn[0]),lf(be,Qt,Rt,G,nt,ln[0],bn[1]),lf(be,Qt,Rt,G,nt,ln[1],bn[0]),lf(be,Qt,Rt,G,nt,ln[1],bn[1])}}return Qt}function jf(G){return G.type==="MultiPolygon"?G.coordinates.map(D=>({type:"Polygon",coordinates:D})):G.type==="MultiLineString"?G.coordinates.map(D=>({type:"LineString",coordinates:D})):G.type==="MultiPoint"?G.coordinates.map(D=>({type:"Point",coordinates:D})):[G]}class Vh{constructor(D,nt){this.type=Te,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Xi(D[1])){let bt=D[1];if(bt.type==="FeatureCollection")return new Vh(bt,bt.features.map(Rt=>jf(Rt.geometry)).flat());if(bt.type==="Feature")return new Vh(bt,jf(bt.geometry));if("type"in bt&&"coordinates"in bt)return new Vh(bt,jf(bt))}return nt.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Rt=nt.geometry(),Kt=Rt.flat().map(Be=>fo([Be.x,Be.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Nf(Kt[0][1]),be=1/0;for(let Be of bt){switch(Be.type){case"Point":be=Math.min(be,rc(Kt,!1,[Be.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,rc(Kt,!1,Be.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!1,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Rt=nt.geometry(),Kt=Rt.flat().map(Be=>fo([Be.x,Be.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Nf(Kt[0][1]),be=1/0;for(let Be of bt){switch(Be.type){case"Point":be=Math.min(be,rc(Kt,!0,[Be.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,rc(Kt,!0,Be.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!0,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="Polygon")return function(nt,bt){let Rt=nt.geometry();if(Rt.length===0||Rt[0].length===0)return NaN;let Kt=Jc(Rt,0).map(Be=>Be.map(rr=>rr.map(xr=>fo([xr.x,xr.y],nt.canonical)))),Qt=new Nf(Kt[0][0][0][1]),be=1/0;for(let Be of bt)for(let rr of Kt){switch(Be.type){case"Point":be=Math.min(be,sh([Be.coordinates],!1,rr,Qt,be));break;case"LineString":be=Math.min(be,sh(Be.coordinates,!0,rr,Qt,be));break;case"Polygon":be=Math.min(be,Ll(rr,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":ss,"!=":cl,">":Nl,"<":Qs,">=":Ps,"<=":cs,array:Rr,at:dr,boolean:Rr,case:Qn,coalesce:os,collator:Lo,format:kl,image:ql,in:Hr,"index-of":_n,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Jl,let:on,literal:Wa,match:Fn,number:Rr,"number-format":As,object:Rr,slice:Pn,step:Zn,string:Rr,"to-boolean":Gr,"to-color":Gr,"to-number":Gr,"to-string":Gr,var:Ce,within:bl,distance:Vh};class lc{constructor(D,nt,bt,Rt){this.name=D,this.type=nt,this._evaluate=bt,this.args=Rt}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,nt){let bt=D[0],Rt=lc.definitions[bt];if(!Rt)return nt.error(`Unknown expression "${bt}". If you wanted a literal array, use ["literal", [...]].`,0);let Kt=Array.isArray(Rt)?Rt[0]:Rt.type,Qt=Array.isArray(Rt)?[[Rt[1],Rt[2]]]:Rt.overloads,be=Qt.filter(([rr])=>!Array.isArray(rr)||rr.length===D.length-1),Be=null;for(let[rr,xr]of be){Be=new pn(nt.registry,Uf,nt.path,null,nt.scope);let Lr=[],Zr=!1;for(let ln=1;ln{return Zr=Lr,Array.isArray(Zr)?`(${Zr.map(ne).join(", ")})`:`(${ne(Zr.type)}...)`;var Zr}).join(" | "),xr=[];for(let Lr=1;Lr{nt=D?nt&&Uf(bt):nt&&bt instanceof Wa}),!!nt&&Vf(G)&&Gf(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Vf(G){if(G instanceof lc&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof bl||G instanceof Vh)return!1;let D=!0;return G.eachChild(nt=>{D&&!Vf(nt)&&(D=!1)}),D}function lh(G){if(G instanceof lc&&G.name==="feature-state")return!1;let D=!0;return G.eachChild(nt=>{D&&!lh(nt)&&(D=!1)}),D}function Gf(G,D){if(G instanceof lc&&D.indexOf(G.name)>=0)return!1;let nt=!0;return G.eachChild(bt=>{nt&&!Gf(bt,D)&&(nt=!1)}),nt}function Eh(G){return{result:"success",value:G}}function gh(G){return{result:"error",value:G}}function uc(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function rf(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function Hf(G){return!!G.expression&&G.expression.interpolated}function eu(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Ef(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Cd(G){return G}function Yf(G,D){let nt=D.type==="color",bt=G.stops&&typeof G.stops[0][0]=="object",Rt=bt||!(bt||G.property!==void 0),Kt=G.type||(Hf(D)?"exponential":"interval");if(nt||D.type==="padding"){let xr=nt?_r.parse:Mn.parse;(G=Mt({},G)).stops&&(G.stops=G.stops.map(Lr=>[Lr[0],xr(Lr[1])])),G.default=xr(G.default?G.default:D.default)}if(G.colorSpace&&(Qt=G.colorSpace)!=="rgb"&&Qt!=="hcl"&&Qt!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Qt;let be,Be,rr;if(Kt==="exponential")be=Xf;else if(Kt==="interval")be=Nc;else if(Kt==="categorical"){be=Kf,Be=Object.create(null);for(let xr of G.stops)Be[xr[0]]=xr[1];rr=typeof G.stops[0][0]}else{if(Kt!=="identity")throw new Error(`Unknown function type "${Kt}"`);be=Ou}if(bt){let xr={},Lr=[];for(let bn=0;bnbn[0]),evaluate:({zoom:bn},Ln)=>Xf({stops:Zr,base:G.base},D,bn).evaluate(bn,Ln)}}if(Rt){let xr=Kt==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:xr,interpolationFactor:Da.interpolationFactor.bind(void 0,xr),zoomStops:G.stops.map(Lr=>Lr[0]),evaluate:({zoom:Lr})=>be(G,D,Lr,Be,rr)}}return{kind:"source",evaluate(xr,Lr){let Zr=Lr&&Lr.properties?Lr.properties[G.property]:void 0;return Zr===void 0?_f(G.default,D.default):be(G,D,Zr,Be,rr)}}}function _f(G,D,nt){return G!==void 0?G:D!==void 0?D:nt!==void 0?nt:void 0}function Kf(G,D,nt,bt,Rt){return _f(typeof nt===Rt?bt[nt]:void 0,G.default,D.default)}function Nc(G,D,nt){if(eu(nt)!=="number")return _f(G.default,D.default);let bt=G.stops.length;if(bt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[bt-1][0])return G.stops[bt-1][1];let Rt=En(G.stops.map(Kt=>Kt[0]),nt);return G.stops[Rt][1]}function Xf(G,D,nt){let bt=G.base!==void 0?G.base:1;if(eu(nt)!=="number")return _f(G.default,D.default);let Rt=G.stops.length;if(Rt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[Rt-1][0])return G.stops[Rt-1][1];let Kt=En(G.stops.map(xr=>xr[0]),nt),Qt=function(xr,Lr,Zr,ln){let bn=ln-Zr,Ln=xr-Zr;return bn===0?0:Lr===1?Ln/bn:(Math.pow(Lr,Ln)-1)/(Math.pow(Lr,bn)-1)}(nt,bt,G.stops[Kt][0],G.stops[Kt+1][0]),be=G.stops[Kt][1],Be=G.stops[Kt+1][1],rr=Fo[D.type]||Cd;return typeof be.evaluate=="function"?{evaluate(...xr){let Lr=be.evaluate.apply(void 0,xr),Zr=Be.evaluate.apply(void 0,xr);if(Lr!==void 0&&Zr!==void 0)return rr(Lr,Zr,Qt,G.colorSpace)}}:rr(be,Be,Qt,G.colorSpace)}function Ou(G,D,nt){switch(D.type){case"color":nt=_r.parse(nt);break;case"formatted":nt=Tn.fromString(nt.toString());break;case"resolvedImage":nt=Oi.fromString(nt.toString());break;case"padding":nt=Mn.parse(nt);break;default:eu(nt)===D.type||D.type==="enum"&&D.values[nt]||(nt=void 0)}return _f(nt,G.default,D.default)}lc.register(yf,{error:[{kind:"error"},[He],(G,[D])=>{throw new ze(D.evaluate(G))}],typeof:[He,[jr],(G,[D])=>ne(ci(D.evaluate(G)))],"to-rgba":[Gt(Te,4),[cr],(G,[D])=>{let[nt,bt,Rt,Kt]=D.evaluate(G).rgb;return[255*nt,255*bt,255*Rt,Kt]}],rgb:[cr,[Te,Te,Te],hd],rgba:[cr,[Te,Te,Te,Te],hd],has:{type:Ge,overloads:[[[He],(G,[D])=>Zf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>Zf(D.evaluate(G),nt.evaluate(G))]]},get:{type:jr,overloads:[[[He],(G,[D])=>xf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>xf(D.evaluate(G),nt.evaluate(G))]]},"feature-state":[jr,[He],(G,[D])=>xf(D.evaluate(G),G.featureState||{})],properties:[ur,[],G=>G.properties()],"geometry-type":[He,[],G=>G.geometryType()],id:[jr,[],G=>G.id()],zoom:[Te,[],G=>G.globals.zoom],"heatmap-density":[Te,[],G=>G.globals.heatmapDensity||0],"line-progress":[Te,[],G=>G.globals.lineProgress||0],accumulated:[jr,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[Te,Hh(Te),(G,D)=>{let nt=0;for(let bt of D)nt+=bt.evaluate(G);return nt}],"*":[Te,Hh(Te),(G,D)=>{let nt=1;for(let bt of D)nt*=bt.evaluate(G);return nt}],"-":{type:Te,overloads:[[[Te,Te],(G,[D,nt])=>D.evaluate(G)-nt.evaluate(G)],[[Te],(G,[D])=>-D.evaluate(G)]]},"/":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)/nt.evaluate(G)],"%":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)%nt.evaluate(G)],ln2:[Te,[],()=>Math.LN2],pi:[Te,[],()=>Math.PI],e:[Te,[],()=>Math.E],"^":[Te,[Te,Te],(G,[D,nt])=>Math.pow(D.evaluate(G),nt.evaluate(G))],sqrt:[Te,[Te],(G,[D])=>Math.sqrt(D.evaluate(G))],log10:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN10],ln:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))],log2:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN2],sin:[Te,[Te],(G,[D])=>Math.sin(D.evaluate(G))],cos:[Te,[Te],(G,[D])=>Math.cos(D.evaluate(G))],tan:[Te,[Te],(G,[D])=>Math.tan(D.evaluate(G))],asin:[Te,[Te],(G,[D])=>Math.asin(D.evaluate(G))],acos:[Te,[Te],(G,[D])=>Math.acos(D.evaluate(G))],atan:[Te,[Te],(G,[D])=>Math.atan(D.evaluate(G))],min:[Te,Hh(Te),(G,D)=>Math.min(...D.map(nt=>nt.evaluate(G)))],max:[Te,Hh(Te),(G,D)=>Math.max(...D.map(nt=>nt.evaluate(G)))],abs:[Te,[Te],(G,[D])=>Math.abs(D.evaluate(G))],round:[Te,[Te],(G,[D])=>{let nt=D.evaluate(G);return nt<0?-Math.round(-nt):Math.round(nt)}],floor:[Te,[Te],(G,[D])=>Math.floor(D.evaluate(G))],ceil:[Te,[Te],(G,[D])=>Math.ceil(D.evaluate(G))],"filter-==":[Ge,[He,jr],(G,[D,nt])=>G.properties()[D.value]===nt.value],"filter-id-==":[Ge,[jr],(G,[D])=>G.id()===D.value],"filter-type-==":[Ge,[He],(G,[D])=>G.geometryType()===D.value],"filter-<":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt>Rt}],"filter-id->":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>bt}],"filter-<=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt<=Rt}],"filter-id-<=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt<=bt}],"filter->=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt>=Rt}],"filter-id->=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>=bt}],"filter-has":[Ge,[jr],(G,[D])=>D.value in G.properties()],"filter-has-id":[Ge,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[Ge,[Gt(He)],(G,[D])=>D.value.indexOf(G.geometryType())>=0],"filter-id-in":[Ge,[Gt(jr)],(G,[D])=>D.value.indexOf(G.id())>=0],"filter-in-small":[Ge,[He,Gt(jr)],(G,[D,nt])=>nt.value.indexOf(G.properties()[D.value])>=0],"filter-in-large":[Ge,[He,Gt(jr)],(G,[D,nt])=>function(bt,Rt,Kt,Qt){for(;Kt<=Qt;){let be=Kt+Qt>>1;if(Rt[be]===bt)return!0;Rt[be]>bt?Qt=be-1:Kt=be+1}return!1}(G.properties()[D.value],nt.value,0,nt.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)&&nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(!nt.evaluate(G))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)||nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(nt.evaluate(G))return!0;return!1}]]},"!":[Ge,[Ge],(G,[D])=>!D.evaluate(G)],"is-supported-script":[Ge,[He],(G,[D])=>{let nt=G.globals&&G.globals.isSupportedScript;return!nt||nt(D.evaluate(G))}],upcase:[He,[He],(G,[D])=>D.evaluate(G).toUpperCase()],downcase:[He,[He],(G,[D])=>D.evaluate(G).toLowerCase()],concat:[He,Hh(jr),(G,D)=>D.map(nt=>za(nt.evaluate(G))).join("")],"resolved-locale":[He,[Wr],(G,[D])=>D.evaluate(G).resolvedLocale()]});class jc{constructor(D,nt){var bt;this.expression=D,this._warningHistory={},this._evaluator=new Yr,this._defaultValue=nt?(bt=nt).type==="color"&&Ef(bt.default)?new _r(0,0,0,0):bt.type==="color"?_r.parse(bt.default)||null:bt.type==="padding"?Mn.parse(bt.default)||null:bt.type==="variableAnchorOffsetCollection"?ki.parse(bt.default)||null:bt.default===void 0?null:bt.default:null,this._enumValues=nt&&nt.type==="enum"?nt.values:null}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._evaluator.globals=D,this._evaluator.feature=nt,this._evaluator.featureState=bt,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt,this.expression.evaluate(this._evaluator)}evaluate(D,nt,bt,Rt,Kt,Qt){this._evaluator.globals=D,this._evaluator.feature=nt||null,this._evaluator.featureState=bt||null,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt||null;try{let be=this.expression.evaluate(this._evaluator);if(be==null||typeof be=="number"&&be!=be)return this._defaultValue;if(this._enumValues&&!(be in this._enumValues))throw new ze(`Expected value to be one of ${Object.keys(this._enumValues).map(Be=>JSON.stringify(Be)).join(", ")}, but found ${JSON.stringify(be)} instead.`);return be}catch(be){return this._warningHistory[be.message]||(this._warningHistory[be.message]=!0,typeof console<"u"&&console.warn(be.message)),this._defaultValue}}}function Wh(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in yf}function hu(G,D){let nt=new pn(yf,Uf,[],D?function(Rt){let Kt={color:cr,string:He,number:Te,enum:He,boolean:Ge,formatted:br,padding:Xr,resolvedImage:nn,variableAnchorOffsetCollection:Le};return Rt.type==="array"?Gt(Kt[Rt.value]||jr,Rt.length):Kt[Rt.type]}(D):void 0),bt=nt.parse(G,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return bt?Eh(new jc(bt,D)):gh(nt.errors)}class Ch{constructor(D,nt){this.kind=D,this._styleExpression=nt,this.isStateDependent=D!=="constant"&&!lh(nt.expression)}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt)}evaluate(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Rt,Kt,Qt)}}class Mc{constructor(D,nt,bt,Rt){this.kind=D,this.zoomStops=bt,this._styleExpression=nt,this.isStateDependent=D!=="camera"&&!lh(nt.expression),this.interpolationType=Rt}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt)}evaluate(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Rt,Kt,Qt)}interpolationFactor(D,nt,bt){return this.interpolationType?Da.interpolationFactor(this.interpolationType,D,nt,bt):0}}function Uc(G,D){let nt=hu(G,D);if(nt.result==="error")return nt;let bt=nt.value.expression,Rt=Vf(bt);if(!Rt&&!uc(D))return gh([new ee("","data expressions not supported")]);let Kt=Gf(bt,["zoom"]);if(!Kt&&!rf(D))return gh([new ee("","zoom expressions not supported")]);let Qt=uf(bt);return Qt||Kt?Qt instanceof ee?gh([Qt]):Qt instanceof Da&&!Hf(D)?gh([new ee("",'"interpolate" expressions cannot be used with this property')]):Eh(Qt?new Mc(Rt?"camera":"composite",nt.value,Qt.labels,Qt instanceof Da?Qt.interpolation:void 0):new Ch(Rt?"constant":"source",nt.value)):gh([new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class bu{constructor(D,nt){this._parameters=D,this._specification=nt,Mt(this,Yf(this._parameters,this._specification))}static deserialize(D){return new bu(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function uf(G){let D=null;if(G instanceof on)D=uf(G.result);else if(G instanceof os){for(let nt of G.args)if(D=uf(nt),D)break}else(G instanceof Zn||G instanceof Da)&&G.input instanceof lc&&G.input.name==="zoom"&&(D=G);return D instanceof ee||G.eachChild(nt=>{let bt=uf(nt);bt instanceof ee?D=bt:!D&&bt?D=new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&bt&&D!==bt&&(D=new ee("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function vh(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let D of G.slice(1))if(!vh(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let qh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cf(G){if(G==null)return{filter:()=>!0,needGeometry:!1};vh(G)||(G=cf(G));let D=hu(G,qh);if(D.result==="error")throw new Error(D.value.map(nt=>`${nt.key}: ${nt.message}`).join(", "));return{filter:(nt,bt,Rt)=>D.value.evaluate(nt,bt,{},Rt),needGeometry:Jd(G)}}function Ld(G,D){return GD?1:0}function Jd(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?Lf(G[1],G[2],D):D==="any"?(nt=G.slice(1),["any"].concat(nt.map(cf))):D==="all"?["all"].concat(G.slice(1).map(cf)):D==="none"?["all"].concat(G.slice(1).map(cf).map(Qc)):D==="in"?wc(G[1],G.slice(2)):D==="!in"?Qc(wc(G[1],G.slice(2))):D==="has"?hf(G[1]):D!=="!has"||Qc(hf(G[1]));var nt}function Lf(G,D,nt){switch(G){case"$type":return[`filter-type-${nt}`,D];case"$id":return[`filter-id-${nt}`,D];default:return[`filter-${nt}`,G,D]}}function wc(G,D){if(D.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(nt=>typeof nt!=typeof D[0])?["filter-in-large",G,["literal",D.sort(Ld)]]:["filter-in-small",G,["literal",D]]}}function hf(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function Qc(G){return["!",G]}function ff(G){let D=typeof G;if(D==="number"||D==="boolean"||D==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let Rt="[";for(let Kt of G)Rt+=`${ff(Kt)},`;return`${Rt}]`}let nt=Object.keys(G).sort(),bt="{";for(let Rt=0;Rtbt.maximum?[new Lt(D,nt,`${nt} is greater than the maximum value ${bt.maximum}`)]:[]}function bf(G){let D=G.valueSpec,nt=wu(G.value.type),bt,Rt,Kt,Qt={},be=nt!=="categorical"&&G.value.property===void 0,Be=!be,rr=eu(G.value.stops)==="array"&&eu(G.value.stops[0])==="array"&&eu(G.value.stops[0][0])==="object",xr=Vc({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(ln){if(nt==="identity")return[new Lt(ln.key,ln.value,'identity function may not have a "stops" property')];let bn=[],Ln=ln.value;return bn=bn.concat(fd({key:ln.key,value:Ln,valueSpec:ln.valueSpec,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,arrayElementValidator:Lr})),eu(Ln)==="array"&&Ln.length===0&&bn.push(new Lt(ln.key,Ln,"array must have at least one stop")),bn},default:function(ln){return ln.validateSpec({key:ln.key,value:ln.value,valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec})}}});return nt==="identity"&&be&&xr.push(new Lt(G.key,G.value,'missing required property "property"')),nt==="identity"||G.value.stops||xr.push(new Lt(G.key,G.value,'missing required property "stops"')),nt==="exponential"&&G.valueSpec.expression&&!Hf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(Be&&!uc(G.valueSpec)?xr.push(new Lt(G.key,G.value,"property functions not supported")):be&&!rf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"zoom functions not supported"))),nt!=="categorical"&&!rr||G.value.property!==void 0||xr.push(new Lt(G.key,G.value,'"property" property is required')),xr;function Lr(ln){let bn=[],Ln=ln.value,Gn=ln.key;if(eu(Ln)!=="array")return[new Lt(Gn,Ln,`array expected, ${eu(Ln)} found`)];if(Ln.length!==2)return[new Lt(Gn,Ln,`array length 2 expected, length ${Ln.length} found`)];if(rr){if(eu(Ln[0])!=="object")return[new Lt(Gn,Ln,`object expected, ${eu(Ln[0])} found`)];if(Ln[0].zoom===void 0)return[new Lt(Gn,Ln,"object stop key must have zoom")];if(Ln[0].value===void 0)return[new Lt(Gn,Ln,"object stop key must have value")];if(Kt&&Kt>wu(Ln[0].zoom))return[new Lt(Gn,Ln[0].zoom,"stop zoom values must appear in ascending order")];wu(Ln[0].zoom)!==Kt&&(Kt=wu(Ln[0].zoom),Rt=void 0,Qt={}),bn=bn.concat(Vc({key:`${Gn}[0]`,value:Ln[0],valueSpec:{zoom:{}},validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,objectElementValidators:{zoom:yu,value:Zr}}))}else bn=bn.concat(Zr({key:`${Gn}[0]`,value:Ln[0],validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec},Ln));return Wh(Lh(Ln[1]))?bn.concat([new Lt(`${Gn}[1]`,Ln[1],"expressions are not allowed in function stops.")]):bn.concat(ln.validateSpec({key:`${Gn}[1]`,value:Ln[1],valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec}))}function Zr(ln,bn){let Ln=eu(ln.value),Gn=wu(ln.value),Mi=ln.value!==null?ln.value:bn;if(bt){if(Ln!==bt)return[new Lt(ln.key,Mi,`${Ln} stop domain type must match previous stop domain type ${bt}`)]}else bt=Ln;if(Ln!=="number"&&Ln!=="string"&&Ln!=="boolean")return[new Lt(ln.key,Mi,"stop domain value must be a number, string, or boolean")];if(Ln!=="number"&&nt!=="categorical"){let Aa=`number expected, ${Ln} found`;return uc(D)&&nt===void 0&&(Aa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lt(ln.key,Mi,Aa)]}return nt!=="categorical"||Ln!=="number"||isFinite(Gn)&&Math.floor(Gn)===Gn?nt!=="categorical"&&Ln==="number"&&Rt!==void 0&&Gnnew Lt(`${G.key}${bt.key}`,G.value,bt.message));let nt=D.value.expression||D.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!nt.outputDefined())return[new Lt(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Gf(nt,["zoom","feature-state"]))return[new Lt(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!Vf(nt))return[new Lt(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function th(G){let D=G.key,nt=G.value,bt=G.valueSpec,Rt=[];return Array.isArray(bt.values)?bt.values.indexOf(wu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${bt.values.join(", ")}], ${JSON.stringify(nt)} found`)):Object.keys(bt.values).indexOf(wu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${Object.keys(bt.values).join(", ")}], ${JSON.stringify(nt)} found`)),Rt}function nf(G){return vh(Lh(G.value))?$h(Mt({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Zh(G)}function Zh(G){let D=G.value,nt=G.key;if(eu(D)!=="array")return[new Lt(nt,D,`array expected, ${eu(D)} found`)];let bt=G.styleSpec,Rt,Kt=[];if(D.length<1)return[new Lt(nt,D,"filter array must have at least 1 element")];switch(Kt=Kt.concat(th({key:`${nt}[0]`,value:D[0],valueSpec:bt.filter_operator,style:G.style,styleSpec:G.styleSpec})),wu(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&wu(D[1])==="$type"&&Kt.push(new Lt(nt,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Kt.push(new Lt(nt,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Rt=eu(D[1]),Rt!=="string"&&Kt.push(new Lt(`${nt}[1]`,D[1],`string expected, ${Rt} found`)));for(let Qt=2;Qt{rr in nt&&D.push(new Lt(bt,nt[rr],`"${rr}" is prohibited for ref layers`))}),Rt.layers.forEach(rr=>{wu(rr.id)===be&&(Be=rr)}),Be?Be.ref?D.push(new Lt(bt,nt.ref,"ref cannot reference another ref layer")):Qt=wu(Be.type):D.push(new Lt(bt,nt.ref,`ref layer "${be}" not found`))}else if(Qt!=="background")if(nt.source){let Be=Rt.sources&&Rt.sources[nt.source],rr=Be&&wu(Be.type);Be?rr==="vector"&&Qt==="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster source`)):rr!=="raster-dem"&&Qt==="hillshade"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster-dem source`)):rr==="raster"&&Qt!=="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a vector source`)):rr!=="vector"||nt["source-layer"]?rr==="raster-dem"&&Qt!=="hillshade"?D.push(new Lt(bt,nt.source,"raster-dem source can only be used with layer type 'hillshade'.")):Qt!=="line"||!nt.paint||!nt.paint["line-gradient"]||rr==="geojson"&&Be.lineMetrics||D.push(new Lt(bt,nt,`layer "${nt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new Lt(bt,nt,`layer "${nt.id}" must specify a "source-layer"`)):D.push(new Lt(bt,nt.source,`source "${nt.source}" not found`))}else D.push(new Lt(bt,nt,'missing required property "source"'));return D=D.concat(Vc({key:bt,value:nt,valueSpec:Kt.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${bt}.type`,value:nt.type,valueSpec:Kt.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:nt,objectKey:"type"}),filter:nf,layout:Be=>Vc({layer:nt,key:Be.key,value:Be.value,style:Be.style,styleSpec:Be.styleSpec,validateSpec:Be.validateSpec,objectElementValidators:{"*":rr=>gc(Mt({layerType:Qt},rr))}}),paint:Be=>Vc({layer:nt,key:Be.key,value:Be.value,style:Be.style,styleSpec:Be.styleSpec,validateSpec:Be.validateSpec,objectElementValidators:{"*":rr=>Pd(Mt({layerType:Qt},rr))}})}})),D}function eh(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="string"?[new Lt(nt,D,`string expected, ${bt} found`)]:[]}let Ph={promoteId:function({key:G,value:D}){if(eu(D)==="string")return eh({key:G,value:D});{let nt=[];for(let bt in D)nt.push(...eh({key:`${G}.${bt}`,value:D[bt]}));return nt}}};function xh(G){let D=G.value,nt=G.key,bt=G.styleSpec,Rt=G.style,Kt=G.validateSpec;if(!D.type)return[new Lt(nt,D,'"type" is required')];let Qt=wu(D.type),be;switch(Qt){case"vector":case"raster":return be=Vc({key:nt,value:D,valueSpec:bt[`source_${Qt.replace("-","_")}`],style:G.style,styleSpec:bt,objectElementValidators:Ph,validateSpec:Kt}),be;case"raster-dem":return be=function(Be){var rr;let xr=(rr=Be.sourceName)!==null&&rr!==void 0?rr:"",Lr=Be.value,Zr=Be.styleSpec,ln=Zr.source_raster_dem,bn=Be.style,Ln=[],Gn=eu(Lr);if(Lr===void 0)return Ln;if(Gn!=="object")return Ln.push(new Lt("source_raster_dem",Lr,`object expected, ${Gn} found`)),Ln;let Mi=wu(Lr.encoding)==="custom",Aa=["redFactor","greenFactor","blueFactor","baseShift"],ra=Be.value.encoding?`"${Be.value.encoding}"`:"Default";for(let ga in Lr)!Mi&&Aa.includes(ga)?Ln.push(new Lt(ga,Lr[ga],`In "${xr}": "${ga}" is only valid when "encoding" is set to "custom". ${ra} encoding found`)):ln[ga]?Ln=Ln.concat(Be.validateSpec({key:ga,value:Lr[ga],valueSpec:ln[ga],validateSpec:Be.validateSpec,style:bn,styleSpec:Zr})):Ln.push(new Lt(ga,Lr[ga],`unknown property "${ga}"`));return Ln}({sourceName:nt,value:D,style:G.style,styleSpec:bt,validateSpec:Kt}),be;case"geojson":if(be=Vc({key:nt,value:D,valueSpec:bt.source_geojson,style:Rt,styleSpec:bt,validateSpec:Kt,objectElementValidators:Ph}),D.cluster)for(let Be in D.clusterProperties){let[rr,xr]=D.clusterProperties[Be],Lr=typeof rr=="string"?[rr,["accumulated"],["get",Be]]:rr;be.push(...$h({key:`${nt}.${Be}.map`,value:xr,expressionContext:"cluster-map"})),be.push(...$h({key:`${nt}.${Be}.reduce`,value:Lr,expressionContext:"cluster-reduce"}))}return be;case"video":return Vc({key:nt,value:D,valueSpec:bt.source_video,style:Rt,validateSpec:Kt,styleSpec:bt});case"image":return Vc({key:nt,value:D,valueSpec:bt.source_image,style:Rt,validateSpec:Kt,styleSpec:bt});case"canvas":return[new Lt(nt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return th({key:`${nt}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Bu(G){let D=G.value,nt=G.styleSpec,bt=nt.light,Rt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("light",D,`object expected, ${Qt} found`)]),Kt;for(let be in D){let Be=be.match(/^(.*)-transition$/);Kt=Kt.concat(Be&&bt[Be[1]]&&bt[Be[1]].transition?G.validateSpec({key:be,value:D[be],valueSpec:nt.transition,validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)])}return Kt}function iu(G){let D=G.value,nt=G.styleSpec,bt=nt.sky,Rt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("sky",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt}function _h(G){let D=G.value,nt=G.styleSpec,bt=nt.terrain,Rt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("terrain",D,`object expected, ${Qt} found`)]),Kt;for(let be in D)Kt=Kt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Kt}function df(G){let D=[],nt=G.value,bt=G.key;if(Array.isArray(nt)){let Rt=[],Kt=[];for(let Qt in nt)nt[Qt].id&&Rt.includes(nt[Qt].id)&&D.push(new Lt(bt,nt,`all the sprites' ids must be unique, but ${nt[Qt].id} is duplicated`)),Rt.push(nt[Qt].id),nt[Qt].url&&Kt.includes(nt[Qt].url)&&D.push(new Lt(bt,nt,`all the sprites' URLs must be unique, but ${nt[Qt].url} is duplicated`)),Kt.push(nt[Qt].url),D=D.concat(Vc({key:`${bt}[${Qt}]`,value:nt[Qt],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return D}return eh({key:bt,value:nt})}let bh={"*":()=>[],array:fd,boolean:function(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="boolean"?[new Lt(nt,D,`boolean expected, ${bt} found`)]:[]},number:yu,color:function(G){let D=G.key,nt=G.value,bt=eu(nt);return bt!=="string"?[new Lt(D,nt,`color expected, ${bt} found`)]:_r.parse(String(nt))?[]:[new Lt(D,nt,`color expected, "${nt}" found`)]},constants:yh,enum:th,filter:nf,function:bf,layer:Jf,object:Vc,source:xh,light:Bu,sky:iu,terrain:_h,projection:function(G){let D=G.value,nt=G.styleSpec,bt=nt.projection,Rt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("projection",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt},string:eh,formatted:function(G){return eh(G).length===0?[]:$h(G)},resolvedImage:function(G){return eh(G).length===0?[]:$h(G)},padding:function(G){let D=G.key,nt=G.value;if(eu(nt)==="array"){if(nt.length<1||nt.length>4)return[new Lt(D,nt,`padding requires 1 to 4 values; ${nt.length} values found`)];let bt={type:"number"},Rt=[];for(let Kt=0;Kt[]}})),G.constants&&(nt=nt.concat(yh({key:"constants",value:G.constants}))),hn(nt)}function wn(G){return function(D){return G(Tr(Mr({},D),{validateSpec:Wf}))}}function hn(G){return[].concat(G).sort((D,nt)=>D.line-nt.line)}function qn(G){return function(...D){return hn(G.apply(this,D))}}Ur.source=qn(wn(xh)),Ur.sprite=qn(wn(df)),Ur.glyphs=qn(wn(gr)),Ur.light=qn(wn(Bu)),Ur.sky=qn(wn(iu)),Ur.terrain=qn(wn(_h)),Ur.layer=qn(wn(Jf)),Ur.filter=qn(wn(nf)),Ur.paintProperty=qn(wn(Pd)),Ur.layoutProperty=qn(wn(gc));let di=Ur,aa=di.light,va=di.sky,Ba=di.paintProperty,Za=di.layoutProperty;function ca(G,D){let nt=!1;if(D&&D.length)for(let bt of D)G.fire(new Y(new Error(bt.message))),nt=!0;return nt}class Oa{constructor(D,nt,bt){let Rt=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Qt=new Int32Array(this.arrayBuffer);D=Qt[0],this.d=(nt=Qt[1])+2*(bt=Qt[2]);for(let Be=0;Be=Lr[bn+0]&&Rt>=Lr[bn+1])?(be[ln]=!0,Qt.push(xr[ln])):be[ln]=!1}}}}_forEachCell(D,nt,bt,Rt,Kt,Qt,be,Be){let rr=this._convertToCellCoord(D),xr=this._convertToCellCoord(nt),Lr=this._convertToCellCoord(bt),Zr=this._convertToCellCoord(Rt);for(let ln=rr;ln<=Lr;ln++)for(let bn=xr;bn<=Zr;bn++){let Ln=this.d*bn+ln;if((!Be||Be(this._convertFromCellCoord(ln),this._convertFromCellCoord(bn),this._convertFromCellCoord(ln+1),this._convertFromCellCoord(bn+1)))&&Kt.call(this,D,nt,bt,Rt,Ln,Qt,be,Be))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,nt=3+this.cells.length+1+1,bt=0;for(let Qt=0;Qt=0)continue;let Qt=G[Kt];Rt[Kt]=ka[nt].shallow.indexOf(Kt)>=0?Qt:ls(Qt,D)}G instanceof Error&&(Rt.message=G.message)}if(Rt.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(Rt.$name=nt),Rt}function ps(G){if(Ko(G))return G;if(Array.isArray(G))return G.map(ps);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let D=ns(G)||"Object";if(!ka[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:nt}=ka[D];if(!nt)throw new Error(`can't deserialize unregistered class ${D}`);if(nt.deserialize)return nt.deserialize(G);let bt=Object.create(nt.prototype);for(let Rt of Object.keys(G)){if(Rt==="$name")continue;let Kt=G[Rt];bt[Rt]=ka[D].shallow.indexOf(Rt)>=0?Kt:ps(Kt)}return bt}class oo{constructor(){this.first=!0}update(D,nt){let bt=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=bt,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=bt,!0):(this.lastFloorZoom>bt?(this.lastIntegerZoom=bt+1,this.lastIntegerZoomTime=nt):this.lastFloorZoomG>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function gs(G){for(let D of G)if(ml(D.charCodeAt(0)))return!0;return!1}function el(G){for(let D of G)if(!$l(D.charCodeAt(0)))return!1;return!0}function Pl(G){let D=G.map(nt=>{try{return new RegExp(`\\p{sc=${nt}}`,"u").source}catch{return null}}).filter(nt=>nt);return new RegExp(D.join("|"),"u")}let su=Pl(["Arab","Dupl","Mong","Ougr","Syrc"]);function $l(G){return!su.test(String.fromCodePoint(G))}let lu=Pl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ml(G){return!(G!==746&&G!==747&&(G<4352||!(qa["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||qa["CJK Compatibility"](G)||qa["CJK Strokes"](G)||!(!qa["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||qa["Enclosed CJK Letters and Months"](G)||qa["Ideographic Description Characters"](G)||qa.Kanbun(G)||qa.Katakana(G)&&G!==12540||!(!qa["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!qa["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||qa["Vertical Forms"](G)||qa["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||lu.test(String.fromCodePoint(G)))))}function qu(G){return!(ml(G)||function(D){return!!(qa["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||qa["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||qa["Letterlike Symbols"](D)||qa["Number Forms"](D)||qa["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||qa["Control Pictures"](D)&&D!==9251||qa["Optical Character Recognition"](D)||qa["Enclosed Alphanumerics"](D)||qa["Geometric Shapes"](D)||qa["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||qa["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||qa["CJK Symbols and Punctuation"](D)||qa.Katakana(D)||qa["Private Use Area"](D)||qa["CJK Compatibility Forms"](D)||qa["Small Form Variants"](D)||qa["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(G))}let Iu=Pl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function fu(G){return Iu.test(String.fromCodePoint(G))}function Oo(G,D){return!(!D&&fu(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||qa.Khmer(G))}function Es(G){for(let D of G)if(fu(D.charCodeAt(0)))return!0;return!1}let Kl=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Rl{constructor(D,nt){this.zoom=D,nt?(this.now=nt.now,this.fadeDuration=nt.fadeDuration,this.zoomHistory=nt.zoomHistory,this.transition=nt.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new oo,this.transition={})}isSupportedScript(D){return function(nt,bt){for(let Rt of nt)if(!Oo(Rt.charCodeAt(0),bt))return!1;return!0}(D,Kl.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,nt=D-Math.floor(D),bt=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:nt+(1-nt)*bt}:{fromScale:.5,toScale:1,t:1-(1-bt)*nt}}}class vc{constructor(D,nt){this.property=D,this.value=nt,this.expression=function(bt,Rt){if(Ef(bt))return new bu(bt,Rt);if(Wh(bt)){let Kt=Uc(bt,Rt);if(Kt.result==="error")throw new Error(Kt.value.map(Qt=>`${Qt.key}: ${Qt.message}`).join(", "));return Kt.value}{let Kt=bt;return Rt.type==="color"&&typeof bt=="string"?Kt=_r.parse(bt):Rt.type!=="padding"||typeof bt!="number"&&!Array.isArray(bt)?Rt.type==="variableAnchorOffsetCollection"&&Array.isArray(bt)&&(Kt=ki.parse(bt)):Kt=Mn.parse(bt),{kind:"constant",evaluate:()=>Kt}}}(nt===void 0?D.specification.default:nt,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,nt,bt){return this.property.possiblyEvaluate(this,D,nt,bt)}}class Hc{constructor(D){this.property=D,this.value=new vc(D,void 0)}transitioned(D,nt){return new Ih(this.property,this.value,nt,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ih(this.property,this.value,null,{},0)}}class Lc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return p(this._values[D].value.value)}setValue(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].value=new vc(this._values[D].property,nt===null?void 0:p(nt))}getTransition(D){return p(this._values[D].transition)}setTransition(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].transition=p(nt)||void 0}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt);let Rt=this.getTransition(nt);Rt!==void 0&&(D[`${nt}-transition`]=Rt)}return D}transitioned(D,nt){let bt=new Wc(this._properties);for(let Rt of Object.keys(this._values))bt._values[Rt]=this._values[Rt].transitioned(D,nt._values[Rt]);return bt}untransitioned(){let D=new Wc(this._properties);for(let nt of Object.keys(this._values))D._values[nt]=this._values[nt].untransitioned();return D}}class Ih{constructor(D,nt,bt,Rt,Kt){this.property=D,this.value=nt,this.begin=Kt+Rt.delay||0,this.end=this.begin+Rt.duration||0,D.specification.transition&&(Rt.delay||Rt.duration)&&(this.prior=bt)}possiblyEvaluate(D,nt,bt){let Rt=D.now||0,Kt=this.value.possiblyEvaluate(D,nt,bt),Qt=this.prior;if(Qt){if(Rt>this.end)return this.prior=null,Kt;if(this.value.isDataDriven())return this.prior=null,Kt;if(Rt=1)return 1;let rr=Be*Be,xr=rr*Be;return 4*(Be<.5?xr:3*(Be-rr)+xr-.75)}(be))}}return Kt}}class Wc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,nt,bt){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Rt}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class zh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return p(this._values[D].value)}setValue(D,nt){this._values[D]=new vc(this._values[D].property,nt===null?void 0:p(nt))}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt)}return D}possiblyEvaluate(D,nt,bt){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Rt}}class Du{constructor(D,nt,bt){this.property=D,this.value=nt,this.parameters=bt}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,nt,bt,Rt){return this.property.evaluate(this.value,this.parameters,D,nt,bt,Rt)}}class Oh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class rs{constructor(D){this.specification=D}possiblyEvaluate(D,nt){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(nt)}interpolate(D,nt,bt){let Rt=Fo[this.specification.type];return Rt?Rt(D,nt,bt):D}}class zs{constructor(D,nt){this.specification=D,this.overrides=nt}possiblyEvaluate(D,nt,bt,Rt){return new Du(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(nt,null,{},bt,Rt)}:D.expression,nt)}interpolate(D,nt,bt){if(D.value.kind!=="constant"||nt.value.kind!=="constant")return D;if(D.value.value===void 0||nt.value.value===void 0)return new Du(this,{kind:"constant",value:void 0},D.parameters);let Rt=Fo[this.specification.type];if(Rt){let Kt=Rt(D.value.value,nt.value.value,bt);return new Du(this,{kind:"constant",value:Kt},D.parameters)}return D}evaluate(D,nt,bt,Rt,Kt,Qt){return D.kind==="constant"?D.value:D.evaluate(nt,bt,Rt,Kt,Qt)}}class qc extends zs{possiblyEvaluate(D,nt,bt,Rt){if(D.value===void 0)return new Du(this,{kind:"constant",value:void 0},nt);if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Rt),Qt=D.property.specification.type==="resolvedImage"&&typeof Kt!="string"?Kt.name:Kt,be=this._calculate(Qt,Qt,Qt,nt);return new Du(this,{kind:"constant",value:be},nt)}if(D.expression.kind==="camera"){let Kt=this._calculate(D.expression.evaluate({zoom:nt.zoom-1}),D.expression.evaluate({zoom:nt.zoom}),D.expression.evaluate({zoom:nt.zoom+1}),nt);return new Du(this,{kind:"constant",value:Kt},nt)}return new Du(this,D.expression,nt)}evaluate(D,nt,bt,Rt,Kt,Qt){if(D.kind==="source"){let be=D.evaluate(nt,bt,Rt,Kt,Qt);return this._calculate(be,be,be,nt)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(nt.zoom)-1},bt,Rt),D.evaluate({zoom:Math.floor(nt.zoom)},bt,Rt),D.evaluate({zoom:Math.floor(nt.zoom)+1},bt,Rt),nt):D.value}_calculate(D,nt,bt,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class $u{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Rt){if(D.value!==void 0){if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Rt);return this._calculate(Kt,Kt,Kt,nt)}return this._calculate(D.expression.evaluate(new Rl(Math.floor(nt.zoom-1),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom+1),nt)),nt)}}_calculate(D,nt,bt,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class qf{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Rt){return!!D.expression.evaluate(nt,null,{},bt,Rt)}interpolate(){return!1}}class $t{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let nt in D){let bt=D[nt];bt.specification.overridable&&this.overridableProperties.push(nt);let Rt=this.defaultPropertyValues[nt]=new vc(bt,void 0),Kt=this.defaultTransitionablePropertyValues[nt]=new Hc(bt);this.defaultTransitioningPropertyValues[nt]=Kt.untransitioned(),this.defaultPossiblyEvaluatedValues[nt]=Rt.possiblyEvaluate({})}}}na("DataDrivenProperty",zs),na("DataConstantProperty",rs),na("CrossFadedDataDrivenProperty",qc),na("CrossFadedProperty",$u),na("ColorRampProperty",qf);let z="-transition";class ht extends ft{constructor(D,nt){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),nt.layout&&(this._unevaluatedLayout=new zh(nt.layout)),nt.paint)){this._transitionablePaint=new Lc(nt.paint);for(let bt in D.paint)this.setPaintProperty(bt,D.paint[bt],{validate:!1});for(let bt in D.layout)this.setLayoutProperty(bt,D.layout[bt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Oh(nt.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,nt,bt={}){nt!=null&&this._validate(Za,`layers.${this.id}.layout.${D}`,D,nt,bt)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,nt):this.visibility=nt)}getPaintProperty(D){return D.endsWith(z)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,nt,bt={}){if(nt!=null&&this._validate(Ba,`layers.${this.id}.paint.${D}`,D,nt,bt))return!1;if(D.endsWith(z))return this._transitionablePaint.setTransition(D.slice(0,-11),nt||void 0),!1;{let Rt=this._transitionablePaint._values[D],Kt=Rt.property.specification["property-type"]==="cross-faded-data-driven",Qt=Rt.value.isDataDriven(),be=Rt.value;this._transitionablePaint.setValue(D,nt),this._handleSpecialPaintPropertyUpdate(D);let Be=this._transitionablePaint._values[D].value;return Be.isDataDriven()||Qt||Kt||this._handleOverridablePaintPropertyUpdate(D,be,Be)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,nt){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,nt)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,nt)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),h(D,(nt,bt)=>!(nt===void 0||bt==="layout"&&!Object.keys(nt).length||bt==="paint"&&!Object.keys(nt).length))}_validate(D,nt,bt,Rt,Kt={}){return(!Kt||Kt.validate!==!1)&&ca(this,D.call(di,{key:nt,layerType:this.type,objectKey:bt,value:Rt,styleSpec:ut,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let nt=this.paint.get(D);if(nt instanceof Du&&uc(nt.property.specification)&&(nt.value.kind==="source"||nt.value.kind==="composite")&&nt.value.isStateDependent)return!0}return!1}}let Et={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class zt{constructor(D,nt){this._structArray=D,this._pos1=nt*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ht{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,nt){return D._trim(),nt&&(D.isTransferred=!0,nt.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let nt=Object.create(this.prototype);return nt.arrayBuffer=D.arrayBuffer,nt.length=D.length,nt.capacity=D.arrayBuffer.byteLength/nt.bytesPerElement,nt._refreshViews(),nt}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let nt=this.uint8;this._refreshViews(),nt&&this.uint8.set(nt)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ke(G,D=1){let nt=0,bt=0;return{members:G.map(Rt=>{let Kt=Et[Rt.type].BYTES_PER_ELEMENT,Qt=nt=Fe(nt,Math.max(D,Kt)),be=Rt.components||1;return bt=Math.max(bt,Kt),nt+=Kt*be,{name:Rt.name,type:Rt.type,components:be,offset:Qt}}),size:Fe(nt,Math.max(bt,D)),alignment:D}}function Fe(G,D){return Math.ceil(G/D)*D}class Ke extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.int16[Rt+0]=nt,this.int16[Rt+1]=bt,D}}Ke.prototype.bytesPerElement=4,na("StructArrayLayout2i4",Ke);class vr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.int16[Kt+0]=nt,this.int16[Kt+1]=bt,this.int16[Kt+2]=Rt,D}}vr.prototype.bytesPerElement=6,na("StructArrayLayout3i6",vr);class Dr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Rt)}emplace(D,nt,bt,Rt,Kt){let Qt=4*D;return this.int16[Qt+0]=nt,this.int16[Qt+1]=bt,this.int16[Qt+2]=Rt,this.int16[Qt+3]=Kt,D}}Dr.prototype.bytesPerElement=8,na("StructArrayLayout4i8",Dr);class Fr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=6*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.int16[Be+2]=Rt,this.int16[Be+3]=Kt,this.int16[Be+4]=Qt,this.int16[Be+5]=be,D}}Fr.prototype.bytesPerElement=12,na("StructArrayLayout2i4i12",Fr);class un extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=4*D,rr=8*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.uint8[rr+4]=Rt,this.uint8[rr+5]=Kt,this.uint8[rr+6]=Qt,this.uint8[rr+7]=be,D}}un.prototype.bytesPerElement=8,na("StructArrayLayout2i4ub8",un);class Sn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.float32[Rt+0]=nt,this.float32[Rt+1]=bt,D}}Sn.prototype.bytesPerElement=8,na("StructArrayLayout2f8",Sn);class Xt extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=this.length;return this.resize(Lr+1),this.emplace(Lr,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr){let Zr=10*D;return this.uint16[Zr+0]=nt,this.uint16[Zr+1]=bt,this.uint16[Zr+2]=Rt,this.uint16[Zr+3]=Kt,this.uint16[Zr+4]=Qt,this.uint16[Zr+5]=be,this.uint16[Zr+6]=Be,this.uint16[Zr+7]=rr,this.uint16[Zr+8]=xr,this.uint16[Zr+9]=Lr,D}}Xt.prototype.bytesPerElement=20,na("StructArrayLayout10ui20",Xt);class ae extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr){let ln=this.length;return this.resize(ln+1),this.emplace(ln,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln){let bn=12*D;return this.int16[bn+0]=nt,this.int16[bn+1]=bt,this.int16[bn+2]=Rt,this.int16[bn+3]=Kt,this.uint16[bn+4]=Qt,this.uint16[bn+5]=be,this.uint16[bn+6]=Be,this.uint16[bn+7]=rr,this.int16[bn+8]=xr,this.int16[bn+9]=Lr,this.int16[bn+10]=Zr,this.int16[bn+11]=ln,D}}ae.prototype.bytesPerElement=24,na("StructArrayLayout4i4ui4i24",ae);class xe extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.float32[Kt+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Rt,D}}xe.prototype.bytesPerElement=12,na("StructArrayLayout3f12",xe);class Ae extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint32[1*D+0]=nt,D}}Ae.prototype.bytesPerElement=4,na("StructArrayLayout1ul4",Ae);class je extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,D,nt,bt,Rt,Kt,Qt,be,Be,rr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=10*D,Zr=5*D;return this.int16[Lr+0]=nt,this.int16[Lr+1]=bt,this.int16[Lr+2]=Rt,this.int16[Lr+3]=Kt,this.int16[Lr+4]=Qt,this.int16[Lr+5]=be,this.uint32[Zr+3]=Be,this.uint16[Lr+8]=rr,this.uint16[Lr+9]=xr,D}}je.prototype.bytesPerElement=20,na("StructArrayLayout6i1ul2ui20",je);class Oe extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=6*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.int16[Be+2]=Rt,this.int16[Be+3]=Kt,this.int16[Be+4]=Qt,this.int16[Be+5]=be,D}}Oe.prototype.bytesPerElement=12,na("StructArrayLayout2i2i2i12",Oe);class $e extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,D,nt,bt,Rt,Kt)}emplace(D,nt,bt,Rt,Kt,Qt){let be=4*D,Be=8*D;return this.float32[be+0]=nt,this.float32[be+1]=bt,this.float32[be+2]=Rt,this.int16[Be+6]=Kt,this.int16[Be+7]=Qt,D}}$e.prototype.bytesPerElement=16,na("StructArrayLayout2f1f2i16",$e);class wr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=16*D,rr=4*D,xr=8*D;return this.uint8[Be+0]=nt,this.uint8[Be+1]=bt,this.float32[rr+1]=Rt,this.float32[rr+2]=Kt,this.int16[xr+6]=Qt,this.int16[xr+7]=be,D}}wr.prototype.bytesPerElement=16,na("StructArrayLayout2ub2f2i16",wr);class Or extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.uint16[Kt+0]=nt,this.uint16[Kt+1]=bt,this.uint16[Kt+2]=Rt,D}}Or.prototype.bytesPerElement=6,na("StructArrayLayout3ui6",Or);class Nr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi){let Aa=this.length;return this.resize(Aa+1),this.emplace(Aa,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa){let ra=24*D,ga=12*D,Ya=48*D;return this.int16[ra+0]=nt,this.int16[ra+1]=bt,this.uint16[ra+2]=Rt,this.uint16[ra+3]=Kt,this.uint32[ga+2]=Qt,this.uint32[ga+3]=be,this.uint32[ga+4]=Be,this.uint16[ra+10]=rr,this.uint16[ra+11]=xr,this.uint16[ra+12]=Lr,this.float32[ga+7]=Zr,this.float32[ga+8]=ln,this.uint8[Ya+36]=bn,this.uint8[Ya+37]=Ln,this.uint8[Ya+38]=Gn,this.uint32[ga+10]=Mi,this.int16[ra+22]=Aa,D}}Nr.prototype.bytesPerElement=48,na("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);class en extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js){let Os=this.length;return this.resize(Os+1),this.emplace(Os,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js,Os){let uo=32*D,il=16*D;return this.int16[uo+0]=nt,this.int16[uo+1]=bt,this.int16[uo+2]=Rt,this.int16[uo+3]=Kt,this.int16[uo+4]=Qt,this.int16[uo+5]=be,this.int16[uo+6]=Be,this.int16[uo+7]=rr,this.uint16[uo+8]=xr,this.uint16[uo+9]=Lr,this.uint16[uo+10]=Zr,this.uint16[uo+11]=ln,this.uint16[uo+12]=bn,this.uint16[uo+13]=Ln,this.uint16[uo+14]=Gn,this.uint16[uo+15]=Mi,this.uint16[uo+16]=Aa,this.uint16[uo+17]=ra,this.uint16[uo+18]=ga,this.uint16[uo+19]=Ya,this.uint16[uo+20]=Ao,this.uint16[uo+21]=Ss,this.uint16[uo+22]=Sl,this.uint32[il+12]=_s,this.float32[il+13]=fs,this.float32[il+14]=Xs,this.uint16[uo+30]=js,this.uint16[uo+31]=Os,D}}en.prototype.bytesPerElement=64,na("StructArrayLayout8i15ui1ul2f2ui64",en);class vn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.float32[1*D+0]=nt,D}}vn.prototype.bytesPerElement=4,na("StructArrayLayout1f4",vn);class In extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.uint16[6*D+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Rt,D}}In.prototype.bytesPerElement=12,na("StructArrayLayout1ui2f12",In);class Nn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=4*D;return this.uint32[2*D+0]=nt,this.uint16[Kt+2]=bt,this.uint16[Kt+3]=Rt,D}}Nn.prototype.bytesPerElement=8,na("StructArrayLayout1ul2ui8",Nn);class ii extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.uint16[Rt+0]=nt,this.uint16[Rt+1]=bt,D}}ii.prototype.bytesPerElement=4,na("StructArrayLayout2ui4",ii);class Ui extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint16[1*D+0]=nt,D}}Ui.prototype.bytesPerElement=2,na("StructArrayLayout1ui2",Ui);class pa extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Rt)}emplace(D,nt,bt,Rt,Kt){let Qt=4*D;return this.float32[Qt+0]=nt,this.float32[Qt+1]=bt,this.float32[Qt+2]=Rt,this.float32[Qt+3]=Kt,D}}pa.prototype.bytesPerElement=16,na("StructArrayLayout4f16",pa);class fa extends zt{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}fa.prototype.size=20;class Ta extends je{get(D){return new fa(this,D)}}na("CollisionBoxArray",Ta);class so extends zt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}so.prototype.size=48;class Bo extends Nr{get(D){return new so(this,D)}}na("PlacedSymbolArray",Bo);class So extends zt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}So.prototype.size=64;class ds extends en{get(D){return new So(this,D)}}na("SymbolInstanceArray",ds);class fl extends vn{getoffsetX(D){return this.float32[1*D+0]}}na("GlyphOffsetArray",fl);class vl extends vr{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}na("SymbolLineVertexArray",vl);class Ds extends zt{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]}}Ds.prototype.size=12;class wl extends In{get(D){return new Ds(this,D)}}na("TextAnchorOffsetArray",wl);class Eu extends zt{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]}}Eu.prototype.size=8;class gu extends Nn{get(D){return new Eu(this,D)}}na("FeatureIndexArray",gu);class $s extends Ke{}class Zs extends Ke{}class Yu extends Ke{}class dc extends Fr{}class $c extends un{}class At extends Sn{}class Ut extends Xt{}class ue extends ae{}class Me extends xe{}class Pe extends Ae{}class Ne extends Oe{}class sr extends wr{}class ar extends Or{}class Er extends ii{}let rn=ke([{name:"a_pos",components:2,type:"Int16"}],4),{members:Jr}=rn;class xn{constructor(D=[]){this.segments=D}prepareSegment(D,nt,bt,Rt){let Kt=this.segments[this.segments.length-1];return D>xn.MAX_VERTEX_ARRAY_LENGTH&&w(`Max vertices per segment is ${xn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Kt||Kt.vertexLength+D>xn.MAX_VERTEX_ARRAY_LENGTH||Kt.sortKey!==Rt)&&(Kt={vertexOffset:nt.length,primitiveOffset:bt.length,vertexLength:0,primitiveLength:0},Rt!==void 0&&(Kt.sortKey=Rt),this.segments.push(Kt)),Kt}get(){return this.segments}destroy(){for(let D of this.segments)for(let nt in D.vaos)D.vaos[nt].destroy()}static simpleSegment(D,nt,bt,Rt){return new xn([{vertexOffset:D,primitiveOffset:nt,vertexLength:bt,primitiveLength:Rt,vaos:{},sortKey:0}])}}function zn(G,D){return 256*(G=_(Math.floor(G),0,255))+_(Math.floor(D),0,255)}xn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,na("SegmentVector",xn);let On=ke([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Hi={exports:{}},Vn={exports:{}};Vn.exports=function(G,D){var nt,bt,Rt,Kt,Qt,be,Be,rr;for(bt=G.length-(nt=3&G.length),Rt=D,Qt=3432918353,be=461845907,rr=0;rr>>16)*Qt&65535)<<16)&4294967295)<<15|Be>>>17))*be+(((Be>>>16)*be&65535)<<16)&4294967295)<<13|Rt>>>19))+((5*(Rt>>>16)&65535)<<16)&4294967295))+((58964+(Kt>>>16)&65535)<<16);switch(Be=0,nt){case 3:Be^=(255&G.charCodeAt(rr+2))<<16;case 2:Be^=(255&G.charCodeAt(rr+1))<<8;case 1:Rt^=Be=(65535&(Be=(Be=(65535&(Be^=255&G.charCodeAt(rr)))*Qt+(((Be>>>16)*Qt&65535)<<16)&4294967295)<<15|Be>>>17))*be+(((Be>>>16)*be&65535)<<16)&4294967295}return Rt^=G.length,Rt=2246822507*(65535&(Rt^=Rt>>>16))+((2246822507*(Rt>>>16)&65535)<<16)&4294967295,Rt=3266489909*(65535&(Rt^=Rt>>>13))+((3266489909*(Rt>>>16)&65535)<<16)&4294967295,(Rt^=Rt>>>16)>>>0};var yi=Vn.exports,Si={exports:{}};Si.exports=function(G,D){for(var nt,bt=G.length,Rt=D^bt,Kt=0;bt>=4;)nt=1540483477*(65535&(nt=255&G.charCodeAt(Kt)|(255&G.charCodeAt(++Kt))<<8|(255&G.charCodeAt(++Kt))<<16|(255&G.charCodeAt(++Kt))<<24))+((1540483477*(nt>>>16)&65535)<<16),Rt=1540483477*(65535&Rt)+((1540483477*(Rt>>>16)&65535)<<16)^(nt=1540483477*(65535&(nt^=nt>>>24))+((1540483477*(nt>>>16)&65535)<<16)),bt-=4,++Kt;switch(bt){case 3:Rt^=(255&G.charCodeAt(Kt+2))<<16;case 2:Rt^=(255&G.charCodeAt(Kt+1))<<8;case 1:Rt=1540483477*(65535&(Rt^=255&G.charCodeAt(Kt)))+((1540483477*(Rt>>>16)&65535)<<16)}return Rt=1540483477*(65535&(Rt^=Rt>>>13))+((1540483477*(Rt>>>16)&65535)<<16),(Rt^=Rt>>>15)>>>0};var Ri=yi,Gi=Si.exports;Hi.exports=Ri,Hi.exports.murmur3=Ri,Hi.exports.murmur2=Gi;var Kn=r(Hi.exports);class Ua{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,nt,bt,Rt){this.ids.push(Ha(D)),this.positions.push(nt,bt,Rt)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let nt=Ha(D),bt=0,Rt=this.ids.length-1;for(;bt>1;this.ids[Qt]>=nt?Rt=Qt:bt=Qt+1}let Kt=[];for(;this.ids[bt]===nt;)Kt.push({index:this.positions[3*bt],start:this.positions[3*bt+1],end:this.positions[3*bt+2]}),bt++;return Kt}static serialize(D,nt){let bt=new Float64Array(D.ids),Rt=new Uint32Array(D.positions);return ao(bt,Rt,0,bt.length-1),nt&&nt.push(bt.buffer,Rt.buffer),{ids:bt,positions:Rt}}static deserialize(D){let nt=new Ua;return nt.ids=D.ids,nt.positions=D.positions,nt.indexed=!0,nt}}function Ha(G){let D=+G;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:Kn(String(G))}function ao(G,D,nt,bt){for(;nt>1],Kt=nt-1,Qt=bt+1;for(;;){do Kt++;while(G[Kt]Rt);if(Kt>=Qt)break;Po(G,Kt,Qt),Po(D,3*Kt,3*Qt),Po(D,3*Kt+1,3*Qt+1),Po(D,3*Kt+2,3*Qt+2)}Qt-nt`u_${Rt}`),this.type=bt}setUniform(D,nt,bt){D.set(bt.constantOr(this.value))}getBinding(D,nt,bt){return this.type==="color"?new Go(D,nt):new Wo(D,nt)}}class du{constructor(D,nt){this.uniformNames=nt.map(bt=>`u_${bt}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,nt){this.pixelRatioFrom=nt.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=nt.tlbr,this.patternTo=D.tlbr}setUniform(D,nt,bt,Rt){let Kt=Rt==="u_pattern_to"?this.patternTo:Rt==="u_pattern_from"?this.patternFrom:Rt==="u_pixel_ratio_to"?this.pixelRatioTo:Rt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Kt&&D.set(Kt)}getBinding(D,nt,bt){return bt.substr(0,9)==="u_pattern"?new ol(D,nt):new Wo(D,nt)}}class _o{constructor(D,nt,bt,Rt){this.expression=D,this.type=bt,this.maxValue=0,this.paintVertexAttributes=nt.map(Kt=>({name:`a_${Kt}`,type:"Float32",components:bt==="color"?2:1,offset:0})),this.paintVertexArray=new Rt}populatePaintArray(D,nt,bt,Rt,Kt){let Qt=this.paintVertexArray.length,be=this.expression.evaluate(new Rl(0),nt,{},Rt,[],Kt);this.paintVertexArray.resize(D),this._setPaintValue(Qt,D,be)}updatePaintArray(D,nt,bt,Rt){let Kt=this.expression.evaluate({zoom:0},bt,Rt);this._setPaintValue(D,nt,Kt)}_setPaintValue(D,nt,bt){if(this.type==="color"){let Rt=Tl(bt);for(let Kt=D;Kt`u_${be}_t`),this.type=bt,this.useIntegerZoom=Rt,this.zoom=Kt,this.maxValue=0,this.paintVertexAttributes=nt.map(be=>({name:`a_${be}`,type:"Float32",components:bt==="color"?4:2,offset:0})),this.paintVertexArray=new Qt}populatePaintArray(D,nt,bt,Rt,Kt){let Qt=this.expression.evaluate(new Rl(this.zoom),nt,{},Rt,[],Kt),be=this.expression.evaluate(new Rl(this.zoom+1),nt,{},Rt,[],Kt),Be=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Be,D,Qt,be)}updatePaintArray(D,nt,bt,Rt){let Kt=this.expression.evaluate({zoom:this.zoom},bt,Rt),Qt=this.expression.evaluate({zoom:this.zoom+1},bt,Rt);this._setPaintValue(D,nt,Kt,Qt)}_setPaintValue(D,nt,bt,Rt){if(this.type==="color"){let Kt=Tl(bt),Qt=Tl(Rt);for(let be=D;be`#define HAS_UNIFORM_${Rt}`))}return D}getBinderAttributes(){let D=[];for(let nt in this.binders){let bt=this.binders[nt];if(bt instanceof _o||bt instanceof Gs)for(let Rt=0;Rt!0){this.programConfigurations={};for(let Rt of D)this.programConfigurations[Rt.id]=new uu(Rt,nt,bt);this.needsUpload=!1,this._featureMap=new Ua,this._bufferOffset=0}populatePaintArrays(D,nt,bt,Rt,Kt,Qt){for(let be in this.programConfigurations)this.programConfigurations[be].populatePaintArrays(D,nt,Rt,Kt,Qt);nt.id!==void 0&&this._featureMap.add(nt.id,bt,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,nt,bt,Rt){for(let Kt of bt)this.needsUpload=this.programConfigurations[Kt.id].updatePaintArrays(D,this._featureMap,nt,Kt,Rt)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let nt in this.programConfigurations)this.programConfigurations[nt].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function rh(G,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${D}-`,"").replace(/-/g,"_")]}function jl(G,D,nt){let bt={color:{source:Sn,composite:pa},number:{source:vn,composite:Sn}},Rt=function(Kt){return{"line-pattern":{source:Ut,composite:Ut},"fill-pattern":{source:Ut,composite:Ut},"fill-extrusion-pattern":{source:Ut,composite:Ut}}[Kt]}(G);return Rt&&Rt[nt]||bt[D][nt]}na("ConstantBinder",Ku),na("CrossFadedConstantBinder",du),na("SourceExpressionBinder",_o),na("CrossFadedCompositeBinder",nl),na("CompositeExpressionBinder",Gs),na("ProgramConfiguration",uu,{omit:["_buffers"]}),na("ProgramConfigurationSet",Xl);let ru=8192,wh=Math.pow(2,14)-1,_e=-wh-1;function kr(G){let D=ru/G.extent,nt=G.loadGeometry();for(let bt=0;btQt.x+1||BeQt.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return nt}function Ir(G,D){return{type:G.type,id:G.id,properties:G.properties,geometry:D?kr(G):[]}}function Dn(G,D,nt,bt,Rt){G.emplaceBack(2*D+(bt+1)/2,2*nt+(Rt+1)/2)}class li{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new Zs,this.indexArray=new ar,this.segments=new xn,this.programConfigurations=new Xl(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){let Rt=this.layers[0],Kt=[],Qt=null,be=!1;Rt.type==="circle"&&(Qt=Rt.layout.get("circle-sort-key"),be=!Qt.isConstant());for(let{feature:Be,id:rr,index:xr,sourceLayerIndex:Lr}of D){let Zr=this.layers[0]._featureFilter.needGeometry,ln=Ir(Be,Zr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),ln,bt))continue;let bn=be?Qt.evaluate(ln,{},bt):void 0,Ln={id:rr,properties:Be.properties,type:Be.type,sourceLayerIndex:Lr,index:xr,geometry:Zr?ln.geometry:kr(Be),patterns:{},sortKey:bn};Kt.push(Ln)}be&&Kt.sort((Be,rr)=>Be.sortKey-rr.sortKey);for(let Be of Kt){let{geometry:rr,index:xr,sourceLayerIndex:Lr}=Be,Zr=D[xr].feature;this.addFeature(Be,rr,xr,bt),nt.featureIndex.insert(Zr,rr,xr,Lr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Jr),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,nt,bt,Rt){for(let Kt of nt)for(let Qt of Kt){let be=Qt.x,Be=Qt.y;if(be<0||be>=ru||Be<0||Be>=ru)continue;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),xr=rr.vertexLength;Dn(this.layoutVertexArray,be,Be,-1,-1),Dn(this.layoutVertexArray,be,Be,1,-1),Dn(this.layoutVertexArray,be,Be,1,1),Dn(this.layoutVertexArray,be,Be,-1,1),this.indexArray.emplaceBack(xr,xr+1,xr+2),this.indexArray.emplaceBack(xr,xr+3,xr+2),rr.vertexLength+=4,rr.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,{},Rt)}}function ti(G,D){for(let nt=0;nt1){if($i(G,D))return!0;for(let bt=0;bt1?nt:nt.sub(D)._mult(Rt)._add(D))}function ia(G,D){let nt,bt,Rt,Kt=!1;for(let Qt=0;QtD.y!=Rt.y>D.y&&D.x<(Rt.x-bt.x)*(D.y-bt.y)/(Rt.y-bt.y)+bt.x&&(Kt=!Kt)}return Kt}function Ai(G,D){let nt=!1;for(let bt=0,Rt=G.length-1;btD.y!=Qt.y>D.y&&D.x<(Qt.x-Kt.x)*(D.y-Kt.y)/(Qt.y-Kt.y)+Kt.x&&(nt=!nt)}return nt}function fn(G,D,nt){let bt=nt[0],Rt=nt[2];if(G.xRt.x&&D.x>Rt.x||G.yRt.y&&D.y>Rt.y)return!1;let Kt=R(G,D,nt[0]);return Kt!==R(G,D,nt[1])||Kt!==R(G,D,nt[2])||Kt!==R(G,D,nt[3])}function jn(G,D,nt){let bt=D.paint.get(G).value;return bt.kind==="constant"?bt.value:nt.programConfigurations.get(D.id).getMaxValue(G)}function Bi(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function Ti(G,D,nt,bt,Rt){if(!D[0]&&!D[1])return G;let Kt=o.convert(D)._mult(Rt);nt==="viewport"&&Kt._rotate(-bt);let Qt=[];for(let be=0;beIo(Gn,Ln))}(rr,Be),ln=Lr?xr*be:xr;for(let bn of Rt)for(let Ln of bn){let Gn=Lr?Ln:Io(Ln,Be),Mi=ln,Aa=Ji([],[Ln.x,Ln.y,0,1],Be);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Mi*=Aa[3]/Qt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Mi*=Qt.cameraToCenterDistance/Aa[3]),yn(Zr,Gn,Mi))return!0}return!1}}function Io(G,D){let nt=Ji([],[G.x,G.y,0,1],D);return new o(nt[0]/nt[3],nt[1]/nt[3])}class wo extends li{}let _a;na("HeatmapBucket",wo,{omit:["layers"]});var Fa={get paint(){return _a=_a||new $t({"heatmap-radius":new zs(ut.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zs(ut.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new rs(ut.paint_heatmap["heatmap-intensity"]),"heatmap-color":new qf(ut.paint_heatmap["heatmap-color"]),"heatmap-opacity":new rs(ut.paint_heatmap["heatmap-opacity"])})}};function vo(G,{width:D,height:nt},bt,Rt){if(Rt){if(Rt instanceof Uint8ClampedArray)Rt=new Uint8Array(Rt.buffer);else if(Rt.length!==D*nt*bt)throw new RangeError(`mismatched image size. expected: ${Rt.length} but got: ${D*nt*bt}`)}else Rt=new Uint8Array(D*nt*bt);return G.width=D,G.height=nt,G.data=Rt,G}function Eo(G,{width:D,height:nt},bt){if(D===G.width&&nt===G.height)return;let Rt=vo({},{width:D,height:nt},bt);es(G,Rt,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,D),height:Math.min(G.height,nt)},bt),G.width=D,G.height=nt,G.data=Rt.data}function es(G,D,nt,bt,Rt,Kt){if(Rt.width===0||Rt.height===0)return D;if(Rt.width>G.width||Rt.height>G.height||nt.x>G.width-Rt.width||nt.y>G.height-Rt.height)throw new RangeError("out of range source coordinates for image copy");if(Rt.width>D.width||Rt.height>D.height||bt.x>D.width-Rt.width||bt.y>D.height-Rt.height)throw new RangeError("out of range destination coordinates for image copy");let Qt=G.data,be=D.data;if(Qt===be)throw new Error("srcData equals dstData, so image is already copied");for(let Be=0;Be{D[G.evaluationKey]=Be;let rr=G.expression.evaluate(D);Rt.data[Qt+be+0]=Math.floor(255*rr.r/rr.a),Rt.data[Qt+be+1]=Math.floor(255*rr.g/rr.a),Rt.data[Qt+be+2]=Math.floor(255*rr.b/rr.a),Rt.data[Qt+be+3]=Math.floor(255*rr.a)};if(G.clips)for(let Qt=0,be=0;Qt80*nt){be=1/0,Be=1/0;let xr=-1/0,Lr=-1/0;for(let Zr=nt;Zrxr&&(xr=ln),bn>Lr&&(Lr=bn)}rr=Math.max(xr-be,Lr-Be),rr=rr!==0?32767/rr:0}return sl(Kt,Qt,nt,be,Be,rr,0),Qt}function No(G,D,nt,bt,Rt){let Kt;if(Rt===function(Qt,be,Be,rr){let xr=0;for(let Lr=be,Zr=Be-rr;Lr0)for(let Qt=D;Qt=D;Qt-=bt)Kt=tr(Qt/bt|0,G[Qt],G[Qt+1],Kt);return Kt&&ye(Kt,Kt.next)&&(lr(Kt),Kt=Kt.next),Kt}function Au(G,D){if(!G)return G;D||(D=G);let nt,bt=G;do if(nt=!1,bt.steiner||!ye(bt,bt.next)&&de(bt.prev,bt,bt.next)!==0)bt=bt.next;else{if(lr(bt),bt=D=bt.prev,bt===bt.next)break;nt=!0}while(nt||bt!==D);return D}function sl(G,D,nt,bt,Rt,Kt,Qt){if(!G)return;!Qt&&Kt&&function(Be,rr,xr,Lr){let Zr=Be;do Zr.z===0&&(Zr.z=ot(Zr.x,Zr.y,rr,xr,Lr)),Zr.prevZ=Zr.prev,Zr.nextZ=Zr.next,Zr=Zr.next;while(Zr!==Be);Zr.prevZ.nextZ=null,Zr.prevZ=null,function(ln){let bn,Ln=1;do{let Gn,Mi=ln;ln=null;let Aa=null;for(bn=0;Mi;){bn++;let ra=Mi,ga=0;for(let Ao=0;Ao0||Ya>0&&ra;)ga!==0&&(Ya===0||!ra||Mi.z<=ra.z)?(Gn=Mi,Mi=Mi.nextZ,ga--):(Gn=ra,ra=ra.nextZ,Ya--),Aa?Aa.nextZ=Gn:ln=Gn,Gn.prevZ=Aa,Aa=Gn;Mi=ra}Aa.nextZ=null,Ln*=2}while(bn>1)}(Zr)}(G,bt,Rt,Kt);let be=G;for(;G.prev!==G.next;){let Be=G.prev,rr=G.next;if(Kt?xc(G,bt,Rt,Kt):Lu(G))D.push(Be.i,G.i,rr.i),lr(G),G=rr.next,be=rr.next;else if((G=rr)===be){Qt?Qt===1?sl(G=Co(Au(G),D),D,nt,bt,Rt,Kt,2):Qt===2&&Cs(G,D,nt,bt,Rt,Kt):sl(Au(G),D,nt,bt,Rt,Kt,1);break}}}function Lu(G){let D=G.prev,nt=G,bt=G.next;if(de(D,nt,bt)>=0)return!1;let Rt=D.x,Kt=nt.x,Qt=bt.x,be=D.y,Be=nt.y,rr=bt.y,xr=RtKt?Rt>Qt?Rt:Qt:Kt>Qt?Kt:Qt,ln=be>Be?be>rr?be:rr:Be>rr?Be:rr,bn=bt.next;for(;bn!==D;){if(bn.x>=xr&&bn.x<=Zr&&bn.y>=Lr&&bn.y<=ln&&xt(Rt,be,Kt,Be,Qt,rr,bn.x,bn.y)&&de(bn.prev,bn,bn.next)>=0)return!1;bn=bn.next}return!0}function xc(G,D,nt,bt){let Rt=G.prev,Kt=G,Qt=G.next;if(de(Rt,Kt,Qt)>=0)return!1;let be=Rt.x,Be=Kt.x,rr=Qt.x,xr=Rt.y,Lr=Kt.y,Zr=Qt.y,ln=beBe?be>rr?be:rr:Be>rr?Be:rr,Gn=xr>Lr?xr>Zr?xr:Zr:Lr>Zr?Lr:Zr,Mi=ot(ln,bn,D,nt,bt),Aa=ot(Ln,Gn,D,nt,bt),ra=G.prevZ,ga=G.nextZ;for(;ra&&ra.z>=Mi&&ga&&ga.z<=Aa;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Gn&&ra!==Rt&&ra!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0||(ra=ra.prevZ,ga.x>=ln&&ga.x<=Ln&&ga.y>=bn&&ga.y<=Gn&&ga!==Rt&&ga!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ga.x,ga.y)&&de(ga.prev,ga,ga.next)>=0))return!1;ga=ga.nextZ}for(;ra&&ra.z>=Mi;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Gn&&ra!==Rt&&ra!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0)return!1;ra=ra.prevZ}for(;ga&&ga.z<=Aa;){if(ga.x>=ln&&ga.x<=Ln&&ga.y>=bn&&ga.y<=Gn&&ga!==Rt&&ga!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ga.x,ga.y)&&de(ga.prev,ga,ga.next)>=0)return!1;ga=ga.nextZ}return!0}function Co(G,D){let nt=G;do{let bt=nt.prev,Rt=nt.next.next;!ye(bt,Rt)&&Yt(bt,nt,nt.next,Rt)&&ir(bt,Rt)&&ir(Rt,bt)&&(D.push(bt.i,nt.i,Rt.i),lr(nt),lr(nt.next),nt=G=Rt),nt=nt.next}while(nt!==G);return Au(nt)}function Cs(G,D,nt,bt,Rt,Kt){let Qt=G;do{let be=Qt.next.next;for(;be!==Qt.prev;){if(Qt.i!==be.i&&Vt(Qt,be)){let Be=Ye(Qt,be);return Qt=Au(Qt,Qt.next),Be=Au(Be,Be.next),sl(Qt,D,nt,bt,Rt,Kt,0),void sl(Be,D,nt,bt,Rt,Kt,0)}be=be.next}Qt=Qt.next}while(Qt!==G)}function Ml(G,D){return G.x-D.x}function yl(G,D){let nt=function(Rt,Kt){let Qt=Kt,be=Rt.x,Be=Rt.y,rr,xr=-1/0;do{if(Be<=Qt.y&&Be>=Qt.next.y&&Qt.next.y!==Qt.y){let Ln=Qt.x+(Be-Qt.y)*(Qt.next.x-Qt.x)/(Qt.next.y-Qt.y);if(Ln<=be&&Ln>xr&&(xr=Ln,rr=Qt.x=Qt.x&&Qt.x>=Zr&&be!==Qt.x&&xt(Berr.x||Qt.x===rr.x&&$(rr,Qt)))&&(rr=Qt,bn=Ln)}Qt=Qt.next}while(Qt!==Lr);return rr}(G,D);if(!nt)return D;let bt=Ye(nt,G);return Au(bt,bt.next),Au(nt,nt.next)}function $(G,D){return de(G.prev,G,D.prev)<0&&de(D.next,G,G.next)<0}function ot(G,D,nt,bt,Rt){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-nt)*Rt|0)|G<<8))|G<<4))|G<<2))|G<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-bt)*Rt|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function et(G){let D=G,nt=G;do(D.x=(G-Qt)*(Kt-be)&&(G-Qt)*(bt-be)>=(nt-Qt)*(D-be)&&(nt-Qt)*(Kt-be)>=(Rt-Qt)*(bt-be)}function Vt(G,D){return G.next.i!==D.i&&G.prev.i!==D.i&&!function(nt,bt){let Rt=nt;do{if(Rt.i!==nt.i&&Rt.next.i!==nt.i&&Rt.i!==bt.i&&Rt.next.i!==bt.i&&Yt(Rt,Rt.next,nt,bt))return!0;Rt=Rt.next}while(Rt!==nt);return!1}(G,D)&&(ir(G,D)&&ir(D,G)&&function(nt,bt){let Rt=nt,Kt=!1,Qt=(nt.x+bt.x)/2,be=(nt.y+bt.y)/2;do Rt.y>be!=Rt.next.y>be&&Rt.next.y!==Rt.y&&Qt<(Rt.next.x-Rt.x)*(be-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Kt=!Kt),Rt=Rt.next;while(Rt!==nt);return Kt}(G,D)&&(de(G.prev,G,D.prev)||de(G,D.prev,D))||ye(G,D)&&de(G.prev,G,G.next)>0&&de(D.prev,D,D.next)>0)}function de(G,D,nt){return(D.y-G.y)*(nt.x-D.x)-(D.x-G.x)*(nt.y-D.y)}function ye(G,D){return G.x===D.x&&G.y===D.y}function Yt(G,D,nt,bt){let Rt=Se(de(G,D,nt)),Kt=Se(de(G,D,bt)),Qt=Se(de(nt,bt,G)),be=Se(de(nt,bt,D));return Rt!==Kt&&Qt!==be||!(Rt!==0||!ce(G,nt,D))||!(Kt!==0||!ce(G,bt,D))||!(Qt!==0||!ce(nt,G,bt))||!(be!==0||!ce(nt,D,bt))}function ce(G,D,nt){return D.x<=Math.max(G.x,nt.x)&&D.x>=Math.min(G.x,nt.x)&&D.y<=Math.max(G.y,nt.y)&&D.y>=Math.min(G.y,nt.y)}function Se(G){return G>0?1:G<0?-1:0}function ir(G,D){return de(G.prev,G,G.next)<0?de(G,D,G.next)>=0&&de(G,G.prev,D)>=0:de(G,D,G.prev)<0||de(G,G.next,D)<0}function Ye(G,D){let nt=hr(G.i,G.x,G.y),bt=hr(D.i,D.x,D.y),Rt=G.next,Kt=D.prev;return G.next=D,D.prev=G,nt.next=Rt,Rt.prev=nt,bt.next=nt,nt.prev=bt,Kt.next=bt,bt.prev=Kt,bt}function tr(G,D,nt,bt){let Rt=hr(G,D,nt);return bt?(Rt.next=bt.next,Rt.prev=bt,bt.next.prev=Rt,bt.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function lr(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function hr(G,D,nt){return{i:G,x:D,y:nt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ve(G,D,nt){let bt=nt.patternDependencies,Rt=!1;for(let Kt of D){let Qt=Kt.paint.get(`${G}-pattern`);Qt.isConstant()||(Rt=!0);let be=Qt.constantOr(null);be&&(Rt=!0,bt[be.to]=!0,bt[be.from]=!0)}return Rt}function Xe(G,D,nt,bt,Rt){let Kt=Rt.patternDependencies;for(let Qt of D){let be=Qt.paint.get(`${G}-pattern`).value;if(be.kind!=="constant"){let Be=be.evaluate({zoom:bt-1},nt,{},Rt.availableImages),rr=be.evaluate({zoom:bt},nt,{},Rt.availableImages),xr=be.evaluate({zoom:bt+1},nt,{},Rt.availableImages);Be=Be&&Be.name?Be.name:Be,rr=rr&&rr.name?rr.name:rr,xr=xr&&xr.name?xr.name:xr,Kt[Be]=!0,Kt[rr]=!0,Kt[xr]=!0,nt.patterns[Qt.id]={min:Be,mid:rr,max:xr}}}return nt}class Ze{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yu,this.indexArray=new ar,this.indexArray2=new Er,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.segments2=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("fill",this.layers,nt);let Rt=this.layers[0].layout.get("fill-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Be,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(be,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Rt.evaluate(Zr,{},bt,nt.availableImages):void 0,bn={id:Be,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:kr(be),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((be,Be)=>be.sortKey-Be.sortKey);for(let be of Qt){let{geometry:Be,index:rr,sourceLayerIndex:xr}=be;if(this.hasPattern){let Lr=Xe("fill",this.layers,be,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(be,Be,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Be,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,pu),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,nt,bt,Rt,Kt){for(let Qt of Jc(nt,500)){let be=0;for(let ln of Qt)be+=ln.length;let Be=this.segments.prepareSegment(be,this.layoutVertexArray,this.indexArray),rr=Be.vertexLength,xr=[],Lr=[];for(let ln of Qt){if(ln.length===0)continue;ln!==Qt[0]&&Lr.push(xr.length/2);let bn=this.segments2.prepareSegment(ln.length,this.layoutVertexArray,this.indexArray2),Ln=bn.vertexLength;this.layoutVertexArray.emplaceBack(ln[0].x,ln[0].y),this.indexArray2.emplaceBack(Ln+ln.length-1,Ln),xr.push(ln[0].x),xr.push(ln[0].y);for(let Gn=1;Gn>3}if(Rt--,bt===1||bt===2)Kt+=G.readSVarint(),Qt+=G.readSVarint(),bt===1&&(D&&be.push(D),D=[]),D.push(new ea(Kt,Qt));else{if(bt!==7)throw new Error("unknown command "+bt);D&&D.push(D[0].clone())}}return D&&be.push(D),be},Li.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var D=G.readVarint()+G.pos,nt=1,bt=0,Rt=0,Kt=0,Qt=1/0,be=-1/0,Be=1/0,rr=-1/0;G.pos>3}if(bt--,nt===1||nt===2)(Rt+=G.readSVarint())be&&(be=Rt),(Kt+=G.readSVarint())rr&&(rr=Kt);else if(nt!==7)throw new Error("unknown command "+nt)}return[Qt,Be,be,rr]},Li.prototype.toGeoJSON=function(G,D,nt){var bt,Rt,Kt=this.extent*Math.pow(2,nt),Qt=this.extent*G,be=this.extent*D,Be=this.loadGeometry(),rr=Li.types[this.type];function xr(ln){for(var bn=0;bn>3;Rt=Qt===1?bt.readString():Qt===2?bt.readFloat():Qt===3?bt.readDouble():Qt===4?bt.readVarint64():Qt===5?bt.readVarint():Qt===6?bt.readSVarint():Qt===7?bt.readBoolean():null}return Rt}(nt))}xs.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var D=this._pbf.readVarint()+this._pbf.pos;return new co(this._pbf,D,this.extent,this._keys,this._values)};var Vl=qo;function pl(G,D,nt){if(G===3){var bt=new Vl(nt,nt.readVarint()+nt.pos);bt.length&&(D[bt.name]=bt)}}mi.VectorTile=function(G,D){this.layers=G.readFields(pl,{},D)},mi.VectorTileFeature=Ei,mi.VectorTileLayer=qo;let Hl=mi.VectorTileFeature.types,_c=Math.pow(2,13);function Fs(G,D,nt,bt,Rt,Kt,Qt,be){G.emplaceBack(D,nt,2*Math.floor(bt*_c)+Qt,Rt*_c*2,Kt*_c*2,Math.round(be))}class Mu{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new dc,this.centroidVertexArray=new $s,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.features=[],this.hasPattern=Ve("fill-extrusion",this.layers,nt);for(let{feature:Rt,id:Kt,index:Qt,sourceLayerIndex:be}of D){let Be=this.layers[0]._featureFilter.needGeometry,rr=Ir(Rt,Be);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),rr,bt))continue;let xr={id:Kt,sourceLayerIndex:be,index:Qt,geometry:Be?rr.geometry:kr(Rt),properties:Rt.properties,type:Rt.type,patterns:{}};this.hasPattern?this.features.push(Xe("fill-extrusion",this.layers,xr,this.zoom,nt)):this.addFeature(xr,xr.geometry,Qt,bt,{}),nt.featureIndex.insert(Rt,xr.geometry,Qt,be,this.index,!0)}}addFeatures(D,nt,bt){for(let Rt of this.features){let{geometry:Kt}=Rt;this.addFeature(Rt,Kt,Rt.index,nt,bt)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Ci),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Yn.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,nt,bt,Rt,Kt){for(let Qt of Jc(nt,500)){let be={x:0,y:0,vertexCount:0},Be=0;for(let bn of Qt)Be+=bn.length;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let bn of Qt){if(bn.length===0||If(bn))continue;let Ln=0;for(let Gn=0;Gn=1){let Aa=bn[Gn-1];if(!af(Mi,Aa)){rr.vertexLength+4>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ra=Mi.sub(Aa)._perp()._unit(),ga=Aa.dist(Mi);Ln+ga>32768&&(Ln=0),Fs(this.layoutVertexArray,Mi.x,Mi.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Mi.x,Mi.y,ra.x,ra.y,0,1,Ln),be.x+=2*Mi.x,be.y+=2*Mi.y,be.vertexCount+=2,Ln+=ga,Fs(this.layoutVertexArray,Aa.x,Aa.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Aa.x,Aa.y,ra.x,ra.y,0,1,Ln),be.x+=2*Aa.x,be.y+=2*Aa.y,be.vertexCount+=2;let Ya=rr.vertexLength;this.indexArray.emplaceBack(Ya,Ya+2,Ya+1),this.indexArray.emplaceBack(Ya+1,Ya+2,Ya+3),rr.vertexLength+=4,rr.primitiveLength+=2}}}}if(rr.vertexLength+Be>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(Be,this.layoutVertexArray,this.indexArray)),Hl[D.type]!=="Polygon")continue;let xr=[],Lr=[],Zr=rr.vertexLength;for(let bn of Qt)if(bn.length!==0){bn!==Qt[0]&&Lr.push(xr.length/2);for(let Ln=0;Lnru)||G.y===D.y&&(G.y<0||G.y>ru)}function If(G){return G.every(D=>D.x<0)||G.every(D=>D.x>ru)||G.every(D=>D.y<0)||G.every(D=>D.y>ru)}let jp;na("FillExtrusionBucket",Mu,{omit:["layers","features"]});var b0={get paint(){return jp=jp||new $t({"fill-extrusion-opacity":new rs(ut["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zs(ut["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new rs(ut["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new rs(ut["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qc(ut["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zs(ut["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zs(ut["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new rs(ut["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Tp extends ht{constructor(D){super(D,b0)}createBucket(D){return new Mu(D)}queryRadius(){return Bi(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,nt,bt,Rt,Kt,Qt,be,Be){let rr=Ti(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qt.angle,be),xr=this.paint.get("fill-extrusion-height").evaluate(nt,bt),Lr=this.paint.get("fill-extrusion-base").evaluate(nt,bt),Zr=function(bn,Ln,Gn,Mi){let Aa=[];for(let ra of bn){let ga=[ra.x,ra.y,0,1];Ji(ga,ga,Ln),Aa.push(new o(ga[0]/ga[3],ga[1]/ga[3]))}return Aa}(rr,Be),ln=function(bn,Ln,Gn,Mi){let Aa=[],ra=[],ga=Mi[8]*Ln,Ya=Mi[9]*Ln,Ao=Mi[10]*Ln,Ss=Mi[11]*Ln,Sl=Mi[8]*Gn,_s=Mi[9]*Gn,fs=Mi[10]*Gn,Xs=Mi[11]*Gn;for(let js of bn){let Os=[],uo=[];for(let il of js){let Js=il.x,Zl=il.y,uh=Mi[0]*Js+Mi[4]*Zl+Mi[12],nh=Mi[1]*Js+Mi[5]*Zl+Mi[13],gd=Mi[2]*Js+Mi[6]*Zl+Mi[14],Cp=Mi[3]*Js+Mi[7]*Zl+Mi[15],zf=gd+Ao,td=Cp+Ss,dp=uh+Sl,pp=nh+_s,mp=gd+fs,sf=Cp+Xs,vd=new o((uh+ga)/td,(nh+Ya)/td);vd.z=zf/td,Os.push(vd);let ep=new o(dp/sf,pp/sf);ep.z=mp/sf,uo.push(ep)}Aa.push(Os),ra.push(uo)}return[Aa,ra]}(Rt,Lr,xr,Be);return function(bn,Ln,Gn){let Mi=1/0;ai(Gn,Ln)&&(Mi=R0(Gn,Ln[0]));for(let Aa=0;Aant.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(nt=>{this.gradients[nt.id]={}}),this.layoutVertexArray=new $c,this.layoutVertexArray2=new At,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("line",this.layers,nt);let Rt=this.layers[0].layout.get("line-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Be,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(be,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Rt.evaluate(Zr,{},bt):void 0,bn={id:Be,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:kr(be),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((be,Be)=>be.sortKey-Be.sortKey);for(let be of Qt){let{geometry:Be,index:rr,sourceLayerIndex:xr}=be;if(this.hasPattern){let Lr=Xe("line",this.layers,be,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(be,Be,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Be,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,Q0)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Mp),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,nt,bt,Rt,Kt){let Qt=this.layers[0].layout,be=Qt.get("line-join").evaluate(D,{}),Be=Qt.get("line-cap"),rr=Qt.get("line-miter-limit"),xr=Qt.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Lr of nt)this.addLine(Lr,D,be,Be,rr,xr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,Kt,Rt)}addLine(D,nt,bt,Rt,Kt,Qt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Mi=0;Mi=2&&D[Be-1].equals(D[Be-2]);)Be--;let rr=0;for(;rr0;if(Ss&&Mi>rr){let Xs=Zr.dist(ln);if(Xs>2*xr){let js=Zr.sub(Zr.sub(ln)._mult(xr/Xs)._round());this.updateDistance(ln,js),this.addCurrentVertex(js,Ln,0,0,Lr),ln=js}}let _s=ln&&bn,fs=_s?bt:be?"butt":Rt;if(_s&&fs==="round"&&(YaKt&&(fs="bevel"),fs==="bevel"&&(Ya>2&&(fs="flipbevel"),Ya100)Aa=Gn.mult(-1);else{let Xs=Ya*Ln.add(Gn).mag()/Ln.sub(Gn).mag();Aa._perp()._mult(Xs*(Sl?-1:1))}this.addCurrentVertex(Zr,Aa,0,0,Lr),this.addCurrentVertex(Zr,Aa.mult(-1),0,0,Lr)}else if(fs==="bevel"||fs==="fakeround"){let Xs=-Math.sqrt(Ya*Ya-1),js=Sl?Xs:0,Os=Sl?0:Xs;if(ln&&this.addCurrentVertex(Zr,Ln,js,Os,Lr),fs==="fakeround"){let uo=Math.round(180*Ao/Math.PI/20);for(let il=1;il2*xr){let js=Zr.add(bn.sub(Zr)._mult(xr/Xs)._round());this.updateDistance(Zr,js),this.addCurrentVertex(js,Gn,0,0,Lr),Zr=js}}}}addCurrentVertex(D,nt,bt,Rt,Kt,Qt=!1){let be=nt.y*Rt-nt.x,Be=-nt.y-nt.x*Rt;this.addHalfVertex(D,nt.x+nt.y*bt,nt.y-nt.x*bt,Qt,!1,bt,Kt),this.addHalfVertex(D,be,Be,Qt,!0,-Rt,Kt),this.distance>Ep/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,nt,bt,Rt,Kt,Qt))}addHalfVertex({x:D,y:nt},bt,Rt,Kt,Qt,be,Be){let rr=.5*(this.lineClips?this.scaledDistance*(Ep-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Kt?1:0),(nt<<1)+(Qt?1:0),Math.round(63*bt)+128,Math.round(63*Rt)+128,1+(be===0?0:be<0?-1:1)|(63&rr)<<2,rr>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let xr=Be.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,xr),Be.primitiveLength++),Qt?this.e2=xr:this.e1=xr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,nt){this.distance+=D.dist(nt),this.updateScaledDistance()}}let Gm,Og;na("LineBucket",tp,{omit:["layers","patternFeatures"]});var Ym={get paint(){return Og=Og||new $t({"line-opacity":new zs(ut.paint_line["line-opacity"]),"line-color":new zs(ut.paint_line["line-color"]),"line-translate":new rs(ut.paint_line["line-translate"]),"line-translate-anchor":new rs(ut.paint_line["line-translate-anchor"]),"line-width":new zs(ut.paint_line["line-width"]),"line-gap-width":new zs(ut.paint_line["line-gap-width"]),"line-offset":new zs(ut.paint_line["line-offset"]),"line-blur":new zs(ut.paint_line["line-blur"]),"line-dasharray":new $u(ut.paint_line["line-dasharray"]),"line-pattern":new qc(ut.paint_line["line-pattern"]),"line-gradient":new qf(ut.paint_line["line-gradient"])})},get layout(){return Gm=Gm||new $t({"line-cap":new rs(ut.layout_line["line-cap"]),"line-join":new zs(ut.layout_line["line-join"]),"line-miter-limit":new rs(ut.layout_line["line-miter-limit"]),"line-round-limit":new rs(ut.layout_line["line-round-limit"]),"line-sort-key":new zs(ut.layout_line["line-sort-key"])})}};class dd extends zs{possiblyEvaluate(D,nt){return nt=new Rl(Math.floor(nt.zoom),{now:nt.now,fadeDuration:nt.fadeDuration,zoomHistory:nt.zoomHistory,transition:nt.transition}),super.possiblyEvaluate(D,nt)}evaluate(D,nt,bt,Rt){return nt=M({},nt,{zoom:Math.floor(nt.zoom)}),super.evaluate(D,nt,bt,Rt)}}let wm;class Dg extends ht{constructor(D){super(D,Ym),this.gradientVersion=0,wm||(wm=new dd(Ym.paint.properties["line-width"].specification),wm.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let nt=this.gradientExpression();this.stepInterpolant=!!function(bt){return bt._styleExpression!==void 0}(nt)&&nt._styleExpression.expression instanceof Zn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,nt){super.recalculate(D,nt),this.paint._values["line-floorwidth"]=wm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new tp(D)}queryRadius(D){let nt=D,bt=pd(jn("line-width",this,nt),jn("line-gap-width",this,nt)),Rt=jn("line-offset",this,nt);return bt/2+Math.abs(Rt)+Bi(this.paint.get("line-translate"))}queryIntersectsFeature(D,nt,bt,Rt,Kt,Qt,be){let Be=Ti(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qt.angle,be),rr=be/2*pd(this.paint.get("line-width").evaluate(nt,bt),this.paint.get("line-gap-width").evaluate(nt,bt)),xr=this.paint.get("line-offset").evaluate(nt,bt);return xr&&(Rt=function(Lr,Zr){let ln=[];for(let bn=0;bn=3){for(let Gn=0;Gn0?D+2*G:G}let Km=ke([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Cv=ke([{name:"a_projected_pos",components:3,type:"Float32"}],4);ke([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Lv=ke([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ke([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let B0=ke([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Fg=ke([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function of(G,D,nt){return G.sections.forEach(bt=>{bt.text=function(Rt,Kt,Qt){let be=Kt.layout.get("text-transform").evaluate(Qt,{});return be==="uppercase"?Rt=Rt.toLocaleUpperCase():be==="lowercase"&&(Rt=Rt.toLocaleLowerCase()),Kl.applyArabicShaping&&(Rt=Kl.applyArabicShaping(Rt)),Rt}(bt.text,D,nt)}),G}ke([{name:"triangle",components:3,type:"Uint16"}]),ke([{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"}]),ke([{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"}]),ke([{type:"Float32",name:"offsetX"}]),ke([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ke([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let md={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bc=24,Rg=Pc,Pv=function(G,D,nt,bt,Rt){var Kt,Qt,be=8*Rt-bt-1,Be=(1<>1,xr=-7,Lr=Rt-1,Zr=-1,ln=G[D+Lr];for(Lr+=Zr,Kt=ln&(1<<-xr)-1,ln>>=-xr,xr+=be;xr>0;Kt=256*Kt+G[D+Lr],Lr+=Zr,xr-=8);for(Qt=Kt&(1<<-xr)-1,Kt>>=-xr,xr+=bt;xr>0;Qt=256*Qt+G[D+Lr],Lr+=Zr,xr-=8);if(Kt===0)Kt=1-rr;else{if(Kt===Be)return Qt?NaN:1/0*(ln?-1:1);Qt+=Math.pow(2,bt),Kt-=rr}return(ln?-1:1)*Qt*Math.pow(2,Kt-bt)},wx=function(G,D,nt,bt,Rt,Kt){var Qt,be,Be,rr=8*Kt-Rt-1,xr=(1<>1,Zr=Rt===23?Math.pow(2,-24)-Math.pow(2,-77):0,ln=0,bn=1,Ln=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(be=isNaN(D)?1:0,Qt=xr):(Qt=Math.floor(Math.log(D)/Math.LN2),D*(Be=Math.pow(2,-Qt))<1&&(Qt--,Be*=2),(D+=Qt+Lr>=1?Zr/Be:Zr*Math.pow(2,1-Lr))*Be>=2&&(Qt++,Be/=2),Qt+Lr>=xr?(be=0,Qt=xr):Qt+Lr>=1?(be=(D*Be-1)*Math.pow(2,Rt),Qt+=Lr):(be=D*Math.pow(2,Lr-1)*Math.pow(2,Rt),Qt=0));Rt>=8;G[nt+ln]=255&be,ln+=bn,be/=256,Rt-=8);for(Qt=Qt<0;G[nt+ln]=255&Qt,ln+=bn,Qt/=256,rr-=8);G[nt+ln-bn]|=128*Ln};function Pc(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}Pc.Varint=0,Pc.Fixed64=1,Pc.Bytes=2,Pc.Fixed32=5;var km=4294967296,kx=1/km,Bg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function N0(G){return G.type===Pc.Bytes?G.readVarint()+G.pos:G.pos+1}function xb(G,D,nt){return nt?4294967296*D+(G>>>0):4294967296*(D>>>0)+(G>>>0)}function Iv(G,D,nt){var bt=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));nt.realloc(bt);for(var Rt=nt.pos-1;Rt>=G;Rt--)nt.buf[Rt+bt]=nt.buf[Rt]}function FT(G,D){for(var nt=0;nt>>8,G[nt+2]=D>>>16,G[nt+3]=D>>>24}function O3(G,D){return(G[D]|G[D+1]<<8|G[D+2]<<16)+(G[D+3]<<24)}Pc.prototype={destroy:function(){this.buf=null},readFields:function(G,D,nt){for(nt=nt||this.length;this.pos>3,Kt=this.pos;this.type=7&bt,G(Rt,D,this),this.pos===Kt&&this.skip(bt)}return D},readMessage:function(G,D){return this.readFields(G,D,this.readVarint()+this.pos)},readFixed32:function(){var G=Ax(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=O3(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=Ax(this.buf,this.pos)+Ax(this.buf,this.pos+4)*km;return this.pos+=8,G},readSFixed64:function(){var G=Ax(this.buf,this.pos)+O3(this.buf,this.pos+4)*km;return this.pos+=8,G},readFloat:function(){var G=Pv(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=Pv(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var D,nt,bt=this.buf;return D=127&(nt=bt[this.pos++]),nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<7,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<14,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<21,nt<128?D:function(Rt,Kt,Qt){var be,Be,rr=Qt.buf;if(be=(112&(Be=rr[Qt.pos++]))>>4,Be<128||(be|=(127&(Be=rr[Qt.pos++]))<<3,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<10,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<17,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<24,Be<128)||(be|=(1&(Be=rr[Qt.pos++]))<<31,Be<128))return xb(Rt,be,Kt);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(nt=bt[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,D=this.pos;return this.pos=G,G-D>=12&&Bg?function(nt,bt,Rt){return Bg.decode(nt.subarray(bt,Rt))}(this.buf,D,G):function(nt,bt,Rt){for(var Kt="",Qt=bt;Qt239?4:xr>223?3:xr>191?2:1;if(Qt+Zr>Rt)break;Zr===1?xr<128&&(Lr=xr):Zr===2?(192&(be=nt[Qt+1]))==128&&(Lr=(31&xr)<<6|63&be)<=127&&(Lr=null):Zr===3?(Be=nt[Qt+2],(192&(be=nt[Qt+1]))==128&&(192&Be)==128&&((Lr=(15&xr)<<12|(63&be)<<6|63&Be)<=2047||Lr>=55296&&Lr<=57343)&&(Lr=null)):Zr===4&&(Be=nt[Qt+2],rr=nt[Qt+3],(192&(be=nt[Qt+1]))==128&&(192&Be)==128&&(192&rr)==128&&((Lr=(15&xr)<<18|(63&be)<<12|(63&Be)<<6|63&rr)<=65535||Lr>=1114112)&&(Lr=null)),Lr===null?(Lr=65533,Zr=1):Lr>65535&&(Lr-=65536,Kt+=String.fromCharCode(Lr>>>10&1023|55296),Lr=56320|1023&Lr),Kt+=String.fromCharCode(Lr),Qt+=Zr}return Kt}(this.buf,D,G)},readBytes:function(){var G=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,G);return this.pos=G,D},readPackedVarint:function(G,D){if(this.type!==Pc.Bytes)return G.push(this.readVarint(D));var nt=N0(this);for(G=G||[];this.pos127;);else if(D===Pc.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Pc.Fixed32)this.pos+=4;else{if(D!==Pc.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(G,D){this.writeVarint(G<<3|D)},realloc:function(G){for(var D=this.length||16;D268435455||G<0?function(D,nt){var bt,Rt;if(D>=0?(bt=D%4294967296|0,Rt=D/4294967296|0):(Rt=~(-D/4294967296),4294967295^(bt=~(-D%4294967296))?bt=bt+1|0:(bt=0,Rt=Rt+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");nt.realloc(10),function(Kt,Qt,be){be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,be.buf[be.pos]=127&(Kt>>>=7)}(bt,0,nt),function(Kt,Qt){var be=(7&Kt)<<4;Qt.buf[Qt.pos++]|=be|((Kt>>>=3)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt)))))}(Rt,nt)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var D=this.pos;this.pos=function(bt,Rt,Kt){for(var Qt,be,Be=0;Be55295&&Qt<57344){if(!be){Qt>56319||Be+1===Rt.length?(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189):be=Qt;continue}if(Qt<56320){bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,be=Qt;continue}Qt=be-55296<<10|Qt-56320|65536,be=null}else be&&(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,be=null);Qt<128?bt[Kt++]=Qt:(Qt<2048?bt[Kt++]=Qt>>6|192:(Qt<65536?bt[Kt++]=Qt>>12|224:(bt[Kt++]=Qt>>18|240,bt[Kt++]=Qt>>12&63|128),bt[Kt++]=Qt>>6&63|128),bt[Kt++]=63&Qt|128)}return Kt}(this.buf,G,this.pos);var nt=this.pos-D;nt>=128&&Iv(D,nt,this),this.pos=D-1,this.writeVarint(nt),this.pos+=nt},writeFloat:function(G){this.realloc(4),wx(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),wx(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var D=G.length;this.writeVarint(D),this.realloc(D);for(var nt=0;nt=128&&Iv(nt,bt,this),this.pos=nt-1,this.writeVarint(bt),this.pos+=bt},writeMessage:function(G,D,nt){this.writeTag(G,Pc.Bytes),this.writeRawMessage(D,nt)},writePackedVarint:function(G,D){D.length&&this.writeMessage(G,FT,D)},writePackedSVarint:function(G,D){D.length&&this.writeMessage(G,RT,D)},writePackedBoolean:function(G,D){D.length&&this.writeMessage(G,jT,D)},writePackedFloat:function(G,D){D.length&&this.writeMessage(G,BT,D)},writePackedDouble:function(G,D){D.length&&this.writeMessage(G,NT,D)},writePackedFixed32:function(G,D){D.length&&this.writeMessage(G,UT,D)},writePackedSFixed32:function(G,D){D.length&&this.writeMessage(G,VT,D)},writePackedFixed64:function(G,D){D.length&&this.writeMessage(G,HT,D)},writePackedSFixed64:function(G,D){D.length&&this.writeMessage(G,Tx,D)},writeBytesField:function(G,D){this.writeTag(G,Pc.Bytes),this.writeBytes(D)},writeFixed32Field:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeSFixed64(D)},writeVarintField:function(G,D){this.writeTag(G,Pc.Varint),this.writeVarint(D)},writeSVarintField:function(G,D){this.writeTag(G,Pc.Varint),this.writeSVarint(D)},writeStringField:function(G,D){this.writeTag(G,Pc.Bytes),this.writeString(D)},writeFloatField:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeFloat(D)},writeDoubleField:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeDouble(D)},writeBooleanField:function(G,D){this.writeVarintField(G,!!D)}};var _b=r(Rg);let Mx=3;function WT(G,D,nt){G===1&&nt.readMessage(D3,D)}function D3(G,D,nt){if(G===3){let{id:bt,bitmap:Rt,width:Kt,height:Qt,left:be,top:Be,advance:rr}=nt.readMessage(bb,{});D.push({id:bt,bitmap:new Ul({width:Kt+2*Mx,height:Qt+2*Mx},Rt),metrics:{width:Kt,height:Qt,left:be,top:Be,advance:rr}})}}function bb(G,D,nt){G===1?D.id=nt.readVarint():G===2?D.bitmap=nt.readBytes():G===3?D.width=nt.readVarint():G===4?D.height=nt.readVarint():G===5?D.left=nt.readSVarint():G===6?D.top=nt.readSVarint():G===7&&(D.advance=nt.readVarint())}let wb=Mx;function Sx(G){let D=0,nt=0;for(let Qt of G)D+=Qt.w*Qt.h,nt=Math.max(nt,Qt.w);G.sort((Qt,be)=>be.h-Qt.h);let bt=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),nt),h:1/0}],Rt=0,Kt=0;for(let Qt of G)for(let be=bt.length-1;be>=0;be--){let Be=bt[be];if(!(Qt.w>Be.w||Qt.h>Be.h)){if(Qt.x=Be.x,Qt.y=Be.y,Kt=Math.max(Kt,Qt.y+Qt.h),Rt=Math.max(Rt,Qt.x+Qt.w),Qt.w===Be.w&&Qt.h===Be.h){let rr=bt.pop();be=0&&bt>=D&&Cx[this.text.charCodeAt(bt)];bt--)nt--;this.text=this.text.substring(D,nt),this.sectionIndex=this.sectionIndex.slice(D,nt)}substring(D,nt){let bt=new Dv;return bt.text=this.text.substring(D,nt),bt.sectionIndex=this.sectionIndex.slice(D,nt),bt.sections=this.sections,bt}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,nt)=>Math.max(D,this.sections[nt].scale),0)}addTextSection(D,nt){this.text+=D.text,this.sections.push(Y1.forText(D.scale,D.fontStack||nt));let bt=this.sections.length-1;for(let Rt=0;Rt=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ex(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn){let Ln=Dv.fromFeature(G,Rt),Gn;Lr===t.ah.vertical&&Ln.verticalizePunctuation();let{processBidirectionalText:Mi,processStyledBidirectionalText:Aa}=Kl;if(Mi&&Ln.sections.length===1){Gn=[];let Ya=Mi(Ln.toString(),Ng(Ln,rr,Kt,D,bt,ln));for(let Ao of Ya){let Ss=new Dv;Ss.text=Ao,Ss.sections=Ln.sections;for(let Sl=0;Sl0&&k0>zd&&(zd=k0)}else{let ch=Ss[nc.fontStack],Od=ch&&ch[Zc];if(Od&&Od.rect)Wv=Od.rect,Th=Od.metrics;else{let k0=Ao[nc.fontStack],Hp=k0&&k0[Zc];if(!Hp)continue;Th=Hp.metrics}Gh=(vd-nc.scale)*bc}rp?(Ya.verticalizable=!0,gp.push({glyph:Zc,imageName:j0,x:Zl,y:uh+Gh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:Ic,metrics:Th,rect:Wv}),Zl+=U0*nc.scale+uo):(gp.push({glyph:Zc,imageName:j0,x:Zl,y:uh+Gh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:Ic,metrics:Th,rect:Wv}),Zl+=Th.advance*nc.scale+uo)}gp.length!==0&&(nh=Math.max(Zl-uo,nh),ZT(gp,0,gp.length-1,Cp,zd)),Zl=0;let Vp=fs*vd+zd;$d.lineOffset=Math.max(zd,ep),uh+=Vp,gd=Math.max(Vp,gd),++zf}var td;let dp=uh-Ov,{horizontalAlign:pp,verticalAlign:mp}=Tb(Xs);(function(sf,vd,ep,$d,gp,zd,Vp,kh,nc){let Ic=(vd-ep)*gp,Zc=0;Zc=zd!==Vp?-kh*$d-Ov:(-$d*nc+.5)*Vp;for(let Gh of sf)for(let Th of Gh.positionedGlyphs)Th.x+=Ic,Th.y+=Zc})(Ya.positionedLines,Cp,pp,mp,nh,gd,fs,dp,_s.length),Ya.top+=-mp*dp,Ya.bottom=Ya.top+dp,Ya.left+=-pp*nh,Ya.right=Ya.left+nh}(ga,D,nt,bt,Gn,Qt,be,Be,Lr,rr,Zr,bn),!function(Ya){for(let Ao of Ya)if(Ao.positionedGlyphs.length!==0)return!1;return!0}(ra)&&ga}let Cx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},qT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},$T={40:!0};function Lx(G,D,nt,bt,Rt,Kt){if(D.imageName){let Qt=bt[D.imageName];return Qt?Qt.displaySize[0]*D.scale*bc/Kt+Rt:0}{let Qt=nt[D.fontStack],be=Qt&&Qt[G];return be?be.metrics.advance*D.scale+Rt:0}}function R3(G,D,nt,bt){let Rt=Math.pow(G-D,2);return bt?G=0,rr=0;for(let Lr=0;Lrrr){let xr=Math.ceil(Kt/rr);Rt*=xr/Qt,Qt=xr}return{x1:bt,y1:Rt,x2:bt+Kt,y2:Rt+Qt}}function N3(G,D,nt,bt,Rt,Kt){let Qt=G.image,be;if(Qt.content){let Gn=Qt.content,Mi=Qt.pixelRatio||1;be=[Gn[0]/Mi,Gn[1]/Mi,Qt.displaySize[0]-Gn[2]/Mi,Qt.displaySize[1]-Gn[3]/Mi]}let Be=D.left*Kt,rr=D.right*Kt,xr,Lr,Zr,ln;nt==="width"||nt==="both"?(ln=Rt[0]+Be-bt[3],Lr=Rt[0]+rr+bt[1]):(ln=Rt[0]+(Be+rr-Qt.displaySize[0])/2,Lr=ln+Qt.displaySize[0]);let bn=D.top*Kt,Ln=D.bottom*Kt;return nt==="height"||nt==="both"?(xr=Rt[1]+bn-bt[0],Zr=Rt[1]+Ln+bt[2]):(xr=Rt[1]+(bn+Ln-Qt.displaySize[1])/2,Zr=xr+Qt.displaySize[1]),{image:Qt,top:xr,right:Lr,bottom:Zr,left:ln,collisionPadding:be}}let K1=255,tm=128,Jm=K1*tm;function j3(G,D){let{expression:nt}=D;if(nt.kind==="constant")return{kind:"constant",layoutSize:nt.evaluate(new Rl(G+1))};if(nt.kind==="source")return{kind:"source"};{let{zoomStops:bt,interpolationType:Rt}=nt,Kt=0;for(;KtQt.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ri([]),this.placementViewportMatrix=ri([]);let nt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=j3(this.zoom,nt["text-size"]),this.iconSizeData=j3(this.zoom,nt["icon-size"]);let bt=this.layers[0].layout,Rt=bt.get("symbol-sort-key"),Kt=bt.get("symbol-z-order");this.canOverlap=Ab(bt,"text-overlap","text-allow-overlap")!=="never"||Ab(bt,"icon-overlap","icon-allow-overlap")!=="never"||bt.get("text-ignore-placement")||bt.get("icon-ignore-placement"),this.sortFeaturesByKey=Kt!=="viewport-y"&&!Rt.isConstant(),this.sortFeaturesByY=(Kt==="viewport-y"||Kt==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,bt.get("symbol-placement")==="point"&&(this.writingModes=bt.get("text-writing-mode").map(Qt=>t.ah[Qt])),this.stateDependentLayerIds=this.layers.filter(Qt=>Qt.isStateDependent()).map(Qt=>Qt.id),this.sourceID=D.sourceID}createArrays(){this.text=new pf(new Xl(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new pf(new Xl(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new fl,this.lineVertexArray=new vl,this.symbolInstances=new ds,this.textAnchorOffsets=new wl}calculateGlyphDependencies(D,nt,bt,Rt,Kt){for(let Qt=0;Qt0)&&(Qt.value.kind!=="constant"||Qt.value.value.length>0),xr=Be.value.kind!=="constant"||!!Be.value.value||Object.keys(Be.parameters).length>0,Lr=Kt.get("symbol-sort-key");if(this.features=[],!rr&&!xr)return;let Zr=nt.iconDependencies,ln=nt.glyphDependencies,bn=nt.availableImages,Ln=new Rl(this.zoom);for(let{feature:Gn,id:Mi,index:Aa,sourceLayerIndex:ra}of D){let ga=Rt._featureFilter.needGeometry,Ya=Ir(Gn,ga);if(!Rt._featureFilter.filter(Ln,Ya,bt))continue;let Ao,Ss;if(ga||(Ya.geometry=kr(Gn)),rr){let _s=Rt.getValueAndResolveTokens("text-field",Ya,bt,bn),fs=Tn.factory(_s),Xs=this.hasRTLText=this.hasRTLText||KT(fs);(!Xs||Kl.getRTLTextPluginStatus()==="unavailable"||Xs&&Kl.isParsed())&&(Ao=of(fs,Rt,Ya))}if(xr){let _s=Rt.getValueAndResolveTokens("icon-image",Ya,bt,bn);Ss=_s instanceof Oi?_s:Oi.fromString(_s)}if(!Ao&&!Ss)continue;let Sl=this.sortFeaturesByKey?Lr.evaluate(Ya,{},bt):void 0;if(this.features.push({id:Mi,text:Ao,icon:Ss,index:Aa,sourceLayerIndex:ra,geometry:Ya.geometry,properties:Gn.properties,type:YT[Gn.type],sortKey:Sl}),Ss&&(Zr[Ss.name]=!0),Ao){let _s=Qt.evaluate(Ya,{},bt).join(","),fs=Kt.get("text-rotation-alignment")!=="viewport"&&Kt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(let Xs of Ao.sections)if(Xs.image)Zr[Xs.image.name]=!0;else{let js=gs(Ao.toString()),Os=Xs.fontStack||_s,uo=ln[Os]=ln[Os]||{};this.calculateGlyphDependencies(Xs.text,uo,fs,this.allowVerticalPlacement,js)}}}Kt.get("symbol-placement")==="line"&&(this.features=function(Gn){let Mi={},Aa={},ra=[],ga=0;function Ya(_s){ra.push(Gn[_s]),ga++}function Ao(_s,fs,Xs){let js=Aa[_s];return delete Aa[_s],Aa[fs]=js,ra[js].geometry[0].pop(),ra[js].geometry[0]=ra[js].geometry[0].concat(Xs[0]),js}function Ss(_s,fs,Xs){let js=Mi[fs];return delete Mi[fs],Mi[_s]=js,ra[js].geometry[0].shift(),ra[js].geometry[0]=Xs[0].concat(ra[js].geometry[0]),js}function Sl(_s,fs,Xs){let js=Xs?fs[0][fs[0].length-1]:fs[0][0];return`${_s}:${js.x}:${js.y}`}for(let _s=0;_s_s.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Gn,Mi)=>Gn.sortKey-Mi.sortKey)}update(D,nt,bt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,nt,this.layers,bt),this.icon.programConfigurations.updatePaintArrays(D,nt,this.layers,bt))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,nt){let bt=this.lineVertexArray.length;if(D.segment!==void 0){let Rt=D.dist(nt[D.segment+1]),Kt=D.dist(nt[D.segment]),Qt={};for(let be=D.segment+1;be=0;be--)Qt[be]={x:nt[be].x,y:nt[be].y,tileUnitDistanceFromAnchor:Kt},be>0&&(Kt+=nt[be-1].dist(nt[be]));for(let be=0;be0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,nt){let bt=D.placedSymbolArray.get(nt),Rt=bt.vertexStartIndex+4*bt.numGlyphs;for(let Kt=bt.vertexStartIndex;KtRt[be]-Rt[Be]||Kt[Be]-Kt[be]),Qt}addToSortKeyRanges(D,nt){let bt=this.sortKeyRanges[this.sortKeyRanges.length-1];bt&&bt.sortKey===nt?bt.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:nt,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let nt of this.symbolInstanceIndexes){let bt=this.symbolInstances.get(nt);this.featureSortOrder.push(bt.featureIndex),[bt.rightJustifiedTextSymbolIndex,bt.centerJustifiedTextSymbolIndex,bt.leftJustifiedTextSymbolIndex].forEach((Rt,Kt,Qt)=>{Rt>=0&&Qt.indexOf(Rt)===Kt&&this.addIndicesForPlacedSymbol(this.text,Rt)}),bt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,bt.verticalPlacedTextSymbolIndex),bt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.placedIconSymbolIndex),bt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let X1,J1;na("SymbolBucket",jg,{omit:["layers","collisionBoxArray","features","compareText"]}),jg.MAX_GLYPHS=65535,jg.addDynamicAttributes=Qm;var Sb={get paint(){return J1=J1||new $t({"icon-opacity":new zs(ut.paint_symbol["icon-opacity"]),"icon-color":new zs(ut.paint_symbol["icon-color"]),"icon-halo-color":new zs(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new zs(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zs(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new rs(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new rs(ut.paint_symbol["icon-translate-anchor"]),"text-opacity":new zs(ut.paint_symbol["text-opacity"]),"text-color":new zs(ut.paint_symbol["text-color"],{runtimeType:cr,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new zs(ut.paint_symbol["text-halo-color"]),"text-halo-width":new zs(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new zs(ut.paint_symbol["text-halo-blur"]),"text-translate":new rs(ut.paint_symbol["text-translate"]),"text-translate-anchor":new rs(ut.paint_symbol["text-translate-anchor"])})},get layout(){return X1=X1||new $t({"symbol-placement":new rs(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new rs(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new rs(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zs(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new rs(ut.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new rs(ut.layout_symbol["icon-allow-overlap"]),"icon-overlap":new rs(ut.layout_symbol["icon-overlap"]),"icon-ignore-placement":new rs(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new rs(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new rs(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new zs(ut.layout_symbol["icon-size"]),"icon-text-fit":new rs(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new rs(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new zs(ut.layout_symbol["icon-image"]),"icon-rotate":new zs(ut.layout_symbol["icon-rotate"]),"icon-padding":new zs(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new rs(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new zs(ut.layout_symbol["icon-offset"]),"icon-anchor":new zs(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new rs(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new rs(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new rs(ut.layout_symbol["text-rotation-alignment"]),"text-field":new zs(ut.layout_symbol["text-field"]),"text-font":new zs(ut.layout_symbol["text-font"]),"text-size":new zs(ut.layout_symbol["text-size"]),"text-max-width":new zs(ut.layout_symbol["text-max-width"]),"text-line-height":new rs(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new zs(ut.layout_symbol["text-letter-spacing"]),"text-justify":new zs(ut.layout_symbol["text-justify"]),"text-radial-offset":new zs(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new rs(ut.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zs(ut.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zs(ut.layout_symbol["text-anchor"]),"text-max-angle":new rs(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new rs(ut.layout_symbol["text-writing-mode"]),"text-rotate":new zs(ut.layout_symbol["text-rotate"]),"text-padding":new rs(ut.layout_symbol["text-padding"]),"text-keep-upright":new rs(ut.layout_symbol["text-keep-upright"]),"text-transform":new zs(ut.layout_symbol["text-transform"]),"text-offset":new zs(ut.layout_symbol["text-offset"]),"text-allow-overlap":new rs(ut.layout_symbol["text-allow-overlap"]),"text-overlap":new rs(ut.layout_symbol["text-overlap"]),"text-ignore-placement":new rs(ut.layout_symbol["text-ignore-placement"]),"text-optional":new rs(ut.layout_symbol["text-optional"])})}};class Rv{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:oe,this.defaultValue=D}evaluate(D){if(D.formattedSection){let nt=this.defaultValue.property.overrides;if(nt&&nt.hasOverride(D.formattedSection))return nt.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}na("FormatSectionOverride",Rv,{omit:["defaultValue"]});class zx extends ht{constructor(D){super(D,Sb)}recalculate(D,nt){if(super.recalculate(D,nt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let bt=this.layout.get("text-writing-mode");if(bt){let Rt=[];for(let Kt of bt)Rt.indexOf(Kt)<0&&Rt.push(Kt);this.layout._values["text-writing-mode"]=Rt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,nt,bt,Rt){let Kt=this.layout.get(D).evaluate(nt,{},bt,Rt),Qt=this._unevaluatedLayout._values[D];return Qt.isDataDriven()||Wh(Qt.value)||!Kt?Kt:function(be,Be){return Be.replace(/{([^{}]+)}/g,(rr,xr)=>be&&xr in be?String(be[xr]):"")}(nt.properties,Kt)}createBucket(D){return new jg(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of Sb.paint.overridableProperties){if(!zx.hasPaintOverride(this.layout,D))continue;let nt=this.paint.get(D),bt=new Rv(nt),Rt=new jc(bt,nt.property.specification),Kt=null;Kt=nt.value.kind==="constant"||nt.value.kind==="source"?new Ch("source",Rt):new Mc("composite",Rt,nt.value.zoomStops),this.paint._values[D]=new Du(nt.property,Kt,nt.parameters)}}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!(!this.layout||nt.isDataDriven()||bt.isDataDriven())&&zx.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,nt){let bt=D.get("text-field"),Rt=Sb.paint.properties[nt],Kt=!1,Qt=be=>{for(let Be of be)if(Rt.overrides&&Rt.overrides.hasOverride(Be))return void(Kt=!0)};if(bt.value.kind==="constant"&&bt.value.value instanceof Tn)Qt(bt.value.value.sections);else if(bt.value.kind==="source"){let be=rr=>{Kt||(rr instanceof Wa&&ci(rr.value)===br?Qt(rr.value.sections):rr instanceof kl?Qt(rr.sections):rr.eachChild(be))},Be=bt.value;Be._styleExpression&&be(Be._styleExpression.expression)}return Kt}}let Eb;var U3={get paint(){return Eb=Eb||new $t({"background-color":new rs(ut.paint_background["background-color"]),"background-pattern":new $u(ut.paint_background["background-pattern"]),"background-opacity":new rs(ut.paint_background["background-opacity"])})}};class Q1 extends ht{constructor(D){super(D,U3)}}let Ox;var Cb={get paint(){return Ox=Ox||new $t({"raster-opacity":new rs(ut.paint_raster["raster-opacity"]),"raster-hue-rotate":new rs(ut.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new rs(ut.paint_raster["raster-brightness-min"]),"raster-brightness-max":new rs(ut.paint_raster["raster-brightness-max"]),"raster-saturation":new rs(ut.paint_raster["raster-saturation"]),"raster-contrast":new rs(ut.paint_raster["raster-contrast"]),"raster-resampling":new rs(ut.paint_raster["raster-resampling"]),"raster-fade-duration":new rs(ut.paint_raster["raster-fade-duration"])})}};class XT extends ht{constructor(D){super(D,Cb)}}class V3 extends ht{constructor(D){super(D,{}),this.onAdd=nt=>{this.implementation.onAdd&&this.implementation.onAdd(nt,nt.painter.context.gl)},this.onRemove=nt=>{this.implementation.onRemove&&this.implementation.onRemove(nt,nt.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class ty{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Lb=63710088e-1;class em{constructor(D,nt){if(isNaN(D)||isNaN(nt))throw new Error(`Invalid LngLat object: (${D}, ${nt})`);if(this.lng=+D,this.lat=+nt,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new em(P(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let nt=Math.PI/180,bt=this.lat*nt,Rt=D.lat*nt,Kt=Math.sin(bt)*Math.sin(Rt)+Math.cos(bt)*Math.cos(Rt)*Math.cos((D.lng-this.lng)*nt);return Lb*Math.acos(Math.min(Kt,1))}static convert(D){if(D instanceof em)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new em(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new em(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let H3=2*Math.PI*Lb;function Dx(G){return H3*Math.cos(G*Math.PI/180)}function Fx(G){return(180+G)/360}function W3(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function w0(G,D){return G/Dx(D)}function Pb(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class ey{constructor(D,nt,bt=0){this.x=+D,this.y=+nt,this.z=+bt}static fromLngLat(D,nt=0){let bt=em.convert(D);return new ey(Fx(bt.lng),W3(bt.lat),w0(nt,bt.lat))}toLngLat(){return new em(360*this.x-180,Pb(this.y))}toAltitude(){return this.z*Dx(Pb(this.y))}meterInMercatorCoordinateUnits(){return 1/H3*(D=Pb(this.y),1/Math.cos(D*Math.PI/180));var D}}function q3(G,D,nt){var bt=2*Math.PI*6378137/256/Math.pow(2,nt);return[G*bt-2*Math.PI*6378137/2,D*bt-2*Math.PI*6378137/2]}class Ib{constructor(D,nt,bt){if(!function(Rt,Kt,Qt){return!(Rt<0||Rt>25||Qt<0||Qt>=Math.pow(2,Rt)||Kt<0||Kt>=Math.pow(2,Rt))}(D,nt,bt))throw new Error(`x=${nt}, y=${bt}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=nt,this.y=bt,this.key=Bv(0,D,D,nt,bt)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,nt,bt){let Rt=(Qt=this.y,be=this.z,Be=q3(256*(Kt=this.x),256*(Qt=Math.pow(2,be)-Qt-1),be),rr=q3(256*(Kt+1),256*(Qt+1),be),Be[0]+","+Be[1]+","+rr[0]+","+rr[1]);var Kt,Qt,be,Be,rr;let xr=function(Lr,Zr,ln){let bn,Ln="";for(let Gn=Lr;Gn>0;Gn--)bn=1<1?"@2x":"").replace(/{quadkey}/g,xr).replace(/{bbox-epsg-3857}/g,Rt)}isChildOf(D){let nt=this.z-D.z;return nt>0&&D.x===this.x>>nt&&D.y===this.y>>nt}getTilePoint(D){let nt=Math.pow(2,this.z);return new o((D.x*nt-this.x)*ru,(D.y*nt-this.y)*ru)}toString(){return`${this.z}/${this.x}/${this.y}`}}class $3{constructor(D,nt){this.wrap=D,this.canonical=nt,this.key=Bv(D,nt.z,nt.z,nt.x,nt.y)}}class l0{constructor(D,nt,bt,Rt,Kt){if(D= z; overscaledZ = ${D}; z = ${bt}`);this.overscaledZ=D,this.wrap=nt,this.canonical=new Ib(bt,+Rt,+Kt),this.key=Bv(nt,D,bt,Rt,Kt)}clone(){return new l0(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let nt=this.canonical.z-D;return D>this.canonical.z?new l0(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new l0(D,this.wrap,D,this.canonical.x>>nt,this.canonical.y>>nt)}calculateScaledKey(D,nt){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let bt=this.canonical.z-D;return D>this.canonical.z?Bv(this.wrap*+nt,D,this.canonical.z,this.canonical.x,this.canonical.y):Bv(this.wrap*+nt,D,D,this.canonical.x>>bt,this.canonical.y>>bt)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let nt=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>nt&&D.canonical.y===this.canonical.y>>nt}children(D){if(this.overscaledZ>=D)return[new l0(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let nt=this.canonical.z+1,bt=2*this.canonical.x,Rt=2*this.canonical.y;return[new l0(nt,this.wrap,nt,bt,Rt),new l0(nt,this.wrap,nt,bt+1,Rt),new l0(nt,this.wrap,nt,bt,Rt+1),new l0(nt,this.wrap,nt,bt+1,Rt+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Lr),Lr=this.dim+1||nt<-1||nt>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(nt+1)*this.stride+(D+1)}unpack(D,nt,bt){return D*this.redFactor+nt*this.greenFactor+bt*this.blueFactor-this.baseShift}getPixels(){return new Al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,nt,bt){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Rt=nt*this.dim,Kt=nt*this.dim+this.dim,Qt=bt*this.dim,be=bt*this.dim+this.dim;switch(nt){case-1:Rt=Kt-1;break;case 1:Kt=Rt+1}switch(bt){case-1:Qt=be-1;break;case 1:be=Qt+1}let Be=-nt*this.dim,rr=-bt*this.dim;for(let xr=Qt;xr=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class G3{constructor(D,nt,bt,Rt,Kt){this.type="Feature",this._vectorTileFeature=D,D._z=nt,D._x=bt,D._y=Rt,this.properties=D.properties,this.id=Kt}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let nt in this)nt!=="_geometry"&&nt!=="_vectorTileFeature"&&(D[nt]=this[nt]);return D}}class Y3{constructor(D,nt){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Oa(ru,16,0),this.grid3D=new Oa(ru,16,0),this.featureIndexArray=new gu,this.promoteId=nt}insert(D,nt,bt,Rt,Kt,Qt){let be=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(bt,Rt,Kt);let Be=Qt?this.grid3D:this.grid;for(let rr=0;rr=0&&Lr[3]>=0&&Be.insert(be,Lr[0],Lr[1],Lr[2],Lr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new mi.VectorTile(new _b(this.rawTileData)).layers,this.sourceLayerCoder=new Z3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,nt,bt,Rt){this.loadVTLayers();let Kt=D.params||{},Qt=ru/D.tileSize/D.scale,be=Cf(Kt.filter),Be=D.queryGeometry,rr=D.queryPadding*Qt,xr=zb(Be),Lr=this.grid.query(xr.minX-rr,xr.minY-rr,xr.maxX+rr,xr.maxY+rr),Zr=zb(D.cameraQueryGeometry),ln=this.grid3D.query(Zr.minX-rr,Zr.minY-rr,Zr.maxX+rr,Zr.maxY+rr,(Gn,Mi,Aa,ra)=>function(ga,Ya,Ao,Ss,Sl){for(let fs of ga)if(Ya<=fs.x&&Ao<=fs.y&&Ss>=fs.x&&Sl>=fs.y)return!0;let _s=[new o(Ya,Ao),new o(Ya,Sl),new o(Ss,Sl),new o(Ss,Ao)];if(ga.length>2){for(let fs of _s)if(Ai(ga,fs))return!0}for(let fs=0;fs(ra||(ra=kr(ga)),Ya.queryIntersectsFeature(Be,ga,Ao,ra,this.z,D.transform,Qt,D.pixelPosMatrix)))}return bn}loadMatchingFeature(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr){let Zr=this.bucketLayerIDs[nt];if(Qt&&!function(Gn,Mi){for(let Aa=0;Aa=0)return!0;return!1}(Qt,Zr))return;let ln=this.sourceLayerCoder.decode(bt),bn=this.vtLayers[ln].feature(Rt);if(Kt.needGeometry){let Gn=Ir(bn,!0);if(!Kt.filter(new Rl(this.tileID.overscaledZ),Gn,this.tileID.canonical))return}else if(!Kt.filter(new Rl(this.tileID.overscaledZ),bn))return;let Ln=this.getId(bn,ln);for(let Gn=0;Gn{let be=D instanceof Oh?D.get(Qt):null;return be&&be.evaluate?be.evaluate(nt,bt,Rt):be})}function zb(G){let D=1/0,nt=1/0,bt=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Rt=Math.max(Rt,Kt.y);return{minX:D,minY:nt,maxX:bt,maxY:Rt}}function X3(G,D){return D-G}function J3(G,D,nt,bt,Rt){let Kt=[];for(let Qt=0;Qt=bt&&Lr.x>=bt||(xr.x>=bt?xr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round():Lr.x>=bt&&(Lr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round()),xr.y>=Rt&&Lr.y>=Rt||(xr.y>=Rt?xr=new o(xr.x+(Rt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Rt)._round():Lr.y>=Rt&&(Lr=new o(xr.x+(Rt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Rt)._round()),Be&&xr.equals(Be[Be.length-1])||(Be=[xr],Kt.push(Be)),Be.push(Lr)))))}}return Kt}na("FeatureIndex",Y3,{omit:["rawTileData","sourceLayerCoder"]});class tg extends o{constructor(D,nt,bt,Rt){super(D,nt),this.angle=bt,Rt!==void 0&&(this.segment=Rt)}clone(){return new tg(this.x,this.y,this.angle,this.segment)}}function Q3(G,D,nt,bt,Rt){if(D.segment===void 0||nt===0)return!0;let Kt=D,Qt=D.segment+1,be=0;for(;be>-nt/2;){if(Qt--,Qt<0)return!1;be-=G[Qt].dist(Kt),Kt=G[Qt]}be+=G[Qt].dist(G[Qt+1]),Qt++;let Be=[],rr=0;for(;bebt;)rr-=Be.shift().angleDelta;if(rr>Rt)return!1;Qt++,be+=xr.dist(Lr)}return!0}function t5(G){let D=0;for(let nt=0;ntrr){let bn=(rr-Be)/ln,Ln=Fo.number(Lr.x,Zr.x,bn),Gn=Fo.number(Lr.y,Zr.y,bn),Mi=new tg(Ln,Gn,Zr.angleTo(Lr),xr);return Mi._round(),!Qt||Q3(G,Mi,be,Qt,D)?Mi:void 0}Be+=ln}}function QT(G,D,nt,bt,Rt,Kt,Qt,be,Be){let rr=e5(bt,Kt,Qt),xr=r5(bt,Rt),Lr=xr*Qt,Zr=G[0].x===0||G[0].x===Be||G[0].y===0||G[0].y===Be;return D-Lr=0&&ga=0&&Ya=0&&Zr+rr<=xr){let Ao=new tg(ga,Ya,Aa,bn);Ao._round(),bt&&!Q3(G,Ao,Kt,bt,Rt)||ln.push(Ao)}}Lr+=Mi}return be||ln.length||Qt||(ln=Vg(G,Lr/2,nt,bt,Rt,Kt,Qt,!0,Be)),ln}na("Anchor",tg);let Nv=Qf;function n5(G,D,nt,bt){let Rt=[],Kt=G.image,Qt=Kt.pixelRatio,be=Kt.paddedRect.w-2*Nv,Be=Kt.paddedRect.h-2*Nv,rr={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},xr=Kt.stretchX||[[0,be]],Lr=Kt.stretchY||[[0,Be]],Zr=(uo,il)=>uo+il[1]-il[0],ln=xr.reduce(Zr,0),bn=Lr.reduce(Zr,0),Ln=be-ln,Gn=Be-bn,Mi=0,Aa=ln,ra=0,ga=bn,Ya=0,Ao=Ln,Ss=0,Sl=Gn;if(Kt.content&&bt){let uo=Kt.content,il=uo[2]-uo[0],Js=uo[3]-uo[1];(Kt.textFitWidth||Kt.textFitHeight)&&(rr=B3(G)),Mi=jv(xr,0,uo[0]),ra=jv(Lr,0,uo[1]),Aa=jv(xr,uo[0],uo[2]),ga=jv(Lr,uo[1],uo[3]),Ya=uo[0]-Mi,Ss=uo[1]-ra,Ao=il-Aa,Sl=Js-ga}let _s=rr.x1,fs=rr.y1,Xs=rr.x2-_s,js=rr.y2-fs,Os=(uo,il,Js,Zl)=>{let uh=Up(uo.stretch-Mi,Aa,Xs,_s),nh=Rx(uo.fixed-Ya,Ao,uo.stretch,ln),gd=Up(il.stretch-ra,ga,js,fs),Cp=Rx(il.fixed-Ss,Sl,il.stretch,bn),zf=Up(Js.stretch-Mi,Aa,Xs,_s),td=Rx(Js.fixed-Ya,Ao,Js.stretch,ln),dp=Up(Zl.stretch-ra,ga,js,fs),pp=Rx(Zl.fixed-Ss,Sl,Zl.stretch,bn),mp=new o(uh,gd),sf=new o(zf,gd),vd=new o(zf,dp),ep=new o(uh,dp),$d=new o(nh/Qt,Cp/Qt),gp=new o(td/Qt,pp/Qt),zd=D*Math.PI/180;if(zd){let nc=Math.sin(zd),Ic=Math.cos(zd),Zc=[Ic,-nc,nc,Ic];mp._matMult(Zc),sf._matMult(Zc),ep._matMult(Zc),vd._matMult(Zc)}let Vp=uo.stretch+uo.fixed,kh=il.stretch+il.fixed;return{tl:mp,tr:sf,bl:ep,br:vd,tex:{x:Kt.paddedRect.x+Nv+Vp,y:Kt.paddedRect.y+Nv+kh,w:Js.stretch+Js.fixed-Vp,h:Zl.stretch+Zl.fixed-kh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:$d,pixelOffsetBR:gp,minFontScaleX:Ao/Qt/Xs,minFontScaleY:Sl/Qt/js,isSDF:nt}};if(bt&&(Kt.stretchX||Kt.stretchY)){let uo=Uv(xr,Ln,ln),il=Uv(Lr,Gn,bn);for(let Js=0;Js0&&(Ln=Math.max(10,Ln),this.circleDiameter=Ln)}else{let Zr=!((Lr=Qt.image)===null||Lr===void 0)&&Lr.content&&(Qt.image.textFitWidth||Qt.image.textFitHeight)?B3(Qt):{x1:Qt.left,y1:Qt.top,x2:Qt.right,y2:Qt.bottom};Zr.y1=Zr.y1*be-Be[0],Zr.y2=Zr.y2*be+Be[2],Zr.x1=Zr.x1*be-Be[3],Zr.x2=Zr.x2*be+Be[1];let ln=Qt.collisionPadding;if(ln&&(Zr.x1-=ln[0]*be,Zr.y1-=ln[1]*be,Zr.x2+=ln[2]*be,Zr.y2+=ln[3]*be),xr){let bn=new o(Zr.x1,Zr.y1),Ln=new o(Zr.x2,Zr.y1),Gn=new o(Zr.x1,Zr.y2),Mi=new o(Zr.x2,Zr.y2),Aa=xr*Math.PI/180;bn._rotate(Aa),Ln._rotate(Aa),Gn._rotate(Aa),Mi._rotate(Aa),Zr.x1=Math.min(bn.x,Ln.x,Gn.x,Mi.x),Zr.x2=Math.max(bn.x,Ln.x,Gn.x,Mi.x),Zr.y1=Math.min(bn.y,Ln.y,Gn.y,Mi.y),Zr.y2=Math.max(bn.y,Ln.y,Gn.y,Mi.y)}D.emplaceBack(nt.x,nt.y,Zr.x1,Zr.y1,Zr.x2,Zr.y2,bt,Rt,Kt)}this.boxEndIndex=D.length}}class t8{constructor(D=[],nt=(bt,Rt)=>btRt?1:0){if(this.data=D,this.length=this.data.length,this.compare=nt,this.length>0)for(let bt=(this.length>>1)-1;bt>=0;bt--)this._down(bt)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],nt=this.data.pop();return--this.length>0&&(this.data[0]=nt,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:nt,compare:bt}=this,Rt=nt[D];for(;D>0;){let Kt=D-1>>1,Qt=nt[Kt];if(bt(Rt,Qt)>=0)break;nt[D]=Qt,D=Kt}nt[D]=Rt}_down(D){let{data:nt,compare:bt}=this,Rt=this.length>>1,Kt=nt[D];for(;D=0)break;nt[D]=nt[Qt],D=Qt}nt[D]=Kt}}function e8(G,D=1,nt=!1){let bt=1/0,Rt=1/0,Kt=-1/0,Qt=-1/0,be=G[0];for(let ln=0;lnKt)&&(Kt=bn.x),(!ln||bn.y>Qt)&&(Qt=bn.y)}let Be=Math.min(Kt-bt,Qt-Rt),rr=Be/2,xr=new t8([],r8);if(Be===0)return new o(bt,Rt);for(let ln=bt;lnLr.d||!Lr.d)&&(Lr=ln,nt&&console.log("found best %d after %d probes",Math.round(1e4*ln.d)/1e4,Zr)),ln.max-Lr.d<=D||(rr=ln.h/2,xr.push(new rm(ln.p.x-rr,ln.p.y-rr,rr,G)),xr.push(new rm(ln.p.x+rr,ln.p.y-rr,rr,G)),xr.push(new rm(ln.p.x-rr,ln.p.y+rr,rr,G)),xr.push(new rm(ln.p.x+rr,ln.p.y+rr,rr,G)),Zr+=4)}return nt&&(console.log(`num probes: ${Zr}`),console.log(`best distance: ${Lr.d}`)),Lr.p}function r8(G,D){return D.max-G.max}function rm(G,D,nt,bt){this.p=new o(G,D),this.h=nt,this.d=function(Rt,Kt){let Qt=!1,be=1/0;for(let Be=0;BeRt.y!=bn.y>Rt.y&&Rt.x<(bn.x-ln.x)*(Rt.y-ln.y)/(bn.y-ln.y)+ln.x&&(Qt=!Qt),be=Math.min(be,Na(Rt,ln,bn))}}return(Qt?1:-1)*Math.sqrt(be)}(this.p,bt),this.max=this.d+this.h*Math.SQRT2}var Id;t.aq=void 0,(Id=t.aq||(t.aq={}))[Id.center=1]="center",Id[Id.left=2]="left",Id[Id.right=3]="right",Id[Id.top=4]="top",Id[Id.bottom=5]="bottom",Id[Id["top-left"]=6]="top-left",Id[Id["top-right"]=7]="top-right",Id[Id["bottom-left"]=8]="bottom-left",Id[Id["bottom-right"]=9]="bottom-right";let eg=7,Ob=Number.POSITIVE_INFINITY;function i5(G,D){return D[1]!==Ob?function(nt,bt,Rt){let Kt=0,Qt=0;switch(bt=Math.abs(bt),Rt=Math.abs(Rt),nt){case"top-right":case"top-left":case"top":Qt=Rt-eg;break;case"bottom-right":case"bottom-left":case"bottom":Qt=-Rt+eg}switch(nt){case"top-right":case"bottom-right":case"right":Kt=-bt;break;case"top-left":case"bottom-left":case"left":Kt=bt}return[Kt,Qt]}(G,D[0],D[1]):function(nt,bt){let Rt=0,Kt=0;bt<0&&(bt=0);let Qt=bt/Math.SQRT2;switch(nt){case"top-right":case"top-left":Kt=Qt-eg;break;case"bottom-right":case"bottom-left":Kt=-Qt+eg;break;case"bottom":Kt=-bt+eg;break;case"top":Kt=bt-eg}switch(nt){case"top-right":case"bottom-right":Rt=-Qt;break;case"top-left":case"bottom-left":Rt=Qt;break;case"left":Rt=bt;break;case"right":Rt=-bt}return[Rt,Kt]}(G,D[0])}function a5(G,D,nt){var bt;let Rt=G.layout,Kt=(bt=Rt.get("text-variable-anchor-offset"))===null||bt===void 0?void 0:bt.evaluate(D,{},nt);if(Kt){let be=Kt.values,Be=[];for(let rr=0;rrZr*bc);xr.startsWith("top")?Lr[1]-=eg:xr.startsWith("bottom")&&(Lr[1]+=eg),Be[rr+1]=Lr}return new ki(Be)}let Qt=Rt.get("text-variable-anchor");if(Qt){let be;be=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Rt.get("text-radial-offset").evaluate(D,{},nt)*bc,Ob]:Rt.get("text-offset").evaluate(D,{},nt).map(rr=>rr*bc);let Be=[];for(let rr of Qt)Be.push(rr,i5(rr,be));return new ki(Be)}return null}function Db(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function n8(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=Kt.textMaxSize.evaluate(D,{});Lr===void 0&&(Lr=Qt);let Zr=G.layers[0].layout,ln=Zr.get("icon-offset").evaluate(D,{},xr),bn=s5(nt.horizontal),Ln=Qt/24,Gn=G.tilePixelRatio*Ln,Mi=G.tilePixelRatio*Lr/24,Aa=G.tilePixelRatio*be,ra=G.tilePixelRatio*Zr.get("symbol-spacing"),ga=Zr.get("text-padding")*G.tilePixelRatio,Ya=function(uo,il,Js,Zl=1){let uh=uo.get("icon-padding").evaluate(il,{},Js),nh=uh&&uh.values;return[nh[0]*Zl,nh[1]*Zl,nh[2]*Zl,nh[3]*Zl]}(Zr,D,xr,G.tilePixelRatio),Ao=Zr.get("text-max-angle")/180*Math.PI,Ss=Zr.get("text-rotation-alignment")!=="viewport"&&Zr.get("symbol-placement")!=="point",Sl=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",_s=Zr.get("symbol-placement"),fs=ra/2,Xs=Zr.get("icon-text-fit"),js;bt&&Xs!=="none"&&(G.allowVerticalPlacement&&nt.vertical&&(js=N3(bt,nt.vertical,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)),bn&&(bt=N3(bt,bn,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)));let Os=(uo,il)=>{il.x<0||il.x>=ru||il.y<0||il.y>=ru||function(Js,Zl,uh,nh,gd,Cp,zf,td,dp,pp,mp,sf,vd,ep,$d,gp,zd,Vp,kh,nc,Ic,Zc,Gh,Th,Wv){let j0=Js.addToLineVertexArray(Zl,uh),U0,rp,ch,Od,k0=0,Hp=0,vp=0,Ub=0,Vb=-1,Vx=-1,Am={},Hb=Kn("");if(Js.allowVerticalPlacement&&nh.vertical){let Zd=td.layout.get("text-rotate").evaluate(Ic,{},Th)+90;ch=new Bx(dp,Zl,pp,mp,sf,nh.vertical,vd,ep,$d,Zd),zf&&(Od=new Bx(dp,Zl,pp,mp,sf,zf,zd,Vp,$d,Zd))}if(gd){let Zd=td.layout.get("icon-rotate").evaluate(Ic,{}),Wp=td.layout.get("icon-text-fit")!=="none",rg=n5(gd,Zd,Gh,Wp),V0=zf?n5(zf,Zd,Gh,Wp):void 0;rp=new Bx(dp,Zl,pp,mp,sf,gd,zd,Vp,!1,Zd),k0=4*rg.length;let Hg=Js.iconSizeData,H0=null;Hg.kind==="source"?(H0=[tm*td.layout.get("icon-size").evaluate(Ic,{})],H0[0]>Jm&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)):Hg.kind==="composite"&&(H0=[tm*Zc.compositeIconSizes[0].evaluate(Ic,{},Th),tm*Zc.compositeIconSizes[1].evaluate(Ic,{},Th)],(H0[0]>Jm||H0[1]>Jm)&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)),Js.addSymbols(Js.icon,rg,H0,nc,kh,Ic,t.ah.none,Zl,j0.lineStartIndex,j0.lineLength,-1,Th),Vb=Js.icon.placedSymbolArray.length-1,V0&&(Hp=4*V0.length,Js.addSymbols(Js.icon,V0,H0,nc,kh,Ic,t.ah.vertical,Zl,j0.lineStartIndex,j0.lineLength,-1,Th),Vx=Js.icon.placedSymbolArray.length-1)}let Wb=Object.keys(nh.horizontal);for(let Zd of Wb){let Wp=nh.horizontal[Zd];if(!U0){Hb=Kn(Wp.text);let V0=td.layout.get("text-rotate").evaluate(Ic,{},Th);U0=new Bx(dp,Zl,pp,mp,sf,Wp,vd,ep,$d,V0)}let rg=Wp.positionedLines.length===1;if(vp+=o5(Js,Zl,Wp,Cp,td,$d,Ic,gp,j0,nh.vertical?t.ah.horizontal:t.ah.horizontalOnly,rg?Wb:[Zd],Am,Vb,Zc,Th),rg)break}nh.vertical&&(Ub+=o5(Js,Zl,nh.vertical,Cp,td,$d,Ic,gp,j0,t.ah.vertical,["vertical"],Am,Vx,Zc,Th));let qb=U0?U0.boxStartIndex:Js.collisionBoxArray.length,$b=U0?U0.boxEndIndex:Js.collisionBoxArray.length,i8=ch?ch.boxStartIndex:Js.collisionBoxArray.length,a8=ch?ch.boxEndIndex:Js.collisionBoxArray.length,o8=rp?rp.boxStartIndex:Js.collisionBoxArray.length,s8=rp?rp.boxEndIndex:Js.collisionBoxArray.length,f5=Od?Od.boxStartIndex:Js.collisionBoxArray.length,qv=Od?Od.boxEndIndex:Js.collisionBoxArray.length,ed=-1,$v=(Zd,Wp)=>Zd&&Zd.circleDiameter?Math.max(Zd.circleDiameter,Wp):Wp;ed=$v(U0,ed),ed=$v(ch,ed),ed=$v(rp,ed),ed=$v(Od,ed);let Zb=ed>-1?1:0;Zb&&(ed*=Wv/bc),Js.glyphOffsetArray.length>=jg.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ic.sortKey!==void 0&&Js.addToSortKeyRanges(Js.symbolInstances.length,Ic.sortKey);let d5=a5(td,Ic,Th),[l8,p5]=function(Zd,Wp){let rg=Zd.length,V0=Wp?.values;if(V0?.length>0)for(let Hg=0;Hg=0?Am.right:-1,Am.center>=0?Am.center:-1,Am.left>=0?Am.left:-1,Am.vertical||-1,Vb,Vx,Hb,qb,$b,i8,a8,o8,s8,f5,qv,pp,vp,Ub,k0,Hp,Zb,0,vd,ed,l8,p5)}(G,il,uo,nt,bt,Rt,js,G.layers[0],G.collisionBoxArray,D.index,D.sourceLayerIndex,G.index,Gn,[ga,ga,ga,ga],Ss,Be,Aa,Ya,Sl,ln,D,Kt,rr,xr,Qt)};if(_s==="line")for(let uo of J3(D.geometry,0,0,ru,ru)){let il=QT(uo,ra,Ao,nt.vertical||bn,bt,24,Mi,G.overscaling,ru);for(let Js of il)bn&&l5(G,bn.text,fs,Js)||Os(uo,Js)}else if(_s==="line-center"){for(let uo of D.geometry)if(uo.length>1){let il=JT(uo,Ao,nt.vertical||bn,bt,24,Mi);il&&Os(uo,il)}}else if(D.type==="Polygon")for(let uo of Jc(D.geometry,0)){let il=e8(uo,16);Os(uo[0],new tg(il.x,il.y,0))}else if(D.type==="LineString")for(let uo of D.geometry)Os(uo,new tg(uo[0].x,uo[0].y,0));else if(D.type==="Point")for(let uo of D.geometry)for(let il of uo)Os([il],new tg(il.x,il.y,0))}function o5(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn){let Ln=function(Aa,ra,ga,Ya,Ao,Ss,Sl,_s){let fs=Ya.layout.get("text-rotate").evaluate(Ss,{})*Math.PI/180,Xs=[];for(let js of ra.positionedLines)for(let Os of js.positionedGlyphs){if(!Os.rect)continue;let uo=Os.rect||{},il=wb+1,Js=!0,Zl=1,uh=0,nh=(Ao||_s)&&Os.vertical,gd=Os.metrics.advance*Os.scale/2;if(_s&&ra.verticalizable&&(uh=js.lineOffset/2-(Os.imageName?-(bc-Os.metrics.width*Os.scale)/2:(Os.scale-1)*bc)),Os.imageName){let nc=Sl[Os.imageName];Js=nc.sdf,Zl=nc.pixelRatio,il=Qf/Zl}let Cp=Ao?[Os.x+gd,Os.y]:[0,0],zf=Ao?[0,0]:[Os.x+gd+ga[0],Os.y+ga[1]-uh],td=[0,0];nh&&(td=zf,zf=[0,0]);let dp=Os.metrics.isDoubleResolution?2:1,pp=(Os.metrics.left-il)*Os.scale-gd+zf[0],mp=(-Os.metrics.top-il)*Os.scale+zf[1],sf=pp+uo.w/dp*Os.scale/Zl,vd=mp+uo.h/dp*Os.scale/Zl,ep=new o(pp,mp),$d=new o(sf,mp),gp=new o(pp,vd),zd=new o(sf,vd);if(nh){let nc=new o(-gd,gd-Ov),Ic=-Math.PI/2,Zc=bc/2-gd,Gh=new o(5-Ov-Zc,-(Os.imageName?Zc:0)),Th=new o(...td);ep._rotateAround(Ic,nc)._add(Gh)._add(Th),$d._rotateAround(Ic,nc)._add(Gh)._add(Th),gp._rotateAround(Ic,nc)._add(Gh)._add(Th),zd._rotateAround(Ic,nc)._add(Gh)._add(Th)}if(fs){let nc=Math.sin(fs),Ic=Math.cos(fs),Zc=[Ic,-nc,nc,Ic];ep._matMult(Zc),$d._matMult(Zc),gp._matMult(Zc),zd._matMult(Zc)}let Vp=new o(0,0),kh=new o(0,0);Xs.push({tl:ep,tr:$d,bl:gp,br:zd,tex:uo,writingMode:ra.writingMode,glyphOffset:Cp,sectionIndex:Os.sectionIndex,isSDF:Js,pixelOffsetTL:Vp,pixelOffsetBR:kh,minFontScaleX:0,minFontScaleY:0})}return Xs}(0,nt,be,Rt,Kt,Qt,bt,G.allowVerticalPlacement),Gn=G.textSizeData,Mi=null;Gn.kind==="source"?(Mi=[tm*Rt.layout.get("text-size").evaluate(Qt,{})],Mi[0]>Jm&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)):Gn.kind==="composite"&&(Mi=[tm*ln.compositeTextSizes[0].evaluate(Qt,{},bn),tm*ln.compositeTextSizes[1].evaluate(Qt,{},bn)],(Mi[0]>Jm||Mi[1]>Jm)&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)),G.addSymbols(G.text,Ln,Mi,be,Kt,Qt,rr,D,Be.lineStartIndex,Be.lineLength,Zr,bn);for(let Aa of xr)Lr[Aa]=G.text.placedSymbolArray.length-1;return 4*Ln.length}function s5(G){for(let D in G)return G[D];return null}function l5(G,D,nt,bt){let Rt=G.compareText;if(D in Rt){let Kt=Rt[D];for(let Qt=Kt.length-1;Qt>=0;Qt--)if(bt.dist(Kt[Qt])>4;if(Rt!==1)throw new Error(`Got v${Rt} data when expected v1.`);let Kt=u5[15&bt];if(!Kt)throw new Error("Unrecognized array type.");let[Qt]=new Uint16Array(D,2,1),[be]=new Uint32Array(D,4,1);return new Fb(be,Qt,Kt,D)}constructor(D,nt=64,bt=Float64Array,Rt){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+nt,2),65535),this.ArrayType=bt,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Kt=u5.indexOf(this.ArrayType),Qt=2*D*this.ArrayType.BYTES_PER_ELEMENT,be=D*this.IndexArrayType.BYTES_PER_ELEMENT,Be=(8-be%8)%8;if(Kt<0)throw new Error(`Unexpected typed array class: ${bt}.`);Rt&&Rt instanceof ArrayBuffer?(this.data=Rt,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Be,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Qt+be+Be),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Be,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Kt]),new Uint16Array(this.data,2,1)[0]=nt,new Uint32Array(this.data,4,1)[0]=D)}add(D,nt){let bt=this._pos>>1;return this.ids[bt]=bt,this.coords[this._pos++]=D,this.coords[this._pos++]=nt,bt}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Rb(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,nt,bt,Rt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Kt,coords:Qt,nodeSize:be}=this,Be=[0,Kt.length-1,0],rr=[];for(;Be.length;){let xr=Be.pop()||0,Lr=Be.pop()||0,Zr=Be.pop()||0;if(Lr-Zr<=be){for(let Gn=Zr;Gn<=Lr;Gn++){let Mi=Qt[2*Gn],Aa=Qt[2*Gn+1];Mi>=D&&Mi<=bt&&Aa>=nt&&Aa<=Rt&&rr.push(Kt[Gn])}continue}let ln=Zr+Lr>>1,bn=Qt[2*ln],Ln=Qt[2*ln+1];bn>=D&&bn<=bt&&Ln>=nt&&Ln<=Rt&&rr.push(Kt[ln]),(xr===0?D<=bn:nt<=Ln)&&(Be.push(Zr),Be.push(ln-1),Be.push(1-xr)),(xr===0?bt>=bn:Rt>=Ln)&&(Be.push(ln+1),Be.push(Lr),Be.push(1-xr))}return rr}within(D,nt,bt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Rt,coords:Kt,nodeSize:Qt}=this,be=[0,Rt.length-1,0],Be=[],rr=bt*bt;for(;be.length;){let xr=be.pop()||0,Lr=be.pop()||0,Zr=be.pop()||0;if(Lr-Zr<=Qt){for(let Gn=Zr;Gn<=Lr;Gn++)qd(Kt[2*Gn],Kt[2*Gn+1],D,nt)<=rr&&Be.push(Rt[Gn]);continue}let ln=Zr+Lr>>1,bn=Kt[2*ln],Ln=Kt[2*ln+1];qd(bn,Ln,D,nt)<=rr&&Be.push(Rt[ln]),(xr===0?D-bt<=bn:nt-bt<=Ln)&&(be.push(Zr),be.push(ln-1),be.push(1-xr)),(xr===0?D+bt>=bn:nt+bt>=Ln)&&(be.push(ln+1),be.push(Lr),be.push(1-xr))}return Be}}function Rb(G,D,nt,bt,Rt,Kt){if(Rt-bt<=nt)return;let Qt=bt+Rt>>1;c5(G,D,Qt,bt,Rt,Kt),Rb(G,D,nt,bt,Qt-1,1-Kt),Rb(G,D,nt,Qt+1,Rt,1-Kt)}function c5(G,D,nt,bt,Rt,Kt){for(;Rt>bt;){if(Rt-bt>600){let rr=Rt-bt+1,xr=nt-bt+1,Lr=Math.log(rr),Zr=.5*Math.exp(2*Lr/3),ln=.5*Math.sqrt(Lr*Zr*(rr-Zr)/rr)*(xr-rr/2<0?-1:1);c5(G,D,nt,Math.max(bt,Math.floor(nt-xr*Zr/rr+ln)),Math.min(Rt,Math.floor(nt+(rr-xr)*Zr/rr+ln)),Kt)}let Qt=D[2*nt+Kt],be=bt,Be=Rt;for(Vv(G,D,bt,nt),D[2*Rt+Kt]>Qt&&Vv(G,D,bt,Rt);beQt;)Be--}D[2*bt+Kt]===Qt?Vv(G,D,bt,Be):(Be++,Vv(G,D,Be,Rt)),Be<=nt&&(bt=Be+1),nt<=Be&&(Rt=Be-1)}}function Vv(G,D,nt,bt){Nx(G,nt,bt),Nx(D,2*nt,2*bt),Nx(D,2*nt+1,2*bt+1)}function Nx(G,D,nt){let bt=G[D];G[D]=G[nt],G[nt]=bt}function qd(G,D,nt,bt){let Rt=G-nt,Kt=D-bt;return Rt*Rt+Kt*Kt}var Bb;t.bg=void 0,(Bb=t.bg||(t.bg={})).create="create",Bb.load="load",Bb.fullLoad="fullLoad";let jx=null,Hv=[],Nb=1e3/60,Ux="loadTime",jb="fullLoadTime",h5={mark(G){performance.mark(G)},frame(G){let D=G;jx!=null&&Hv.push(D-jx),jx=D},clearMetrics(){jx=null,Hv=[],performance.clearMeasures(Ux),performance.clearMeasures(jb);for(let G in t.bg)performance.clearMarks(t.bg[G])},getPerformanceMetrics(){performance.measure(Ux,t.bg.create,t.bg.load),performance.measure(jb,t.bg.create,t.bg.fullLoad);let G=performance.getEntriesByName(Ux)[0].duration,D=performance.getEntriesByName(jb)[0].duration,nt=Hv.length,bt=1/(Hv.reduce((Kt,Qt)=>Kt+Qt,0)/nt/1e3),Rt=Hv.filter(Kt=>Kt>Nb).reduce((Kt,Qt)=>Kt+(Qt-Nb)/Nb,0);return{loadTime:G,fullLoadTime:D,fps:bt,percentDroppedFrames:Rt/(nt+Rt)*100,totalFrames:nt}}};t.$=class extends Dr{},t.A=xi,t.B=va,t.C=function(G){if(j==null){let D=G.navigator?G.navigator.userAgent:null;j=!!G.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return j},t.D=rs,t.E=ft,t.F=class{constructor(G,D){this.target=G,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ty(()=>this.process()),this.subscription=function(nt,bt,Rt,Kt){return nt.addEventListener(bt,Rt,!1),{unsubscribe:()=>{nt.removeEventListener(bt,Rt,!1)}}}(this.target,"message",nt=>this.receive(nt)),this.globalScope=O(self)?G:window}registerMessageHandler(G,D){this.messageHandlers[G]=D}sendAsync(G,D){return new Promise((nt,bt)=>{let Rt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Rt]={resolve:nt,reject:bt},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Rt];let be={id:Rt,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(be)},{once:!0});let Kt=[],Qt=Object.assign(Object.assign({},G),{id:Rt,sourceMapId:this.mapId,origin:location.origin,data:ls(G.data,Kt)});this.target.postMessage(Qt,{transfer:Kt})})}receive(G){let D=G.data,nt=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[nt];let bt=this.abortControllers[nt];return delete this.abortControllers[nt],void(bt&&bt.abort())}if(O(self)||D.mustQueue)return this.tasks[nt]=D,this.taskQueue.push(nt),void this.invoker.trigger();this.processTask(nt,D)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),D=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(G,D)}processTask(G,D){return e(this,void 0,void 0,function*(){if(D.type===""){let Rt=this.resolveRejects[G];return delete this.resolveRejects[G],Rt?void(D.error?Rt.reject(ps(D.error)):Rt.resolve(ps(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let nt=ps(D.data),bt=new AbortController;this.abortControllers[G]=bt;try{let Rt=yield this.messageHandlers[D.type](D.sourceMapId,nt,bt);this.completeTask(G,null,Rt)}catch(Rt){this.completeTask(G,Rt)}})}completeTask(G,D,nt){let bt=[];delete this.abortControllers[G];let Rt={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?ls(D):null,data:ls(nt,bt)};this.target.postMessage(Rt,{transfer:bt})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=mt,t.H=function(){var G=new xi(16);return xi!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},t.I=Wd,t.J=function(G,D,nt){var bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln=nt[0],Gn=nt[1],Mi=nt[2];return D===G?(G[12]=D[0]*Ln+D[4]*Gn+D[8]*Mi+D[12],G[13]=D[1]*Ln+D[5]*Gn+D[9]*Mi+D[13],G[14]=D[2]*Ln+D[6]*Gn+D[10]*Mi+D[14],G[15]=D[3]*Ln+D[7]*Gn+D[11]*Mi+D[15]):(Rt=D[1],Kt=D[2],Qt=D[3],be=D[4],Be=D[5],rr=D[6],xr=D[7],Lr=D[8],Zr=D[9],ln=D[10],bn=D[11],G[0]=bt=D[0],G[1]=Rt,G[2]=Kt,G[3]=Qt,G[4]=be,G[5]=Be,G[6]=rr,G[7]=xr,G[8]=Lr,G[9]=Zr,G[10]=ln,G[11]=bn,G[12]=bt*Ln+be*Gn+Lr*Mi+D[12],G[13]=Rt*Ln+Be*Gn+Zr*Mi+D[13],G[14]=Kt*Ln+rr*Gn+ln*Mi+D[14],G[15]=Qt*Ln+xr*Gn+bn*Mi+D[15]),G},t.K=function(G,D,nt){var bt=nt[0],Rt=nt[1],Kt=nt[2];return G[0]=D[0]*bt,G[1]=D[1]*bt,G[2]=D[2]*bt,G[3]=D[3]*bt,G[4]=D[4]*Rt,G[5]=D[5]*Rt,G[6]=D[6]*Rt,G[7]=D[7]*Rt,G[8]=D[8]*Kt,G[9]=D[9]*Kt,G[10]=D[10]*Kt,G[11]=D[11]*Kt,G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15],G},t.L=Ea,t.M=function(G,D){let nt={};for(let bt=0;bt{let D=window.document.createElement("video");return D.muted=!0,new Promise(nt=>{D.onloadstart=()=>{nt(D)};for(let bt of G){let Rt=window.document.createElement("source");rt(bt)||(D.crossOrigin="Anonymous"),Rt.src=bt,D.appendChild(Rt)}})},t.a4=function(){return C++},t.a5=Ta,t.a6=jg,t.a7=Cf,t.a8=Ir,t.a9=G3,t.aA=function(G){if(G.type==="custom")return new V3(G);switch(G.type){case"background":return new Q1(G);case"circle":return new ba(G);case"fill":return new pi(G);case"fill-extrusion":return new Tp(G);case"heatmap":return new dl(G);case"hillshade":return new yc(G);case"line":return new Dg(G);case"raster":return new XT(G);case"symbol":return new zx(G)}},t.aB=p,t.aC=function(G,D){if(!G)return[{command:"setStyle",args:[D]}];let nt=[];try{if(!Pt(G.version,D.version))return[{command:"setStyle",args:[D]}];Pt(G.center,D.center)||nt.push({command:"setCenter",args:[D.center]}),Pt(G.zoom,D.zoom)||nt.push({command:"setZoom",args:[D.zoom]}),Pt(G.bearing,D.bearing)||nt.push({command:"setBearing",args:[D.bearing]}),Pt(G.pitch,D.pitch)||nt.push({command:"setPitch",args:[D.pitch]}),Pt(G.sprite,D.sprite)||nt.push({command:"setSprite",args:[D.sprite]}),Pt(G.glyphs,D.glyphs)||nt.push({command:"setGlyphs",args:[D.glyphs]}),Pt(G.transition,D.transition)||nt.push({command:"setTransition",args:[D.transition]}),Pt(G.light,D.light)||nt.push({command:"setLight",args:[D.light]}),Pt(G.terrain,D.terrain)||nt.push({command:"setTerrain",args:[D.terrain]}),Pt(G.sky,D.sky)||nt.push({command:"setSky",args:[D.sky]}),Pt(G.projection,D.projection)||nt.push({command:"setProjection",args:[D.projection]});let bt={},Rt=[];(function(Qt,be,Be,rr){let xr;for(xr in be=be||{},Qt=Qt||{})Object.prototype.hasOwnProperty.call(Qt,xr)&&(Object.prototype.hasOwnProperty.call(be,xr)||Jt(xr,Be,rr));for(xr in be)Object.prototype.hasOwnProperty.call(be,xr)&&(Object.prototype.hasOwnProperty.call(Qt,xr)?Pt(Qt[xr],be[xr])||(Qt[xr].type==="geojson"&&be[xr].type==="geojson"&&fe(Qt,be,xr)?qt(Be,{command:"setGeoJSONSourceData",args:[xr,be[xr].data]}):ge(xr,be,Be,rr)):Wt(xr,be,Be))})(G.sources,D.sources,Rt,bt);let Kt=[];G.layers&&G.layers.forEach(Qt=>{"source"in Qt&&bt[Qt.source]?nt.push({command:"removeLayer",args:[Qt.id]}):Kt.push(Qt)}),nt=nt.concat(Rt),function(Qt,be,Be){be=be||[];let rr=(Qt=Qt||[]).map(se),xr=be.map(se),Lr=Qt.reduce(Tt,{}),Zr=be.reduce(Tt,{}),ln=rr.slice(),bn=Object.create(null),Ln,Gn,Mi,Aa,ra;for(let ga=0,Ya=0;ga@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(nt,bt,Rt,Kt)=>{let Qt=Rt||Kt;return D[bt]=!Qt||Qt.toLowerCase(),""}),D["max-age"]){let nt=parseInt(D["max-age"],10);isNaN(nt)?delete D["max-age"]:D["max-age"]=nt}return D},t.ab=function(G,D){let nt=[];for(let bt in G)bt in D||nt.push(bt);return nt},t.ac=_,t.ad=function(G,D,nt){var bt=Math.sin(nt),Rt=Math.cos(nt),Kt=D[0],Qt=D[1],be=D[2],Be=D[3],rr=D[4],xr=D[5],Lr=D[6],Zr=D[7];return D!==G&&(G[8]=D[8],G[9]=D[9],G[10]=D[10],G[11]=D[11],G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15]),G[0]=Kt*Rt+rr*bt,G[1]=Qt*Rt+xr*bt,G[2]=be*Rt+Lr*bt,G[3]=Be*Rt+Zr*bt,G[4]=rr*Rt-Kt*bt,G[5]=xr*Rt-Qt*bt,G[6]=Lr*Rt-be*bt,G[7]=Zr*Rt-Be*bt,G},t.ae=function(G){var D=new xi(16);return D[0]=G[0],D[1]=G[1],D[2]=G[2],D[3]=G[3],D[4]=G[4],D[5]=G[5],D[6]=G[6],D[7]=G[7],D[8]=G[8],D[9]=G[9],D[10]=G[10],D[11]=G[11],D[12]=G[12],D[13]=G[13],D[14]=G[14],D[15]=G[15],D},t.af=Ji,t.ag=function(G,D){let nt=0,bt=0;if(G.kind==="constant")bt=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:Rt,minZoom:Kt,maxZoom:Qt}=G,be=Rt?_(Da.interpolationFactor(Rt,D,Kt,Qt),0,1):0;G.kind==="camera"?bt=Fo.number(G.minSize,G.maxSize,be):nt=be}return{uSizeT:nt,uSize:bt}},t.ai=function(G,{uSize:D,uSizeT:nt},{lowerSize:bt,upperSize:Rt}){return G.kind==="source"?bt/tm:G.kind==="composite"?Fo.number(bt/tm,Rt/tm,nt):D},t.aj=Qm,t.ak=function(G,D,nt,bt){let Rt=D.y-G.y,Kt=D.x-G.x,Qt=bt.y-nt.y,be=bt.x-nt.x,Be=Qt*Kt-be*Rt;if(Be===0)return null;let rr=(be*(G.y-nt.y)-Qt*(G.x-nt.x))/Be;return new o(G.x+rr*Kt,G.y+rr*Rt)},t.al=J3,t.am=ti,t.an=ri,t.ao=function(G){let D=1/0,nt=1/0,bt=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Rt=Math.max(Rt,Kt.y);return[D,nt,bt,Rt]},t.ap=bc,t.ar=Ab,t.as=function(G,D){var nt=D[0],bt=D[1],Rt=D[2],Kt=D[3],Qt=D[4],be=D[5],Be=D[6],rr=D[7],xr=D[8],Lr=D[9],Zr=D[10],ln=D[11],bn=D[12],Ln=D[13],Gn=D[14],Mi=D[15],Aa=nt*be-bt*Qt,ra=nt*Be-Rt*Qt,ga=nt*rr-Kt*Qt,Ya=bt*Be-Rt*be,Ao=bt*rr-Kt*be,Ss=Rt*rr-Kt*Be,Sl=xr*Ln-Lr*bn,_s=xr*Gn-Zr*bn,fs=xr*Mi-ln*bn,Xs=Lr*Gn-Zr*Ln,js=Lr*Mi-ln*Ln,Os=Zr*Mi-ln*Gn,uo=Aa*Os-ra*js+ga*Xs+Ya*fs-Ao*_s+Ss*Sl;return uo?(G[0]=(be*Os-Be*js+rr*Xs)*(uo=1/uo),G[1]=(Rt*js-bt*Os-Kt*Xs)*uo,G[2]=(Ln*Ss-Gn*Ao+Mi*Ya)*uo,G[3]=(Zr*Ao-Lr*Ss-ln*Ya)*uo,G[4]=(Be*fs-Qt*Os-rr*_s)*uo,G[5]=(nt*Os-Rt*fs+Kt*_s)*uo,G[6]=(Gn*ga-bn*Ss-Mi*ra)*uo,G[7]=(xr*Ss-Zr*ga+ln*ra)*uo,G[8]=(Qt*js-be*fs+rr*Sl)*uo,G[9]=(bt*fs-nt*js-Kt*Sl)*uo,G[10]=(bn*Ao-Ln*ga+Mi*Aa)*uo,G[11]=(Lr*ga-xr*Ao-ln*Aa)*uo,G[12]=(be*_s-Qt*Xs-Be*Sl)*uo,G[13]=(nt*Xs-bt*_s+Rt*Sl)*uo,G[14]=(Ln*ra-bn*Ya-Gn*Aa)*uo,G[15]=(xr*Ya-Lr*ra+Zr*Aa)*uo,G):null},t.at=Db,t.au=Tb,t.av=Fb,t.aw=function(){let G={},D=ut.$version;for(let nt in ut.$root){let bt=ut.$root[nt];if(bt.required){let Rt=null;Rt=nt==="version"?D:bt.type==="array"?[]:{},Rt!=null&&(G[nt]=Rt)}}return G},t.ax=oo,t.ay=tt,t.az=function(G){G=G.slice();let D=Object.create(null);for(let nt=0;nt25||bt<0||bt>=1||nt<0||nt>=1)},t.bc=function(G,D){return G[0]=D[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=D[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=D[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},t.bd=class extends vr{},t.be=Lb,t.bf=h5,t.bh=st,t.bi=function(G,D){lt.REGISTERED_PROTOCOLS[G]=D},t.bj=function(G){delete lt.REGISTERED_PROTOCOLS[G]},t.bk=function(G,D){let nt={};for(let Rt=0;RtOs*bc)}let _s=Qt?"center":nt.get("text-justify").evaluate(rr,{},G.canonical),fs=nt.get("symbol-placement")==="point"?nt.get("text-max-width").evaluate(rr,{},G.canonical)*bc:1/0,Xs=()=>{G.bucket.allowVerticalPlacement&&gs(ga)&&(bn.vertical=Ex(Ln,G.glyphMap,G.glyphPositions,G.imagePositions,xr,fs,Kt,Ss,"left",Ao,Mi,t.ah.vertical,!0,Zr,Lr))};if(!Qt&&Sl){let js=new Set;if(_s==="auto")for(let uo=0;uoe(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(D)}catch(nt){throw new Error(`Could not load image because of ${nt.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=M,t.f=G=>new Promise((D,nt)=>{let bt=new Image;bt.onload=()=>{D(bt),URL.revokeObjectURL(bt.src),bt.onload=null,window.requestAnimationFrame(()=>{bt.src=H})},bt.onerror=()=>nt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Rt=new Blob([new Uint8Array(G)],{type:"image/png"});bt.src=G.byteLength?URL.createObjectURL(Rt):H}),t.g=yt,t.h=(G,D)=>dt(M(G,{type:"json"}),D),t.i=O,t.j=Y,t.k=it,t.l=(G,D)=>dt(M(G,{type:"arrayBuffer"}),D),t.m=dt,t.n=function(G){return new _b(G).readFields(WT,[])},t.o=Ul,t.p=Sx,t.q=$t,t.r=aa,t.s=rt,t.t=ca,t.u=di,t.v=ut,t.w=w,t.x=function([G,D,nt]){return D+=90,D*=Math.PI/180,nt*=Math.PI/180,{x:G*Math.cos(D)*Math.sin(nt),y:G*Math.sin(D)*Math.sin(nt),z:G*Math.cos(nt)}},t.y=Fo,t.z=Rl}),I("worker",["./shared"],function(t){class e{constructor(Gt){this.keyCache={},Gt&&this.replace(Gt)}replace(Gt){this._layerConfigs={},this._layers={},this.update(Gt,[])}update(Gt,ne){for(let gt of Gt){this._layerConfigs[gt.id]=gt;let St=this._layers[gt.id]=t.aA(gt);St._featureFilter=t.a7(St.filter),this.keyCache[gt.id]&&delete this.keyCache[gt.id]}for(let gt of ne)delete this.keyCache[gt],delete this._layerConfigs[gt],delete this._layers[gt];this.familiesBySource={};let Ct=t.bk(Object.values(this._layerConfigs),this.keyCache);for(let gt of Ct){let St=gt.map(qe=>this._layers[qe.id]),Nt=St[0];if(Nt.visibility==="none")continue;let re=Nt.source||"",le=this.familiesBySource[re];le||(le=this.familiesBySource[re]={});let we=Nt.sourceLayer||"_geojsonTileLayer",Ue=le[we];Ue||(Ue=le[we]=[]),Ue.push(St)}}}class r{constructor(Gt){let ne={},Ct=[];for(let re in Gt){let le=Gt[re],we=ne[re]={};for(let Ue in le){let qe=le[+Ue];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;let or={x:0,y:0,w:qe.bitmap.width+2,h:qe.bitmap.height+2};Ct.push(or),we[Ue]={rect:or,metrics:qe.metrics}}}let{w:gt,h:St}=t.p(Ct),Nt=new t.o({width:gt||1,height:St||1});for(let re in Gt){let le=Gt[re];for(let we in le){let Ue=le[+we];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;let qe=ne[re][we].rect;t.o.copy(Ue.bitmap,Nt,{x:0,y:0},{x:qe.x+1,y:qe.y+1},Ue.bitmap)}}this.image=Nt,this.positions=ne}}t.bl("GlyphAtlas",r);class a{constructor(Gt){this.tileID=new t.S(Gt.tileID.overscaledZ,Gt.tileID.wrap,Gt.tileID.canonical.z,Gt.tileID.canonical.x,Gt.tileID.canonical.y),this.uid=Gt.uid,this.zoom=Gt.zoom,this.pixelRatio=Gt.pixelRatio,this.tileSize=Gt.tileSize,this.source=Gt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Gt.showCollisionBoxes,this.collectResourceTiming=!!Gt.collectResourceTiming,this.returnDependencies=!!Gt.returnDependencies,this.promoteId=Gt.promoteId,this.inFlightDependencies=[]}parse(Gt,ne,Ct,gt){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=Gt,this.collisionBoxArray=new t.a5;let St=new t.bm(Object.keys(Gt.layers).sort()),Nt=new t.bn(this.tileID,this.promoteId);Nt.bucketLayerIDs=[];let re={},le={featureIndex:Nt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ct},we=ne.familiesBySource[this.source];for(let oi in we){let $n=Gt.layers[oi];if(!$n)continue;$n.version===1&&t.w(`Vector tile source "${this.source}" layer "${oi}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let sa=St.encode(oi),Zi=[];for(let We=0;We<$n.length;We++){let nr=$n.feature(We),fr=Nt.getId(nr,oi);Zi.push({feature:nr,id:fr,index:We,sourceLayerIndex:sa})}for(let We of we[oi]){let nr=We[0];nr.source!==this.source&&t.w(`layer.source = ${nr.source} does not equal this.source = ${this.source}`),nr.minzoom&&this.zoom=nr.maxzoom||nr.visibility!=="none"&&(n(We,this.zoom,Ct),(re[nr.id]=nr.createBucket({index:Nt.bucketLayerIDs.length,layers:We,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:sa,sourceID:this.source})).populate(Zi,le,this.tileID.canonical),Nt.bucketLayerIDs.push(We.map(fr=>fr.id)))}}let Ue=t.aF(le.glyphDependencies,oi=>Object.keys(oi).map(Number));this.inFlightDependencies.forEach(oi=>oi?.abort()),this.inFlightDependencies=[];let qe=Promise.resolve({});if(Object.keys(Ue).length){let oi=new AbortController;this.inFlightDependencies.push(oi),qe=gt.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},oi)}let or=Object.keys(le.iconDependencies),Sr=Promise.resolve({});if(or.length){let oi=new AbortController;this.inFlightDependencies.push(oi),Sr=gt.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"icons"}},oi)}let Ar=Object.keys(le.patternDependencies),mr=Promise.resolve({});if(Ar.length){let oi=new AbortController;this.inFlightDependencies.push(oi),mr=gt.sendAsync({type:"GI",data:{icons:Ar,source:this.source,tileID:this.tileID,type:"patterns"}},oi)}let[Qr,Hn,Wn]=yield Promise.all([qe,Sr,mr]),Xn=new r(Qr),Ii=new t.bo(Hn,Wn);for(let oi in re){let $n=re[oi];$n instanceof t.a6?(n($n.layers,this.zoom,Ct),t.bp({bucket:$n,glyphMap:Qr,glyphPositions:Xn.positions,imageMap:Hn,imagePositions:Ii.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):$n.hasPattern&&($n instanceof t.bq||$n instanceof t.br||$n instanceof t.bs)&&(n($n.layers,this.zoom,Ct),$n.addFeatures(le,this.tileID.canonical,Ii.patternPositions))}return this.status="done",{buckets:Object.values(re).filter(oi=>!oi.isEmpty()),featureIndex:Nt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Xn.image,imageAtlas:Ii,glyphMap:this.returnDependencies?Qr:null,iconMap:this.returnDependencies?Hn:null,glyphPositions:this.returnDependencies?Xn.positions:null}})}}function n(Le,Gt,ne){let Ct=new t.z(Gt);for(let gt of Le)gt.recalculate(Ct,ne)}class o{constructor(Gt,ne,Ct){this.actor=Gt,this.layerIndex=ne,this.availableImages=Ct,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield t.l(Gt.request,ne);try{return{vectorTile:new t.bt.VectorTile(new t.bu(Ct.data)),rawData:Ct.data,cacheControl:Ct.cacheControl,expires:Ct.expires}}catch(gt){let St=new Uint8Array(Ct.data),Nt=`Unable to parse the tile at ${Gt.request.url}, `;throw Nt+=St[0]===31&&St[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${gt.message}`,new Error(Nt)}})}loadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid,Ct=!!(Gt&&Gt.request&&Gt.request.collectResourceTiming)&&new t.bv(Gt.request),gt=new a(Gt);this.loading[ne]=gt;let St=new AbortController;gt.abort=St;try{let Nt=yield this.loadVectorTile(Gt,St);if(delete this.loading[ne],!Nt)return null;let re=Nt.rawData,le={};Nt.expires&&(le.expires=Nt.expires),Nt.cacheControl&&(le.cacheControl=Nt.cacheControl);let we={};if(Ct){let qe=Ct.finish();qe&&(we.resourceTiming=JSON.parse(JSON.stringify(qe)))}gt.vectorTile=Nt.vectorTile;let Ue=gt.parse(Nt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ne]=gt,this.fetching[ne]={rawTileData:re,cacheControl:le,resourceTiming:we};try{let qe=yield Ue;return t.e({rawTileData:re.slice(0)},qe,le,we)}finally{delete this.fetching[ne]}}catch(Nt){throw delete this.loading[ne],gt.status="done",this.loaded[ne]=gt,Nt}})}reloadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid;if(!this.loaded||!this.loaded[ne])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ct=this.loaded[ne];if(Ct.showCollisionBoxes=Gt.showCollisionBoxes,Ct.status==="parsing"){let gt=yield Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor),St;if(this.fetching[ne]){let{rawTileData:Nt,cacheControl:re,resourceTiming:le}=this.fetching[ne];delete this.fetching[ne],St=t.e({rawTileData:Nt.slice(0)},gt,re,le)}else St=gt;return St}if(Ct.status==="done"&&Ct.vectorTile)return Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Gt){return t._(this,void 0,void 0,function*(){let ne=this.loading,Ct=Gt.uid;ne&&ne[Ct]&&ne[Ct].abort&&(ne[Ct].abort.abort(),delete ne[Ct])})}removeTile(Gt){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Gt.uid]&&delete this.loaded[Gt.uid]})}}class i{constructor(){this.loaded={}}loadTile(Gt){return t._(this,void 0,void 0,function*(){let{uid:ne,encoding:Ct,rawImageData:gt,redFactor:St,greenFactor:Nt,blueFactor:re,baseShift:le}=Gt,we=gt.width+2,Ue=gt.height+2,qe=t.b(gt)?new t.R({width:we,height:Ue},yield t.bw(gt,-1,-1,we,Ue)):gt,or=new t.bx(ne,qe,Ct,St,Nt,re,le);return this.loaded=this.loaded||{},this.loaded[ne]=or,or})}removeTile(Gt){let ne=this.loaded,Ct=Gt.uid;ne&&ne[Ct]&&delete ne[Ct]}}function l(Le,Gt){if(Le.length!==0){f(Le[0],Gt);for(var ne=1;ne=Math.abs(re)?ne-le+re:re-le+ne,ne=le}ne+Ct>=0!=!!Gt&&Le.reverse()}var x=t.by(function Le(Gt,ne){var Ct,gt=Gt&&Gt.type;if(gt==="FeatureCollection")for(Ct=0;Ct>31}function O(Le,Gt){for(var ne=Le.loadGeometry(),Ct=Le.type,gt=0,St=0,Nt=ne.length,re=0;reLe},F=Math.fround||(U=new Float32Array(1),Le=>(U[0]=+Le,U[0]));var U;let W=3,q=5,J=6;class lt{constructor(Gt){this.options=Object.assign(Object.create(H),Gt),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Gt){let{log:ne,minZoom:Ct,maxZoom:gt}=this.options;ne&&console.time("total time");let St=`prepare ${Gt.length} points`;ne&&console.time(St),this.points=Gt;let Nt=[];for(let le=0;le=Ct;le--){let we=+Date.now();re=this.trees[le]=this._createTree(this._cluster(re,le)),ne&&console.log("z%d: %d clusters in %dms",le,re.numItems,+Date.now()-we)}return ne&&console.timeEnd("total time"),this}getClusters(Gt,ne){let Ct=((Gt[0]+180)%360+360)%360-180,gt=Math.max(-90,Math.min(90,Gt[1])),St=Gt[2]===180?180:((Gt[2]+180)%360+360)%360-180,Nt=Math.max(-90,Math.min(90,Gt[3]));if(Gt[2]-Gt[0]>=360)Ct=-180,St=180;else if(Ct>St){let qe=this.getClusters([Ct,gt,180,Nt],ne),or=this.getClusters([-180,gt,St,Nt],ne);return qe.concat(or)}let re=this.trees[this._limitZoom(ne)],le=re.range(st(Ct),tt(Nt),st(St),tt(gt)),we=re.data,Ue=[];for(let qe of le){let or=this.stride*qe;Ue.push(we[or+q]>1?yt(we,or,this.clusterProps):this.points[we[or+W]])}return Ue}getChildren(Gt){let ne=this._getOriginId(Gt),Ct=this._getOriginZoom(Gt),gt="No cluster with the specified id.",St=this.trees[Ct];if(!St)throw new Error(gt);let Nt=St.data;if(ne*this.stride>=Nt.length)throw new Error(gt);let re=this.options.radius/(this.options.extent*Math.pow(2,Ct-1)),le=St.within(Nt[ne*this.stride],Nt[ne*this.stride+1],re),we=[];for(let Ue of le){let qe=Ue*this.stride;Nt[qe+4]===Gt&&we.push(Nt[qe+q]>1?yt(Nt,qe,this.clusterProps):this.points[Nt[qe+W]])}if(we.length===0)throw new Error(gt);return we}getLeaves(Gt,ne,Ct){let gt=[];return this._appendLeaves(gt,Gt,ne=ne||10,Ct=Ct||0,0),gt}getTile(Gt,ne,Ct){let gt=this.trees[this._limitZoom(Gt)],St=Math.pow(2,Gt),{extent:Nt,radius:re}=this.options,le=re/Nt,we=(Ct-le)/St,Ue=(Ct+1+le)/St,qe={features:[]};return this._addTileFeatures(gt.range((ne-le)/St,we,(ne+1+le)/St,Ue),gt.data,ne,Ct,St,qe),ne===0&&this._addTileFeatures(gt.range(1-le/St,we,1,Ue),gt.data,St,Ct,St,qe),ne===St-1&&this._addTileFeatures(gt.range(0,we,le/St,Ue),gt.data,-1,Ct,St,qe),qe.features.length?qe:null}getClusterExpansionZoom(Gt){let ne=this._getOriginZoom(Gt)-1;for(;ne<=this.options.maxZoom;){let Ct=this.getChildren(Gt);if(ne++,Ct.length!==1)break;Gt=Ct[0].properties.cluster_id}return ne}_appendLeaves(Gt,ne,Ct,gt,St){let Nt=this.getChildren(ne);for(let re of Nt){let le=re.properties;if(le&&le.cluster?St+le.point_count<=gt?St+=le.point_count:St=this._appendLeaves(Gt,le.cluster_id,Ct,gt,St):St1,Ue,qe,or;if(we)Ue=mt(ne,le,this.clusterProps),qe=ne[le],or=ne[le+1];else{let mr=this.points[ne[le+W]];Ue=mr.properties;let[Qr,Hn]=mr.geometry.coordinates;qe=st(Qr),or=tt(Hn)}let Sr={type:1,geometry:[[Math.round(this.options.extent*(qe*St-Ct)),Math.round(this.options.extent*(or*St-gt))]],tags:Ue},Ar;Ar=we||this.options.generateId?ne[le+W]:this.points[ne[le+W]].id,Ar!==void 0&&(Sr.id=Ar),Nt.features.push(Sr)}}_limitZoom(Gt){return Math.max(this.options.minZoom,Math.min(Math.floor(+Gt),this.options.maxZoom+1))}_cluster(Gt,ne){let{radius:Ct,extent:gt,reduce:St,minPoints:Nt}=this.options,re=Ct/(gt*Math.pow(2,ne)),le=Gt.data,we=[],Ue=this.stride;for(let qe=0;qene&&(Qr+=le[Wn+q])}if(Qr>mr&&Qr>=Nt){let Hn,Wn=or*mr,Xn=Sr*mr,Ii=-1,oi=((qe/Ue|0)<<5)+(ne+1)+this.points.length;for(let $n of Ar){let sa=$n*Ue;if(le[sa+2]<=ne)continue;le[sa+2]=ne;let Zi=le[sa+q];Wn+=le[sa]*Zi,Xn+=le[sa+1]*Zi,le[sa+4]=oi,St&&(Hn||(Hn=this._map(le,qe,!0),Ii=this.clusterProps.length,this.clusterProps.push(Hn)),St(Hn,this._map(le,sa)))}le[qe+4]=oi,we.push(Wn/Qr,Xn/Qr,1/0,oi,-1,Qr),St&&we.push(Ii)}else{for(let Hn=0;Hn1)for(let Hn of Ar){let Wn=Hn*Ue;if(!(le[Wn+2]<=ne)){le[Wn+2]=ne;for(let Xn=0;Xn>5}_getOriginZoom(Gt){return(Gt-this.points.length)%32}_map(Gt,ne,Ct){if(Gt[ne+q]>1){let Nt=this.clusterProps[Gt[ne+J]];return Ct?Object.assign({},Nt):Nt}let gt=this.points[Gt[ne+W]].properties,St=this.options.map(gt);return Ct&&St===gt?Object.assign({},St):St}}function yt(Le,Gt,ne){return{type:"Feature",id:Le[Gt+W],properties:mt(Le,Gt,ne),geometry:{type:"Point",coordinates:[(Ct=Le[Gt],360*(Ct-.5)),dt(Le[Gt+1])]}};var Ct}function mt(Le,Gt,ne){let Ct=Le[Gt+q],gt=Ct>=1e4?`${Math.round(Ct/1e3)}k`:Ct>=1e3?Math.round(Ct/100)/10+"k":Ct,St=Le[Gt+J],Nt=St===-1?{}:Object.assign({},ne[St]);return Object.assign(Nt,{cluster:!0,cluster_id:Le[Gt+W],point_count:Ct,point_count_abbreviated:gt})}function st(Le){return Le/360+.5}function tt(Le){let Gt=Math.sin(Le*Math.PI/180),ne=.5-.25*Math.log((1+Gt)/(1-Gt))/Math.PI;return ne<0?0:ne>1?1:ne}function dt(Le){let Gt=(180-360*Le)*Math.PI/180;return 360*Math.atan(Math.exp(Gt))/Math.PI-90}function rt(Le,Gt,ne,Ct){let gt=Ct,St=Gt+(ne-Gt>>1),Nt,re=ne-Gt,le=Le[Gt],we=Le[Gt+1],Ue=Le[ne],qe=Le[ne+1];for(let or=Gt+3;orgt)Nt=or,gt=Sr;else if(Sr===gt){let Ar=Math.abs(or-St);ArCt&&(Nt-Gt>3&&rt(Le,Gt,Nt,Ct),Le[Nt+2]=gt,ne-Nt>3&&rt(Le,Nt,ne,Ct))}function at(Le,Gt,ne,Ct,gt,St){let Nt=gt-ne,re=St-Ct;if(Nt!==0||re!==0){let le=((Le-ne)*Nt+(Gt-Ct)*re)/(Nt*Nt+re*re);le>1?(ne=gt,Ct=St):le>0&&(ne+=Nt*le,Ct+=re*le)}return Nt=Le-ne,re=Gt-Ct,Nt*Nt+re*re}function vt(Le,Gt,ne,Ct){let gt={id:Le??null,type:Gt,geometry:ne,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Gt==="Point"||Gt==="MultiPoint"||Gt==="LineString")it(gt,ne);else if(Gt==="Polygon")it(gt,ne[0]);else if(Gt==="MultiLineString")for(let St of ne)it(gt,St);else if(Gt==="MultiPolygon")for(let St of ne)it(gt,St[0]);return gt}function it(Le,Gt){for(let ne=0;ne0&&(Nt+=Ct?(gt*Ue-we*St)/2:Math.sqrt(Math.pow(we-gt,2)+Math.pow(Ue-St,2))),gt=we,St=Ue}let re=Gt.length-3;Gt[2]=1,rt(Gt,0,re,ne),Gt[re+2]=1,Gt.size=Math.abs(Nt),Gt.start=0,Gt.end=Gt.size}function kt(Le,Gt,ne,Ct){for(let gt=0;gt1?1:ne}function qt(Le,Gt,ne,Ct,gt,St,Nt,re){if(Ct/=Gt,St>=(ne/=Gt)&&Nt=Ct)return null;let le=[];for(let we of Le){let Ue=we.geometry,qe=we.type,or=gt===0?we.minX:we.minY,Sr=gt===0?we.maxX:we.maxY;if(or>=ne&&Sr=Ct)continue;let Ar=[];if(qe==="Point"||qe==="MultiPoint")Wt(Ue,Ar,ne,Ct,gt);else if(qe==="LineString")Jt(Ue,Ar,ne,Ct,gt,!1,re.lineMetrics);else if(qe==="MultiLineString")fe(Ue,Ar,ne,Ct,gt,!1);else if(qe==="Polygon")fe(Ue,Ar,ne,Ct,gt,!0);else if(qe==="MultiPolygon")for(let mr of Ue){let Qr=[];fe(mr,Qr,ne,Ct,gt,!0),Qr.length&&Ar.push(Qr)}if(Ar.length){if(re.lineMetrics&&qe==="LineString"){for(let mr of Ar)le.push(vt(we.id,qe,mr,we.tags));continue}qe!=="LineString"&&qe!=="MultiLineString"||(Ar.length===1?(qe="LineString",Ar=Ar[0]):qe="MultiLineString"),qe!=="Point"&&qe!=="MultiPoint"||(qe=Ar.length===3?"Point":"MultiPoint"),le.push(vt(we.id,qe,Ar,we.tags))}}return le.length?le:null}function Wt(Le,Gt,ne,Ct,gt){for(let St=0;St=ne&&Nt<=Ct&&pe(Gt,Le[St],Le[St+1],Le[St+2])}}function Jt(Le,Gt,ne,Ct,gt,St,Nt){let re=ge(Le),le=gt===0?se:Tt,we,Ue,qe=Le.start;for(let Qr=0;Qrne&&(Ue=le(re,Hn,Wn,Ii,oi,ne),Nt&&(re.start=qe+we*Ue)):$n>Ct?sa=ne&&(Ue=le(re,Hn,Wn,Ii,oi,ne),Zi=!0),sa>Ct&&$n<=Ct&&(Ue=le(re,Hn,Wn,Ii,oi,Ct),Zi=!0),!St&&Zi&&(Nt&&(re.end=qe+we*Ue),Gt.push(re),re=ge(Le)),Nt&&(qe+=we)}let or=Le.length-3,Sr=Le[or],Ar=Le[or+1],mr=gt===0?Sr:Ar;mr>=ne&&mr<=Ct&&pe(re,Sr,Ar,Le[or+2]),or=re.length-3,St&&or>=3&&(re[or]!==re[0]||re[or+1]!==re[1])&&pe(re,re[0],re[1],re[2]),re.length&&Gt.push(re)}function ge(Le){let Gt=[];return Gt.size=Le.size,Gt.start=Le.start,Gt.end=Le.end,Gt}function fe(Le,Gt,ne,Ct,gt,St){for(let Nt of Le)Jt(Nt,Gt,ne,Ct,gt,St,!1)}function pe(Le,Gt,ne,Ct){Le.push(Gt,ne,Ct)}function se(Le,Gt,ne,Ct,gt,St){let Nt=(St-Gt)/(Ct-Gt);return pe(Le,St,ne+(gt-ne)*Nt,1),Nt}function Tt(Le,Gt,ne,Ct,gt,St){let Nt=(St-ne)/(gt-ne);return pe(Le,Gt+(Ct-Gt)*Nt,St,1),Nt}function Lt(Le,Gt){let ne=[];for(let Ct=0;Ct0&&Gt.size<(gt?Nt:Ct))return void(ne.numPoints+=Gt.length/3);let re=[];for(let le=0;leNt)&&(ne.numSimplified++,re.push(Gt[le],Gt[le+1])),ne.numPoints++;gt&&function(le,we){let Ue=0;for(let qe=0,or=le.length,Sr=or-2;qe0===we)for(let qe=0,or=le.length;qe24)throw new Error("maxZoom should be in the 0-24 range");if(ne.promoteId&&ne.generateId)throw new Error("promoteId and generateId cannot be used together.");let gt=function(St,Nt){let re=[];if(St.type==="FeatureCollection")for(let le=0;le1&&console.time("creation"),Sr=this.tiles[or]=oe(Gt,ne,Ct,gt,we),this.tileCoords.push({z:ne,x:Ct,y:gt}),Ue)){Ue>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ne,Ct,gt,Sr.numFeatures,Sr.numPoints,Sr.numSimplified),console.timeEnd("creation"));let Zi=`z${ne}`;this.stats[Zi]=(this.stats[Zi]||0)+1,this.total++}if(Sr.source=Gt,St==null){if(ne===we.indexMaxZoom||Sr.numPoints<=we.indexMaxPoints)continue}else{if(ne===we.maxZoom||ne===St)continue;if(St!=null){let Zi=St-ne;if(Ct!==Nt>>Zi||gt!==re>>Zi)continue}}if(Sr.source=null,Gt.length===0)continue;Ue>1&&console.time("clipping");let Ar=.5*we.buffer/we.extent,mr=.5-Ar,Qr=.5+Ar,Hn=1+Ar,Wn=null,Xn=null,Ii=null,oi=null,$n=qt(Gt,qe,Ct-Ar,Ct+Qr,0,Sr.minX,Sr.maxX,we),sa=qt(Gt,qe,Ct+mr,Ct+Hn,0,Sr.minX,Sr.maxX,we);Gt=null,$n&&(Wn=qt($n,qe,gt-Ar,gt+Qr,1,Sr.minY,Sr.maxY,we),Xn=qt($n,qe,gt+mr,gt+Hn,1,Sr.minY,Sr.maxY,we),$n=null),sa&&(Ii=qt(sa,qe,gt-Ar,gt+Qr,1,Sr.minY,Sr.maxY,we),oi=qt(sa,qe,gt+mr,gt+Hn,1,Sr.minY,Sr.maxY,we),sa=null),Ue>1&&console.timeEnd("clipping"),le.push(Wn||[],ne+1,2*Ct,2*gt),le.push(Xn||[],ne+1,2*Ct,2*gt+1),le.push(Ii||[],ne+1,2*Ct+1,2*gt),le.push(oi||[],ne+1,2*Ct+1,2*gt+1)}}getTile(Gt,ne,Ct){Gt=+Gt,ne=+ne,Ct=+Ct;let gt=this.options,{extent:St,debug:Nt}=gt;if(Gt<0||Gt>24)return null;let re=1<1&&console.log("drilling down to z%d-%d-%d",Gt,ne,Ct);let we,Ue=Gt,qe=ne,or=Ct;for(;!we&&Ue>0;)Ue--,qe>>=1,or>>=1,we=this.tiles[ur(Ue,qe,or)];return we&&we.source?(Nt>1&&(console.log("found parent tile z%d-%d-%d",Ue,qe,or),console.time("drilling down")),this.splitTile(we.source,Ue,qe,or,Gt,ne,Ct),Nt>1&&console.timeEnd("drilling down"),this.tiles[le]?ee(this.tiles[le],St):null):null}}function ur(Le,Gt,ne){return 32*((1<{qe.properties=Sr;let Ar={};for(let mr of or)Ar[mr]=le[mr].evaluate(Ue,qe);return Ar},Nt.reduce=(Sr,Ar)=>{qe.properties=Ar;for(let mr of or)Ue.accumulated=Sr[mr],Sr[mr]=we[mr].evaluate(Ue,qe)},Nt}(Gt)).load((yield this._pendingData).features):(gt=yield this._pendingData,new cr(gt,Gt.geojsonVtOptions)),this.loaded={};let St={};if(Ct){let Nt=Ct.finish();Nt&&(St.resourceTiming={},St.resourceTiming[Gt.source]=JSON.parse(JSON.stringify(Nt)))}return St}catch(St){if(delete this._pendingRequest,t.bB(St))return{abandoned:!0};throw St}var gt})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Gt){let ne=this.loaded;return ne&&ne[Gt.uid]?super.reloadTile(Gt):this.loadTile(Gt)}loadAndProcessGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield this.loadGeoJSON(Gt,ne);if(delete this._pendingRequest,typeof Ct!="object")throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(x(Ct,!0),Gt.filter){let gt=t.bC(Gt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(gt.result==="error")throw new Error(gt.value.map(St=>`${St.key}: ${St.message}`).join(", "));Ct={type:"FeatureCollection",features:Ct.features.filter(St=>gt.value.evaluate({zoom:0},St))}}return Ct})}loadGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let{promoteId:Ct}=Gt;if(Gt.request){let gt=yield t.h(Gt.request,ne);return this._dataUpdateable=Wr(gt.data,Ct)?br(gt.data,Ct):void 0,gt.data}if(typeof Gt.data=="string")try{let gt=JSON.parse(Gt.data);return this._dataUpdateable=Wr(gt,Ct)?br(gt,Ct):void 0,gt}catch{throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`)}if(!Gt.dataDiff)throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Gt.source}`);return function(gt,St,Nt){var re,le,we,Ue;if(St.removeAll&>.clear(),St.remove)for(let qe of St.remove)gt.delete(qe);if(St.add)for(let qe of St.add){let or=jr(qe,Nt);or!=null&>.set(or,qe)}if(St.update)for(let qe of St.update){let or=gt.get(qe.id);if(or==null)continue;let Sr=!qe.removeAllProperties&&(((re=qe.removeProperties)===null||re===void 0?void 0:re.length)>0||((le=qe.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((qe.newGeometry||qe.removeAllProperties||Sr)&&(or=Object.assign({},or),gt.set(qe.id,or),Sr&&(or.properties=Object.assign({},or.properties))),qe.newGeometry&&(or.geometry=qe.newGeometry),qe.removeAllProperties)or.properties={};else if(((we=qe.removeProperties)===null||we===void 0?void 0:we.length)>0)for(let Ar of qe.removeProperties)Object.prototype.hasOwnProperty.call(or.properties,Ar)&&delete or.properties[Ar];if(((Ue=qe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(let{key:Ar,value:mr}of qe.addOrUpdateProperties)or.properties[Ar]=mr}}(this._dataUpdateable,Gt.dataDiff,Ct),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Gt){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Gt){return this._geoJSONIndex.getClusterExpansionZoom(Gt.clusterId)}getClusterChildren(Gt){return this._geoJSONIndex.getChildren(Gt.clusterId)}getClusterLeaves(Gt){return this._geoJSONIndex.getLeaves(Gt.clusterId,Gt.limit,Gt.offset)}}class nn{constructor(Gt){this.self=Gt,this.actor=new t.F(Gt),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ne,Ct)=>{if(this.externalWorkerSourceTypes[ne])throw new Error(`Worker source with name "${ne}" already registered.`);this.externalWorkerSourceTypes[ne]=Ct},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ne=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ne)},this.actor.registerMessageHandler("LDT",(ne,Ct)=>this._getDEMWorkerSource(ne,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RDT",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ne,Ct.source).removeTile(Ct)})),this.actor.registerMessageHandler("GCEZ",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterExpansionZoom(Ct)})),this.actor.registerMessageHandler("GCC",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterChildren(Ct)})),this.actor.registerMessageHandler("GCL",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterLeaves(Ct)})),this.actor.registerMessageHandler("LD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadData(Ct)),this.actor.registerMessageHandler("GD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).getData()),this.actor.registerMessageHandler("LT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).reloadTile(Ct)),this.actor.registerMessageHandler("AT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).abortTile(Ct)),this.actor.registerMessageHandler("RMT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).removeTile(Ct)),this.actor.registerMessageHandler("RS",(ne,Ct)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ne]||!this.workerSources[ne][Ct.type]||!this.workerSources[ne][Ct.type][Ct.source])return;let gt=this.workerSources[ne][Ct.type][Ct.source];delete this.workerSources[ne][Ct.type][Ct.source],gt.removeSource!==void 0&>.removeSource(Ct)})),this.actor.registerMessageHandler("RM",ne=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ne],delete this.availableImages[ne],delete this.workerSources[ne],delete this.demWorkerSources[ne]})),this.actor.registerMessageHandler("SR",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.referrer=Ct})),this.actor.registerMessageHandler("SRPS",(ne,Ct)=>this._syncRTLPluginState(ne,Ct)),this.actor.registerMessageHandler("IS",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.self.importScripts(Ct)})),this.actor.registerMessageHandler("SI",(ne,Ct)=>this._setImages(ne,Ct)),this.actor.registerMessageHandler("UL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).update(Ct.layers,Ct.removedIds)})),this.actor.registerMessageHandler("SL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).replace(Ct)}))}_setImages(Gt,ne){return t._(this,void 0,void 0,function*(){this.availableImages[Gt]=ne;for(let Ct in this.workerSources[Gt]){let gt=this.workerSources[Gt][Ct];for(let St in gt)gt[St].availableImages=ne}})}_syncRTLPluginState(Gt,ne){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ne.pluginStatus!=="loading")return t.bD.setState(ne),ne;let Ct=ne.pluginURL;if(this.self.importScripts(Ct),t.bD.isParsed()){let gt={pluginStatus:"loaded",pluginURL:Ct};return t.bD.setState(gt),gt}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ct}`)})}_getAvailableImages(Gt){let ne=this.availableImages[Gt];return ne||(ne=[]),ne}_getLayerIndex(Gt){let ne=this.layerIndexes[Gt];return ne||(ne=this.layerIndexes[Gt]=new e),ne}_getWorkerSource(Gt,ne,Ct){if(this.workerSources[Gt]||(this.workerSources[Gt]={}),this.workerSources[Gt][ne]||(this.workerSources[Gt][ne]={}),!this.workerSources[Gt][ne][Ct]){let gt={sendAsync:(St,Nt)=>(St.targetMapId=Gt,this.actor.sendAsync(St,Nt))};switch(ne){case"vector":this.workerSources[Gt][ne][Ct]=new o(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;case"geojson":this.workerSources[Gt][ne][Ct]=new Xr(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;default:this.workerSources[Gt][ne][Ct]=new this.externalWorkerSourceTypes[ne](gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt))}}return this.workerSources[Gt][ne][Ct]}_getDEMWorkerSource(Gt,ne){return this.demWorkerSources[Gt]||(this.demWorkerSources[Gt]={}),this.demWorkerSources[Gt][ne]||(this.demWorkerSources[Gt][ne]=new i),this.demWorkerSources[Gt][ne]}}return t.i(self)&&(self.worker=new nn(self)),nn}),I("index",["exports","./shared"],function(t,e){var r="4.7.1";let a,n,o={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:$t=>new Promise((z,ht)=>{let Et=requestAnimationFrame(z);$t.signal.addEventListener("abort",()=>{cancelAnimationFrame(Et),ht(e.c())})}),getImageData($t,z=0){return this.getImageCanvasContext($t).getImageData(-z,-z,$t.width+2*z,$t.height+2*z)},getImageCanvasContext($t){let z=window.document.createElement("canvas"),ht=z.getContext("2d",{willReadFrequently:!0});if(!ht)throw new Error("failed to create canvas 2d context");return z.width=$t.width,z.height=$t.height,ht.drawImage($t,0,0,$t.width,$t.height),ht},resolveURL:$t=>(a||(a=document.createElement("a")),a.href=$t,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(n==null&&(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)}};class i{static testProp(z){if(!i.docStyle)return z[0];for(let ht=0;ht{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(z){let ht=z.getBoundingClientRect();return{x:ht.width/z.offsetWidth||1,y:ht.height/z.offsetHeight||1,boundingClientRect:ht}}static getPoint(z,ht,Et){let zt=ht.boundingClientRect;return new e.P((Et.clientX-zt.left)/ht.x-z.clientLeft,(Et.clientY-zt.top)/ht.y-z.clientTop)}static mousePos(z,ht){let Et=i.getScale(z);return i.getPoint(z,Et,ht)}static touchPos(z,ht){let Et=[],zt=i.getScale(z);for(let Ht=0;Ht{f&&T(f),f=null,v=!0},x.onerror=()=>{y=!0,f=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function($t){let z,ht,Et,zt;$t.resetRequestQueue=()=>{z=[],ht=0,Et=0,zt={}},$t.addThrottleControl=Ke=>{let vr=Et++;return zt[vr]=Ke,vr},$t.removeThrottleControl=Ke=>{delete zt[Ke],ke()},$t.getImage=(Ke,vr,Dr=!0)=>new Promise((Fr,un)=>{l.supported&&(Ke.headers||(Ke.headers={}),Ke.headers.accept="image/webp,*/*"),e.e(Ke,{type:"image"}),z.push({abortController:vr,requestParameters:Ke,supportImageRefresh:Dr,state:"queued",onError:Sn=>{un(Sn)},onSuccess:Sn=>{Fr(Sn)}}),ke()});let Ht=Ke=>e._(this,void 0,void 0,function*(){Ke.state="running";let{requestParameters:vr,supportImageRefresh:Dr,onError:Fr,onSuccess:un,abortController:Sn}=Ke,Xt=Dr===!1&&!e.i(self)&&!e.g(vr.url)&&(!vr.headers||Object.keys(vr.headers).reduce((Ae,je)=>Ae&&je==="accept",!0));ht++;let ae=Xt?Fe(vr,Sn):e.m(vr,Sn);try{let Ae=yield ae;delete Ke.abortController,Ke.state="completed",Ae.data instanceof HTMLImageElement||e.b(Ae.data)?un(Ae):Ae.data&&un({data:yield(xe=Ae.data,typeof createImageBitmap=="function"?e.d(xe):e.f(xe)),cacheControl:Ae.cacheControl,expires:Ae.expires})}catch(Ae){delete Ke.abortController,Fr(Ae)}finally{ht--,ke()}var xe}),ke=()=>{let Ke=(()=>{for(let vr of Object.keys(zt))if(zt[vr]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let vr=ht;vr0;vr++){let Dr=z.shift();Dr.abortController.signal.aborted?vr--:Ht(Dr)}},Fe=(Ke,vr)=>new Promise((Dr,Fr)=>{let un=new Image,Sn=Ke.url,Xt=Ke.credentials;Xt&&Xt==="include"?un.crossOrigin="use-credentials":(Xt&&Xt==="same-origin"||!e.s(Sn))&&(un.crossOrigin="anonymous"),vr.signal.addEventListener("abort",()=>{un.src="",Fr(e.c())}),un.fetchPriority="high",un.onload=()=>{un.onerror=un.onload=null,Dr({data:un})},un.onerror=()=>{un.onerror=un.onload=null,vr.signal.aborted||Fr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},un.src=Sn})}(u||(u={})),u.resetRequestQueue();class b{constructor(z){this._transformRequestFn=z}transformRequest(z,ht){return this._transformRequestFn&&this._transformRequestFn(z,ht)||{url:z}}setTransformRequest(z){this._transformRequestFn=z}}function _($t){var z=new e.A(3);return z[0]=$t[0],z[1]=$t[1],z[2]=$t[2],z}var P,M=function($t,z,ht){return $t[0]=z[0]-ht[0],$t[1]=z[1]-ht[1],$t[2]=z[2]-ht[2],$t};P=new e.A(3),e.A!=Float32Array&&(P[0]=0,P[1]=0,P[2]=0);var C=function($t){var z=$t[0],ht=$t[1];return z*z+ht*ht};function A($t){let z=[];if(typeof $t=="string")z.push({id:"default",url:$t});else if($t&&$t.length>0){let ht=[];for(let{id:Et,url:zt}of $t){let Ht=`${Et}${zt}`;ht.indexOf(Ht)===-1&&(ht.push(Ht),z.push({id:Et,url:zt}))}}return z}function h($t,z,ht){let Et=$t.split("?");return Et[0]+=`${z}${ht}`,Et.join("?")}(function(){var $t=new e.A(2);e.A!=Float32Array&&($t[0]=0,$t[1]=0)})();class p{constructor(z,ht,Et,zt){this.context=z,this.format=Et,this.texture=z.gl.createTexture(),this.update(ht,zt)}update(z,ht,Et){let{width:zt,height:Ht}=z,ke=!(this.size&&this.size[0]===zt&&this.size[1]===Ht||Et),{context:Fe}=this,{gl:Ke}=Fe;if(this.useMipmap=!!(ht&&ht.useMipmap),Ke.bindTexture(Ke.TEXTURE_2D,this.texture),Fe.pixelStoreUnpackFlipY.set(!1),Fe.pixelStoreUnpack.set(1),Fe.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ke.RGBA&&(!ht||ht.premultiply!==!1)),ke)this.size=[zt,Ht],z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,this.format,Ke.UNSIGNED_BYTE,z):Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,zt,Ht,0,this.format,Ke.UNSIGNED_BYTE,z.data);else{let{x:vr,y:Dr}=Et||{x:0,y:0};z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,Ke.RGBA,Ke.UNSIGNED_BYTE,z):Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,zt,Ht,Ke.RGBA,Ke.UNSIGNED_BYTE,z.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ke.generateMipmap(Ke.TEXTURE_2D)}bind(z,ht,Et){let{context:zt}=this,{gl:Ht}=zt;Ht.bindTexture(Ht.TEXTURE_2D,this.texture),Et!==Ht.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Et=Ht.LINEAR),z!==this.filter&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,z),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Et||z),this.filter=z),ht!==this.wrap&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,ht),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,ht),this.wrap=ht)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:z}=this.context;z.deleteTexture(this.texture),this.texture=null}}function k($t){let{userImage:z}=$t;return!!(z&&z.render&&z.render())&&($t.data.replace(new Uint8Array(z.data.buffer)),!0)}class w extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(z){if(this.loaded!==z&&(this.loaded=z,z)){for(let{ids:ht,promiseResolve:Et}of this.requestors)Et(this._getImagesForIds(ht));this.requestors=[]}}getImage(z){let ht=this.images[z];if(ht&&!ht.data&&ht.spriteData){let Et=ht.spriteData;ht.data=new e.R({width:Et.width,height:Et.height},Et.context.getImageData(Et.x,Et.y,Et.width,Et.height).data),ht.spriteData=null}return ht}addImage(z,ht){if(this.images[z])throw new Error(`Image id ${z} already exist, use updateImage instead`);this._validate(z,ht)&&(this.images[z]=ht)}_validate(z,ht){let Et=!0,zt=ht.data||ht.spriteData;return this._validateStretch(ht.stretchX,zt&&zt.width)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchX" value`))),Et=!1),this._validateStretch(ht.stretchY,zt&&zt.height)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchY" value`))),Et=!1),this._validateContent(ht.content,ht)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "content" value`))),Et=!1),Et}_validateStretch(z,ht){if(!z)return!0;let Et=0;for(let zt of z){if(zt[0]{let zt=!0;if(!this.isLoaded())for(let Ht of z)this.images[Ht]||(zt=!1);this.isLoaded()||zt?ht(this._getImagesForIds(z)):this.requestors.push({ids:z,promiseResolve:ht})})}_getImagesForIds(z){let ht={};for(let Et of z){let zt=this.getImage(Et);zt||(this.fire(new e.k("styleimagemissing",{id:Et})),zt=this.getImage(Et)),zt?ht[Et]={data:zt.data.clone(),pixelRatio:zt.pixelRatio,sdf:zt.sdf,version:zt.version,stretchX:zt.stretchX,stretchY:zt.stretchY,content:zt.content,textFitWidth:zt.textFitWidth,textFitHeight:zt.textFitHeight,hasRenderCallback:!!(zt.userImage&&zt.userImage.render)}:e.w(`Image "${Et}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ht}getPixelSize(){let{width:z,height:ht}=this.atlasImage;return{width:z,height:ht}}getPattern(z){let ht=this.patterns[z],Et=this.getImage(z);if(!Et)return null;if(ht&&ht.position.version===Et.version)return ht.position;if(ht)ht.position.version=Et.version;else{let zt={w:Et.data.width+2,h:Et.data.height+2,x:0,y:0},Ht=new e.I(zt,Et);this.patterns[z]={bin:zt,position:Ht}}return this._updatePatternAtlas(),this.patterns[z].position}bind(z){let ht=z.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(z,this.atlasImage,ht.RGBA),this.atlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}_updatePatternAtlas(){let z=[];for(let Ht in this.patterns)z.push(this.patterns[Ht].bin);let{w:ht,h:Et}=e.p(z),zt=this.atlasImage;zt.resize({width:ht||1,height:Et||1});for(let Ht in this.patterns){let{bin:ke}=this.patterns[Ht],Fe=ke.x+1,Ke=ke.y+1,vr=this.getImage(Ht).data,Dr=vr.width,Fr=vr.height;e.R.copy(vr,zt,{x:0,y:0},{x:Fe,y:Ke},{width:Dr,height:Fr}),e.R.copy(vr,zt,{x:0,y:Fr-1},{x:Fe,y:Ke-1},{width:Dr,height:1}),e.R.copy(vr,zt,{x:0,y:0},{x:Fe,y:Ke+Fr},{width:Dr,height:1}),e.R.copy(vr,zt,{x:Dr-1,y:0},{x:Fe-1,y:Ke},{width:1,height:Fr}),e.R.copy(vr,zt,{x:0,y:0},{x:Fe+Dr,y:Ke},{width:1,height:Fr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(z){for(let ht of z){if(this.callbackDispatchedThisFrame[ht])continue;this.callbackDispatchedThisFrame[ht]=!0;let Et=this.getImage(ht);Et||e.w(`Image with ID: "${ht}" was not found`),k(Et)&&this.updateImage(ht,Et)}}}let R=1e20;function O($t,z,ht,Et,zt,Ht,ke,Fe,Ke){for(let vr=z;vr-1);Ke++,Ht[Ke]=Fe,ke[Ke]=vr,ke[Ke+1]=R}for(let Fe=0,Ke=0;Fe65535)throw new Error("glyphs > 65535 not supported");if(Et.ranges[Ht])return{stack:z,id:ht,glyph:zt};if(!this.url)throw new Error("glyphsUrl is not set");if(!Et.requests[Ht]){let Fe=V.loadGlyphRange(z,Ht,this.url,this.requestManager);Et.requests[Ht]=Fe}let ke=yield Et.requests[Ht];for(let Fe in ke)this._doesCharSupportLocalGlyph(+Fe)||(Et.glyphs[+Fe]=ke[+Fe]);return Et.ranges[Ht]=!0,{stack:z,id:ht,glyph:ke[ht]||null}})}_doesCharSupportLocalGlyph(z){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(z))}_tinySDF(z,ht,Et){let zt=this.localIdeographFontFamily;if(!zt||!this._doesCharSupportLocalGlyph(Et))return;let Ht=z.tinySDF;if(!Ht){let Fe="400";/bold/i.test(ht)?Fe="900":/medium/i.test(ht)?Fe="500":/light/i.test(ht)&&(Fe="200"),Ht=z.tinySDF=new V.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:zt,fontWeight:Fe})}let ke=Ht.draw(String.fromCharCode(Et));return{id:Et,bitmap:new e.o({width:ke.width||60,height:ke.height||60},ke.data),metrics:{width:ke.glyphWidth/2||24,height:ke.glyphHeight/2||24,left:ke.glyphLeft/2+.5||0,top:ke.glyphTop/2-27.5||-8,advance:ke.glyphAdvance/2||24,isDoubleResolution:!0}}}}V.loadGlyphRange=function($t,z,ht,Et){return e._(this,void 0,void 0,function*(){let zt=256*z,Ht=zt+255,ke=Et.transformRequest(ht.replace("{fontstack}",$t).replace("{range}",`${zt}-${Ht}`),"Glyphs"),Fe=yield e.l(ke,new AbortController);if(!Fe||!Fe.data)throw new Error(`Could not load glyph range. range: ${z}, ${zt}-${Ht}`);let Ke={};for(let vr of e.n(Fe.data))Ke[vr.id]=vr;return Ke})},V.TinySDF=class{constructor({fontSize:$t=24,buffer:z=3,radius:ht=8,cutoff:Et=.25,fontFamily:zt="sans-serif",fontWeight:Ht="normal",fontStyle:ke="normal"}={}){this.buffer=z,this.cutoff=Et,this.radius=ht;let Fe=this.size=$t+4*z,Ke=this._createCanvas(Fe),vr=this.ctx=Ke.getContext("2d",{willReadFrequently:!0});vr.font=`${ke} ${Ht} ${$t}px ${zt}`,vr.textBaseline="alphabetic",vr.textAlign="left",vr.fillStyle="black",this.gridOuter=new Float64Array(Fe*Fe),this.gridInner=new Float64Array(Fe*Fe),this.f=new Float64Array(Fe),this.z=new Float64Array(Fe+1),this.v=new Uint16Array(Fe)}_createCanvas($t){let z=document.createElement("canvas");return z.width=z.height=$t,z}draw($t){let{width:z,actualBoundingBoxAscent:ht,actualBoundingBoxDescent:Et,actualBoundingBoxLeft:zt,actualBoundingBoxRight:Ht}=this.ctx.measureText($t),ke=Math.ceil(ht),Fe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Ht-zt))),Ke=Math.min(this.size-this.buffer,ke+Math.ceil(Et)),vr=Fe+2*this.buffer,Dr=Ke+2*this.buffer,Fr=Math.max(vr*Dr,0),un=new Uint8ClampedArray(Fr),Sn={data:un,width:vr,height:Dr,glyphWidth:Fe,glyphHeight:Ke,glyphTop:ke,glyphLeft:0,glyphAdvance:z};if(Fe===0||Ke===0)return Sn;let{ctx:Xt,buffer:ae,gridInner:xe,gridOuter:Ae}=this;Xt.clearRect(ae,ae,Fe,Ke),Xt.fillText($t,ae,ae+ke);let je=Xt.getImageData(ae,ae,Fe,Ke);Ae.fill(R,0,Fr),xe.fill(0,0,Fr);for(let Oe=0;Oe0?Nr*Nr:0,xe[Or]=Nr<0?Nr*Nr:0}}O(Ae,0,0,vr,Dr,vr,this.f,this.v,this.z),O(xe,ae,ae,Fe,Ke,vr,this.f,this.v,this.z);for(let Oe=0;Oe1&&(Ke=z[++Fe]);let Dr=Math.abs(vr-Ke.left),Fr=Math.abs(vr-Ke.right),un=Math.min(Dr,Fr),Sn,Xt=Ht/Et*(zt+1);if(Ke.isDash){let ae=zt-Math.abs(Xt);Sn=Math.sqrt(un*un+ae*ae)}else Sn=zt-Math.sqrt(un*un+Xt*Xt);this.data[ke+vr]=Math.max(0,Math.min(255,Sn+128))}}}addRegularDash(z){for(let Fe=z.length-1;Fe>=0;--Fe){let Ke=z[Fe],vr=z[Fe+1];Ke.zeroLength?z.splice(Fe,1):vr&&vr.isDash===Ke.isDash&&(vr.left=Ke.left,z.splice(Fe,1))}let ht=z[0],Et=z[z.length-1];ht.isDash===Et.isDash&&(ht.left=Et.left-this.width,Et.right=ht.right+this.width);let zt=this.width*this.nextRow,Ht=0,ke=z[Ht];for(let Fe=0;Fe1&&(ke=z[++Ht]);let Ke=Math.abs(Fe-ke.left),vr=Math.abs(Fe-ke.right),Dr=Math.min(Ke,vr);this.data[zt+Fe]=Math.max(0,Math.min(255,(ke.isDash?Dr:-Dr)+128))}}addDash(z,ht){let Et=ht?7:0,zt=2*Et+1;if(this.nextRow+zt>this.height)return e.w("LineAtlas out of space"),null;let Ht=0;for(let Fe=0;Fe{ht.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[lt]}numActive(){return Object.keys(this.active).length}}let mt=Math.floor(o.hardwareConcurrency/2),st,tt;function dt(){return st||(st=new yt),st}yt.workerCount=e.C(globalThis)?Math.max(Math.min(mt,3),1):1;class rt{constructor(z,ht){this.workerPool=z,this.actors=[],this.currentActor=0,this.id=ht;let Et=this.workerPool.acquire(ht);for(let zt=0;zt{ht.remove()}),this.actors=[],z&&this.workerPool.release(this.id)}registerMessageHandler(z,ht){for(let Et of this.actors)Et.registerMessageHandler(z,ht)}}function at(){return tt||(tt=new rt(dt(),e.G),tt.registerMessageHandler("GR",($t,z,ht)=>e.m(z,ht))),tt}function vt($t,z){let ht=e.H();return e.J(ht,ht,[1,1,0]),e.K(ht,ht,[.5*$t.width,.5*$t.height,1]),e.L(ht,ht,$t.calculatePosMatrix(z.toUnwrapped()))}function it($t,z,ht,Et,zt,Ht){let ke=function(Fr,un,Sn){if(Fr)for(let Xt of Fr){let ae=un[Xt];if(ae&&ae.source===Sn&&ae.type==="fill-extrusion")return!0}else for(let Xt in un){let ae=un[Xt];if(ae.source===Sn&&ae.type==="fill-extrusion")return!0}return!1}(zt&&zt.layers,z,$t.id),Fe=Ht.maxPitchScaleFactor(),Ke=$t.tilesIn(Et,Fe,ke);Ke.sort(Y);let vr=[];for(let Fr of Ke)vr.push({wrappedTileID:Fr.tileID.wrapped().key,queryResults:Fr.tile.queryRenderedFeatures(z,ht,$t._state,Fr.queryGeometry,Fr.cameraQueryGeometry,Fr.scale,zt,Ht,Fe,vt($t.transform,Fr.tileID))});let Dr=function(Fr){let un={},Sn={};for(let Xt of Fr){let ae=Xt.queryResults,xe=Xt.wrappedTileID,Ae=Sn[xe]=Sn[xe]||{};for(let je in ae){let Oe=ae[je],$e=Ae[je]=Ae[je]||{},wr=un[je]=un[je]||[];for(let Or of Oe)$e[Or.featureIndex]||($e[Or.featureIndex]=!0,wr.push(Or))}}return un}(vr);for(let Fr in Dr)Dr[Fr].forEach(un=>{let Sn=un.feature,Xt=$t.getFeatureState(Sn.layer["source-layer"],Sn.id);Sn.source=Sn.layer.source,Sn.layer["source-layer"]&&(Sn.sourceLayer=Sn.layer["source-layer"]),Sn.state=Xt});return Dr}function Y($t,z){let ht=$t.tileID,Et=z.tileID;return ht.overscaledZ-Et.overscaledZ||ht.canonical.y-Et.canonical.y||ht.wrap-Et.wrap||ht.canonical.x-Et.canonical.x}function ft($t,z,ht){return e._(this,void 0,void 0,function*(){let Et=$t;if($t.url?Et=(yield e.h(z.transformRequest($t.url,"Source"),ht)).data:yield o.frameAsync(ht),!Et)return null;let zt=e.M(e.e(Et,$t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Et&&Et.vector_layers&&(zt.vectorLayerIds=Et.vector_layers.map(Ht=>Ht.id)),zt})}class ut{constructor(z,ht){z&&(ht?this.setSouthWest(z).setNorthEast(ht):Array.isArray(z)&&(z.length===4?this.setSouthWest([z[0],z[1]]).setNorthEast([z[2],z[3]]):this.setSouthWest(z[0]).setNorthEast(z[1])))}setNorthEast(z){return this._ne=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}setSouthWest(z){return this._sw=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}extend(z){let ht=this._sw,Et=this._ne,zt,Ht;if(z instanceof e.N)zt=z,Ht=z;else{if(!(z instanceof ut))return Array.isArray(z)?z.length===4||z.every(Array.isArray)?this.extend(ut.convert(z)):this.extend(e.N.convert(z)):z&&("lng"in z||"lon"in z)&&"lat"in z?this.extend(e.N.convert(z)):this;if(zt=z._sw,Ht=z._ne,!zt||!Ht)return this}return ht||Et?(ht.lng=Math.min(zt.lng,ht.lng),ht.lat=Math.min(zt.lat,ht.lat),Et.lng=Math.max(Ht.lng,Et.lng),Et.lat=Math.max(Ht.lat,Et.lat)):(this._sw=new e.N(zt.lng,zt.lat),this._ne=new e.N(Ht.lng,Ht.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(z){let{lng:ht,lat:Et}=e.N.convert(z),zt=this._sw.lng<=ht&&ht<=this._ne.lng;return this._sw.lng>this._ne.lng&&(zt=this._sw.lng>=ht&&ht>=this._ne.lng),this._sw.lat<=Et&&Et<=this._ne.lat&&zt}static convert(z){return z instanceof ut?z:z&&new ut(z)}static fromLngLat(z,ht=0){let Et=360*ht/40075017,zt=Et/Math.cos(Math.PI/180*z.lat);return new ut(new e.N(z.lng-zt,z.lat-Et),new e.N(z.lng+zt,z.lat+Et))}adjustAntiMeridian(){let z=new e.N(this._sw.lng,this._sw.lat),ht=new e.N(this._ne.lng,this._ne.lat);return new ut(z,z.lng>ht.lng?new e.N(ht.lng+360,ht.lat):ht)}}class kt{constructor(z,ht,Et){this.bounds=ut.convert(this.validateBounds(z)),this.minzoom=ht||0,this.maxzoom=Et||24}validateBounds(z){return Array.isArray(z)&&z.length===4?[Math.max(-180,z[0]),Math.max(-90,z[1]),Math.min(180,z[2]),Math.min(90,z[3])]:[-180,-90,180,90]}contains(z){let ht=Math.pow(2,z.z),Et=Math.floor(e.O(this.bounds.getWest())*ht),zt=Math.floor(e.Q(this.bounds.getNorth())*ht),Ht=Math.ceil(e.O(this.bounds.getEast())*ht),ke=Math.ceil(e.Q(this.bounds.getSouth())*ht);return z.x>=Et&&z.x=zt&&z.y{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et={request:this.map._requestManager.transformRequest(ht,"Tile"),uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,tileSize:this.tileSize*z.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Et.request.collectResourceTiming=this._collectResourceTiming;let zt="RT";if(z.actor&&z.state!=="expired"){if(z.state==="loading")return new Promise((Ht,ke)=>{z.reloadPromise={resolve:Ht,reject:ke}})}else z.actor=this.dispatcher.getActor(),zt="LT";z.abortController=new AbortController;try{let Ht=yield z.actor.sendAsync({type:zt,data:Et},z.abortController);if(delete z.abortController,z.aborted)return;this._afterTileLoadWorkerResponse(z,Ht)}catch(Ht){if(delete z.abortController,z.aborted)return;if(Ht&&Ht.status!==404)throw Ht;this._afterTileLoadWorkerResponse(z,null)}})}_afterTileLoadWorkerResponse(z,ht){if(ht&&ht.resourceTiming&&(z.resourceTiming=ht.resourceTiming),ht&&this.map._refreshExpiredTiles&&z.setExpiryData(ht),z.loadVectorData(ht,this.map.painter),z.reloadPromise){let Et=z.reloadPromise;z.reloadPromise=null,this.loadTile(z).then(Et.resolve).catch(Et.reject)}}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.actor&&(yield z.actor.sendAsync({type:"AT",data:{uid:z.uid,type:this.type,source:this.id}}))})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),z.actor&&(yield z.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Pt extends e.E{constructor(z,ht,Et,zt){super(),this.id=z,this.dispatcher=Et,this.setEventedParent(zt),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},ht),e.e(this,e.M(ht,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let z=yield ft(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,z&&(e.e(this,z),z.bounds&&(this.tileBounds=new kt(z.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(z){this._tileJSONRequest=null,this.fire(new e.j(z))}})}loaded(){return this._loaded}onAdd(z){this.map=z,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(z){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),z(),this.load()}setTiles(z){return this.setSourceProperty(()=>{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}serialize(){return e.e({},this._options)}hasTile(z){return!this.tileBounds||this.tileBounds.contains(z.canonical)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);z.abortController=new AbortController;try{let Et=yield u.getImage(this.map._requestManager.transformRequest(ht,"Tile"),z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(Et&&Et.data){this.map._refreshExpiredTiles&&Et.cacheControl&&Et.expires&&z.setExpiryData({cacheControl:Et.cacheControl,expires:Et.expires});let zt=this.map.painter.context,Ht=zt.gl,ke=Et.data;z.texture=this.map.painter.getTileTexture(ke.width),z.texture?z.texture.update(ke,{useMipmap:!0}):(z.texture=new p(zt,ke,Ht.RGBA,{useMipmap:!0}),z.texture.bind(Ht.LINEAR,Ht.CLAMP_TO_EDGE,Ht.LINEAR_MIPMAP_NEAREST)),z.state="loaded"}}catch(Et){if(delete z.abortController,z.aborted)z.state="unloaded";else if(Et)throw z.state="errored",Et}})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController)})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.texture&&this.map.painter.saveTileTexture(z.texture)})}hasTransition(){return!1}}class qt extends Pt{constructor(z,ht,Et,zt){super(z,ht,Et,zt),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},ht),this.encoding=ht.encoding||"mapbox",this.redFactor=ht.redFactor,this.greenFactor=ht.greenFactor,this.blueFactor=ht.blueFactor,this.baseShift=ht.baseShift}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et=this.map._requestManager.transformRequest(ht,"Tile");z.neighboringTiles=this._getNeighboringTiles(z.tileID),z.abortController=new AbortController;try{let zt=yield u.getImage(Et,z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(zt&&zt.data){let Ht=zt.data;this.map._refreshExpiredTiles&&zt.cacheControl&&zt.expires&&z.setExpiryData({cacheControl:zt.cacheControl,expires:zt.expires});let ke=e.b(Ht)&&e.U()?Ht:yield this.readImageNow(Ht),Fe={type:this.type,uid:z.uid,source:this.id,rawImageData:ke,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!z.actor||z.state==="expired"){z.actor=this.dispatcher.getActor();let Ke=yield z.actor.sendAsync({type:"LDT",data:Fe});z.dem=Ke,z.needsHillshadePrepare=!0,z.needsTerrainPrepare=!0,z.state="loaded"}}}catch(zt){if(delete z.abortController,z.aborted)z.state="unloaded";else if(zt)throw z.state="errored",zt}})}readImageNow(z){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let ht=z.width+2,Et=z.height+2;try{return new e.R({width:ht,height:Et},yield e.W(z,-1,-1,ht,Et))}catch{}}return o.getImageData(z,1)})}_getNeighboringTiles(z){let ht=z.canonical,Et=Math.pow(2,ht.z),zt=(ht.x-1+Et)%Et,Ht=ht.x===0?z.wrap-1:z.wrap,ke=(ht.x+1+Et)%Et,Fe=ht.x+1===Et?z.wrap+1:z.wrap,Ke={};return Ke[new e.S(z.overscaledZ,Ht,ht.z,zt,ht.y).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,ke,ht.y).key]={backfilled:!1},ht.y>0&&(Ke[new e.S(z.overscaledZ,Ht,ht.z,zt,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,z.wrap,ht.z,ht.x,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,ke,ht.y-1).key]={backfilled:!1}),ht.y+10&&e.e(Ht,{resourceTiming:zt}),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"content"})))}catch(Et){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(Et))}})}loaded(){return this._pendingLoads===0}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.actor?"RT":"LT";z.actor=this.actor;let Et={type:this.type,uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};z.abortController=new AbortController;let zt=yield this.actor.sendAsync({type:ht,data:Et},z.abortController);delete z.abortController,z.unloadVectorData(),z.aborted||z.loadVectorData(zt,this.map.painter,ht==="RT")})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.aborted=!0})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Jt=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ge extends e.E{constructor(z,ht,Et,zt){super(),this.id=z,this.dispatcher=Et,this.coordinates=ht.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(zt),this.options=ht}load(z){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ht=yield u.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ht&&ht.data&&(this.image=ht.data,z&&(this.coordinates=z),this._finishLoading())}catch(ht){this._request=null,this._loaded=!0,this.fire(new e.j(ht))}})}loaded(){return this._loaded}updateImage(z){return z.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=z.url,this.load(z.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(z){this.map=z,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(z){this.coordinates=z;let ht=z.map(e.Z.fromLngLat);this.tileID=function(zt){let Ht=1/0,ke=1/0,Fe=-1/0,Ke=-1/0;for(let un of zt)Ht=Math.min(Ht,un.x),ke=Math.min(ke,un.y),Fe=Math.max(Fe,un.x),Ke=Math.max(Ke,un.y);let vr=Math.max(Fe-Ht,Ke-ke),Dr=Math.max(0,Math.floor(-Math.log(vr)/Math.LN2)),Fr=Math.pow(2,Dr);return new e.a1(Dr,Math.floor((Ht+Fe)/2*Fr),Math.floor((ke+Ke)/2*Fr))}(ht),this.minzoom=this.maxzoom=this.tileID.z;let Et=ht.map(zt=>this.tileID.getTilePoint(zt)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(Et[0].x,Et[0].y,0,0),this._boundsArray.emplaceBack(Et[1].x,Et[1].y,e.X,0),this._boundsArray.emplaceBack(Et[3].x,Et[3].y,0,e.X),this._boundsArray.emplaceBack(Et[2].x,Et[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(z,this.image,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let zt in this.tiles){let Ht=this.tiles[zt];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(z){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(z.tileID.canonical)?(this.tiles[String(z.tileID.wrap)]=z,z.buckets={}):z.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class fe extends ge{constructor(z,ht,Et,zt){super(z,ht,Et,zt),this.roundZoom=!0,this.type="video",this.options=ht}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let z=this.options;this.urls=[];for(let ht of z.urls)this.urls.push(this.map._requestManager.transformRequest(ht,"Source").url);try{let ht=yield e.a3(this.urls);if(this._loaded=!0,!ht)return;this.video=ht,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ht){this.fire(new e.j(ht))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(z){if(this.video){let ht=this.video.seekable;zht.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ht.start(0)} and ${ht.end(0)}-second mark.`))):this.video.currentTime=z}}getVideo(){return this.video}onAdd(z){this.map||(this.map=z,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),ht.texSubImage2D(ht.TEXTURE_2D,0,0,0,ht.RGBA,ht.UNSIGNED_BYTE,this.video)):(this.texture=new p(z,this.video,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let zt in this.tiles){let Ht=this.tiles[zt];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class pe extends ge{constructor(z,ht,Et,zt){super(z,ht,Et,zt),ht.coordinates?Array.isArray(ht.coordinates)&&ht.coordinates.length===4&&!ht.coordinates.some(Ht=>!Array.isArray(Ht)||Ht.length!==2||Ht.some(ke=>typeof ke!="number"))||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "coordinates"'))),ht.animate&&typeof ht.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${z}`,null,'optional "animate" property must be a boolean value'))),ht.canvas?typeof ht.canvas=="string"||ht.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "canvas"'))),this.options=ht,this.animate=ht.animate===void 0||ht.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(z){this.map=z,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let z=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,z=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,z=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ht=this.map.painter.context,Et=ht.gl;this.boundsBuffer||(this.boundsBuffer=ht.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(z||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(ht,this.canvas,Et.RGBA,{premultiply:!0});let zt=!1;for(let Ht in this.tiles){let ke=this.tiles[Ht];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture,zt=!0)}zt&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let z of[this.canvas.width,this.canvas.height])if(isNaN(z)||z<=0)return!0;return!1}}let se={},Tt=$t=>{switch($t){case"geojson":return Wt;case"image":return ge;case"raster":return Pt;case"raster-dem":return qt;case"vector":return It;case"video":return fe;case"canvas":return pe}return se[$t]},Lt="RTLPluginLoaded";class Mt extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(z){return this.status=z,this.dispatcher.broadcast("SRPS",{pluginStatus:z,pluginURL:this.url}).catch(ht=>{throw this.status="error",ht})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(z){return e._(this,arguments,void 0,function*(ht,Et=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=o.resolveURL(ht),!this.url)throw new Error(`requested url ${ht} is invalid`);if(this.status==="unavailable"){if(!Et)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(Lt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ee=null;function ve(){return ee||(ee=new Mt),ee}class oe{constructor(z,ht){this.timeAdded=0,this.fadeEndTime=0,this.tileID=z,this.uid=e.a4(),this.uses=0,this.tileSize=ht,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(z){let ht=z+this.timeAdded;htHt.getLayer(vr)).filter(Boolean);if(Ke.length!==0){Fe.layers=Ke,Fe.stateDependentLayerIds&&(Fe.stateDependentLayers=Fe.stateDependentLayerIds.map(vr=>Ke.filter(Dr=>Dr.id===vr)[0]));for(let vr of Ke)ke[vr.id]=Fe}}return ke}(z.buckets,ht.style),this.hasSymbolBuckets=!1;for(let zt in this.buckets){let Ht=this.buckets[zt];if(Ht instanceof e.a6){if(this.hasSymbolBuckets=!0,!Et)break;Ht.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let zt in this.buckets){let Ht=this.buckets[zt];if(Ht instanceof e.a6&&Ht.hasRTLText){this.hasRTLText=!0,ve().lazyLoad();break}}this.queryPadding=0;for(let zt in this.buckets){let Ht=this.buckets[zt];this.queryPadding=Math.max(this.queryPadding,ht.style.getLayer(zt).queryRadius(Ht))}z.imageAtlas&&(this.imageAtlas=z.imageAtlas),z.glyphAtlasImage&&(this.glyphAtlasImage=z.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let z in this.buckets)this.buckets[z].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(z){return this.buckets[z.id]}upload(z){for(let Et in this.buckets){let zt=this.buckets[Et];zt.uploadPending()&&zt.upload(z)}let ht=z.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(z,this.imageAtlas.image,ht.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(z,this.glyphAtlasImage,ht.ALPHA),this.glyphAtlasImage=null)}prepare(z){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(z,this.imageAtlasTexture)}queryRenderedFeatures(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:zt,cameraQueryGeometry:Ht,scale:ke,tileSize:this.tileSize,pixelPosMatrix:Dr,transform:Ke,params:Fe,queryPadding:this.queryPadding*vr},z,ht,Et):{}}querySourceFeatures(z,ht){let Et=this.latestFeatureIndex;if(!Et||!Et.rawTileData)return;let zt=Et.loadVTLayers(),Ht=ht&&ht.sourceLayer?ht.sourceLayer:"",ke=zt._geojsonTileLayer||zt[Ht];if(!ke)return;let Fe=e.a7(ht&&ht.filter),{z:Ke,x:vr,y:Dr}=this.tileID.canonical,Fr={z:Ke,x:vr,y:Dr};for(let un=0;unEt)zt=!1;else if(ht)if(this.expirationTime{this.remove(z,Ht)},Et)),this.data[zt].push(Ht),this.order.push(zt),this.order.length>this.max){let ke=this._getAndRemoveByKey(this.order[0]);ke&&this.onRemove(ke)}return this}has(z){return z.wrapped().key in this.data}getAndRemove(z){return this.has(z)?this._getAndRemoveByKey(z.wrapped().key):null}_getAndRemoveByKey(z){let ht=this.data[z].shift();return ht.timeout&&clearTimeout(ht.timeout),this.data[z].length===0&&delete this.data[z],this.order.splice(this.order.indexOf(z),1),ht.value}getByKey(z){let ht=this.data[z];return ht?ht[0].value:null}get(z){return this.has(z)?this.data[z.wrapped().key][0].value:null}remove(z,ht){if(!this.has(z))return this;let Et=z.wrapped().key,zt=ht===void 0?0:this.data[Et].indexOf(ht),Ht=this.data[Et][zt];return this.data[Et].splice(zt,1),Ht.timeout&&clearTimeout(Ht.timeout),this.data[Et].length===0&&delete this.data[Et],this.onRemove(Ht.value),this.order.splice(this.order.indexOf(Et),1),this}setMaxSize(z){for(this.max=z;this.order.length>this.max;){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}filter(z){let ht=[];for(let Et in this.data)for(let zt of this.data[Et])z(zt.value)||ht.push(zt);for(let Et of ht)this.remove(Et.value.tileID,Et)}}class He{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(z,ht,Et){let zt=String(ht);if(this.stateChanges[z]=this.stateChanges[z]||{},this.stateChanges[z][zt]=this.stateChanges[z][zt]||{},e.e(this.stateChanges[z][zt],Et),this.deletedStates[z]===null){this.deletedStates[z]={};for(let Ht in this.state[z])Ht!==zt&&(this.deletedStates[z][Ht]=null)}else if(this.deletedStates[z]&&this.deletedStates[z][zt]===null){this.deletedStates[z][zt]={};for(let Ht in this.state[z][zt])Et[Ht]||(this.deletedStates[z][zt][Ht]=null)}else for(let Ht in Et)this.deletedStates[z]&&this.deletedStates[z][zt]&&this.deletedStates[z][zt][Ht]===null&&delete this.deletedStates[z][zt][Ht]}removeFeatureState(z,ht,Et){if(this.deletedStates[z]===null)return;let zt=String(ht);if(this.deletedStates[z]=this.deletedStates[z]||{},Et&&ht!==void 0)this.deletedStates[z][zt]!==null&&(this.deletedStates[z][zt]=this.deletedStates[z][zt]||{},this.deletedStates[z][zt][Et]=null);else if(ht!==void 0)if(this.stateChanges[z]&&this.stateChanges[z][zt])for(Et in this.deletedStates[z][zt]={},this.stateChanges[z][zt])this.deletedStates[z][zt][Et]=null;else this.deletedStates[z][zt]=null;else this.deletedStates[z]=null}getState(z,ht){let Et=String(ht),zt=e.e({},(this.state[z]||{})[Et],(this.stateChanges[z]||{})[Et]);if(this.deletedStates[z]===null)return{};if(this.deletedStates[z]){let Ht=this.deletedStates[z][ht];if(Ht===null)return{};for(let ke in Ht)delete zt[ke]}return zt}initializeTileState(z,ht){z.setFeatureState(this.state,ht)}coalesceChanges(z,ht){let Et={};for(let zt in this.stateChanges){this.state[zt]=this.state[zt]||{};let Ht={};for(let ke in this.stateChanges[zt])this.state[zt][ke]||(this.state[zt][ke]={}),e.e(this.state[zt][ke],this.stateChanges[zt][ke]),Ht[ke]=this.state[zt][ke];Et[zt]=Ht}for(let zt in this.deletedStates){this.state[zt]=this.state[zt]||{};let Ht={};if(this.deletedStates[zt]===null)for(let ke in this.state[zt])Ht[ke]={},this.state[zt][ke]={};else for(let ke in this.deletedStates[zt]){if(this.deletedStates[zt][ke]===null)this.state[zt][ke]={};else for(let Fe of Object.keys(this.deletedStates[zt][ke]))delete this.state[zt][ke][Fe];Ht[ke]=this.state[zt][ke]}Et[zt]=Et[zt]||{},e.e(Et[zt],Ht)}if(this.stateChanges={},this.deletedStates={},Object.keys(Et).length!==0)for(let zt in z)z[zt].setFeatureState(Et,ht)}}class Ge extends e.E{constructor(z,ht,Et){super(),this.id=z,this.dispatcher=Et,this.on("data",zt=>this._dataHandler(zt)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((zt,Ht,ke,Fe)=>{let Ke=new(Tt(Ht.type))(zt,Ht,ke,Fe);if(Ke.id!==zt)throw new Error(`Expected Source id to be ${zt} instead of ${Ke.id}`);return Ke})(z,ht,Et,this),this._tiles={},this._cache=new Te(0,zt=>this._unloadTile(zt)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new He,this._didEmitContent=!1,this._updated=!1}onAdd(z){this.map=z,this._maxTileCacheSize=z?z._maxTileCacheSize:null,this._maxTileCacheZoomLevels=z?z._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(z)}onRemove(z){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(z)}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 z in this._tiles){let ht=this._tiles[z];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let z=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,z&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(z,ht,Et){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(z),this._tileLoaded(z,ht,Et)}catch(zt){z.state="errored",zt.status!==404?this._source.fire(new e.j(zt,{tile:z})):this.update(this.transform,this.terrain)}})}_unloadTile(z){this._source.unloadTile&&this._source.unloadTile(z)}_abortTile(z){this._source.abortTile&&this._source.abortTile(z),this._source.fire(new e.k("dataabort",{tile:z,coord:z.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(z){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ht in this._tiles){let Et=this._tiles[ht];Et.upload(z),Et.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(z=>z.tileID).sort(cr).map(z=>z.key)}getRenderableIds(z){let ht=[];for(let Et in this._tiles)this._isIdRenderable(Et,z)&&ht.push(this._tiles[Et]);return z?ht.sort((Et,zt)=>{let Ht=Et.tileID,ke=zt.tileID,Fe=new e.P(Ht.canonical.x,Ht.canonical.y)._rotate(this.transform.angle),Ke=new e.P(ke.canonical.x,ke.canonical.y)._rotate(this.transform.angle);return Ht.overscaledZ-ke.overscaledZ||Ke.y-Fe.y||Ke.x-Fe.x}).map(Et=>Et.tileID.key):ht.map(Et=>Et.tileID).sort(cr).map(Et=>Et.key)}hasRenderableParent(z){let ht=this.findLoadedParent(z,0);return!!ht&&this._isIdRenderable(ht.tileID.key)}_isIdRenderable(z,ht){return this._tiles[z]&&this._tiles[z].hasData()&&!this._coveredTiles[z]&&(ht||!this._tiles[z].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let z in this._tiles)this._tiles[z].state!=="errored"&&this._reloadTile(z,"reloading")}}_reloadTile(z,ht){return e._(this,void 0,void 0,function*(){let Et=this._tiles[z];Et&&(Et.state!=="loading"&&(Et.state=ht),yield this._loadTile(Et,z,ht))})}_tileLoaded(z,ht,Et){z.timeAdded=o.now(),Et==="expired"&&(z.refreshedUponExpiration=!0),this._setTileReloadTimer(ht,z),this.getSource().type==="raster-dem"&&z.dem&&this._backfillDEM(z),this._state.initializeTileState(z,this.map?this.map.painter:null),z.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:z,coord:z.tileID}))}_backfillDEM(z){let ht=this.getRenderableIds();for(let zt=0;zt1||(Math.abs(ke)>1&&(Math.abs(ke+Ke)===1?ke+=Ke:Math.abs(ke-Ke)===1&&(ke-=Ke)),Ht.dem&&zt.dem&&(zt.dem.backfillBorder(Ht.dem,ke,Fe),zt.neighboringTiles&&zt.neighboringTiles[vr]&&(zt.neighboringTiles[vr].backfilled=!0)))}}getTile(z){return this.getTileByID(z.key)}getTileByID(z){return this._tiles[z]}_retainLoadedChildren(z,ht,Et,zt){for(let Ht in this._tiles){let ke=this._tiles[Ht];if(zt[Ht]||!ke.hasData()||ke.tileID.overscaledZ<=ht||ke.tileID.overscaledZ>Et)continue;let Fe=ke.tileID;for(;ke&&ke.tileID.overscaledZ>ht+1;){let vr=ke.tileID.scaledTo(ke.tileID.overscaledZ-1);ke=this._tiles[vr.key],ke&&ke.hasData()&&(Fe=vr)}let Ke=Fe;for(;Ke.overscaledZ>ht;)if(Ke=Ke.scaledTo(Ke.overscaledZ-1),z[Ke.key]){zt[Fe.key]=Fe;break}}}findLoadedParent(z,ht){if(z.key in this._loadedParentTiles){let Et=this._loadedParentTiles[z.key];return Et&&Et.tileID.overscaledZ>=ht?Et:null}for(let Et=z.overscaledZ-1;Et>=ht;Et--){let zt=z.scaledTo(Et),Ht=this._getLoadedTile(zt);if(Ht)return Ht}}findLoadedSibling(z){return this._getLoadedTile(z)}_getLoadedTile(z){let ht=this._tiles[z.key];return ht&&ht.hasData()?ht:this._cache.getByKey(z.wrapped().key)}updateCacheSize(z){let ht=Math.ceil(z.width/this._source.tileSize)+1,Et=Math.ceil(z.height/this._source.tileSize)+1,zt=Math.floor(ht*Et*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,zt):zt;this._cache.setMaxSize(Ht)}handleWrapJump(z){let ht=Math.round((z-(this._prevLng===void 0?z:this._prevLng))/360);if(this._prevLng=z,ht){let Et={};for(let zt in this._tiles){let Ht=this._tiles[zt];Ht.tileID=Ht.tileID.unwrapTo(Ht.tileID.wrap+ht),Et[Ht.tileID.key]=Ht}this._tiles=Et;for(let zt in this._timers)clearTimeout(this._timers[zt]),delete this._timers[zt];for(let zt in this._tiles)this._setTileReloadTimer(zt,this._tiles[zt])}}_updateCoveredAndRetainedTiles(z,ht,Et,zt,Ht,ke){let Fe={},Ke={},vr=Object.keys(z),Dr=o.now();for(let Fr of vr){let un=z[Fr],Sn=this._tiles[Fr];if(!Sn||Sn.fadeEndTime!==0&&Sn.fadeEndTime<=Dr)continue;let Xt=this.findLoadedParent(un,ht),ae=this.findLoadedSibling(un),xe=Xt||ae||null;xe&&(this._addTile(xe.tileID),Fe[xe.tileID.key]=xe.tileID),Ke[Fr]=un}this._retainLoadedChildren(Ke,zt,Et,z);for(let Fr in Fe)z[Fr]||(this._coveredTiles[Fr]=!0,z[Fr]=Fe[Fr]);if(ke){let Fr={},un={};for(let Sn of Ht)this._tiles[Sn.key].hasData()?Fr[Sn.key]=Sn:un[Sn.key]=Sn;for(let Sn in un){let Xt=un[Sn].children(this._source.maxzoom);this._tiles[Xt[0].key]&&this._tiles[Xt[1].key]&&this._tiles[Xt[2].key]&&this._tiles[Xt[3].key]&&(Fr[Xt[0].key]=z[Xt[0].key]=Xt[0],Fr[Xt[1].key]=z[Xt[1].key]=Xt[1],Fr[Xt[2].key]=z[Xt[2].key]=Xt[2],Fr[Xt[3].key]=z[Xt[3].key]=Xt[3],delete un[Sn])}for(let Sn in un){let Xt=un[Sn],ae=this.findLoadedParent(Xt,this._source.minzoom),xe=this.findLoadedSibling(Xt),Ae=ae||xe||null;if(Ae){Fr[Ae.tileID.key]=z[Ae.tileID.key]=Ae.tileID;for(let je in Fr)Fr[je].isChildOf(Ae.tileID)&&delete Fr[je]}}for(let Sn in this._tiles)Fr[Sn]||(this._coveredTiles[Sn]=!0)}}update(z,ht){if(!this._sourceLoaded||this._paused)return;let Et;this.transform=z,this.terrain=ht,this.updateCacheSize(z),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Et=z.getVisibleUnwrappedCoordinates(this._source.tileID).map(Dr=>new e.S(Dr.canonical.z,Dr.wrap,Dr.canonical.z,Dr.canonical.x,Dr.canonical.y)):(Et=z.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ht}),this._source.hasTile&&(Et=Et.filter(Dr=>this._source.hasTile(Dr)))):Et=[];let zt=z.coveringZoomLevel(this._source),Ht=Math.max(zt-Ge.maxOverzooming,this._source.minzoom),ke=Math.max(zt+Ge.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Dr={};for(let Fr of Et)if(Fr.canonical.z>this._source.minzoom){let un=Fr.scaledTo(Fr.canonical.z-1);Dr[un.key]=un;let Sn=Fr.scaledTo(Math.max(this._source.minzoom,Math.min(Fr.canonical.z,5)));Dr[Sn.key]=Sn}Et=Et.concat(Object.values(Dr))}let Fe=Et.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Fe&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ke=this._updateRetainedTiles(Et,zt);ur(this._source.type)&&this._updateCoveredAndRetainedTiles(Ke,Ht,ke,zt,Et,ht);for(let Dr in Ke)this._tiles[Dr].clearFadeHold();let vr=e.ab(this._tiles,Ke);for(let Dr of vr){let Fr=this._tiles[Dr];Fr.hasSymbolBuckets&&!Fr.holdingForFade()?Fr.setHoldDuration(this.map._fadeDuration):Fr.hasSymbolBuckets&&!Fr.symbolFadeFinished()||this._removeTile(Dr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let z in this._tiles)this._tiles[z].holdingForFade()&&this._removeTile(z)}_updateRetainedTiles(z,ht){var Et;let zt={},Ht={},ke=Math.max(ht-Ge.maxOverzooming,this._source.minzoom),Fe=Math.max(ht+Ge.maxUnderzooming,this._source.minzoom),Ke={};for(let vr of z){let Dr=this._addTile(vr);zt[vr.key]=vr,Dr.hasData()||htthis._source.maxzoom){let un=vr.children(this._source.maxzoom)[0],Sn=this.getTile(un);if(Sn&&Sn.hasData()){zt[un.key]=un;continue}}else{let un=vr.children(this._source.maxzoom);if(zt[un[0].key]&&zt[un[1].key]&&zt[un[2].key]&&zt[un[3].key])continue}let Fr=Dr.wasRequested();for(let un=vr.overscaledZ-1;un>=ke;--un){let Sn=vr.scaledTo(un);if(Ht[Sn.key])break;if(Ht[Sn.key]=!0,Dr=this.getTile(Sn),!Dr&&Fr&&(Dr=this._addTile(Sn)),Dr){let Xt=Dr.hasData();if((Xt||!(!((Et=this.map)===null||Et===void 0)&&Et.cancelPendingTileRequestsWhileZooming)||Fr)&&(zt[Sn.key]=Sn),Fr=Dr.wasRequested(),Xt)break}}}return zt}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let z in this._tiles){let ht=[],Et,zt=this._tiles[z].tileID;for(;zt.overscaledZ>0;){if(zt.key in this._loadedParentTiles){Et=this._loadedParentTiles[zt.key];break}ht.push(zt.key);let Ht=zt.scaledTo(zt.overscaledZ-1);if(Et=this._getLoadedTile(Ht),Et)break;zt=Ht}for(let Ht of ht)this._loadedParentTiles[Ht]=Et}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let z in this._tiles){let ht=this._tiles[z].tileID,Et=this._getLoadedTile(ht);this._loadedSiblingTiles[ht.key]=Et}}_addTile(z){let ht=this._tiles[z.key];if(ht)return ht;ht=this._cache.getAndRemove(z),ht&&(this._setTileReloadTimer(z.key,ht),ht.tileID=z,this._state.initializeTileState(ht,this.map?this.map.painter:null),this._cacheTimers[z.key]&&(clearTimeout(this._cacheTimers[z.key]),delete this._cacheTimers[z.key],this._setTileReloadTimer(z.key,ht)));let Et=ht;return ht||(ht=new oe(z,this._source.tileSize*z.overscaleFactor()),this._loadTile(ht,z.key,ht.state)),ht.uses++,this._tiles[z.key]=ht,Et||this._source.fire(new e.k("dataloading",{tile:ht,coord:ht.tileID,dataType:"source"})),ht}_setTileReloadTimer(z,ht){z in this._timers&&(clearTimeout(this._timers[z]),delete this._timers[z]);let Et=ht.getExpiryTimeout();Et&&(this._timers[z]=setTimeout(()=>{this._reloadTile(z,"expired"),delete this._timers[z]},Et))}_removeTile(z){let ht=this._tiles[z];ht&&(ht.uses--,delete this._tiles[z],this._timers[z]&&(clearTimeout(this._timers[z]),delete this._timers[z]),ht.uses>0||(ht.hasData()&&ht.state!=="reloading"?this._cache.add(ht.tileID,ht,ht.getExpiryTimeout()):(ht.aborted=!0,this._abortTile(ht),this._unloadTile(ht))))}_dataHandler(z){let ht=z.sourceDataType;z.dataType==="source"&&ht==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&z.dataType==="source"&&ht==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let z in this._tiles)this._removeTile(z);this._cache.reset()}tilesIn(z,ht,Et){let zt=[],Ht=this.transform;if(!Ht)return zt;let ke=Et?Ht.getCameraQueryGeometry(z):z,Fe=z.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),Ke=ke.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),vr=this.getIds(),Dr=1/0,Fr=1/0,un=-1/0,Sn=-1/0;for(let Xt of Ke)Dr=Math.min(Dr,Xt.x),Fr=Math.min(Fr,Xt.y),un=Math.max(un,Xt.x),Sn=Math.max(Sn,Xt.y);for(let Xt=0;Xt=0&&Oe[1].y+je>=0){let $e=Fe.map(Or=>xe.getTilePoint(Or)),wr=Ke.map(Or=>xe.getTilePoint(Or));zt.push({tile:ae,tileID:xe,queryGeometry:$e,cameraQueryGeometry:wr,scale:Ae})}}return zt}getVisibleCoordinates(z){let ht=this.getRenderableIds(z).map(Et=>this._tiles[Et].tileID);for(let Et of ht)Et.posMatrix=this.transform.calculatePosMatrix(Et.toUnwrapped());return ht}hasTransition(){if(this._source.hasTransition())return!0;if(ur(this._source.type)){let z=o.now();for(let ht in this._tiles)if(this._tiles[ht].fadeEndTime>=z)return!0}return!1}setFeatureState(z,ht,Et){this._state.updateState(z=z||"_geojsonTileLayer",ht,Et)}removeFeatureState(z,ht,Et){this._state.removeFeatureState(z=z||"_geojsonTileLayer",ht,Et)}getFeatureState(z,ht){return this._state.getState(z=z||"_geojsonTileLayer",ht)}setDependencies(z,ht,Et){let zt=this._tiles[z];zt&&zt.setDependencies(ht,Et)}reloadTilesForDependencies(z,ht){for(let Et in this._tiles)this._tiles[Et].hasDependency(z,ht)&&this._reloadTile(Et,"reloading");this._cache.filter(Et=>!Et.hasDependency(z,ht))}}function cr($t,z){let ht=Math.abs(2*$t.wrap)-+($t.wrap<0),Et=Math.abs(2*z.wrap)-+(z.wrap<0);return $t.overscaledZ-z.overscaledZ||Et-ht||z.canonical.y-$t.canonical.y||z.canonical.x-$t.canonical.x}function ur($t){return $t==="raster"||$t==="image"||$t==="video"}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;class jr{constructor(z,ht){this.reset(z,ht)}reset(z,ht){this.points=z||[],this._distances=[0];for(let Et=1;Et0?(zt-ke)/Fe:0;return this.points[Ht].mult(1-Ke).add(this.points[ht].mult(Ke))}}function Wr($t,z){let ht=!0;return $t==="always"||$t!=="never"&&z!=="never"||(ht=!1),ht}class br{constructor(z,ht,Et){let zt=this.boxCells=[],Ht=this.circleCells=[];this.xCellCount=Math.ceil(z/Et),this.yCellCount=Math.ceil(ht/Et);for(let ke=0;kethis.width||zt<0||ht>this.height)return[];let Ke=[];if(z<=0&&ht<=0&&this.width<=Et&&this.height<=zt){if(Ht)return[{key:null,x1:z,y1:ht,x2:Et,y2:zt}];for(let vr=0;vr0}hitTestCircle(z,ht,Et,zt,Ht){let ke=z-Et,Fe=z+Et,Ke=ht-Et,vr=ht+Et;if(Fe<0||ke>this.width||vr<0||Ke>this.height)return!1;let Dr=[];return this._forEachCell(ke,Ke,Fe,vr,this._queryCellCircle,Dr,{hitTest:!0,overlapMode:zt,circle:{x:z,y:ht,radius:Et},seenUids:{box:{},circle:{}}},Ht),Dr.length>0}_queryCell(z,ht,Et,zt,Ht,ke,Fe,Ke){let{seenUids:vr,hitTest:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!vr.box[ae]){vr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(z<=Xt[xe+2]&&ht<=Xt[xe+3]&&Et>=Xt[xe+0]&&zt>=Xt[xe+1]&&(!Ke||Ke(Ae))&&(!Dr||!Wr(Fr,Ae.overlapMode))&&(ke.push({key:Ae,x1:Xt[xe],y1:Xt[xe+1],x2:Xt[xe+2],y2:Xt[xe+3]}),Dr))return!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!vr.circle[ae]){vr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circleAndRectCollide(Xt[xe],Xt[xe+1],Xt[xe+2],z,ht,Et,zt)&&(!Ke||Ke(Ae))&&(!Dr||!Wr(Fr,Ae.overlapMode))){let je=Xt[xe],Oe=Xt[xe+1],$e=Xt[xe+2];if(ke.push({key:Ae,x1:je-$e,y1:Oe-$e,x2:je+$e,y2:Oe+$e}),Dr)return!0}}}return!1}_queryCellCircle(z,ht,Et,zt,Ht,ke,Fe,Ke){let{circle:vr,seenUids:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!Dr.box[ae]){Dr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(this._circleAndRectCollide(vr.x,vr.y,vr.radius,Xt[xe+0],Xt[xe+1],Xt[xe+2],Xt[xe+3])&&(!Ke||Ke(Ae))&&!Wr(Fr,Ae.overlapMode))return ke.push(!0),!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!Dr.circle[ae]){Dr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circlesCollide(Xt[xe],Xt[xe+1],Xt[xe+2],vr.x,vr.y,vr.radius)&&(!Ke||Ke(Ae))&&!Wr(Fr,Ae.overlapMode))return ke.push(!0),!0}}}_forEachCell(z,ht,Et,zt,Ht,ke,Fe,Ke){let vr=this._convertToXCellCoord(z),Dr=this._convertToYCellCoord(ht),Fr=this._convertToXCellCoord(Et),un=this._convertToYCellCoord(zt);for(let Sn=vr;Sn<=Fr;Sn++)for(let Xt=Dr;Xt<=un;Xt++)if(Ht.call(this,z,ht,Et,zt,this.xCellCount*Xt+Sn,ke,Fe,Ke))return}_convertToXCellCoord(z){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(z*this.xScale)))}_convertToYCellCoord(z){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(z*this.yScale)))}_circlesCollide(z,ht,Et,zt,Ht,ke){let Fe=zt-z,Ke=Ht-ht,vr=Et+ke;return vr*vr>Fe*Fe+Ke*Ke}_circleAndRectCollide(z,ht,Et,zt,Ht,ke,Fe){let Ke=(ke-zt)/2,vr=Math.abs(z-(zt+Ke));if(vr>Ke+Et)return!1;let Dr=(Fe-Ht)/2,Fr=Math.abs(ht-(Ht+Dr));if(Fr>Dr+Et)return!1;if(vr<=Ke||Fr<=Dr)return!0;let un=vr-Ke,Sn=Fr-Dr;return un*un+Sn*Sn<=Et*Et}}function Xr($t,z,ht,Et,zt){let Ht=e.H();return z?(e.K(Ht,Ht,[1/zt,1/zt,1]),ht||e.ad(Ht,Ht,Et.angle)):e.L(Ht,Et.labelPlaneMatrix,$t),Ht}function nn($t,z,ht,Et,zt){if(z){let Ht=e.ae($t);return e.K(Ht,Ht,[zt,zt,1]),ht||e.ad(Ht,Ht,-Et.angle),Ht}return Et.glCoordMatrix}function Le($t,z,ht,Et){let zt;Et?(zt=[$t,z,Et($t,z),1],e.af(zt,zt,ht)):(zt=[$t,z,0,1],mr(zt,zt,ht));let Ht=zt[3];return{point:new e.P(zt[0]/Ht,zt[1]/Ht),signedDistanceFromCamera:Ht,isOccluded:!1}}function Gt($t,z){return .5+$t/z*.5}function ne($t,z){return $t.x>=-z[0]&&$t.x<=z[0]&&$t.y>=-z[1]&&$t.y<=z[1]}function Ct($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt){let ae=Et?$t.textSizeData:$t.iconSizeData,xe=e.ag(ae,ht.transform.zoom),Ae=[256/ht.width*2+1,256/ht.height*2+1],je=Et?$t.text.dynamicLayoutVertexArray:$t.icon.dynamicLayoutVertexArray;je.clear();let Oe=$t.lineVertexArray,$e=Et?$t.text.placedSymbolArray:$t.icon.placedSymbolArray,wr=ht.transform.width/ht.transform.height,Or=!1;for(let Nr=0;Nr<$e.length;Nr++){let en=$e.get(Nr);if(en.hidden||en.writingMode===e.ah.vertical&&!Or){Ar(en.numGlyphs,je);continue}Or=!1;let vn=Le(en.anchorX,en.anchorY,z,Xt);if(!ne(vn.point,Ae)){Ar(en.numGlyphs,je);continue}let In=Gt(ht.transform.cameraToCenterDistance,vn.signedDistanceFromCamera),Nn=e.ai(ae,xe,en),ii=ke?Nn/In:Nn*In,Ui={getElevation:Xt,labelPlaneMatrix:zt,lineVertexArray:Oe,pitchWithMap:ke,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:vr,tileAnchorPoint:new e.P(en.anchorX,en.anchorY),unwrappedTileID:Dr,width:Fr,height:un,translation:Sn},pa=Nt(Ui,en,ii,!1,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke);Or=pa.useVertical,(pa.notEnoughRoom||Or||pa.needsFlipping&&Nt(Ui,en,ii,!0,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke).notEnoughRoom)&&Ar(en.numGlyphs,je)}Et?$t.text.dynamicLayoutVertexBuffer.updateData(je):$t.icon.dynamicLayoutVertexBuffer.updateData(je)}function gt($t,z,ht,Et,zt,Ht,ke,Fe){let Ke=Ht.glyphStartIndex+Ht.numGlyphs,vr=Ht.lineStartIndex,Dr=Ht.lineStartIndex+Ht.lineLength,Fr=z.getoffsetX(Ht.glyphStartIndex),un=z.getoffsetX(Ke-1),Sn=or($t*Fr,ht,Et,zt,Ht.segment,vr,Dr,Fe,ke);if(!Sn)return null;let Xt=or($t*un,ht,Et,zt,Ht.segment,vr,Dr,Fe,ke);return Xt?Fe.projectionCache.anyProjectionOccluded?null:{first:Sn,last:Xt}:null}function St($t,z,ht,Et){return $t===e.ah.horizontal&&Math.abs(ht.y-z.y)>Math.abs(ht.x-z.x)*Et?{useVertical:!0}:($t===e.ah.vertical?z.yht.x)?{needsFlipping:!0}:null}function Nt($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr){let Fr=ht/24,un=z.lineOffsetX*Fr,Sn=z.lineOffsetY*Fr,Xt;if(z.numGlyphs>1){let ae=z.glyphStartIndex+z.numGlyphs,xe=z.lineStartIndex,Ae=z.lineStartIndex+z.lineLength,je=gt(Fr,Fe,un,Sn,Et,z,Dr,$t);if(!je)return{notEnoughRoom:!0};let Oe=Le(je.first.point.x,je.first.point.y,ke,$t.getElevation).point,$e=Le(je.last.point.x,je.last.point.y,ke,$t.getElevation).point;if(zt&&!Et){let wr=St(z.writingMode,Oe,$e,vr);if(wr)return wr}Xt=[je.first];for(let wr=z.glyphStartIndex+1;wr0?Oe.point:function(Or,Nr,en,vn,In,Nn){return re(Or,Nr,en,1,In,Nn)}($t.tileAnchorPoint,je,xe,0,Ht,$t),wr=St(z.writingMode,xe,$e,vr);if(wr)return wr}let ae=or(Fr*Fe.getoffsetX(z.glyphStartIndex),un,Sn,Et,z.segment,z.lineStartIndex,z.lineStartIndex+z.lineLength,$t,Dr);if(!ae||$t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Xt=[ae]}for(let ae of Xt)e.aj(Ke,ae.point,ae.angle);return{}}function re($t,z,ht,Et,zt,Ht){let ke=$t.add($t.sub(z)._unit()),Fe=zt!==void 0?Le(ke.x,ke.y,zt,Ht.getElevation).point:we(ke.x,ke.y,Ht).point,Ke=ht.sub(Fe);return ht.add(Ke._mult(Et/Ke.mag()))}function le($t,z,ht){let Et=z.projectionCache;if(Et.projections[$t])return Et.projections[$t];let zt=new e.P(z.lineVertexArray.getx($t),z.lineVertexArray.gety($t)),Ht=we(zt.x,zt.y,z);if(Ht.signedDistanceFromCamera>0)return Et.projections[$t]=Ht.point,Et.anyProjectionOccluded=Et.anyProjectionOccluded||Ht.isOccluded,Ht.point;let ke=$t-ht.direction;return function(Fe,Ke,vr,Dr,Fr){return re(Fe,Ke,vr,Dr,void 0,Fr)}(ht.distanceFromAnchor===0?z.tileAnchorPoint:new e.P(z.lineVertexArray.getx(ke),z.lineVertexArray.gety(ke)),zt,ht.previousVertex,ht.absOffsetX-ht.distanceFromAnchor+1,z)}function we($t,z,ht){let Et=$t+ht.translation[0],zt=z+ht.translation[1],Ht;return!ht.pitchWithMap&&ht.projection.useSpecialProjectionForSymbols?(Ht=ht.projection.projectTileCoordinates(Et,zt,ht.unwrappedTileID,ht.getElevation),Ht.point.x=(.5*Ht.point.x+.5)*ht.width,Ht.point.y=(.5*-Ht.point.y+.5)*ht.height):(Ht=Le(Et,zt,ht.labelPlaneMatrix,ht.getElevation),Ht.isOccluded=!1),Ht}function Ue($t,z,ht){return $t._unit()._perp()._mult(z*ht)}function qe($t,z,ht,Et,zt,Ht,ke,Fe,Ke){if(Fe.projectionCache.offsets[$t])return Fe.projectionCache.offsets[$t];let vr=ht.add(z);if($t+Ke.direction=zt)return Fe.projectionCache.offsets[$t]=vr,vr;let Dr=le($t+Ke.direction,Fe,Ke),Fr=Ue(Dr.sub(ht),ke,Ke.direction),un=ht.add(Fr),Sn=Dr.add(Fr);return Fe.projectionCache.offsets[$t]=e.ak(Ht,vr,un,Sn)||vr,Fe.projectionCache.offsets[$t]}function or($t,z,ht,Et,zt,Ht,ke,Fe,Ke){let vr=Et?$t-z:$t+z,Dr=vr>0?1:-1,Fr=0;Et&&(Dr*=-1,Fr=Math.PI),Dr<0&&(Fr+=Math.PI);let un,Sn=Dr>0?Ht+zt:Ht+zt+1;Fe.projectionCache.cachedAnchorPoint?un=Fe.projectionCache.cachedAnchorPoint:(un=we(Fe.tileAnchorPoint.x,Fe.tileAnchorPoint.y,Fe).point,Fe.projectionCache.cachedAnchorPoint=un);let Xt,ae,xe=un,Ae=un,je=0,Oe=0,$e=Math.abs(vr),wr=[],Or;for(;je+Oe<=$e;){if(Sn+=Dr,Sn=ke)return null;je+=Oe,Ae=xe,ae=Xt;let vn={absOffsetX:$e,direction:Dr,distanceFromAnchor:je,previousVertex:Ae};if(xe=le(Sn,Fe,vn),ht===0)wr.push(Ae),Or=xe.sub(Ae);else{let In,Nn=xe.sub(Ae);In=Nn.mag()===0?Ue(le(Sn+Dr,Fe,vn).sub(xe),ht,Dr):Ue(Nn,ht,Dr),ae||(ae=Ae.add(In)),Xt=qe(Sn,In,xe,Ht,ke,ae,ht,Fe,vn),wr.push(ae),Or=Xt.sub(ae)}Oe=Or.mag()}let Nr=Or._mult(($e-je)/Oe)._add(ae||Ae),en=Fr+Math.atan2(xe.y-Ae.y,xe.x-Ae.x);return wr.push(Nr),{point:Nr,angle:Ke?en:0,path:wr}}let Sr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ar($t,z){for(let ht=0;ht<$t;ht++){let Et=z.length;z.resize(Et+4),z.float32.set(Sr,3*Et)}}function mr($t,z,ht){let Et=z[0],zt=z[1];return $t[0]=ht[0]*Et+ht[4]*zt+ht[12],$t[1]=ht[1]*Et+ht[5]*zt+ht[13],$t[3]=ht[3]*Et+ht[7]*zt+ht[15],$t}let Qr=100;class Hn{constructor(z,ht,Et=new br(z.width+200,z.height+200,25),zt=new br(z.width+200,z.height+200,25)){this.transform=z,this.mapProjection=ht,this.grid=Et,this.ignoredGrid=zt,this.pitchFactor=Math.cos(z._pitch)*z.cameraToCenterDistance,this.screenRightBoundary=z.width+Qr,this.screenBottomBoundary=z.height+Qr,this.gridRightBoundary=z.width+200,this.gridBottomBoundary=z.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr){let un=z.anchorPointX+Ke[0],Sn=z.anchorPointY+Ke[1],Xt=this.projectAndGetPerspectiveRatio(zt,un,Sn,Ht,Dr),ae=Et*Xt.perspectiveRatio,xe;if(ke||Fe)xe=this._projectCollisionBox(z,ae,zt,Ht,ke,Fe,Ke,Xt,Dr,Fr);else{let wr=Xt.point.x+(Fr?Fr.x*ae:0),Or=Xt.point.y+(Fr?Fr.y*ae:0);xe={allPointsOccluded:!1,box:[wr+z.x1*ae,Or+z.y1*ae,wr+z.x2*ae,Or+z.y2*ae]}}let[Ae,je,Oe,$e]=xe.box;return this.mapProjection.useSpecialProjectionForSymbols&&(ke?xe.allPointsOccluded:this.mapProjection.isOccluded(un,Sn,Ht))||Xt.perspectiveRatio=1;So--)Ta.push(pa.path[So]);for(let So=1;Sods.signedDistanceFromCamera<=0)?[]:So.map(ds=>ds.point)}let Bo=[];if(Ta.length>0){let So=Ta[0].clone(),ds=Ta[0].clone();for(let fl=1;fl=Nn.x&&ds.x<=ii.x&&So.y>=Nn.y&&ds.y<=ii.y?[Ta]:ds.xii.x||ds.yii.y?[]:e.al([Ta],Nn.x,Nn.y,ii.x,ii.y)}for(let So of Bo){Ui.reset(So,.25*In);let ds=0;ds=Ui.length<=.5*In?1:Math.ceil(Ui.paddedLength/so)+1;for(let fl=0;flLe(zt.x,zt.y,Et,ht.getElevation))}queryRenderedSymbols(z){if(z.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ht=[],Et=1/0,zt=1/0,Ht=-1/0,ke=-1/0;for(let Dr of z){let Fr=new e.P(Dr.x+Qr,Dr.y+Qr);Et=Math.min(Et,Fr.x),zt=Math.min(zt,Fr.y),Ht=Math.max(Ht,Fr.x),ke=Math.max(ke,Fr.y),ht.push(Fr)}let Fe=this.grid.query(Et,zt,Ht,ke).concat(this.ignoredGrid.query(Et,zt,Ht,ke)),Ke={},vr={};for(let Dr of Fe){let Fr=Dr.key;if(Ke[Fr.bucketInstanceId]===void 0&&(Ke[Fr.bucketInstanceId]={}),Ke[Fr.bucketInstanceId][Fr.featureIndex])continue;let un=[new e.P(Dr.x1,Dr.y1),new e.P(Dr.x2,Dr.y1),new e.P(Dr.x2,Dr.y2),new e.P(Dr.x1,Dr.y2)];e.am(ht,un)&&(Ke[Fr.bucketInstanceId][Fr.featureIndex]=!0,vr[Fr.bucketInstanceId]===void 0&&(vr[Fr.bucketInstanceId]=[]),vr[Fr.bucketInstanceId].push(Fr.featureIndex))}return vr}insertCollisionBox(z,ht,Et,zt,Ht,ke){(Et?this.ignoredGrid:this.grid).insert({bucketInstanceId:zt,featureIndex:Ht,collisionGroupID:ke,overlapMode:ht},z[0],z[1],z[2],z[3])}insertCollisionCircles(z,ht,Et,zt,Ht,ke){let Fe=Et?this.ignoredGrid:this.grid,Ke={bucketInstanceId:zt,featureIndex:Ht,collisionGroupID:ke,overlapMode:ht};for(let vr=0;vr=this.screenRightBoundary||ztthis.screenBottomBoundary}isInsideGrid(z,ht,Et,zt){return Et>=0&&z=0&&htthis.projectAndGetPerspectiveRatio(Et,In.x,In.y,zt,vr));en=vn.some(In=>!In.isOccluded),Nr=vn.map(In=>In.point)}else en=!0;return{box:e.ao(Nr),allPointsOccluded:!en}}}function Wn($t,z,ht){return z*(e.X/($t.tileSize*Math.pow(2,ht-$t.tileID.overscaledZ)))}class Xn{constructor(z,ht,Et,zt){this.opacity=z?Math.max(0,Math.min(1,z.opacity+(z.placed?ht:-ht))):zt&&Et?1:0,this.placed=Et}isHidden(){return this.opacity===0&&!this.placed}}class Ii{constructor(z,ht,Et,zt,Ht){this.text=new Xn(z?z.text:null,ht,Et,Ht),this.icon=new Xn(z?z.icon:null,ht,zt,Ht)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class oi{constructor(z,ht,Et){this.text=z,this.icon=ht,this.skipFade=Et}}class $n{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class sa{constructor(z,ht,Et,zt,Ht){this.bucketInstanceId=z,this.featureIndex=ht,this.sourceLayerIndex=Et,this.bucketIndex=zt,this.tileID=Ht}}class Zi{constructor(z){this.crossSourceCollisions=z,this.maxGroupID=0,this.collisionGroups={}}get(z){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[z]){let ht=++this.maxGroupID;this.collisionGroups[z]={ID:ht,predicate:Et=>Et.collisionGroupID===ht}}return this.collisionGroups[z]}}function We($t,z,ht,Et,zt){let{horizontalAlign:Ht,verticalAlign:ke}=e.au($t);return new e.P(-(Ht-.5)*z+Et[0]*zt,-(ke-.5)*ht+Et[1]*zt)}class nr{constructor(z,ht,Et,zt,Ht,ke){this.transform=z.clone(),this.terrain=Et,this.collisionIndex=new Hn(this.transform,ht),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=zt,this.retainedQueryData={},this.collisionGroups=new Zi(Ht),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ke,ke&&(ke.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(z){let ht=this.terrain;return ht?(Et,zt)=>ht.getElevation(z,Et,zt):null}getBucketParts(z,ht,Et,zt){let Ht=Et.getBucket(ht),ke=Et.latestFeatureIndex;if(!Ht||!ke||ht.id!==Ht.layerIds[0])return;let Fe=Et.collisionBoxArray,Ke=Ht.layers[0].layout,vr=Ht.layers[0].paint,Dr=Math.pow(2,this.transform.zoom-Et.tileID.overscaledZ),Fr=Et.tileSize/e.X,un=Et.tileID.toUnwrapped(),Sn=this.transform.calculatePosMatrix(un),Xt=Ke.get("text-pitch-alignment")==="map",ae=Ke.get("text-rotation-alignment")==="map",xe=Wn(Et,1,this.transform.zoom),Ae=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("text-translate"),vr.get("text-translate-anchor")),je=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("icon-translate"),vr.get("icon-translate-anchor")),Oe=Xr(Sn,Xt,ae,this.transform,xe),$e=null;if(Xt){let Or=nn(Sn,Xt,ae,this.transform,xe);$e=e.L([],this.transform.labelPlaneMatrix,Or)}this.retainedQueryData[Ht.bucketInstanceId]=new sa(Ht.bucketInstanceId,ke,Ht.sourceLayerIndex,Ht.index,Et.tileID);let wr={bucket:Ht,layout:Ke,translationText:Ae,translationIcon:je,posMatrix:Sn,unwrappedTileID:un,textLabelPlaneMatrix:Oe,labelToScreenMatrix:$e,scale:Dr,textPixelRatio:Fr,holdingForFade:Et.holdingForFade(),collisionBoxArray:Fe,partiallyEvaluatedTextSize:e.ag(Ht.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ht.sourceID)};if(zt)for(let Or of Ht.sortKeyRanges){let{sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn}=Or;z.push({sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn,parameters:wr})}else z.push({symbolInstanceStart:0,symbolInstanceEnd:Ht.symbolInstances.length,parameters:wr})}attemptAnchorPlacement(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,xe,Ae,je,Oe){let $e=e.aq[z.textAnchor],wr=[z.textOffset0,z.textOffset1],Or=We($e,Et,zt,wr,Ht),Nr=this.collisionIndex.placeCollisionBox(ht,un,Ke,vr,Dr,Fe,ke,xe,Fr.predicate,Oe,Or);if((!je||this.collisionIndex.placeCollisionBox(je,un,Ke,vr,Dr,Fe,ke,Ae,Fr.predicate,Oe,Or).placeable)&&Nr.placeable){let en;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID].text&&(en=this.prevPlacement.variableOffsets[Sn.crossTileID].anchor),Sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sn.crossTileID]={textOffset:wr,width:Et,height:zt,anchor:$e,textBoxScale:Ht,prevAnchor:en},this.markUsedJustification(Xt,$e,Sn,ae),Xt.allowVerticalPlacement&&(this.markUsedOrientation(Xt,ae,Sn),this.placedOrientations[Sn.crossTileID]=ae),{shift:Or,placedGlyphBoxes:Nr}}}placeLayerBucketPart(z,ht,Et){let{bucket:zt,layout:Ht,translationText:ke,translationIcon:Fe,posMatrix:Ke,unwrappedTileID:vr,textLabelPlaneMatrix:Dr,labelToScreenMatrix:Fr,textPixelRatio:un,holdingForFade:Sn,collisionBoxArray:Xt,partiallyEvaluatedTextSize:ae,collisionGroup:xe}=z.parameters,Ae=Ht.get("text-optional"),je=Ht.get("icon-optional"),Oe=e.ar(Ht,"text-overlap","text-allow-overlap"),$e=Oe==="always",wr=e.ar(Ht,"icon-overlap","icon-allow-overlap"),Or=wr==="always",Nr=Ht.get("text-rotation-alignment")==="map",en=Ht.get("text-pitch-alignment")==="map",vn=Ht.get("icon-text-fit")!=="none",In=Ht.get("symbol-z-order")==="viewport-y",Nn=$e&&(Or||!zt.hasIconData()||je),ii=Or&&($e||!zt.hasTextData()||Ae);!zt.collisionArrays&&Xt&&zt.deserializeCollisionBoxes(Xt);let Ui=this._getTerrainElevationFunc(this.retainedQueryData[zt.bucketInstanceId].tileID),pa=(fa,Ta,so)=>{var Bo,So;if(ht[fa.crossTileID])return;if(Sn)return void(this.placements[fa.crossTileID]=new oi(!1,!1,!1));let ds=!1,fl=!1,vl=!0,Ds=null,wl={box:null,placeable:!1,offscreen:null},Eu={placeable:!1},gu=null,$s=null,Zs=null,Yu=0,dc=0,$c=0;Ta.textFeatureIndex?Yu=Ta.textFeatureIndex:fa.useRuntimeCollisionCircles&&(Yu=fa.featureIndex),Ta.verticalTextFeatureIndex&&(dc=Ta.verticalTextFeatureIndex);let At=Ta.textBox;if(At){let Pe=Er=>{let rn=e.ah.horizontal;if(zt.allowVerticalPlacement&&!Er&&this.prevPlacement){let Jr=this.prevPlacement.placedOrientations[fa.crossTileID];Jr&&(this.placedOrientations[fa.crossTileID]=Jr,rn=Jr,this.markUsedOrientation(zt,rn,fa))}return rn},Ne=(Er,rn)=>{if(zt.allowVerticalPlacement&&fa.numVerticalGlyphVertices>0&&Ta.verticalTextBox){for(let Jr of zt.writingModes)if(Jr===e.ah.vertical?(wl=rn(),Eu=wl):wl=Er(),wl&&wl.placeable)break}else wl=Er()},sr=fa.textAnchorOffsetStartIndex,ar=fa.textAnchorOffsetEndIndex;if(ar===sr){let Er=(rn,Jr)=>{let xn=this.collisionIndex.placeCollisionBox(rn,Oe,un,Ke,vr,en,Nr,ke,xe.predicate,Ui);return xn&&xn.placeable&&(this.markUsedOrientation(zt,Jr,fa),this.placedOrientations[fa.crossTileID]=Jr),xn};Ne(()=>Er(At,e.ah.horizontal),()=>{let rn=Ta.verticalTextBox;return zt.allowVerticalPlacement&&fa.numVerticalGlyphVertices>0&&rn?Er(rn,e.ah.vertical):{box:null,offscreen:null}}),Pe(wl&&wl.placeable)}else{let Er=e.aq[(So=(Bo=this.prevPlacement)===null||Bo===void 0?void 0:Bo.variableOffsets[fa.crossTileID])===null||So===void 0?void 0:So.anchor],rn=(xn,zn,On)=>{let Hi=xn.x2-xn.x1,Vn=xn.y2-xn.y1,yi=fa.textBoxScale,Si=vn&&wr==="never"?zn:null,Ri=null,Gi=Oe==="never"?1:2,Kn="never";Er&&Gi++;for(let Ua=0;Uarn(At,Ta.iconBox,e.ah.horizontal),()=>{let xn=Ta.verticalTextBox;return zt.allowVerticalPlacement&&(!wl||!wl.placeable)&&fa.numVerticalGlyphVertices>0&&xn?rn(xn,Ta.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),wl&&(ds=wl.placeable,vl=wl.offscreen);let Jr=Pe(wl&&wl.placeable);if(!ds&&this.prevPlacement){let xn=this.prevPlacement.variableOffsets[fa.crossTileID];xn&&(this.variableOffsets[fa.crossTileID]=xn,this.markUsedJustification(zt,xn.anchor,fa,Jr))}}}if(gu=wl,ds=gu&&gu.placeable,vl=gu&&gu.offscreen,fa.useRuntimeCollisionCircles){let Pe=zt.text.placedSymbolArray.get(fa.centerJustifiedTextSymbolIndex),Ne=e.ai(zt.textSizeData,ae,Pe),sr=Ht.get("text-padding");$s=this.collisionIndex.placeCollisionCircles(Oe,Pe,zt.lineVertexArray,zt.glyphOffsetArray,Ne,Ke,vr,Dr,Fr,Et,en,xe.predicate,fa.collisionCircleDiameter,sr,ke,Ui),$s.circles.length&&$s.collisionDetected&&!Et&&e.w("Collisions detected, but collision boxes are not shown"),ds=$e||$s.circles.length>0&&!$s.collisionDetected,vl=vl&&$s.offscreen}if(Ta.iconFeatureIndex&&($c=Ta.iconFeatureIndex),Ta.iconBox){let Pe=Ne=>this.collisionIndex.placeCollisionBox(Ne,wr,un,Ke,vr,en,Nr,Fe,xe.predicate,Ui,vn&&Ds?Ds:void 0);Eu&&Eu.placeable&&Ta.verticalIconBox?(Zs=Pe(Ta.verticalIconBox),fl=Zs.placeable):(Zs=Pe(Ta.iconBox),fl=Zs.placeable),vl=vl&&Zs.offscreen}let Ut=Ae||fa.numHorizontalGlyphVertices===0&&fa.numVerticalGlyphVertices===0,ue=je||fa.numIconVertices===0;Ut||ue?ue?Ut||(fl=fl&&ds):ds=fl&&ds:fl=ds=fl&&ds;let Me=fl&&Zs.placeable;if(ds&&gu.placeable&&this.collisionIndex.insertCollisionBox(gu.box,Oe,Ht.get("text-ignore-placement"),zt.bucketInstanceId,Eu&&Eu.placeable&&dc?dc:Yu,xe.ID),Me&&this.collisionIndex.insertCollisionBox(Zs.box,wr,Ht.get("icon-ignore-placement"),zt.bucketInstanceId,$c,xe.ID),$s&&ds&&this.collisionIndex.insertCollisionCircles($s.circles,Oe,Ht.get("text-ignore-placement"),zt.bucketInstanceId,Yu,xe.ID),Et&&this.storeCollisionData(zt.bucketInstanceId,so,Ta,gu,Zs,$s),fa.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(zt.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[fa.crossTileID]=new oi(ds||Nn,fl||ii,vl||zt.justReloaded),ht[fa.crossTileID]=!0};if(In){if(z.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let fa=zt.getSortedSymbolIndexes(this.transform.angle);for(let Ta=fa.length-1;Ta>=0;--Ta){let so=fa[Ta];pa(zt.symbolInstances.get(so),zt.collisionArrays[so],so)}}else for(let fa=z.symbolInstanceStart;fa=0&&(z.text.placedSymbolArray.get(Fe).crossTileID=Ht>=0&&Fe!==Ht?0:Et.crossTileID)}markUsedOrientation(z,ht,Et){let zt=ht===e.ah.horizontal||ht===e.ah.horizontalOnly?ht:0,Ht=ht===e.ah.vertical?ht:0,ke=[Et.leftJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.rightJustifiedTextSymbolIndex];for(let Fe of ke)z.text.placedSymbolArray.get(Fe).placedOrientation=zt;Et.verticalPlacedTextSymbolIndex&&(z.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).placedOrientation=Ht)}commit(z){this.commitTime=z,this.zoomAtLastRecencyCheck=this.transform.zoom;let ht=this.prevPlacement,Et=!1;this.prevZoomAdjustment=ht?ht.zoomAdjustment(this.transform.zoom):0;let zt=ht?ht.symbolFadeChange(z):1,Ht=ht?ht.opacities:{},ke=ht?ht.variableOffsets:{},Fe=ht?ht.placedOrientations:{};for(let Ke in this.placements){let vr=this.placements[Ke],Dr=Ht[Ke];Dr?(this.opacities[Ke]=new Ii(Dr,zt,vr.text,vr.icon),Et=Et||vr.text!==Dr.text.placed||vr.icon!==Dr.icon.placed):(this.opacities[Ke]=new Ii(null,zt,vr.text,vr.icon,vr.skipFade),Et=Et||vr.text||vr.icon)}for(let Ke in Ht){let vr=Ht[Ke];if(!this.opacities[Ke]){let Dr=new Ii(vr,zt,!1,!1);Dr.isHidden()||(this.opacities[Ke]=Dr,Et=Et||vr.text.placed||vr.icon.placed)}}for(let Ke in ke)this.variableOffsets[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.variableOffsets[Ke]=ke[Ke]);for(let Ke in Fe)this.placedOrientations[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.placedOrientations[Ke]=Fe[Ke]);if(ht&&ht.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Et?this.lastPlacementChangeTime=z:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ht?ht.lastPlacementChangeTime:z)}updateLayerOpacities(z,ht){let Et={};for(let zt of ht){let Ht=zt.getBucket(z);Ht&&zt.latestFeatureIndex&&z.id===Ht.layerIds[0]&&this.updateBucketOpacities(Ht,zt.tileID,Et,zt.collisionBoxArray)}}updateBucketOpacities(z,ht,Et,zt){z.hasTextData()&&(z.text.opacityVertexArray.clear(),z.text.hasVisibleVertices=!1),z.hasIconData()&&(z.icon.opacityVertexArray.clear(),z.icon.hasVisibleVertices=!1),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexArray.clear(),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexArray.clear();let Ht=z.layers[0],ke=Ht.layout,Fe=new Ii(null,0,!1,!1,!0),Ke=ke.get("text-allow-overlap"),vr=ke.get("icon-allow-overlap"),Dr=Ht._unevaluatedLayout.hasValue("text-variable-anchor")||Ht._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Fr=ke.get("text-rotation-alignment")==="map",un=ke.get("text-pitch-alignment")==="map",Sn=ke.get("icon-text-fit")!=="none",Xt=new Ii(null,0,Ke&&(vr||!z.hasIconData()||ke.get("icon-optional")),vr&&(Ke||!z.hasTextData()||ke.get("text-optional")),!0);!z.collisionArrays&&zt&&(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData())&&z.deserializeCollisionBoxes(zt);let ae=(Ae,je,Oe)=>{for(let $e=0;$e0,en=this.placedOrientations[je.crossTileID],vn=en===e.ah.vertical,In=en===e.ah.horizontal||en===e.ah.horizontalOnly;if(Oe>0||$e>0){let ii=Oi(Or.text);ae(z.text,Oe,vn?ji:ii),ae(z.text,$e,In?ji:ii);let Ui=Or.text.isHidden();[je.rightJustifiedTextSymbolIndex,je.centerJustifiedTextSymbolIndex,je.leftJustifiedTextSymbolIndex].forEach(Ta=>{Ta>=0&&(z.text.placedSymbolArray.get(Ta).hidden=Ui||vn?1:0)}),je.verticalPlacedTextSymbolIndex>=0&&(z.text.placedSymbolArray.get(je.verticalPlacedTextSymbolIndex).hidden=Ui||In?1:0);let pa=this.variableOffsets[je.crossTileID];pa&&this.markUsedJustification(z,pa.anchor,je,en);let fa=this.placedOrientations[je.crossTileID];fa&&(this.markUsedJustification(z,"left",je,fa),this.markUsedOrientation(z,fa,je))}if(Nr){let ii=Oi(Or.icon),Ui=!(Sn&&je.verticalPlacedIconSymbolIndex&&vn);je.placedIconSymbolIndex>=0&&(ae(z.icon,je.numIconVertices,Ui?ii:ji),z.icon.placedSymbolArray.get(je.placedIconSymbolIndex).hidden=Or.icon.isHidden()),je.verticalPlacedIconSymbolIndex>=0&&(ae(z.icon,je.numVerticalIconVertices,Ui?ji:ii),z.icon.placedSymbolArray.get(je.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Nn=xe&&xe.has(Ae)?xe.get(Ae):{text:null,icon:null};if(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData()){let ii=z.collisionArrays[Ae];if(ii){let Ui=new e.P(0,0);if(ii.textBox||ii.verticalTextBox){let pa=!0;if(Dr){let fa=this.variableOffsets[wr];fa?(Ui=We(fa.anchor,fa.width,fa.height,fa.textOffset,fa.textBoxScale),Fr&&Ui._rotate(un?this.transform.angle:-this.transform.angle)):pa=!1}if(ii.textBox||ii.verticalTextBox){let fa;ii.textBox&&(fa=vn),ii.verticalTextBox&&(fa=In),fr(z.textCollisionBox.collisionVertexArray,Or.text.placed,!pa||fa,Nn.text,Ui.x,Ui.y)}}if(ii.iconBox||ii.verticalIconBox){let pa=!!(!In&&ii.verticalIconBox),fa;ii.iconBox&&(fa=pa),ii.verticalIconBox&&(fa=!pa),fr(z.iconCollisionBox.collisionVertexArray,Or.icon.placed,fa,Nn.icon,Sn?Ui.x:0,Sn?Ui.y:0)}}}}if(z.sortFeatures(this.transform.angle),this.retainedQueryData[z.bucketInstanceId]&&(this.retainedQueryData[z.bucketInstanceId].featureSortOrder=z.featureSortOrder),z.hasTextData()&&z.text.opacityVertexBuffer&&z.text.opacityVertexBuffer.updateData(z.text.opacityVertexArray),z.hasIconData()&&z.icon.opacityVertexBuffer&&z.icon.opacityVertexBuffer.updateData(z.icon.opacityVertexArray),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexBuffer&&z.iconCollisionBox.collisionVertexBuffer.updateData(z.iconCollisionBox.collisionVertexArray),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexBuffer&&z.textCollisionBox.collisionVertexBuffer.updateData(z.textCollisionBox.collisionVertexArray),z.text.opacityVertexArray.length!==z.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${z.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${z.text.layoutVertexArray.length}) / 4`);if(z.icon.opacityVertexArray.length!==z.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${z.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${z.icon.layoutVertexArray.length}) / 4`);if(z.bucketInstanceId in this.collisionCircleArrays){let Ae=this.collisionCircleArrays[z.bucketInstanceId];z.placementInvProjMatrix=Ae.invProjMatrix,z.placementViewportMatrix=Ae.viewportMatrix,z.collisionCircleArray=Ae.circles,delete this.collisionCircleArrays[z.bucketInstanceId]}}symbolFadeChange(z){return this.fadeDuration===0?1:(z-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(z){return Math.max(0,(this.transform.zoom-z)/1.5)}hasTransitions(z){return this.stale||z-this.lastPlacementChangeTimez}setStale(){this.stale=!0}}function fr($t,z,ht,Et,zt,Ht){Et&&Et.length!==0||(Et=[0,0,0,0]);let ke=Et[0]-Qr,Fe=Et[1]-Qr,Ke=Et[2]-Qr,vr=Et[3]-Qr;$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,ke,Fe),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,Ke,Fe),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,Ke,vr),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,ke,vr)}let _r=Math.pow(2,25),tn=Math.pow(2,24),Cn=Math.pow(2,17),Tn=Math.pow(2,16),Mn=Math.pow(2,9),fi=Math.pow(2,8),ki=Math.pow(2,1);function Oi($t){if($t.opacity===0&&!$t.placed)return 0;if($t.opacity===1&&$t.placed)return 4294967295;let z=$t.placed?1:0,ht=Math.floor(127*$t.opacity);return ht*_r+z*tn+ht*Cn+z*Tn+ht*Mn+z*fi+ht*ki+z}let ji=0;function Xi(){return{isOccluded:($t,z,ht)=>!1,getPitchedTextCorrection:($t,z,ht)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates($t,z,ht,Et){throw new Error("Not implemented.")},translatePosition:($t,z,ht,Et)=>function(zt,Ht,ke,Fe,Ke=!1){if(!ke[0]&&!ke[1])return[0,0];let vr=Ke?Fe==="map"?zt.angle:0:Fe==="viewport"?-zt.angle:0;if(vr){let Dr=Math.sin(vr),Fr=Math.cos(vr);ke=[ke[0]*Fr-ke[1]*Dr,ke[0]*Dr+ke[1]*Fr]}return[Ke?ke[0]:Wn(Ht,ke[0],zt.zoom),Ke?ke[1]:Wn(Ht,ke[1],zt.zoom)]}($t,z,ht,Et),getCircleRadiusCorrection:$t=>1}}class ci{constructor(z){this._sortAcrossTiles=z.layout.get("symbol-z-order")!=="viewport-y"&&!z.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(z,ht,Et,zt,Ht){let ke=this._bucketParts;for(;this._currentTileIndexFe.sortKey-Ke.sortKey));this._currentPartIndex!this._forceFullPlacement&&o.now()-zt>2;for(;this._currentPlacementIndex>=0;){let ke=ht[z[this._currentPlacementIndex]],Fe=this.placement.collisionIndex.transform.zoom;if(ke.type==="symbol"&&(!ke.minzoom||ke.minzoom<=Fe)&&(!ke.maxzoom||ke.maxzoom>Fe)){if(this._inProgressLayer||(this._inProgressLayer=new ci(ke)),this._inProgressLayer.continuePlacement(Et[ke.source],this.placement,this._showCollisionBoxes,ke,Ht))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(z){return this.placement.commit(z),this.placement}}let Wa=512/e.X/2;class ze{constructor(z,ht,Et){this.tileID=z,this.bucketInstanceId=Et,this._symbolsByKey={};let zt=new Map;for(let Ht=0;Ht({x:Math.floor(Ke.anchorX*Wa),y:Math.floor(Ke.anchorY*Wa)})),crossTileIDs:ke.map(Ke=>Ke.crossTileID)};if(Fe.positions.length>128){let Ke=new e.av(Fe.positions.length,16,Uint16Array);for(let{x:vr,y:Dr}of Fe.positions)Ke.add(vr,Dr);Ke.finish(),delete Fe.positions,Fe.index=Ke}this._symbolsByKey[Ht]=Fe}}getScaledCoordinates(z,ht){let{x:Et,y:zt,z:Ht}=this.tileID.canonical,{x:ke,y:Fe,z:Ke}=ht.canonical,vr=Wa/Math.pow(2,Ke-Ht),Dr=(Fe*e.X+z.anchorY)*vr,Fr=zt*e.X*Wa;return{x:Math.floor((ke*e.X+z.anchorX)*vr-Et*e.X*Wa),y:Math.floor(Dr-Fr)}}findMatches(z,ht,Et){let zt=this.tileID.canonical.zz)}}class Ie{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Rr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(z){let ht=Math.round((z-this.lng)/360);if(ht!==0)for(let Et in this.indexes){let zt=this.indexes[Et],Ht={};for(let ke in zt){let Fe=zt[ke];Fe.tileID=Fe.tileID.unwrapTo(Fe.tileID.wrap+ht),Ht[Fe.tileID.key]=Fe}this.indexes[Et]=Ht}this.lng=z}addBucket(z,ht,Et){if(this.indexes[z.overscaledZ]&&this.indexes[z.overscaledZ][z.key]){if(this.indexes[z.overscaledZ][z.key].bucketInstanceId===ht.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(z.overscaledZ,this.indexes[z.overscaledZ][z.key])}for(let Ht=0;Htz.overscaledZ)for(let Fe in ke){let Ke=ke[Fe];Ke.tileID.isChildOf(z)&&Ke.findMatches(ht.symbolInstances,z,zt)}else{let Fe=ke[z.scaledTo(Number(Ht)).key];Fe&&Fe.findMatches(ht.symbolInstances,z,zt)}}for(let Ht=0;Ht{ht[Et]=!0});for(let Et in this.layerIndexes)ht[Et]||delete this.layerIndexes[Et]}}let Gr=($t,z)=>e.t($t,z&&z.filter(ht=>ht.identifier!=="source.canvas")),Br=e.aw();class Yr extends e.E{constructor(z,ht={}){super(),this._rtlPluginLoaded=()=>{for(let Et in this.sourceCaches){let zt=this.sourceCaches[Et].getSource().type;zt!=="vector"&&zt!=="geojson"||this.sourceCaches[Et].reload()}},this.map=z,this.dispatcher=new rt(dt(),z._getMapId()),this.dispatcher.registerMessageHandler("GG",(Et,zt)=>this.getGlyphs(Et,zt)),this.dispatcher.registerMessageHandler("GI",(Et,zt)=>this.getImages(Et,zt)),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new V(z._requestManager,ht.localIdeographFontFamily),this.lineAtlas=new J(256,512),this.crossTileSymbolIndex=new $r,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),ve().on(Lt,this._rtlPluginLoaded),this.on("data",Et=>{if(Et.dataType!=="source"||Et.sourceDataType!=="metadata")return;let zt=this.sourceCaches[Et.sourceId];if(!zt)return;let Ht=zt.getSource();if(Ht&&Ht.vectorLayerIds)for(let ke in this._layers){let Fe=this._layers[ke];Fe.source===Ht.id&&this._validateLayer(Fe)}})}loadURL(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),ht.validate=typeof ht.validate!="boolean"||ht.validate;let zt=this.map._requestManager.transformRequest(z,"Style");this._loadStyleRequest=new AbortController;let Ht=this._loadStyleRequest;e.h(zt,this._loadStyleRequest).then(ke=>{this._loadStyleRequest=null,this._load(ke.data,ht,Et)}).catch(ke=>{this._loadStyleRequest=null,ke&&!Ht.signal.aborted&&this.fire(new e.j(ke))})}loadJSON(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ht.validate=ht.validate!==!1,this._load(z,ht,Et)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Br,{validate:!1})}_load(z,ht,Et){var zt;let Ht=ht.transformStyle?ht.transformStyle(Et,z):z;if(!ht.validate||!Gr(this,e.u(Ht))){this._loaded=!0,this.stylesheet=Ht;for(let ke in Ht.sources)this.addSource(ke,Ht.sources[ke],{validate:!1});Ht.sprite?this._loadSprite(Ht.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Ht.glyphs),this._createLayers(),this.light=new U(this.stylesheet.light),this.sky=new q(this.stylesheet.sky),this.map.setTerrain((zt=this.stylesheet.terrain)!==null&&zt!==void 0?zt:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let z=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",z),this._order=z.map(ht=>ht.id),this._layers={},this._serializedLayers=null;for(let ht of z){let Et=e.aA(ht);Et.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=Et}}_loadSprite(z,ht=!1,Et=void 0){let zt;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Ht,ke,Fe,Ke){return e._(this,void 0,void 0,function*(){let vr=A(Ht),Dr=Fe>1?"@2x":"",Fr={},un={};for(let{id:Sn,url:Xt}of vr){let ae=ke.transformRequest(h(Xt,Dr,".json"),"SpriteJSON");Fr[Sn]=e.h(ae,Ke);let xe=ke.transformRequest(h(Xt,Dr,".png"),"SpriteImage");un[Sn]=u.getImage(xe,Ke)}return yield Promise.all([...Object.values(Fr),...Object.values(un)]),function(Sn,Xt){return e._(this,void 0,void 0,function*(){let ae={};for(let xe in Sn){ae[xe]={};let Ae=o.getImageCanvasContext((yield Xt[xe]).data),je=(yield Sn[xe]).data;for(let Oe in je){let{width:$e,height:wr,x:Or,y:Nr,sdf:en,pixelRatio:vn,stretchX:In,stretchY:Nn,content:ii,textFitWidth:Ui,textFitHeight:pa}=je[Oe];ae[xe][Oe]={data:null,pixelRatio:vn,sdf:en,stretchX:In,stretchY:Nn,content:ii,textFitWidth:Ui,textFitHeight:pa,spriteData:{width:$e,height:wr,x:Or,y:Nr,context:Ae}}}}return ae})}(Fr,un)})}(z,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Ht=>{if(this._spriteRequest=null,Ht)for(let ke in Ht){this._spritesImagesIds[ke]=[];let Fe=this._spritesImagesIds[ke]?this._spritesImagesIds[ke].filter(Ke=>!(Ke in Ht)):[];for(let Ke of Fe)this.imageManager.removeImage(Ke),this._changedImages[Ke]=!0;for(let Ke in Ht[ke]){let vr=ke==="default"?Ke:`${ke}:${Ke}`;this._spritesImagesIds[ke].push(vr),vr in this.imageManager.images?this.imageManager.updateImage(vr,Ht[ke][Ke],!1):this.imageManager.addImage(vr,Ht[ke][Ke]),ht&&(this._changedImages[vr]=!0)}}}).catch(Ht=>{this._spriteRequest=null,zt=Ht,this.fire(new e.j(zt))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ht&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),Et&&Et(zt)})}_unloadSprite(){for(let z of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(z),this._changedImages[z]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(z){let ht=this.sourceCaches[z.source];if(!ht)return;let Et=z.sourceLayer;if(!Et)return;let zt=ht.getSource();(zt.type==="geojson"||zt.vectorLayerIds&&zt.vectorLayerIds.indexOf(Et)===-1)&&this.fire(new e.j(new Error(`Source layer "${Et}" does not exist on source "${zt.id}" as specified by style layer "${z.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let z in this.sourceCaches)if(!this.sourceCaches[z].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(z,ht=!1){let Et=this._serializedAllLayers();if(!z||z.length===0)return Object.values(ht?e.aB(Et):Et);let zt=[];for(let Ht of z)if(Et[Ht]){let ke=ht?e.aB(Et[Ht]):Et[Ht];zt.push(ke)}return zt}_serializedAllLayers(){let z=this._serializedLayers;if(z)return z;z=this._serializedLayers={};let ht=Object.keys(this._layers);for(let Et of ht){let zt=this._layers[Et];zt.type!=="custom"&&(z[Et]=zt.serialize())}return z}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let z in this.sourceCaches)if(this.sourceCaches[z].hasTransition())return!0;for(let z in this._layers)if(this._layers[z].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(z){if(!this._loaded)return;let ht=this._changed;if(ht){let zt=Object.keys(this._updatedLayers),Ht=Object.keys(this._removedLayers);(zt.length||Ht.length)&&this._updateWorkerLayers(zt,Ht);for(let ke in this._updatedSources){let Fe=this._updatedSources[ke];if(Fe==="reload")this._reloadSource(ke);else{if(Fe!=="clear")throw new Error(`Invalid action ${Fe}`);this._clearSource(ke)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ke in this._updatedPaintProps)this._layers[ke].updateTransitions(z);this.light.updateTransitions(z),this.sky.updateTransitions(z),this._resetUpdates()}let Et={};for(let zt in this.sourceCaches){let Ht=this.sourceCaches[zt];Et[zt]=Ht.used,Ht.used=!1}for(let zt of this._order){let Ht=this._layers[zt];Ht.recalculate(z,this._availableImages),!Ht.isHidden(z.zoom)&&Ht.source&&(this.sourceCaches[Ht.source].used=!0)}for(let zt in Et){let Ht=this.sourceCaches[zt];!!Et[zt]!=!!Ht.used&&Ht.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:zt}))}this.light.recalculate(z),this.sky.recalculate(z),this.z=z.zoom,ht&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let z=Object.keys(this._changedImages);if(z.length){for(let ht in this.sourceCaches)this.sourceCaches[ht].reloadTilesForDependencies(["icons","patterns"],z);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let z in this.sourceCaches)this.sourceCaches[z].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(z,ht){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(z,!1),removedIds:ht})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(z,ht={}){var Et;this._checkLoaded();let zt=this.serialize();if(z=ht.transformStyle?ht.transformStyle(zt,z):z,((Et=ht.validate)===null||Et===void 0||Et)&&Gr(this,e.u(z)))return!1;(z=e.aB(z)).layers=e.az(z.layers);let Ht=e.aC(zt,z),ke=this._getOperationsToPerform(Ht);if(ke.unimplemented.length>0)throw new Error(`Unimplemented: ${ke.unimplemented.join(", ")}.`);if(ke.operations.length===0)return!1;for(let Fe of ke.operations)Fe();return this.stylesheet=z,this._serializedLayers=null,!0}_getOperationsToPerform(z){let ht=[],Et=[];for(let zt of z)switch(zt.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ht.push(()=>this.addLayer.apply(this,zt.args));break;case"removeLayer":ht.push(()=>this.removeLayer.apply(this,zt.args));break;case"setPaintProperty":ht.push(()=>this.setPaintProperty.apply(this,zt.args));break;case"setLayoutProperty":ht.push(()=>this.setLayoutProperty.apply(this,zt.args));break;case"setFilter":ht.push(()=>this.setFilter.apply(this,zt.args));break;case"addSource":ht.push(()=>this.addSource.apply(this,zt.args));break;case"removeSource":ht.push(()=>this.removeSource.apply(this,zt.args));break;case"setLayerZoomRange":ht.push(()=>this.setLayerZoomRange.apply(this,zt.args));break;case"setLight":ht.push(()=>this.setLight.apply(this,zt.args));break;case"setGeoJSONSourceData":ht.push(()=>this.setGeoJSONSourceData.apply(this,zt.args));break;case"setGlyphs":ht.push(()=>this.setGlyphs.apply(this,zt.args));break;case"setSprite":ht.push(()=>this.setSprite.apply(this,zt.args));break;case"setSky":ht.push(()=>this.setSky.apply(this,zt.args));break;case"setTerrain":ht.push(()=>this.map.setTerrain.apply(this,zt.args));break;case"setTransition":ht.push(()=>{});break;default:Et.push(zt.command)}return{operations:ht,unimplemented:Et}}addImage(z,ht){if(this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" already exists.`)));this.imageManager.addImage(z,ht),this._afterImageUpdated(z)}updateImage(z,ht){this.imageManager.updateImage(z,ht)}getImage(z){return this.imageManager.getImage(z)}removeImage(z){if(!this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" does not exist.`)));this.imageManager.removeImage(z),this._afterImageUpdated(z)}_afterImageUpdated(z){this._availableImages=this.imageManager.listImages(),this._changedImages[z]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(z,ht,Et={}){if(this._checkLoaded(),this.sourceCaches[z]!==void 0)throw new Error(`Source "${z}" already exists.`);if(!ht.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ht).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ht.type)>=0&&this._validate(e.u.source,`sources.${z}`,ht,null,Et))return;this.map&&this.map._collectResourceTiming&&(ht.collectResourceTiming=!0);let zt=this.sourceCaches[z]=new Ge(z,ht,this.dispatcher);zt.style=this,zt.setEventedParent(this,()=>({isSourceLoaded:zt.loaded(),source:zt.serialize(),sourceId:z})),zt.onAdd(this.map),this._changed=!0}removeSource(z){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error("There is no source with this ID");for(let Et in this._layers)if(this._layers[Et].source===z)return this.fire(new e.j(new Error(`Source "${z}" cannot be removed while layer "${Et}" is using it.`)));let ht=this.sourceCaches[z];delete this.sourceCaches[z],delete this._updatedSources[z],ht.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:z})),ht.setEventedParent(null),ht.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(z,ht){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error(`There is no source with this ID=${z}`);let Et=this.sourceCaches[z].getSource();if(Et.type!=="geojson")throw new Error(`geojsonSource.type is ${Et.type}, which is !== 'geojson`);Et.setData(ht),this._changed=!0}getSource(z){return this.sourceCaches[z]&&this.sourceCaches[z].getSource()}addLayer(z,ht,Et={}){this._checkLoaded();let zt=z.id;if(this.getLayer(zt))return void this.fire(new e.j(new Error(`Layer "${zt}" already exists on this map.`)));let Ht;if(z.type==="custom"){if(Gr(this,e.aD(z)))return;Ht=e.aA(z)}else{if("source"in z&&typeof z.source=="object"&&(this.addSource(zt,z.source),z=e.aB(z),z=e.e(z,{source:zt})),this._validate(e.u.layer,`layers.${zt}`,z,{arrayIndex:-1},Et))return;Ht=e.aA(z),this._validateLayer(Ht),Ht.setEventedParent(this,{layer:{id:zt}})}let ke=ht?this._order.indexOf(ht):this._order.length;if(ht&&ke===-1)this.fire(new e.j(new Error(`Cannot add layer "${zt}" before non-existing layer "${ht}".`)));else{if(this._order.splice(ke,0,zt),this._layerOrderChanged=!0,this._layers[zt]=Ht,this._removedLayers[zt]&&Ht.source&&Ht.type!=="custom"){let Fe=this._removedLayers[zt];delete this._removedLayers[zt],Fe.type!==Ht.type?this._updatedSources[Ht.source]="clear":(this._updatedSources[Ht.source]="reload",this.sourceCaches[Ht.source].pause())}this._updateLayer(Ht),Ht.onAdd&&Ht.onAdd(this.map)}}moveLayer(z,ht){if(this._checkLoaded(),this._changed=!0,!this._layers[z])return void this.fire(new e.j(new Error(`The layer '${z}' does not exist in the map's style and cannot be moved.`)));if(z===ht)return;let Et=this._order.indexOf(z);this._order.splice(Et,1);let zt=ht?this._order.indexOf(ht):this._order.length;ht&&zt===-1?this.fire(new e.j(new Error(`Cannot move layer "${z}" before non-existing layer "${ht}".`))):(this._order.splice(zt,0,z),this._layerOrderChanged=!0)}removeLayer(z){this._checkLoaded();let ht=this._layers[z];if(!ht)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${z}".`)));ht.setEventedParent(null);let Et=this._order.indexOf(z);this._order.splice(Et,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[z]=ht,delete this._layers[z],this._serializedLayers&&delete this._serializedLayers[z],delete this._updatedLayers[z],delete this._updatedPaintProps[z],ht.onRemove&&ht.onRemove(this.map)}getLayer(z){return this._layers[z]}getLayersOrder(){return[...this._order]}hasLayer(z){return z in this._layers}setLayerZoomRange(z,ht,Et){this._checkLoaded();let zt=this.getLayer(z);zt?zt.minzoom===ht&&zt.maxzoom===Et||(ht!=null&&(zt.minzoom=ht),Et!=null&&(zt.maxzoom=Et),this._updateLayer(zt)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${z}".`)))}setFilter(z,ht,Et={}){this._checkLoaded();let zt=this.getLayer(z);if(zt){if(!e.aE(zt.filter,ht))return ht==null?(zt.filter=void 0,void this._updateLayer(zt)):void(this._validate(e.u.filter,`layers.${zt.id}.filter`,ht,null,Et)||(zt.filter=e.aB(ht),this._updateLayer(zt)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${z}".`)))}getFilter(z){return e.aB(this.getLayer(z).filter)}setLayoutProperty(z,ht,Et,zt={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getLayoutProperty(ht),Et)||(Ht.setLayoutProperty(ht,Et,zt),this._updateLayer(Ht)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getLayoutProperty(z,ht){let Et=this.getLayer(z);if(Et)return Et.getLayoutProperty(ht);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${z}".`)))}setPaintProperty(z,ht,Et,zt={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getPaintProperty(ht),Et)||(Ht.setPaintProperty(ht,Et,zt)&&this._updateLayer(Ht),this._changed=!0,this._updatedPaintProps[z]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getPaintProperty(z,ht){return this.getLayer(z).getPaintProperty(ht)}setFeatureState(z,ht){this._checkLoaded();let Et=z.source,zt=z.sourceLayer,Ht=this.sourceCaches[Et];if(Ht===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let ke=Ht.getSource().type;ke==="geojson"&&zt?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ke!=="vector"||zt?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Ht.setFeatureState(zt,z.id,ht)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(z,ht){this._checkLoaded();let Et=z.source,zt=this.sourceCaches[Et];if(zt===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Ht=zt.getSource().type,ke=Ht==="vector"?z.sourceLayer:void 0;Ht!=="vector"||ke?ht&&typeof z.id!="string"&&typeof z.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):zt.removeFeatureState(ke,z.id,ht):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(z){this._checkLoaded();let ht=z.source,Et=z.sourceLayer,zt=this.sourceCaches[ht];if(zt!==void 0)return zt.getSource().type!=="vector"||Et?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),zt.getFeatureState(Et,z.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${ht}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let z=e.aF(this.sourceCaches,Ht=>Ht.serialize()),ht=this._serializeByIds(this._order,!0),Et=this.map.getTerrain()||void 0,zt=this.stylesheet;return e.aG({version:zt.version,name:zt.name,metadata:zt.metadata,light:zt.light,sky:zt.sky,center:zt.center,zoom:zt.zoom,bearing:zt.bearing,pitch:zt.pitch,sprite:zt.sprite,glyphs:zt.glyphs,transition:zt.transition,sources:z,layers:ht,terrain:Et},Ht=>Ht!==void 0)}_updateLayer(z){this._updatedLayers[z.id]=!0,z.source&&!this._updatedSources[z.source]&&this.sourceCaches[z.source].getSource().type!=="raster"&&(this._updatedSources[z.source]="reload",this.sourceCaches[z.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(z){let ht=ke=>this._layers[ke].type==="fill-extrusion",Et={},zt=[];for(let ke=this._order.length-1;ke>=0;ke--){let Fe=this._order[ke];if(ht(Fe)){Et[Fe]=ke;for(let Ke of z){let vr=Ke[Fe];if(vr)for(let Dr of vr)zt.push(Dr)}}}zt.sort((ke,Fe)=>Fe.intersectionZ-ke.intersectionZ);let Ht=[];for(let ke=this._order.length-1;ke>=0;ke--){let Fe=this._order[ke];if(ht(Fe))for(let Ke=zt.length-1;Ke>=0;Ke--){let vr=zt[Ke].feature;if(Et[vr.layer.id]{let en=Ae.featureSortOrder;if(en){let vn=en.indexOf(Or.featureIndex);return en.indexOf(Nr.featureIndex)-vn}return Nr.featureIndex-Or.featureIndex});for(let Or of wr)$e.push(Or)}}for(let Ae in Xt)Xt[Ae].forEach(je=>{let Oe=je.feature,$e=vr[Fe[Ae].source].getFeatureState(Oe.layer["source-layer"],Oe.id);Oe.source=Oe.layer.source,Oe.layer["source-layer"]&&(Oe.sourceLayer=Oe.layer["source-layer"]),Oe.state=$e});return Xt}(this._layers,ke,this.sourceCaches,z,ht,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Ht)}querySourceFeatures(z,ht){ht&&ht.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",ht.filter,null,ht);let Et=this.sourceCaches[z];return Et?function(zt,Ht){let ke=zt.getRenderableIds().map(vr=>zt.getTileByID(vr)),Fe=[],Ke={};for(let vr=0;vrun.getTileByID(Sn)).sort((Sn,Xt)=>Xt.tileID.overscaledZ-Sn.tileID.overscaledZ||(Sn.tileID.isLessThan(Xt.tileID)?-1:1))}let Fr=this.crossTileSymbolIndex.addLayer(Dr,Ke[Dr.source],z.center.lng);ke=ke||Fr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Ht=Ht||this._layerOrderChanged||Et===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.now(),z.zoom))&&(this.pauseablePlacement=new za(z,this.map.terrain,this._order,Ht,ht,Et,zt,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ke),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.now()),Fe=!0),ke&&this.pauseablePlacement.placement.setStale()),Fe||ke)for(let vr of this._order){let Dr=this._layers[vr];Dr.type==="symbol"&&this.placement.updateLayerOpacities(Dr,Ke[Dr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.now())}_releaseSymbolFadeTiles(){for(let z in this.sourceCaches)this.sourceCaches[z].releaseSymbolFadeTiles()}getImages(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.imageManager.getImages(ht.icons);this._updateTilesForChangedImages();let zt=this.sourceCaches[ht.source];return zt&&zt.setDependencies(ht.tileID.key,ht.type,ht.icons),Et})}getGlyphs(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.glyphManager.getGlyphs(ht.stacks),zt=this.sourceCaches[ht.source];return zt&&zt.setDependencies(ht.tileID.key,ht.type,[""]),Et})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(z,ht={}){this._checkLoaded(),z&&this._validate(e.u.glyphs,"glyphs",z,null,ht)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=z,this.glyphManager.entries={},this.glyphManager.setURL(z))}addSprite(z,ht,Et={},zt){this._checkLoaded();let Ht=[{id:z,url:ht}],ke=[...A(this.stylesheet.sprite),...Ht];this._validate(e.u.sprite,"sprite",ke,null,Et)||(this.stylesheet.sprite=ke,this._loadSprite(Ht,!0,zt))}removeSprite(z){this._checkLoaded();let ht=A(this.stylesheet.sprite);if(ht.find(Et=>Et.id===z)){if(this._spritesImagesIds[z])for(let Et of this._spritesImagesIds[z])this.imageManager.removeImage(Et),this._changedImages[Et]=!0;ht.splice(ht.findIndex(Et=>Et.id===z),1),this.stylesheet.sprite=ht.length>0?ht:void 0,delete this._spritesImagesIds[z],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${z}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(z,ht={},Et){this._checkLoaded(),z&&this._validate(e.u.sprite,"sprite",z,null,ht)||(this.stylesheet.sprite=z,z?this._loadSprite(z,!0,Et):(this._unloadSprite(),Et&&Et(null)))}}var pn=e.Y([{name:"a_pos",type:"Int16",components:2}]);let on={prelude:Ce(`#ifdef GL_ES +{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"}}),lq=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}),K1=Dt((Q,Z)=>{var c=Y0(),g=sq(),I=lq(),S='© OpenStreetMap contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:t,dark:e,satellite:I,"satellite-streets":g,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,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":t,"carto-darkmatter":e,"carto-voyager":r,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":n,"carto-voyager-nolabels":o},l=c(i);Z.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",l.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error."}}),z3=Dt((Q,Z)=>{var c=kn(),g=pi().defaultLine,I=Uh().attributes,S=ma(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=K1(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("map",".layers",!0)],domain:I({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},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:g}},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:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),TT=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=z0(),t=xx(),e=ef(),r=z3(),a=qo(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=z3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.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:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),LE=Dt((Q,Z)=>{var c=["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"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),uq=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=O0(),t=x0(),e=D0(),r=TT(),a=LE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),PE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),IE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),cq=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=sa().BADNUM,S=q1(),t=Xc(),e=Vs(),r=wg(),a=Tc(),n=LE().isSupportedFont,o=IE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),B=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||B)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),B)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),B;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(B=0;B850?B+=" Black":p>750?B+=" Extra Bold":p>650?B+=" Bold":p>550?B+=" Semi Bold":p>450?B+=" Medium":p>350?B+=" Regular":p>250?B+=" Light":p>150?B+=" Extra Light":B+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(B="Open Sans",p>750?B+=" Extrabold":p>650?B+=" Bold":p>550?B+=" Semibold":p>350?B+=" Regular":B+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(B="Klokantech Noto Sans",k[3]==="CJK"&&(B+=" CJK"),B+=p>500?" Bold":" Regular")),w&&(B+=" Italic"),B==="Open Sans Regular Italic"?B="Open Sans Italic":B==="Open Sans Regular Bold"?B="Open Sans Bold":B==="Open Sans Regular Bold Italic"?B="Open Sans Bold Italic":B==="Klokantech Noto Sans Regular Italic"&&(B="Klokantech Noto Sans Italic"),n(B)||(B=A);var O=B.split(", ");return O}}),hq=Dt((Q,Z)=>{var c=kn(),g=cq(),I=K1().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermap",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Bu(),S=g.fillText,t=sa().BADNUM,e=K1().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),B=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=B-O,n.y1=B+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),fq=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),dq=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=sa().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=typeof globalThis<"u"?globalThis:c||self,c.maplibregl=g())})(Q,function(){var c={},g={};function I(t,e,r){if(g[t]=r,t==="index"){var a="var sharedModule = {}; ("+g.shared+")(sharedModule); ("+g.worker+")(sharedModule);",n={};return g.shared(n),g.index(c,n),typeof window<"u"&&c.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),c}}I("shared",["exports"],function(t){function e(G,D,nt,bt){return new(nt||(nt=Promise))(function(Bt,Kt){function Qt(rr){try{Re(bt.next(rr))}catch(xr){Kt(xr)}}function we(rr){try{Re(bt.throw(rr))}catch(xr){Kt(xr)}}function Re(rr){var xr;rr.done?Bt(rr.value):(xr=rr.value,xr instanceof nt?xr:new nt(function(Lr){Lr(xr)})).then(Qt,we)}Re((bt=bt.apply(G,D||[])).next())})}function r(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}typeof SuppressedError=="function"&&SuppressedError;var a=n;function n(G,D){this.x=G,this.y=D}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(G){return this.clone()._add(G)},sub:function(G){return this.clone()._sub(G)},multByPoint:function(G){return this.clone()._multByPoint(G)},divByPoint:function(G){return this.clone()._divByPoint(G)},mult:function(G){return this.clone()._mult(G)},div:function(G){return this.clone()._div(G)},rotate:function(G){return this.clone()._rotate(G)},rotateAround:function(G,D){return this.clone()._rotateAround(G,D)},matMult:function(G){return this.clone()._matMult(G)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(G){return this.x===G.x&&this.y===G.y},dist:function(G){return Math.sqrt(this.distSqr(G))},distSqr:function(G){var D=G.x-this.x,nt=G.y-this.y;return D*D+nt*nt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(G){return Math.atan2(this.y-G.y,this.x-G.x)},angleWith:function(G){return this.angleWithSep(G.x,G.y)},angleWithSep:function(G,D){return Math.atan2(this.x*D-this.y*G,this.x*G+this.y*D)},_matMult:function(G){var D=G[2]*this.x+G[3]*this.y;return this.x=G[0]*this.x+G[1]*this.y,this.y=D,this},_add:function(G){return this.x+=G.x,this.y+=G.y,this},_sub:function(G){return this.x-=G.x,this.y-=G.y,this},_mult:function(G){return this.x*=G,this.y*=G,this},_div:function(G){return this.x/=G,this.y/=G,this},_multByPoint:function(G){return this.x*=G.x,this.y*=G.y,this},_divByPoint:function(G){return this.x/=G.x,this.y/=G.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var G=this.y;return this.y=this.x,this.x=-G,this},_rotate:function(G){var D=Math.cos(G),nt=Math.sin(G),bt=nt*this.x+D*this.y;return this.x=D*this.x-nt*this.y,this.y=bt,this},_rotateAround:function(G,D){var nt=Math.cos(G),bt=Math.sin(G),Bt=D.y+bt*(this.x-D.x)+nt*(this.y-D.y);return this.x=D.x+nt*(this.x-D.x)-bt*(this.y-D.y),this.y=Bt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(G){return G instanceof n?G:Array.isArray(G)?new n(G[0],G[1]):G};var o=r(a),i=l;function l(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}l.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Bt=this.sampleCurveX(nt)-G;if(Math.abs(Bt)Bt?Qt=nt:we=nt,nt=.5*(we-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var f=r(i);let x,y;function v(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function T(){if(y==null&&(y=!1,v())){let G=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(G){for(let nt=0;nt<25;nt++){let bt=4*nt;G.fillStyle=`rgb(${bt},${bt+1},${bt+2})`,G.fillRect(nt%5,Math.floor(nt/5),1,1)}let D=G.getImageData(0,0,5,5).data;for(let nt=0;nt<100;nt++)if(nt%4!=3&&D[nt]!==nt){y=!0;break}}}return y||!1}function u(G,D,nt,bt){let Bt=new f(G,D,nt,bt);return Kt=>Bt.solve(Kt)}let b=u(.25,.1,.25,1);function _(G,D,nt){return Math.min(nt,Math.max(D,G))}function P(G,D,nt){let bt=nt-D,Bt=((G-D)%bt+bt)%bt+D;return Bt===D?nt:Bt}function M(G,...D){for(let nt of D)for(let bt in nt)G[bt]=nt[bt];return G}let C=1;function A(G,D,nt){let bt={};for(let Bt in G)bt[Bt]=D.call(this,G[Bt],Bt,G);return bt}function h(G,D,nt){let bt={};for(let Bt in G)D.call(this,G[Bt],Bt,G)&&(bt[Bt]=G[Bt]);return bt}function p(G){return Array.isArray(G)?G.map(p):typeof G=="object"&&G?A(G,p):G}let k={};function w(G){k[G]||(typeof console<"u"&&console.warn(G),k[G]=!0)}function B(G,D,nt){return(nt.y-G.y)*(D.x-G.x)>(D.y-G.y)*(nt.x-G.x)}function O(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let j=null;function V(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function F(G,D,nt,bt,Bt){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Kt=new VideoFrame(G,{timestamp:0});try{let Qt=Kt?.format;if(!Qt||!Qt.startsWith("BGR")&&!Qt.startsWith("RGB"))throw new Error(`Unrecognized format ${Qt}`);let we=Qt.startsWith("BGR"),Re=new Uint8ClampedArray(bt*Bt*4);if(yield Kt.copyTo(Re,function(rr,xr,Lr,Zr,ln){let bn=4*Math.max(-xr,0),Ln=(Math.max(0,Lr)-Lr)*Zr*4+bn,Kn=4*Zr,Ci=Math.max(0,xr),Sa=Math.max(0,Lr);return{rect:{x:Ci,y:Sa,width:Math.min(rr.width,xr+Zr)-Ci,height:Math.min(rr.height,Lr+ln)-Sa},layout:[{offset:Ln,stride:Kn}]}}(G,D,nt,bt,Bt)),we)for(let rr=0;rrO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,pt=function(G,D){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let bt=yt(G.url);if(bt)return bt(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:mt},D)}if(!(/^file:/.test(nt=G.url)||/^file:/.test(tt())&&!/^\w+:/.test(nt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(bt,Bt){return e(this,void 0,void 0,function*(){let Kt=new Request(bt.url,{method:bt.method||"GET",body:bt.body,credentials:bt.credentials,headers:bt.headers,cache:bt.cache,referrer:tt(),signal:Bt.signal});bt.type!=="json"||Kt.headers.has("Accept")||Kt.headers.set("Accept","application/json");let Qt=yield fetch(Kt);if(!Qt.ok){let rr=yield Qt.blob();throw new st(Qt.status,Qt.statusText,bt.url,rr)}let we;we=bt.type==="arrayBuffer"||bt.type==="image"?Qt.arrayBuffer():bt.type==="json"?Qt.json():Qt.text();let Re=yield we;if(Bt.signal.aborted)throw J();return{data:Re,cacheControl:Qt.headers.get("Cache-Control"),expires:Qt.headers.get("Expires")}})}(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:mt},D)}var nt;return function(bt,Bt){return new Promise((Kt,Qt)=>{var we;let Re=new XMLHttpRequest;Re.open(bt.method||"GET",bt.url,!0),bt.type!=="arrayBuffer"&&bt.type!=="image"||(Re.responseType="arraybuffer");for(let rr in bt.headers)Re.setRequestHeader(rr,bt.headers[rr]);bt.type==="json"&&(Re.responseType="text",!((we=bt.headers)===null||we===void 0)&&we.Accept||Re.setRequestHeader("Accept","application/json")),Re.withCredentials=bt.credentials==="include",Re.onerror=()=>{Qt(new Error(Re.statusText))},Re.onload=()=>{if(!Bt.signal.aborted)if((Re.status>=200&&Re.status<300||Re.status===0)&&Re.response!==null){let rr=Re.response;if(bt.type==="json")try{rr=JSON.parse(Re.response)}catch(xr){return void Qt(xr)}Kt({data:rr,cacheControl:Re.getResponseHeader("Cache-Control"),expires:Re.getResponseHeader("Expires")})}else{let rr=new Blob([Re.response],{type:Re.getResponseHeader("Content-Type")});Qt(new st(Re.status,Re.statusText,bt.url,rr))}},Bt.signal.addEventListener("abort",()=>{Re.abort(),Qt(J())}),Re.send(bt.body)})}(G,D)};function rt(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let D=new URL(G),nt=window.location;return D.protocol===nt.protocol&&D.host===nt.host}function at(G,D,nt){nt[G]&&nt[G].indexOf(D)!==-1||(nt[G]=nt[G]||[],nt[G].push(D))}function vt(G,D,nt){if(nt&&nt[G]){let bt=nt[G].indexOf(D);bt!==-1&&nt[G].splice(bt,1)}}class it{constructor(D,nt={}){M(this,nt),this.type=D}}class K extends it{constructor(D,nt={}){super("error",M({error:D},nt))}}class ft{on(D,nt){return this._listeners=this._listeners||{},at(D,nt,this._listeners),this}off(D,nt){return vt(D,nt,this._listeners),vt(D,nt,this._oneTimeListeners),this}once(D,nt){return nt?(this._oneTimeListeners=this._oneTimeListeners||{},at(D,nt,this._oneTimeListeners),this):new Promise(bt=>this.once(D,bt))}fire(D,nt){typeof D=="string"&&(D=new it(D,nt||{}));let bt=D.type;if(this.listens(bt)){D.target=this;let Bt=this._listeners&&this._listeners[bt]?this._listeners[bt].slice():[];for(let we of Bt)we.call(this,D);let Kt=this._oneTimeListeners&&this._oneTimeListeners[bt]?this._oneTimeListeners[bt].slice():[];for(let we of Kt)vt(bt,we,this._oneTimeListeners),we.call(this,D);let Qt=this._eventedParent;Qt&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Qt.fire(D))}else D instanceof K&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,nt){return this._eventedParent=D,this._eventedParentData=nt,this}}var ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let kt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function It(G,D){let nt={};for(let bt in G)bt!=="ref"&&(nt[bt]=G[bt]);return kt.forEach(bt=>{bt in D&&(nt[bt]=D[bt])}),nt}function Pt(G,D){if(Array.isArray(G)){if(!Array.isArray(D)||G.length!==D.length)return!1;for(let nt=0;nt`:G.itemType.kind==="value"?"array":`array<${D}>`}return G.kind}let Ct=[oe,Ae,He,Ge,cr,br,ur,Gt(jr),Xr,nn,Le];function gt(G,D){if(D.kind==="error")return null;if(G.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!gt(G.itemType,D.itemType))&&(typeof G.N!="number"||G.N===D.N))return null}else{if(G.kind===D.kind)return null;if(G.kind==="value"){for(let nt of Ct)if(!gt(nt,D))return null}}return`Expected ${ne(G)} but found ${ne(D)} instead.`}function St(G,D){return D.some(nt=>nt.kind===G.kind)}function Nt(G,D){return D.some(nt=>nt==="null"?G===null:nt==="array"?Array.isArray(G):nt==="object"?G&&!Array.isArray(G)&&typeof G=="object":nt===typeof G)}function re(G,D){return G.kind==="array"&&D.kind==="array"?G.itemType.kind===D.itemType.kind&&typeof G.N=="number":G.kind===D.kind}let le=.96422,ke=.82521,Ue=4/29,qe=6/29,or=3*qe*qe,Sr=qe*qe*qe,Mr=Math.PI/180,mr=180/Math.PI;function Qr(G){return(G%=360)<0&&(G+=360),G}function Wn([G,D,nt,bt]){let Bt,Kt,Qt=ei((.2225045*(G=qn(G))+.7168786*(D=qn(D))+.0606169*(nt=qn(nt)))/1);G===D&&D===nt?Bt=Kt=Qt:(Bt=ei((.4360747*G+.3850649*D+.1430804*nt)/le),Kt=ei((.0139322*G+.0971045*D+.7141733*nt)/ke));let we=116*Qt-16;return[we<0?0:we,500*(Bt-Qt),200*(Qt-Kt),bt]}function qn(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function ei(G){return G>Sr?Math.pow(G,1/3):G/or+Ue}function Di([G,D,nt,bt]){let Bt=(G+16)/116,Kt=isNaN(D)?Bt:Bt+D/500,Qt=isNaN(nt)?Bt:Bt-nt/200;return Bt=1*Gn(Bt),Kt=le*Gn(Kt),Qt=ke*Gn(Qt),[ui(3.1338561*Kt-1.6168667*Bt-.4906146*Qt),ui(-.9787684*Kt+1.9161415*Bt+.033454*Qt),ui(.0719453*Kt-.2289914*Bt+1.4052427*Qt),bt]}function ui(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function Gn(G){return G>qe?G*G*G:or*(G-Ue)}function ua(G){return parseInt(G.padEnd(2,G),16)/255}function Yi(G,D){return We(D?G/100:G,0,1)}function We(G,D,nt){return Math.min(Math.max(D,G),nt)}function nr(G){return!G.some(Number.isNaN)}let dr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class _r{constructor(D,nt,bt,Bt=1,Kt=!0){this.r=D,this.g=nt,this.b=bt,this.a=Bt,Kt||(this.r*=Bt,this.g*=Bt,this.b*=Bt,Bt||this.overwriteGetter("rgb",[D,nt,bt,Bt]))}static parse(D){if(D instanceof _r)return D;if(typeof D!="string")return;let nt=function(bt){if((bt=bt.toLowerCase().trim())==="transparent")return[0,0,0,0];let Bt=dr[bt];if(Bt){let[Qt,we,Re]=Bt;return[Qt/255,we/255,Re/255,1]}if(bt.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(bt)){let Qt=bt.length<6?1:2,we=1;return[ua(bt.slice(we,we+=Qt)),ua(bt.slice(we,we+=Qt)),ua(bt.slice(we,we+=Qt)),ua(bt.slice(we,we+Qt)||"ff")]}if(bt.startsWith("rgb")){let Qt=bt.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qt){let[we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci,Sa]=Qt,ra=[xr||" ",ln||" ",Kn].join("");if(ra===" "||ra===" /"||ra===",,"||ra===",,,"){let ya=[rr,Zr,Ln].join(""),Ya=ya==="%%%"?100:ya===""?255:0;if(Ya){let Ao=[We(+Re/Ya,0,1),We(+Lr/Ya,0,1),We(+bn/Ya,0,1),Ci?Yi(+Ci,Sa):1];if(nr(Ao))return Ao}}return}}let Kt=bt.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Kt){let[Qt,we,Re,rr,xr,Lr,Zr,ln,bn]=Kt,Ln=[Re||" ",xr||" ",Zr].join("");if(Ln===" "||Ln===" /"||Ln===",,"||Ln===",,,"){let Kn=[+we,We(+rr,0,100),We(+Lr,0,100),ln?Yi(+ln,bn):1];if(nr(Kn))return function([Ci,Sa,ra,ya]){function Ya(Ao){let Ss=(Ao+Ci/30)%12,Sl=Sa*Math.min(ra,1-ra);return ra-Sl*Math.max(-1,Math.min(Ss-3,9-Ss,1))}return Ci=Qr(Ci),Sa/=100,ra/=100,[Ya(0),Ya(8),Ya(4),ya]}(Kn)}}}(D);return nt?new _r(...nt,!1):void 0}get rgb(){let{r:D,g:nt,b:bt,a:Bt}=this,Kt=Bt||1/0;return this.overwriteGetter("rgb",[D/Kt,nt/Kt,bt/Kt,Bt])}get hcl(){return this.overwriteGetter("hcl",function(D){let[nt,bt,Bt,Kt]=Wn(D),Qt=Math.sqrt(bt*bt+Bt*Bt);return[Math.round(1e4*Qt)?Qr(Math.atan2(Bt,bt)*mr):NaN,Qt,nt,Kt]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Wn(this.rgb))}overwriteGetter(D,nt){return Object.defineProperty(this,D,{value:nt}),nt}toString(){let[D,nt,bt,Bt]=this.rgb;return`rgba(${[D,nt,bt].map(Kt=>Math.round(255*Kt)).join(",")},${Bt})`}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1);class tn{constructor(D,nt,bt){this.sensitivity=D?nt?"variant":"case":nt?"accent":"base",this.locale=bt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,nt){return this.collator.compare(D,nt)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cn{constructor(D,nt,bt,Bt,Kt){this.text=D,this.image=nt,this.scale=bt,this.fontStack=Bt,this.textColor=Kt}}class Tn{constructor(D){this.sections=D}static fromString(D){return new Tn([new Cn(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof Tn?D:Tn.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class Mn{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Mn)return D;if(typeof D=="number")return new Mn([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let nt of D)if(typeof nt!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new Mn(D)}}toString(){return JSON.stringify(this.values)}}let mi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Mi{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Mi)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let nt=0;nt=0&&G<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof nt=="number"&&nt>=0&&nt<=255?bt===void 0||typeof bt=="number"&&bt>=0&&bt<=1?null:`Invalid rgba value [${[G,D,nt,bt].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof bt=="number"?[G,D,nt,bt]:[G,D,nt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ji(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof _r||G instanceof tn||G instanceof Tn||G instanceof Mn||G instanceof Mi||G instanceof Ni)return!0;if(Array.isArray(G)){for(let D of G)if(!Ji(D))return!1;return!0}if(typeof G=="object"){for(let D in G)if(!Ji(G[D]))return!1;return!0}return!1}function di(G){if(G===null)return oe;if(typeof G=="string")return He;if(typeof G=="boolean")return Ge;if(typeof G=="number")return Ae;if(G instanceof _r)return cr;if(G instanceof tn)return qr;if(G instanceof Tn)return br;if(G instanceof Mn)return Xr;if(G instanceof Mi)return Le;if(G instanceof Ni)return nn;if(Array.isArray(G)){let D=G.length,nt;for(let bt of G){let Bt=di(bt);if(nt){if(nt===Bt)continue;nt=jr;break}nt=Bt}return Gt(nt||jr,D)}return ur}function za(G){let D=typeof G;return G===null?"":D==="string"||D==="number"||D==="boolean"?String(G):G instanceof _r||G instanceof Tn||G instanceof Mn||G instanceof Mi||G instanceof Ni?G.toString():JSON.stringify(G)}class qa{constructor(D,nt){this.type=D,this.value=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!Ji(D[1]))return nt.error("invalid value");let bt=D[1],Bt=di(bt),Kt=nt.expectedType;return Bt.kind!=="array"||Bt.N!==0||!Kt||Kt.kind!=="array"||typeof Kt.N=="number"&&Kt.N!==0||(Bt=Kt),new qa(Bt,bt)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Oe{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let ze={string:He,number:Ae,boolean:Ge,object:ur};class Br{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt,Bt=1,Kt=D[0];if(Kt==="array"){let we,Re;if(D.length>2){let rr=D[1];if(typeof rr!="string"||!(rr in ze)||rr==="object")return nt.error('The item type argument of "array" must be one of string, number, boolean',1);we=ze[rr],Bt++}else we=jr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return nt.error('The length argument to "array" must be a positive integer literal',2);Re=D[2],Bt++}bt=Gt(we,Re)}else{if(!ze[Kt])throw new Error(`Types doesn't contain name = ${Kt}`);bt=ze[Kt]}let Qt=[];for(;BtD.outputDefined())}}let $r={"to-boolean":Ge,"to-color":cr,"to-number":Ae,"to-string":He};class Gr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[0];if(!$r[bt])throw new Error(`Can't parse ${bt} as it is not part of the known types`);if((bt==="to-boolean"||bt==="to-string")&&D.length!==2)return nt.error("Expected one argument.");let Bt=$r[bt],Kt=[];for(let Qt=1;Qt4?`Invalid rbga value ${JSON.stringify(nt)}: expected an array containing either three or four numeric values.`:Hi(nt[0],nt[1],nt[2],nt[3]),!bt))return new _r(nt[0]/255,nt[1]/255,nt[2]/255,nt[3])}throw new Oe(bt||`Could not parse color from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"padding":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Bt=Mn.parse(nt);if(Bt)return Bt}throw new Oe(`Could not parse padding from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"variableAnchorOffsetCollection":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Bt=Mi.parse(nt);if(Bt)return Bt}throw new Oe(`Could not parse variableAnchorOffsetCollection from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"number":{let nt=null;for(let bt of this.args){if(nt=bt.evaluate(D),nt===null)return 0;let Bt=Number(nt);if(!isNaN(Bt))return Bt}throw new Oe(`Could not convert ${JSON.stringify(nt)} to number.`)}case"formatted":return Tn.fromString(za(this.args[0].evaluate(D)));case"resolvedImage":return Ni.fromString(za(this.args[0].evaluate(D)));default:return za(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Rr=["Unknown","Point","LineString","Polygon"];class Yr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Rr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let nt=this._parseColorCache[D];return nt||(nt=this._parseColorCache[D]=_r.parse(D)),nt}}class mn{constructor(D,nt,bt=[],Bt,Kt=new ve,Qt=[]){this.registry=D,this.path=bt,this.key=bt.map(we=>`[${we}]`).join(""),this.scope=Kt,this.errors=Qt,this.expectedType=Bt,this._isConstant=nt}parse(D,nt,bt,Bt,Kt={}){return nt?this.concat(nt,bt,Bt)._parse(D,Kt):this._parse(D,Kt)}_parse(D,nt){function bt(Bt,Kt,Qt){return Qt==="assert"?new Br(Kt,[Bt]):Qt==="coerce"?new Gr(Kt,[Bt]):Bt}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Bt=D[0];if(typeof Bt!="string")return this.error(`Expression name must be a string, but found ${typeof Bt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Kt=this.registry[Bt];if(Kt){let Qt=Kt.parse(D,this);if(!Qt)return null;if(this.expectedType){let we=this.expectedType,Re=Qt.type;if(we.kind!=="string"&&we.kind!=="number"&&we.kind!=="boolean"&&we.kind!=="object"&&we.kind!=="array"||Re.kind!=="value")if(we.kind!=="color"&&we.kind!=="formatted"&&we.kind!=="resolvedImage"||Re.kind!=="value"&&Re.kind!=="string")if(we.kind!=="padding"||Re.kind!=="value"&&Re.kind!=="number"&&Re.kind!=="array")if(we.kind!=="variableAnchorOffsetCollection"||Re.kind!=="value"&&Re.kind!=="array"){if(this.checkSubtype(we,Re))return null}else Qt=bt(Qt,we,nt.typeAnnotation||"coerce");else Qt=bt(Qt,we,nt.typeAnnotation||"coerce");else Qt=bt(Qt,we,nt.typeAnnotation||"coerce");else Qt=bt(Qt,we,nt.typeAnnotation||"assert")}if(!(Qt instanceof qa)&&Qt.type.kind!=="resolvedImage"&&this._isConstant(Qt)){let we=new Yr;try{Qt=new qa(Qt.type,Qt.evaluate(we))}catch(Re){return this.error(Re.message),null}}return Qt}return this.error(`Unknown expression "${Bt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,nt,bt){let Bt=typeof D=="number"?this.path.concat(D):this.path,Kt=bt?this.scope.concat(bt):this.scope;return new mn(this.registry,this._isConstant,Bt,nt||null,Kt,this.errors)}error(D,...nt){let bt=`${this.key}${nt.map(Bt=>`[${Bt}]`).join("")}`;this.errors.push(new ee(bt,D))}checkSubtype(D,nt){let bt=gt(D,nt);return bt&&this.error(bt),bt}}class on{constructor(D,nt){this.type=nt.type,this.bindings=[].concat(D),this.result=nt}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let nt of this.bindings)D(nt[1]);D(this.result)}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let bt=[];for(let Kt=1;Kt=bt.length)throw new Oe(`Array index out of bounds: ${nt} > ${bt.length-1}.`);if(nt!==Math.floor(nt))throw new Oe(`Array index must be an integer, but found ${nt} instead.`);return bt[nt]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class Hr{constructor(D,nt){this.type=Ge,this.needle=D,this.haystack=nt}static parse(D,nt){if(D.length!==3)return nt.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Bt=nt.parse(D[2],2,jr);return bt&&Bt?St(bt.type,[Ge,He,Ae,oe,jr])?new Hr(bt,Bt):nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`):null}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!bt)return!1;if(!Nt(nt,["boolean","string","number","null"]))throw new Oe(`Expected first argument to be of type boolean, string, number or null, but found ${ne(di(nt))} instead.`);if(!Nt(bt,["string","array"]))throw new Oe(`Expected second argument to be of type array or string, but found ${ne(di(bt))} instead.`);return bt.indexOf(nt)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class _n{constructor(D,nt,bt){this.type=Ae,this.needle=D,this.haystack=nt,this.fromIndex=bt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Bt=nt.parse(D[2],2,jr);if(!bt||!Bt)return null;if(!St(bt.type,[Ge,He,Ae,oe,jr]))return nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Ae);return Kt?new _n(bt,Bt,Kt):null}return new _n(bt,Bt)}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!Nt(nt,["boolean","string","number","null"]))throw new Oe(`Expected first argument to be of type boolean, string, number or null, but found ${ne(di(nt))} instead.`);let Bt;if(this.fromIndex&&(Bt=this.fromIndex.evaluate(D)),Nt(bt,["string"])){let Kt=bt.indexOf(nt,Bt);return Kt===-1?-1:[...bt.slice(0,Kt)].length}if(Nt(bt,["array"]))return bt.indexOf(nt,Bt);throw new Oe(`Expected second argument to be of type array or string, but found ${ne(di(bt))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Bn{constructor(D,nt,bt,Bt,Kt,Qt){this.inputType=D,this.type=nt,this.input=bt,this.cases=Bt,this.outputs=Kt,this.otherwise=Qt}static parse(D,nt){if(D.length<5)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return nt.error("Expected an even number of arguments.");let bt,Bt;nt.expectedType&&nt.expectedType.kind!=="value"&&(Bt=nt.expectedType);let Kt={},Qt=[];for(let rr=2;rrNumber.MAX_SAFE_INTEGER)return Zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bn=="number"&&Math.floor(bn)!==bn)return Zr.error("Numeric branch labels must be integer values.");if(bt){if(Zr.checkSubtype(bt,di(bn)))return null}else bt=di(bn);if(Kt[String(bn)]!==void 0)return Zr.error("Branch labels must be unique.");Kt[String(bn)]=Qt.length}let ln=nt.parse(Lr,rr,Bt);if(!ln)return null;Bt=Bt||ln.type,Qt.push(ln)}let we=nt.parse(D[1],1,jr);if(!we)return null;let Re=nt.parse(D[D.length-1],D.length-1,Bt);return Re?we.type.kind!=="value"&&nt.concat(1).checkSubtype(bt,we.type)?null:new Bn(bt,Bt,we,Kt,Qt,Re):null}evaluate(D){let nt=this.input.evaluate(D);return(di(nt)===this.inputType&&this.outputs[this.cases[nt]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class ri{constructor(D,nt,bt){this.type=D,this.branches=nt,this.otherwise=bt}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return nt.error("Expected an odd number of arguments.");let bt;nt.expectedType&&nt.expectedType.kind!=="value"&&(bt=nt.expectedType);let Bt=[];for(let Qt=1;Qtnt.outputDefined())&&this.otherwise.outputDefined()}}class Pn{constructor(D,nt,bt,Bt){this.type=D,this.input=nt,this.beginIndex=bt,this.endIndex=Bt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Bt=nt.parse(D[2],2,Ae);if(!bt||!Bt)return null;if(!St(bt.type,[Gt(jr),He,jr]))return nt.error(`Expected first argument to be of type array or string, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Ae);return Kt?new Pn(bt.type,bt,Bt,Kt):null}return new Pn(bt.type,bt,Bt)}evaluate(D){let nt=this.input.evaluate(D),bt=this.beginIndex.evaluate(D),Bt;if(this.endIndex&&(Bt=this.endIndex.evaluate(D)),Nt(nt,["string"]))return[...nt].slice(bt,Bt).join("");if(Nt(nt,["array"]))return nt.slice(bt,Bt);throw new Oe(`Expected first argument to be of type array or string, but found ${ne(di(nt))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function En(G,D){let nt=G.length-1,bt,Bt,Kt=0,Qt=nt,we=0;for(;Kt<=Qt;)if(we=Math.floor((Kt+Qt)/2),bt=G[we],Bt=G[we+1],bt<=D){if(we===nt||DD))throw new Oe("Input is not a number.");Qt=we-1}return 0}class Yn{constructor(D,nt,bt){this.type=D,this.input=nt,this.labels=[],this.outputs=[];for(let[Bt,Kt]of bt)this.labels.push(Bt),this.outputs.push(Kt)}static parse(D,nt){if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");let bt=nt.parse(D[1],1,Ae);if(!bt)return null;let Bt=[],Kt=null;nt.expectedType&&nt.expectedType.kind!=="value"&&(Kt=nt.expectedType);for(let Qt=1;Qt=we)return nt.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',rr);let Lr=nt.parse(Re,xr,Kt);if(!Lr)return null;Kt=Kt||Lr.type,Bt.push([we,Lr])}return new Yn(Kt,bt,Bt)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Bt=this.input.evaluate(D);if(Bt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;return Bt>=nt[Kt-1]?bt[Kt-1].evaluate(D):bt[En(nt,Bt)].evaluate(D)}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function La(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var qi=Qa;function Qa(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}Qa.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Bt=this.sampleCurveX(nt)-G;if(Math.abs(Bt)Bt?Qt=nt:we=nt,nt=.5*(we-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var Ja=La(qi);function Do(G,D,nt){return G+nt*(D-G)}function yo(G,D,nt){return G.map((bt,Bt)=>Do(bt,D[Bt],nt))}let Bo={number:Do,color:function(G,D,nt,bt="rgb"){switch(bt){case"rgb":{let[Bt,Kt,Qt,we]=yo(G.rgb,D.rgb,nt);return new _r(Bt,Kt,Qt,we,!1)}case"hcl":{let[Bt,Kt,Qt,we]=G.hcl,[Re,rr,xr,Lr]=D.hcl,Zr,ln;if(isNaN(Bt)||isNaN(Re))isNaN(Bt)?isNaN(Re)?Zr=NaN:(Zr=Re,Qt!==1&&Qt!==0||(ln=rr)):(Zr=Bt,xr!==1&&xr!==0||(ln=Kt));else{let Sa=Re-Bt;Re>Bt&&Sa>180?Sa-=360:Re180&&(Sa+=360),Zr=Bt+nt*Sa}let[bn,Ln,Kn,Ci]=function([Sa,ra,ya,Ya]){return Sa=isNaN(Sa)?0:Sa*Mr,Di([ya,Math.cos(Sa)*ra,Math.sin(Sa)*ra,Ya])}([Zr,ln??Do(Kt,rr,nt),Do(Qt,xr,nt),Do(we,Lr,nt)]);return new _r(bn,Ln,Kn,Ci,!1)}case"lab":{let[Bt,Kt,Qt,we]=Di(yo(G.lab,D.lab,nt));return new _r(Bt,Kt,Qt,we,!1)}}},array:yo,padding:function(G,D,nt){return new Mn(yo(G.values,D.values,nt))},variableAnchorOffsetCollection:function(G,D,nt){let bt=G.values,Bt=D.values;if(bt.length!==Bt.length)throw new Oe(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${D.toString()}`);let Kt=[];for(let Qt=0;Qttypeof xr!="number"||xr<0||xr>1))return nt.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Bt={name:"cubic-bezier",controlPoints:rr}}}if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");if(Kt=nt.parse(Kt,2,Ae),!Kt)return null;let we=[],Re=null;bt==="interpolate-hcl"||bt==="interpolate-lab"?Re=cr:nt.expectedType&&nt.expectedType.kind!=="value"&&(Re=nt.expectedType);for(let rr=0;rr=xr)return nt.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zr);let bn=nt.parse(Lr,ln,Re);if(!bn)return null;Re=Re||bn.type,we.push([xr,bn])}return re(Re,Ae)||re(Re,cr)||re(Re,Xr)||re(Re,Le)||re(Re,Gt(Ae))?new Da(Re,bt,Bt,Kt,we):nt.error(`Type ${ne(Re)} is not interpolatable.`)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Bt=this.input.evaluate(D);if(Bt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;if(Bt>=nt[Kt-1])return bt[Kt-1].evaluate(D);let Qt=En(nt,Bt),we=Da.interpolationFactor(this.interpolation,Bt,nt[Qt],nt[Qt+1]),Re=bt[Qt].evaluate(D),rr=bt[Qt+1].evaluate(D);switch(this.operator){case"interpolate":return Bo[this.type.kind](Re,rr,we);case"interpolate-hcl":return Bo.color(Re,rr,we,"hcl");case"interpolate-lab":return Bo.color(Re,rr,we,"lab")}}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function ys(G,D,nt,bt){let Bt=bt-nt,Kt=G-nt;return Bt===0?0:D===1?Kt/Bt:(Math.pow(D,Kt)-1)/(Math.pow(D,Bt)-1)}class os{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expectected at least one argument.");let bt=null,Bt=nt.expectedType;Bt&&Bt.kind!=="value"&&(bt=Bt);let Kt=[];for(let we of D.slice(1)){let Re=nt.parse(we,1+Kt.length,bt,void 0,{typeAnnotation:"omit"});if(!Re)return null;bt=bt||Re.type,Kt.push(Re)}if(!bt)throw new Error("No output type");let Qt=Bt&&Kt.some(we=>gt(Bt,we.type));return new os(Qt?jr:bt,Kt)}evaluate(D){let nt,bt=null,Bt=0;for(let Kt of this.args)if(Bt++,bt=Kt.evaluate(D),bt&&bt instanceof Ni&&!bt.available&&(nt||(nt=bt.name),bt=null,Bt===this.args.length&&(bt=nt)),bt!==null)break;return bt}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function ul(G,D){return G==="=="||G==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Go(G,D,nt,bt){return bt.compare(D,nt)===0}function Ks(G,D,nt){let bt=G!=="=="&&G!=="!=";return class EF{constructor(Kt,Qt,we){this.type=Ge,this.lhs=Kt,this.rhs=Qt,this.collator=we,this.hasUntypedArgument=Kt.type.kind==="value"||Qt.type.kind==="value"}static parse(Kt,Qt){if(Kt.length!==3&&Kt.length!==4)return Qt.error("Expected two or three arguments.");let we=Kt[0],Re=Qt.parse(Kt[1],1,jr);if(!Re)return null;if(!ul(we,Re.type))return Qt.concat(1).error(`"${we}" comparisons are not supported for type '${ne(Re.type)}'.`);let rr=Qt.parse(Kt[2],2,jr);if(!rr)return null;if(!ul(we,rr.type))return Qt.concat(2).error(`"${we}" comparisons are not supported for type '${ne(rr.type)}'.`);if(Re.type.kind!==rr.type.kind&&Re.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error(`Cannot compare types '${ne(Re.type)}' and '${ne(rr.type)}'.`);bt&&(Re.type.kind==="value"&&rr.type.kind!=="value"?Re=new Br(rr.type,[Re]):Re.type.kind!=="value"&&rr.type.kind==="value"&&(rr=new Br(Re.type,[rr])));let xr=null;if(Kt.length===4){if(Re.type.kind!=="string"&&rr.type.kind!=="string"&&Re.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error("Cannot use collator to compare non-string types.");if(xr=Qt.parse(Kt[3],3,qr),!xr)return null}return new EF(Re,rr,xr)}evaluate(Kt){let Qt=this.lhs.evaluate(Kt),we=this.rhs.evaluate(Kt);if(bt&&this.hasUntypedArgument){let Re=di(Qt),rr=di(we);if(Re.kind!==rr.kind||Re.kind!=="string"&&Re.kind!=="number")throw new Oe(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${Re.kind}, ${rr.kind}) instead.`)}if(this.collator&&!bt&&this.hasUntypedArgument){let Re=di(Qt),rr=di(we);if(Re.kind!=="string"||rr.kind!=="string")return D(Kt,Qt,we)}return this.collator?nt(Kt,Qt,we,this.collator.evaluate(Kt)):D(Kt,Qt,we)}eachChild(Kt){Kt(this.lhs),Kt(this.rhs),this.collator&&Kt(this.collator)}outputDefined(){return!0}}}let ss=Ks("==",function(G,D,nt){return D===nt},Go),cl=Ks("!=",function(G,D,nt){return D!==nt},function(G,D,nt,bt){return!Go(0,D,nt,bt)}),Qs=Ks("<",function(G,D,nt){return D",function(G,D,nt){return D>nt},function(G,D,nt,bt){return bt.compare(D,nt)>0}),cs=Ks("<=",function(G,D,nt){return D<=nt},function(G,D,nt,bt){return bt.compare(D,nt)<=0}),Ps=Ks(">=",function(G,D,nt){return D>=nt},function(G,D,nt,bt){return bt.compare(D,nt)>=0});class Po{constructor(D,nt,bt){this.type=qr,this.locale=bt,this.caseSensitive=D,this.diacriticSensitive=nt}static parse(D,nt){if(D.length!==2)return nt.error("Expected one argument.");let bt=D[1];if(typeof bt!="object"||Array.isArray(bt))return nt.error("Collator options argument must be an object.");let Bt=nt.parse(bt["case-sensitive"]!==void 0&&bt["case-sensitive"],1,Ge);if(!Bt)return null;let Kt=nt.parse(bt["diacritic-sensitive"]!==void 0&&bt["diacritic-sensitive"],1,Ge);if(!Kt)return null;let Qt=null;return bt.locale&&(Qt=nt.parse(bt.locale,1,He),!Qt)?null:new Po(Bt,Kt,Qt)}evaluate(D){return new tn(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class As{constructor(D,nt,bt,Bt,Kt){this.type=He,this.number=D,this.locale=nt,this.currency=bt,this.minFractionDigits=Bt,this.maxFractionDigits=Kt}static parse(D,nt){if(D.length!==3)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,Ae);if(!bt)return null;let Bt=D[2];if(typeof Bt!="object"||Array.isArray(Bt))return nt.error("NumberFormat options argument must be an object.");let Kt=null;if(Bt.locale&&(Kt=nt.parse(Bt.locale,1,He),!Kt))return null;let Qt=null;if(Bt.currency&&(Qt=nt.parse(Bt.currency,1,He),!Qt))return null;let we=null;if(Bt["min-fraction-digits"]&&(we=nt.parse(Bt["min-fraction-digits"],1,Ae),!we))return null;let Re=null;return Bt["max-fraction-digits"]&&(Re=nt.parse(Bt["max-fraction-digits"],1,Ae),!Re)?null:new As(bt,Kt,Qt,we,Re)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class kl{constructor(D){this.type=br,this.sections=D}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[1];if(!Array.isArray(bt)&&typeof bt=="object")return nt.error("First argument must be an image or text section.");let Bt=[],Kt=!1;for(let Qt=1;Qt<=D.length-1;++Qt){let we=D[Qt];if(Kt&&typeof we=="object"&&!Array.isArray(we)){Kt=!1;let Re=null;if(we["font-scale"]&&(Re=nt.parse(we["font-scale"],1,Ae),!Re))return null;let rr=null;if(we["text-font"]&&(rr=nt.parse(we["text-font"],1,Gt(He)),!rr))return null;let xr=null;if(we["text-color"]&&(xr=nt.parse(we["text-color"],1,cr),!xr))return null;let Lr=Bt[Bt.length-1];Lr.scale=Re,Lr.font=rr,Lr.textColor=xr}else{let Re=nt.parse(D[Qt],1,jr);if(!Re)return null;let rr=Re.type.kind;if(rr!=="string"&&rr!=="value"&&rr!=="null"&&rr!=="resolvedImage")return nt.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Kt=!0,Bt.push({content:Re,scale:null,font:null,textColor:null})}}return new kl(Bt)}evaluate(D){return new Tn(this.sections.map(nt=>{let bt=nt.content.evaluate(D);return di(bt)===nn?new Cn("",bt,null,null,null):new Cn(za(bt),null,nt.scale?nt.scale.evaluate(D):null,nt.font?nt.font.evaluate(D).join(","):null,nt.textColor?nt.textColor.evaluate(D):null)}))}eachChild(D){for(let nt of this.sections)D(nt.content),nt.scale&&D(nt.scale),nt.font&&D(nt.font),nt.textColor&&D(nt.textColor)}outputDefined(){return!1}}class ql{constructor(D){this.type=nn,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,He);return bt?new ql(bt):nt.error("No image name provided.")}evaluate(D){let nt=this.input.evaluate(D),bt=Ni.fromString(nt);return bt&&D.availableImages&&(bt.available=D.availableImages.indexOf(nt)>-1),bt}eachChild(D){D(this.input)}outputDefined(){return!1}}class Jl{constructor(D){this.type=Ae,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error(`Expected 1 argument, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1);return bt?bt.type.kind!=="array"&&bt.type.kind!=="string"&&bt.type.kind!=="value"?nt.error(`Expected argument of type string or array, but found ${ne(bt.type)} instead.`):new Jl(bt):null}evaluate(D){let nt=this.input.evaluate(D);if(typeof nt=="string")return[...nt].length;if(Array.isArray(nt))return nt.length;throw new Oe(`Expected value to be of type string or array, but found ${ne(di(nt))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Us=8192;function Pa(G,D){let nt=(180+G[0])/360,bt=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,Bt=Math.pow(2,D.z);return[Math.round(nt*Bt*Us),Math.round(bt*Bt*Us)]}function fo(G,D){let nt=Math.pow(2,D.z);return[(Bt=(G[0]/Us+D.x)/nt,360*Bt-180),(bt=(G[1]/Us+D.y)/nt,360/Math.PI*Math.atan(Math.exp((180-360*bt)*Math.PI/180))-90)];var bt,Bt}function qs(G,D){G[0]=Math.min(G[0],D[0]),G[1]=Math.min(G[1],D[1]),G[2]=Math.max(G[2],D[0]),G[3]=Math.max(G[3],D[1])}function Ql(G,D){return!(G[0]<=D[0]||G[2]>=D[2]||G[1]<=D[1]||G[3]>=D[3])}function Jo(G,D,nt){let bt=G[0]-D[0],Bt=G[1]-D[1],Kt=G[0]-nt[0],Qt=G[1]-nt[1];return bt*Qt-Kt*Bt==0&&bt*Kt<=0&&Bt*Qt<=0}function Gl(G,D,nt,bt){return(Bt=[bt[0]-nt[0],bt[1]-nt[1]])[0]*(Kt=[D[0]-G[0],D[1]-G[1]])[1]-Bt[1]*Kt[0]!=0&&!(!Is(G,D,nt,bt)||!Is(nt,bt,G,D));var Bt,Kt}function al(G,D,nt){for(let bt of nt)for(let Bt=0;Bt(Bt=G)[1]!=(Qt=we[Re+1])[1]>Bt[1]&&Bt[0]<(Qt[0]-Kt[0])*(Bt[1]-Kt[1])/(Qt[1]-Kt[1])+Kt[0]&&(bt=!bt)}var Bt,Kt,Qt;return bt}function Ru(G,D){for(let nt of D)if(Ll(G,nt))return!0;return!1}function uo(G,D){for(let nt of G)if(!Ll(nt,D))return!1;for(let nt=0;nt0&&we<0||Qt<0&&we>0}function ou(G,D,nt){let bt=[];for(let Bt=0;Btnt[2]){let Bt=.5*bt,Kt=G[0]-nt[0]>Bt?-bt:nt[0]-G[0]>Bt?bt:0;Kt===0&&(Kt=G[0]-nt[2]>Bt?-bt:nt[2]-G[0]>Bt?bt:0),G[0]+=Kt}qs(D,G)}function Cu(G,D,nt,bt){let Bt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let we of G)for(let Re of we){let rr=[Re.x+Kt[0],Re.y+Kt[1]];es(rr,D,nt,Bt),Qt.push(rr)}return Qt}function Gu(G,D,nt,bt){let Bt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let Re of G){let rr=[];for(let xr of Re){let Lr=[xr.x+Kt[0],xr.y+Kt[1]];qs(D,Lr),rr.push(Lr)}Qt.push(rr)}if(D[2]-D[0]<=Bt/2){(we=D)[0]=we[1]=1/0,we[2]=we[3]=-1/0;for(let Re of Qt)for(let rr of Re)es(rr,D,nt,Bt)}var we;return Qt}class bl{constructor(D,nt){this.type=Ge,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Ji(D[1])){let bt=D[1];if(bt.type==="FeatureCollection"){let Bt=[];for(let Kt of bt.features){let{type:Qt,coordinates:we}=Kt.geometry;Qt==="Polygon"&&Bt.push(we),Qt==="MultiPolygon"&&Bt.push(...we)}if(Bt.length)return new bl(bt,{type:"MultiPolygon",coordinates:Bt})}else if(bt.type==="Feature"){let Bt=bt.geometry.type;if(Bt==="Polygon"||Bt==="MultiPolygon")return new bl(bt,bt.geometry)}else if(bt.type==="Polygon"||bt.type==="MultiPolygon")return new bl(bt,bt)}return nt.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Bt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let we=ou(bt.coordinates,Kt,Qt),Re=Cu(nt.geometry(),Bt,Kt,Qt);if(!Ql(Bt,Kt))return!1;for(let rr of Re)if(!Ll(rr,we))return!1}if(bt.type==="MultiPolygon"){let we=hl(bt.coordinates,Kt,Qt),Re=Cu(nt.geometry(),Bt,Kt,Qt);if(!Ql(Bt,Kt))return!1;for(let rr of Re)if(!Ru(rr,we))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Bt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let we=ou(bt.coordinates,Kt,Qt),Re=Gu(nt.geometry(),Bt,Kt,Qt);if(!Ql(Bt,Kt))return!1;for(let rr of Re)if(!uo(rr,we))return!1}if(bt.type==="MultiPolygon"){let we=hl(bt.coordinates,Kt,Qt),Re=Gu(nt.geometry(),Bt,Kt,Qt);if(!Ql(Bt,Kt))return!1;for(let rr of Re)if(!Ms(rr,we))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Fl=class{constructor(G=[],D=(nt,bt)=>ntbt?1:0){if(this.data=G,this.length=this.data.length,this.compare=D,this.length>0)for(let nt=(this.length>>1)-1;nt>=0;nt--)this._down(nt)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:D,compare:nt}=this,bt=D[G];for(;G>0;){let Bt=G-1>>1,Kt=D[Bt];if(nt(bt,Kt)>=0)break;D[G]=Kt,G=Bt}D[G]=bt}_down(G){let{data:D,compare:nt}=this,bt=this.length>>1,Bt=D[G];for(;G=0)break;D[G]=D[Kt],G=Kt}D[G]=Bt}};function tu(G,D,nt,bt,Bt){nu(G,D,nt,bt||G.length-1,Bt||gh)}function nu(G,D,nt,bt,Bt){for(;bt>nt;){if(bt-nt>600){var Kt=bt-nt+1,Qt=D-nt+1,we=Math.log(Kt),Re=.5*Math.exp(2*we/3),rr=.5*Math.sqrt(we*Re*(Kt-Re)/Kt)*(Qt-Kt/2<0?-1:1);nu(G,D,Math.max(nt,Math.floor(D-Qt*Re/Kt+rr)),Math.min(bt,Math.floor(D+(Kt-Qt)*Re/Kt+rr)),Bt)}var xr=G[D],Lr=nt,Zr=bt;for(ac(G,nt,D),Bt(G[bt],xr)>0&&ac(G,nt,bt);Lr0;)Zr--}Bt(G[nt],xr)===0?ac(G,nt,Zr):ac(G,++Zr,bt),Zr<=D&&(nt=Zr+1),D<=Zr&&(bt=Zr-1)}}function ac(G,D,nt){var bt=G[D];G[D]=G[nt],G[nt]=bt}function gh(G,D){return GD?1:0}function Jc(G,D){if(G.length<=1)return[G];let nt=[],bt,Bt;for(let Kt of G){let Qt=jf(Kt);Qt!==0&&(Kt.area=Math.abs(Qt),Bt===void 0&&(Bt=Qt<0),Bt===Qt<0?(bt&&nt.push(bt),bt=[Kt]):bt.push(Kt))}if(bt&&nt.push(bt),D>1)for(let Kt=0;Kt1?(rr=D[Re+1][0],xr=D[Re+1][1]):ln>0&&(rr+=Lr/this.kx*ln,xr+=Zr/this.ky*ln)),Lr=this.wrap(nt[0]-rr)*this.kx,Zr=(nt[1]-xr)*this.ky;let bn=Lr*Lr+Zr*Zr;bn180;)D-=360;return D}}function hc(G,D){return D[0]-G[0]}function oc(G){return G[1]-G[0]+1}function fc(G,D){return G[1]>=G[0]&&G[1]G[1])return[null,null];let nt=oc(G);if(D){if(nt===2)return[G,null];let Bt=Math.floor(nt/2);return[[G[0],G[0]+Bt],[G[0]+Bt,G[1]]]}if(nt===1)return[G,null];let bt=Math.floor(nt/2)-1;return[[G[0],G[0]+bt],[G[0]+bt+1,G[1]]]}function cu(G,D){if(!fc(D,G.length))return[1/0,1/0,-1/0,-1/0];let nt=[1/0,1/0,-1/0,-1/0];for(let bt=D[0];bt<=D[1];++bt)qs(nt,G[bt]);return nt}function sc(G){let D=[1/0,1/0,-1/0,-1/0];for(let nt of G)for(let bt of nt)qs(D,bt);return D}function rl(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function Yl(G,D,nt){if(!rl(G)||!rl(D))return NaN;let bt=0,Bt=0;return G[2]D[2]&&(bt=G[0]-D[2]),G[1]>D[3]&&(Bt=G[1]-D[3]),G[3]=bt)return bt;if(Ql(Bt,Kt)){if(Vd(G,D))return 0}else if(Vd(D,G))return 0;let Qt=1/0;for(let we of G)for(let Re=0,rr=we.length,xr=rr-1;Re0;){let Re=Qt.pop();if(Re[0]>=Kt)continue;let rr=Re[1],xr=D?50:100;if(oc(rr)<=xr){if(!fc(rr,G.length))return NaN;if(D){let Lr=tl(G,rr,nt,bt);if(isNaN(Lr)||Lr===0)return Lr;Kt=Math.min(Kt,Lr)}else for(let Lr=rr[0];Lr<=rr[1];++Lr){let Zr=Ed(G[Lr],nt,bt);if(Kt=Math.min(Kt,Zr),Kt===0)return 0}}else{let Lr=sh(rr,D);ts(Qt,Kt,bt,G,we,Lr[0]),ts(Qt,Kt,bt,G,we,Lr[1])}}return Kt}function rc(G,D,nt,bt,Bt,Kt=1/0){let Qt=Math.min(Kt,Bt.distance(G[0],nt[0]));if(Qt===0)return Qt;let we=new Fl([[0,[0,G.length-1],[0,nt.length-1]]],hc);for(;we.length>0;){let Re=we.pop();if(Re[0]>=Qt)continue;let rr=Re[1],xr=Re[2],Lr=D?50:100,Zr=bt?50:100;if(oc(rr)<=Lr&&oc(xr)<=Zr){if(!fc(rr,G.length)&&fc(xr,nt.length))return NaN;let ln;if(D&&bt)ln=Vh(G,rr,nt,xr,Bt),Qt=Math.min(Qt,ln);else if(D&&!bt){let bn=G.slice(rr[0],rr[1]+1);for(let Ln=xr[0];Ln<=xr[1];++Ln)if(ln=Eh(nt[Ln],bn,Bt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else if(!D&&bt){let bn=nt.slice(xr[0],xr[1]+1);for(let Ln=rr[0];Ln<=rr[1];++Ln)if(ln=Eh(G[Ln],bn,Bt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else ln=bu(G,rr,nt,xr,Bt),Qt=Math.min(Qt,ln)}else{let ln=sh(rr,D),bn=sh(xr,bt);lf(we,Qt,Bt,G,nt,ln[0],bn[0]),lf(we,Qt,Bt,G,nt,ln[0],bn[1]),lf(we,Qt,Bt,G,nt,ln[1],bn[0]),lf(we,Qt,Bt,G,nt,ln[1],bn[1])}}return Qt}function Vf(G){return G.type==="MultiPolygon"?G.coordinates.map(D=>({type:"Polygon",coordinates:D})):G.type==="MultiLineString"?G.coordinates.map(D=>({type:"LineString",coordinates:D})):G.type==="MultiPoint"?G.coordinates.map(D=>({type:"Point",coordinates:D})):[G]}class Hh{constructor(D,nt){this.type=Ae,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Ji(D[1])){let bt=D[1];if(bt.type==="FeatureCollection")return new Hh(bt,bt.features.map(Bt=>Vf(Bt.geometry)).flat());if(bt.type==="Feature")return new Hh(bt,Vf(bt.geometry));if("type"in bt&&"coordinates"in bt)return new Hh(bt,Vf(bt))}return nt.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Bt=nt.geometry(),Kt=Bt.flat().map(Re=>fo([Re.x,Re.y],nt.canonical));if(Bt.length===0)return NaN;let Qt=new Uf(Kt[0][1]),we=1/0;for(let Re of bt){switch(Re.type){case"Point":we=Math.min(we,rc(Kt,!1,[Re.coordinates],!1,Qt,we));break;case"LineString":we=Math.min(we,rc(Kt,!1,Re.coordinates,!0,Qt,we));break;case"Polygon":we=Math.min(we,lh(Kt,!1,Re.coordinates,Qt,we))}if(we===0)return we}return we}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Bt=nt.geometry(),Kt=Bt.flat().map(Re=>fo([Re.x,Re.y],nt.canonical));if(Bt.length===0)return NaN;let Qt=new Uf(Kt[0][1]),we=1/0;for(let Re of bt){switch(Re.type){case"Point":we=Math.min(we,rc(Kt,!0,[Re.coordinates],!1,Qt,we));break;case"LineString":we=Math.min(we,rc(Kt,!0,Re.coordinates,!0,Qt,we));break;case"Polygon":we=Math.min(we,lh(Kt,!0,Re.coordinates,Qt,we))}if(we===0)return we}return we}(D,this.geometries);if(D.geometryType()==="Polygon")return function(nt,bt){let Bt=nt.geometry();if(Bt.length===0||Bt[0].length===0)return NaN;let Kt=Jc(Bt,0).map(Re=>Re.map(rr=>rr.map(xr=>fo([xr.x,xr.y],nt.canonical)))),Qt=new Uf(Kt[0][0][0][1]),we=1/0;for(let Re of bt)for(let rr of Kt){switch(Re.type){case"Point":we=Math.min(we,lh([Re.coordinates],!1,rr,Qt,we));break;case"LineString":we=Math.min(we,lh(Re.coordinates,!0,rr,Qt,we));break;case"Polygon":we=Math.min(we,Pl(rr,Re.coordinates,Qt,we))}if(we===0)return we}return we}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":ss,"!=":cl,">":jl,"<":Qs,">=":Ps,"<=":cs,array:Br,at:pr,boolean:Br,case:ri,coalesce:os,collator:Po,format:kl,image:ql,in:Hr,"index-of":_n,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Jl,let:on,literal:qa,match:Bn,number:Br,"number-format":As,object:Br,slice:Pn,step:Yn,string:Br,"to-boolean":Gr,"to-color":Gr,"to-number":Gr,"to-string":Gr,var:Ce,within:bl,distance:Hh};class lc{constructor(D,nt,bt,Bt){this.name=D,this.type=nt,this._evaluate=bt,this.args=Bt}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,nt){let bt=D[0],Bt=lc.definitions[bt];if(!Bt)return nt.error(`Unknown expression "${bt}". If you wanted a literal array, use ["literal", [...]].`,0);let Kt=Array.isArray(Bt)?Bt[0]:Bt.type,Qt=Array.isArray(Bt)?[[Bt[1],Bt[2]]]:Bt.overloads,we=Qt.filter(([rr])=>!Array.isArray(rr)||rr.length===D.length-1),Re=null;for(let[rr,xr]of we){Re=new mn(nt.registry,Hf,nt.path,null,nt.scope);let Lr=[],Zr=!1;for(let ln=1;ln{return Zr=Lr,Array.isArray(Zr)?`(${Zr.map(ne).join(", ")})`:`(${ne(Zr.type)}...)`;var Zr}).join(" | "),xr=[];for(let Lr=1;Lr{nt=D?nt&&Hf(bt):nt&&bt instanceof qa}),!!nt&&Wf(G)&&Yf(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Wf(G){if(G instanceof lc&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof bl||G instanceof Hh)return!1;let D=!0;return G.eachChild(nt=>{D&&!Wf(nt)&&(D=!1)}),D}function uh(G){if(G instanceof lc&&G.name==="feature-state")return!1;let D=!0;return G.eachChild(nt=>{D&&!uh(nt)&&(D=!1)}),D}function Yf(G,D){if(G instanceof lc&&D.indexOf(G.name)>=0)return!1;let nt=!0;return G.eachChild(bt=>{nt&&!Yf(bt,D)&&(nt=!1)}),nt}function Ch(G){return{result:"success",value:G}}function vh(G){return{result:"error",value:G}}function uc(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function rf(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function qf(G){return!!G.expression&&G.expression.interpolated}function eu(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Ef(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Cd(G){return G}function Kf(G,D){let nt=D.type==="color",bt=G.stops&&typeof G.stops[0][0]=="object",Bt=bt||!(bt||G.property!==void 0),Kt=G.type||(qf(D)?"exponential":"interval");if(nt||D.type==="padding"){let xr=nt?_r.parse:Mn.parse;(G=Mt({},G)).stops&&(G.stops=G.stops.map(Lr=>[Lr[0],xr(Lr[1])])),G.default=xr(G.default?G.default:D.default)}if(G.colorSpace&&(Qt=G.colorSpace)!=="rgb"&&Qt!=="hcl"&&Qt!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Qt;let we,Re,rr;if(Kt==="exponential")we=Jf;else if(Kt==="interval")we=Nc;else if(Kt==="categorical"){we=Xf,Re=Object.create(null);for(let xr of G.stops)Re[xr[0]]=xr[1];rr=typeof G.stops[0][0]}else{if(Kt!=="identity")throw new Error(`Unknown function type "${Kt}"`);we=Du}if(bt){let xr={},Lr=[];for(let bn=0;bnbn[0]),evaluate:({zoom:bn},Ln)=>Jf({stops:Zr,base:G.base},D,bn).evaluate(bn,Ln)}}if(Bt){let xr=Kt==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:xr,interpolationFactor:Da.interpolationFactor.bind(void 0,xr),zoomStops:G.stops.map(Lr=>Lr[0]),evaluate:({zoom:Lr})=>we(G,D,Lr,Re,rr)}}return{kind:"source",evaluate(xr,Lr){let Zr=Lr&&Lr.properties?Lr.properties[G.property]:void 0;return Zr===void 0?_f(G.default,D.default):we(G,D,Zr,Re,rr)}}}function _f(G,D,nt){return G!==void 0?G:D!==void 0?D:nt!==void 0?nt:void 0}function Xf(G,D,nt,bt,Bt){return _f(typeof nt===Bt?bt[nt]:void 0,G.default,D.default)}function Nc(G,D,nt){if(eu(nt)!=="number")return _f(G.default,D.default);let bt=G.stops.length;if(bt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[bt-1][0])return G.stops[bt-1][1];let Bt=En(G.stops.map(Kt=>Kt[0]),nt);return G.stops[Bt][1]}function Jf(G,D,nt){let bt=G.base!==void 0?G.base:1;if(eu(nt)!=="number")return _f(G.default,D.default);let Bt=G.stops.length;if(Bt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[Bt-1][0])return G.stops[Bt-1][1];let Kt=En(G.stops.map(xr=>xr[0]),nt),Qt=function(xr,Lr,Zr,ln){let bn=ln-Zr,Ln=xr-Zr;return bn===0?0:Lr===1?Ln/bn:(Math.pow(Lr,Ln)-1)/(Math.pow(Lr,bn)-1)}(nt,bt,G.stops[Kt][0],G.stops[Kt+1][0]),we=G.stops[Kt][1],Re=G.stops[Kt+1][1],rr=Bo[D.type]||Cd;return typeof we.evaluate=="function"?{evaluate(...xr){let Lr=we.evaluate.apply(void 0,xr),Zr=Re.evaluate.apply(void 0,xr);if(Lr!==void 0&&Zr!==void 0)return rr(Lr,Zr,Qt,G.colorSpace)}}:rr(we,Re,Qt,G.colorSpace)}function Du(G,D,nt){switch(D.type){case"color":nt=_r.parse(nt);break;case"formatted":nt=Tn.fromString(nt.toString());break;case"resolvedImage":nt=Ni.fromString(nt.toString());break;case"padding":nt=Mn.parse(nt);break;default:eu(nt)===D.type||D.type==="enum"&&D.values[nt]||(nt=void 0)}return _f(nt,G.default,D.default)}lc.register(yf,{error:[{kind:"error"},[He],(G,[D])=>{throw new Oe(D.evaluate(G))}],typeof:[He,[jr],(G,[D])=>ne(di(D.evaluate(G)))],"to-rgba":[Gt(Ae,4),[cr],(G,[D])=>{let[nt,bt,Bt,Kt]=D.evaluate(G).rgb;return[255*nt,255*bt,255*Bt,Kt]}],rgb:[cr,[Ae,Ae,Ae],hd],rgba:[cr,[Ae,Ae,Ae,Ae],hd],has:{type:Ge,overloads:[[[He],(G,[D])=>Gf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>Gf(D.evaluate(G),nt.evaluate(G))]]},get:{type:jr,overloads:[[[He],(G,[D])=>xf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>xf(D.evaluate(G),nt.evaluate(G))]]},"feature-state":[jr,[He],(G,[D])=>xf(D.evaluate(G),G.featureState||{})],properties:[ur,[],G=>G.properties()],"geometry-type":[He,[],G=>G.geometryType()],id:[jr,[],G=>G.id()],zoom:[Ae,[],G=>G.globals.zoom],"heatmap-density":[Ae,[],G=>G.globals.heatmapDensity||0],"line-progress":[Ae,[],G=>G.globals.lineProgress||0],accumulated:[jr,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[Ae,Wh(Ae),(G,D)=>{let nt=0;for(let bt of D)nt+=bt.evaluate(G);return nt}],"*":[Ae,Wh(Ae),(G,D)=>{let nt=1;for(let bt of D)nt*=bt.evaluate(G);return nt}],"-":{type:Ae,overloads:[[[Ae,Ae],(G,[D,nt])=>D.evaluate(G)-nt.evaluate(G)],[[Ae],(G,[D])=>-D.evaluate(G)]]},"/":[Ae,[Ae,Ae],(G,[D,nt])=>D.evaluate(G)/nt.evaluate(G)],"%":[Ae,[Ae,Ae],(G,[D,nt])=>D.evaluate(G)%nt.evaluate(G)],ln2:[Ae,[],()=>Math.LN2],pi:[Ae,[],()=>Math.PI],e:[Ae,[],()=>Math.E],"^":[Ae,[Ae,Ae],(G,[D,nt])=>Math.pow(D.evaluate(G),nt.evaluate(G))],sqrt:[Ae,[Ae],(G,[D])=>Math.sqrt(D.evaluate(G))],log10:[Ae,[Ae],(G,[D])=>Math.log(D.evaluate(G))/Math.LN10],ln:[Ae,[Ae],(G,[D])=>Math.log(D.evaluate(G))],log2:[Ae,[Ae],(G,[D])=>Math.log(D.evaluate(G))/Math.LN2],sin:[Ae,[Ae],(G,[D])=>Math.sin(D.evaluate(G))],cos:[Ae,[Ae],(G,[D])=>Math.cos(D.evaluate(G))],tan:[Ae,[Ae],(G,[D])=>Math.tan(D.evaluate(G))],asin:[Ae,[Ae],(G,[D])=>Math.asin(D.evaluate(G))],acos:[Ae,[Ae],(G,[D])=>Math.acos(D.evaluate(G))],atan:[Ae,[Ae],(G,[D])=>Math.atan(D.evaluate(G))],min:[Ae,Wh(Ae),(G,D)=>Math.min(...D.map(nt=>nt.evaluate(G)))],max:[Ae,Wh(Ae),(G,D)=>Math.max(...D.map(nt=>nt.evaluate(G)))],abs:[Ae,[Ae],(G,[D])=>Math.abs(D.evaluate(G))],round:[Ae,[Ae],(G,[D])=>{let nt=D.evaluate(G);return nt<0?-Math.round(-nt):Math.round(nt)}],floor:[Ae,[Ae],(G,[D])=>Math.floor(D.evaluate(G))],ceil:[Ae,[Ae],(G,[D])=>Math.ceil(D.evaluate(G))],"filter-==":[Ge,[He,jr],(G,[D,nt])=>G.properties()[D.value]===nt.value],"filter-id-==":[Ge,[jr],(G,[D])=>G.id()===D.value],"filter-type-==":[Ge,[He],(G,[D])=>G.geometryType()===D.value],"filter-<":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Bt=nt.value;return typeof bt==typeof Bt&&bt{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Bt=nt.value;return typeof bt==typeof Bt&&bt>Bt}],"filter-id->":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>bt}],"filter-<=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Bt=nt.value;return typeof bt==typeof Bt&&bt<=Bt}],"filter-id-<=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt<=bt}],"filter->=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Bt=nt.value;return typeof bt==typeof Bt&&bt>=Bt}],"filter-id->=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>=bt}],"filter-has":[Ge,[jr],(G,[D])=>D.value in G.properties()],"filter-has-id":[Ge,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[Ge,[Gt(He)],(G,[D])=>D.value.indexOf(G.geometryType())>=0],"filter-id-in":[Ge,[Gt(jr)],(G,[D])=>D.value.indexOf(G.id())>=0],"filter-in-small":[Ge,[He,Gt(jr)],(G,[D,nt])=>nt.value.indexOf(G.properties()[D.value])>=0],"filter-in-large":[Ge,[He,Gt(jr)],(G,[D,nt])=>function(bt,Bt,Kt,Qt){for(;Kt<=Qt;){let we=Kt+Qt>>1;if(Bt[we]===bt)return!0;Bt[we]>bt?Qt=we-1:Kt=we+1}return!1}(G.properties()[D.value],nt.value,0,nt.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)&&nt.evaluate(G)],[Wh(Ge),(G,D)=>{for(let nt of D)if(!nt.evaluate(G))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)||nt.evaluate(G)],[Wh(Ge),(G,D)=>{for(let nt of D)if(nt.evaluate(G))return!0;return!1}]]},"!":[Ge,[Ge],(G,[D])=>!D.evaluate(G)],"is-supported-script":[Ge,[He],(G,[D])=>{let nt=G.globals&&G.globals.isSupportedScript;return!nt||nt(D.evaluate(G))}],upcase:[He,[He],(G,[D])=>D.evaluate(G).toUpperCase()],downcase:[He,[He],(G,[D])=>D.evaluate(G).toLowerCase()],concat:[He,Wh(jr),(G,D)=>D.map(nt=>za(nt.evaluate(G))).join("")],"resolved-locale":[He,[qr],(G,[D])=>D.evaluate(G).resolvedLocale()]});class jc{constructor(D,nt){var bt;this.expression=D,this._warningHistory={},this._evaluator=new Yr,this._defaultValue=nt?(bt=nt).type==="color"&&Ef(bt.default)?new _r(0,0,0,0):bt.type==="color"?_r.parse(bt.default)||null:bt.type==="padding"?Mn.parse(bt.default)||null:bt.type==="variableAnchorOffsetCollection"?Mi.parse(bt.default)||null:bt.default===void 0?null:bt.default:null,this._enumValues=nt&&nt.type==="enum"?nt.values:null}evaluateWithoutErrorHandling(D,nt,bt,Bt,Kt,Qt){return this._evaluator.globals=D,this._evaluator.feature=nt,this._evaluator.featureState=bt,this._evaluator.canonical=Bt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt,this.expression.evaluate(this._evaluator)}evaluate(D,nt,bt,Bt,Kt,Qt){this._evaluator.globals=D,this._evaluator.feature=nt||null,this._evaluator.featureState=bt||null,this._evaluator.canonical=Bt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt||null;try{let we=this.expression.evaluate(this._evaluator);if(we==null||typeof we=="number"&&we!=we)return this._defaultValue;if(this._enumValues&&!(we in this._enumValues))throw new Oe(`Expected value to be one of ${Object.keys(this._enumValues).map(Re=>JSON.stringify(Re)).join(", ")}, but found ${JSON.stringify(we)} instead.`);return we}catch(we){return this._warningHistory[we.message]||(this._warningHistory[we.message]=!0,typeof console<"u"&&console.warn(we.message)),this._defaultValue}}}function qh(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in yf}function hu(G,D){let nt=new mn(yf,Hf,[],D?function(Bt){let Kt={color:cr,string:He,number:Ae,enum:He,boolean:Ge,formatted:br,padding:Xr,resolvedImage:nn,variableAnchorOffsetCollection:Le};return Bt.type==="array"?Gt(Kt[Bt.value]||jr,Bt.length):Kt[Bt.type]}(D):void 0),bt=nt.parse(G,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return bt?Ch(new jc(bt,D)):vh(nt.errors)}class Lh{constructor(D,nt){this.kind=D,this._styleExpression=nt,this.isStateDependent=D!=="constant"&&!uh(nt.expression)}evaluateWithoutErrorHandling(D,nt,bt,Bt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Bt,Kt,Qt)}evaluate(D,nt,bt,Bt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Bt,Kt,Qt)}}class Mc{constructor(D,nt,bt,Bt){this.kind=D,this.zoomStops=bt,this._styleExpression=nt,this.isStateDependent=D!=="camera"&&!uh(nt.expression),this.interpolationType=Bt}evaluateWithoutErrorHandling(D,nt,bt,Bt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Bt,Kt,Qt)}evaluate(D,nt,bt,Bt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Bt,Kt,Qt)}interpolationFactor(D,nt,bt){return this.interpolationType?Da.interpolationFactor(this.interpolationType,D,nt,bt):0}}function Uc(G,D){let nt=hu(G,D);if(nt.result==="error")return nt;let bt=nt.value.expression,Bt=Wf(bt);if(!Bt&&!uc(D))return vh([new ee("","data expressions not supported")]);let Kt=Yf(bt,["zoom"]);if(!Kt&&!rf(D))return vh([new ee("","zoom expressions not supported")]);let Qt=uf(bt);return Qt||Kt?Qt instanceof ee?vh([Qt]):Qt instanceof Da&&!qf(D)?vh([new ee("",'"interpolate" expressions cannot be used with this property')]):Ch(Qt?new Mc(Bt?"camera":"composite",nt.value,Qt.labels,Qt instanceof Da?Qt.interpolation:void 0):new Lh(Bt?"constant":"source",nt.value)):vh([new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class wu{constructor(D,nt){this._parameters=D,this._specification=nt,Mt(this,Kf(this._parameters,this._specification))}static deserialize(D){return new wu(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function uf(G){let D=null;if(G instanceof on)D=uf(G.result);else if(G instanceof os){for(let nt of G.args)if(D=uf(nt),D)break}else(G instanceof Yn||G instanceof Da)&&G.input instanceof lc&&G.input.name==="zoom"&&(D=G);return D instanceof ee||G.eachChild(nt=>{let bt=uf(nt);bt instanceof ee?D=bt:!D&&bt?D=new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&bt&&D!==bt&&(D=new ee("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function yh(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let D of G.slice(1))if(!yh(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let $h={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cf(G){if(G==null)return{filter:()=>!0,needGeometry:!1};yh(G)||(G=cf(G));let D=hu(G,$h);if(D.result==="error")throw new Error(D.value.map(nt=>`${nt.key}: ${nt.message}`).join(", "));return{filter:(nt,bt,Bt)=>D.value.evaluate(nt,bt,{},Bt),needGeometry:Jd(G)}}function Ld(G,D){return GD?1:0}function Jd(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?Lf(G[1],G[2],D):D==="any"?(nt=G.slice(1),["any"].concat(nt.map(cf))):D==="all"?["all"].concat(G.slice(1).map(cf)):D==="none"?["all"].concat(G.slice(1).map(cf).map(Qc)):D==="in"?wc(G[1],G.slice(2)):D==="!in"?Qc(wc(G[1],G.slice(2))):D==="has"?hf(G[1]):D!=="!has"||Qc(hf(G[1]));var nt}function Lf(G,D,nt){switch(G){case"$type":return[`filter-type-${nt}`,D];case"$id":return[`filter-id-${nt}`,D];default:return[`filter-${nt}`,G,D]}}function wc(G,D){if(D.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(nt=>typeof nt!=typeof D[0])?["filter-in-large",G,["literal",D.sort(Ld)]]:["filter-in-small",G,["literal",D]]}}function hf(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function Qc(G){return["!",G]}function ff(G){let D=typeof G;if(D==="number"||D==="boolean"||D==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let Bt="[";for(let Kt of G)Bt+=`${ff(Kt)},`;return`${Bt}]`}let nt=Object.keys(G).sort(),bt="{";for(let Bt=0;Btbt.maximum?[new Lt(D,nt,`${nt} is greater than the maximum value ${bt.maximum}`)]:[]}function bf(G){let D=G.valueSpec,nt=ku(G.value.type),bt,Bt,Kt,Qt={},we=nt!=="categorical"&&G.value.property===void 0,Re=!we,rr=eu(G.value.stops)==="array"&&eu(G.value.stops[0])==="array"&&eu(G.value.stops[0][0])==="object",xr=Vc({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(ln){if(nt==="identity")return[new Lt(ln.key,ln.value,'identity function may not have a "stops" property')];let bn=[],Ln=ln.value;return bn=bn.concat(fd({key:ln.key,value:Ln,valueSpec:ln.valueSpec,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,arrayElementValidator:Lr})),eu(Ln)==="array"&&Ln.length===0&&bn.push(new Lt(ln.key,Ln,"array must have at least one stop")),bn},default:function(ln){return ln.validateSpec({key:ln.key,value:ln.value,valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec})}}});return nt==="identity"&&we&&xr.push(new Lt(G.key,G.value,'missing required property "property"')),nt==="identity"||G.value.stops||xr.push(new Lt(G.key,G.value,'missing required property "stops"')),nt==="exponential"&&G.valueSpec.expression&&!qf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(Re&&!uc(G.valueSpec)?xr.push(new Lt(G.key,G.value,"property functions not supported")):we&&!rf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"zoom functions not supported"))),nt!=="categorical"&&!rr||G.value.property!==void 0||xr.push(new Lt(G.key,G.value,'"property" property is required')),xr;function Lr(ln){let bn=[],Ln=ln.value,Kn=ln.key;if(eu(Ln)!=="array")return[new Lt(Kn,Ln,`array expected, ${eu(Ln)} found`)];if(Ln.length!==2)return[new Lt(Kn,Ln,`array length 2 expected, length ${Ln.length} found`)];if(rr){if(eu(Ln[0])!=="object")return[new Lt(Kn,Ln,`object expected, ${eu(Ln[0])} found`)];if(Ln[0].zoom===void 0)return[new Lt(Kn,Ln,"object stop key must have zoom")];if(Ln[0].value===void 0)return[new Lt(Kn,Ln,"object stop key must have value")];if(Kt&&Kt>ku(Ln[0].zoom))return[new Lt(Kn,Ln[0].zoom,"stop zoom values must appear in ascending order")];ku(Ln[0].zoom)!==Kt&&(Kt=ku(Ln[0].zoom),Bt=void 0,Qt={}),bn=bn.concat(Vc({key:`${Kn}[0]`,value:Ln[0],valueSpec:{zoom:{}},validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,objectElementValidators:{zoom:yu,value:Zr}}))}else bn=bn.concat(Zr({key:`${Kn}[0]`,value:Ln[0],validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec},Ln));return qh(Ph(Ln[1]))?bn.concat([new Lt(`${Kn}[1]`,Ln[1],"expressions are not allowed in function stops.")]):bn.concat(ln.validateSpec({key:`${Kn}[1]`,value:Ln[1],valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec}))}function Zr(ln,bn){let Ln=eu(ln.value),Kn=ku(ln.value),Ci=ln.value!==null?ln.value:bn;if(bt){if(Ln!==bt)return[new Lt(ln.key,Ci,`${Ln} stop domain type must match previous stop domain type ${bt}`)]}else bt=Ln;if(Ln!=="number"&&Ln!=="string"&&Ln!=="boolean")return[new Lt(ln.key,Ci,"stop domain value must be a number, string, or boolean")];if(Ln!=="number"&&nt!=="categorical"){let Sa=`number expected, ${Ln} found`;return uc(D)&&nt===void 0&&(Sa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lt(ln.key,Ci,Sa)]}return nt!=="categorical"||Ln!=="number"||isFinite(Kn)&&Math.floor(Kn)===Kn?nt!=="categorical"&&Ln==="number"&&Bt!==void 0&&Knnew Lt(`${G.key}${bt.key}`,G.value,bt.message));let nt=D.value.expression||D.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!nt.outputDefined())return[new Lt(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!uh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!uh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Yf(nt,["zoom","feature-state"]))return[new Lt(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!Wf(nt))return[new Lt(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function th(G){let D=G.key,nt=G.value,bt=G.valueSpec,Bt=[];return Array.isArray(bt.values)?bt.values.indexOf(ku(nt))===-1&&Bt.push(new Lt(D,nt,`expected one of [${bt.values.join(", ")}], ${JSON.stringify(nt)} found`)):Object.keys(bt.values).indexOf(ku(nt))===-1&&Bt.push(new Lt(D,nt,`expected one of [${Object.keys(bt.values).join(", ")}], ${JSON.stringify(nt)} found`)),Bt}function nf(G){return yh(Ph(G.value))?Zh(Mt({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gh(G)}function Gh(G){let D=G.value,nt=G.key;if(eu(D)!=="array")return[new Lt(nt,D,`array expected, ${eu(D)} found`)];let bt=G.styleSpec,Bt,Kt=[];if(D.length<1)return[new Lt(nt,D,"filter array must have at least 1 element")];switch(Kt=Kt.concat(th({key:`${nt}[0]`,value:D[0],valueSpec:bt.filter_operator,style:G.style,styleSpec:G.styleSpec})),ku(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&ku(D[1])==="$type"&&Kt.push(new Lt(nt,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Kt.push(new Lt(nt,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Bt=eu(D[1]),Bt!=="string"&&Kt.push(new Lt(`${nt}[1]`,D[1],`string expected, ${Bt} found`)));for(let Qt=2;Qt{rr in nt&&D.push(new Lt(bt,nt[rr],`"${rr}" is prohibited for ref layers`))}),Bt.layers.forEach(rr=>{ku(rr.id)===we&&(Re=rr)}),Re?Re.ref?D.push(new Lt(bt,nt.ref,"ref cannot reference another ref layer")):Qt=ku(Re.type):D.push(new Lt(bt,nt.ref,`ref layer "${we}" not found`))}else if(Qt!=="background")if(nt.source){let Re=Bt.sources&&Bt.sources[nt.source],rr=Re&&ku(Re.type);Re?rr==="vector"&&Qt==="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster source`)):rr!=="raster-dem"&&Qt==="hillshade"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster-dem source`)):rr==="raster"&&Qt!=="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a vector source`)):rr!=="vector"||nt["source-layer"]?rr==="raster-dem"&&Qt!=="hillshade"?D.push(new Lt(bt,nt.source,"raster-dem source can only be used with layer type 'hillshade'.")):Qt!=="line"||!nt.paint||!nt.paint["line-gradient"]||rr==="geojson"&&Re.lineMetrics||D.push(new Lt(bt,nt,`layer "${nt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new Lt(bt,nt,`layer "${nt.id}" must specify a "source-layer"`)):D.push(new Lt(bt,nt.source,`source "${nt.source}" not found`))}else D.push(new Lt(bt,nt,'missing required property "source"'));return D=D.concat(Vc({key:bt,value:nt,valueSpec:Kt.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${bt}.type`,value:nt.type,valueSpec:Kt.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:nt,objectKey:"type"}),filter:nf,layout:Re=>Vc({layer:nt,key:Re.key,value:Re.value,style:Re.style,styleSpec:Re.styleSpec,validateSpec:Re.validateSpec,objectElementValidators:{"*":rr=>gc(Mt({layerType:Qt},rr))}}),paint:Re=>Vc({layer:nt,key:Re.key,value:Re.value,style:Re.style,styleSpec:Re.styleSpec,validateSpec:Re.validateSpec,objectElementValidators:{"*":rr=>Pd(Mt({layerType:Qt},rr))}})}})),D}function eh(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="string"?[new Lt(nt,D,`string expected, ${bt} found`)]:[]}let Ih={promoteId:function({key:G,value:D}){if(eu(D)==="string")return eh({key:G,value:D});{let nt=[];for(let bt in D)nt.push(...eh({key:`${G}.${bt}`,value:D[bt]}));return nt}}};function _h(G){let D=G.value,nt=G.key,bt=G.styleSpec,Bt=G.style,Kt=G.validateSpec;if(!D.type)return[new Lt(nt,D,'"type" is required')];let Qt=ku(D.type),we;switch(Qt){case"vector":case"raster":return we=Vc({key:nt,value:D,valueSpec:bt[`source_${Qt.replace("-","_")}`],style:G.style,styleSpec:bt,objectElementValidators:Ih,validateSpec:Kt}),we;case"raster-dem":return we=function(Re){var rr;let xr=(rr=Re.sourceName)!==null&&rr!==void 0?rr:"",Lr=Re.value,Zr=Re.styleSpec,ln=Zr.source_raster_dem,bn=Re.style,Ln=[],Kn=eu(Lr);if(Lr===void 0)return Ln;if(Kn!=="object")return Ln.push(new Lt("source_raster_dem",Lr,`object expected, ${Kn} found`)),Ln;let Ci=ku(Lr.encoding)==="custom",Sa=["redFactor","greenFactor","blueFactor","baseShift"],ra=Re.value.encoding?`"${Re.value.encoding}"`:"Default";for(let ya in Lr)!Ci&&Sa.includes(ya)?Ln.push(new Lt(ya,Lr[ya],`In "${xr}": "${ya}" is only valid when "encoding" is set to "custom". ${ra} encoding found`)):ln[ya]?Ln=Ln.concat(Re.validateSpec({key:ya,value:Lr[ya],valueSpec:ln[ya],validateSpec:Re.validateSpec,style:bn,styleSpec:Zr})):Ln.push(new Lt(ya,Lr[ya],`unknown property "${ya}"`));return Ln}({sourceName:nt,value:D,style:G.style,styleSpec:bt,validateSpec:Kt}),we;case"geojson":if(we=Vc({key:nt,value:D,valueSpec:bt.source_geojson,style:Bt,styleSpec:bt,validateSpec:Kt,objectElementValidators:Ih}),D.cluster)for(let Re in D.clusterProperties){let[rr,xr]=D.clusterProperties[Re],Lr=typeof rr=="string"?[rr,["accumulated"],["get",Re]]:rr;we.push(...Zh({key:`${nt}.${Re}.map`,value:xr,expressionContext:"cluster-map"})),we.push(...Zh({key:`${nt}.${Re}.reduce`,value:Lr,expressionContext:"cluster-reduce"}))}return we;case"video":return Vc({key:nt,value:D,valueSpec:bt.source_video,style:Bt,validateSpec:Kt,styleSpec:bt});case"image":return Vc({key:nt,value:D,valueSpec:bt.source_image,style:Bt,validateSpec:Kt,styleSpec:bt});case"canvas":return[new Lt(nt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return th({key:`${nt}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Nu(G){let D=G.value,nt=G.styleSpec,bt=nt.light,Bt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("light",D,`object expected, ${Qt} found`)]),Kt;for(let we in D){let Re=we.match(/^(.*)-transition$/);Kt=Kt.concat(Re&&bt[Re[1]]&&bt[Re[1]].transition?G.validateSpec({key:we,value:D[we],valueSpec:nt.transition,validateSpec:G.validateSpec,style:Bt,styleSpec:nt}):bt[we]?G.validateSpec({key:we,value:D[we],valueSpec:bt[we],validateSpec:G.validateSpec,style:Bt,styleSpec:nt}):[new Lt(we,D[we],`unknown property "${we}"`)])}return Kt}function iu(G){let D=G.value,nt=G.styleSpec,bt=nt.sky,Bt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("sky",D,`object expected, ${Kt} found`)];let Qt=[];for(let we in D)Qt=Qt.concat(bt[we]?G.validateSpec({key:we,value:D[we],valueSpec:bt[we],style:Bt,styleSpec:nt}):[new Lt(we,D[we],`unknown property "${we}"`)]);return Qt}function bh(G){let D=G.value,nt=G.styleSpec,bt=nt.terrain,Bt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("terrain",D,`object expected, ${Qt} found`)]),Kt;for(let we in D)Kt=Kt.concat(bt[we]?G.validateSpec({key:we,value:D[we],valueSpec:bt[we],validateSpec:G.validateSpec,style:Bt,styleSpec:nt}):[new Lt(we,D[we],`unknown property "${we}"`)]);return Kt}function df(G){let D=[],nt=G.value,bt=G.key;if(Array.isArray(nt)){let Bt=[],Kt=[];for(let Qt in nt)nt[Qt].id&&Bt.includes(nt[Qt].id)&&D.push(new Lt(bt,nt,`all the sprites' ids must be unique, but ${nt[Qt].id} is duplicated`)),Bt.push(nt[Qt].id),nt[Qt].url&&Kt.includes(nt[Qt].url)&&D.push(new Lt(bt,nt,`all the sprites' URLs must be unique, but ${nt[Qt].url} is duplicated`)),Kt.push(nt[Qt].url),D=D.concat(Vc({key:`${bt}[${Qt}]`,value:nt[Qt],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return D}return eh({key:bt,value:nt})}let wh={"*":()=>[],array:fd,boolean:function(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="boolean"?[new Lt(nt,D,`boolean expected, ${bt} found`)]:[]},number:yu,color:function(G){let D=G.key,nt=G.value,bt=eu(nt);return bt!=="string"?[new Lt(D,nt,`color expected, ${bt} found`)]:_r.parse(String(nt))?[]:[new Lt(D,nt,`color expected, "${nt}" found`)]},constants:xh,enum:th,filter:nf,function:bf,layer:Qf,object:Vc,source:_h,light:Nu,sky:iu,terrain:bh,projection:function(G){let D=G.value,nt=G.styleSpec,bt=nt.projection,Bt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("projection",D,`object expected, ${Kt} found`)];let Qt=[];for(let we in D)Qt=Qt.concat(bt[we]?G.validateSpec({key:we,value:D[we],valueSpec:bt[we],style:Bt,styleSpec:nt}):[new Lt(we,D[we],`unknown property "${we}"`)]);return Qt},string:eh,formatted:function(G){return eh(G).length===0?[]:Zh(G)},resolvedImage:function(G){return eh(G).length===0?[]:Zh(G)},padding:function(G){let D=G.key,nt=G.value;if(eu(nt)==="array"){if(nt.length<1||nt.length>4)return[new Lt(D,nt,`padding requires 1 to 4 values; ${nt.length} values found`)];let bt={type:"number"},Bt=[];for(let Kt=0;Kt[]}})),G.constants&&(nt=nt.concat(xh({key:"constants",value:G.constants}))),hn(nt)}function wn(G){return function(D){return G(kr(Ar({},D),{validateSpec:$f}))}}function hn(G){return[].concat(G).sort((D,nt)=>D.line-nt.line)}function Zn(G){return function(...D){return hn(G.apply(this,D))}}Ur.source=Zn(wn(_h)),Ur.sprite=Zn(wn(df)),Ur.glyphs=Zn(wn(gr)),Ur.light=Zn(wn(Nu)),Ur.sky=Zn(wn(iu)),Ur.terrain=Zn(wn(bh)),Ur.layer=Zn(wn(Qf)),Ur.filter=Zn(wn(nf)),Ur.paintProperty=Zn(wn(Pd)),Ur.layoutProperty=Zn(wn(gc));let gi=Ur,aa=gi.light,xa=gi.sky,Ra=gi.paintProperty,Ga=gi.layoutProperty;function fa(G,D){let nt=!1;if(D&&D.length)for(let bt of D)G.fire(new K(new Error(bt.message))),nt=!0;return nt}class Oa{constructor(D,nt,bt){let Bt=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Qt=new Int32Array(this.arrayBuffer);D=Qt[0],this.d=(nt=Qt[1])+2*(bt=Qt[2]);for(let Re=0;Re=Lr[bn+0]&&Bt>=Lr[bn+1])?(we[ln]=!0,Qt.push(xr[ln])):we[ln]=!1}}}}_forEachCell(D,nt,bt,Bt,Kt,Qt,we,Re){let rr=this._convertToCellCoord(D),xr=this._convertToCellCoord(nt),Lr=this._convertToCellCoord(bt),Zr=this._convertToCellCoord(Bt);for(let ln=rr;ln<=Lr;ln++)for(let bn=xr;bn<=Zr;bn++){let Ln=this.d*bn+ln;if((!Re||Re(this._convertFromCellCoord(ln),this._convertFromCellCoord(bn),this._convertFromCellCoord(ln+1),this._convertFromCellCoord(bn+1)))&&Kt.call(this,D,nt,bt,Bt,Ln,Qt,we,Re))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,nt=3+this.cells.length+1+1,bt=0;for(let Qt=0;Qt=0)continue;let Qt=G[Kt];Bt[Kt]=Aa[nt].shallow.indexOf(Kt)>=0?Qt:ls(Qt,D)}G instanceof Error&&(Bt.message=G.message)}if(Bt.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(Bt.$name=nt),Bt}function ps(G){if(Xo(G))return G;if(Array.isArray(G))return G.map(ps);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let D=is(G)||"Object";if(!Aa[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:nt}=Aa[D];if(!nt)throw new Error(`can't deserialize unregistered class ${D}`);if(nt.deserialize)return nt.deserialize(G);let bt=Object.create(nt.prototype);for(let Bt of Object.keys(G)){if(Bt==="$name")continue;let Kt=G[Bt];bt[Bt]=Aa[D].shallow.indexOf(Bt)>=0?Kt:ps(Kt)}return bt}class so{constructor(){this.first=!0}update(D,nt){let bt=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=bt,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=bt,!0):(this.lastFloorZoom>bt?(this.lastIntegerZoom=bt+1,this.lastIntegerZoomTime=nt):this.lastFloorZoomG>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function gs(G){for(let D of G)if(ml(D.charCodeAt(0)))return!0;return!1}function el(G){for(let D of G)if(!$l(D.charCodeAt(0)))return!1;return!0}function Il(G){let D=G.map(nt=>{try{return new RegExp(`\\p{sc=${nt}}`,"u").source}catch{return null}}).filter(nt=>nt);return new RegExp(D.join("|"),"u")}let su=Il(["Arab","Dupl","Mong","Ougr","Syrc"]);function $l(G){return!su.test(String.fromCodePoint(G))}let lu=Il(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ml(G){return!(G!==746&&G!==747&&(G<4352||!($a["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||$a["CJK Compatibility"](G)||$a["CJK Strokes"](G)||!(!$a["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||$a["Enclosed CJK Letters and Months"](G)||$a["Ideographic Description Characters"](G)||$a.Kanbun(G)||$a.Katakana(G)&&G!==12540||!(!$a["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!$a["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||$a["Vertical Forms"](G)||$a["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||lu.test(String.fromCodePoint(G)))))}function qu(G){return!(ml(G)||function(D){return!!($a["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||$a["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||$a["Letterlike Symbols"](D)||$a["Number Forms"](D)||$a["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||$a["Control Pictures"](D)&&D!==9251||$a["Optical Character Recognition"](D)||$a["Enclosed Alphanumerics"](D)||$a["Geometric Shapes"](D)||$a["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||$a["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||$a["CJK Symbols and Punctuation"](D)||$a.Katakana(D)||$a["Private Use Area"](D)||$a["CJK Compatibility Forms"](D)||$a["Small Form Variants"](D)||$a["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(G))}let zu=Il(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function fu(G){return zu.test(String.fromCodePoint(G))}function Oo(G,D){return!(!D&&fu(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||$a.Khmer(G))}function Es(G){for(let D of G)if(fu(D.charCodeAt(0)))return!0;return!1}let Kl=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Rl{constructor(D,nt){this.zoom=D,nt?(this.now=nt.now,this.fadeDuration=nt.fadeDuration,this.zoomHistory=nt.zoomHistory,this.transition=nt.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new so,this.transition={})}isSupportedScript(D){return function(nt,bt){for(let Bt of nt)if(!Oo(Bt.charCodeAt(0),bt))return!1;return!0}(D,Kl.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,nt=D-Math.floor(D),bt=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:nt+(1-nt)*bt}:{fromScale:.5,toScale:1,t:1-(1-bt)*nt}}}class vc{constructor(D,nt){this.property=D,this.value=nt,this.expression=function(bt,Bt){if(Ef(bt))return new wu(bt,Bt);if(qh(bt)){let Kt=Uc(bt,Bt);if(Kt.result==="error")throw new Error(Kt.value.map(Qt=>`${Qt.key}: ${Qt.message}`).join(", "));return Kt.value}{let Kt=bt;return Bt.type==="color"&&typeof bt=="string"?Kt=_r.parse(bt):Bt.type!=="padding"||typeof bt!="number"&&!Array.isArray(bt)?Bt.type==="variableAnchorOffsetCollection"&&Array.isArray(bt)&&(Kt=Mi.parse(bt)):Kt=Mn.parse(bt),{kind:"constant",evaluate:()=>Kt}}}(nt===void 0?D.specification.default:nt,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,nt,bt){return this.property.possiblyEvaluate(this,D,nt,bt)}}class Hc{constructor(D){this.property=D,this.value=new vc(D,void 0)}transitioned(D,nt){return new zh(this.property,this.value,nt,M({},D.transition,this.transition),D.now)}untransitioned(){return new zh(this.property,this.value,null,{},0)}}class Pc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return p(this._values[D].value.value)}setValue(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].value=new vc(this._values[D].property,nt===null?void 0:p(nt))}getTransition(D){return p(this._values[D].transition)}setTransition(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].transition=p(nt)||void 0}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt);let Bt=this.getTransition(nt);Bt!==void 0&&(D[`${nt}-transition`]=Bt)}return D}transitioned(D,nt){let bt=new Wc(this._properties);for(let Bt of Object.keys(this._values))bt._values[Bt]=this._values[Bt].transitioned(D,nt._values[Bt]);return bt}untransitioned(){let D=new Wc(this._properties);for(let nt of Object.keys(this._values))D._values[nt]=this._values[nt].untransitioned();return D}}class zh{constructor(D,nt,bt,Bt,Kt){this.property=D,this.value=nt,this.begin=Kt+Bt.delay||0,this.end=this.begin+Bt.duration||0,D.specification.transition&&(Bt.delay||Bt.duration)&&(this.prior=bt)}possiblyEvaluate(D,nt,bt){let Bt=D.now||0,Kt=this.value.possiblyEvaluate(D,nt,bt),Qt=this.prior;if(Qt){if(Bt>this.end)return this.prior=null,Kt;if(this.value.isDataDriven())return this.prior=null,Kt;if(Bt=1)return 1;let rr=Re*Re,xr=rr*Re;return 4*(Re<.5?xr:3*(Re-rr)+xr-.75)}(we))}}return Kt}}class Wc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,nt,bt){let Bt=new Dh(this._properties);for(let Kt of Object.keys(this._values))Bt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Bt}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Oh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return p(this._values[D].value)}setValue(D,nt){this._values[D]=new vc(this._values[D].property,nt===null?void 0:p(nt))}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt)}return D}possiblyEvaluate(D,nt,bt){let Bt=new Dh(this._properties);for(let Kt of Object.keys(this._values))Bt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Bt}}class Fu{constructor(D,nt,bt){this.property=D,this.value=nt,this.parameters=bt}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,nt,bt,Bt){return this.property.evaluate(this.value,this.parameters,D,nt,bt,Bt)}}class Dh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class ns{constructor(D){this.specification=D}possiblyEvaluate(D,nt){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(nt)}interpolate(D,nt,bt){let Bt=Bo[this.specification.type];return Bt?Bt(D,nt,bt):D}}class zs{constructor(D,nt){this.specification=D,this.overrides=nt}possiblyEvaluate(D,nt,bt,Bt){return new Fu(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(nt,null,{},bt,Bt)}:D.expression,nt)}interpolate(D,nt,bt){if(D.value.kind!=="constant"||nt.value.kind!=="constant")return D;if(D.value.value===void 0||nt.value.value===void 0)return new Fu(this,{kind:"constant",value:void 0},D.parameters);let Bt=Bo[this.specification.type];if(Bt){let Kt=Bt(D.value.value,nt.value.value,bt);return new Fu(this,{kind:"constant",value:Kt},D.parameters)}return D}evaluate(D,nt,bt,Bt,Kt,Qt){return D.kind==="constant"?D.value:D.evaluate(nt,bt,Bt,Kt,Qt)}}class qc extends zs{possiblyEvaluate(D,nt,bt,Bt){if(D.value===void 0)return new Fu(this,{kind:"constant",value:void 0},nt);if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Bt),Qt=D.property.specification.type==="resolvedImage"&&typeof Kt!="string"?Kt.name:Kt,we=this._calculate(Qt,Qt,Qt,nt);return new Fu(this,{kind:"constant",value:we},nt)}if(D.expression.kind==="camera"){let Kt=this._calculate(D.expression.evaluate({zoom:nt.zoom-1}),D.expression.evaluate({zoom:nt.zoom}),D.expression.evaluate({zoom:nt.zoom+1}),nt);return new Fu(this,{kind:"constant",value:Kt},nt)}return new Fu(this,D.expression,nt)}evaluate(D,nt,bt,Bt,Kt,Qt){if(D.kind==="source"){let we=D.evaluate(nt,bt,Bt,Kt,Qt);return this._calculate(we,we,we,nt)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(nt.zoom)-1},bt,Bt),D.evaluate({zoom:Math.floor(nt.zoom)},bt,Bt),D.evaluate({zoom:Math.floor(nt.zoom)+1},bt,Bt),nt):D.value}_calculate(D,nt,bt,Bt){return Bt.zoom>Bt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class $u{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Bt){if(D.value!==void 0){if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Bt);return this._calculate(Kt,Kt,Kt,nt)}return this._calculate(D.expression.evaluate(new Rl(Math.floor(nt.zoom-1),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom+1),nt)),nt)}}_calculate(D,nt,bt,Bt){return Bt.zoom>Bt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class Zf{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Bt){return!!D.expression.evaluate(nt,null,{},bt,Bt)}interpolate(){return!1}}class $t{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let nt in D){let bt=D[nt];bt.specification.overridable&&this.overridableProperties.push(nt);let Bt=this.defaultPropertyValues[nt]=new vc(bt,void 0),Kt=this.defaultTransitionablePropertyValues[nt]=new Hc(bt);this.defaultTransitioningPropertyValues[nt]=Kt.untransitioned(),this.defaultPossiblyEvaluatedValues[nt]=Bt.possiblyEvaluate({})}}}na("DataDrivenProperty",zs),na("DataConstantProperty",ns),na("CrossFadedDataDrivenProperty",qc),na("CrossFadedProperty",$u),na("ColorRampProperty",Zf);let z="-transition";class ht extends ft{constructor(D,nt){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),nt.layout&&(this._unevaluatedLayout=new Oh(nt.layout)),nt.paint)){this._transitionablePaint=new Pc(nt.paint);for(let bt in D.paint)this.setPaintProperty(bt,D.paint[bt],{validate:!1});for(let bt in D.layout)this.setLayoutProperty(bt,D.layout[bt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Dh(nt.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,nt,bt={}){nt!=null&&this._validate(Ga,`layers.${this.id}.layout.${D}`,D,nt,bt)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,nt):this.visibility=nt)}getPaintProperty(D){return D.endsWith(z)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,nt,bt={}){if(nt!=null&&this._validate(Ra,`layers.${this.id}.paint.${D}`,D,nt,bt))return!1;if(D.endsWith(z))return this._transitionablePaint.setTransition(D.slice(0,-11),nt||void 0),!1;{let Bt=this._transitionablePaint._values[D],Kt=Bt.property.specification["property-type"]==="cross-faded-data-driven",Qt=Bt.value.isDataDriven(),we=Bt.value;this._transitionablePaint.setValue(D,nt),this._handleSpecialPaintPropertyUpdate(D);let Re=this._transitionablePaint._values[D].value;return Re.isDataDriven()||Qt||Kt||this._handleOverridablePaintPropertyUpdate(D,we,Re)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,nt){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,nt)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,nt)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),h(D,(nt,bt)=>!(nt===void 0||bt==="layout"&&!Object.keys(nt).length||bt==="paint"&&!Object.keys(nt).length))}_validate(D,nt,bt,Bt,Kt={}){return(!Kt||Kt.validate!==!1)&&fa(this,D.call(gi,{key:nt,layerType:this.type,objectKey:bt,value:Bt,styleSpec:ut,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let nt=this.paint.get(D);if(nt instanceof Fu&&uc(nt.property.specification)&&(nt.value.kind==="source"||nt.value.kind==="composite")&&nt.value.isStateDependent)return!0}return!1}}let Et={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ot{constructor(D,nt){this._structArray=D,this._pos1=nt*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ht{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,nt){return D._trim(),nt&&(D.isTransferred=!0,nt.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let nt=Object.create(this.prototype);return nt.arrayBuffer=D.arrayBuffer,nt.length=D.length,nt.capacity=D.arrayBuffer.byteLength/nt.bytesPerElement,nt._refreshViews(),nt}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let nt=this.uint8;this._refreshViews(),nt&&this.uint8.set(nt)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Te(G,D=1){let nt=0,bt=0;return{members:G.map(Bt=>{let Kt=Et[Bt.type].BYTES_PER_ELEMENT,Qt=nt=Fe(nt,Math.max(D,Kt)),we=Bt.components||1;return bt=Math.max(bt,Kt),nt+=Kt*we,{name:Bt.name,type:Bt.type,components:we,offset:Qt}}),size:Fe(nt,Math.max(bt,D)),alignment:D}}function Fe(G,D){return Math.ceil(G/D)*D}class Ke extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Bt=2*D;return this.int16[Bt+0]=nt,this.int16[Bt+1]=bt,D}}Ke.prototype.bytesPerElement=4,na("StructArrayLayout2i4",Ke);class vr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,D,nt,bt)}emplace(D,nt,bt,Bt){let Kt=3*D;return this.int16[Kt+0]=nt,this.int16[Kt+1]=bt,this.int16[Kt+2]=Bt,D}}vr.prototype.bytesPerElement=6,na("StructArrayLayout3i6",vr);class Dr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Bt)}emplace(D,nt,bt,Bt,Kt){let Qt=4*D;return this.int16[Qt+0]=nt,this.int16[Qt+1]=bt,this.int16[Qt+2]=Bt,this.int16[Qt+3]=Kt,D}}Dr.prototype.bytesPerElement=8,na("StructArrayLayout4i8",Dr);class Fr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt){let we=this.length;return this.resize(we+1),this.emplace(we,D,nt,bt,Bt,Kt,Qt)}emplace(D,nt,bt,Bt,Kt,Qt,we){let Re=6*D;return this.int16[Re+0]=nt,this.int16[Re+1]=bt,this.int16[Re+2]=Bt,this.int16[Re+3]=Kt,this.int16[Re+4]=Qt,this.int16[Re+5]=we,D}}Fr.prototype.bytesPerElement=12,na("StructArrayLayout2i4i12",Fr);class un extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt){let we=this.length;return this.resize(we+1),this.emplace(we,D,nt,bt,Bt,Kt,Qt)}emplace(D,nt,bt,Bt,Kt,Qt,we){let Re=4*D,rr=8*D;return this.int16[Re+0]=nt,this.int16[Re+1]=bt,this.uint8[rr+4]=Bt,this.uint8[rr+5]=Kt,this.uint8[rr+6]=Qt,this.uint8[rr+7]=we,D}}un.prototype.bytesPerElement=8,na("StructArrayLayout2i4ub8",un);class Sn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Bt=2*D;return this.float32[Bt+0]=nt,this.float32[Bt+1]=bt,D}}Sn.prototype.bytesPerElement=8,na("StructArrayLayout2f8",Sn);class Xt extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr){let Lr=this.length;return this.resize(Lr+1),this.emplace(Lr,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr)}emplace(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr){let Zr=10*D;return this.uint16[Zr+0]=nt,this.uint16[Zr+1]=bt,this.uint16[Zr+2]=Bt,this.uint16[Zr+3]=Kt,this.uint16[Zr+4]=Qt,this.uint16[Zr+5]=we,this.uint16[Zr+6]=Re,this.uint16[Zr+7]=rr,this.uint16[Zr+8]=xr,this.uint16[Zr+9]=Lr,D}}Xt.prototype.bytesPerElement=20,na("StructArrayLayout10ui20",Xt);class ae extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr){let ln=this.length;return this.resize(ln+1),this.emplace(ln,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr)}emplace(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln){let bn=12*D;return this.int16[bn+0]=nt,this.int16[bn+1]=bt,this.int16[bn+2]=Bt,this.int16[bn+3]=Kt,this.uint16[bn+4]=Qt,this.uint16[bn+5]=we,this.uint16[bn+6]=Re,this.uint16[bn+7]=rr,this.int16[bn+8]=xr,this.int16[bn+9]=Lr,this.int16[bn+10]=Zr,this.int16[bn+11]=ln,D}}ae.prototype.bytesPerElement=24,na("StructArrayLayout4i4ui4i24",ae);class _e extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,D,nt,bt)}emplace(D,nt,bt,Bt){let Kt=3*D;return this.float32[Kt+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Bt,D}}_e.prototype.bytesPerElement=12,na("StructArrayLayout3f12",_e);class Me extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint32[1*D+0]=nt,D}}Me.prototype.bytesPerElement=4,na("StructArrayLayout1ul4",Me);class je extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt,we,Re,rr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,D,nt,bt,Bt,Kt,Qt,we,Re,rr)}emplace(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr){let Lr=10*D,Zr=5*D;return this.int16[Lr+0]=nt,this.int16[Lr+1]=bt,this.int16[Lr+2]=Bt,this.int16[Lr+3]=Kt,this.int16[Lr+4]=Qt,this.int16[Lr+5]=we,this.uint32[Zr+3]=Re,this.uint16[Lr+8]=rr,this.uint16[Lr+9]=xr,D}}je.prototype.bytesPerElement=20,na("StructArrayLayout6i1ul2ui20",je);class De extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt){let we=this.length;return this.resize(we+1),this.emplace(we,D,nt,bt,Bt,Kt,Qt)}emplace(D,nt,bt,Bt,Kt,Qt,we){let Re=6*D;return this.int16[Re+0]=nt,this.int16[Re+1]=bt,this.int16[Re+2]=Bt,this.int16[Re+3]=Kt,this.int16[Re+4]=Qt,this.int16[Re+5]=we,D}}De.prototype.bytesPerElement=12,na("StructArrayLayout2i2i2i12",De);class $e extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,D,nt,bt,Bt,Kt)}emplace(D,nt,bt,Bt,Kt,Qt){let we=4*D,Re=8*D;return this.float32[we+0]=nt,this.float32[we+1]=bt,this.float32[we+2]=Bt,this.int16[Re+6]=Kt,this.int16[Re+7]=Qt,D}}$e.prototype.bytesPerElement=16,na("StructArrayLayout2f1f2i16",$e);class wr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt){let we=this.length;return this.resize(we+1),this.emplace(we,D,nt,bt,Bt,Kt,Qt)}emplace(D,nt,bt,Bt,Kt,Qt,we){let Re=16*D,rr=4*D,xr=8*D;return this.uint8[Re+0]=nt,this.uint8[Re+1]=bt,this.float32[rr+1]=Bt,this.float32[rr+2]=Kt,this.int16[xr+6]=Qt,this.int16[xr+7]=we,D}}wr.prototype.bytesPerElement=16,na("StructArrayLayout2ub2f2i16",wr);class Or extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,D,nt,bt)}emplace(D,nt,bt,Bt){let Kt=3*D;return this.uint16[Kt+0]=nt,this.uint16[Kt+1]=bt,this.uint16[Kt+2]=Bt,D}}Or.prototype.bytesPerElement=6,na("StructArrayLayout3ui6",Or);class Nr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci){let Sa=this.length;return this.resize(Sa+1),this.emplace(Sa,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci)}emplace(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci,Sa){let ra=24*D,ya=12*D,Ya=48*D;return this.int16[ra+0]=nt,this.int16[ra+1]=bt,this.uint16[ra+2]=Bt,this.uint16[ra+3]=Kt,this.uint32[ya+2]=Qt,this.uint32[ya+3]=we,this.uint32[ya+4]=Re,this.uint16[ra+10]=rr,this.uint16[ra+11]=xr,this.uint16[ra+12]=Lr,this.float32[ya+7]=Zr,this.float32[ya+8]=ln,this.uint8[Ya+36]=bn,this.uint8[Ya+37]=Ln,this.uint8[Ya+38]=Kn,this.uint32[ya+10]=Ci,this.int16[ra+22]=Sa,D}}Nr.prototype.bytesPerElement=48,na("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);class en extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci,Sa,ra,ya,Ya,Ao,Ss,Sl,_s,fs,Xs,js){let Os=this.length;return this.resize(Os+1),this.emplace(Os,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci,Sa,ra,ya,Ya,Ao,Ss,Sl,_s,fs,Xs,js)}emplace(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln,Kn,Ci,Sa,ra,ya,Ya,Ao,Ss,Sl,_s,fs,Xs,js,Os){let co=32*D,il=16*D;return this.int16[co+0]=nt,this.int16[co+1]=bt,this.int16[co+2]=Bt,this.int16[co+3]=Kt,this.int16[co+4]=Qt,this.int16[co+5]=we,this.int16[co+6]=Re,this.int16[co+7]=rr,this.uint16[co+8]=xr,this.uint16[co+9]=Lr,this.uint16[co+10]=Zr,this.uint16[co+11]=ln,this.uint16[co+12]=bn,this.uint16[co+13]=Ln,this.uint16[co+14]=Kn,this.uint16[co+15]=Ci,this.uint16[co+16]=Sa,this.uint16[co+17]=ra,this.uint16[co+18]=ya,this.uint16[co+19]=Ya,this.uint16[co+20]=Ao,this.uint16[co+21]=Ss,this.uint16[co+22]=Sl,this.uint32[il+12]=_s,this.float32[il+13]=fs,this.float32[il+14]=Xs,this.uint16[co+30]=js,this.uint16[co+31]=Os,D}}en.prototype.bytesPerElement=64,na("StructArrayLayout8i15ui1ul2f2ui64",en);class vn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.float32[1*D+0]=nt,D}}vn.prototype.bytesPerElement=4,na("StructArrayLayout1f4",vn);class In extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,D,nt,bt)}emplace(D,nt,bt,Bt){let Kt=3*D;return this.uint16[6*D+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Bt,D}}In.prototype.bytesPerElement=12,na("StructArrayLayout1ui2f12",In);class jn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,D,nt,bt)}emplace(D,nt,bt,Bt){let Kt=4*D;return this.uint32[2*D+0]=nt,this.uint16[Kt+2]=bt,this.uint16[Kt+3]=Bt,D}}jn.prototype.bytesPerElement=8,na("StructArrayLayout1ul2ui8",jn);class si extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Bt=2*D;return this.uint16[Bt+0]=nt,this.uint16[Bt+1]=bt,D}}si.prototype.bytesPerElement=4,na("StructArrayLayout2ui4",si);class Wi extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint16[1*D+0]=nt,D}}Wi.prototype.bytesPerElement=2,na("StructArrayLayout1ui2",Wi);class ga extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Bt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Bt)}emplace(D,nt,bt,Bt,Kt){let Qt=4*D;return this.float32[Qt+0]=nt,this.float32[Qt+1]=bt,this.float32[Qt+2]=Bt,this.float32[Qt+3]=Kt,D}}ga.prototype.bytesPerElement=16,na("StructArrayLayout4f16",ga);class pa extends Ot{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}pa.prototype.size=20;class Ma extends je{get(D){return new pa(this,D)}}na("CollisionBoxArray",Ma);class lo extends Ot{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}lo.prototype.size=48;class No extends Nr{get(D){return new lo(this,D)}}na("PlacedSymbolArray",No);class So extends Ot{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}So.prototype.size=64;class ds extends en{get(D){return new So(this,D)}}na("SymbolInstanceArray",ds);class fl extends vn{getoffsetX(D){return this.float32[1*D+0]}}na("GlyphOffsetArray",fl);class vl extends vr{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}na("SymbolLineVertexArray",vl);class Ds extends Ot{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]}}Ds.prototype.size=12;class wl extends In{get(D){return new Ds(this,D)}}na("TextAnchorOffsetArray",wl);class Lu extends Ot{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]}}Lu.prototype.size=8;class gu extends jn{get(D){return new Lu(this,D)}}na("FeatureIndexArray",gu);class $s extends Ke{}class Zs extends Ke{}class Yu extends Ke{}class dc extends Fr{}class $c extends un{}class At extends Sn{}class Ut extends Xt{}class ue extends ae{}class Se extends _e{}class Pe extends Me{}class Ne extends De{}class sr extends wr{}class ar extends Or{}class Er extends si{}let rn=Te([{name:"a_pos",components:2,type:"Int16"}],4),{members:Jr}=rn;class xn{constructor(D=[]){this.segments=D}prepareSegment(D,nt,bt,Bt){let Kt=this.segments[this.segments.length-1];return D>xn.MAX_VERTEX_ARRAY_LENGTH&&w(`Max vertices per segment is ${xn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Kt||Kt.vertexLength+D>xn.MAX_VERTEX_ARRAY_LENGTH||Kt.sortKey!==Bt)&&(Kt={vertexOffset:nt.length,primitiveOffset:bt.length,vertexLength:0,primitiveLength:0},Bt!==void 0&&(Kt.sortKey=Bt),this.segments.push(Kt)),Kt}get(){return this.segments}destroy(){for(let D of this.segments)for(let nt in D.vaos)D.vaos[nt].destroy()}static simpleSegment(D,nt,bt,Bt){return new xn([{vertexOffset:D,primitiveOffset:nt,vertexLength:bt,primitiveLength:Bt,vaos:{},sortKey:0}])}}function zn(G,D){return 256*(G=_(Math.floor(G),0,255))+_(Math.floor(D),0,255)}xn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,na("SegmentVector",xn);let On=Te([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var $i={exports:{}},Vn={exports:{}};Vn.exports=function(G,D){var nt,bt,Bt,Kt,Qt,we,Re,rr;for(bt=G.length-(nt=3&G.length),Bt=D,Qt=3432918353,we=461845907,rr=0;rr>>16)*Qt&65535)<<16)&4294967295)<<15|Re>>>17))*we+(((Re>>>16)*we&65535)<<16)&4294967295)<<13|Bt>>>19))+((5*(Bt>>>16)&65535)<<16)&4294967295))+((58964+(Kt>>>16)&65535)<<16);switch(Re=0,nt){case 3:Re^=(255&G.charCodeAt(rr+2))<<16;case 2:Re^=(255&G.charCodeAt(rr+1))<<8;case 1:Bt^=Re=(65535&(Re=(Re=(65535&(Re^=255&G.charCodeAt(rr)))*Qt+(((Re>>>16)*Qt&65535)<<16)&4294967295)<<15|Re>>>17))*we+(((Re>>>16)*we&65535)<<16)&4294967295}return Bt^=G.length,Bt=2246822507*(65535&(Bt^=Bt>>>16))+((2246822507*(Bt>>>16)&65535)<<16)&4294967295,Bt=3266489909*(65535&(Bt^=Bt>>>13))+((3266489909*(Bt>>>16)&65535)<<16)&4294967295,(Bt^=Bt>>>16)>>>0};var bi=Vn.exports,Pi={exports:{}};Pi.exports=function(G,D){for(var nt,bt=G.length,Bt=D^bt,Kt=0;bt>=4;)nt=1540483477*(65535&(nt=255&G.charCodeAt(Kt)|(255&G.charCodeAt(++Kt))<<8|(255&G.charCodeAt(++Kt))<<16|(255&G.charCodeAt(++Kt))<<24))+((1540483477*(nt>>>16)&65535)<<16),Bt=1540483477*(65535&Bt)+((1540483477*(Bt>>>16)&65535)<<16)^(nt=1540483477*(65535&(nt^=nt>>>24))+((1540483477*(nt>>>16)&65535)<<16)),bt-=4,++Kt;switch(bt){case 3:Bt^=(255&G.charCodeAt(Kt+2))<<16;case 2:Bt^=(255&G.charCodeAt(Kt+1))<<8;case 1:Bt=1540483477*(65535&(Bt^=255&G.charCodeAt(Kt)))+((1540483477*(Bt>>>16)&65535)<<16)}return Bt=1540483477*(65535&(Bt^=Bt>>>13))+((1540483477*(Bt>>>16)&65535)<<16),(Bt^=Bt>>>15)>>>0};var ji=bi,Ki=Pi.exports;$i.exports=ji,$i.exports.murmur3=ji,$i.exports.murmur2=Ki;var Jn=r($i.exports);class Ua{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,nt,bt,Bt){this.ids.push(Wa(D)),this.positions.push(nt,bt,Bt)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let nt=Wa(D),bt=0,Bt=this.ids.length-1;for(;bt>1;this.ids[Qt]>=nt?Bt=Qt:bt=Qt+1}let Kt=[];for(;this.ids[bt]===nt;)Kt.push({index:this.positions[3*bt],start:this.positions[3*bt+1],end:this.positions[3*bt+2]}),bt++;return Kt}static serialize(D,nt){let bt=new Float64Array(D.ids),Bt=new Uint32Array(D.positions);return oo(bt,Bt,0,bt.length-1),nt&&nt.push(bt.buffer,Bt.buffer),{ids:bt,positions:Bt}}static deserialize(D){let nt=new Ua;return nt.ids=D.ids,nt.positions=D.positions,nt.indexed=!0,nt}}function Wa(G){let D=+G;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:Jn(String(G))}function oo(G,D,nt,bt){for(;nt>1],Kt=nt-1,Qt=bt+1;for(;;){do Kt++;while(G[Kt]Bt);if(Kt>=Qt)break;Io(G,Kt,Qt),Io(D,3*Kt,3*Qt),Io(D,3*Kt+1,3*Qt+1),Io(D,3*Kt+2,3*Qt+2)}Qt-nt`u_${Bt}`),this.type=bt}setUniform(D,nt,bt){D.set(bt.constantOr(this.value))}getBinding(D,nt,bt){return this.type==="color"?new Yo(D,nt):new $o(D,nt)}}class du{constructor(D,nt){this.uniformNames=nt.map(bt=>`u_${bt}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,nt){this.pixelRatioFrom=nt.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=nt.tlbr,this.patternTo=D.tlbr}setUniform(D,nt,bt,Bt){let Kt=Bt==="u_pattern_to"?this.patternTo:Bt==="u_pattern_from"?this.patternFrom:Bt==="u_pixel_ratio_to"?this.pixelRatioTo:Bt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Kt&&D.set(Kt)}getBinding(D,nt,bt){return bt.substr(0,9)==="u_pattern"?new ol(D,nt):new $o(D,nt)}}class _o{constructor(D,nt,bt,Bt){this.expression=D,this.type=bt,this.maxValue=0,this.paintVertexAttributes=nt.map(Kt=>({name:`a_${Kt}`,type:"Float32",components:bt==="color"?2:1,offset:0})),this.paintVertexArray=new Bt}populatePaintArray(D,nt,bt,Bt,Kt){let Qt=this.paintVertexArray.length,we=this.expression.evaluate(new Rl(0),nt,{},Bt,[],Kt);this.paintVertexArray.resize(D),this._setPaintValue(Qt,D,we)}updatePaintArray(D,nt,bt,Bt){let Kt=this.expression.evaluate({zoom:0},bt,Bt);this._setPaintValue(D,nt,Kt)}_setPaintValue(D,nt,bt){if(this.type==="color"){let Bt=Tl(bt);for(let Kt=D;Kt`u_${we}_t`),this.type=bt,this.useIntegerZoom=Bt,this.zoom=Kt,this.maxValue=0,this.paintVertexAttributes=nt.map(we=>({name:`a_${we}`,type:"Float32",components:bt==="color"?4:2,offset:0})),this.paintVertexArray=new Qt}populatePaintArray(D,nt,bt,Bt,Kt){let Qt=this.expression.evaluate(new Rl(this.zoom),nt,{},Bt,[],Kt),we=this.expression.evaluate(new Rl(this.zoom+1),nt,{},Bt,[],Kt),Re=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Re,D,Qt,we)}updatePaintArray(D,nt,bt,Bt){let Kt=this.expression.evaluate({zoom:this.zoom},bt,Bt),Qt=this.expression.evaluate({zoom:this.zoom+1},bt,Bt);this._setPaintValue(D,nt,Kt,Qt)}_setPaintValue(D,nt,bt,Bt){if(this.type==="color"){let Kt=Tl(bt),Qt=Tl(Bt);for(let we=D;we`#define HAS_UNIFORM_${Bt}`))}return D}getBinderAttributes(){let D=[];for(let nt in this.binders){let bt=this.binders[nt];if(bt instanceof _o||bt instanceof Gs)for(let Bt=0;Bt!0){this.programConfigurations={};for(let Bt of D)this.programConfigurations[Bt.id]=new uu(Bt,nt,bt);this.needsUpload=!1,this._featureMap=new Ua,this._bufferOffset=0}populatePaintArrays(D,nt,bt,Bt,Kt,Qt){for(let we in this.programConfigurations)this.programConfigurations[we].populatePaintArrays(D,nt,Bt,Kt,Qt);nt.id!==void 0&&this._featureMap.add(nt.id,bt,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,nt,bt,Bt){for(let Kt of bt)this.needsUpload=this.programConfigurations[Kt.id].updatePaintArrays(D,this._featureMap,nt,Kt,Bt)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let nt in this.programConfigurations)this.programConfigurations[nt].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function rh(G,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${D}-`,"").replace(/-/g,"_")]}function Ul(G,D,nt){let bt={color:{source:Sn,composite:ga},number:{source:vn,composite:Sn}},Bt=function(Kt){return{"line-pattern":{source:Ut,composite:Ut},"fill-pattern":{source:Ut,composite:Ut},"fill-extrusion-pattern":{source:Ut,composite:Ut}}[Kt]}(G);return Bt&&Bt[nt]||bt[D][nt]}na("ConstantBinder",Ku),na("CrossFadedConstantBinder",du),na("SourceExpressionBinder",_o),na("CrossFadedCompositeBinder",nl),na("CompositeExpressionBinder",Gs),na("ProgramConfiguration",uu,{omit:["_buffers"]}),na("ProgramConfigurationSet",Xl);let ru=8192,kh=Math.pow(2,14)-1,be=-kh-1;function Tr(G){let D=ru/G.extent,nt=G.loadGeometry();for(let bt=0;btQt.x+1||ReQt.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return nt}function Ir(G,D){return{type:G.type,id:G.id,properties:G.properties,geometry:D?Tr(G):[]}}function Fn(G,D,nt,bt,Bt){G.emplaceBack(2*D+(bt+1)/2,2*nt+(Bt+1)/2)}class hi{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new Zs,this.indexArray=new ar,this.segments=new xn,this.programConfigurations=new Xl(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){let Bt=this.layers[0],Kt=[],Qt=null,we=!1;Bt.type==="circle"&&(Qt=Bt.layout.get("circle-sort-key"),we=!Qt.isConstant());for(let{feature:Re,id:rr,index:xr,sourceLayerIndex:Lr}of D){let Zr=this.layers[0]._featureFilter.needGeometry,ln=Ir(Re,Zr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),ln,bt))continue;let bn=we?Qt.evaluate(ln,{},bt):void 0,Ln={id:rr,properties:Re.properties,type:Re.type,sourceLayerIndex:Lr,index:xr,geometry:Zr?ln.geometry:Tr(Re),patterns:{},sortKey:bn};Kt.push(Ln)}we&&Kt.sort((Re,rr)=>Re.sortKey-rr.sortKey);for(let Re of Kt){let{geometry:rr,index:xr,sourceLayerIndex:Lr}=Re,Zr=D[xr].feature;this.addFeature(Re,rr,xr,bt),nt.featureIndex.insert(Zr,rr,xr,Lr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Jr),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,nt,bt,Bt){for(let Kt of nt)for(let Qt of Kt){let we=Qt.x,Re=Qt.y;if(we<0||we>=ru||Re<0||Re>=ru)continue;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),xr=rr.vertexLength;Fn(this.layoutVertexArray,we,Re,-1,-1),Fn(this.layoutVertexArray,we,Re,1,-1),Fn(this.layoutVertexArray,we,Re,1,1),Fn(this.layoutVertexArray,we,Re,-1,1),this.indexArray.emplaceBack(xr,xr+1,xr+2),this.indexArray.emplaceBack(xr,xr+3,xr+2),rr.vertexLength+=4,rr.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,{},Bt)}}function ni(G,D){for(let nt=0;nt1){if(Gi(G,D))return!0;for(let bt=0;bt1?nt:nt.sub(D)._mult(Bt)._add(D))}function ia(G,D){let nt,bt,Bt,Kt=!1;for(let Qt=0;QtD.y!=Bt.y>D.y&&D.x<(Bt.x-bt.x)*(D.y-bt.y)/(Bt.y-bt.y)+bt.x&&(Kt=!Kt)}return Kt}function Ei(G,D){let nt=!1;for(let bt=0,Bt=G.length-1;btD.y!=Qt.y>D.y&&D.x<(Qt.x-Kt.x)*(D.y-Kt.y)/(Qt.y-Kt.y)+Kt.x&&(nt=!nt)}return nt}function dn(G,D,nt){let bt=nt[0],Bt=nt[2];if(G.xBt.x&&D.x>Bt.x||G.yBt.y&&D.y>Bt.y)return!1;let Kt=B(G,D,nt[0]);return Kt!==B(G,D,nt[1])||Kt!==B(G,D,nt[2])||Kt!==B(G,D,nt[3])}function Un(G,D,nt){let bt=D.paint.get(G).value;return bt.kind==="constant"?bt.value:nt.programConfigurations.get(D.id).getMaxValue(G)}function Ui(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function Si(G,D,nt,bt,Bt){if(!D[0]&&!D[1])return G;let Kt=o.convert(D)._mult(Bt);nt==="viewport"&&Kt._rotate(-bt);let Qt=[];for(let we=0;wezo(Kn,Ln))}(rr,Re),ln=Lr?xr*we:xr;for(let bn of Bt)for(let Ln of bn){let Kn=Lr?Ln:zo(Ln,Re),Ci=ln,Sa=Qi([],[Ln.x,Ln.y,0,1],Re);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ci*=Sa[3]/Qt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ci*=Qt.cameraToCenterDistance/Sa[3]),yn(Zr,Kn,Ci))return!0}return!1}}function zo(G,D){let nt=Qi([],[G.x,G.y,0,1],D);return new o(nt[0]/nt[3],nt[1]/nt[3])}class wo extends hi{}let wa;na("HeatmapBucket",wo,{omit:["layers"]});var Fa={get paint(){return wa=wa||new $t({"heatmap-radius":new zs(ut.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zs(ut.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ns(ut.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Zf(ut.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ns(ut.paint_heatmap["heatmap-opacity"])})}};function vo(G,{width:D,height:nt},bt,Bt){if(Bt){if(Bt instanceof Uint8ClampedArray)Bt=new Uint8Array(Bt.buffer);else if(Bt.length!==D*nt*bt)throw new RangeError(`mismatched image size. expected: ${Bt.length} but got: ${D*nt*bt}`)}else Bt=new Uint8Array(D*nt*bt);return G.width=D,G.height=nt,G.data=Bt,G}function Co(G,{width:D,height:nt},bt){if(D===G.width&&nt===G.height)return;let Bt=vo({},{width:D,height:nt},bt);rs(G,Bt,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,D),height:Math.min(G.height,nt)},bt),G.width=D,G.height=nt,G.data=Bt.data}function rs(G,D,nt,bt,Bt,Kt){if(Bt.width===0||Bt.height===0)return D;if(Bt.width>G.width||Bt.height>G.height||nt.x>G.width-Bt.width||nt.y>G.height-Bt.height)throw new RangeError("out of range source coordinates for image copy");if(Bt.width>D.width||Bt.height>D.height||bt.x>D.width-Bt.width||bt.y>D.height-Bt.height)throw new RangeError("out of range destination coordinates for image copy");let Qt=G.data,we=D.data;if(Qt===we)throw new Error("srcData equals dstData, so image is already copied");for(let Re=0;Re{D[G.evaluationKey]=Re;let rr=G.expression.evaluate(D);Bt.data[Qt+we+0]=Math.floor(255*rr.r/rr.a),Bt.data[Qt+we+1]=Math.floor(255*rr.g/rr.a),Bt.data[Qt+we+2]=Math.floor(255*rr.b/rr.a),Bt.data[Qt+we+3]=Math.floor(255*rr.a)};if(G.clips)for(let Qt=0,we=0;Qt80*nt){we=1/0,Re=1/0;let xr=-1/0,Lr=-1/0;for(let Zr=nt;Zrxr&&(xr=ln),bn>Lr&&(Lr=bn)}rr=Math.max(xr-we,Lr-Re),rr=rr!==0?32767/rr:0}return sl(Kt,Qt,nt,we,Re,rr,0),Qt}function jo(G,D,nt,bt,Bt){let Kt;if(Bt===function(Qt,we,Re,rr){let xr=0;for(let Lr=we,Zr=Re-rr;Lr0)for(let Qt=D;Qt=D;Qt-=bt)Kt=er(Qt/bt|0,G[Qt],G[Qt+1],Kt);return Kt&&xe(Kt,Kt.next)&&(lr(Kt),Kt=Kt.next),Kt}function Mu(G,D){if(!G)return G;D||(D=G);let nt,bt=G;do if(nt=!1,bt.steiner||!xe(bt,bt.next)&&de(bt.prev,bt,bt.next)!==0)bt=bt.next;else{if(lr(bt),bt=D=bt.prev,bt===bt.next)break;nt=!0}while(nt||bt!==D);return D}function sl(G,D,nt,bt,Bt,Kt,Qt){if(!G)return;!Qt&&Kt&&function(Re,rr,xr,Lr){let Zr=Re;do Zr.z===0&&(Zr.z=ot(Zr.x,Zr.y,rr,xr,Lr)),Zr.prevZ=Zr.prev,Zr.nextZ=Zr.next,Zr=Zr.next;while(Zr!==Re);Zr.prevZ.nextZ=null,Zr.prevZ=null,function(ln){let bn,Ln=1;do{let Kn,Ci=ln;ln=null;let Sa=null;for(bn=0;Ci;){bn++;let ra=Ci,ya=0;for(let Ao=0;Ao0||Ya>0&&ra;)ya!==0&&(Ya===0||!ra||Ci.z<=ra.z)?(Kn=Ci,Ci=Ci.nextZ,ya--):(Kn=ra,ra=ra.nextZ,Ya--),Sa?Sa.nextZ=Kn:ln=Kn,Kn.prevZ=Sa,Sa=Kn;Ci=ra}Sa.nextZ=null,Ln*=2}while(bn>1)}(Zr)}(G,bt,Bt,Kt);let we=G;for(;G.prev!==G.next;){let Re=G.prev,rr=G.next;if(Kt?xc(G,bt,Bt,Kt):Iu(G))D.push(Re.i,G.i,rr.i),lr(G),G=rr.next,we=rr.next;else if((G=rr)===we){Qt?Qt===1?sl(G=Lo(Mu(G),D),D,nt,bt,Bt,Kt,2):Qt===2&&Cs(G,D,nt,bt,Bt,Kt):sl(Mu(G),D,nt,bt,Bt,Kt,1);break}}}function Iu(G){let D=G.prev,nt=G,bt=G.next;if(de(D,nt,bt)>=0)return!1;let Bt=D.x,Kt=nt.x,Qt=bt.x,we=D.y,Re=nt.y,rr=bt.y,xr=BtKt?Bt>Qt?Bt:Qt:Kt>Qt?Kt:Qt,ln=we>Re?we>rr?we:rr:Re>rr?Re:rr,bn=bt.next;for(;bn!==D;){if(bn.x>=xr&&bn.x<=Zr&&bn.y>=Lr&&bn.y<=ln&&xt(Bt,we,Kt,Re,Qt,rr,bn.x,bn.y)&&de(bn.prev,bn,bn.next)>=0)return!1;bn=bn.next}return!0}function xc(G,D,nt,bt){let Bt=G.prev,Kt=G,Qt=G.next;if(de(Bt,Kt,Qt)>=0)return!1;let we=Bt.x,Re=Kt.x,rr=Qt.x,xr=Bt.y,Lr=Kt.y,Zr=Qt.y,ln=weRe?we>rr?we:rr:Re>rr?Re:rr,Kn=xr>Lr?xr>Zr?xr:Zr:Lr>Zr?Lr:Zr,Ci=ot(ln,bn,D,nt,bt),Sa=ot(Ln,Kn,D,nt,bt),ra=G.prevZ,ya=G.nextZ;for(;ra&&ra.z>=Ci&&ya&&ya.z<=Sa;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Kn&&ra!==Bt&&ra!==Qt&&xt(we,xr,Re,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0||(ra=ra.prevZ,ya.x>=ln&&ya.x<=Ln&&ya.y>=bn&&ya.y<=Kn&&ya!==Bt&&ya!==Qt&&xt(we,xr,Re,Lr,rr,Zr,ya.x,ya.y)&&de(ya.prev,ya,ya.next)>=0))return!1;ya=ya.nextZ}for(;ra&&ra.z>=Ci;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Kn&&ra!==Bt&&ra!==Qt&&xt(we,xr,Re,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0)return!1;ra=ra.prevZ}for(;ya&&ya.z<=Sa;){if(ya.x>=ln&&ya.x<=Ln&&ya.y>=bn&&ya.y<=Kn&&ya!==Bt&&ya!==Qt&&xt(we,xr,Re,Lr,rr,Zr,ya.x,ya.y)&&de(ya.prev,ya,ya.next)>=0)return!1;ya=ya.nextZ}return!0}function Lo(G,D){let nt=G;do{let bt=nt.prev,Bt=nt.next.next;!xe(bt,Bt)&&Yt(bt,nt,nt.next,Bt)&&ir(bt,Bt)&&ir(Bt,bt)&&(D.push(bt.i,nt.i,Bt.i),lr(nt),lr(nt.next),nt=G=Bt),nt=nt.next}while(nt!==G);return Mu(nt)}function Cs(G,D,nt,bt,Bt,Kt){let Qt=G;do{let we=Qt.next.next;for(;we!==Qt.prev;){if(Qt.i!==we.i&&Vt(Qt,we)){let Re=Ye(Qt,we);return Qt=Mu(Qt,Qt.next),Re=Mu(Re,Re.next),sl(Qt,D,nt,bt,Bt,Kt,0),void sl(Re,D,nt,bt,Bt,Kt,0)}we=we.next}Qt=Qt.next}while(Qt!==G)}function Ml(G,D){return G.x-D.x}function yl(G,D){let nt=function(Bt,Kt){let Qt=Kt,we=Bt.x,Re=Bt.y,rr,xr=-1/0;do{if(Re<=Qt.y&&Re>=Qt.next.y&&Qt.next.y!==Qt.y){let Ln=Qt.x+(Re-Qt.y)*(Qt.next.x-Qt.x)/(Qt.next.y-Qt.y);if(Ln<=we&&Ln>xr&&(xr=Ln,rr=Qt.x=Qt.x&&Qt.x>=Zr&&we!==Qt.x&&xt(Rerr.x||Qt.x===rr.x&&$(rr,Qt)))&&(rr=Qt,bn=Ln)}Qt=Qt.next}while(Qt!==Lr);return rr}(G,D);if(!nt)return D;let bt=Ye(nt,G);return Mu(bt,bt.next),Mu(nt,nt.next)}function $(G,D){return de(G.prev,G,D.prev)<0&&de(D.next,G,G.next)<0}function ot(G,D,nt,bt,Bt){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-nt)*Bt|0)|G<<8))|G<<4))|G<<2))|G<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-bt)*Bt|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function et(G){let D=G,nt=G;do(D.x=(G-Qt)*(Kt-we)&&(G-Qt)*(bt-we)>=(nt-Qt)*(D-we)&&(nt-Qt)*(Kt-we)>=(Bt-Qt)*(bt-we)}function Vt(G,D){return G.next.i!==D.i&&G.prev.i!==D.i&&!function(nt,bt){let Bt=nt;do{if(Bt.i!==nt.i&&Bt.next.i!==nt.i&&Bt.i!==bt.i&&Bt.next.i!==bt.i&&Yt(Bt,Bt.next,nt,bt))return!0;Bt=Bt.next}while(Bt!==nt);return!1}(G,D)&&(ir(G,D)&&ir(D,G)&&function(nt,bt){let Bt=nt,Kt=!1,Qt=(nt.x+bt.x)/2,we=(nt.y+bt.y)/2;do Bt.y>we!=Bt.next.y>we&&Bt.next.y!==Bt.y&&Qt<(Bt.next.x-Bt.x)*(we-Bt.y)/(Bt.next.y-Bt.y)+Bt.x&&(Kt=!Kt),Bt=Bt.next;while(Bt!==nt);return Kt}(G,D)&&(de(G.prev,G,D.prev)||de(G,D.prev,D))||xe(G,D)&&de(G.prev,G,G.next)>0&&de(D.prev,D,D.next)>0)}function de(G,D,nt){return(D.y-G.y)*(nt.x-D.x)-(D.x-G.x)*(nt.y-D.y)}function xe(G,D){return G.x===D.x&&G.y===D.y}function Yt(G,D,nt,bt){let Bt=Ee(de(G,D,nt)),Kt=Ee(de(G,D,bt)),Qt=Ee(de(nt,bt,G)),we=Ee(de(nt,bt,D));return Bt!==Kt&&Qt!==we||!(Bt!==0||!he(G,nt,D))||!(Kt!==0||!he(G,bt,D))||!(Qt!==0||!he(nt,G,bt))||!(we!==0||!he(nt,D,bt))}function he(G,D,nt){return D.x<=Math.max(G.x,nt.x)&&D.x>=Math.min(G.x,nt.x)&&D.y<=Math.max(G.y,nt.y)&&D.y>=Math.min(G.y,nt.y)}function Ee(G){return G>0?1:G<0?-1:0}function ir(G,D){return de(G.prev,G,G.next)<0?de(G,D,G.next)>=0&&de(G,G.prev,D)>=0:de(G,D,G.prev)<0||de(G,G.next,D)<0}function Ye(G,D){let nt=hr(G.i,G.x,G.y),bt=hr(D.i,D.x,D.y),Bt=G.next,Kt=D.prev;return G.next=D,D.prev=G,nt.next=Bt,Bt.prev=nt,bt.next=nt,nt.prev=bt,Kt.next=bt,bt.prev=Kt,bt}function er(G,D,nt,bt){let Bt=hr(G,D,nt);return bt?(Bt.next=bt.next,Bt.prev=bt,bt.next.prev=Bt,bt.next=Bt):(Bt.prev=Bt,Bt.next=Bt),Bt}function lr(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function hr(G,D,nt){return{i:G,x:D,y:nt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ve(G,D,nt){let bt=nt.patternDependencies,Bt=!1;for(let Kt of D){let Qt=Kt.paint.get(`${G}-pattern`);Qt.isConstant()||(Bt=!0);let we=Qt.constantOr(null);we&&(Bt=!0,bt[we.to]=!0,bt[we.from]=!0)}return Bt}function Xe(G,D,nt,bt,Bt){let Kt=Bt.patternDependencies;for(let Qt of D){let we=Qt.paint.get(`${G}-pattern`).value;if(we.kind!=="constant"){let Re=we.evaluate({zoom:bt-1},nt,{},Bt.availableImages),rr=we.evaluate({zoom:bt},nt,{},Bt.availableImages),xr=we.evaluate({zoom:bt+1},nt,{},Bt.availableImages);Re=Re&&Re.name?Re.name:Re,rr=rr&&rr.name?rr.name:rr,xr=xr&&xr.name?xr.name:xr,Kt[Re]=!0,Kt[rr]=!0,Kt[xr]=!0,nt.patterns[Qt.id]={min:Re,mid:rr,max:xr}}}return nt}class Ze{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yu,this.indexArray=new ar,this.indexArray2=new Er,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.segments2=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("fill",this.layers,nt);let Bt=this.layers[0].layout.get("fill-sort-key"),Kt=!Bt.isConstant(),Qt=[];for(let{feature:we,id:Re,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(we,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Bt.evaluate(Zr,{},bt,nt.availableImages):void 0,bn={id:Re,properties:we.properties,type:we.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:Tr(we),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((we,Re)=>we.sortKey-Re.sortKey);for(let we of Qt){let{geometry:Re,index:rr,sourceLayerIndex:xr}=we;if(this.hasPattern){let Lr=Xe("fill",this.layers,we,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(we,Re,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Re,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Bt of this.patternFeatures)this.addFeature(Bt,Bt.geometry,Bt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,pu),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,nt,bt,Bt,Kt){for(let Qt of Jc(nt,500)){let we=0;for(let ln of Qt)we+=ln.length;let Re=this.segments.prepareSegment(we,this.layoutVertexArray,this.indexArray),rr=Re.vertexLength,xr=[],Lr=[];for(let ln of Qt){if(ln.length===0)continue;ln!==Qt[0]&&Lr.push(xr.length/2);let bn=this.segments2.prepareSegment(ln.length,this.layoutVertexArray,this.indexArray2),Ln=bn.vertexLength;this.layoutVertexArray.emplaceBack(ln[0].x,ln[0].y),this.indexArray2.emplaceBack(Ln+ln.length-1,Ln),xr.push(ln[0].x),xr.push(ln[0].y);for(let Kn=1;Kn>3}if(Bt--,bt===1||bt===2)Kt+=G.readSVarint(),Qt+=G.readSVarint(),bt===1&&(D&&we.push(D),D=[]),D.push(new ea(Kt,Qt));else{if(bt!==7)throw new Error("unknown command "+bt);D&&D.push(D[0].clone())}}return D&&we.push(D),we},Oi.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var D=G.readVarint()+G.pos,nt=1,bt=0,Bt=0,Kt=0,Qt=1/0,we=-1/0,Re=1/0,rr=-1/0;G.pos>3}if(bt--,nt===1||nt===2)(Bt+=G.readSVarint())we&&(we=Bt),(Kt+=G.readSVarint())rr&&(rr=Kt);else if(nt!==7)throw new Error("unknown command "+nt)}return[Qt,Re,we,rr]},Oi.prototype.toGeoJSON=function(G,D,nt){var bt,Bt,Kt=this.extent*Math.pow(2,nt),Qt=this.extent*G,we=this.extent*D,Re=this.loadGeometry(),rr=Oi.types[this.type];function xr(ln){for(var bn=0;bn>3;Bt=Qt===1?bt.readString():Qt===2?bt.readFloat():Qt===3?bt.readDouble():Qt===4?bt.readVarint64():Qt===5?bt.readVarint():Qt===6?bt.readSVarint():Qt===7?bt.readBoolean():null}return Bt}(nt))}xs.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var D=this._pbf.readVarint()+this._pbf.pos;return new ho(this._pbf,D,this.extent,this._keys,this._values)};var Hl=Zo;function pl(G,D,nt){if(G===3){var bt=new Hl(nt,nt.readVarint()+nt.pos);bt.length&&(D[bt.name]=bt)}}yi.VectorTile=function(G,D){this.layers=G.readFields(pl,{},D)},yi.VectorTileFeature=Ii,yi.VectorTileLayer=Zo;let Wl=yi.VectorTileFeature.types,_c=Math.pow(2,13);function Fs(G,D,nt,bt,Bt,Kt,Qt,we){G.emplaceBack(D,nt,2*Math.floor(bt*_c)+Qt,Bt*_c*2,Kt*_c*2,Math.round(we))}class Su{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new dc,this.centroidVertexArray=new $s,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.features=[],this.hasPattern=Ve("fill-extrusion",this.layers,nt);for(let{feature:Bt,id:Kt,index:Qt,sourceLayerIndex:we}of D){let Re=this.layers[0]._featureFilter.needGeometry,rr=Ir(Bt,Re);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),rr,bt))continue;let xr={id:Kt,sourceLayerIndex:we,index:Qt,geometry:Re?rr.geometry:Tr(Bt),properties:Bt.properties,type:Bt.type,patterns:{}};this.hasPattern?this.features.push(Xe("fill-extrusion",this.layers,xr,this.zoom,nt)):this.addFeature(xr,xr.geometry,Qt,bt,{}),nt.featureIndex.insert(Bt,xr.geometry,Qt,we,this.index,!0)}}addFeatures(D,nt,bt){for(let Bt of this.features){let{geometry:Kt}=Bt;this.addFeature(Bt,Kt,Bt.index,nt,bt)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,zi),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Xn.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,nt,bt,Bt,Kt){for(let Qt of Jc(nt,500)){let we={x:0,y:0,vertexCount:0},Re=0;for(let bn of Qt)Re+=bn.length;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let bn of Qt){if(bn.length===0||If(bn))continue;let Ln=0;for(let Kn=0;Kn=1){let Sa=bn[Kn-1];if(!af(Ci,Sa)){rr.vertexLength+4>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ra=Ci.sub(Sa)._perp()._unit(),ya=Sa.dist(Ci);Ln+ya>32768&&(Ln=0),Fs(this.layoutVertexArray,Ci.x,Ci.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Ci.x,Ci.y,ra.x,ra.y,0,1,Ln),we.x+=2*Ci.x,we.y+=2*Ci.y,we.vertexCount+=2,Ln+=ya,Fs(this.layoutVertexArray,Sa.x,Sa.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Sa.x,Sa.y,ra.x,ra.y,0,1,Ln),we.x+=2*Sa.x,we.y+=2*Sa.y,we.vertexCount+=2;let Ya=rr.vertexLength;this.indexArray.emplaceBack(Ya,Ya+2,Ya+1),this.indexArray.emplaceBack(Ya+1,Ya+2,Ya+3),rr.vertexLength+=4,rr.primitiveLength+=2}}}}if(rr.vertexLength+Re>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray)),Wl[D.type]!=="Polygon")continue;let xr=[],Lr=[],Zr=rr.vertexLength;for(let bn of Qt)if(bn.length!==0){bn!==Qt[0]&&Lr.push(xr.length/2);for(let Ln=0;Lnru)||G.y===D.y&&(G.y<0||G.y>ru)}function If(G){return G.every(D=>D.x<0)||G.every(D=>D.x>ru)||G.every(D=>D.y<0)||G.every(D=>D.y>ru)}let jp;na("FillExtrusionBucket",Su,{omit:["layers","features"]});var b0={get paint(){return jp=jp||new $t({"fill-extrusion-opacity":new ns(ut["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zs(ut["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ns(ut["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ns(ut["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qc(ut["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zs(ut["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zs(ut["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ns(ut["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Tp extends ht{constructor(D){super(D,b0)}createBucket(D){return new Su(D)}queryRadius(){return Ui(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,nt,bt,Bt,Kt,Qt,we,Re){let rr=Si(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qt.angle,we),xr=this.paint.get("fill-extrusion-height").evaluate(nt,bt),Lr=this.paint.get("fill-extrusion-base").evaluate(nt,bt),Zr=function(bn,Ln,Kn,Ci){let Sa=[];for(let ra of bn){let ya=[ra.x,ra.y,0,1];Qi(ya,ya,Ln),Sa.push(new o(ya[0]/ya[3],ya[1]/ya[3]))}return Sa}(rr,Re),ln=function(bn,Ln,Kn,Ci){let Sa=[],ra=[],ya=Ci[8]*Ln,Ya=Ci[9]*Ln,Ao=Ci[10]*Ln,Ss=Ci[11]*Ln,Sl=Ci[8]*Kn,_s=Ci[9]*Kn,fs=Ci[10]*Kn,Xs=Ci[11]*Kn;for(let js of bn){let Os=[],co=[];for(let il of js){let Js=il.x,Zl=il.y,ch=Ci[0]*Js+Ci[4]*Zl+Ci[12],nh=Ci[1]*Js+Ci[5]*Zl+Ci[13],gd=Ci[2]*Js+Ci[6]*Zl+Ci[14],Cp=Ci[3]*Js+Ci[7]*Zl+Ci[15],zf=gd+Ao,ed=Cp+Ss,pp=ch+Sl,mp=nh+_s,gp=gd+fs,sf=Cp+Xs,vd=new o((ch+ya)/ed,(nh+Ya)/ed);vd.z=zf/ed,Os.push(vd);let ep=new o(pp/sf,mp/sf);ep.z=gp/sf,co.push(ep)}Sa.push(Os),ra.push(co)}return[Sa,ra]}(Bt,Lr,xr,Re);return function(bn,Ln,Kn){let Ci=1/0;li(Kn,Ln)&&(Ci=R0(Kn,Ln[0]));for(let Sa=0;Sant.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(nt=>{this.gradients[nt.id]={}}),this.layoutVertexArray=new $c,this.layoutVertexArray2=new At,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("line",this.layers,nt);let Bt=this.layers[0].layout.get("line-sort-key"),Kt=!Bt.isConstant(),Qt=[];for(let{feature:we,id:Re,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(we,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Bt.evaluate(Zr,{},bt):void 0,bn={id:Re,properties:we.properties,type:we.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:Tr(we),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((we,Re)=>we.sortKey-Re.sortKey);for(let we of Qt){let{geometry:Re,index:rr,sourceLayerIndex:xr}=we;if(this.hasPattern){let Lr=Xe("line",this.layers,we,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(we,Re,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Re,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Bt of this.patternFeatures)this.addFeature(Bt,Bt.geometry,Bt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,tm)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Mp),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,nt,bt,Bt,Kt){let Qt=this.layers[0].layout,we=Qt.get("line-join").evaluate(D,{}),Re=Qt.get("line-cap"),rr=Qt.get("line-miter-limit"),xr=Qt.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Lr of nt)this.addLine(Lr,D,we,Re,rr,xr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,Kt,Bt)}addLine(D,nt,bt,Bt,Kt,Qt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ci=0;Ci=2&&D[Re-1].equals(D[Re-2]);)Re--;let rr=0;for(;rr0;if(Ss&&Ci>rr){let Xs=Zr.dist(ln);if(Xs>2*xr){let js=Zr.sub(Zr.sub(ln)._mult(xr/Xs)._round());this.updateDistance(ln,js),this.addCurrentVertex(js,Ln,0,0,Lr),ln=js}}let _s=ln&&bn,fs=_s?bt:we?"butt":Bt;if(_s&&fs==="round"&&(YaKt&&(fs="bevel"),fs==="bevel"&&(Ya>2&&(fs="flipbevel"),Ya100)Sa=Kn.mult(-1);else{let Xs=Ya*Ln.add(Kn).mag()/Ln.sub(Kn).mag();Sa._perp()._mult(Xs*(Sl?-1:1))}this.addCurrentVertex(Zr,Sa,0,0,Lr),this.addCurrentVertex(Zr,Sa.mult(-1),0,0,Lr)}else if(fs==="bevel"||fs==="fakeround"){let Xs=-Math.sqrt(Ya*Ya-1),js=Sl?Xs:0,Os=Sl?0:Xs;if(ln&&this.addCurrentVertex(Zr,Ln,js,Os,Lr),fs==="fakeround"){let co=Math.round(180*Ao/Math.PI/20);for(let il=1;il2*xr){let js=Zr.add(bn.sub(Zr)._mult(xr/Xs)._round());this.updateDistance(Zr,js),this.addCurrentVertex(js,Kn,0,0,Lr),Zr=js}}}}addCurrentVertex(D,nt,bt,Bt,Kt,Qt=!1){let we=nt.y*Bt-nt.x,Re=-nt.y-nt.x*Bt;this.addHalfVertex(D,nt.x+nt.y*bt,nt.y-nt.x*bt,Qt,!1,bt,Kt),this.addHalfVertex(D,we,Re,Qt,!0,-Bt,Kt),this.distance>Ep/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,nt,bt,Bt,Kt,Qt))}addHalfVertex({x:D,y:nt},bt,Bt,Kt,Qt,we,Re){let rr=.5*(this.lineClips?this.scaledDistance*(Ep-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Kt?1:0),(nt<<1)+(Qt?1:0),Math.round(63*bt)+128,Math.round(63*Bt)+128,1+(we===0?0:we<0?-1:1)|(63&rr)<<2,rr>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let xr=Re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,xr),Re.primitiveLength++),Qt?this.e2=xr:this.e1=xr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,nt){this.distance+=D.dist(nt),this.updateScaledDistance()}}let Ym,Dg;na("LineBucket",tp,{omit:["layers","patternFeatures"]});var Km={get paint(){return Dg=Dg||new $t({"line-opacity":new zs(ut.paint_line["line-opacity"]),"line-color":new zs(ut.paint_line["line-color"]),"line-translate":new ns(ut.paint_line["line-translate"]),"line-translate-anchor":new ns(ut.paint_line["line-translate-anchor"]),"line-width":new zs(ut.paint_line["line-width"]),"line-gap-width":new zs(ut.paint_line["line-gap-width"]),"line-offset":new zs(ut.paint_line["line-offset"]),"line-blur":new zs(ut.paint_line["line-blur"]),"line-dasharray":new $u(ut.paint_line["line-dasharray"]),"line-pattern":new qc(ut.paint_line["line-pattern"]),"line-gradient":new Zf(ut.paint_line["line-gradient"])})},get layout(){return Ym=Ym||new $t({"line-cap":new ns(ut.layout_line["line-cap"]),"line-join":new zs(ut.layout_line["line-join"]),"line-miter-limit":new ns(ut.layout_line["line-miter-limit"]),"line-round-limit":new ns(ut.layout_line["line-round-limit"]),"line-sort-key":new zs(ut.layout_line["line-sort-key"])})}};class dd extends zs{possiblyEvaluate(D,nt){return nt=new Rl(Math.floor(nt.zoom),{now:nt.now,fadeDuration:nt.fadeDuration,zoomHistory:nt.zoomHistory,transition:nt.transition}),super.possiblyEvaluate(D,nt)}evaluate(D,nt,bt,Bt){return nt=M({},nt,{zoom:Math.floor(nt.zoom)}),super.evaluate(D,nt,bt,Bt)}}let wm;class Fg extends ht{constructor(D){super(D,Km),this.gradientVersion=0,wm||(wm=new dd(Km.paint.properties["line-width"].specification),wm.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let nt=this.gradientExpression();this.stepInterpolant=!!function(bt){return bt._styleExpression!==void 0}(nt)&&nt._styleExpression.expression instanceof Yn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,nt){super.recalculate(D,nt),this.paint._values["line-floorwidth"]=wm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new tp(D)}queryRadius(D){let nt=D,bt=pd(Un("line-width",this,nt),Un("line-gap-width",this,nt)),Bt=Un("line-offset",this,nt);return bt/2+Math.abs(Bt)+Ui(this.paint.get("line-translate"))}queryIntersectsFeature(D,nt,bt,Bt,Kt,Qt,we){let Re=Si(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qt.angle,we),rr=we/2*pd(this.paint.get("line-width").evaluate(nt,bt),this.paint.get("line-gap-width").evaluate(nt,bt)),xr=this.paint.get("line-offset").evaluate(nt,bt);return xr&&(Bt=function(Lr,Zr){let ln=[];for(let bn=0;bn=3){for(let Kn=0;Kn0?D+2*G:G}let Xm=Te([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Pv=Te([{name:"a_projected_pos",components:3,type:"Float32"}],4);Te([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Iv=Te([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Te([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let N0=Te([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Bg=Te([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function of(G,D,nt){return G.sections.forEach(bt=>{bt.text=function(Bt,Kt,Qt){let we=Kt.layout.get("text-transform").evaluate(Qt,{});return we==="uppercase"?Bt=Bt.toLocaleUpperCase():we==="lowercase"&&(Bt=Bt.toLocaleLowerCase()),Kl.applyArabicShaping&&(Bt=Kl.applyArabicShaping(Bt)),Bt}(bt.text,D,nt)}),G}Te([{name:"triangle",components:3,type:"Uint16"}]),Te([{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"}]),Te([{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"}]),Te([{type:"Float32",name:"offsetX"}]),Te([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Te([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let md={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bc=24,Rg=Ic,zv=function(G,D,nt,bt,Bt){var Kt,Qt,we=8*Bt-bt-1,Re=(1<>1,xr=-7,Lr=Bt-1,Zr=-1,ln=G[D+Lr];for(Lr+=Zr,Kt=ln&(1<<-xr)-1,ln>>=-xr,xr+=we;xr>0;Kt=256*Kt+G[D+Lr],Lr+=Zr,xr-=8);for(Qt=Kt&(1<<-xr)-1,Kt>>=-xr,xr+=bt;xr>0;Qt=256*Qt+G[D+Lr],Lr+=Zr,xr-=8);if(Kt===0)Kt=1-rr;else{if(Kt===Re)return Qt?NaN:1/0*(ln?-1:1);Qt+=Math.pow(2,bt),Kt-=rr}return(ln?-1:1)*Qt*Math.pow(2,Kt-bt)},Tx=function(G,D,nt,bt,Bt,Kt){var Qt,we,Re,rr=8*Kt-Bt-1,xr=(1<>1,Zr=Bt===23?Math.pow(2,-24)-Math.pow(2,-77):0,ln=0,bn=1,Ln=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(we=isNaN(D)?1:0,Qt=xr):(Qt=Math.floor(Math.log(D)/Math.LN2),D*(Re=Math.pow(2,-Qt))<1&&(Qt--,Re*=2),(D+=Qt+Lr>=1?Zr/Re:Zr*Math.pow(2,1-Lr))*Re>=2&&(Qt++,Re/=2),Qt+Lr>=xr?(we=0,Qt=xr):Qt+Lr>=1?(we=(D*Re-1)*Math.pow(2,Bt),Qt+=Lr):(we=D*Math.pow(2,Lr-1)*Math.pow(2,Bt),Qt=0));Bt>=8;G[nt+ln]=255&we,ln+=bn,we/=256,Bt-=8);for(Qt=Qt<0;G[nt+ln]=255&Qt,ln+=bn,Qt/=256,rr-=8);G[nt+ln-bn]|=128*Ln};function Ic(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}Ic.Varint=0,Ic.Fixed64=1,Ic.Bytes=2,Ic.Fixed32=5;var km=4294967296,Ax=1/km,Ng=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function j0(G){return G.type===Ic.Bytes?G.readVarint()+G.pos:G.pos+1}function _b(G,D,nt){return nt?4294967296*D+(G>>>0):4294967296*(D>>>0)+(G>>>0)}function Ov(G,D,nt){var bt=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));nt.realloc(bt);for(var Bt=nt.pos-1;Bt>=G;Bt--)nt.buf[Bt+bt]=nt.buf[Bt]}function BT(G,D){for(var nt=0;nt>>8,G[nt+2]=D>>>16,G[nt+3]=D>>>24}function D3(G,D){return(G[D]|G[D+1]<<8|G[D+2]<<16)+(G[D+3]<<24)}Ic.prototype={destroy:function(){this.buf=null},readFields:function(G,D,nt){for(nt=nt||this.length;this.pos>3,Kt=this.pos;this.type=7&bt,G(Bt,D,this),this.pos===Kt&&this.skip(bt)}return D},readMessage:function(G,D){return this.readFields(G,D,this.readVarint()+this.pos)},readFixed32:function(){var G=Sx(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=D3(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=Sx(this.buf,this.pos)+Sx(this.buf,this.pos+4)*km;return this.pos+=8,G},readSFixed64:function(){var G=Sx(this.buf,this.pos)+D3(this.buf,this.pos+4)*km;return this.pos+=8,G},readFloat:function(){var G=zv(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=zv(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var D,nt,bt=this.buf;return D=127&(nt=bt[this.pos++]),nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<7,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<14,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<21,nt<128?D:function(Bt,Kt,Qt){var we,Re,rr=Qt.buf;if(we=(112&(Re=rr[Qt.pos++]))>>4,Re<128||(we|=(127&(Re=rr[Qt.pos++]))<<3,Re<128)||(we|=(127&(Re=rr[Qt.pos++]))<<10,Re<128)||(we|=(127&(Re=rr[Qt.pos++]))<<17,Re<128)||(we|=(127&(Re=rr[Qt.pos++]))<<24,Re<128)||(we|=(1&(Re=rr[Qt.pos++]))<<31,Re<128))return _b(Bt,we,Kt);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(nt=bt[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,D=this.pos;return this.pos=G,G-D>=12&&Ng?function(nt,bt,Bt){return Ng.decode(nt.subarray(bt,Bt))}(this.buf,D,G):function(nt,bt,Bt){for(var Kt="",Qt=bt;Qt239?4:xr>223?3:xr>191?2:1;if(Qt+Zr>Bt)break;Zr===1?xr<128&&(Lr=xr):Zr===2?(192&(we=nt[Qt+1]))==128&&(Lr=(31&xr)<<6|63&we)<=127&&(Lr=null):Zr===3?(Re=nt[Qt+2],(192&(we=nt[Qt+1]))==128&&(192&Re)==128&&((Lr=(15&xr)<<12|(63&we)<<6|63&Re)<=2047||Lr>=55296&&Lr<=57343)&&(Lr=null)):Zr===4&&(Re=nt[Qt+2],rr=nt[Qt+3],(192&(we=nt[Qt+1]))==128&&(192&Re)==128&&(192&rr)==128&&((Lr=(15&xr)<<18|(63&we)<<12|(63&Re)<<6|63&rr)<=65535||Lr>=1114112)&&(Lr=null)),Lr===null?(Lr=65533,Zr=1):Lr>65535&&(Lr-=65536,Kt+=String.fromCharCode(Lr>>>10&1023|55296),Lr=56320|1023&Lr),Kt+=String.fromCharCode(Lr),Qt+=Zr}return Kt}(this.buf,D,G)},readBytes:function(){var G=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,G);return this.pos=G,D},readPackedVarint:function(G,D){if(this.type!==Ic.Bytes)return G.push(this.readVarint(D));var nt=j0(this);for(G=G||[];this.pos127;);else if(D===Ic.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Ic.Fixed32)this.pos+=4;else{if(D!==Ic.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(G,D){this.writeVarint(G<<3|D)},realloc:function(G){for(var D=this.length||16;D268435455||G<0?function(D,nt){var bt,Bt;if(D>=0?(bt=D%4294967296|0,Bt=D/4294967296|0):(Bt=~(-D/4294967296),4294967295^(bt=~(-D%4294967296))?bt=bt+1|0:(bt=0,Bt=Bt+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");nt.realloc(10),function(Kt,Qt,we){we.buf[we.pos++]=127&Kt|128,Kt>>>=7,we.buf[we.pos++]=127&Kt|128,Kt>>>=7,we.buf[we.pos++]=127&Kt|128,Kt>>>=7,we.buf[we.pos++]=127&Kt|128,we.buf[we.pos]=127&(Kt>>>=7)}(bt,0,nt),function(Kt,Qt){var we=(7&Kt)<<4;Qt.buf[Qt.pos++]|=we|((Kt>>>=3)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt)))))}(Bt,nt)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var D=this.pos;this.pos=function(bt,Bt,Kt){for(var Qt,we,Re=0;Re55295&&Qt<57344){if(!we){Qt>56319||Re+1===Bt.length?(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189):we=Qt;continue}if(Qt<56320){bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,we=Qt;continue}Qt=we-55296<<10|Qt-56320|65536,we=null}else we&&(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,we=null);Qt<128?bt[Kt++]=Qt:(Qt<2048?bt[Kt++]=Qt>>6|192:(Qt<65536?bt[Kt++]=Qt>>12|224:(bt[Kt++]=Qt>>18|240,bt[Kt++]=Qt>>12&63|128),bt[Kt++]=Qt>>6&63|128),bt[Kt++]=63&Qt|128)}return Kt}(this.buf,G,this.pos);var nt=this.pos-D;nt>=128&&Ov(D,nt,this),this.pos=D-1,this.writeVarint(nt),this.pos+=nt},writeFloat:function(G){this.realloc(4),Tx(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),Tx(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var D=G.length;this.writeVarint(D),this.realloc(D);for(var nt=0;nt=128&&Ov(nt,bt,this),this.pos=nt-1,this.writeVarint(bt),this.pos+=bt},writeMessage:function(G,D,nt){this.writeTag(G,Ic.Bytes),this.writeRawMessage(D,nt)},writePackedVarint:function(G,D){D.length&&this.writeMessage(G,BT,D)},writePackedSVarint:function(G,D){D.length&&this.writeMessage(G,RT,D)},writePackedBoolean:function(G,D){D.length&&this.writeMessage(G,UT,D)},writePackedFloat:function(G,D){D.length&&this.writeMessage(G,NT,D)},writePackedDouble:function(G,D){D.length&&this.writeMessage(G,jT,D)},writePackedFixed32:function(G,D){D.length&&this.writeMessage(G,VT,D)},writePackedSFixed32:function(G,D){D.length&&this.writeMessage(G,HT,D)},writePackedFixed64:function(G,D){D.length&&this.writeMessage(G,WT,D)},writePackedSFixed64:function(G,D){D.length&&this.writeMessage(G,Mx,D)},writeBytesField:function(G,D){this.writeTag(G,Ic.Bytes),this.writeBytes(D)},writeFixed32Field:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeSFixed64(D)},writeVarintField:function(G,D){this.writeTag(G,Ic.Varint),this.writeVarint(D)},writeSVarintField:function(G,D){this.writeTag(G,Ic.Varint),this.writeSVarint(D)},writeStringField:function(G,D){this.writeTag(G,Ic.Bytes),this.writeString(D)},writeFloatField:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeFloat(D)},writeDoubleField:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeDouble(D)},writeBooleanField:function(G,D){this.writeVarintField(G,!!D)}};var bb=r(Rg);let Ex=3;function qT(G,D,nt){G===1&&nt.readMessage(F3,D)}function F3(G,D,nt){if(G===3){let{id:bt,bitmap:Bt,width:Kt,height:Qt,left:we,top:Re,advance:rr}=nt.readMessage(wb,{});D.push({id:bt,bitmap:new Vl({width:Kt+2*Ex,height:Qt+2*Ex},Bt),metrics:{width:Kt,height:Qt,left:we,top:Re,advance:rr}})}}function wb(G,D,nt){G===1?D.id=nt.readVarint():G===2?D.bitmap=nt.readBytes():G===3?D.width=nt.readVarint():G===4?D.height=nt.readVarint():G===5?D.left=nt.readSVarint():G===6?D.top=nt.readSVarint():G===7&&(D.advance=nt.readVarint())}let kb=Ex;function Cx(G){let D=0,nt=0;for(let Qt of G)D+=Qt.w*Qt.h,nt=Math.max(nt,Qt.w);G.sort((Qt,we)=>we.h-Qt.h);let bt=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),nt),h:1/0}],Bt=0,Kt=0;for(let Qt of G)for(let we=bt.length-1;we>=0;we--){let Re=bt[we];if(!(Qt.w>Re.w||Qt.h>Re.h)){if(Qt.x=Re.x,Qt.y=Re.y,Kt=Math.max(Kt,Qt.y+Qt.h),Bt=Math.max(Bt,Qt.x+Qt.w),Qt.w===Re.w&&Qt.h===Re.h){let rr=bt.pop();we=0&&bt>=D&&Px[this.text.charCodeAt(bt)];bt--)nt--;this.text=this.text.substring(D,nt),this.sectionIndex=this.sectionIndex.slice(D,nt)}substring(D,nt){let bt=new Bv;return bt.text=this.text.substring(D,nt),bt.sectionIndex=this.sectionIndex.slice(D,nt),bt.sections=this.sections,bt}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,nt)=>Math.max(D,this.sections[nt].scale),0)}addTextSection(D,nt){this.text+=D.text,this.sections.push(X1.forText(D.scale,D.fontStack||nt));let bt=this.sections.length-1;for(let Bt=0;Bt=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Lx(G,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn){let Ln=Bv.fromFeature(G,Bt),Kn;Lr===t.ah.vertical&&Ln.verticalizePunctuation();let{processBidirectionalText:Ci,processStyledBidirectionalText:Sa}=Kl;if(Ci&&Ln.sections.length===1){Kn=[];let Ya=Ci(Ln.toString(),jg(Ln,rr,Kt,D,bt,ln));for(let Ao of Ya){let Ss=new Bv;Ss.text=Ao,Ss.sections=Ln.sections;for(let Sl=0;Sl0&&k0>zd&&(zd=k0)}else{let hh=Ss[nc.fontStack],Od=hh&&hh[Zc];if(Od&&Od.rect)$v=Od.rect,Ah=Od.metrics;else{let k0=Ao[nc.fontStack],Hp=k0&&k0[Zc];if(!Hp)continue;Ah=Hp.metrics}Yh=(vd-nc.scale)*bc}rp?(Ya.verticalizable=!0,vp.push({glyph:Zc,imageName:U0,x:Zl,y:ch+Yh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:zc,metrics:Ah,rect:$v}),Zl+=V0*nc.scale+co):(vp.push({glyph:Zc,imageName:U0,x:Zl,y:ch+Yh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:zc,metrics:Ah,rect:$v}),Zl+=Ah.advance*nc.scale+co)}vp.length!==0&&(nh=Math.max(Zl-co,nh),GT(vp,0,vp.length-1,Cp,zd)),Zl=0;let Vp=fs*vd+zd;$d.lineOffset=Math.max(zd,ep),ch+=Vp,gd=Math.max(Vp,gd),++zf}var ed;let pp=ch-Fv,{horizontalAlign:mp,verticalAlign:gp}=Ab(Xs);(function(sf,vd,ep,$d,vp,zd,Vp,Th,nc){let zc=(vd-ep)*vp,Zc=0;Zc=zd!==Vp?-Th*$d-Fv:(-$d*nc+.5)*Vp;for(let Yh of sf)for(let Ah of Yh.positionedGlyphs)Ah.x+=zc,Ah.y+=Zc})(Ya.positionedLines,Cp,mp,gp,nh,gd,fs,pp,_s.length),Ya.top+=-gp*pp,Ya.bottom=Ya.top+pp,Ya.left+=-mp*nh,Ya.right=Ya.left+nh}(ya,D,nt,bt,Kn,Qt,we,Re,Lr,rr,Zr,bn),!function(Ya){for(let Ao of Ya)if(Ao.positionedGlyphs.length!==0)return!1;return!0}(ra)&&ya}let Px={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},$T={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},ZT={40:!0};function Ix(G,D,nt,bt,Bt,Kt){if(D.imageName){let Qt=bt[D.imageName];return Qt?Qt.displaySize[0]*D.scale*bc/Kt+Bt:0}{let Qt=nt[D.fontStack],we=Qt&&Qt[G];return we?we.metrics.advance*D.scale+Bt:0}}function R3(G,D,nt,bt){let Bt=Math.pow(G-D,2);return bt?G=0,rr=0;for(let Lr=0;Lrrr){let xr=Math.ceil(Kt/rr);Bt*=xr/Qt,Qt=xr}return{x1:bt,y1:Bt,x2:bt+Kt,y2:Bt+Qt}}function j3(G,D,nt,bt,Bt,Kt){let Qt=G.image,we;if(Qt.content){let Kn=Qt.content,Ci=Qt.pixelRatio||1;we=[Kn[0]/Ci,Kn[1]/Ci,Qt.displaySize[0]-Kn[2]/Ci,Qt.displaySize[1]-Kn[3]/Ci]}let Re=D.left*Kt,rr=D.right*Kt,xr,Lr,Zr,ln;nt==="width"||nt==="both"?(ln=Bt[0]+Re-bt[3],Lr=Bt[0]+rr+bt[1]):(ln=Bt[0]+(Re+rr-Qt.displaySize[0])/2,Lr=ln+Qt.displaySize[0]);let bn=D.top*Kt,Ln=D.bottom*Kt;return nt==="height"||nt==="both"?(xr=Bt[1]+bn-bt[0],Zr=Bt[1]+Ln+bt[2]):(xr=Bt[1]+(bn+Ln-Qt.displaySize[1])/2,Zr=xr+Qt.displaySize[1]),{image:Qt,top:xr,right:Lr,bottom:Zr,left:ln,collisionPadding:we}}let J1=255,em=128,Qm=J1*em;function U3(G,D){let{expression:nt}=D;if(nt.kind==="constant")return{kind:"constant",layoutSize:nt.evaluate(new Rl(G+1))};if(nt.kind==="source")return{kind:"source"};{let{zoomStops:bt,interpolationType:Bt}=nt,Kt=0;for(;KtQt.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=oi([]),this.placementViewportMatrix=oi([]);let nt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=U3(this.zoom,nt["text-size"]),this.iconSizeData=U3(this.zoom,nt["icon-size"]);let bt=this.layers[0].layout,Bt=bt.get("symbol-sort-key"),Kt=bt.get("symbol-z-order");this.canOverlap=Mb(bt,"text-overlap","text-allow-overlap")!=="never"||Mb(bt,"icon-overlap","icon-allow-overlap")!=="never"||bt.get("text-ignore-placement")||bt.get("icon-ignore-placement"),this.sortFeaturesByKey=Kt!=="viewport-y"&&!Bt.isConstant(),this.sortFeaturesByY=(Kt==="viewport-y"||Kt==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,bt.get("symbol-placement")==="point"&&(this.writingModes=bt.get("text-writing-mode").map(Qt=>t.ah[Qt])),this.stateDependentLayerIds=this.layers.filter(Qt=>Qt.isStateDependent()).map(Qt=>Qt.id),this.sourceID=D.sourceID}createArrays(){this.text=new pf(new Xl(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new pf(new Xl(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new fl,this.lineVertexArray=new vl,this.symbolInstances=new ds,this.textAnchorOffsets=new wl}calculateGlyphDependencies(D,nt,bt,Bt,Kt){for(let Qt=0;Qt0)&&(Qt.value.kind!=="constant"||Qt.value.value.length>0),xr=Re.value.kind!=="constant"||!!Re.value.value||Object.keys(Re.parameters).length>0,Lr=Kt.get("symbol-sort-key");if(this.features=[],!rr&&!xr)return;let Zr=nt.iconDependencies,ln=nt.glyphDependencies,bn=nt.availableImages,Ln=new Rl(this.zoom);for(let{feature:Kn,id:Ci,index:Sa,sourceLayerIndex:ra}of D){let ya=Bt._featureFilter.needGeometry,Ya=Ir(Kn,ya);if(!Bt._featureFilter.filter(Ln,Ya,bt))continue;let Ao,Ss;if(ya||(Ya.geometry=Tr(Kn)),rr){let _s=Bt.getValueAndResolveTokens("text-field",Ya,bt,bn),fs=Tn.factory(_s),Xs=this.hasRTLText=this.hasRTLText||XT(fs);(!Xs||Kl.getRTLTextPluginStatus()==="unavailable"||Xs&&Kl.isParsed())&&(Ao=of(fs,Bt,Ya))}if(xr){let _s=Bt.getValueAndResolveTokens("icon-image",Ya,bt,bn);Ss=_s instanceof Ni?_s:Ni.fromString(_s)}if(!Ao&&!Ss)continue;let Sl=this.sortFeaturesByKey?Lr.evaluate(Ya,{},bt):void 0;if(this.features.push({id:Ci,text:Ao,icon:Ss,index:Sa,sourceLayerIndex:ra,geometry:Ya.geometry,properties:Kn.properties,type:KT[Kn.type],sortKey:Sl}),Ss&&(Zr[Ss.name]=!0),Ao){let _s=Qt.evaluate(Ya,{},bt).join(","),fs=Kt.get("text-rotation-alignment")!=="viewport"&&Kt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(let Xs of Ao.sections)if(Xs.image)Zr[Xs.image.name]=!0;else{let js=gs(Ao.toString()),Os=Xs.fontStack||_s,co=ln[Os]=ln[Os]||{};this.calculateGlyphDependencies(Xs.text,co,fs,this.allowVerticalPlacement,js)}}}Kt.get("symbol-placement")==="line"&&(this.features=function(Kn){let Ci={},Sa={},ra=[],ya=0;function Ya(_s){ra.push(Kn[_s]),ya++}function Ao(_s,fs,Xs){let js=Sa[_s];return delete Sa[_s],Sa[fs]=js,ra[js].geometry[0].pop(),ra[js].geometry[0]=ra[js].geometry[0].concat(Xs[0]),js}function Ss(_s,fs,Xs){let js=Ci[fs];return delete Ci[fs],Ci[_s]=js,ra[js].geometry[0].shift(),ra[js].geometry[0]=Xs[0].concat(ra[js].geometry[0]),js}function Sl(_s,fs,Xs){let js=Xs?fs[0][fs[0].length-1]:fs[0][0];return`${_s}:${js.x}:${js.y}`}for(let _s=0;_s_s.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Kn,Ci)=>Kn.sortKey-Ci.sortKey)}update(D,nt,bt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,nt,this.layers,bt),this.icon.programConfigurations.updatePaintArrays(D,nt,this.layers,bt))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,nt){let bt=this.lineVertexArray.length;if(D.segment!==void 0){let Bt=D.dist(nt[D.segment+1]),Kt=D.dist(nt[D.segment]),Qt={};for(let we=D.segment+1;we=0;we--)Qt[we]={x:nt[we].x,y:nt[we].y,tileUnitDistanceFromAnchor:Kt},we>0&&(Kt+=nt[we-1].dist(nt[we]));for(let we=0;we0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,nt){let bt=D.placedSymbolArray.get(nt),Bt=bt.vertexStartIndex+4*bt.numGlyphs;for(let Kt=bt.vertexStartIndex;KtBt[we]-Bt[Re]||Kt[Re]-Kt[we]),Qt}addToSortKeyRanges(D,nt){let bt=this.sortKeyRanges[this.sortKeyRanges.length-1];bt&&bt.sortKey===nt?bt.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:nt,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let nt of this.symbolInstanceIndexes){let bt=this.symbolInstances.get(nt);this.featureSortOrder.push(bt.featureIndex),[bt.rightJustifiedTextSymbolIndex,bt.centerJustifiedTextSymbolIndex,bt.leftJustifiedTextSymbolIndex].forEach((Bt,Kt,Qt)=>{Bt>=0&&Qt.indexOf(Bt)===Kt&&this.addIndicesForPlacedSymbol(this.text,Bt)}),bt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,bt.verticalPlacedTextSymbolIndex),bt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.placedIconSymbolIndex),bt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Q1,ty;na("SymbolBucket",Ug,{omit:["layers","collisionBoxArray","features","compareText"]}),Ug.MAX_GLYPHS=65535,Ug.addDynamicAttributes=tg;var Eb={get paint(){return ty=ty||new $t({"icon-opacity":new zs(ut.paint_symbol["icon-opacity"]),"icon-color":new zs(ut.paint_symbol["icon-color"]),"icon-halo-color":new zs(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new zs(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zs(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new ns(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new ns(ut.paint_symbol["icon-translate-anchor"]),"text-opacity":new zs(ut.paint_symbol["text-opacity"]),"text-color":new zs(ut.paint_symbol["text-color"],{runtimeType:cr,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new zs(ut.paint_symbol["text-halo-color"]),"text-halo-width":new zs(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new zs(ut.paint_symbol["text-halo-blur"]),"text-translate":new ns(ut.paint_symbol["text-translate"]),"text-translate-anchor":new ns(ut.paint_symbol["text-translate-anchor"])})},get layout(){return Q1=Q1||new $t({"symbol-placement":new ns(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new ns(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ns(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zs(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ns(ut.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ns(ut.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ns(ut.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ns(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new ns(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ns(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new zs(ut.layout_symbol["icon-size"]),"icon-text-fit":new ns(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ns(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new zs(ut.layout_symbol["icon-image"]),"icon-rotate":new zs(ut.layout_symbol["icon-rotate"]),"icon-padding":new zs(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new ns(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new zs(ut.layout_symbol["icon-offset"]),"icon-anchor":new zs(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ns(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ns(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ns(ut.layout_symbol["text-rotation-alignment"]),"text-field":new zs(ut.layout_symbol["text-field"]),"text-font":new zs(ut.layout_symbol["text-font"]),"text-size":new zs(ut.layout_symbol["text-size"]),"text-max-width":new zs(ut.layout_symbol["text-max-width"]),"text-line-height":new ns(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new zs(ut.layout_symbol["text-letter-spacing"]),"text-justify":new zs(ut.layout_symbol["text-justify"]),"text-radial-offset":new zs(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ns(ut.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zs(ut.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zs(ut.layout_symbol["text-anchor"]),"text-max-angle":new ns(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new ns(ut.layout_symbol["text-writing-mode"]),"text-rotate":new zs(ut.layout_symbol["text-rotate"]),"text-padding":new ns(ut.layout_symbol["text-padding"]),"text-keep-upright":new ns(ut.layout_symbol["text-keep-upright"]),"text-transform":new zs(ut.layout_symbol["text-transform"]),"text-offset":new zs(ut.layout_symbol["text-offset"]),"text-allow-overlap":new ns(ut.layout_symbol["text-allow-overlap"]),"text-overlap":new ns(ut.layout_symbol["text-overlap"]),"text-ignore-placement":new ns(ut.layout_symbol["text-ignore-placement"]),"text-optional":new ns(ut.layout_symbol["text-optional"])})}};class Nv{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:oe,this.defaultValue=D}evaluate(D){if(D.formattedSection){let nt=this.defaultValue.property.overrides;if(nt&&nt.hasOverride(D.formattedSection))return nt.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}na("FormatSectionOverride",Nv,{omit:["defaultValue"]});class Dx extends ht{constructor(D){super(D,Eb)}recalculate(D,nt){if(super.recalculate(D,nt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let bt=this.layout.get("text-writing-mode");if(bt){let Bt=[];for(let Kt of bt)Bt.indexOf(Kt)<0&&Bt.push(Kt);this.layout._values["text-writing-mode"]=Bt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,nt,bt,Bt){let Kt=this.layout.get(D).evaluate(nt,{},bt,Bt),Qt=this._unevaluatedLayout._values[D];return Qt.isDataDriven()||qh(Qt.value)||!Kt?Kt:function(we,Re){return Re.replace(/{([^{}]+)}/g,(rr,xr)=>we&&xr in we?String(we[xr]):"")}(nt.properties,Kt)}createBucket(D){return new Ug(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of Eb.paint.overridableProperties){if(!Dx.hasPaintOverride(this.layout,D))continue;let nt=this.paint.get(D),bt=new Nv(nt),Bt=new jc(bt,nt.property.specification),Kt=null;Kt=nt.value.kind==="constant"||nt.value.kind==="source"?new Lh("source",Bt):new Mc("composite",Bt,nt.value.zoomStops),this.paint._values[D]=new Fu(nt.property,Kt,nt.parameters)}}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!(!this.layout||nt.isDataDriven()||bt.isDataDriven())&&Dx.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,nt){let bt=D.get("text-field"),Bt=Eb.paint.properties[nt],Kt=!1,Qt=we=>{for(let Re of we)if(Bt.overrides&&Bt.overrides.hasOverride(Re))return void(Kt=!0)};if(bt.value.kind==="constant"&&bt.value.value instanceof Tn)Qt(bt.value.value.sections);else if(bt.value.kind==="source"){let we=rr=>{Kt||(rr instanceof qa&&di(rr.value)===br?Qt(rr.value.sections):rr instanceof kl?Qt(rr.sections):rr.eachChild(we))},Re=bt.value;Re._styleExpression&&we(Re._styleExpression.expression)}return Kt}}let Cb;var V3={get paint(){return Cb=Cb||new $t({"background-color":new ns(ut.paint_background["background-color"]),"background-pattern":new $u(ut.paint_background["background-pattern"]),"background-opacity":new ns(ut.paint_background["background-opacity"])})}};class ey extends ht{constructor(D){super(D,V3)}}let Fx;var Lb={get paint(){return Fx=Fx||new $t({"raster-opacity":new ns(ut.paint_raster["raster-opacity"]),"raster-hue-rotate":new ns(ut.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ns(ut.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ns(ut.paint_raster["raster-brightness-max"]),"raster-saturation":new ns(ut.paint_raster["raster-saturation"]),"raster-contrast":new ns(ut.paint_raster["raster-contrast"]),"raster-resampling":new ns(ut.paint_raster["raster-resampling"]),"raster-fade-duration":new ns(ut.paint_raster["raster-fade-duration"])})}};class JT extends ht{constructor(D){super(D,Lb)}}class H3 extends ht{constructor(D){super(D,{}),this.onAdd=nt=>{this.implementation.onAdd&&this.implementation.onAdd(nt,nt.painter.context.gl)},this.onRemove=nt=>{this.implementation.onRemove&&this.implementation.onRemove(nt,nt.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class ry{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Pb=63710088e-1;class rm{constructor(D,nt){if(isNaN(D)||isNaN(nt))throw new Error(`Invalid LngLat object: (${D}, ${nt})`);if(this.lng=+D,this.lat=+nt,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new rm(P(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let nt=Math.PI/180,bt=this.lat*nt,Bt=D.lat*nt,Kt=Math.sin(bt)*Math.sin(Bt)+Math.cos(bt)*Math.cos(Bt)*Math.cos((D.lng-this.lng)*nt);return Pb*Math.acos(Math.min(Kt,1))}static convert(D){if(D instanceof rm)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new rm(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new rm(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let W3=2*Math.PI*Pb;function Bx(G){return W3*Math.cos(G*Math.PI/180)}function Rx(G){return(180+G)/360}function q3(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function w0(G,D){return G/Bx(D)}function Ib(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class ny{constructor(D,nt,bt=0){this.x=+D,this.y=+nt,this.z=+bt}static fromLngLat(D,nt=0){let bt=rm.convert(D);return new ny(Rx(bt.lng),q3(bt.lat),w0(nt,bt.lat))}toLngLat(){return new rm(360*this.x-180,Ib(this.y))}toAltitude(){return this.z*Bx(Ib(this.y))}meterInMercatorCoordinateUnits(){return 1/W3*(D=Ib(this.y),1/Math.cos(D*Math.PI/180));var D}}function $3(G,D,nt){var bt=2*Math.PI*6378137/256/Math.pow(2,nt);return[G*bt-2*Math.PI*6378137/2,D*bt-2*Math.PI*6378137/2]}class zb{constructor(D,nt,bt){if(!function(Bt,Kt,Qt){return!(Bt<0||Bt>25||Qt<0||Qt>=Math.pow(2,Bt)||Kt<0||Kt>=Math.pow(2,Bt))}(D,nt,bt))throw new Error(`x=${nt}, y=${bt}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=nt,this.y=bt,this.key=jv(0,D,D,nt,bt)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,nt,bt){let Bt=(Qt=this.y,we=this.z,Re=$3(256*(Kt=this.x),256*(Qt=Math.pow(2,we)-Qt-1),we),rr=$3(256*(Kt+1),256*(Qt+1),we),Re[0]+","+Re[1]+","+rr[0]+","+rr[1]);var Kt,Qt,we,Re,rr;let xr=function(Lr,Zr,ln){let bn,Ln="";for(let Kn=Lr;Kn>0;Kn--)bn=1<1?"@2x":"").replace(/{quadkey}/g,xr).replace(/{bbox-epsg-3857}/g,Bt)}isChildOf(D){let nt=this.z-D.z;return nt>0&&D.x===this.x>>nt&&D.y===this.y>>nt}getTilePoint(D){let nt=Math.pow(2,this.z);return new o((D.x*nt-this.x)*ru,(D.y*nt-this.y)*ru)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Z3{constructor(D,nt){this.wrap=D,this.canonical=nt,this.key=jv(D,nt.z,nt.z,nt.x,nt.y)}}class l0{constructor(D,nt,bt,Bt,Kt){if(D= z; overscaledZ = ${D}; z = ${bt}`);this.overscaledZ=D,this.wrap=nt,this.canonical=new zb(bt,+Bt,+Kt),this.key=jv(nt,D,bt,Bt,Kt)}clone(){return new l0(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let nt=this.canonical.z-D;return D>this.canonical.z?new l0(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new l0(D,this.wrap,D,this.canonical.x>>nt,this.canonical.y>>nt)}calculateScaledKey(D,nt){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let bt=this.canonical.z-D;return D>this.canonical.z?jv(this.wrap*+nt,D,this.canonical.z,this.canonical.x,this.canonical.y):jv(this.wrap*+nt,D,D,this.canonical.x>>bt,this.canonical.y>>bt)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let nt=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>nt&&D.canonical.y===this.canonical.y>>nt}children(D){if(this.overscaledZ>=D)return[new l0(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let nt=this.canonical.z+1,bt=2*this.canonical.x,Bt=2*this.canonical.y;return[new l0(nt,this.wrap,nt,bt,Bt),new l0(nt,this.wrap,nt,bt+1,Bt),new l0(nt,this.wrap,nt,bt,Bt+1),new l0(nt,this.wrap,nt,bt+1,Bt+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Lr),Lr=this.dim+1||nt<-1||nt>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(nt+1)*this.stride+(D+1)}unpack(D,nt,bt){return D*this.redFactor+nt*this.greenFactor+bt*this.blueFactor-this.baseShift}getPixels(){return new Al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,nt,bt){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Bt=nt*this.dim,Kt=nt*this.dim+this.dim,Qt=bt*this.dim,we=bt*this.dim+this.dim;switch(nt){case-1:Bt=Kt-1;break;case 1:Kt=Bt+1}switch(bt){case-1:Qt=we-1;break;case 1:we=Qt+1}let Re=-nt*this.dim,rr=-bt*this.dim;for(let xr=Qt;xr=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class Y3{constructor(D,nt,bt,Bt,Kt){this.type="Feature",this._vectorTileFeature=D,D._z=nt,D._x=bt,D._y=Bt,this.properties=D.properties,this.id=Kt}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let nt in this)nt!=="_geometry"&&nt!=="_vectorTileFeature"&&(D[nt]=this[nt]);return D}}class K3{constructor(D,nt){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Oa(ru,16,0),this.grid3D=new Oa(ru,16,0),this.featureIndexArray=new gu,this.promoteId=nt}insert(D,nt,bt,Bt,Kt,Qt){let we=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(bt,Bt,Kt);let Re=Qt?this.grid3D:this.grid;for(let rr=0;rr=0&&Lr[3]>=0&&Re.insert(we,Lr[0],Lr[1],Lr[2],Lr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new yi.VectorTile(new bb(this.rawTileData)).layers,this.sourceLayerCoder=new G3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,nt,bt,Bt){this.loadVTLayers();let Kt=D.params||{},Qt=ru/D.tileSize/D.scale,we=Cf(Kt.filter),Re=D.queryGeometry,rr=D.queryPadding*Qt,xr=Ob(Re),Lr=this.grid.query(xr.minX-rr,xr.minY-rr,xr.maxX+rr,xr.maxY+rr),Zr=Ob(D.cameraQueryGeometry),ln=this.grid3D.query(Zr.minX-rr,Zr.minY-rr,Zr.maxX+rr,Zr.maxY+rr,(Kn,Ci,Sa,ra)=>function(ya,Ya,Ao,Ss,Sl){for(let fs of ya)if(Ya<=fs.x&&Ao<=fs.y&&Ss>=fs.x&&Sl>=fs.y)return!0;let _s=[new o(Ya,Ao),new o(Ya,Sl),new o(Ss,Sl),new o(Ss,Ao)];if(ya.length>2){for(let fs of _s)if(Ei(ya,fs))return!0}for(let fs=0;fs(ra||(ra=Tr(ya)),Ya.queryIntersectsFeature(Re,ya,Ao,ra,this.z,D.transform,Qt,D.pixelPosMatrix)))}return bn}loadMatchingFeature(D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr){let Zr=this.bucketLayerIDs[nt];if(Qt&&!function(Kn,Ci){for(let Sa=0;Sa=0)return!0;return!1}(Qt,Zr))return;let ln=this.sourceLayerCoder.decode(bt),bn=this.vtLayers[ln].feature(Bt);if(Kt.needGeometry){let Kn=Ir(bn,!0);if(!Kt.filter(new Rl(this.tileID.overscaledZ),Kn,this.tileID.canonical))return}else if(!Kt.filter(new Rl(this.tileID.overscaledZ),bn))return;let Ln=this.getId(bn,ln);for(let Kn=0;Kn{let we=D instanceof Dh?D.get(Qt):null;return we&&we.evaluate?we.evaluate(nt,bt,Bt):we})}function Ob(G){let D=1/0,nt=1/0,bt=-1/0,Bt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Bt=Math.max(Bt,Kt.y);return{minX:D,minY:nt,maxX:bt,maxY:Bt}}function J3(G,D){return D-G}function Q3(G,D,nt,bt,Bt){let Kt=[];for(let Qt=0;Qt=bt&&Lr.x>=bt||(xr.x>=bt?xr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round():Lr.x>=bt&&(Lr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round()),xr.y>=Bt&&Lr.y>=Bt||(xr.y>=Bt?xr=new o(xr.x+(Bt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Bt)._round():Lr.y>=Bt&&(Lr=new o(xr.x+(Bt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Bt)._round()),Re&&xr.equals(Re[Re.length-1])||(Re=[xr],Kt.push(Re)),Re.push(Lr)))))}}return Kt}na("FeatureIndex",K3,{omit:["rawTileData","sourceLayerCoder"]});class eg extends o{constructor(D,nt,bt,Bt){super(D,nt),this.angle=bt,Bt!==void 0&&(this.segment=Bt)}clone(){return new eg(this.x,this.y,this.angle,this.segment)}}function t5(G,D,nt,bt,Bt){if(D.segment===void 0||nt===0)return!0;let Kt=D,Qt=D.segment+1,we=0;for(;we>-nt/2;){if(Qt--,Qt<0)return!1;we-=G[Qt].dist(Kt),Kt=G[Qt]}we+=G[Qt].dist(G[Qt+1]),Qt++;let Re=[],rr=0;for(;webt;)rr-=Re.shift().angleDelta;if(rr>Bt)return!1;Qt++,we+=xr.dist(Lr)}return!0}function e5(G){let D=0;for(let nt=0;ntrr){let bn=(rr-Re)/ln,Ln=Bo.number(Lr.x,Zr.x,bn),Kn=Bo.number(Lr.y,Zr.y,bn),Ci=new eg(Ln,Kn,Zr.angleTo(Lr),xr);return Ci._round(),!Qt||t5(G,Ci,we,Qt,D)?Ci:void 0}Re+=ln}}function t8(G,D,nt,bt,Bt,Kt,Qt,we,Re){let rr=r5(bt,Kt,Qt),xr=n5(bt,Bt),Lr=xr*Qt,Zr=G[0].x===0||G[0].x===Re||G[0].y===0||G[0].y===Re;return D-Lr=0&&ya=0&&Ya=0&&Zr+rr<=xr){let Ao=new eg(ya,Ya,Sa,bn);Ao._round(),bt&&!t5(G,Ao,Kt,bt,Bt)||ln.push(Ao)}}Lr+=Ci}return we||ln.length||Qt||(ln=Hg(G,Lr/2,nt,bt,Bt,Kt,Qt,!0,Re)),ln}na("Anchor",eg);let Uv=td;function i5(G,D,nt,bt){let Bt=[],Kt=G.image,Qt=Kt.pixelRatio,we=Kt.paddedRect.w-2*Uv,Re=Kt.paddedRect.h-2*Uv,rr={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},xr=Kt.stretchX||[[0,we]],Lr=Kt.stretchY||[[0,Re]],Zr=(co,il)=>co+il[1]-il[0],ln=xr.reduce(Zr,0),bn=Lr.reduce(Zr,0),Ln=we-ln,Kn=Re-bn,Ci=0,Sa=ln,ra=0,ya=bn,Ya=0,Ao=Ln,Ss=0,Sl=Kn;if(Kt.content&&bt){let co=Kt.content,il=co[2]-co[0],Js=co[3]-co[1];(Kt.textFitWidth||Kt.textFitHeight)&&(rr=N3(G)),Ci=Vv(xr,0,co[0]),ra=Vv(Lr,0,co[1]),Sa=Vv(xr,co[0],co[2]),ya=Vv(Lr,co[1],co[3]),Ya=co[0]-Ci,Ss=co[1]-ra,Ao=il-Sa,Sl=Js-ya}let _s=rr.x1,fs=rr.y1,Xs=rr.x2-_s,js=rr.y2-fs,Os=(co,il,Js,Zl)=>{let ch=Up(co.stretch-Ci,Sa,Xs,_s),nh=Nx(co.fixed-Ya,Ao,co.stretch,ln),gd=Up(il.stretch-ra,ya,js,fs),Cp=Nx(il.fixed-Ss,Sl,il.stretch,bn),zf=Up(Js.stretch-Ci,Sa,Xs,_s),ed=Nx(Js.fixed-Ya,Ao,Js.stretch,ln),pp=Up(Zl.stretch-ra,ya,js,fs),mp=Nx(Zl.fixed-Ss,Sl,Zl.stretch,bn),gp=new o(ch,gd),sf=new o(zf,gd),vd=new o(zf,pp),ep=new o(ch,pp),$d=new o(nh/Qt,Cp/Qt),vp=new o(ed/Qt,mp/Qt),zd=D*Math.PI/180;if(zd){let nc=Math.sin(zd),zc=Math.cos(zd),Zc=[zc,-nc,nc,zc];gp._matMult(Zc),sf._matMult(Zc),ep._matMult(Zc),vd._matMult(Zc)}let Vp=co.stretch+co.fixed,Th=il.stretch+il.fixed;return{tl:gp,tr:sf,bl:ep,br:vd,tex:{x:Kt.paddedRect.x+Uv+Vp,y:Kt.paddedRect.y+Uv+Th,w:Js.stretch+Js.fixed-Vp,h:Zl.stretch+Zl.fixed-Th},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:$d,pixelOffsetBR:vp,minFontScaleX:Ao/Qt/Xs,minFontScaleY:Sl/Qt/js,isSDF:nt}};if(bt&&(Kt.stretchX||Kt.stretchY)){let co=Hv(xr,Ln,ln),il=Hv(Lr,Kn,bn);for(let Js=0;Js0&&(Ln=Math.max(10,Ln),this.circleDiameter=Ln)}else{let Zr=!((Lr=Qt.image)===null||Lr===void 0)&&Lr.content&&(Qt.image.textFitWidth||Qt.image.textFitHeight)?N3(Qt):{x1:Qt.left,y1:Qt.top,x2:Qt.right,y2:Qt.bottom};Zr.y1=Zr.y1*we-Re[0],Zr.y2=Zr.y2*we+Re[2],Zr.x1=Zr.x1*we-Re[3],Zr.x2=Zr.x2*we+Re[1];let ln=Qt.collisionPadding;if(ln&&(Zr.x1-=ln[0]*we,Zr.y1-=ln[1]*we,Zr.x2+=ln[2]*we,Zr.y2+=ln[3]*we),xr){let bn=new o(Zr.x1,Zr.y1),Ln=new o(Zr.x2,Zr.y1),Kn=new o(Zr.x1,Zr.y2),Ci=new o(Zr.x2,Zr.y2),Sa=xr*Math.PI/180;bn._rotate(Sa),Ln._rotate(Sa),Kn._rotate(Sa),Ci._rotate(Sa),Zr.x1=Math.min(bn.x,Ln.x,Kn.x,Ci.x),Zr.x2=Math.max(bn.x,Ln.x,Kn.x,Ci.x),Zr.y1=Math.min(bn.y,Ln.y,Kn.y,Ci.y),Zr.y2=Math.max(bn.y,Ln.y,Kn.y,Ci.y)}D.emplaceBack(nt.x,nt.y,Zr.x1,Zr.y1,Zr.x2,Zr.y2,bt,Bt,Kt)}this.boxEndIndex=D.length}}class e8{constructor(D=[],nt=(bt,Bt)=>btBt?1:0){if(this.data=D,this.length=this.data.length,this.compare=nt,this.length>0)for(let bt=(this.length>>1)-1;bt>=0;bt--)this._down(bt)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],nt=this.data.pop();return--this.length>0&&(this.data[0]=nt,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:nt,compare:bt}=this,Bt=nt[D];for(;D>0;){let Kt=D-1>>1,Qt=nt[Kt];if(bt(Bt,Qt)>=0)break;nt[D]=Qt,D=Kt}nt[D]=Bt}_down(D){let{data:nt,compare:bt}=this,Bt=this.length>>1,Kt=nt[D];for(;D=0)break;nt[D]=nt[Qt],D=Qt}nt[D]=Kt}}function r8(G,D=1,nt=!1){let bt=1/0,Bt=1/0,Kt=-1/0,Qt=-1/0,we=G[0];for(let ln=0;lnKt)&&(Kt=bn.x),(!ln||bn.y>Qt)&&(Qt=bn.y)}let Re=Math.min(Kt-bt,Qt-Bt),rr=Re/2,xr=new e8([],n8);if(Re===0)return new o(bt,Bt);for(let ln=bt;lnLr.d||!Lr.d)&&(Lr=ln,nt&&console.log("found best %d after %d probes",Math.round(1e4*ln.d)/1e4,Zr)),ln.max-Lr.d<=D||(rr=ln.h/2,xr.push(new nm(ln.p.x-rr,ln.p.y-rr,rr,G)),xr.push(new nm(ln.p.x+rr,ln.p.y-rr,rr,G)),xr.push(new nm(ln.p.x-rr,ln.p.y+rr,rr,G)),xr.push(new nm(ln.p.x+rr,ln.p.y+rr,rr,G)),Zr+=4)}return nt&&(console.log(`num probes: ${Zr}`),console.log(`best distance: ${Lr.d}`)),Lr.p}function n8(G,D){return D.max-G.max}function nm(G,D,nt,bt){this.p=new o(G,D),this.h=nt,this.d=function(Bt,Kt){let Qt=!1,we=1/0;for(let Re=0;ReBt.y!=bn.y>Bt.y&&Bt.x<(bn.x-ln.x)*(Bt.y-ln.y)/(bn.y-ln.y)+ln.x&&(Qt=!Qt),we=Math.min(we,Na(Bt,ln,bn))}}return(Qt?1:-1)*Math.sqrt(we)}(this.p,bt),this.max=this.d+this.h*Math.SQRT2}var Id;t.aq=void 0,(Id=t.aq||(t.aq={}))[Id.center=1]="center",Id[Id.left=2]="left",Id[Id.right=3]="right",Id[Id.top=4]="top",Id[Id.bottom=5]="bottom",Id[Id["top-left"]=6]="top-left",Id[Id["top-right"]=7]="top-right",Id[Id["bottom-left"]=8]="bottom-left",Id[Id["bottom-right"]=9]="bottom-right";let rg=7,Db=Number.POSITIVE_INFINITY;function a5(G,D){return D[1]!==Db?function(nt,bt,Bt){let Kt=0,Qt=0;switch(bt=Math.abs(bt),Bt=Math.abs(Bt),nt){case"top-right":case"top-left":case"top":Qt=Bt-rg;break;case"bottom-right":case"bottom-left":case"bottom":Qt=-Bt+rg}switch(nt){case"top-right":case"bottom-right":case"right":Kt=-bt;break;case"top-left":case"bottom-left":case"left":Kt=bt}return[Kt,Qt]}(G,D[0],D[1]):function(nt,bt){let Bt=0,Kt=0;bt<0&&(bt=0);let Qt=bt/Math.SQRT2;switch(nt){case"top-right":case"top-left":Kt=Qt-rg;break;case"bottom-right":case"bottom-left":Kt=-Qt+rg;break;case"bottom":Kt=-bt+rg;break;case"top":Kt=bt-rg}switch(nt){case"top-right":case"bottom-right":Bt=-Qt;break;case"top-left":case"bottom-left":Bt=Qt;break;case"left":Bt=bt;break;case"right":Bt=-bt}return[Bt,Kt]}(G,D[0])}function o5(G,D,nt){var bt;let Bt=G.layout,Kt=(bt=Bt.get("text-variable-anchor-offset"))===null||bt===void 0?void 0:bt.evaluate(D,{},nt);if(Kt){let we=Kt.values,Re=[];for(let rr=0;rrZr*bc);xr.startsWith("top")?Lr[1]-=rg:xr.startsWith("bottom")&&(Lr[1]+=rg),Re[rr+1]=Lr}return new Mi(Re)}let Qt=Bt.get("text-variable-anchor");if(Qt){let we;we=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Bt.get("text-radial-offset").evaluate(D,{},nt)*bc,Db]:Bt.get("text-offset").evaluate(D,{},nt).map(rr=>rr*bc);let Re=[];for(let rr of Qt)Re.push(rr,a5(rr,we));return new Mi(Re)}return null}function Fb(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function i8(G,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr){let Lr=Kt.textMaxSize.evaluate(D,{});Lr===void 0&&(Lr=Qt);let Zr=G.layers[0].layout,ln=Zr.get("icon-offset").evaluate(D,{},xr),bn=l5(nt.horizontal),Ln=Qt/24,Kn=G.tilePixelRatio*Ln,Ci=G.tilePixelRatio*Lr/24,Sa=G.tilePixelRatio*we,ra=G.tilePixelRatio*Zr.get("symbol-spacing"),ya=Zr.get("text-padding")*G.tilePixelRatio,Ya=function(co,il,Js,Zl=1){let ch=co.get("icon-padding").evaluate(il,{},Js),nh=ch&&ch.values;return[nh[0]*Zl,nh[1]*Zl,nh[2]*Zl,nh[3]*Zl]}(Zr,D,xr,G.tilePixelRatio),Ao=Zr.get("text-max-angle")/180*Math.PI,Ss=Zr.get("text-rotation-alignment")!=="viewport"&&Zr.get("symbol-placement")!=="point",Sl=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",_s=Zr.get("symbol-placement"),fs=ra/2,Xs=Zr.get("icon-text-fit"),js;bt&&Xs!=="none"&&(G.allowVerticalPlacement&&nt.vertical&&(js=j3(bt,nt.vertical,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)),bn&&(bt=j3(bt,bn,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)));let Os=(co,il)=>{il.x<0||il.x>=ru||il.y<0||il.y>=ru||function(Js,Zl,ch,nh,gd,Cp,zf,ed,pp,mp,gp,sf,vd,ep,$d,vp,zd,Vp,Th,nc,zc,Zc,Yh,Ah,$v){let U0=Js.addToLineVertexArray(Zl,ch),V0,rp,hh,Od,k0=0,Hp=0,yp=0,Vb=0,Hb=-1,Wx=-1,Am={},Wb=Jn("");if(Js.allowVerticalPlacement&&nh.vertical){let Zd=ed.layout.get("text-rotate").evaluate(zc,{},Ah)+90;hh=new jx(pp,Zl,mp,gp,sf,nh.vertical,vd,ep,$d,Zd),zf&&(Od=new jx(pp,Zl,mp,gp,sf,zf,zd,Vp,$d,Zd))}if(gd){let Zd=ed.layout.get("icon-rotate").evaluate(zc,{}),Wp=ed.layout.get("icon-text-fit")!=="none",ng=i5(gd,Zd,Yh,Wp),H0=zf?i5(zf,Zd,Yh,Wp):void 0;rp=new jx(pp,Zl,mp,gp,sf,gd,zd,Vp,!1,Zd),k0=4*ng.length;let Wg=Js.iconSizeData,W0=null;Wg.kind==="source"?(W0=[em*ed.layout.get("icon-size").evaluate(zc,{})],W0[0]>Qm&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${J1}. Reduce your "icon-size".`)):Wg.kind==="composite"&&(W0=[em*Zc.compositeIconSizes[0].evaluate(zc,{},Ah),em*Zc.compositeIconSizes[1].evaluate(zc,{},Ah)],(W0[0]>Qm||W0[1]>Qm)&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${J1}. Reduce your "icon-size".`)),Js.addSymbols(Js.icon,ng,W0,nc,Th,zc,t.ah.none,Zl,U0.lineStartIndex,U0.lineLength,-1,Ah),Hb=Js.icon.placedSymbolArray.length-1,H0&&(Hp=4*H0.length,Js.addSymbols(Js.icon,H0,W0,nc,Th,zc,t.ah.vertical,Zl,U0.lineStartIndex,U0.lineLength,-1,Ah),Wx=Js.icon.placedSymbolArray.length-1)}let qb=Object.keys(nh.horizontal);for(let Zd of qb){let Wp=nh.horizontal[Zd];if(!V0){Wb=Jn(Wp.text);let H0=ed.layout.get("text-rotate").evaluate(zc,{},Ah);V0=new jx(pp,Zl,mp,gp,sf,Wp,vd,ep,$d,H0)}let ng=Wp.positionedLines.length===1;if(yp+=s5(Js,Zl,Wp,Cp,ed,$d,zc,vp,U0,nh.vertical?t.ah.horizontal:t.ah.horizontalOnly,ng?qb:[Zd],Am,Hb,Zc,Ah),ng)break}nh.vertical&&(Vb+=s5(Js,Zl,nh.vertical,Cp,ed,$d,zc,vp,U0,t.ah.vertical,["vertical"],Am,Wx,Zc,Ah));let $b=V0?V0.boxStartIndex:Js.collisionBoxArray.length,Zb=V0?V0.boxEndIndex:Js.collisionBoxArray.length,a8=hh?hh.boxStartIndex:Js.collisionBoxArray.length,o8=hh?hh.boxEndIndex:Js.collisionBoxArray.length,s8=rp?rp.boxStartIndex:Js.collisionBoxArray.length,l8=rp?rp.boxEndIndex:Js.collisionBoxArray.length,d5=Od?Od.boxStartIndex:Js.collisionBoxArray.length,Zv=Od?Od.boxEndIndex:Js.collisionBoxArray.length,rd=-1,Gv=(Zd,Wp)=>Zd&&Zd.circleDiameter?Math.max(Zd.circleDiameter,Wp):Wp;rd=Gv(V0,rd),rd=Gv(hh,rd),rd=Gv(rp,rd),rd=Gv(Od,rd);let Gb=rd>-1?1:0;Gb&&(rd*=$v/bc),Js.glyphOffsetArray.length>=Ug.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),zc.sortKey!==void 0&&Js.addToSortKeyRanges(Js.symbolInstances.length,zc.sortKey);let p5=o5(ed,zc,Ah),[u8,m5]=function(Zd,Wp){let ng=Zd.length,H0=Wp?.values;if(H0?.length>0)for(let Wg=0;Wg=0?Am.right:-1,Am.center>=0?Am.center:-1,Am.left>=0?Am.left:-1,Am.vertical||-1,Hb,Wx,Wb,$b,Zb,a8,o8,s8,l8,d5,Zv,mp,yp,Vb,k0,Hp,Gb,0,vd,rd,u8,m5)}(G,il,co,nt,bt,Bt,js,G.layers[0],G.collisionBoxArray,D.index,D.sourceLayerIndex,G.index,Kn,[ya,ya,ya,ya],Ss,Re,Sa,Ya,Sl,ln,D,Kt,rr,xr,Qt)};if(_s==="line")for(let co of Q3(D.geometry,0,0,ru,ru)){let il=t8(co,ra,Ao,nt.vertical||bn,bt,24,Ci,G.overscaling,ru);for(let Js of il)bn&&u5(G,bn.text,fs,Js)||Os(co,Js)}else if(_s==="line-center"){for(let co of D.geometry)if(co.length>1){let il=QT(co,Ao,nt.vertical||bn,bt,24,Ci);il&&Os(co,il)}}else if(D.type==="Polygon")for(let co of Jc(D.geometry,0)){let il=r8(co,16);Os(co[0],new eg(il.x,il.y,0))}else if(D.type==="LineString")for(let co of D.geometry)Os(co,new eg(co[0].x,co[0].y,0));else if(D.type==="Point")for(let co of D.geometry)for(let il of co)Os([il],new eg(il.x,il.y,0))}function s5(G,D,nt,bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn){let Ln=function(Sa,ra,ya,Ya,Ao,Ss,Sl,_s){let fs=Ya.layout.get("text-rotate").evaluate(Ss,{})*Math.PI/180,Xs=[];for(let js of ra.positionedLines)for(let Os of js.positionedGlyphs){if(!Os.rect)continue;let co=Os.rect||{},il=kb+1,Js=!0,Zl=1,ch=0,nh=(Ao||_s)&&Os.vertical,gd=Os.metrics.advance*Os.scale/2;if(_s&&ra.verticalizable&&(ch=js.lineOffset/2-(Os.imageName?-(bc-Os.metrics.width*Os.scale)/2:(Os.scale-1)*bc)),Os.imageName){let nc=Sl[Os.imageName];Js=nc.sdf,Zl=nc.pixelRatio,il=td/Zl}let Cp=Ao?[Os.x+gd,Os.y]:[0,0],zf=Ao?[0,0]:[Os.x+gd+ya[0],Os.y+ya[1]-ch],ed=[0,0];nh&&(ed=zf,zf=[0,0]);let pp=Os.metrics.isDoubleResolution?2:1,mp=(Os.metrics.left-il)*Os.scale-gd+zf[0],gp=(-Os.metrics.top-il)*Os.scale+zf[1],sf=mp+co.w/pp*Os.scale/Zl,vd=gp+co.h/pp*Os.scale/Zl,ep=new o(mp,gp),$d=new o(sf,gp),vp=new o(mp,vd),zd=new o(sf,vd);if(nh){let nc=new o(-gd,gd-Fv),zc=-Math.PI/2,Zc=bc/2-gd,Yh=new o(5-Fv-Zc,-(Os.imageName?Zc:0)),Ah=new o(...ed);ep._rotateAround(zc,nc)._add(Yh)._add(Ah),$d._rotateAround(zc,nc)._add(Yh)._add(Ah),vp._rotateAround(zc,nc)._add(Yh)._add(Ah),zd._rotateAround(zc,nc)._add(Yh)._add(Ah)}if(fs){let nc=Math.sin(fs),zc=Math.cos(fs),Zc=[zc,-nc,nc,zc];ep._matMult(Zc),$d._matMult(Zc),vp._matMult(Zc),zd._matMult(Zc)}let Vp=new o(0,0),Th=new o(0,0);Xs.push({tl:ep,tr:$d,bl:vp,br:zd,tex:co,writingMode:ra.writingMode,glyphOffset:Cp,sectionIndex:Os.sectionIndex,isSDF:Js,pixelOffsetTL:Vp,pixelOffsetBR:Th,minFontScaleX:0,minFontScaleY:0})}return Xs}(0,nt,we,Bt,Kt,Qt,bt,G.allowVerticalPlacement),Kn=G.textSizeData,Ci=null;Kn.kind==="source"?(Ci=[em*Bt.layout.get("text-size").evaluate(Qt,{})],Ci[0]>Qm&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${J1}. Reduce your "text-size".`)):Kn.kind==="composite"&&(Ci=[em*ln.compositeTextSizes[0].evaluate(Qt,{},bn),em*ln.compositeTextSizes[1].evaluate(Qt,{},bn)],(Ci[0]>Qm||Ci[1]>Qm)&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${J1}. Reduce your "text-size".`)),G.addSymbols(G.text,Ln,Ci,we,Kt,Qt,rr,D,Re.lineStartIndex,Re.lineLength,Zr,bn);for(let Sa of xr)Lr[Sa]=G.text.placedSymbolArray.length-1;return 4*Ln.length}function l5(G){for(let D in G)return G[D];return null}function u5(G,D,nt,bt){let Bt=G.compareText;if(D in Bt){let Kt=Bt[D];for(let Qt=Kt.length-1;Qt>=0;Qt--)if(bt.dist(Kt[Qt])>4;if(Bt!==1)throw new Error(`Got v${Bt} data when expected v1.`);let Kt=c5[15&bt];if(!Kt)throw new Error("Unrecognized array type.");let[Qt]=new Uint16Array(D,2,1),[we]=new Uint32Array(D,4,1);return new Bb(we,Qt,Kt,D)}constructor(D,nt=64,bt=Float64Array,Bt){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+nt,2),65535),this.ArrayType=bt,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Kt=c5.indexOf(this.ArrayType),Qt=2*D*this.ArrayType.BYTES_PER_ELEMENT,we=D*this.IndexArrayType.BYTES_PER_ELEMENT,Re=(8-we%8)%8;if(Kt<0)throw new Error(`Unexpected typed array class: ${bt}.`);Bt&&Bt instanceof ArrayBuffer?(this.data=Bt,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+we+Re,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Qt+we+Re),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+we+Re,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Kt]),new Uint16Array(this.data,2,1)[0]=nt,new Uint32Array(this.data,4,1)[0]=D)}add(D,nt){let bt=this._pos>>1;return this.ids[bt]=bt,this.coords[this._pos++]=D,this.coords[this._pos++]=nt,bt}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Rb(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,nt,bt,Bt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Kt,coords:Qt,nodeSize:we}=this,Re=[0,Kt.length-1,0],rr=[];for(;Re.length;){let xr=Re.pop()||0,Lr=Re.pop()||0,Zr=Re.pop()||0;if(Lr-Zr<=we){for(let Kn=Zr;Kn<=Lr;Kn++){let Ci=Qt[2*Kn],Sa=Qt[2*Kn+1];Ci>=D&&Ci<=bt&&Sa>=nt&&Sa<=Bt&&rr.push(Kt[Kn])}continue}let ln=Zr+Lr>>1,bn=Qt[2*ln],Ln=Qt[2*ln+1];bn>=D&&bn<=bt&&Ln>=nt&&Ln<=Bt&&rr.push(Kt[ln]),(xr===0?D<=bn:nt<=Ln)&&(Re.push(Zr),Re.push(ln-1),Re.push(1-xr)),(xr===0?bt>=bn:Bt>=Ln)&&(Re.push(ln+1),Re.push(Lr),Re.push(1-xr))}return rr}within(D,nt,bt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Bt,coords:Kt,nodeSize:Qt}=this,we=[0,Bt.length-1,0],Re=[],rr=bt*bt;for(;we.length;){let xr=we.pop()||0,Lr=we.pop()||0,Zr=we.pop()||0;if(Lr-Zr<=Qt){for(let Kn=Zr;Kn<=Lr;Kn++)qd(Kt[2*Kn],Kt[2*Kn+1],D,nt)<=rr&&Re.push(Bt[Kn]);continue}let ln=Zr+Lr>>1,bn=Kt[2*ln],Ln=Kt[2*ln+1];qd(bn,Ln,D,nt)<=rr&&Re.push(Bt[ln]),(xr===0?D-bt<=bn:nt-bt<=Ln)&&(we.push(Zr),we.push(ln-1),we.push(1-xr)),(xr===0?D+bt>=bn:nt+bt>=Ln)&&(we.push(ln+1),we.push(Lr),we.push(1-xr))}return Re}}function Rb(G,D,nt,bt,Bt,Kt){if(Bt-bt<=nt)return;let Qt=bt+Bt>>1;h5(G,D,Qt,bt,Bt,Kt),Rb(G,D,nt,bt,Qt-1,1-Kt),Rb(G,D,nt,Qt+1,Bt,1-Kt)}function h5(G,D,nt,bt,Bt,Kt){for(;Bt>bt;){if(Bt-bt>600){let rr=Bt-bt+1,xr=nt-bt+1,Lr=Math.log(rr),Zr=.5*Math.exp(2*Lr/3),ln=.5*Math.sqrt(Lr*Zr*(rr-Zr)/rr)*(xr-rr/2<0?-1:1);h5(G,D,nt,Math.max(bt,Math.floor(nt-xr*Zr/rr+ln)),Math.min(Bt,Math.floor(nt+(rr-xr)*Zr/rr+ln)),Kt)}let Qt=D[2*nt+Kt],we=bt,Re=Bt;for(Wv(G,D,bt,nt),D[2*Bt+Kt]>Qt&&Wv(G,D,bt,Bt);weQt;)Re--}D[2*bt+Kt]===Qt?Wv(G,D,bt,Re):(Re++,Wv(G,D,Re,Bt)),Re<=nt&&(bt=Re+1),nt<=Re&&(Bt=Re-1)}}function Wv(G,D,nt,bt){Ux(G,nt,bt),Ux(D,2*nt,2*bt),Ux(D,2*nt+1,2*bt+1)}function Ux(G,D,nt){let bt=G[D];G[D]=G[nt],G[nt]=bt}function qd(G,D,nt,bt){let Bt=G-nt,Kt=D-bt;return Bt*Bt+Kt*Kt}var Nb;t.bg=void 0,(Nb=t.bg||(t.bg={})).create="create",Nb.load="load",Nb.fullLoad="fullLoad";let Vx=null,qv=[],jb=1e3/60,Hx="loadTime",Ub="fullLoadTime",f5={mark(G){performance.mark(G)},frame(G){let D=G;Vx!=null&&qv.push(D-Vx),Vx=D},clearMetrics(){Vx=null,qv=[],performance.clearMeasures(Hx),performance.clearMeasures(Ub);for(let G in t.bg)performance.clearMarks(t.bg[G])},getPerformanceMetrics(){performance.measure(Hx,t.bg.create,t.bg.load),performance.measure(Ub,t.bg.create,t.bg.fullLoad);let G=performance.getEntriesByName(Hx)[0].duration,D=performance.getEntriesByName(Ub)[0].duration,nt=qv.length,bt=1/(qv.reduce((Kt,Qt)=>Kt+Qt,0)/nt/1e3),Bt=qv.filter(Kt=>Kt>jb).reduce((Kt,Qt)=>Kt+(Qt-jb)/jb,0);return{loadTime:G,fullLoadTime:D,fps:bt,percentDroppedFrames:Bt/(nt+Bt)*100,totalFrames:nt}}};t.$=class extends Dr{},t.A=ki,t.B=xa,t.C=function(G){if(j==null){let D=G.navigator?G.navigator.userAgent:null;j=!!G.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return j},t.D=ns,t.E=ft,t.F=class{constructor(G,D){this.target=G,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ry(()=>this.process()),this.subscription=function(nt,bt,Bt,Kt){return nt.addEventListener(bt,Bt,!1),{unsubscribe:()=>{nt.removeEventListener(bt,Bt,!1)}}}(this.target,"message",nt=>this.receive(nt)),this.globalScope=O(self)?G:window}registerMessageHandler(G,D){this.messageHandlers[G]=D}sendAsync(G,D){return new Promise((nt,bt)=>{let Bt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Bt]={resolve:nt,reject:bt},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Bt];let we={id:Bt,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(we)},{once:!0});let Kt=[],Qt=Object.assign(Object.assign({},G),{id:Bt,sourceMapId:this.mapId,origin:location.origin,data:ls(G.data,Kt)});this.target.postMessage(Qt,{transfer:Kt})})}receive(G){let D=G.data,nt=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[nt];let bt=this.abortControllers[nt];return delete this.abortControllers[nt],void(bt&&bt.abort())}if(O(self)||D.mustQueue)return this.tasks[nt]=D,this.taskQueue.push(nt),void this.invoker.trigger();this.processTask(nt,D)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),D=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(G,D)}processTask(G,D){return e(this,void 0,void 0,function*(){if(D.type===""){let Bt=this.resolveRejects[G];return delete this.resolveRejects[G],Bt?void(D.error?Bt.reject(ps(D.error)):Bt.resolve(ps(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let nt=ps(D.data),bt=new AbortController;this.abortControllers[G]=bt;try{let Bt=yield this.messageHandlers[D.type](D.sourceMapId,nt,bt);this.completeTask(G,null,Bt)}catch(Bt){this.completeTask(G,Bt)}})}completeTask(G,D,nt){let bt=[];delete this.abortControllers[G];let Bt={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?ls(D):null,data:ls(nt,bt)};this.target.postMessage(Bt,{transfer:bt})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=mt,t.H=function(){var G=new ki(16);return ki!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},t.I=Wd,t.J=function(G,D,nt){var bt,Bt,Kt,Qt,we,Re,rr,xr,Lr,Zr,ln,bn,Ln=nt[0],Kn=nt[1],Ci=nt[2];return D===G?(G[12]=D[0]*Ln+D[4]*Kn+D[8]*Ci+D[12],G[13]=D[1]*Ln+D[5]*Kn+D[9]*Ci+D[13],G[14]=D[2]*Ln+D[6]*Kn+D[10]*Ci+D[14],G[15]=D[3]*Ln+D[7]*Kn+D[11]*Ci+D[15]):(Bt=D[1],Kt=D[2],Qt=D[3],we=D[4],Re=D[5],rr=D[6],xr=D[7],Lr=D[8],Zr=D[9],ln=D[10],bn=D[11],G[0]=bt=D[0],G[1]=Bt,G[2]=Kt,G[3]=Qt,G[4]=we,G[5]=Re,G[6]=rr,G[7]=xr,G[8]=Lr,G[9]=Zr,G[10]=ln,G[11]=bn,G[12]=bt*Ln+we*Kn+Lr*Ci+D[12],G[13]=Bt*Ln+Re*Kn+Zr*Ci+D[13],G[14]=Kt*Ln+rr*Kn+ln*Ci+D[14],G[15]=Qt*Ln+xr*Kn+bn*Ci+D[15]),G},t.K=function(G,D,nt){var bt=nt[0],Bt=nt[1],Kt=nt[2];return G[0]=D[0]*bt,G[1]=D[1]*bt,G[2]=D[2]*bt,G[3]=D[3]*bt,G[4]=D[4]*Bt,G[5]=D[5]*Bt,G[6]=D[6]*Bt,G[7]=D[7]*Bt,G[8]=D[8]*Kt,G[9]=D[9]*Kt,G[10]=D[10]*Kt,G[11]=D[11]*Kt,G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15],G},t.L=Ca,t.M=function(G,D){let nt={};for(let bt=0;bt{let D=window.document.createElement("video");return D.muted=!0,new Promise(nt=>{D.onloadstart=()=>{nt(D)};for(let bt of G){let Bt=window.document.createElement("source");rt(bt)||(D.crossOrigin="Anonymous"),Bt.src=bt,D.appendChild(Bt)}})},t.a4=function(){return C++},t.a5=Ma,t.a6=Ug,t.a7=Cf,t.a8=Ir,t.a9=Y3,t.aA=function(G){if(G.type==="custom")return new H3(G);switch(G.type){case"background":return new ey(G);case"circle":return new ka(G);case"fill":return new vi(G);case"fill-extrusion":return new Tp(G);case"heatmap":return new dl(G);case"hillshade":return new yc(G);case"line":return new Fg(G);case"raster":return new JT(G);case"symbol":return new Dx(G)}},t.aB=p,t.aC=function(G,D){if(!G)return[{command:"setStyle",args:[D]}];let nt=[];try{if(!Pt(G.version,D.version))return[{command:"setStyle",args:[D]}];Pt(G.center,D.center)||nt.push({command:"setCenter",args:[D.center]}),Pt(G.zoom,D.zoom)||nt.push({command:"setZoom",args:[D.zoom]}),Pt(G.bearing,D.bearing)||nt.push({command:"setBearing",args:[D.bearing]}),Pt(G.pitch,D.pitch)||nt.push({command:"setPitch",args:[D.pitch]}),Pt(G.sprite,D.sprite)||nt.push({command:"setSprite",args:[D.sprite]}),Pt(G.glyphs,D.glyphs)||nt.push({command:"setGlyphs",args:[D.glyphs]}),Pt(G.transition,D.transition)||nt.push({command:"setTransition",args:[D.transition]}),Pt(G.light,D.light)||nt.push({command:"setLight",args:[D.light]}),Pt(G.terrain,D.terrain)||nt.push({command:"setTerrain",args:[D.terrain]}),Pt(G.sky,D.sky)||nt.push({command:"setSky",args:[D.sky]}),Pt(G.projection,D.projection)||nt.push({command:"setProjection",args:[D.projection]});let bt={},Bt=[];(function(Qt,we,Re,rr){let xr;for(xr in we=we||{},Qt=Qt||{})Object.prototype.hasOwnProperty.call(Qt,xr)&&(Object.prototype.hasOwnProperty.call(we,xr)||Jt(xr,Re,rr));for(xr in we)Object.prototype.hasOwnProperty.call(we,xr)&&(Object.prototype.hasOwnProperty.call(Qt,xr)?Pt(Qt[xr],we[xr])||(Qt[xr].type==="geojson"&&we[xr].type==="geojson"&&fe(Qt,we,xr)?qt(Re,{command:"setGeoJSONSourceData",args:[xr,we[xr].data]}):ge(xr,we,Re,rr)):Wt(xr,we,Re))})(G.sources,D.sources,Bt,bt);let Kt=[];G.layers&&G.layers.forEach(Qt=>{"source"in Qt&&bt[Qt.source]?nt.push({command:"removeLayer",args:[Qt.id]}):Kt.push(Qt)}),nt=nt.concat(Bt),function(Qt,we,Re){we=we||[];let rr=(Qt=Qt||[]).map(se),xr=we.map(se),Lr=Qt.reduce(Tt,{}),Zr=we.reduce(Tt,{}),ln=rr.slice(),bn=Object.create(null),Ln,Kn,Ci,Sa,ra;for(let ya=0,Ya=0;ya@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(nt,bt,Bt,Kt)=>{let Qt=Bt||Kt;return D[bt]=!Qt||Qt.toLowerCase(),""}),D["max-age"]){let nt=parseInt(D["max-age"],10);isNaN(nt)?delete D["max-age"]:D["max-age"]=nt}return D},t.ab=function(G,D){let nt=[];for(let bt in G)bt in D||nt.push(bt);return nt},t.ac=_,t.ad=function(G,D,nt){var bt=Math.sin(nt),Bt=Math.cos(nt),Kt=D[0],Qt=D[1],we=D[2],Re=D[3],rr=D[4],xr=D[5],Lr=D[6],Zr=D[7];return D!==G&&(G[8]=D[8],G[9]=D[9],G[10]=D[10],G[11]=D[11],G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15]),G[0]=Kt*Bt+rr*bt,G[1]=Qt*Bt+xr*bt,G[2]=we*Bt+Lr*bt,G[3]=Re*Bt+Zr*bt,G[4]=rr*Bt-Kt*bt,G[5]=xr*Bt-Qt*bt,G[6]=Lr*Bt-we*bt,G[7]=Zr*Bt-Re*bt,G},t.ae=function(G){var D=new ki(16);return D[0]=G[0],D[1]=G[1],D[2]=G[2],D[3]=G[3],D[4]=G[4],D[5]=G[5],D[6]=G[6],D[7]=G[7],D[8]=G[8],D[9]=G[9],D[10]=G[10],D[11]=G[11],D[12]=G[12],D[13]=G[13],D[14]=G[14],D[15]=G[15],D},t.af=Qi,t.ag=function(G,D){let nt=0,bt=0;if(G.kind==="constant")bt=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:Bt,minZoom:Kt,maxZoom:Qt}=G,we=Bt?_(Da.interpolationFactor(Bt,D,Kt,Qt),0,1):0;G.kind==="camera"?bt=Bo.number(G.minSize,G.maxSize,we):nt=we}return{uSizeT:nt,uSize:bt}},t.ai=function(G,{uSize:D,uSizeT:nt},{lowerSize:bt,upperSize:Bt}){return G.kind==="source"?bt/em:G.kind==="composite"?Bo.number(bt/em,Bt/em,nt):D},t.aj=tg,t.ak=function(G,D,nt,bt){let Bt=D.y-G.y,Kt=D.x-G.x,Qt=bt.y-nt.y,we=bt.x-nt.x,Re=Qt*Kt-we*Bt;if(Re===0)return null;let rr=(we*(G.y-nt.y)-Qt*(G.x-nt.x))/Re;return new o(G.x+rr*Kt,G.y+rr*Bt)},t.al=Q3,t.am=ni,t.an=oi,t.ao=function(G){let D=1/0,nt=1/0,bt=-1/0,Bt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Bt=Math.max(Bt,Kt.y);return[D,nt,bt,Bt]},t.ap=bc,t.ar=Mb,t.as=function(G,D){var nt=D[0],bt=D[1],Bt=D[2],Kt=D[3],Qt=D[4],we=D[5],Re=D[6],rr=D[7],xr=D[8],Lr=D[9],Zr=D[10],ln=D[11],bn=D[12],Ln=D[13],Kn=D[14],Ci=D[15],Sa=nt*we-bt*Qt,ra=nt*Re-Bt*Qt,ya=nt*rr-Kt*Qt,Ya=bt*Re-Bt*we,Ao=bt*rr-Kt*we,Ss=Bt*rr-Kt*Re,Sl=xr*Ln-Lr*bn,_s=xr*Kn-Zr*bn,fs=xr*Ci-ln*bn,Xs=Lr*Kn-Zr*Ln,js=Lr*Ci-ln*Ln,Os=Zr*Ci-ln*Kn,co=Sa*Os-ra*js+ya*Xs+Ya*fs-Ao*_s+Ss*Sl;return co?(G[0]=(we*Os-Re*js+rr*Xs)*(co=1/co),G[1]=(Bt*js-bt*Os-Kt*Xs)*co,G[2]=(Ln*Ss-Kn*Ao+Ci*Ya)*co,G[3]=(Zr*Ao-Lr*Ss-ln*Ya)*co,G[4]=(Re*fs-Qt*Os-rr*_s)*co,G[5]=(nt*Os-Bt*fs+Kt*_s)*co,G[6]=(Kn*ya-bn*Ss-Ci*ra)*co,G[7]=(xr*Ss-Zr*ya+ln*ra)*co,G[8]=(Qt*js-we*fs+rr*Sl)*co,G[9]=(bt*fs-nt*js-Kt*Sl)*co,G[10]=(bn*Ao-Ln*ya+Ci*Sa)*co,G[11]=(Lr*ya-xr*Ao-ln*Sa)*co,G[12]=(we*_s-Qt*Xs-Re*Sl)*co,G[13]=(nt*Xs-bt*_s+Bt*Sl)*co,G[14]=(Ln*ra-bn*Ya-Kn*Sa)*co,G[15]=(xr*Ya-Lr*ra+Zr*Sa)*co,G):null},t.at=Fb,t.au=Ab,t.av=Bb,t.aw=function(){let G={},D=ut.$version;for(let nt in ut.$root){let bt=ut.$root[nt];if(bt.required){let Bt=null;Bt=nt==="version"?D:bt.type==="array"?[]:{},Bt!=null&&(G[nt]=Bt)}}return G},t.ax=so,t.ay=tt,t.az=function(G){G=G.slice();let D=Object.create(null);for(let nt=0;nt25||bt<0||bt>=1||nt<0||nt>=1)},t.bc=function(G,D){return G[0]=D[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=D[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=D[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},t.bd=class extends vr{},t.be=Pb,t.bf=f5,t.bh=st,t.bi=function(G,D){lt.REGISTERED_PROTOCOLS[G]=D},t.bj=function(G){delete lt.REGISTERED_PROTOCOLS[G]},t.bk=function(G,D){let nt={};for(let Bt=0;BtOs*bc)}let _s=Qt?"center":nt.get("text-justify").evaluate(rr,{},G.canonical),fs=nt.get("symbol-placement")==="point"?nt.get("text-max-width").evaluate(rr,{},G.canonical)*bc:1/0,Xs=()=>{G.bucket.allowVerticalPlacement&&gs(ya)&&(bn.vertical=Lx(Ln,G.glyphMap,G.glyphPositions,G.imagePositions,xr,fs,Kt,Ss,"left",Ao,Ci,t.ah.vertical,!0,Zr,Lr))};if(!Qt&&Sl){let js=new Set;if(_s==="auto")for(let co=0;coe(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(D)}catch(nt){throw new Error(`Could not load image because of ${nt.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=M,t.f=G=>new Promise((D,nt)=>{let bt=new Image;bt.onload=()=>{D(bt),URL.revokeObjectURL(bt.src),bt.onload=null,window.requestAnimationFrame(()=>{bt.src=H})},bt.onerror=()=>nt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Bt=new Blob([new Uint8Array(G)],{type:"image/png"});bt.src=G.byteLength?URL.createObjectURL(Bt):H}),t.g=yt,t.h=(G,D)=>pt(M(G,{type:"json"}),D),t.i=O,t.j=K,t.k=it,t.l=(G,D)=>pt(M(G,{type:"arrayBuffer"}),D),t.m=pt,t.n=function(G){return new bb(G).readFields(qT,[])},t.o=Vl,t.p=Cx,t.q=$t,t.r=aa,t.s=rt,t.t=fa,t.u=gi,t.v=ut,t.w=w,t.x=function([G,D,nt]){return D+=90,D*=Math.PI/180,nt*=Math.PI/180,{x:G*Math.cos(D)*Math.sin(nt),y:G*Math.sin(D)*Math.sin(nt),z:G*Math.cos(nt)}},t.y=Bo,t.z=Rl}),I("worker",["./shared"],function(t){class e{constructor(Gt){this.keyCache={},Gt&&this.replace(Gt)}replace(Gt){this._layerConfigs={},this._layers={},this.update(Gt,[])}update(Gt,ne){for(let gt of Gt){this._layerConfigs[gt.id]=gt;let St=this._layers[gt.id]=t.aA(gt);St._featureFilter=t.a7(St.filter),this.keyCache[gt.id]&&delete this.keyCache[gt.id]}for(let gt of ne)delete this.keyCache[gt],delete this._layerConfigs[gt],delete this._layers[gt];this.familiesBySource={};let Ct=t.bk(Object.values(this._layerConfigs),this.keyCache);for(let gt of Ct){let St=gt.map(qe=>this._layers[qe.id]),Nt=St[0];if(Nt.visibility==="none")continue;let re=Nt.source||"",le=this.familiesBySource[re];le||(le=this.familiesBySource[re]={});let ke=Nt.sourceLayer||"_geojsonTileLayer",Ue=le[ke];Ue||(Ue=le[ke]=[]),Ue.push(St)}}}class r{constructor(Gt){let ne={},Ct=[];for(let re in Gt){let le=Gt[re],ke=ne[re]={};for(let Ue in le){let qe=le[+Ue];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;let or={x:0,y:0,w:qe.bitmap.width+2,h:qe.bitmap.height+2};Ct.push(or),ke[Ue]={rect:or,metrics:qe.metrics}}}let{w:gt,h:St}=t.p(Ct),Nt=new t.o({width:gt||1,height:St||1});for(let re in Gt){let le=Gt[re];for(let ke in le){let Ue=le[+ke];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;let qe=ne[re][ke].rect;t.o.copy(Ue.bitmap,Nt,{x:0,y:0},{x:qe.x+1,y:qe.y+1},Ue.bitmap)}}this.image=Nt,this.positions=ne}}t.bl("GlyphAtlas",r);class a{constructor(Gt){this.tileID=new t.S(Gt.tileID.overscaledZ,Gt.tileID.wrap,Gt.tileID.canonical.z,Gt.tileID.canonical.x,Gt.tileID.canonical.y),this.uid=Gt.uid,this.zoom=Gt.zoom,this.pixelRatio=Gt.pixelRatio,this.tileSize=Gt.tileSize,this.source=Gt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Gt.showCollisionBoxes,this.collectResourceTiming=!!Gt.collectResourceTiming,this.returnDependencies=!!Gt.returnDependencies,this.promoteId=Gt.promoteId,this.inFlightDependencies=[]}parse(Gt,ne,Ct,gt){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=Gt,this.collisionBoxArray=new t.a5;let St=new t.bm(Object.keys(Gt.layers).sort()),Nt=new t.bn(this.tileID,this.promoteId);Nt.bucketLayerIDs=[];let re={},le={featureIndex:Nt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ct},ke=ne.familiesBySource[this.source];for(let ui in ke){let Gn=Gt.layers[ui];if(!Gn)continue;Gn.version===1&&t.w(`Vector tile source "${this.source}" layer "${ui}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ua=St.encode(ui),Yi=[];for(let We=0;We=nr.maxzoom||nr.visibility!=="none"&&(n(We,this.zoom,Ct),(re[nr.id]=nr.createBucket({index:Nt.bucketLayerIDs.length,layers:We,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ua,sourceID:this.source})).populate(Yi,le,this.tileID.canonical),Nt.bucketLayerIDs.push(We.map(dr=>dr.id)))}}let Ue=t.aF(le.glyphDependencies,ui=>Object.keys(ui).map(Number));this.inFlightDependencies.forEach(ui=>ui?.abort()),this.inFlightDependencies=[];let qe=Promise.resolve({});if(Object.keys(Ue).length){let ui=new AbortController;this.inFlightDependencies.push(ui),qe=gt.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},ui)}let or=Object.keys(le.iconDependencies),Sr=Promise.resolve({});if(or.length){let ui=new AbortController;this.inFlightDependencies.push(ui),Sr=gt.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"icons"}},ui)}let Mr=Object.keys(le.patternDependencies),mr=Promise.resolve({});if(Mr.length){let ui=new AbortController;this.inFlightDependencies.push(ui),mr=gt.sendAsync({type:"GI",data:{icons:Mr,source:this.source,tileID:this.tileID,type:"patterns"}},ui)}let[Qr,Wn,qn]=yield Promise.all([qe,Sr,mr]),ei=new r(Qr),Di=new t.bo(Wn,qn);for(let ui in re){let Gn=re[ui];Gn instanceof t.a6?(n(Gn.layers,this.zoom,Ct),t.bp({bucket:Gn,glyphMap:Qr,glyphPositions:ei.positions,imageMap:Wn,imagePositions:Di.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Gn.hasPattern&&(Gn instanceof t.bq||Gn instanceof t.br||Gn instanceof t.bs)&&(n(Gn.layers,this.zoom,Ct),Gn.addFeatures(le,this.tileID.canonical,Di.patternPositions))}return this.status="done",{buckets:Object.values(re).filter(ui=>!ui.isEmpty()),featureIndex:Nt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ei.image,imageAtlas:Di,glyphMap:this.returnDependencies?Qr:null,iconMap:this.returnDependencies?Wn:null,glyphPositions:this.returnDependencies?ei.positions:null}})}}function n(Le,Gt,ne){let Ct=new t.z(Gt);for(let gt of Le)gt.recalculate(Ct,ne)}class o{constructor(Gt,ne,Ct){this.actor=Gt,this.layerIndex=ne,this.availableImages=Ct,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield t.l(Gt.request,ne);try{return{vectorTile:new t.bt.VectorTile(new t.bu(Ct.data)),rawData:Ct.data,cacheControl:Ct.cacheControl,expires:Ct.expires}}catch(gt){let St=new Uint8Array(Ct.data),Nt=`Unable to parse the tile at ${Gt.request.url}, `;throw Nt+=St[0]===31&&St[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${gt.message}`,new Error(Nt)}})}loadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid,Ct=!!(Gt&&Gt.request&&Gt.request.collectResourceTiming)&&new t.bv(Gt.request),gt=new a(Gt);this.loading[ne]=gt;let St=new AbortController;gt.abort=St;try{let Nt=yield this.loadVectorTile(Gt,St);if(delete this.loading[ne],!Nt)return null;let re=Nt.rawData,le={};Nt.expires&&(le.expires=Nt.expires),Nt.cacheControl&&(le.cacheControl=Nt.cacheControl);let ke={};if(Ct){let qe=Ct.finish();qe&&(ke.resourceTiming=JSON.parse(JSON.stringify(qe)))}gt.vectorTile=Nt.vectorTile;let Ue=gt.parse(Nt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ne]=gt,this.fetching[ne]={rawTileData:re,cacheControl:le,resourceTiming:ke};try{let qe=yield Ue;return t.e({rawTileData:re.slice(0)},qe,le,ke)}finally{delete this.fetching[ne]}}catch(Nt){throw delete this.loading[ne],gt.status="done",this.loaded[ne]=gt,Nt}})}reloadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid;if(!this.loaded||!this.loaded[ne])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ct=this.loaded[ne];if(Ct.showCollisionBoxes=Gt.showCollisionBoxes,Ct.status==="parsing"){let gt=yield Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor),St;if(this.fetching[ne]){let{rawTileData:Nt,cacheControl:re,resourceTiming:le}=this.fetching[ne];delete this.fetching[ne],St=t.e({rawTileData:Nt.slice(0)},gt,re,le)}else St=gt;return St}if(Ct.status==="done"&&Ct.vectorTile)return Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Gt){return t._(this,void 0,void 0,function*(){let ne=this.loading,Ct=Gt.uid;ne&&ne[Ct]&&ne[Ct].abort&&(ne[Ct].abort.abort(),delete ne[Ct])})}removeTile(Gt){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Gt.uid]&&delete this.loaded[Gt.uid]})}}class i{constructor(){this.loaded={}}loadTile(Gt){return t._(this,void 0,void 0,function*(){let{uid:ne,encoding:Ct,rawImageData:gt,redFactor:St,greenFactor:Nt,blueFactor:re,baseShift:le}=Gt,ke=gt.width+2,Ue=gt.height+2,qe=t.b(gt)?new t.R({width:ke,height:Ue},yield t.bw(gt,-1,-1,ke,Ue)):gt,or=new t.bx(ne,qe,Ct,St,Nt,re,le);return this.loaded=this.loaded||{},this.loaded[ne]=or,or})}removeTile(Gt){let ne=this.loaded,Ct=Gt.uid;ne&&ne[Ct]&&delete ne[Ct]}}function l(Le,Gt){if(Le.length!==0){f(Le[0],Gt);for(var ne=1;ne=Math.abs(re)?ne-le+re:re-le+ne,ne=le}ne+Ct>=0!=!!Gt&&Le.reverse()}var x=t.by(function Le(Gt,ne){var Ct,gt=Gt&&Gt.type;if(gt==="FeatureCollection")for(Ct=0;Ct>31}function O(Le,Gt){for(var ne=Le.loadGeometry(),Ct=Le.type,gt=0,St=0,Nt=ne.length,re=0;reLe},F=Math.fround||(U=new Float32Array(1),Le=>(U[0]=+Le,U[0]));var U;let W=3,q=5,J=6;class lt{constructor(Gt){this.options=Object.assign(Object.create(H),Gt),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Gt){let{log:ne,minZoom:Ct,maxZoom:gt}=this.options;ne&&console.time("total time");let St=`prepare ${Gt.length} points`;ne&&console.time(St),this.points=Gt;let Nt=[];for(let le=0;le=Ct;le--){let ke=+Date.now();re=this.trees[le]=this._createTree(this._cluster(re,le)),ne&&console.log("z%d: %d clusters in %dms",le,re.numItems,+Date.now()-ke)}return ne&&console.timeEnd("total time"),this}getClusters(Gt,ne){let Ct=((Gt[0]+180)%360+360)%360-180,gt=Math.max(-90,Math.min(90,Gt[1])),St=Gt[2]===180?180:((Gt[2]+180)%360+360)%360-180,Nt=Math.max(-90,Math.min(90,Gt[3]));if(Gt[2]-Gt[0]>=360)Ct=-180,St=180;else if(Ct>St){let qe=this.getClusters([Ct,gt,180,Nt],ne),or=this.getClusters([-180,gt,St,Nt],ne);return qe.concat(or)}let re=this.trees[this._limitZoom(ne)],le=re.range(st(Ct),tt(Nt),st(St),tt(gt)),ke=re.data,Ue=[];for(let qe of le){let or=this.stride*qe;Ue.push(ke[or+q]>1?yt(ke,or,this.clusterProps):this.points[ke[or+W]])}return Ue}getChildren(Gt){let ne=this._getOriginId(Gt),Ct=this._getOriginZoom(Gt),gt="No cluster with the specified id.",St=this.trees[Ct];if(!St)throw new Error(gt);let Nt=St.data;if(ne*this.stride>=Nt.length)throw new Error(gt);let re=this.options.radius/(this.options.extent*Math.pow(2,Ct-1)),le=St.within(Nt[ne*this.stride],Nt[ne*this.stride+1],re),ke=[];for(let Ue of le){let qe=Ue*this.stride;Nt[qe+4]===Gt&&ke.push(Nt[qe+q]>1?yt(Nt,qe,this.clusterProps):this.points[Nt[qe+W]])}if(ke.length===0)throw new Error(gt);return ke}getLeaves(Gt,ne,Ct){let gt=[];return this._appendLeaves(gt,Gt,ne=ne||10,Ct=Ct||0,0),gt}getTile(Gt,ne,Ct){let gt=this.trees[this._limitZoom(Gt)],St=Math.pow(2,Gt),{extent:Nt,radius:re}=this.options,le=re/Nt,ke=(Ct-le)/St,Ue=(Ct+1+le)/St,qe={features:[]};return this._addTileFeatures(gt.range((ne-le)/St,ke,(ne+1+le)/St,Ue),gt.data,ne,Ct,St,qe),ne===0&&this._addTileFeatures(gt.range(1-le/St,ke,1,Ue),gt.data,St,Ct,St,qe),ne===St-1&&this._addTileFeatures(gt.range(0,ke,le/St,Ue),gt.data,-1,Ct,St,qe),qe.features.length?qe:null}getClusterExpansionZoom(Gt){let ne=this._getOriginZoom(Gt)-1;for(;ne<=this.options.maxZoom;){let Ct=this.getChildren(Gt);if(ne++,Ct.length!==1)break;Gt=Ct[0].properties.cluster_id}return ne}_appendLeaves(Gt,ne,Ct,gt,St){let Nt=this.getChildren(ne);for(let re of Nt){let le=re.properties;if(le&&le.cluster?St+le.point_count<=gt?St+=le.point_count:St=this._appendLeaves(Gt,le.cluster_id,Ct,gt,St):St1,Ue,qe,or;if(ke)Ue=mt(ne,le,this.clusterProps),qe=ne[le],or=ne[le+1];else{let mr=this.points[ne[le+W]];Ue=mr.properties;let[Qr,Wn]=mr.geometry.coordinates;qe=st(Qr),or=tt(Wn)}let Sr={type:1,geometry:[[Math.round(this.options.extent*(qe*St-Ct)),Math.round(this.options.extent*(or*St-gt))]],tags:Ue},Mr;Mr=ke||this.options.generateId?ne[le+W]:this.points[ne[le+W]].id,Mr!==void 0&&(Sr.id=Mr),Nt.features.push(Sr)}}_limitZoom(Gt){return Math.max(this.options.minZoom,Math.min(Math.floor(+Gt),this.options.maxZoom+1))}_cluster(Gt,ne){let{radius:Ct,extent:gt,reduce:St,minPoints:Nt}=this.options,re=Ct/(gt*Math.pow(2,ne)),le=Gt.data,ke=[],Ue=this.stride;for(let qe=0;qene&&(Qr+=le[qn+q])}if(Qr>mr&&Qr>=Nt){let Wn,qn=or*mr,ei=Sr*mr,Di=-1,ui=((qe/Ue|0)<<5)+(ne+1)+this.points.length;for(let Gn of Mr){let ua=Gn*Ue;if(le[ua+2]<=ne)continue;le[ua+2]=ne;let Yi=le[ua+q];qn+=le[ua]*Yi,ei+=le[ua+1]*Yi,le[ua+4]=ui,St&&(Wn||(Wn=this._map(le,qe,!0),Di=this.clusterProps.length,this.clusterProps.push(Wn)),St(Wn,this._map(le,ua)))}le[qe+4]=ui,ke.push(qn/Qr,ei/Qr,1/0,ui,-1,Qr),St&&ke.push(Di)}else{for(let Wn=0;Wn1)for(let Wn of Mr){let qn=Wn*Ue;if(!(le[qn+2]<=ne)){le[qn+2]=ne;for(let ei=0;ei>5}_getOriginZoom(Gt){return(Gt-this.points.length)%32}_map(Gt,ne,Ct){if(Gt[ne+q]>1){let Nt=this.clusterProps[Gt[ne+J]];return Ct?Object.assign({},Nt):Nt}let gt=this.points[Gt[ne+W]].properties,St=this.options.map(gt);return Ct&&St===gt?Object.assign({},St):St}}function yt(Le,Gt,ne){return{type:"Feature",id:Le[Gt+W],properties:mt(Le,Gt,ne),geometry:{type:"Point",coordinates:[(Ct=Le[Gt],360*(Ct-.5)),pt(Le[Gt+1])]}};var Ct}function mt(Le,Gt,ne){let Ct=Le[Gt+q],gt=Ct>=1e4?`${Math.round(Ct/1e3)}k`:Ct>=1e3?Math.round(Ct/100)/10+"k":Ct,St=Le[Gt+J],Nt=St===-1?{}:Object.assign({},ne[St]);return Object.assign(Nt,{cluster:!0,cluster_id:Le[Gt+W],point_count:Ct,point_count_abbreviated:gt})}function st(Le){return Le/360+.5}function tt(Le){let Gt=Math.sin(Le*Math.PI/180),ne=.5-.25*Math.log((1+Gt)/(1-Gt))/Math.PI;return ne<0?0:ne>1?1:ne}function pt(Le){let Gt=(180-360*Le)*Math.PI/180;return 360*Math.atan(Math.exp(Gt))/Math.PI-90}function rt(Le,Gt,ne,Ct){let gt=Ct,St=Gt+(ne-Gt>>1),Nt,re=ne-Gt,le=Le[Gt],ke=Le[Gt+1],Ue=Le[ne],qe=Le[ne+1];for(let or=Gt+3;orgt)Nt=or,gt=Sr;else if(Sr===gt){let Mr=Math.abs(or-St);MrCt&&(Nt-Gt>3&&rt(Le,Gt,Nt,Ct),Le[Nt+2]=gt,ne-Nt>3&&rt(Le,Nt,ne,Ct))}function at(Le,Gt,ne,Ct,gt,St){let Nt=gt-ne,re=St-Ct;if(Nt!==0||re!==0){let le=((Le-ne)*Nt+(Gt-Ct)*re)/(Nt*Nt+re*re);le>1?(ne=gt,Ct=St):le>0&&(ne+=Nt*le,Ct+=re*le)}return Nt=Le-ne,re=Gt-Ct,Nt*Nt+re*re}function vt(Le,Gt,ne,Ct){let gt={id:Le??null,type:Gt,geometry:ne,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Gt==="Point"||Gt==="MultiPoint"||Gt==="LineString")it(gt,ne);else if(Gt==="Polygon")it(gt,ne[0]);else if(Gt==="MultiLineString")for(let St of ne)it(gt,St);else if(Gt==="MultiPolygon")for(let St of ne)it(gt,St[0]);return gt}function it(Le,Gt){for(let ne=0;ne0&&(Nt+=Ct?(gt*Ue-ke*St)/2:Math.sqrt(Math.pow(ke-gt,2)+Math.pow(Ue-St,2))),gt=ke,St=Ue}let re=Gt.length-3;Gt[2]=1,rt(Gt,0,re,ne),Gt[re+2]=1,Gt.size=Math.abs(Nt),Gt.start=0,Gt.end=Gt.size}function kt(Le,Gt,ne,Ct){for(let gt=0;gt1?1:ne}function qt(Le,Gt,ne,Ct,gt,St,Nt,re){if(Ct/=Gt,St>=(ne/=Gt)&&Nt=Ct)return null;let le=[];for(let ke of Le){let Ue=ke.geometry,qe=ke.type,or=gt===0?ke.minX:ke.minY,Sr=gt===0?ke.maxX:ke.maxY;if(or>=ne&&Sr=Ct)continue;let Mr=[];if(qe==="Point"||qe==="MultiPoint")Wt(Ue,Mr,ne,Ct,gt);else if(qe==="LineString")Jt(Ue,Mr,ne,Ct,gt,!1,re.lineMetrics);else if(qe==="MultiLineString")fe(Ue,Mr,ne,Ct,gt,!1);else if(qe==="Polygon")fe(Ue,Mr,ne,Ct,gt,!0);else if(qe==="MultiPolygon")for(let mr of Ue){let Qr=[];fe(mr,Qr,ne,Ct,gt,!0),Qr.length&&Mr.push(Qr)}if(Mr.length){if(re.lineMetrics&&qe==="LineString"){for(let mr of Mr)le.push(vt(ke.id,qe,mr,ke.tags));continue}qe!=="LineString"&&qe!=="MultiLineString"||(Mr.length===1?(qe="LineString",Mr=Mr[0]):qe="MultiLineString"),qe!=="Point"&&qe!=="MultiPoint"||(qe=Mr.length===3?"Point":"MultiPoint"),le.push(vt(ke.id,qe,Mr,ke.tags))}}return le.length?le:null}function Wt(Le,Gt,ne,Ct,gt){for(let St=0;St=ne&&Nt<=Ct&&pe(Gt,Le[St],Le[St+1],Le[St+2])}}function Jt(Le,Gt,ne,Ct,gt,St,Nt){let re=ge(Le),le=gt===0?se:Tt,ke,Ue,qe=Le.start;for(let Qr=0;Qrne&&(Ue=le(re,Wn,qn,Di,ui,ne),Nt&&(re.start=qe+ke*Ue)):Gn>Ct?ua=ne&&(Ue=le(re,Wn,qn,Di,ui,ne),Yi=!0),ua>Ct&&Gn<=Ct&&(Ue=le(re,Wn,qn,Di,ui,Ct),Yi=!0),!St&&Yi&&(Nt&&(re.end=qe+ke*Ue),Gt.push(re),re=ge(Le)),Nt&&(qe+=ke)}let or=Le.length-3,Sr=Le[or],Mr=Le[or+1],mr=gt===0?Sr:Mr;mr>=ne&&mr<=Ct&&pe(re,Sr,Mr,Le[or+2]),or=re.length-3,St&&or>=3&&(re[or]!==re[0]||re[or+1]!==re[1])&&pe(re,re[0],re[1],re[2]),re.length&&Gt.push(re)}function ge(Le){let Gt=[];return Gt.size=Le.size,Gt.start=Le.start,Gt.end=Le.end,Gt}function fe(Le,Gt,ne,Ct,gt,St){for(let Nt of Le)Jt(Nt,Gt,ne,Ct,gt,St,!1)}function pe(Le,Gt,ne,Ct){Le.push(Gt,ne,Ct)}function se(Le,Gt,ne,Ct,gt,St){let Nt=(St-Gt)/(Ct-Gt);return pe(Le,St,ne+(gt-ne)*Nt,1),Nt}function Tt(Le,Gt,ne,Ct,gt,St){let Nt=(St-ne)/(gt-ne);return pe(Le,Gt+(Ct-Gt)*Nt,St,1),Nt}function Lt(Le,Gt){let ne=[];for(let Ct=0;Ct0&&Gt.size<(gt?Nt:Ct))return void(ne.numPoints+=Gt.length/3);let re=[];for(let le=0;leNt)&&(ne.numSimplified++,re.push(Gt[le],Gt[le+1])),ne.numPoints++;gt&&function(le,ke){let Ue=0;for(let qe=0,or=le.length,Sr=or-2;qe0===ke)for(let qe=0,or=le.length;qe24)throw new Error("maxZoom should be in the 0-24 range");if(ne.promoteId&&ne.generateId)throw new Error("promoteId and generateId cannot be used together.");let gt=function(St,Nt){let re=[];if(St.type==="FeatureCollection")for(let le=0;le1&&console.time("creation"),Sr=this.tiles[or]=oe(Gt,ne,Ct,gt,ke),this.tileCoords.push({z:ne,x:Ct,y:gt}),Ue)){Ue>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ne,Ct,gt,Sr.numFeatures,Sr.numPoints,Sr.numSimplified),console.timeEnd("creation"));let Yi=`z${ne}`;this.stats[Yi]=(this.stats[Yi]||0)+1,this.total++}if(Sr.source=Gt,St==null){if(ne===ke.indexMaxZoom||Sr.numPoints<=ke.indexMaxPoints)continue}else{if(ne===ke.maxZoom||ne===St)continue;if(St!=null){let Yi=St-ne;if(Ct!==Nt>>Yi||gt!==re>>Yi)continue}}if(Sr.source=null,Gt.length===0)continue;Ue>1&&console.time("clipping");let Mr=.5*ke.buffer/ke.extent,mr=.5-Mr,Qr=.5+Mr,Wn=1+Mr,qn=null,ei=null,Di=null,ui=null,Gn=qt(Gt,qe,Ct-Mr,Ct+Qr,0,Sr.minX,Sr.maxX,ke),ua=qt(Gt,qe,Ct+mr,Ct+Wn,0,Sr.minX,Sr.maxX,ke);Gt=null,Gn&&(qn=qt(Gn,qe,gt-Mr,gt+Qr,1,Sr.minY,Sr.maxY,ke),ei=qt(Gn,qe,gt+mr,gt+Wn,1,Sr.minY,Sr.maxY,ke),Gn=null),ua&&(Di=qt(ua,qe,gt-Mr,gt+Qr,1,Sr.minY,Sr.maxY,ke),ui=qt(ua,qe,gt+mr,gt+Wn,1,Sr.minY,Sr.maxY,ke),ua=null),Ue>1&&console.timeEnd("clipping"),le.push(qn||[],ne+1,2*Ct,2*gt),le.push(ei||[],ne+1,2*Ct,2*gt+1),le.push(Di||[],ne+1,2*Ct+1,2*gt),le.push(ui||[],ne+1,2*Ct+1,2*gt+1)}}getTile(Gt,ne,Ct){Gt=+Gt,ne=+ne,Ct=+Ct;let gt=this.options,{extent:St,debug:Nt}=gt;if(Gt<0||Gt>24)return null;let re=1<1&&console.log("drilling down to z%d-%d-%d",Gt,ne,Ct);let ke,Ue=Gt,qe=ne,or=Ct;for(;!ke&&Ue>0;)Ue--,qe>>=1,or>>=1,ke=this.tiles[ur(Ue,qe,or)];return ke&&ke.source?(Nt>1&&(console.log("found parent tile z%d-%d-%d",Ue,qe,or),console.time("drilling down")),this.splitTile(ke.source,Ue,qe,or,Gt,ne,Ct),Nt>1&&console.timeEnd("drilling down"),this.tiles[le]?ee(this.tiles[le],St):null):null}}function ur(Le,Gt,ne){return 32*((1<{qe.properties=Sr;let Mr={};for(let mr of or)Mr[mr]=le[mr].evaluate(Ue,qe);return Mr},Nt.reduce=(Sr,Mr)=>{qe.properties=Mr;for(let mr of or)Ue.accumulated=Sr[mr],Sr[mr]=ke[mr].evaluate(Ue,qe)},Nt}(Gt)).load((yield this._pendingData).features):(gt=yield this._pendingData,new cr(gt,Gt.geojsonVtOptions)),this.loaded={};let St={};if(Ct){let Nt=Ct.finish();Nt&&(St.resourceTiming={},St.resourceTiming[Gt.source]=JSON.parse(JSON.stringify(Nt)))}return St}catch(St){if(delete this._pendingRequest,t.bB(St))return{abandoned:!0};throw St}var gt})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Gt){let ne=this.loaded;return ne&&ne[Gt.uid]?super.reloadTile(Gt):this.loadTile(Gt)}loadAndProcessGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield this.loadGeoJSON(Gt,ne);if(delete this._pendingRequest,typeof Ct!="object")throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(x(Ct,!0),Gt.filter){let gt=t.bC(Gt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(gt.result==="error")throw new Error(gt.value.map(St=>`${St.key}: ${St.message}`).join(", "));Ct={type:"FeatureCollection",features:Ct.features.filter(St=>gt.value.evaluate({zoom:0},St))}}return Ct})}loadGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let{promoteId:Ct}=Gt;if(Gt.request){let gt=yield t.h(Gt.request,ne);return this._dataUpdateable=qr(gt.data,Ct)?br(gt.data,Ct):void 0,gt.data}if(typeof Gt.data=="string")try{let gt=JSON.parse(Gt.data);return this._dataUpdateable=qr(gt,Ct)?br(gt,Ct):void 0,gt}catch{throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`)}if(!Gt.dataDiff)throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Gt.source}`);return function(gt,St,Nt){var re,le,ke,Ue;if(St.removeAll&>.clear(),St.remove)for(let qe of St.remove)gt.delete(qe);if(St.add)for(let qe of St.add){let or=jr(qe,Nt);or!=null&>.set(or,qe)}if(St.update)for(let qe of St.update){let or=gt.get(qe.id);if(or==null)continue;let Sr=!qe.removeAllProperties&&(((re=qe.removeProperties)===null||re===void 0?void 0:re.length)>0||((le=qe.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((qe.newGeometry||qe.removeAllProperties||Sr)&&(or=Object.assign({},or),gt.set(qe.id,or),Sr&&(or.properties=Object.assign({},or.properties))),qe.newGeometry&&(or.geometry=qe.newGeometry),qe.removeAllProperties)or.properties={};else if(((ke=qe.removeProperties)===null||ke===void 0?void 0:ke.length)>0)for(let Mr of qe.removeProperties)Object.prototype.hasOwnProperty.call(or.properties,Mr)&&delete or.properties[Mr];if(((Ue=qe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(let{key:Mr,value:mr}of qe.addOrUpdateProperties)or.properties[Mr]=mr}}(this._dataUpdateable,Gt.dataDiff,Ct),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Gt){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Gt){return this._geoJSONIndex.getClusterExpansionZoom(Gt.clusterId)}getClusterChildren(Gt){return this._geoJSONIndex.getChildren(Gt.clusterId)}getClusterLeaves(Gt){return this._geoJSONIndex.getLeaves(Gt.clusterId,Gt.limit,Gt.offset)}}class nn{constructor(Gt){this.self=Gt,this.actor=new t.F(Gt),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ne,Ct)=>{if(this.externalWorkerSourceTypes[ne])throw new Error(`Worker source with name "${ne}" already registered.`);this.externalWorkerSourceTypes[ne]=Ct},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ne=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ne)},this.actor.registerMessageHandler("LDT",(ne,Ct)=>this._getDEMWorkerSource(ne,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RDT",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ne,Ct.source).removeTile(Ct)})),this.actor.registerMessageHandler("GCEZ",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterExpansionZoom(Ct)})),this.actor.registerMessageHandler("GCC",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterChildren(Ct)})),this.actor.registerMessageHandler("GCL",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterLeaves(Ct)})),this.actor.registerMessageHandler("LD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadData(Ct)),this.actor.registerMessageHandler("GD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).getData()),this.actor.registerMessageHandler("LT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).reloadTile(Ct)),this.actor.registerMessageHandler("AT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).abortTile(Ct)),this.actor.registerMessageHandler("RMT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).removeTile(Ct)),this.actor.registerMessageHandler("RS",(ne,Ct)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ne]||!this.workerSources[ne][Ct.type]||!this.workerSources[ne][Ct.type][Ct.source])return;let gt=this.workerSources[ne][Ct.type][Ct.source];delete this.workerSources[ne][Ct.type][Ct.source],gt.removeSource!==void 0&>.removeSource(Ct)})),this.actor.registerMessageHandler("RM",ne=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ne],delete this.availableImages[ne],delete this.workerSources[ne],delete this.demWorkerSources[ne]})),this.actor.registerMessageHandler("SR",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.referrer=Ct})),this.actor.registerMessageHandler("SRPS",(ne,Ct)=>this._syncRTLPluginState(ne,Ct)),this.actor.registerMessageHandler("IS",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.self.importScripts(Ct)})),this.actor.registerMessageHandler("SI",(ne,Ct)=>this._setImages(ne,Ct)),this.actor.registerMessageHandler("UL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).update(Ct.layers,Ct.removedIds)})),this.actor.registerMessageHandler("SL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).replace(Ct)}))}_setImages(Gt,ne){return t._(this,void 0,void 0,function*(){this.availableImages[Gt]=ne;for(let Ct in this.workerSources[Gt]){let gt=this.workerSources[Gt][Ct];for(let St in gt)gt[St].availableImages=ne}})}_syncRTLPluginState(Gt,ne){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ne.pluginStatus!=="loading")return t.bD.setState(ne),ne;let Ct=ne.pluginURL;if(this.self.importScripts(Ct),t.bD.isParsed()){let gt={pluginStatus:"loaded",pluginURL:Ct};return t.bD.setState(gt),gt}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ct}`)})}_getAvailableImages(Gt){let ne=this.availableImages[Gt];return ne||(ne=[]),ne}_getLayerIndex(Gt){let ne=this.layerIndexes[Gt];return ne||(ne=this.layerIndexes[Gt]=new e),ne}_getWorkerSource(Gt,ne,Ct){if(this.workerSources[Gt]||(this.workerSources[Gt]={}),this.workerSources[Gt][ne]||(this.workerSources[Gt][ne]={}),!this.workerSources[Gt][ne][Ct]){let gt={sendAsync:(St,Nt)=>(St.targetMapId=Gt,this.actor.sendAsync(St,Nt))};switch(ne){case"vector":this.workerSources[Gt][ne][Ct]=new o(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;case"geojson":this.workerSources[Gt][ne][Ct]=new Xr(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;default:this.workerSources[Gt][ne][Ct]=new this.externalWorkerSourceTypes[ne](gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt))}}return this.workerSources[Gt][ne][Ct]}_getDEMWorkerSource(Gt,ne){return this.demWorkerSources[Gt]||(this.demWorkerSources[Gt]={}),this.demWorkerSources[Gt][ne]||(this.demWorkerSources[Gt][ne]=new i),this.demWorkerSources[Gt][ne]}}return t.i(self)&&(self.worker=new nn(self)),nn}),I("index",["exports","./shared"],function(t,e){var r="4.7.1";let a,n,o={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:$t=>new Promise((z,ht)=>{let Et=requestAnimationFrame(z);$t.signal.addEventListener("abort",()=>{cancelAnimationFrame(Et),ht(e.c())})}),getImageData($t,z=0){return this.getImageCanvasContext($t).getImageData(-z,-z,$t.width+2*z,$t.height+2*z)},getImageCanvasContext($t){let z=window.document.createElement("canvas"),ht=z.getContext("2d",{willReadFrequently:!0});if(!ht)throw new Error("failed to create canvas 2d context");return z.width=$t.width,z.height=$t.height,ht.drawImage($t,0,0,$t.width,$t.height),ht},resolveURL:$t=>(a||(a=document.createElement("a")),a.href=$t,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(n==null&&(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)}};class i{static testProp(z){if(!i.docStyle)return z[0];for(let ht=0;ht{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(z){let ht=z.getBoundingClientRect();return{x:ht.width/z.offsetWidth||1,y:ht.height/z.offsetHeight||1,boundingClientRect:ht}}static getPoint(z,ht,Et){let Ot=ht.boundingClientRect;return new e.P((Et.clientX-Ot.left)/ht.x-z.clientLeft,(Et.clientY-Ot.top)/ht.y-z.clientTop)}static mousePos(z,ht){let Et=i.getScale(z);return i.getPoint(z,Et,ht)}static touchPos(z,ht){let Et=[],Ot=i.getScale(z);for(let Ht=0;Ht{f&&T(f),f=null,v=!0},x.onerror=()=>{y=!0,f=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function($t){let z,ht,Et,Ot;$t.resetRequestQueue=()=>{z=[],ht=0,Et=0,Ot={}},$t.addThrottleControl=Ke=>{let vr=Et++;return Ot[vr]=Ke,vr},$t.removeThrottleControl=Ke=>{delete Ot[Ke],Te()},$t.getImage=(Ke,vr,Dr=!0)=>new Promise((Fr,un)=>{l.supported&&(Ke.headers||(Ke.headers={}),Ke.headers.accept="image/webp,*/*"),e.e(Ke,{type:"image"}),z.push({abortController:vr,requestParameters:Ke,supportImageRefresh:Dr,state:"queued",onError:Sn=>{un(Sn)},onSuccess:Sn=>{Fr(Sn)}}),Te()});let Ht=Ke=>e._(this,void 0,void 0,function*(){Ke.state="running";let{requestParameters:vr,supportImageRefresh:Dr,onError:Fr,onSuccess:un,abortController:Sn}=Ke,Xt=Dr===!1&&!e.i(self)&&!e.g(vr.url)&&(!vr.headers||Object.keys(vr.headers).reduce((Me,je)=>Me&&je==="accept",!0));ht++;let ae=Xt?Fe(vr,Sn):e.m(vr,Sn);try{let Me=yield ae;delete Ke.abortController,Ke.state="completed",Me.data instanceof HTMLImageElement||e.b(Me.data)?un(Me):Me.data&&un({data:yield(_e=Me.data,typeof createImageBitmap=="function"?e.d(_e):e.f(_e)),cacheControl:Me.cacheControl,expires:Me.expires})}catch(Me){delete Ke.abortController,Fr(Me)}finally{ht--,Te()}var _e}),Te=()=>{let Ke=(()=>{for(let vr of Object.keys(Ot))if(Ot[vr]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let vr=ht;vr0;vr++){let Dr=z.shift();Dr.abortController.signal.aborted?vr--:Ht(Dr)}},Fe=(Ke,vr)=>new Promise((Dr,Fr)=>{let un=new Image,Sn=Ke.url,Xt=Ke.credentials;Xt&&Xt==="include"?un.crossOrigin="use-credentials":(Xt&&Xt==="same-origin"||!e.s(Sn))&&(un.crossOrigin="anonymous"),vr.signal.addEventListener("abort",()=>{un.src="",Fr(e.c())}),un.fetchPriority="high",un.onload=()=>{un.onerror=un.onload=null,Dr({data:un})},un.onerror=()=>{un.onerror=un.onload=null,vr.signal.aborted||Fr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},un.src=Sn})}(u||(u={})),u.resetRequestQueue();class b{constructor(z){this._transformRequestFn=z}transformRequest(z,ht){return this._transformRequestFn&&this._transformRequestFn(z,ht)||{url:z}}setTransformRequest(z){this._transformRequestFn=z}}function _($t){var z=new e.A(3);return z[0]=$t[0],z[1]=$t[1],z[2]=$t[2],z}var P,M=function($t,z,ht){return $t[0]=z[0]-ht[0],$t[1]=z[1]-ht[1],$t[2]=z[2]-ht[2],$t};P=new e.A(3),e.A!=Float32Array&&(P[0]=0,P[1]=0,P[2]=0);var C=function($t){var z=$t[0],ht=$t[1];return z*z+ht*ht};function A($t){let z=[];if(typeof $t=="string")z.push({id:"default",url:$t});else if($t&&$t.length>0){let ht=[];for(let{id:Et,url:Ot}of $t){let Ht=`${Et}${Ot}`;ht.indexOf(Ht)===-1&&(ht.push(Ht),z.push({id:Et,url:Ot}))}}return z}function h($t,z,ht){let Et=$t.split("?");return Et[0]+=`${z}${ht}`,Et.join("?")}(function(){var $t=new e.A(2);e.A!=Float32Array&&($t[0]=0,$t[1]=0)})();class p{constructor(z,ht,Et,Ot){this.context=z,this.format=Et,this.texture=z.gl.createTexture(),this.update(ht,Ot)}update(z,ht,Et){let{width:Ot,height:Ht}=z,Te=!(this.size&&this.size[0]===Ot&&this.size[1]===Ht||Et),{context:Fe}=this,{gl:Ke}=Fe;if(this.useMipmap=!!(ht&&ht.useMipmap),Ke.bindTexture(Ke.TEXTURE_2D,this.texture),Fe.pixelStoreUnpackFlipY.set(!1),Fe.pixelStoreUnpack.set(1),Fe.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ke.RGBA&&(!ht||ht.premultiply!==!1)),Te)this.size=[Ot,Ht],z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,this.format,Ke.UNSIGNED_BYTE,z):Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,Ot,Ht,0,this.format,Ke.UNSIGNED_BYTE,z.data);else{let{x:vr,y:Dr}=Et||{x:0,y:0};z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,Ke.RGBA,Ke.UNSIGNED_BYTE,z):Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,Ot,Ht,Ke.RGBA,Ke.UNSIGNED_BYTE,z.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ke.generateMipmap(Ke.TEXTURE_2D)}bind(z,ht,Et){let{context:Ot}=this,{gl:Ht}=Ot;Ht.bindTexture(Ht.TEXTURE_2D,this.texture),Et!==Ht.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Et=Ht.LINEAR),z!==this.filter&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,z),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Et||z),this.filter=z),ht!==this.wrap&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,ht),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,ht),this.wrap=ht)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:z}=this.context;z.deleteTexture(this.texture),this.texture=null}}function k($t){let{userImage:z}=$t;return!!(z&&z.render&&z.render())&&($t.data.replace(new Uint8Array(z.data.buffer)),!0)}class w extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(z){if(this.loaded!==z&&(this.loaded=z,z)){for(let{ids:ht,promiseResolve:Et}of this.requestors)Et(this._getImagesForIds(ht));this.requestors=[]}}getImage(z){let ht=this.images[z];if(ht&&!ht.data&&ht.spriteData){let Et=ht.spriteData;ht.data=new e.R({width:Et.width,height:Et.height},Et.context.getImageData(Et.x,Et.y,Et.width,Et.height).data),ht.spriteData=null}return ht}addImage(z,ht){if(this.images[z])throw new Error(`Image id ${z} already exist, use updateImage instead`);this._validate(z,ht)&&(this.images[z]=ht)}_validate(z,ht){let Et=!0,Ot=ht.data||ht.spriteData;return this._validateStretch(ht.stretchX,Ot&&Ot.width)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchX" value`))),Et=!1),this._validateStretch(ht.stretchY,Ot&&Ot.height)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchY" value`))),Et=!1),this._validateContent(ht.content,ht)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "content" value`))),Et=!1),Et}_validateStretch(z,ht){if(!z)return!0;let Et=0;for(let Ot of z){if(Ot[0]{let Ot=!0;if(!this.isLoaded())for(let Ht of z)this.images[Ht]||(Ot=!1);this.isLoaded()||Ot?ht(this._getImagesForIds(z)):this.requestors.push({ids:z,promiseResolve:ht})})}_getImagesForIds(z){let ht={};for(let Et of z){let Ot=this.getImage(Et);Ot||(this.fire(new e.k("styleimagemissing",{id:Et})),Ot=this.getImage(Et)),Ot?ht[Et]={data:Ot.data.clone(),pixelRatio:Ot.pixelRatio,sdf:Ot.sdf,version:Ot.version,stretchX:Ot.stretchX,stretchY:Ot.stretchY,content:Ot.content,textFitWidth:Ot.textFitWidth,textFitHeight:Ot.textFitHeight,hasRenderCallback:!!(Ot.userImage&&Ot.userImage.render)}:e.w(`Image "${Et}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ht}getPixelSize(){let{width:z,height:ht}=this.atlasImage;return{width:z,height:ht}}getPattern(z){let ht=this.patterns[z],Et=this.getImage(z);if(!Et)return null;if(ht&&ht.position.version===Et.version)return ht.position;if(ht)ht.position.version=Et.version;else{let Ot={w:Et.data.width+2,h:Et.data.height+2,x:0,y:0},Ht=new e.I(Ot,Et);this.patterns[z]={bin:Ot,position:Ht}}return this._updatePatternAtlas(),this.patterns[z].position}bind(z){let ht=z.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(z,this.atlasImage,ht.RGBA),this.atlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}_updatePatternAtlas(){let z=[];for(let Ht in this.patterns)z.push(this.patterns[Ht].bin);let{w:ht,h:Et}=e.p(z),Ot=this.atlasImage;Ot.resize({width:ht||1,height:Et||1});for(let Ht in this.patterns){let{bin:Te}=this.patterns[Ht],Fe=Te.x+1,Ke=Te.y+1,vr=this.getImage(Ht).data,Dr=vr.width,Fr=vr.height;e.R.copy(vr,Ot,{x:0,y:0},{x:Fe,y:Ke},{width:Dr,height:Fr}),e.R.copy(vr,Ot,{x:0,y:Fr-1},{x:Fe,y:Ke-1},{width:Dr,height:1}),e.R.copy(vr,Ot,{x:0,y:0},{x:Fe,y:Ke+Fr},{width:Dr,height:1}),e.R.copy(vr,Ot,{x:Dr-1,y:0},{x:Fe-1,y:Ke},{width:1,height:Fr}),e.R.copy(vr,Ot,{x:0,y:0},{x:Fe+Dr,y:Ke},{width:1,height:Fr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(z){for(let ht of z){if(this.callbackDispatchedThisFrame[ht])continue;this.callbackDispatchedThisFrame[ht]=!0;let Et=this.getImage(ht);Et||e.w(`Image with ID: "${ht}" was not found`),k(Et)&&this.updateImage(ht,Et)}}}let B=1e20;function O($t,z,ht,Et,Ot,Ht,Te,Fe,Ke){for(let vr=z;vr-1);Ke++,Ht[Ke]=Fe,Te[Ke]=vr,Te[Ke+1]=B}for(let Fe=0,Ke=0;Fe65535)throw new Error("glyphs > 65535 not supported");if(Et.ranges[Ht])return{stack:z,id:ht,glyph:Ot};if(!this.url)throw new Error("glyphsUrl is not set");if(!Et.requests[Ht]){let Fe=V.loadGlyphRange(z,Ht,this.url,this.requestManager);Et.requests[Ht]=Fe}let Te=yield Et.requests[Ht];for(let Fe in Te)this._doesCharSupportLocalGlyph(+Fe)||(Et.glyphs[+Fe]=Te[+Fe]);return Et.ranges[Ht]=!0,{stack:z,id:ht,glyph:Te[ht]||null}})}_doesCharSupportLocalGlyph(z){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(z))}_tinySDF(z,ht,Et){let Ot=this.localIdeographFontFamily;if(!Ot||!this._doesCharSupportLocalGlyph(Et))return;let Ht=z.tinySDF;if(!Ht){let Fe="400";/bold/i.test(ht)?Fe="900":/medium/i.test(ht)?Fe="500":/light/i.test(ht)&&(Fe="200"),Ht=z.tinySDF=new V.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Ot,fontWeight:Fe})}let Te=Ht.draw(String.fromCharCode(Et));return{id:Et,bitmap:new e.o({width:Te.width||60,height:Te.height||60},Te.data),metrics:{width:Te.glyphWidth/2||24,height:Te.glyphHeight/2||24,left:Te.glyphLeft/2+.5||0,top:Te.glyphTop/2-27.5||-8,advance:Te.glyphAdvance/2||24,isDoubleResolution:!0}}}}V.loadGlyphRange=function($t,z,ht,Et){return e._(this,void 0,void 0,function*(){let Ot=256*z,Ht=Ot+255,Te=Et.transformRequest(ht.replace("{fontstack}",$t).replace("{range}",`${Ot}-${Ht}`),"Glyphs"),Fe=yield e.l(Te,new AbortController);if(!Fe||!Fe.data)throw new Error(`Could not load glyph range. range: ${z}, ${Ot}-${Ht}`);let Ke={};for(let vr of e.n(Fe.data))Ke[vr.id]=vr;return Ke})},V.TinySDF=class{constructor({fontSize:$t=24,buffer:z=3,radius:ht=8,cutoff:Et=.25,fontFamily:Ot="sans-serif",fontWeight:Ht="normal",fontStyle:Te="normal"}={}){this.buffer=z,this.cutoff=Et,this.radius=ht;let Fe=this.size=$t+4*z,Ke=this._createCanvas(Fe),vr=this.ctx=Ke.getContext("2d",{willReadFrequently:!0});vr.font=`${Te} ${Ht} ${$t}px ${Ot}`,vr.textBaseline="alphabetic",vr.textAlign="left",vr.fillStyle="black",this.gridOuter=new Float64Array(Fe*Fe),this.gridInner=new Float64Array(Fe*Fe),this.f=new Float64Array(Fe),this.z=new Float64Array(Fe+1),this.v=new Uint16Array(Fe)}_createCanvas($t){let z=document.createElement("canvas");return z.width=z.height=$t,z}draw($t){let{width:z,actualBoundingBoxAscent:ht,actualBoundingBoxDescent:Et,actualBoundingBoxLeft:Ot,actualBoundingBoxRight:Ht}=this.ctx.measureText($t),Te=Math.ceil(ht),Fe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Ht-Ot))),Ke=Math.min(this.size-this.buffer,Te+Math.ceil(Et)),vr=Fe+2*this.buffer,Dr=Ke+2*this.buffer,Fr=Math.max(vr*Dr,0),un=new Uint8ClampedArray(Fr),Sn={data:un,width:vr,height:Dr,glyphWidth:Fe,glyphHeight:Ke,glyphTop:Te,glyphLeft:0,glyphAdvance:z};if(Fe===0||Ke===0)return Sn;let{ctx:Xt,buffer:ae,gridInner:_e,gridOuter:Me}=this;Xt.clearRect(ae,ae,Fe,Ke),Xt.fillText($t,ae,ae+Te);let je=Xt.getImageData(ae,ae,Fe,Ke);Me.fill(B,0,Fr),_e.fill(0,0,Fr);for(let De=0;De0?Nr*Nr:0,_e[Or]=Nr<0?Nr*Nr:0}}O(Me,0,0,vr,Dr,vr,this.f,this.v,this.z),O(_e,ae,ae,Fe,Ke,vr,this.f,this.v,this.z);for(let De=0;De1&&(Ke=z[++Fe]);let Dr=Math.abs(vr-Ke.left),Fr=Math.abs(vr-Ke.right),un=Math.min(Dr,Fr),Sn,Xt=Ht/Et*(Ot+1);if(Ke.isDash){let ae=Ot-Math.abs(Xt);Sn=Math.sqrt(un*un+ae*ae)}else Sn=Ot-Math.sqrt(un*un+Xt*Xt);this.data[Te+vr]=Math.max(0,Math.min(255,Sn+128))}}}addRegularDash(z){for(let Fe=z.length-1;Fe>=0;--Fe){let Ke=z[Fe],vr=z[Fe+1];Ke.zeroLength?z.splice(Fe,1):vr&&vr.isDash===Ke.isDash&&(vr.left=Ke.left,z.splice(Fe,1))}let ht=z[0],Et=z[z.length-1];ht.isDash===Et.isDash&&(ht.left=Et.left-this.width,Et.right=ht.right+this.width);let Ot=this.width*this.nextRow,Ht=0,Te=z[Ht];for(let Fe=0;Fe1&&(Te=z[++Ht]);let Ke=Math.abs(Fe-Te.left),vr=Math.abs(Fe-Te.right),Dr=Math.min(Ke,vr);this.data[Ot+Fe]=Math.max(0,Math.min(255,(Te.isDash?Dr:-Dr)+128))}}addDash(z,ht){let Et=ht?7:0,Ot=2*Et+1;if(this.nextRow+Ot>this.height)return e.w("LineAtlas out of space"),null;let Ht=0;for(let Fe=0;Fe{ht.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[lt]}numActive(){return Object.keys(this.active).length}}let mt=Math.floor(o.hardwareConcurrency/2),st,tt;function pt(){return st||(st=new yt),st}yt.workerCount=e.C(globalThis)?Math.max(Math.min(mt,3),1):1;class rt{constructor(z,ht){this.workerPool=z,this.actors=[],this.currentActor=0,this.id=ht;let Et=this.workerPool.acquire(ht);for(let Ot=0;Ot{ht.remove()}),this.actors=[],z&&this.workerPool.release(this.id)}registerMessageHandler(z,ht){for(let Et of this.actors)Et.registerMessageHandler(z,ht)}}function at(){return tt||(tt=new rt(pt(),e.G),tt.registerMessageHandler("GR",($t,z,ht)=>e.m(z,ht))),tt}function vt($t,z){let ht=e.H();return e.J(ht,ht,[1,1,0]),e.K(ht,ht,[.5*$t.width,.5*$t.height,1]),e.L(ht,ht,$t.calculatePosMatrix(z.toUnwrapped()))}function it($t,z,ht,Et,Ot,Ht){let Te=function(Fr,un,Sn){if(Fr)for(let Xt of Fr){let ae=un[Xt];if(ae&&ae.source===Sn&&ae.type==="fill-extrusion")return!0}else for(let Xt in un){let ae=un[Xt];if(ae.source===Sn&&ae.type==="fill-extrusion")return!0}return!1}(Ot&&Ot.layers,z,$t.id),Fe=Ht.maxPitchScaleFactor(),Ke=$t.tilesIn(Et,Fe,Te);Ke.sort(K);let vr=[];for(let Fr of Ke)vr.push({wrappedTileID:Fr.tileID.wrapped().key,queryResults:Fr.tile.queryRenderedFeatures(z,ht,$t._state,Fr.queryGeometry,Fr.cameraQueryGeometry,Fr.scale,Ot,Ht,Fe,vt($t.transform,Fr.tileID))});let Dr=function(Fr){let un={},Sn={};for(let Xt of Fr){let ae=Xt.queryResults,_e=Xt.wrappedTileID,Me=Sn[_e]=Sn[_e]||{};for(let je in ae){let De=ae[je],$e=Me[je]=Me[je]||{},wr=un[je]=un[je]||[];for(let Or of De)$e[Or.featureIndex]||($e[Or.featureIndex]=!0,wr.push(Or))}}return un}(vr);for(let Fr in Dr)Dr[Fr].forEach(un=>{let Sn=un.feature,Xt=$t.getFeatureState(Sn.layer["source-layer"],Sn.id);Sn.source=Sn.layer.source,Sn.layer["source-layer"]&&(Sn.sourceLayer=Sn.layer["source-layer"]),Sn.state=Xt});return Dr}function K($t,z){let ht=$t.tileID,Et=z.tileID;return ht.overscaledZ-Et.overscaledZ||ht.canonical.y-Et.canonical.y||ht.wrap-Et.wrap||ht.canonical.x-Et.canonical.x}function ft($t,z,ht){return e._(this,void 0,void 0,function*(){let Et=$t;if($t.url?Et=(yield e.h(z.transformRequest($t.url,"Source"),ht)).data:yield o.frameAsync(ht),!Et)return null;let Ot=e.M(e.e(Et,$t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Et&&Et.vector_layers&&(Ot.vectorLayerIds=Et.vector_layers.map(Ht=>Ht.id)),Ot})}class ut{constructor(z,ht){z&&(ht?this.setSouthWest(z).setNorthEast(ht):Array.isArray(z)&&(z.length===4?this.setSouthWest([z[0],z[1]]).setNorthEast([z[2],z[3]]):this.setSouthWest(z[0]).setNorthEast(z[1])))}setNorthEast(z){return this._ne=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}setSouthWest(z){return this._sw=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}extend(z){let ht=this._sw,Et=this._ne,Ot,Ht;if(z instanceof e.N)Ot=z,Ht=z;else{if(!(z instanceof ut))return Array.isArray(z)?z.length===4||z.every(Array.isArray)?this.extend(ut.convert(z)):this.extend(e.N.convert(z)):z&&("lng"in z||"lon"in z)&&"lat"in z?this.extend(e.N.convert(z)):this;if(Ot=z._sw,Ht=z._ne,!Ot||!Ht)return this}return ht||Et?(ht.lng=Math.min(Ot.lng,ht.lng),ht.lat=Math.min(Ot.lat,ht.lat),Et.lng=Math.max(Ht.lng,Et.lng),Et.lat=Math.max(Ht.lat,Et.lat)):(this._sw=new e.N(Ot.lng,Ot.lat),this._ne=new e.N(Ht.lng,Ht.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(z){let{lng:ht,lat:Et}=e.N.convert(z),Ot=this._sw.lng<=ht&&ht<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ot=this._sw.lng>=ht&&ht>=this._ne.lng),this._sw.lat<=Et&&Et<=this._ne.lat&&Ot}static convert(z){return z instanceof ut?z:z&&new ut(z)}static fromLngLat(z,ht=0){let Et=360*ht/40075017,Ot=Et/Math.cos(Math.PI/180*z.lat);return new ut(new e.N(z.lng-Ot,z.lat-Et),new e.N(z.lng+Ot,z.lat+Et))}adjustAntiMeridian(){let z=new e.N(this._sw.lng,this._sw.lat),ht=new e.N(this._ne.lng,this._ne.lat);return new ut(z,z.lng>ht.lng?new e.N(ht.lng+360,ht.lat):ht)}}class kt{constructor(z,ht,Et){this.bounds=ut.convert(this.validateBounds(z)),this.minzoom=ht||0,this.maxzoom=Et||24}validateBounds(z){return Array.isArray(z)&&z.length===4?[Math.max(-180,z[0]),Math.max(-90,z[1]),Math.min(180,z[2]),Math.min(90,z[3])]:[-180,-90,180,90]}contains(z){let ht=Math.pow(2,z.z),Et=Math.floor(e.O(this.bounds.getWest())*ht),Ot=Math.floor(e.Q(this.bounds.getNorth())*ht),Ht=Math.ceil(e.O(this.bounds.getEast())*ht),Te=Math.ceil(e.Q(this.bounds.getSouth())*ht);return z.x>=Et&&z.x=Ot&&z.y{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et={request:this.map._requestManager.transformRequest(ht,"Tile"),uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,tileSize:this.tileSize*z.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Et.request.collectResourceTiming=this._collectResourceTiming;let Ot="RT";if(z.actor&&z.state!=="expired"){if(z.state==="loading")return new Promise((Ht,Te)=>{z.reloadPromise={resolve:Ht,reject:Te}})}else z.actor=this.dispatcher.getActor(),Ot="LT";z.abortController=new AbortController;try{let Ht=yield z.actor.sendAsync({type:Ot,data:Et},z.abortController);if(delete z.abortController,z.aborted)return;this._afterTileLoadWorkerResponse(z,Ht)}catch(Ht){if(delete z.abortController,z.aborted)return;if(Ht&&Ht.status!==404)throw Ht;this._afterTileLoadWorkerResponse(z,null)}})}_afterTileLoadWorkerResponse(z,ht){if(ht&&ht.resourceTiming&&(z.resourceTiming=ht.resourceTiming),ht&&this.map._refreshExpiredTiles&&z.setExpiryData(ht),z.loadVectorData(ht,this.map.painter),z.reloadPromise){let Et=z.reloadPromise;z.reloadPromise=null,this.loadTile(z).then(Et.resolve).catch(Et.reject)}}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.actor&&(yield z.actor.sendAsync({type:"AT",data:{uid:z.uid,type:this.type,source:this.id}}))})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),z.actor&&(yield z.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Pt extends e.E{constructor(z,ht,Et,Ot){super(),this.id=z,this.dispatcher=Et,this.setEventedParent(Ot),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},ht),e.e(this,e.M(ht,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let z=yield ft(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,z&&(e.e(this,z),z.bounds&&(this.tileBounds=new kt(z.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(z){this._tileJSONRequest=null,this.fire(new e.j(z))}})}loaded(){return this._loaded}onAdd(z){this.map=z,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(z){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),z(),this.load()}setTiles(z){return this.setSourceProperty(()=>{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}serialize(){return e.e({},this._options)}hasTile(z){return!this.tileBounds||this.tileBounds.contains(z.canonical)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);z.abortController=new AbortController;try{let Et=yield u.getImage(this.map._requestManager.transformRequest(ht,"Tile"),z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(Et&&Et.data){this.map._refreshExpiredTiles&&Et.cacheControl&&Et.expires&&z.setExpiryData({cacheControl:Et.cacheControl,expires:Et.expires});let Ot=this.map.painter.context,Ht=Ot.gl,Te=Et.data;z.texture=this.map.painter.getTileTexture(Te.width),z.texture?z.texture.update(Te,{useMipmap:!0}):(z.texture=new p(Ot,Te,Ht.RGBA,{useMipmap:!0}),z.texture.bind(Ht.LINEAR,Ht.CLAMP_TO_EDGE,Ht.LINEAR_MIPMAP_NEAREST)),z.state="loaded"}}catch(Et){if(delete z.abortController,z.aborted)z.state="unloaded";else if(Et)throw z.state="errored",Et}})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController)})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.texture&&this.map.painter.saveTileTexture(z.texture)})}hasTransition(){return!1}}class qt extends Pt{constructor(z,ht,Et,Ot){super(z,ht,Et,Ot),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},ht),this.encoding=ht.encoding||"mapbox",this.redFactor=ht.redFactor,this.greenFactor=ht.greenFactor,this.blueFactor=ht.blueFactor,this.baseShift=ht.baseShift}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et=this.map._requestManager.transformRequest(ht,"Tile");z.neighboringTiles=this._getNeighboringTiles(z.tileID),z.abortController=new AbortController;try{let Ot=yield u.getImage(Et,z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(Ot&&Ot.data){let Ht=Ot.data;this.map._refreshExpiredTiles&&Ot.cacheControl&&Ot.expires&&z.setExpiryData({cacheControl:Ot.cacheControl,expires:Ot.expires});let Te=e.b(Ht)&&e.U()?Ht:yield this.readImageNow(Ht),Fe={type:this.type,uid:z.uid,source:this.id,rawImageData:Te,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!z.actor||z.state==="expired"){z.actor=this.dispatcher.getActor();let Ke=yield z.actor.sendAsync({type:"LDT",data:Fe});z.dem=Ke,z.needsHillshadePrepare=!0,z.needsTerrainPrepare=!0,z.state="loaded"}}}catch(Ot){if(delete z.abortController,z.aborted)z.state="unloaded";else if(Ot)throw z.state="errored",Ot}})}readImageNow(z){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let ht=z.width+2,Et=z.height+2;try{return new e.R({width:ht,height:Et},yield e.W(z,-1,-1,ht,Et))}catch{}}return o.getImageData(z,1)})}_getNeighboringTiles(z){let ht=z.canonical,Et=Math.pow(2,ht.z),Ot=(ht.x-1+Et)%Et,Ht=ht.x===0?z.wrap-1:z.wrap,Te=(ht.x+1+Et)%Et,Fe=ht.x+1===Et?z.wrap+1:z.wrap,Ke={};return Ke[new e.S(z.overscaledZ,Ht,ht.z,Ot,ht.y).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,Te,ht.y).key]={backfilled:!1},ht.y>0&&(Ke[new e.S(z.overscaledZ,Ht,ht.z,Ot,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,z.wrap,ht.z,ht.x,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,Te,ht.y-1).key]={backfilled:!1}),ht.y+10&&e.e(Ht,{resourceTiming:Ot}),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"content"})))}catch(Et){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(Et))}})}loaded(){return this._pendingLoads===0}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.actor?"RT":"LT";z.actor=this.actor;let Et={type:this.type,uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};z.abortController=new AbortController;let Ot=yield this.actor.sendAsync({type:ht,data:Et},z.abortController);delete z.abortController,z.unloadVectorData(),z.aborted||z.loadVectorData(Ot,this.map.painter,ht==="RT")})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.aborted=!0})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Jt=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ge extends e.E{constructor(z,ht,Et,Ot){super(),this.id=z,this.dispatcher=Et,this.coordinates=ht.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ot),this.options=ht}load(z){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ht=yield u.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ht&&ht.data&&(this.image=ht.data,z&&(this.coordinates=z),this._finishLoading())}catch(ht){this._request=null,this._loaded=!0,this.fire(new e.j(ht))}})}loaded(){return this._loaded}updateImage(z){return z.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=z.url,this.load(z.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(z){this.map=z,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(z){this.coordinates=z;let ht=z.map(e.Z.fromLngLat);this.tileID=function(Ot){let Ht=1/0,Te=1/0,Fe=-1/0,Ke=-1/0;for(let un of Ot)Ht=Math.min(Ht,un.x),Te=Math.min(Te,un.y),Fe=Math.max(Fe,un.x),Ke=Math.max(Ke,un.y);let vr=Math.max(Fe-Ht,Ke-Te),Dr=Math.max(0,Math.floor(-Math.log(vr)/Math.LN2)),Fr=Math.pow(2,Dr);return new e.a1(Dr,Math.floor((Ht+Fe)/2*Fr),Math.floor((Te+Ke)/2*Fr))}(ht),this.minzoom=this.maxzoom=this.tileID.z;let Et=ht.map(Ot=>this.tileID.getTilePoint(Ot)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(Et[0].x,Et[0].y,0,0),this._boundsArray.emplaceBack(Et[1].x,Et[1].y,e.X,0),this._boundsArray.emplaceBack(Et[3].x,Et[3].y,0,e.X),this._boundsArray.emplaceBack(Et[2].x,Et[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(z,this.image,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let Ot in this.tiles){let Ht=this.tiles[Ot];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(z){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(z.tileID.canonical)?(this.tiles[String(z.tileID.wrap)]=z,z.buckets={}):z.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class fe extends ge{constructor(z,ht,Et,Ot){super(z,ht,Et,Ot),this.roundZoom=!0,this.type="video",this.options=ht}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let z=this.options;this.urls=[];for(let ht of z.urls)this.urls.push(this.map._requestManager.transformRequest(ht,"Source").url);try{let ht=yield e.a3(this.urls);if(this._loaded=!0,!ht)return;this.video=ht,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ht){this.fire(new e.j(ht))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(z){if(this.video){let ht=this.video.seekable;zht.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ht.start(0)} and ${ht.end(0)}-second mark.`))):this.video.currentTime=z}}getVideo(){return this.video}onAdd(z){this.map||(this.map=z,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),ht.texSubImage2D(ht.TEXTURE_2D,0,0,0,ht.RGBA,ht.UNSIGNED_BYTE,this.video)):(this.texture=new p(z,this.video,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let Ot in this.tiles){let Ht=this.tiles[Ot];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class pe extends ge{constructor(z,ht,Et,Ot){super(z,ht,Et,Ot),ht.coordinates?Array.isArray(ht.coordinates)&&ht.coordinates.length===4&&!ht.coordinates.some(Ht=>!Array.isArray(Ht)||Ht.length!==2||Ht.some(Te=>typeof Te!="number"))||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "coordinates"'))),ht.animate&&typeof ht.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${z}`,null,'optional "animate" property must be a boolean value'))),ht.canvas?typeof ht.canvas=="string"||ht.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "canvas"'))),this.options=ht,this.animate=ht.animate===void 0||ht.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(z){this.map=z,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let z=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,z=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,z=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ht=this.map.painter.context,Et=ht.gl;this.boundsBuffer||(this.boundsBuffer=ht.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(z||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(ht,this.canvas,Et.RGBA,{premultiply:!0});let Ot=!1;for(let Ht in this.tiles){let Te=this.tiles[Ht];Te.state!=="loaded"&&(Te.state="loaded",Te.texture=this.texture,Ot=!0)}Ot&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let z of[this.canvas.width,this.canvas.height])if(isNaN(z)||z<=0)return!0;return!1}}let se={},Tt=$t=>{switch($t){case"geojson":return Wt;case"image":return ge;case"raster":return Pt;case"raster-dem":return qt;case"vector":return It;case"video":return fe;case"canvas":return pe}return se[$t]},Lt="RTLPluginLoaded";class Mt extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(z){return this.status=z,this.dispatcher.broadcast("SRPS",{pluginStatus:z,pluginURL:this.url}).catch(ht=>{throw this.status="error",ht})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(z){return e._(this,arguments,void 0,function*(ht,Et=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=o.resolveURL(ht),!this.url)throw new Error(`requested url ${ht} is invalid`);if(this.status==="unavailable"){if(!Et)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(Lt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ee=null;function ve(){return ee||(ee=new Mt),ee}class oe{constructor(z,ht){this.timeAdded=0,this.fadeEndTime=0,this.tileID=z,this.uid=e.a4(),this.uses=0,this.tileSize=ht,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(z){let ht=z+this.timeAdded;htHt.getLayer(vr)).filter(Boolean);if(Ke.length!==0){Fe.layers=Ke,Fe.stateDependentLayerIds&&(Fe.stateDependentLayers=Fe.stateDependentLayerIds.map(vr=>Ke.filter(Dr=>Dr.id===vr)[0]));for(let vr of Ke)Te[vr.id]=Fe}}return Te}(z.buckets,ht.style),this.hasSymbolBuckets=!1;for(let Ot in this.buckets){let Ht=this.buckets[Ot];if(Ht instanceof e.a6){if(this.hasSymbolBuckets=!0,!Et)break;Ht.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Ot in this.buckets){let Ht=this.buckets[Ot];if(Ht instanceof e.a6&&Ht.hasRTLText){this.hasRTLText=!0,ve().lazyLoad();break}}this.queryPadding=0;for(let Ot in this.buckets){let Ht=this.buckets[Ot];this.queryPadding=Math.max(this.queryPadding,ht.style.getLayer(Ot).queryRadius(Ht))}z.imageAtlas&&(this.imageAtlas=z.imageAtlas),z.glyphAtlasImage&&(this.glyphAtlasImage=z.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let z in this.buckets)this.buckets[z].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(z){return this.buckets[z.id]}upload(z){for(let Et in this.buckets){let Ot=this.buckets[Et];Ot.uploadPending()&&Ot.upload(z)}let ht=z.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(z,this.imageAtlas.image,ht.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(z,this.glyphAtlasImage,ht.ALPHA),this.glyphAtlasImage=null)}prepare(z){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(z,this.imageAtlasTexture)}queryRenderedFeatures(z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Ot,cameraQueryGeometry:Ht,scale:Te,tileSize:this.tileSize,pixelPosMatrix:Dr,transform:Ke,params:Fe,queryPadding:this.queryPadding*vr},z,ht,Et):{}}querySourceFeatures(z,ht){let Et=this.latestFeatureIndex;if(!Et||!Et.rawTileData)return;let Ot=Et.loadVTLayers(),Ht=ht&&ht.sourceLayer?ht.sourceLayer:"",Te=Ot._geojsonTileLayer||Ot[Ht];if(!Te)return;let Fe=e.a7(ht&&ht.filter),{z:Ke,x:vr,y:Dr}=this.tileID.canonical,Fr={z:Ke,x:vr,y:Dr};for(let un=0;unEt)Ot=!1;else if(ht)if(this.expirationTime{this.remove(z,Ht)},Et)),this.data[Ot].push(Ht),this.order.push(Ot),this.order.length>this.max){let Te=this._getAndRemoveByKey(this.order[0]);Te&&this.onRemove(Te)}return this}has(z){return z.wrapped().key in this.data}getAndRemove(z){return this.has(z)?this._getAndRemoveByKey(z.wrapped().key):null}_getAndRemoveByKey(z){let ht=this.data[z].shift();return ht.timeout&&clearTimeout(ht.timeout),this.data[z].length===0&&delete this.data[z],this.order.splice(this.order.indexOf(z),1),ht.value}getByKey(z){let ht=this.data[z];return ht?ht[0].value:null}get(z){return this.has(z)?this.data[z.wrapped().key][0].value:null}remove(z,ht){if(!this.has(z))return this;let Et=z.wrapped().key,Ot=ht===void 0?0:this.data[Et].indexOf(ht),Ht=this.data[Et][Ot];return this.data[Et].splice(Ot,1),Ht.timeout&&clearTimeout(Ht.timeout),this.data[Et].length===0&&delete this.data[Et],this.onRemove(Ht.value),this.order.splice(this.order.indexOf(Et),1),this}setMaxSize(z){for(this.max=z;this.order.length>this.max;){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}filter(z){let ht=[];for(let Et in this.data)for(let Ot of this.data[Et])z(Ot.value)||ht.push(Ot);for(let Et of ht)this.remove(Et.value.tileID,Et)}}class He{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(z,ht,Et){let Ot=String(ht);if(this.stateChanges[z]=this.stateChanges[z]||{},this.stateChanges[z][Ot]=this.stateChanges[z][Ot]||{},e.e(this.stateChanges[z][Ot],Et),this.deletedStates[z]===null){this.deletedStates[z]={};for(let Ht in this.state[z])Ht!==Ot&&(this.deletedStates[z][Ht]=null)}else if(this.deletedStates[z]&&this.deletedStates[z][Ot]===null){this.deletedStates[z][Ot]={};for(let Ht in this.state[z][Ot])Et[Ht]||(this.deletedStates[z][Ot][Ht]=null)}else for(let Ht in Et)this.deletedStates[z]&&this.deletedStates[z][Ot]&&this.deletedStates[z][Ot][Ht]===null&&delete this.deletedStates[z][Ot][Ht]}removeFeatureState(z,ht,Et){if(this.deletedStates[z]===null)return;let Ot=String(ht);if(this.deletedStates[z]=this.deletedStates[z]||{},Et&&ht!==void 0)this.deletedStates[z][Ot]!==null&&(this.deletedStates[z][Ot]=this.deletedStates[z][Ot]||{},this.deletedStates[z][Ot][Et]=null);else if(ht!==void 0)if(this.stateChanges[z]&&this.stateChanges[z][Ot])for(Et in this.deletedStates[z][Ot]={},this.stateChanges[z][Ot])this.deletedStates[z][Ot][Et]=null;else this.deletedStates[z][Ot]=null;else this.deletedStates[z]=null}getState(z,ht){let Et=String(ht),Ot=e.e({},(this.state[z]||{})[Et],(this.stateChanges[z]||{})[Et]);if(this.deletedStates[z]===null)return{};if(this.deletedStates[z]){let Ht=this.deletedStates[z][ht];if(Ht===null)return{};for(let Te in Ht)delete Ot[Te]}return Ot}initializeTileState(z,ht){z.setFeatureState(this.state,ht)}coalesceChanges(z,ht){let Et={};for(let Ot in this.stateChanges){this.state[Ot]=this.state[Ot]||{};let Ht={};for(let Te in this.stateChanges[Ot])this.state[Ot][Te]||(this.state[Ot][Te]={}),e.e(this.state[Ot][Te],this.stateChanges[Ot][Te]),Ht[Te]=this.state[Ot][Te];Et[Ot]=Ht}for(let Ot in this.deletedStates){this.state[Ot]=this.state[Ot]||{};let Ht={};if(this.deletedStates[Ot]===null)for(let Te in this.state[Ot])Ht[Te]={},this.state[Ot][Te]={};else for(let Te in this.deletedStates[Ot]){if(this.deletedStates[Ot][Te]===null)this.state[Ot][Te]={};else for(let Fe of Object.keys(this.deletedStates[Ot][Te]))delete this.state[Ot][Te][Fe];Ht[Te]=this.state[Ot][Te]}Et[Ot]=Et[Ot]||{},e.e(Et[Ot],Ht)}if(this.stateChanges={},this.deletedStates={},Object.keys(Et).length!==0)for(let Ot in z)z[Ot].setFeatureState(Et,ht)}}class Ge extends e.E{constructor(z,ht,Et){super(),this.id=z,this.dispatcher=Et,this.on("data",Ot=>this._dataHandler(Ot)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Ot,Ht,Te,Fe)=>{let Ke=new(Tt(Ht.type))(Ot,Ht,Te,Fe);if(Ke.id!==Ot)throw new Error(`Expected Source id to be ${Ot} instead of ${Ke.id}`);return Ke})(z,ht,Et,this),this._tiles={},this._cache=new Ae(0,Ot=>this._unloadTile(Ot)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new He,this._didEmitContent=!1,this._updated=!1}onAdd(z){this.map=z,this._maxTileCacheSize=z?z._maxTileCacheSize:null,this._maxTileCacheZoomLevels=z?z._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(z)}onRemove(z){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(z)}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 z in this._tiles){let ht=this._tiles[z];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let z=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,z&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(z,ht,Et){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(z),this._tileLoaded(z,ht,Et)}catch(Ot){z.state="errored",Ot.status!==404?this._source.fire(new e.j(Ot,{tile:z})):this.update(this.transform,this.terrain)}})}_unloadTile(z){this._source.unloadTile&&this._source.unloadTile(z)}_abortTile(z){this._source.abortTile&&this._source.abortTile(z),this._source.fire(new e.k("dataabort",{tile:z,coord:z.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(z){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ht in this._tiles){let Et=this._tiles[ht];Et.upload(z),Et.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(z=>z.tileID).sort(cr).map(z=>z.key)}getRenderableIds(z){let ht=[];for(let Et in this._tiles)this._isIdRenderable(Et,z)&&ht.push(this._tiles[Et]);return z?ht.sort((Et,Ot)=>{let Ht=Et.tileID,Te=Ot.tileID,Fe=new e.P(Ht.canonical.x,Ht.canonical.y)._rotate(this.transform.angle),Ke=new e.P(Te.canonical.x,Te.canonical.y)._rotate(this.transform.angle);return Ht.overscaledZ-Te.overscaledZ||Ke.y-Fe.y||Ke.x-Fe.x}).map(Et=>Et.tileID.key):ht.map(Et=>Et.tileID).sort(cr).map(Et=>Et.key)}hasRenderableParent(z){let ht=this.findLoadedParent(z,0);return!!ht&&this._isIdRenderable(ht.tileID.key)}_isIdRenderable(z,ht){return this._tiles[z]&&this._tiles[z].hasData()&&!this._coveredTiles[z]&&(ht||!this._tiles[z].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let z in this._tiles)this._tiles[z].state!=="errored"&&this._reloadTile(z,"reloading")}}_reloadTile(z,ht){return e._(this,void 0,void 0,function*(){let Et=this._tiles[z];Et&&(Et.state!=="loading"&&(Et.state=ht),yield this._loadTile(Et,z,ht))})}_tileLoaded(z,ht,Et){z.timeAdded=o.now(),Et==="expired"&&(z.refreshedUponExpiration=!0),this._setTileReloadTimer(ht,z),this.getSource().type==="raster-dem"&&z.dem&&this._backfillDEM(z),this._state.initializeTileState(z,this.map?this.map.painter:null),z.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:z,coord:z.tileID}))}_backfillDEM(z){let ht=this.getRenderableIds();for(let Ot=0;Ot1||(Math.abs(Te)>1&&(Math.abs(Te+Ke)===1?Te+=Ke:Math.abs(Te-Ke)===1&&(Te-=Ke)),Ht.dem&&Ot.dem&&(Ot.dem.backfillBorder(Ht.dem,Te,Fe),Ot.neighboringTiles&&Ot.neighboringTiles[vr]&&(Ot.neighboringTiles[vr].backfilled=!0)))}}getTile(z){return this.getTileByID(z.key)}getTileByID(z){return this._tiles[z]}_retainLoadedChildren(z,ht,Et,Ot){for(let Ht in this._tiles){let Te=this._tiles[Ht];if(Ot[Ht]||!Te.hasData()||Te.tileID.overscaledZ<=ht||Te.tileID.overscaledZ>Et)continue;let Fe=Te.tileID;for(;Te&&Te.tileID.overscaledZ>ht+1;){let vr=Te.tileID.scaledTo(Te.tileID.overscaledZ-1);Te=this._tiles[vr.key],Te&&Te.hasData()&&(Fe=vr)}let Ke=Fe;for(;Ke.overscaledZ>ht;)if(Ke=Ke.scaledTo(Ke.overscaledZ-1),z[Ke.key]){Ot[Fe.key]=Fe;break}}}findLoadedParent(z,ht){if(z.key in this._loadedParentTiles){let Et=this._loadedParentTiles[z.key];return Et&&Et.tileID.overscaledZ>=ht?Et:null}for(let Et=z.overscaledZ-1;Et>=ht;Et--){let Ot=z.scaledTo(Et),Ht=this._getLoadedTile(Ot);if(Ht)return Ht}}findLoadedSibling(z){return this._getLoadedTile(z)}_getLoadedTile(z){let ht=this._tiles[z.key];return ht&&ht.hasData()?ht:this._cache.getByKey(z.wrapped().key)}updateCacheSize(z){let ht=Math.ceil(z.width/this._source.tileSize)+1,Et=Math.ceil(z.height/this._source.tileSize)+1,Ot=Math.floor(ht*Et*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Ot):Ot;this._cache.setMaxSize(Ht)}handleWrapJump(z){let ht=Math.round((z-(this._prevLng===void 0?z:this._prevLng))/360);if(this._prevLng=z,ht){let Et={};for(let Ot in this._tiles){let Ht=this._tiles[Ot];Ht.tileID=Ht.tileID.unwrapTo(Ht.tileID.wrap+ht),Et[Ht.tileID.key]=Ht}this._tiles=Et;for(let Ot in this._timers)clearTimeout(this._timers[Ot]),delete this._timers[Ot];for(let Ot in this._tiles)this._setTileReloadTimer(Ot,this._tiles[Ot])}}_updateCoveredAndRetainedTiles(z,ht,Et,Ot,Ht,Te){let Fe={},Ke={},vr=Object.keys(z),Dr=o.now();for(let Fr of vr){let un=z[Fr],Sn=this._tiles[Fr];if(!Sn||Sn.fadeEndTime!==0&&Sn.fadeEndTime<=Dr)continue;let Xt=this.findLoadedParent(un,ht),ae=this.findLoadedSibling(un),_e=Xt||ae||null;_e&&(this._addTile(_e.tileID),Fe[_e.tileID.key]=_e.tileID),Ke[Fr]=un}this._retainLoadedChildren(Ke,Ot,Et,z);for(let Fr in Fe)z[Fr]||(this._coveredTiles[Fr]=!0,z[Fr]=Fe[Fr]);if(Te){let Fr={},un={};for(let Sn of Ht)this._tiles[Sn.key].hasData()?Fr[Sn.key]=Sn:un[Sn.key]=Sn;for(let Sn in un){let Xt=un[Sn].children(this._source.maxzoom);this._tiles[Xt[0].key]&&this._tiles[Xt[1].key]&&this._tiles[Xt[2].key]&&this._tiles[Xt[3].key]&&(Fr[Xt[0].key]=z[Xt[0].key]=Xt[0],Fr[Xt[1].key]=z[Xt[1].key]=Xt[1],Fr[Xt[2].key]=z[Xt[2].key]=Xt[2],Fr[Xt[3].key]=z[Xt[3].key]=Xt[3],delete un[Sn])}for(let Sn in un){let Xt=un[Sn],ae=this.findLoadedParent(Xt,this._source.minzoom),_e=this.findLoadedSibling(Xt),Me=ae||_e||null;if(Me){Fr[Me.tileID.key]=z[Me.tileID.key]=Me.tileID;for(let je in Fr)Fr[je].isChildOf(Me.tileID)&&delete Fr[je]}}for(let Sn in this._tiles)Fr[Sn]||(this._coveredTiles[Sn]=!0)}}update(z,ht){if(!this._sourceLoaded||this._paused)return;let Et;this.transform=z,this.terrain=ht,this.updateCacheSize(z),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Et=z.getVisibleUnwrappedCoordinates(this._source.tileID).map(Dr=>new e.S(Dr.canonical.z,Dr.wrap,Dr.canonical.z,Dr.canonical.x,Dr.canonical.y)):(Et=z.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ht}),this._source.hasTile&&(Et=Et.filter(Dr=>this._source.hasTile(Dr)))):Et=[];let Ot=z.coveringZoomLevel(this._source),Ht=Math.max(Ot-Ge.maxOverzooming,this._source.minzoom),Te=Math.max(Ot+Ge.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Dr={};for(let Fr of Et)if(Fr.canonical.z>this._source.minzoom){let un=Fr.scaledTo(Fr.canonical.z-1);Dr[un.key]=un;let Sn=Fr.scaledTo(Math.max(this._source.minzoom,Math.min(Fr.canonical.z,5)));Dr[Sn.key]=Sn}Et=Et.concat(Object.values(Dr))}let Fe=Et.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Fe&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ke=this._updateRetainedTiles(Et,Ot);ur(this._source.type)&&this._updateCoveredAndRetainedTiles(Ke,Ht,Te,Ot,Et,ht);for(let Dr in Ke)this._tiles[Dr].clearFadeHold();let vr=e.ab(this._tiles,Ke);for(let Dr of vr){let Fr=this._tiles[Dr];Fr.hasSymbolBuckets&&!Fr.holdingForFade()?Fr.setHoldDuration(this.map._fadeDuration):Fr.hasSymbolBuckets&&!Fr.symbolFadeFinished()||this._removeTile(Dr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let z in this._tiles)this._tiles[z].holdingForFade()&&this._removeTile(z)}_updateRetainedTiles(z,ht){var Et;let Ot={},Ht={},Te=Math.max(ht-Ge.maxOverzooming,this._source.minzoom),Fe=Math.max(ht+Ge.maxUnderzooming,this._source.minzoom),Ke={};for(let vr of z){let Dr=this._addTile(vr);Ot[vr.key]=vr,Dr.hasData()||htthis._source.maxzoom){let un=vr.children(this._source.maxzoom)[0],Sn=this.getTile(un);if(Sn&&Sn.hasData()){Ot[un.key]=un;continue}}else{let un=vr.children(this._source.maxzoom);if(Ot[un[0].key]&&Ot[un[1].key]&&Ot[un[2].key]&&Ot[un[3].key])continue}let Fr=Dr.wasRequested();for(let un=vr.overscaledZ-1;un>=Te;--un){let Sn=vr.scaledTo(un);if(Ht[Sn.key])break;if(Ht[Sn.key]=!0,Dr=this.getTile(Sn),!Dr&&Fr&&(Dr=this._addTile(Sn)),Dr){let Xt=Dr.hasData();if((Xt||!(!((Et=this.map)===null||Et===void 0)&&Et.cancelPendingTileRequestsWhileZooming)||Fr)&&(Ot[Sn.key]=Sn),Fr=Dr.wasRequested(),Xt)break}}}return Ot}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let z in this._tiles){let ht=[],Et,Ot=this._tiles[z].tileID;for(;Ot.overscaledZ>0;){if(Ot.key in this._loadedParentTiles){Et=this._loadedParentTiles[Ot.key];break}ht.push(Ot.key);let Ht=Ot.scaledTo(Ot.overscaledZ-1);if(Et=this._getLoadedTile(Ht),Et)break;Ot=Ht}for(let Ht of ht)this._loadedParentTiles[Ht]=Et}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let z in this._tiles){let ht=this._tiles[z].tileID,Et=this._getLoadedTile(ht);this._loadedSiblingTiles[ht.key]=Et}}_addTile(z){let ht=this._tiles[z.key];if(ht)return ht;ht=this._cache.getAndRemove(z),ht&&(this._setTileReloadTimer(z.key,ht),ht.tileID=z,this._state.initializeTileState(ht,this.map?this.map.painter:null),this._cacheTimers[z.key]&&(clearTimeout(this._cacheTimers[z.key]),delete this._cacheTimers[z.key],this._setTileReloadTimer(z.key,ht)));let Et=ht;return ht||(ht=new oe(z,this._source.tileSize*z.overscaleFactor()),this._loadTile(ht,z.key,ht.state)),ht.uses++,this._tiles[z.key]=ht,Et||this._source.fire(new e.k("dataloading",{tile:ht,coord:ht.tileID,dataType:"source"})),ht}_setTileReloadTimer(z,ht){z in this._timers&&(clearTimeout(this._timers[z]),delete this._timers[z]);let Et=ht.getExpiryTimeout();Et&&(this._timers[z]=setTimeout(()=>{this._reloadTile(z,"expired"),delete this._timers[z]},Et))}_removeTile(z){let ht=this._tiles[z];ht&&(ht.uses--,delete this._tiles[z],this._timers[z]&&(clearTimeout(this._timers[z]),delete this._timers[z]),ht.uses>0||(ht.hasData()&&ht.state!=="reloading"?this._cache.add(ht.tileID,ht,ht.getExpiryTimeout()):(ht.aborted=!0,this._abortTile(ht),this._unloadTile(ht))))}_dataHandler(z){let ht=z.sourceDataType;z.dataType==="source"&&ht==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&z.dataType==="source"&&ht==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let z in this._tiles)this._removeTile(z);this._cache.reset()}tilesIn(z,ht,Et){let Ot=[],Ht=this.transform;if(!Ht)return Ot;let Te=Et?Ht.getCameraQueryGeometry(z):z,Fe=z.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),Ke=Te.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),vr=this.getIds(),Dr=1/0,Fr=1/0,un=-1/0,Sn=-1/0;for(let Xt of Ke)Dr=Math.min(Dr,Xt.x),Fr=Math.min(Fr,Xt.y),un=Math.max(un,Xt.x),Sn=Math.max(Sn,Xt.y);for(let Xt=0;Xt=0&&De[1].y+je>=0){let $e=Fe.map(Or=>_e.getTilePoint(Or)),wr=Ke.map(Or=>_e.getTilePoint(Or));Ot.push({tile:ae,tileID:_e,queryGeometry:$e,cameraQueryGeometry:wr,scale:Me})}}return Ot}getVisibleCoordinates(z){let ht=this.getRenderableIds(z).map(Et=>this._tiles[Et].tileID);for(let Et of ht)Et.posMatrix=this.transform.calculatePosMatrix(Et.toUnwrapped());return ht}hasTransition(){if(this._source.hasTransition())return!0;if(ur(this._source.type)){let z=o.now();for(let ht in this._tiles)if(this._tiles[ht].fadeEndTime>=z)return!0}return!1}setFeatureState(z,ht,Et){this._state.updateState(z=z||"_geojsonTileLayer",ht,Et)}removeFeatureState(z,ht,Et){this._state.removeFeatureState(z=z||"_geojsonTileLayer",ht,Et)}getFeatureState(z,ht){return this._state.getState(z=z||"_geojsonTileLayer",ht)}setDependencies(z,ht,Et){let Ot=this._tiles[z];Ot&&Ot.setDependencies(ht,Et)}reloadTilesForDependencies(z,ht){for(let Et in this._tiles)this._tiles[Et].hasDependency(z,ht)&&this._reloadTile(Et,"reloading");this._cache.filter(Et=>!Et.hasDependency(z,ht))}}function cr($t,z){let ht=Math.abs(2*$t.wrap)-+($t.wrap<0),Et=Math.abs(2*z.wrap)-+(z.wrap<0);return $t.overscaledZ-z.overscaledZ||Et-ht||z.canonical.y-$t.canonical.y||z.canonical.x-$t.canonical.x}function ur($t){return $t==="raster"||$t==="image"||$t==="video"}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;class jr{constructor(z,ht){this.reset(z,ht)}reset(z,ht){this.points=z||[],this._distances=[0];for(let Et=1;Et0?(Ot-Te)/Fe:0;return this.points[Ht].mult(1-Ke).add(this.points[ht].mult(Ke))}}function qr($t,z){let ht=!0;return $t==="always"||$t!=="never"&&z!=="never"||(ht=!1),ht}class br{constructor(z,ht,Et){let Ot=this.boxCells=[],Ht=this.circleCells=[];this.xCellCount=Math.ceil(z/Et),this.yCellCount=Math.ceil(ht/Et);for(let Te=0;Tethis.width||Ot<0||ht>this.height)return[];let Ke=[];if(z<=0&&ht<=0&&this.width<=Et&&this.height<=Ot){if(Ht)return[{key:null,x1:z,y1:ht,x2:Et,y2:Ot}];for(let vr=0;vr0}hitTestCircle(z,ht,Et,Ot,Ht){let Te=z-Et,Fe=z+Et,Ke=ht-Et,vr=ht+Et;if(Fe<0||Te>this.width||vr<0||Ke>this.height)return!1;let Dr=[];return this._forEachCell(Te,Ke,Fe,vr,this._queryCellCircle,Dr,{hitTest:!0,overlapMode:Ot,circle:{x:z,y:ht,radius:Et},seenUids:{box:{},circle:{}}},Ht),Dr.length>0}_queryCell(z,ht,Et,Ot,Ht,Te,Fe,Ke){let{seenUids:vr,hitTest:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!vr.box[ae]){vr.box[ae]=!0;let _e=4*ae,Me=this.boxKeys[ae];if(z<=Xt[_e+2]&&ht<=Xt[_e+3]&&Et>=Xt[_e+0]&&Ot>=Xt[_e+1]&&(!Ke||Ke(Me))&&(!Dr||!qr(Fr,Me.overlapMode))&&(Te.push({key:Me,x1:Xt[_e],y1:Xt[_e+1],x2:Xt[_e+2],y2:Xt[_e+3]}),Dr))return!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!vr.circle[ae]){vr.circle[ae]=!0;let _e=3*ae,Me=this.circleKeys[ae];if(this._circleAndRectCollide(Xt[_e],Xt[_e+1],Xt[_e+2],z,ht,Et,Ot)&&(!Ke||Ke(Me))&&(!Dr||!qr(Fr,Me.overlapMode))){let je=Xt[_e],De=Xt[_e+1],$e=Xt[_e+2];if(Te.push({key:Me,x1:je-$e,y1:De-$e,x2:je+$e,y2:De+$e}),Dr)return!0}}}return!1}_queryCellCircle(z,ht,Et,Ot,Ht,Te,Fe,Ke){let{circle:vr,seenUids:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!Dr.box[ae]){Dr.box[ae]=!0;let _e=4*ae,Me=this.boxKeys[ae];if(this._circleAndRectCollide(vr.x,vr.y,vr.radius,Xt[_e+0],Xt[_e+1],Xt[_e+2],Xt[_e+3])&&(!Ke||Ke(Me))&&!qr(Fr,Me.overlapMode))return Te.push(!0),!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!Dr.circle[ae]){Dr.circle[ae]=!0;let _e=3*ae,Me=this.circleKeys[ae];if(this._circlesCollide(Xt[_e],Xt[_e+1],Xt[_e+2],vr.x,vr.y,vr.radius)&&(!Ke||Ke(Me))&&!qr(Fr,Me.overlapMode))return Te.push(!0),!0}}}_forEachCell(z,ht,Et,Ot,Ht,Te,Fe,Ke){let vr=this._convertToXCellCoord(z),Dr=this._convertToYCellCoord(ht),Fr=this._convertToXCellCoord(Et),un=this._convertToYCellCoord(Ot);for(let Sn=vr;Sn<=Fr;Sn++)for(let Xt=Dr;Xt<=un;Xt++)if(Ht.call(this,z,ht,Et,Ot,this.xCellCount*Xt+Sn,Te,Fe,Ke))return}_convertToXCellCoord(z){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(z*this.xScale)))}_convertToYCellCoord(z){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(z*this.yScale)))}_circlesCollide(z,ht,Et,Ot,Ht,Te){let Fe=Ot-z,Ke=Ht-ht,vr=Et+Te;return vr*vr>Fe*Fe+Ke*Ke}_circleAndRectCollide(z,ht,Et,Ot,Ht,Te,Fe){let Ke=(Te-Ot)/2,vr=Math.abs(z-(Ot+Ke));if(vr>Ke+Et)return!1;let Dr=(Fe-Ht)/2,Fr=Math.abs(ht-(Ht+Dr));if(Fr>Dr+Et)return!1;if(vr<=Ke||Fr<=Dr)return!0;let un=vr-Ke,Sn=Fr-Dr;return un*un+Sn*Sn<=Et*Et}}function Xr($t,z,ht,Et,Ot){let Ht=e.H();return z?(e.K(Ht,Ht,[1/Ot,1/Ot,1]),ht||e.ad(Ht,Ht,Et.angle)):e.L(Ht,Et.labelPlaneMatrix,$t),Ht}function nn($t,z,ht,Et,Ot){if(z){let Ht=e.ae($t);return e.K(Ht,Ht,[Ot,Ot,1]),ht||e.ad(Ht,Ht,-Et.angle),Ht}return Et.glCoordMatrix}function Le($t,z,ht,Et){let Ot;Et?(Ot=[$t,z,Et($t,z),1],e.af(Ot,Ot,ht)):(Ot=[$t,z,0,1],mr(Ot,Ot,ht));let Ht=Ot[3];return{point:new e.P(Ot[0]/Ht,Ot[1]/Ht),signedDistanceFromCamera:Ht,isOccluded:!1}}function Gt($t,z){return .5+$t/z*.5}function ne($t,z){return $t.x>=-z[0]&&$t.x<=z[0]&&$t.y>=-z[1]&&$t.y<=z[1]}function Ct($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn,Xt){let ae=Et?$t.textSizeData:$t.iconSizeData,_e=e.ag(ae,ht.transform.zoom),Me=[256/ht.width*2+1,256/ht.height*2+1],je=Et?$t.text.dynamicLayoutVertexArray:$t.icon.dynamicLayoutVertexArray;je.clear();let De=$t.lineVertexArray,$e=Et?$t.text.placedSymbolArray:$t.icon.placedSymbolArray,wr=ht.transform.width/ht.transform.height,Or=!1;for(let Nr=0;Nr<$e.length;Nr++){let en=$e.get(Nr);if(en.hidden||en.writingMode===e.ah.vertical&&!Or){Mr(en.numGlyphs,je);continue}Or=!1;let vn=Le(en.anchorX,en.anchorY,z,Xt);if(!ne(vn.point,Me)){Mr(en.numGlyphs,je);continue}let In=Gt(ht.transform.cameraToCenterDistance,vn.signedDistanceFromCamera),jn=e.ai(ae,_e,en),si=Te?jn/In:jn*In,Wi={getElevation:Xt,labelPlaneMatrix:Ot,lineVertexArray:De,pitchWithMap:Te,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:vr,tileAnchorPoint:new e.P(en.anchorX,en.anchorY),unwrappedTileID:Dr,width:Fr,height:un,translation:Sn},ga=Nt(Wi,en,si,!1,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke);Or=ga.useVertical,(ga.notEnoughRoom||Or||ga.needsFlipping&&Nt(Wi,en,si,!0,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke).notEnoughRoom)&&Mr(en.numGlyphs,je)}Et?$t.text.dynamicLayoutVertexBuffer.updateData(je):$t.icon.dynamicLayoutVertexBuffer.updateData(je)}function gt($t,z,ht,Et,Ot,Ht,Te,Fe){let Ke=Ht.glyphStartIndex+Ht.numGlyphs,vr=Ht.lineStartIndex,Dr=Ht.lineStartIndex+Ht.lineLength,Fr=z.getoffsetX(Ht.glyphStartIndex),un=z.getoffsetX(Ke-1),Sn=or($t*Fr,ht,Et,Ot,Ht.segment,vr,Dr,Fe,Te);if(!Sn)return null;let Xt=or($t*un,ht,Et,Ot,Ht.segment,vr,Dr,Fe,Te);return Xt?Fe.projectionCache.anyProjectionOccluded?null:{first:Sn,last:Xt}:null}function St($t,z,ht,Et){return $t===e.ah.horizontal&&Math.abs(ht.y-z.y)>Math.abs(ht.x-z.x)*Et?{useVertical:!0}:($t===e.ah.vertical?z.yht.x)?{needsFlipping:!0}:null}function Nt($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr){let Fr=ht/24,un=z.lineOffsetX*Fr,Sn=z.lineOffsetY*Fr,Xt;if(z.numGlyphs>1){let ae=z.glyphStartIndex+z.numGlyphs,_e=z.lineStartIndex,Me=z.lineStartIndex+z.lineLength,je=gt(Fr,Fe,un,Sn,Et,z,Dr,$t);if(!je)return{notEnoughRoom:!0};let De=Le(je.first.point.x,je.first.point.y,Te,$t.getElevation).point,$e=Le(je.last.point.x,je.last.point.y,Te,$t.getElevation).point;if(Ot&&!Et){let wr=St(z.writingMode,De,$e,vr);if(wr)return wr}Xt=[je.first];for(let wr=z.glyphStartIndex+1;wr0?De.point:function(Or,Nr,en,vn,In,jn){return re(Or,Nr,en,1,In,jn)}($t.tileAnchorPoint,je,_e,0,Ht,$t),wr=St(z.writingMode,_e,$e,vr);if(wr)return wr}let ae=or(Fr*Fe.getoffsetX(z.glyphStartIndex),un,Sn,Et,z.segment,z.lineStartIndex,z.lineStartIndex+z.lineLength,$t,Dr);if(!ae||$t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Xt=[ae]}for(let ae of Xt)e.aj(Ke,ae.point,ae.angle);return{}}function re($t,z,ht,Et,Ot,Ht){let Te=$t.add($t.sub(z)._unit()),Fe=Ot!==void 0?Le(Te.x,Te.y,Ot,Ht.getElevation).point:ke(Te.x,Te.y,Ht).point,Ke=ht.sub(Fe);return ht.add(Ke._mult(Et/Ke.mag()))}function le($t,z,ht){let Et=z.projectionCache;if(Et.projections[$t])return Et.projections[$t];let Ot=new e.P(z.lineVertexArray.getx($t),z.lineVertexArray.gety($t)),Ht=ke(Ot.x,Ot.y,z);if(Ht.signedDistanceFromCamera>0)return Et.projections[$t]=Ht.point,Et.anyProjectionOccluded=Et.anyProjectionOccluded||Ht.isOccluded,Ht.point;let Te=$t-ht.direction;return function(Fe,Ke,vr,Dr,Fr){return re(Fe,Ke,vr,Dr,void 0,Fr)}(ht.distanceFromAnchor===0?z.tileAnchorPoint:new e.P(z.lineVertexArray.getx(Te),z.lineVertexArray.gety(Te)),Ot,ht.previousVertex,ht.absOffsetX-ht.distanceFromAnchor+1,z)}function ke($t,z,ht){let Et=$t+ht.translation[0],Ot=z+ht.translation[1],Ht;return!ht.pitchWithMap&&ht.projection.useSpecialProjectionForSymbols?(Ht=ht.projection.projectTileCoordinates(Et,Ot,ht.unwrappedTileID,ht.getElevation),Ht.point.x=(.5*Ht.point.x+.5)*ht.width,Ht.point.y=(.5*-Ht.point.y+.5)*ht.height):(Ht=Le(Et,Ot,ht.labelPlaneMatrix,ht.getElevation),Ht.isOccluded=!1),Ht}function Ue($t,z,ht){return $t._unit()._perp()._mult(z*ht)}function qe($t,z,ht,Et,Ot,Ht,Te,Fe,Ke){if(Fe.projectionCache.offsets[$t])return Fe.projectionCache.offsets[$t];let vr=ht.add(z);if($t+Ke.direction=Ot)return Fe.projectionCache.offsets[$t]=vr,vr;let Dr=le($t+Ke.direction,Fe,Ke),Fr=Ue(Dr.sub(ht),Te,Ke.direction),un=ht.add(Fr),Sn=Dr.add(Fr);return Fe.projectionCache.offsets[$t]=e.ak(Ht,vr,un,Sn)||vr,Fe.projectionCache.offsets[$t]}function or($t,z,ht,Et,Ot,Ht,Te,Fe,Ke){let vr=Et?$t-z:$t+z,Dr=vr>0?1:-1,Fr=0;Et&&(Dr*=-1,Fr=Math.PI),Dr<0&&(Fr+=Math.PI);let un,Sn=Dr>0?Ht+Ot:Ht+Ot+1;Fe.projectionCache.cachedAnchorPoint?un=Fe.projectionCache.cachedAnchorPoint:(un=ke(Fe.tileAnchorPoint.x,Fe.tileAnchorPoint.y,Fe).point,Fe.projectionCache.cachedAnchorPoint=un);let Xt,ae,_e=un,Me=un,je=0,De=0,$e=Math.abs(vr),wr=[],Or;for(;je+De<=$e;){if(Sn+=Dr,Sn=Te)return null;je+=De,Me=_e,ae=Xt;let vn={absOffsetX:$e,direction:Dr,distanceFromAnchor:je,previousVertex:Me};if(_e=le(Sn,Fe,vn),ht===0)wr.push(Me),Or=_e.sub(Me);else{let In,jn=_e.sub(Me);In=jn.mag()===0?Ue(le(Sn+Dr,Fe,vn).sub(_e),ht,Dr):Ue(jn,ht,Dr),ae||(ae=Me.add(In)),Xt=qe(Sn,In,_e,Ht,Te,ae,ht,Fe,vn),wr.push(ae),Or=Xt.sub(ae)}De=Or.mag()}let Nr=Or._mult(($e-je)/De)._add(ae||Me),en=Fr+Math.atan2(_e.y-Me.y,_e.x-Me.x);return wr.push(Nr),{point:Nr,angle:Ke?en:0,path:wr}}let Sr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Mr($t,z){for(let ht=0;ht<$t;ht++){let Et=z.length;z.resize(Et+4),z.float32.set(Sr,3*Et)}}function mr($t,z,ht){let Et=z[0],Ot=z[1];return $t[0]=ht[0]*Et+ht[4]*Ot+ht[12],$t[1]=ht[1]*Et+ht[5]*Ot+ht[13],$t[3]=ht[3]*Et+ht[7]*Ot+ht[15],$t}let Qr=100;class Wn{constructor(z,ht,Et=new br(z.width+200,z.height+200,25),Ot=new br(z.width+200,z.height+200,25)){this.transform=z,this.mapProjection=ht,this.grid=Et,this.ignoredGrid=Ot,this.pitchFactor=Math.cos(z._pitch)*z.cameraToCenterDistance,this.screenRightBoundary=z.width+Qr,this.screenBottomBoundary=z.height+Qr,this.gridRightBoundary=z.width+200,this.gridBottomBoundary=z.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr){let un=z.anchorPointX+Ke[0],Sn=z.anchorPointY+Ke[1],Xt=this.projectAndGetPerspectiveRatio(Ot,un,Sn,Ht,Dr),ae=Et*Xt.perspectiveRatio,_e;if(Te||Fe)_e=this._projectCollisionBox(z,ae,Ot,Ht,Te,Fe,Ke,Xt,Dr,Fr);else{let wr=Xt.point.x+(Fr?Fr.x*ae:0),Or=Xt.point.y+(Fr?Fr.y*ae:0);_e={allPointsOccluded:!1,box:[wr+z.x1*ae,Or+z.y1*ae,wr+z.x2*ae,Or+z.y2*ae]}}let[Me,je,De,$e]=_e.box;return this.mapProjection.useSpecialProjectionForSymbols&&(Te?_e.allPointsOccluded:this.mapProjection.isOccluded(un,Sn,Ht))||Xt.perspectiveRatio=1;So--)Ma.push(ga.path[So]);for(let So=1;Sods.signedDistanceFromCamera<=0)?[]:So.map(ds=>ds.point)}let No=[];if(Ma.length>0){let So=Ma[0].clone(),ds=Ma[0].clone();for(let fl=1;fl=jn.x&&ds.x<=si.x&&So.y>=jn.y&&ds.y<=si.y?[Ma]:ds.xsi.x||ds.ysi.y?[]:e.al([Ma],jn.x,jn.y,si.x,si.y)}for(let So of No){Wi.reset(So,.25*In);let ds=0;ds=Wi.length<=.5*In?1:Math.ceil(Wi.paddedLength/lo)+1;for(let fl=0;flLe(Ot.x,Ot.y,Et,ht.getElevation))}queryRenderedSymbols(z){if(z.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ht=[],Et=1/0,Ot=1/0,Ht=-1/0,Te=-1/0;for(let Dr of z){let Fr=new e.P(Dr.x+Qr,Dr.y+Qr);Et=Math.min(Et,Fr.x),Ot=Math.min(Ot,Fr.y),Ht=Math.max(Ht,Fr.x),Te=Math.max(Te,Fr.y),ht.push(Fr)}let Fe=this.grid.query(Et,Ot,Ht,Te).concat(this.ignoredGrid.query(Et,Ot,Ht,Te)),Ke={},vr={};for(let Dr of Fe){let Fr=Dr.key;if(Ke[Fr.bucketInstanceId]===void 0&&(Ke[Fr.bucketInstanceId]={}),Ke[Fr.bucketInstanceId][Fr.featureIndex])continue;let un=[new e.P(Dr.x1,Dr.y1),new e.P(Dr.x2,Dr.y1),new e.P(Dr.x2,Dr.y2),new e.P(Dr.x1,Dr.y2)];e.am(ht,un)&&(Ke[Fr.bucketInstanceId][Fr.featureIndex]=!0,vr[Fr.bucketInstanceId]===void 0&&(vr[Fr.bucketInstanceId]=[]),vr[Fr.bucketInstanceId].push(Fr.featureIndex))}return vr}insertCollisionBox(z,ht,Et,Ot,Ht,Te){(Et?this.ignoredGrid:this.grid).insert({bucketInstanceId:Ot,featureIndex:Ht,collisionGroupID:Te,overlapMode:ht},z[0],z[1],z[2],z[3])}insertCollisionCircles(z,ht,Et,Ot,Ht,Te){let Fe=Et?this.ignoredGrid:this.grid,Ke={bucketInstanceId:Ot,featureIndex:Ht,collisionGroupID:Te,overlapMode:ht};for(let vr=0;vr=this.screenRightBoundary||Otthis.screenBottomBoundary}isInsideGrid(z,ht,Et,Ot){return Et>=0&&z=0&&htthis.projectAndGetPerspectiveRatio(Et,In.x,In.y,Ot,vr));en=vn.some(In=>!In.isOccluded),Nr=vn.map(In=>In.point)}else en=!0;return{box:e.ao(Nr),allPointsOccluded:!en}}}function qn($t,z,ht){return z*(e.X/($t.tileSize*Math.pow(2,ht-$t.tileID.overscaledZ)))}class ei{constructor(z,ht,Et,Ot){this.opacity=z?Math.max(0,Math.min(1,z.opacity+(z.placed?ht:-ht))):Ot&&Et?1:0,this.placed=Et}isHidden(){return this.opacity===0&&!this.placed}}class Di{constructor(z,ht,Et,Ot,Ht){this.text=new ei(z?z.text:null,ht,Et,Ht),this.icon=new ei(z?z.icon:null,ht,Ot,Ht)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ui{constructor(z,ht,Et){this.text=z,this.icon=ht,this.skipFade=Et}}class Gn{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class ua{constructor(z,ht,Et,Ot,Ht){this.bucketInstanceId=z,this.featureIndex=ht,this.sourceLayerIndex=Et,this.bucketIndex=Ot,this.tileID=Ht}}class Yi{constructor(z){this.crossSourceCollisions=z,this.maxGroupID=0,this.collisionGroups={}}get(z){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[z]){let ht=++this.maxGroupID;this.collisionGroups[z]={ID:ht,predicate:Et=>Et.collisionGroupID===ht}}return this.collisionGroups[z]}}function We($t,z,ht,Et,Ot){let{horizontalAlign:Ht,verticalAlign:Te}=e.au($t);return new e.P(-(Ht-.5)*z+Et[0]*Ot,-(Te-.5)*ht+Et[1]*Ot)}class nr{constructor(z,ht,Et,Ot,Ht,Te){this.transform=z.clone(),this.terrain=Et,this.collisionIndex=new Wn(this.transform,ht),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Ot,this.retainedQueryData={},this.collisionGroups=new Yi(Ht),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Te,Te&&(Te.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(z){let ht=this.terrain;return ht?(Et,Ot)=>ht.getElevation(z,Et,Ot):null}getBucketParts(z,ht,Et,Ot){let Ht=Et.getBucket(ht),Te=Et.latestFeatureIndex;if(!Ht||!Te||ht.id!==Ht.layerIds[0])return;let Fe=Et.collisionBoxArray,Ke=Ht.layers[0].layout,vr=Ht.layers[0].paint,Dr=Math.pow(2,this.transform.zoom-Et.tileID.overscaledZ),Fr=Et.tileSize/e.X,un=Et.tileID.toUnwrapped(),Sn=this.transform.calculatePosMatrix(un),Xt=Ke.get("text-pitch-alignment")==="map",ae=Ke.get("text-rotation-alignment")==="map",_e=qn(Et,1,this.transform.zoom),Me=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("text-translate"),vr.get("text-translate-anchor")),je=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("icon-translate"),vr.get("icon-translate-anchor")),De=Xr(Sn,Xt,ae,this.transform,_e),$e=null;if(Xt){let Or=nn(Sn,Xt,ae,this.transform,_e);$e=e.L([],this.transform.labelPlaneMatrix,Or)}this.retainedQueryData[Ht.bucketInstanceId]=new ua(Ht.bucketInstanceId,Te,Ht.sourceLayerIndex,Ht.index,Et.tileID);let wr={bucket:Ht,layout:Ke,translationText:Me,translationIcon:je,posMatrix:Sn,unwrappedTileID:un,textLabelPlaneMatrix:De,labelToScreenMatrix:$e,scale:Dr,textPixelRatio:Fr,holdingForFade:Et.holdingForFade(),collisionBoxArray:Fe,partiallyEvaluatedTextSize:e.ag(Ht.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ht.sourceID)};if(Ot)for(let Or of Ht.sortKeyRanges){let{sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn}=Or;z.push({sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn,parameters:wr})}else z.push({symbolInstanceStart:0,symbolInstanceEnd:Ht.symbolInstances.length,parameters:wr})}attemptAnchorPlacement(z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,_e,Me,je,De){let $e=e.aq[z.textAnchor],wr=[z.textOffset0,z.textOffset1],Or=We($e,Et,Ot,wr,Ht),Nr=this.collisionIndex.placeCollisionBox(ht,un,Ke,vr,Dr,Fe,Te,_e,Fr.predicate,De,Or);if((!je||this.collisionIndex.placeCollisionBox(je,un,Ke,vr,Dr,Fe,Te,Me,Fr.predicate,De,Or).placeable)&&Nr.placeable){let en;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID].text&&(en=this.prevPlacement.variableOffsets[Sn.crossTileID].anchor),Sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sn.crossTileID]={textOffset:wr,width:Et,height:Ot,anchor:$e,textBoxScale:Ht,prevAnchor:en},this.markUsedJustification(Xt,$e,Sn,ae),Xt.allowVerticalPlacement&&(this.markUsedOrientation(Xt,ae,Sn),this.placedOrientations[Sn.crossTileID]=ae),{shift:Or,placedGlyphBoxes:Nr}}}placeLayerBucketPart(z,ht,Et){let{bucket:Ot,layout:Ht,translationText:Te,translationIcon:Fe,posMatrix:Ke,unwrappedTileID:vr,textLabelPlaneMatrix:Dr,labelToScreenMatrix:Fr,textPixelRatio:un,holdingForFade:Sn,collisionBoxArray:Xt,partiallyEvaluatedTextSize:ae,collisionGroup:_e}=z.parameters,Me=Ht.get("text-optional"),je=Ht.get("icon-optional"),De=e.ar(Ht,"text-overlap","text-allow-overlap"),$e=De==="always",wr=e.ar(Ht,"icon-overlap","icon-allow-overlap"),Or=wr==="always",Nr=Ht.get("text-rotation-alignment")==="map",en=Ht.get("text-pitch-alignment")==="map",vn=Ht.get("icon-text-fit")!=="none",In=Ht.get("symbol-z-order")==="viewport-y",jn=$e&&(Or||!Ot.hasIconData()||je),si=Or&&($e||!Ot.hasTextData()||Me);!Ot.collisionArrays&&Xt&&Ot.deserializeCollisionBoxes(Xt);let Wi=this._getTerrainElevationFunc(this.retainedQueryData[Ot.bucketInstanceId].tileID),ga=(pa,Ma,lo)=>{var No,So;if(ht[pa.crossTileID])return;if(Sn)return void(this.placements[pa.crossTileID]=new ui(!1,!1,!1));let ds=!1,fl=!1,vl=!0,Ds=null,wl={box:null,placeable:!1,offscreen:null},Lu={placeable:!1},gu=null,$s=null,Zs=null,Yu=0,dc=0,$c=0;Ma.textFeatureIndex?Yu=Ma.textFeatureIndex:pa.useRuntimeCollisionCircles&&(Yu=pa.featureIndex),Ma.verticalTextFeatureIndex&&(dc=Ma.verticalTextFeatureIndex);let At=Ma.textBox;if(At){let Pe=Er=>{let rn=e.ah.horizontal;if(Ot.allowVerticalPlacement&&!Er&&this.prevPlacement){let Jr=this.prevPlacement.placedOrientations[pa.crossTileID];Jr&&(this.placedOrientations[pa.crossTileID]=Jr,rn=Jr,this.markUsedOrientation(Ot,rn,pa))}return rn},Ne=(Er,rn)=>{if(Ot.allowVerticalPlacement&&pa.numVerticalGlyphVertices>0&&Ma.verticalTextBox){for(let Jr of Ot.writingModes)if(Jr===e.ah.vertical?(wl=rn(),Lu=wl):wl=Er(),wl&&wl.placeable)break}else wl=Er()},sr=pa.textAnchorOffsetStartIndex,ar=pa.textAnchorOffsetEndIndex;if(ar===sr){let Er=(rn,Jr)=>{let xn=this.collisionIndex.placeCollisionBox(rn,De,un,Ke,vr,en,Nr,Te,_e.predicate,Wi);return xn&&xn.placeable&&(this.markUsedOrientation(Ot,Jr,pa),this.placedOrientations[pa.crossTileID]=Jr),xn};Ne(()=>Er(At,e.ah.horizontal),()=>{let rn=Ma.verticalTextBox;return Ot.allowVerticalPlacement&&pa.numVerticalGlyphVertices>0&&rn?Er(rn,e.ah.vertical):{box:null,offscreen:null}}),Pe(wl&&wl.placeable)}else{let Er=e.aq[(So=(No=this.prevPlacement)===null||No===void 0?void 0:No.variableOffsets[pa.crossTileID])===null||So===void 0?void 0:So.anchor],rn=(xn,zn,On)=>{let $i=xn.x2-xn.x1,Vn=xn.y2-xn.y1,bi=pa.textBoxScale,Pi=vn&&wr==="never"?zn:null,ji=null,Ki=De==="never"?1:2,Jn="never";Er&&Ki++;for(let Ua=0;Uarn(At,Ma.iconBox,e.ah.horizontal),()=>{let xn=Ma.verticalTextBox;return Ot.allowVerticalPlacement&&(!wl||!wl.placeable)&&pa.numVerticalGlyphVertices>0&&xn?rn(xn,Ma.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),wl&&(ds=wl.placeable,vl=wl.offscreen);let Jr=Pe(wl&&wl.placeable);if(!ds&&this.prevPlacement){let xn=this.prevPlacement.variableOffsets[pa.crossTileID];xn&&(this.variableOffsets[pa.crossTileID]=xn,this.markUsedJustification(Ot,xn.anchor,pa,Jr))}}}if(gu=wl,ds=gu&&gu.placeable,vl=gu&&gu.offscreen,pa.useRuntimeCollisionCircles){let Pe=Ot.text.placedSymbolArray.get(pa.centerJustifiedTextSymbolIndex),Ne=e.ai(Ot.textSizeData,ae,Pe),sr=Ht.get("text-padding");$s=this.collisionIndex.placeCollisionCircles(De,Pe,Ot.lineVertexArray,Ot.glyphOffsetArray,Ne,Ke,vr,Dr,Fr,Et,en,_e.predicate,pa.collisionCircleDiameter,sr,Te,Wi),$s.circles.length&&$s.collisionDetected&&!Et&&e.w("Collisions detected, but collision boxes are not shown"),ds=$e||$s.circles.length>0&&!$s.collisionDetected,vl=vl&&$s.offscreen}if(Ma.iconFeatureIndex&&($c=Ma.iconFeatureIndex),Ma.iconBox){let Pe=Ne=>this.collisionIndex.placeCollisionBox(Ne,wr,un,Ke,vr,en,Nr,Fe,_e.predicate,Wi,vn&&Ds?Ds:void 0);Lu&&Lu.placeable&&Ma.verticalIconBox?(Zs=Pe(Ma.verticalIconBox),fl=Zs.placeable):(Zs=Pe(Ma.iconBox),fl=Zs.placeable),vl=vl&&Zs.offscreen}let Ut=Me||pa.numHorizontalGlyphVertices===0&&pa.numVerticalGlyphVertices===0,ue=je||pa.numIconVertices===0;Ut||ue?ue?Ut||(fl=fl&&ds):ds=fl&&ds:fl=ds=fl&&ds;let Se=fl&&Zs.placeable;if(ds&&gu.placeable&&this.collisionIndex.insertCollisionBox(gu.box,De,Ht.get("text-ignore-placement"),Ot.bucketInstanceId,Lu&&Lu.placeable&&dc?dc:Yu,_e.ID),Se&&this.collisionIndex.insertCollisionBox(Zs.box,wr,Ht.get("icon-ignore-placement"),Ot.bucketInstanceId,$c,_e.ID),$s&&ds&&this.collisionIndex.insertCollisionCircles($s.circles,De,Ht.get("text-ignore-placement"),Ot.bucketInstanceId,Yu,_e.ID),Et&&this.storeCollisionData(Ot.bucketInstanceId,lo,Ma,gu,Zs,$s),pa.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Ot.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[pa.crossTileID]=new ui(ds||jn,fl||si,vl||Ot.justReloaded),ht[pa.crossTileID]=!0};if(In){if(z.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let pa=Ot.getSortedSymbolIndexes(this.transform.angle);for(let Ma=pa.length-1;Ma>=0;--Ma){let lo=pa[Ma];ga(Ot.symbolInstances.get(lo),Ot.collisionArrays[lo],lo)}}else for(let pa=z.symbolInstanceStart;pa=0&&(z.text.placedSymbolArray.get(Fe).crossTileID=Ht>=0&&Fe!==Ht?0:Et.crossTileID)}markUsedOrientation(z,ht,Et){let Ot=ht===e.ah.horizontal||ht===e.ah.horizontalOnly?ht:0,Ht=ht===e.ah.vertical?ht:0,Te=[Et.leftJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.rightJustifiedTextSymbolIndex];for(let Fe of Te)z.text.placedSymbolArray.get(Fe).placedOrientation=Ot;Et.verticalPlacedTextSymbolIndex&&(z.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).placedOrientation=Ht)}commit(z){this.commitTime=z,this.zoomAtLastRecencyCheck=this.transform.zoom;let ht=this.prevPlacement,Et=!1;this.prevZoomAdjustment=ht?ht.zoomAdjustment(this.transform.zoom):0;let Ot=ht?ht.symbolFadeChange(z):1,Ht=ht?ht.opacities:{},Te=ht?ht.variableOffsets:{},Fe=ht?ht.placedOrientations:{};for(let Ke in this.placements){let vr=this.placements[Ke],Dr=Ht[Ke];Dr?(this.opacities[Ke]=new Di(Dr,Ot,vr.text,vr.icon),Et=Et||vr.text!==Dr.text.placed||vr.icon!==Dr.icon.placed):(this.opacities[Ke]=new Di(null,Ot,vr.text,vr.icon,vr.skipFade),Et=Et||vr.text||vr.icon)}for(let Ke in Ht){let vr=Ht[Ke];if(!this.opacities[Ke]){let Dr=new Di(vr,Ot,!1,!1);Dr.isHidden()||(this.opacities[Ke]=Dr,Et=Et||vr.text.placed||vr.icon.placed)}}for(let Ke in Te)this.variableOffsets[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.variableOffsets[Ke]=Te[Ke]);for(let Ke in Fe)this.placedOrientations[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.placedOrientations[Ke]=Fe[Ke]);if(ht&&ht.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Et?this.lastPlacementChangeTime=z:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ht?ht.lastPlacementChangeTime:z)}updateLayerOpacities(z,ht){let Et={};for(let Ot of ht){let Ht=Ot.getBucket(z);Ht&&Ot.latestFeatureIndex&&z.id===Ht.layerIds[0]&&this.updateBucketOpacities(Ht,Ot.tileID,Et,Ot.collisionBoxArray)}}updateBucketOpacities(z,ht,Et,Ot){z.hasTextData()&&(z.text.opacityVertexArray.clear(),z.text.hasVisibleVertices=!1),z.hasIconData()&&(z.icon.opacityVertexArray.clear(),z.icon.hasVisibleVertices=!1),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexArray.clear(),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexArray.clear();let Ht=z.layers[0],Te=Ht.layout,Fe=new Di(null,0,!1,!1,!0),Ke=Te.get("text-allow-overlap"),vr=Te.get("icon-allow-overlap"),Dr=Ht._unevaluatedLayout.hasValue("text-variable-anchor")||Ht._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Fr=Te.get("text-rotation-alignment")==="map",un=Te.get("text-pitch-alignment")==="map",Sn=Te.get("icon-text-fit")!=="none",Xt=new Di(null,0,Ke&&(vr||!z.hasIconData()||Te.get("icon-optional")),vr&&(Ke||!z.hasTextData()||Te.get("text-optional")),!0);!z.collisionArrays&&Ot&&(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData())&&z.deserializeCollisionBoxes(Ot);let ae=(Me,je,De)=>{for(let $e=0;$e0,en=this.placedOrientations[je.crossTileID],vn=en===e.ah.vertical,In=en===e.ah.horizontal||en===e.ah.horizontalOnly;if(De>0||$e>0){let si=Ni(Or.text);ae(z.text,De,vn?Hi:si),ae(z.text,$e,In?Hi:si);let Wi=Or.text.isHidden();[je.rightJustifiedTextSymbolIndex,je.centerJustifiedTextSymbolIndex,je.leftJustifiedTextSymbolIndex].forEach(Ma=>{Ma>=0&&(z.text.placedSymbolArray.get(Ma).hidden=Wi||vn?1:0)}),je.verticalPlacedTextSymbolIndex>=0&&(z.text.placedSymbolArray.get(je.verticalPlacedTextSymbolIndex).hidden=Wi||In?1:0);let ga=this.variableOffsets[je.crossTileID];ga&&this.markUsedJustification(z,ga.anchor,je,en);let pa=this.placedOrientations[je.crossTileID];pa&&(this.markUsedJustification(z,"left",je,pa),this.markUsedOrientation(z,pa,je))}if(Nr){let si=Ni(Or.icon),Wi=!(Sn&&je.verticalPlacedIconSymbolIndex&&vn);je.placedIconSymbolIndex>=0&&(ae(z.icon,je.numIconVertices,Wi?si:Hi),z.icon.placedSymbolArray.get(je.placedIconSymbolIndex).hidden=Or.icon.isHidden()),je.verticalPlacedIconSymbolIndex>=0&&(ae(z.icon,je.numVerticalIconVertices,Wi?Hi:si),z.icon.placedSymbolArray.get(je.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let jn=_e&&_e.has(Me)?_e.get(Me):{text:null,icon:null};if(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData()){let si=z.collisionArrays[Me];if(si){let Wi=new e.P(0,0);if(si.textBox||si.verticalTextBox){let ga=!0;if(Dr){let pa=this.variableOffsets[wr];pa?(Wi=We(pa.anchor,pa.width,pa.height,pa.textOffset,pa.textBoxScale),Fr&&Wi._rotate(un?this.transform.angle:-this.transform.angle)):ga=!1}if(si.textBox||si.verticalTextBox){let pa;si.textBox&&(pa=vn),si.verticalTextBox&&(pa=In),dr(z.textCollisionBox.collisionVertexArray,Or.text.placed,!ga||pa,jn.text,Wi.x,Wi.y)}}if(si.iconBox||si.verticalIconBox){let ga=!!(!In&&si.verticalIconBox),pa;si.iconBox&&(pa=ga),si.verticalIconBox&&(pa=!ga),dr(z.iconCollisionBox.collisionVertexArray,Or.icon.placed,pa,jn.icon,Sn?Wi.x:0,Sn?Wi.y:0)}}}}if(z.sortFeatures(this.transform.angle),this.retainedQueryData[z.bucketInstanceId]&&(this.retainedQueryData[z.bucketInstanceId].featureSortOrder=z.featureSortOrder),z.hasTextData()&&z.text.opacityVertexBuffer&&z.text.opacityVertexBuffer.updateData(z.text.opacityVertexArray),z.hasIconData()&&z.icon.opacityVertexBuffer&&z.icon.opacityVertexBuffer.updateData(z.icon.opacityVertexArray),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexBuffer&&z.iconCollisionBox.collisionVertexBuffer.updateData(z.iconCollisionBox.collisionVertexArray),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexBuffer&&z.textCollisionBox.collisionVertexBuffer.updateData(z.textCollisionBox.collisionVertexArray),z.text.opacityVertexArray.length!==z.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${z.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${z.text.layoutVertexArray.length}) / 4`);if(z.icon.opacityVertexArray.length!==z.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${z.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${z.icon.layoutVertexArray.length}) / 4`);if(z.bucketInstanceId in this.collisionCircleArrays){let Me=this.collisionCircleArrays[z.bucketInstanceId];z.placementInvProjMatrix=Me.invProjMatrix,z.placementViewportMatrix=Me.viewportMatrix,z.collisionCircleArray=Me.circles,delete this.collisionCircleArrays[z.bucketInstanceId]}}symbolFadeChange(z){return this.fadeDuration===0?1:(z-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(z){return Math.max(0,(this.transform.zoom-z)/1.5)}hasTransitions(z){return this.stale||z-this.lastPlacementChangeTimez}setStale(){this.stale=!0}}function dr($t,z,ht,Et,Ot,Ht){Et&&Et.length!==0||(Et=[0,0,0,0]);let Te=Et[0]-Qr,Fe=Et[1]-Qr,Ke=Et[2]-Qr,vr=Et[3]-Qr;$t.emplaceBack(z?1:0,ht?1:0,Ot||0,Ht||0,Te,Fe),$t.emplaceBack(z?1:0,ht?1:0,Ot||0,Ht||0,Ke,Fe),$t.emplaceBack(z?1:0,ht?1:0,Ot||0,Ht||0,Ke,vr),$t.emplaceBack(z?1:0,ht?1:0,Ot||0,Ht||0,Te,vr)}let _r=Math.pow(2,25),tn=Math.pow(2,24),Cn=Math.pow(2,17),Tn=Math.pow(2,16),Mn=Math.pow(2,9),mi=Math.pow(2,8),Mi=Math.pow(2,1);function Ni($t){if($t.opacity===0&&!$t.placed)return 0;if($t.opacity===1&&$t.placed)return 4294967295;let z=$t.placed?1:0,ht=Math.floor(127*$t.opacity);return ht*_r+z*tn+ht*Cn+z*Tn+ht*Mn+z*mi+ht*Mi+z}let Hi=0;function Ji(){return{isOccluded:($t,z,ht)=>!1,getPitchedTextCorrection:($t,z,ht)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates($t,z,ht,Et){throw new Error("Not implemented.")},translatePosition:($t,z,ht,Et)=>function(Ot,Ht,Te,Fe,Ke=!1){if(!Te[0]&&!Te[1])return[0,0];let vr=Ke?Fe==="map"?Ot.angle:0:Fe==="viewport"?-Ot.angle:0;if(vr){let Dr=Math.sin(vr),Fr=Math.cos(vr);Te=[Te[0]*Fr-Te[1]*Dr,Te[0]*Dr+Te[1]*Fr]}return[Ke?Te[0]:qn(Ht,Te[0],Ot.zoom),Ke?Te[1]:qn(Ht,Te[1],Ot.zoom)]}($t,z,ht,Et),getCircleRadiusCorrection:$t=>1}}class di{constructor(z){this._sortAcrossTiles=z.layout.get("symbol-z-order")!=="viewport-y"&&!z.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(z,ht,Et,Ot,Ht){let Te=this._bucketParts;for(;this._currentTileIndexFe.sortKey-Ke.sortKey));this._currentPartIndex!this._forceFullPlacement&&o.now()-Ot>2;for(;this._currentPlacementIndex>=0;){let Te=ht[z[this._currentPlacementIndex]],Fe=this.placement.collisionIndex.transform.zoom;if(Te.type==="symbol"&&(!Te.minzoom||Te.minzoom<=Fe)&&(!Te.maxzoom||Te.maxzoom>Fe)){if(this._inProgressLayer||(this._inProgressLayer=new di(Te)),this._inProgressLayer.continuePlacement(Et[Te.source],this.placement,this._showCollisionBoxes,Te,Ht))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(z){return this.placement.commit(z),this.placement}}let qa=512/e.X/2;class Oe{constructor(z,ht,Et){this.tileID=z,this.bucketInstanceId=Et,this._symbolsByKey={};let Ot=new Map;for(let Ht=0;Ht({x:Math.floor(Ke.anchorX*qa),y:Math.floor(Ke.anchorY*qa)})),crossTileIDs:Te.map(Ke=>Ke.crossTileID)};if(Fe.positions.length>128){let Ke=new e.av(Fe.positions.length,16,Uint16Array);for(let{x:vr,y:Dr}of Fe.positions)Ke.add(vr,Dr);Ke.finish(),delete Fe.positions,Fe.index=Ke}this._symbolsByKey[Ht]=Fe}}getScaledCoordinates(z,ht){let{x:Et,y:Ot,z:Ht}=this.tileID.canonical,{x:Te,y:Fe,z:Ke}=ht.canonical,vr=qa/Math.pow(2,Ke-Ht),Dr=(Fe*e.X+z.anchorY)*vr,Fr=Ot*e.X*qa;return{x:Math.floor((Te*e.X+z.anchorX)*vr-Et*e.X*qa),y:Math.floor(Dr-Fr)}}findMatches(z,ht,Et){let Ot=this.tileID.canonical.zz)}}class ze{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Br{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(z){let ht=Math.round((z-this.lng)/360);if(ht!==0)for(let Et in this.indexes){let Ot=this.indexes[Et],Ht={};for(let Te in Ot){let Fe=Ot[Te];Fe.tileID=Fe.tileID.unwrapTo(Fe.tileID.wrap+ht),Ht[Fe.tileID.key]=Fe}this.indexes[Et]=Ht}this.lng=z}addBucket(z,ht,Et){if(this.indexes[z.overscaledZ]&&this.indexes[z.overscaledZ][z.key]){if(this.indexes[z.overscaledZ][z.key].bucketInstanceId===ht.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(z.overscaledZ,this.indexes[z.overscaledZ][z.key])}for(let Ht=0;Htz.overscaledZ)for(let Fe in Te){let Ke=Te[Fe];Ke.tileID.isChildOf(z)&&Ke.findMatches(ht.symbolInstances,z,Ot)}else{let Fe=Te[z.scaledTo(Number(Ht)).key];Fe&&Fe.findMatches(ht.symbolInstances,z,Ot)}}for(let Ht=0;Ht{ht[Et]=!0});for(let Et in this.layerIndexes)ht[Et]||delete this.layerIndexes[Et]}}let Gr=($t,z)=>e.t($t,z&&z.filter(ht=>ht.identifier!=="source.canvas")),Rr=e.aw();class Yr extends e.E{constructor(z,ht={}){super(),this._rtlPluginLoaded=()=>{for(let Et in this.sourceCaches){let Ot=this.sourceCaches[Et].getSource().type;Ot!=="vector"&&Ot!=="geojson"||this.sourceCaches[Et].reload()}},this.map=z,this.dispatcher=new rt(pt(),z._getMapId()),this.dispatcher.registerMessageHandler("GG",(Et,Ot)=>this.getGlyphs(Et,Ot)),this.dispatcher.registerMessageHandler("GI",(Et,Ot)=>this.getImages(Et,Ot)),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new V(z._requestManager,ht.localIdeographFontFamily),this.lineAtlas=new J(256,512),this.crossTileSymbolIndex=new $r,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),ve().on(Lt,this._rtlPluginLoaded),this.on("data",Et=>{if(Et.dataType!=="source"||Et.sourceDataType!=="metadata")return;let Ot=this.sourceCaches[Et.sourceId];if(!Ot)return;let Ht=Ot.getSource();if(Ht&&Ht.vectorLayerIds)for(let Te in this._layers){let Fe=this._layers[Te];Fe.source===Ht.id&&this._validateLayer(Fe)}})}loadURL(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),ht.validate=typeof ht.validate!="boolean"||ht.validate;let Ot=this.map._requestManager.transformRequest(z,"Style");this._loadStyleRequest=new AbortController;let Ht=this._loadStyleRequest;e.h(Ot,this._loadStyleRequest).then(Te=>{this._loadStyleRequest=null,this._load(Te.data,ht,Et)}).catch(Te=>{this._loadStyleRequest=null,Te&&!Ht.signal.aborted&&this.fire(new e.j(Te))})}loadJSON(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ht.validate=ht.validate!==!1,this._load(z,ht,Et)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Rr,{validate:!1})}_load(z,ht,Et){var Ot;let Ht=ht.transformStyle?ht.transformStyle(Et,z):z;if(!ht.validate||!Gr(this,e.u(Ht))){this._loaded=!0,this.stylesheet=Ht;for(let Te in Ht.sources)this.addSource(Te,Ht.sources[Te],{validate:!1});Ht.sprite?this._loadSprite(Ht.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Ht.glyphs),this._createLayers(),this.light=new U(this.stylesheet.light),this.sky=new q(this.stylesheet.sky),this.map.setTerrain((Ot=this.stylesheet.terrain)!==null&&Ot!==void 0?Ot:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let z=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",z),this._order=z.map(ht=>ht.id),this._layers={},this._serializedLayers=null;for(let ht of z){let Et=e.aA(ht);Et.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=Et}}_loadSprite(z,ht=!1,Et=void 0){let Ot;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Ht,Te,Fe,Ke){return e._(this,void 0,void 0,function*(){let vr=A(Ht),Dr=Fe>1?"@2x":"",Fr={},un={};for(let{id:Sn,url:Xt}of vr){let ae=Te.transformRequest(h(Xt,Dr,".json"),"SpriteJSON");Fr[Sn]=e.h(ae,Ke);let _e=Te.transformRequest(h(Xt,Dr,".png"),"SpriteImage");un[Sn]=u.getImage(_e,Ke)}return yield Promise.all([...Object.values(Fr),...Object.values(un)]),function(Sn,Xt){return e._(this,void 0,void 0,function*(){let ae={};for(let _e in Sn){ae[_e]={};let Me=o.getImageCanvasContext((yield Xt[_e]).data),je=(yield Sn[_e]).data;for(let De in je){let{width:$e,height:wr,x:Or,y:Nr,sdf:en,pixelRatio:vn,stretchX:In,stretchY:jn,content:si,textFitWidth:Wi,textFitHeight:ga}=je[De];ae[_e][De]={data:null,pixelRatio:vn,sdf:en,stretchX:In,stretchY:jn,content:si,textFitWidth:Wi,textFitHeight:ga,spriteData:{width:$e,height:wr,x:Or,y:Nr,context:Me}}}}return ae})}(Fr,un)})}(z,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Ht=>{if(this._spriteRequest=null,Ht)for(let Te in Ht){this._spritesImagesIds[Te]=[];let Fe=this._spritesImagesIds[Te]?this._spritesImagesIds[Te].filter(Ke=>!(Ke in Ht)):[];for(let Ke of Fe)this.imageManager.removeImage(Ke),this._changedImages[Ke]=!0;for(let Ke in Ht[Te]){let vr=Te==="default"?Ke:`${Te}:${Ke}`;this._spritesImagesIds[Te].push(vr),vr in this.imageManager.images?this.imageManager.updateImage(vr,Ht[Te][Ke],!1):this.imageManager.addImage(vr,Ht[Te][Ke]),ht&&(this._changedImages[vr]=!0)}}}).catch(Ht=>{this._spriteRequest=null,Ot=Ht,this.fire(new e.j(Ot))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ht&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),Et&&Et(Ot)})}_unloadSprite(){for(let z of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(z),this._changedImages[z]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(z){let ht=this.sourceCaches[z.source];if(!ht)return;let Et=z.sourceLayer;if(!Et)return;let Ot=ht.getSource();(Ot.type==="geojson"||Ot.vectorLayerIds&&Ot.vectorLayerIds.indexOf(Et)===-1)&&this.fire(new e.j(new Error(`Source layer "${Et}" does not exist on source "${Ot.id}" as specified by style layer "${z.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let z in this.sourceCaches)if(!this.sourceCaches[z].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(z,ht=!1){let Et=this._serializedAllLayers();if(!z||z.length===0)return Object.values(ht?e.aB(Et):Et);let Ot=[];for(let Ht of z)if(Et[Ht]){let Te=ht?e.aB(Et[Ht]):Et[Ht];Ot.push(Te)}return Ot}_serializedAllLayers(){let z=this._serializedLayers;if(z)return z;z=this._serializedLayers={};let ht=Object.keys(this._layers);for(let Et of ht){let Ot=this._layers[Et];Ot.type!=="custom"&&(z[Et]=Ot.serialize())}return z}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let z in this.sourceCaches)if(this.sourceCaches[z].hasTransition())return!0;for(let z in this._layers)if(this._layers[z].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(z){if(!this._loaded)return;let ht=this._changed;if(ht){let Ot=Object.keys(this._updatedLayers),Ht=Object.keys(this._removedLayers);(Ot.length||Ht.length)&&this._updateWorkerLayers(Ot,Ht);for(let Te in this._updatedSources){let Fe=this._updatedSources[Te];if(Fe==="reload")this._reloadSource(Te);else{if(Fe!=="clear")throw new Error(`Invalid action ${Fe}`);this._clearSource(Te)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Te in this._updatedPaintProps)this._layers[Te].updateTransitions(z);this.light.updateTransitions(z),this.sky.updateTransitions(z),this._resetUpdates()}let Et={};for(let Ot in this.sourceCaches){let Ht=this.sourceCaches[Ot];Et[Ot]=Ht.used,Ht.used=!1}for(let Ot of this._order){let Ht=this._layers[Ot];Ht.recalculate(z,this._availableImages),!Ht.isHidden(z.zoom)&&Ht.source&&(this.sourceCaches[Ht.source].used=!0)}for(let Ot in Et){let Ht=this.sourceCaches[Ot];!!Et[Ot]!=!!Ht.used&&Ht.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Ot}))}this.light.recalculate(z),this.sky.recalculate(z),this.z=z.zoom,ht&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let z=Object.keys(this._changedImages);if(z.length){for(let ht in this.sourceCaches)this.sourceCaches[ht].reloadTilesForDependencies(["icons","patterns"],z);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let z in this.sourceCaches)this.sourceCaches[z].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(z,ht){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(z,!1),removedIds:ht})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(z,ht={}){var Et;this._checkLoaded();let Ot=this.serialize();if(z=ht.transformStyle?ht.transformStyle(Ot,z):z,((Et=ht.validate)===null||Et===void 0||Et)&&Gr(this,e.u(z)))return!1;(z=e.aB(z)).layers=e.az(z.layers);let Ht=e.aC(Ot,z),Te=this._getOperationsToPerform(Ht);if(Te.unimplemented.length>0)throw new Error(`Unimplemented: ${Te.unimplemented.join(", ")}.`);if(Te.operations.length===0)return!1;for(let Fe of Te.operations)Fe();return this.stylesheet=z,this._serializedLayers=null,!0}_getOperationsToPerform(z){let ht=[],Et=[];for(let Ot of z)switch(Ot.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ht.push(()=>this.addLayer.apply(this,Ot.args));break;case"removeLayer":ht.push(()=>this.removeLayer.apply(this,Ot.args));break;case"setPaintProperty":ht.push(()=>this.setPaintProperty.apply(this,Ot.args));break;case"setLayoutProperty":ht.push(()=>this.setLayoutProperty.apply(this,Ot.args));break;case"setFilter":ht.push(()=>this.setFilter.apply(this,Ot.args));break;case"addSource":ht.push(()=>this.addSource.apply(this,Ot.args));break;case"removeSource":ht.push(()=>this.removeSource.apply(this,Ot.args));break;case"setLayerZoomRange":ht.push(()=>this.setLayerZoomRange.apply(this,Ot.args));break;case"setLight":ht.push(()=>this.setLight.apply(this,Ot.args));break;case"setGeoJSONSourceData":ht.push(()=>this.setGeoJSONSourceData.apply(this,Ot.args));break;case"setGlyphs":ht.push(()=>this.setGlyphs.apply(this,Ot.args));break;case"setSprite":ht.push(()=>this.setSprite.apply(this,Ot.args));break;case"setSky":ht.push(()=>this.setSky.apply(this,Ot.args));break;case"setTerrain":ht.push(()=>this.map.setTerrain.apply(this,Ot.args));break;case"setTransition":ht.push(()=>{});break;default:Et.push(Ot.command)}return{operations:ht,unimplemented:Et}}addImage(z,ht){if(this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" already exists.`)));this.imageManager.addImage(z,ht),this._afterImageUpdated(z)}updateImage(z,ht){this.imageManager.updateImage(z,ht)}getImage(z){return this.imageManager.getImage(z)}removeImage(z){if(!this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" does not exist.`)));this.imageManager.removeImage(z),this._afterImageUpdated(z)}_afterImageUpdated(z){this._availableImages=this.imageManager.listImages(),this._changedImages[z]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(z,ht,Et={}){if(this._checkLoaded(),this.sourceCaches[z]!==void 0)throw new Error(`Source "${z}" already exists.`);if(!ht.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ht).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ht.type)>=0&&this._validate(e.u.source,`sources.${z}`,ht,null,Et))return;this.map&&this.map._collectResourceTiming&&(ht.collectResourceTiming=!0);let Ot=this.sourceCaches[z]=new Ge(z,ht,this.dispatcher);Ot.style=this,Ot.setEventedParent(this,()=>({isSourceLoaded:Ot.loaded(),source:Ot.serialize(),sourceId:z})),Ot.onAdd(this.map),this._changed=!0}removeSource(z){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error("There is no source with this ID");for(let Et in this._layers)if(this._layers[Et].source===z)return this.fire(new e.j(new Error(`Source "${z}" cannot be removed while layer "${Et}" is using it.`)));let ht=this.sourceCaches[z];delete this.sourceCaches[z],delete this._updatedSources[z],ht.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:z})),ht.setEventedParent(null),ht.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(z,ht){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error(`There is no source with this ID=${z}`);let Et=this.sourceCaches[z].getSource();if(Et.type!=="geojson")throw new Error(`geojsonSource.type is ${Et.type}, which is !== 'geojson`);Et.setData(ht),this._changed=!0}getSource(z){return this.sourceCaches[z]&&this.sourceCaches[z].getSource()}addLayer(z,ht,Et={}){this._checkLoaded();let Ot=z.id;if(this.getLayer(Ot))return void this.fire(new e.j(new Error(`Layer "${Ot}" already exists on this map.`)));let Ht;if(z.type==="custom"){if(Gr(this,e.aD(z)))return;Ht=e.aA(z)}else{if("source"in z&&typeof z.source=="object"&&(this.addSource(Ot,z.source),z=e.aB(z),z=e.e(z,{source:Ot})),this._validate(e.u.layer,`layers.${Ot}`,z,{arrayIndex:-1},Et))return;Ht=e.aA(z),this._validateLayer(Ht),Ht.setEventedParent(this,{layer:{id:Ot}})}let Te=ht?this._order.indexOf(ht):this._order.length;if(ht&&Te===-1)this.fire(new e.j(new Error(`Cannot add layer "${Ot}" before non-existing layer "${ht}".`)));else{if(this._order.splice(Te,0,Ot),this._layerOrderChanged=!0,this._layers[Ot]=Ht,this._removedLayers[Ot]&&Ht.source&&Ht.type!=="custom"){let Fe=this._removedLayers[Ot];delete this._removedLayers[Ot],Fe.type!==Ht.type?this._updatedSources[Ht.source]="clear":(this._updatedSources[Ht.source]="reload",this.sourceCaches[Ht.source].pause())}this._updateLayer(Ht),Ht.onAdd&&Ht.onAdd(this.map)}}moveLayer(z,ht){if(this._checkLoaded(),this._changed=!0,!this._layers[z])return void this.fire(new e.j(new Error(`The layer '${z}' does not exist in the map's style and cannot be moved.`)));if(z===ht)return;let Et=this._order.indexOf(z);this._order.splice(Et,1);let Ot=ht?this._order.indexOf(ht):this._order.length;ht&&Ot===-1?this.fire(new e.j(new Error(`Cannot move layer "${z}" before non-existing layer "${ht}".`))):(this._order.splice(Ot,0,z),this._layerOrderChanged=!0)}removeLayer(z){this._checkLoaded();let ht=this._layers[z];if(!ht)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${z}".`)));ht.setEventedParent(null);let Et=this._order.indexOf(z);this._order.splice(Et,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[z]=ht,delete this._layers[z],this._serializedLayers&&delete this._serializedLayers[z],delete this._updatedLayers[z],delete this._updatedPaintProps[z],ht.onRemove&&ht.onRemove(this.map)}getLayer(z){return this._layers[z]}getLayersOrder(){return[...this._order]}hasLayer(z){return z in this._layers}setLayerZoomRange(z,ht,Et){this._checkLoaded();let Ot=this.getLayer(z);Ot?Ot.minzoom===ht&&Ot.maxzoom===Et||(ht!=null&&(Ot.minzoom=ht),Et!=null&&(Ot.maxzoom=Et),this._updateLayer(Ot)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${z}".`)))}setFilter(z,ht,Et={}){this._checkLoaded();let Ot=this.getLayer(z);if(Ot){if(!e.aE(Ot.filter,ht))return ht==null?(Ot.filter=void 0,void this._updateLayer(Ot)):void(this._validate(e.u.filter,`layers.${Ot.id}.filter`,ht,null,Et)||(Ot.filter=e.aB(ht),this._updateLayer(Ot)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${z}".`)))}getFilter(z){return e.aB(this.getLayer(z).filter)}setLayoutProperty(z,ht,Et,Ot={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getLayoutProperty(ht),Et)||(Ht.setLayoutProperty(ht,Et,Ot),this._updateLayer(Ht)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getLayoutProperty(z,ht){let Et=this.getLayer(z);if(Et)return Et.getLayoutProperty(ht);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${z}".`)))}setPaintProperty(z,ht,Et,Ot={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getPaintProperty(ht),Et)||(Ht.setPaintProperty(ht,Et,Ot)&&this._updateLayer(Ht),this._changed=!0,this._updatedPaintProps[z]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getPaintProperty(z,ht){return this.getLayer(z).getPaintProperty(ht)}setFeatureState(z,ht){this._checkLoaded();let Et=z.source,Ot=z.sourceLayer,Ht=this.sourceCaches[Et];if(Ht===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Te=Ht.getSource().type;Te==="geojson"&&Ot?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Te!=="vector"||Ot?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Ht.setFeatureState(Ot,z.id,ht)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(z,ht){this._checkLoaded();let Et=z.source,Ot=this.sourceCaches[Et];if(Ot===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Ht=Ot.getSource().type,Te=Ht==="vector"?z.sourceLayer:void 0;Ht!=="vector"||Te?ht&&typeof z.id!="string"&&typeof z.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):Ot.removeFeatureState(Te,z.id,ht):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(z){this._checkLoaded();let ht=z.source,Et=z.sourceLayer,Ot=this.sourceCaches[ht];if(Ot!==void 0)return Ot.getSource().type!=="vector"||Et?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Ot.getFeatureState(Et,z.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${ht}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let z=e.aF(this.sourceCaches,Ht=>Ht.serialize()),ht=this._serializeByIds(this._order,!0),Et=this.map.getTerrain()||void 0,Ot=this.stylesheet;return e.aG({version:Ot.version,name:Ot.name,metadata:Ot.metadata,light:Ot.light,sky:Ot.sky,center:Ot.center,zoom:Ot.zoom,bearing:Ot.bearing,pitch:Ot.pitch,sprite:Ot.sprite,glyphs:Ot.glyphs,transition:Ot.transition,sources:z,layers:ht,terrain:Et},Ht=>Ht!==void 0)}_updateLayer(z){this._updatedLayers[z.id]=!0,z.source&&!this._updatedSources[z.source]&&this.sourceCaches[z.source].getSource().type!=="raster"&&(this._updatedSources[z.source]="reload",this.sourceCaches[z.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(z){let ht=Te=>this._layers[Te].type==="fill-extrusion",Et={},Ot=[];for(let Te=this._order.length-1;Te>=0;Te--){let Fe=this._order[Te];if(ht(Fe)){Et[Fe]=Te;for(let Ke of z){let vr=Ke[Fe];if(vr)for(let Dr of vr)Ot.push(Dr)}}}Ot.sort((Te,Fe)=>Fe.intersectionZ-Te.intersectionZ);let Ht=[];for(let Te=this._order.length-1;Te>=0;Te--){let Fe=this._order[Te];if(ht(Fe))for(let Ke=Ot.length-1;Ke>=0;Ke--){let vr=Ot[Ke].feature;if(Et[vr.layer.id]{let en=Me.featureSortOrder;if(en){let vn=en.indexOf(Or.featureIndex);return en.indexOf(Nr.featureIndex)-vn}return Nr.featureIndex-Or.featureIndex});for(let Or of wr)$e.push(Or)}}for(let Me in Xt)Xt[Me].forEach(je=>{let De=je.feature,$e=vr[Fe[Me].source].getFeatureState(De.layer["source-layer"],De.id);De.source=De.layer.source,De.layer["source-layer"]&&(De.sourceLayer=De.layer["source-layer"]),De.state=$e});return Xt}(this._layers,Te,this.sourceCaches,z,ht,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Ht)}querySourceFeatures(z,ht){ht&&ht.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",ht.filter,null,ht);let Et=this.sourceCaches[z];return Et?function(Ot,Ht){let Te=Ot.getRenderableIds().map(vr=>Ot.getTileByID(vr)),Fe=[],Ke={};for(let vr=0;vrun.getTileByID(Sn)).sort((Sn,Xt)=>Xt.tileID.overscaledZ-Sn.tileID.overscaledZ||(Sn.tileID.isLessThan(Xt.tileID)?-1:1))}let Fr=this.crossTileSymbolIndex.addLayer(Dr,Ke[Dr.source],z.center.lng);Te=Te||Fr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Ht=Ht||this._layerOrderChanged||Et===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.now(),z.zoom))&&(this.pauseablePlacement=new za(z,this.map.terrain,this._order,Ht,ht,Et,Ot,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ke),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.now()),Fe=!0),Te&&this.pauseablePlacement.placement.setStale()),Fe||Te)for(let vr of this._order){let Dr=this._layers[vr];Dr.type==="symbol"&&this.placement.updateLayerOpacities(Dr,Ke[Dr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.now())}_releaseSymbolFadeTiles(){for(let z in this.sourceCaches)this.sourceCaches[z].releaseSymbolFadeTiles()}getImages(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.imageManager.getImages(ht.icons);this._updateTilesForChangedImages();let Ot=this.sourceCaches[ht.source];return Ot&&Ot.setDependencies(ht.tileID.key,ht.type,ht.icons),Et})}getGlyphs(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.glyphManager.getGlyphs(ht.stacks),Ot=this.sourceCaches[ht.source];return Ot&&Ot.setDependencies(ht.tileID.key,ht.type,[""]),Et})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(z,ht={}){this._checkLoaded(),z&&this._validate(e.u.glyphs,"glyphs",z,null,ht)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=z,this.glyphManager.entries={},this.glyphManager.setURL(z))}addSprite(z,ht,Et={},Ot){this._checkLoaded();let Ht=[{id:z,url:ht}],Te=[...A(this.stylesheet.sprite),...Ht];this._validate(e.u.sprite,"sprite",Te,null,Et)||(this.stylesheet.sprite=Te,this._loadSprite(Ht,!0,Ot))}removeSprite(z){this._checkLoaded();let ht=A(this.stylesheet.sprite);if(ht.find(Et=>Et.id===z)){if(this._spritesImagesIds[z])for(let Et of this._spritesImagesIds[z])this.imageManager.removeImage(Et),this._changedImages[Et]=!0;ht.splice(ht.findIndex(Et=>Et.id===z),1),this.stylesheet.sprite=ht.length>0?ht:void 0,delete this._spritesImagesIds[z],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${z}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(z,ht={},Et){this._checkLoaded(),z&&this._validate(e.u.sprite,"sprite",z,null,ht)||(this.stylesheet.sprite=z,z?this._loadSprite(z,!0,Et):(this._unloadSprite(),Et&&Et(null)))}}var mn=e.Y([{name:"a_pos",type:"Int16",components:2}]);let on={prelude:Ce(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3868,7 +3868,7 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ce("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ce("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ce("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ce("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ce($t,z){let ht=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Et=z.match(/attribute ([\w]+) ([\w]+)/g),zt=$t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ht=z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=Ht?Ht.concat(zt):zt,Fe={};return{fragmentSource:$t=$t.replace(ht,(Ke,vr,Dr,Fr,un)=>(Fe[un]=!0,vr==="define"?` +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ce("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ce("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ce("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ce("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ce($t,z){let ht=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Et=z.match(/attribute ([\w]+) ([\w]+)/g),Ot=$t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ht=z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Te=Ht?Ht.concat(Ot):Ot,Fe={};return{fragmentSource:$t=$t.replace(ht,(Ke,vr,Dr,Fr,un)=>(Fe[un]=!0,vr==="define"?` #ifndef HAS_UNIFORM_u_${un} varying ${Dr} ${Fr} ${un}; #else @@ -3917,9 +3917,9 @@ uniform ${Dr} ${Fr} u_${un}; #else ${Dr} ${Fr} ${un} = u_${un}; #endif -`}),staticAttributes:Et,staticUniforms:ke}}class dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(z,ht,Et,zt,Ht,ke,Fe,Ke,vr){this.context=z;let Dr=this.boundPaintVertexBuffers.length!==zt.length;for(let Fr=0;!Dr&&Fr({u_matrix:$t,u_texture:0,u_ele_delta:z,u_fog_matrix:ht,u_fog_color:Et?Et.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:Et?Et.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Et?Et.calculateFogBlendOpacity(zt):0,u_horizon_color:Et?Et.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:Et?Et.properties.get("horizon-fog-blend"):1});function _n($t){let z=[];for(let ht=0;ht<$t.length;ht++){if($t[ht]===null)continue;let Et=$t[ht].split(" ");z.push(Et.pop())}return z}class Fn{constructor(z,ht,Et,zt,Ht,ke){let Fe=z.gl;this.program=Fe.createProgram();let Ke=_n(ht.staticAttributes),vr=Et?Et.getBinderAttributes():[],Dr=Ke.concat(vr),Fr=on.prelude.staticUniforms?_n(on.prelude.staticUniforms):[],un=ht.staticUniforms?_n(ht.staticUniforms):[],Sn=Et?Et.getBinderUniforms():[],Xt=Fr.concat(un).concat(Sn),ae=[];for(let Or of Xt)ae.indexOf(Or)<0&&ae.push(Or);let xe=Et?Et.defines():[];Ht&&xe.push("#define OVERDRAW_INSPECTOR;"),ke&&xe.push("#define TERRAIN3D;");let Ae=xe.concat(on.prelude.fragmentSource,ht.fragmentSource).join(` -`),je=xe.concat(on.prelude.vertexSource,ht.vertexSource).join(` -`),Oe=Fe.createShader(Fe.FRAGMENT_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource(Oe,Ae),Fe.compileShader(Oe),!Fe.getShaderParameter(Oe,Fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Fe.getShaderInfoLog(Oe)}`);Fe.attachShader(this.program,Oe);let $e=Fe.createShader(Fe.VERTEX_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource($e,je),Fe.compileShader($e),!Fe.getShaderParameter($e,Fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Fe.getShaderInfoLog($e)}`);Fe.attachShader(this.program,$e),this.attributes={};let wr={};this.numAttributes=Dr.length;for(let Or=0;Or({u_depth:new e.aH(Or,Nr.u_depth),u_terrain:new e.aH(Or,Nr.u_terrain),u_terrain_dim:new e.aI(Or,Nr.u_terrain_dim),u_terrain_matrix:new e.aJ(Or,Nr.u_terrain_matrix),u_terrain_unpack:new e.aK(Or,Nr.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Or,Nr.u_terrain_exaggeration)}))(z,wr),this.binderUniforms=Et?Et.getUniforms(z,wr):[]}draw(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,xe,Ae,je){let Oe=z.gl;if(this.failedToCreate)return;if(z.program.set(this.program),z.setDepthMode(Et),z.setStencilMode(zt),z.setColorMode(Ht),z.setCullFace(ke),Ke){z.activeTexture.set(Oe.TEXTURE2),Oe.bindTexture(Oe.TEXTURE_2D,Ke.depthTexture),z.activeTexture.set(Oe.TEXTURE3),Oe.bindTexture(Oe.TEXTURE_2D,Ke.texture);for(let wr in this.terrainUniforms)this.terrainUniforms[wr].set(Ke[wr])}for(let wr in this.fixedUniforms)this.fixedUniforms[wr].set(Fe[wr]);ae&&ae.setUniforms(z,this.binderUniforms,Sn,{zoom:Xt});let $e=0;switch(ht){case Oe.LINES:$e=2;break;case Oe.TRIANGLES:$e=3;break;case Oe.LINE_STRIP:$e=1}for(let wr of un.get()){let Or=wr.vaos||(wr.vaos={});(Or[vr]||(Or[vr]=new dr)).bind(z,this,Dr,ae?ae.getPaintVertexBuffers():[],Fr,wr.vertexOffset,xe,Ae,je),Oe.drawElements(ht,wr.primitiveLength*$e,Oe.UNSIGNED_SHORT,wr.primitiveOffset*$e*2)}}}function Qn($t,z,ht){let Et=1/Wn(ht,1,z.transform.tileZoom),zt=Math.pow(2,ht.tileID.overscaledZ),Ht=ht.tileSize*Math.pow(2,z.transform.tileZoom)/zt,ke=Ht*(ht.tileID.canonical.x+ht.tileID.wrap*zt),Fe=Ht*ht.tileID.canonical.y;return{u_image:0,u_texsize:ht.imageAtlasTexture.size,u_scale:[Et,$t.fromScale,$t.toScale],u_fade:$t.t,u_pixel_coord_upper:[ke>>16,Fe>>16],u_pixel_coord_lower:[65535&ke,65535&Fe]}}let Pn=($t,z,ht,Et)=>{let zt=z.style.light,Ht=zt.properties.get("position"),ke=[Ht.x,Ht.y,Ht.z],Fe=function(){var vr=new e.A(9);return e.A!=Float32Array&&(vr[1]=0,vr[2]=0,vr[3]=0,vr[5]=0,vr[6]=0,vr[7]=0),vr[0]=1,vr[4]=1,vr[8]=1,vr}();zt.properties.get("anchor")==="viewport"&&function(vr,Dr){var Fr=Math.sin(Dr),un=Math.cos(Dr);vr[0]=un,vr[1]=Fr,vr[2]=0,vr[3]=-Fr,vr[4]=un,vr[5]=0,vr[6]=0,vr[7]=0,vr[8]=1}(Fe,-z.transform.angle),function(vr,Dr,Fr){var un=Dr[0],Sn=Dr[1],Xt=Dr[2];vr[0]=un*Fr[0]+Sn*Fr[3]+Xt*Fr[6],vr[1]=un*Fr[1]+Sn*Fr[4]+Xt*Fr[7],vr[2]=un*Fr[2]+Sn*Fr[5]+Xt*Fr[8]}(ke,ke,Fe);let Ke=zt.properties.get("color");return{u_matrix:$t,u_lightpos:ke,u_lightintensity:zt.properties.get("intensity"),u_lightcolor:[Ke.r,Ke.g,Ke.b],u_vertical_gradient:+ht,u_opacity:Et}},En=($t,z,ht,Et,zt,Ht,ke)=>e.e(Pn($t,z,ht,Et),Qn(Ht,z,ke),{u_height_factor:-Math.pow(2,zt.overscaledZ)/ke.tileSize/8}),Zn=$t=>({u_matrix:$t}),La=($t,z,ht,Et)=>e.e(Zn($t),Qn(ht,z,Et)),Vi=($t,z)=>({u_matrix:$t,u_world:z}),Qa=($t,z,ht,Et,zt)=>e.e(La($t,z,ht,Et),{u_world:zt}),Ja=($t,z,ht,Et)=>{let zt=$t.transform,Ht,ke;if(Et.paint.get("circle-pitch-alignment")==="map"){let Fe=Wn(ht,1,zt.zoom);Ht=!0,ke=[Fe,Fe]}else Ht=!1,ke=zt.pixelsToGLUnits;return{u_camera_to_center_distance:zt.cameraToCenterDistance,u_scale_with_map:+(Et.paint.get("circle-pitch-scale")==="map"),u_matrix:$t.translatePosMatrix(z.posMatrix,ht,Et.paint.get("circle-translate"),Et.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ht,u_device_pixel_ratio:$t.pixelRatio,u_extrude_scale:ke}},Do=($t,z,ht)=>({u_matrix:$t,u_inv_matrix:z,u_camera_to_center_distance:ht.cameraToCenterDistance,u_viewport_size:[ht.width,ht.height]}),yo=($t,z,ht=1)=>({u_matrix:$t,u_color:z,u_overlay:0,u_overlay_scale:ht}),Fo=$t=>({u_matrix:$t}),Da=($t,z,ht,Et)=>({u_matrix:$t,u_extrude_scale:Wn(z,1,ht),u_intensity:Et}),ys=($t,z,ht,Et)=>{let zt=e.H();e.aP(zt,0,$t.width,$t.height,0,0,1);let Ht=$t.context.gl;return{u_matrix:zt,u_world:[Ht.drawingBufferWidth,Ht.drawingBufferHeight],u_image:ht,u_color_ramp:Et,u_opacity:z.paint.get("heatmap-opacity")}};function os($t,z){let ht=Math.pow(2,z.canonical.z),Et=z.canonical.y;return[new e.Z(0,Et/ht).toLngLat().lat,new e.Z(0,(Et+1)/ht).toLngLat().lat]}let ul=($t,z,ht,Et)=>{let zt=$t.transform;return{u_matrix:Qs($t,z,ht,Et),u_ratio:1/Wn(z,1,zt.zoom),u_device_pixel_ratio:$t.pixelRatio,u_units_to_pixels:[1/zt.pixelsToGLUnits[0],1/zt.pixelsToGLUnits[1]]}},Zo=($t,z,ht,Et,zt)=>e.e(ul($t,z,ht,zt),{u_image:0,u_image_height:Et}),Ks=($t,z,ht,Et,zt)=>{let Ht=$t.transform,ke=cl(z,Ht);return{u_matrix:Qs($t,z,ht,zt),u_texsize:z.imageAtlasTexture.size,u_ratio:1/Wn(z,1,Ht.zoom),u_device_pixel_ratio:$t.pixelRatio,u_image:0,u_scale:[ke,Et.fromScale,Et.toScale],u_fade:Et.t,u_units_to_pixels:[1/Ht.pixelsToGLUnits[0],1/Ht.pixelsToGLUnits[1]]}},ss=($t,z,ht,Et,zt,Ht)=>{let ke=$t.lineAtlas,Fe=cl(z,$t.transform),Ke=ht.layout.get("line-cap")==="round",vr=ke.getDash(Et.from,Ke),Dr=ke.getDash(Et.to,Ke),Fr=vr.width*zt.fromScale,un=Dr.width*zt.toScale;return e.e(ul($t,z,ht,Ht),{u_patternscale_a:[Fe/Fr,-vr.height/2],u_patternscale_b:[Fe/un,-Dr.height/2],u_sdfgamma:ke.width/(256*Math.min(Fr,un)*$t.pixelRatio)/2,u_image:0,u_tex_y_a:vr.y,u_tex_y_b:Dr.y,u_mix:zt.t})};function cl($t,z){return 1/Wn($t,1,z.tileZoom)}function Qs($t,z,ht,Et){return $t.translatePosMatrix(Et?Et.posMatrix:z.tileID.posMatrix,z,ht.paint.get("line-translate"),ht.paint.get("line-translate-anchor"))}let Nl=($t,z,ht,Et,zt)=>{return{u_matrix:$t,u_tl_parent:z,u_scale_parent:ht,u_buffer_scale:1,u_fade_t:Et.mix,u_opacity:Et.opacity*zt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:zt.paint.get("raster-brightness-min"),u_brightness_high:zt.paint.get("raster-brightness-max"),u_saturation_factor:(ke=zt.paint.get("raster-saturation"),ke>0?1-1/(1.001-ke):-ke),u_contrast_factor:(Ht=zt.paint.get("raster-contrast"),Ht>0?1/(1-Ht):1+Ht),u_spin_weights:cs(zt.paint.get("raster-hue-rotate"))};var Ht,ke};function cs($t){$t*=Math.PI/180;let z=Math.sin($t),ht=Math.cos($t);return[(2*ht+1)/3,(-Math.sqrt(3)*z-ht+1)/3,(Math.sqrt(3)*z-ht+1)/3]}let Ps=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn)=>{let Xt=ke.transform;return{u_is_size_zoom_constant:+($t==="constant"||$t==="source"),u_is_size_feature_constant:+($t==="constant"||$t==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+ht,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:ke.options.fadeDuration?ke.symbolFadeChange:1,u_matrix:Fe,u_label_plane_matrix:Ke,u_coord_matrix:vr,u_is_text:+Fr,u_pitch_with_map:+Et,u_is_along_line:zt,u_is_variable_anchor:Ht,u_texsize:un,u_texture:0,u_translation:Dr,u_pitched_scale:Sn}},Lo=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt)=>{let ae=ke.transform;return e.e(Ps($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Xt),{u_gamma_scale:Et?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:ke.pixelRatio,u_is_halo:1})},As=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn)=>e.e(Lo($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,!0,Fr,!0,Sn),{u_texsize_icon:un,u_texture_icon:1}),kl=($t,z,ht)=>({u_matrix:$t,u_opacity:z,u_color:ht}),ql=($t,z,ht,Et,zt,Ht)=>e.e(function(ke,Fe,Ke,vr){let Dr=Ke.imageManager.getPattern(ke.from.toString()),Fr=Ke.imageManager.getPattern(ke.to.toString()),{width:un,height:Sn}=Ke.imageManager.getPixelSize(),Xt=Math.pow(2,vr.tileID.overscaledZ),ae=vr.tileSize*Math.pow(2,Ke.transform.tileZoom)/Xt,xe=ae*(vr.tileID.canonical.x+vr.tileID.wrap*Xt),Ae=ae*vr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Dr.tl,u_pattern_br_a:Dr.br,u_pattern_tl_b:Fr.tl,u_pattern_br_b:Fr.br,u_texsize:[un,Sn],u_mix:Fe.t,u_pattern_size_a:Dr.displaySize,u_pattern_size_b:Fr.displaySize,u_scale_a:Fe.fromScale,u_scale_b:Fe.toScale,u_tile_units_to_pixels:1/Wn(vr,1,Ke.transform.tileZoom),u_pixel_coord_upper:[xe>>16,Ae>>16],u_pixel_coord_lower:[65535&xe,65535&Ae]}}(Et,Ht,ht,zt),{u_matrix:$t,u_opacity:z}),Jl={fillExtrusion:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_opacity:new e.aI($t,z.u_opacity)}),fillExtrusionPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_height_factor:new e.aI($t,z.u_height_factor),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade),u_opacity:new e.aI($t,z.u_opacity)}),fill:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),fillPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),fillOutline:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world)}),fillOutlinePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),circle:($t,z)=>({u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_scale_with_map:new e.aH($t,z.u_scale_with_map),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_extrude_scale:new e.aO($t,z.u_extrude_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_matrix:new e.aJ($t,z.u_matrix)}),collisionBox:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_pixel_extrude_scale:new e.aO($t,z.u_pixel_extrude_scale)}),collisionCircle:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_inv_matrix:new e.aJ($t,z.u_inv_matrix),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_viewport_size:new e.aO($t,z.u_viewport_size)}),debug:($t,z)=>({u_color:new e.aL($t,z.u_color),u_matrix:new e.aJ($t,z.u_matrix),u_overlay:new e.aH($t,z.u_overlay),u_overlay_scale:new e.aI($t,z.u_overlay_scale)}),clippingMask:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),heatmap:($t,z)=>({u_extrude_scale:new e.aI($t,z.u_extrude_scale),u_intensity:new e.aI($t,z.u_intensity),u_matrix:new e.aJ($t,z.u_matrix)}),heatmapTexture:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_color_ramp:new e.aH($t,z.u_color_ramp),u_opacity:new e.aI($t,z.u_opacity)}),hillshade:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_latrange:new e.aO($t,z.u_latrange),u_light:new e.aO($t,z.u_light),u_shadow:new e.aL($t,z.u_shadow),u_highlight:new e.aL($t,z.u_highlight),u_accent:new e.aL($t,z.u_accent)}),hillshadePrepare:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_dimension:new e.aO($t,z.u_dimension),u_zoom:new e.aI($t,z.u_zoom),u_unpack:new e.aK($t,z.u_unpack)}),line:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels)}),lineGradient:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_image:new e.aH($t,z.u_image),u_image_height:new e.aI($t,z.u_image_height)}),linePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texsize:new e.aO($t,z.u_texsize),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_image:new e.aH($t,z.u_image),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),lineSDF:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_patternscale_a:new e.aO($t,z.u_patternscale_a),u_patternscale_b:new e.aO($t,z.u_patternscale_b),u_sdfgamma:new e.aI($t,z.u_sdfgamma),u_image:new e.aH($t,z.u_image),u_tex_y_a:new e.aI($t,z.u_tex_y_a),u_tex_y_b:new e.aI($t,z.u_tex_y_b),u_mix:new e.aI($t,z.u_mix)}),raster:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_tl_parent:new e.aO($t,z.u_tl_parent),u_scale_parent:new e.aI($t,z.u_scale_parent),u_buffer_scale:new e.aI($t,z.u_buffer_scale),u_fade_t:new e.aI($t,z.u_fade_t),u_opacity:new e.aI($t,z.u_opacity),u_image0:new e.aH($t,z.u_image0),u_image1:new e.aH($t,z.u_image1),u_brightness_low:new e.aI($t,z.u_brightness_low),u_brightness_high:new e.aI($t,z.u_brightness_high),u_saturation_factor:new e.aI($t,z.u_saturation_factor),u_contrast_factor:new e.aI($t,z.u_contrast_factor),u_spin_weights:new e.aN($t,z.u_spin_weights)}),symbolIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolSDF:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolTextAndIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texsize_icon:new e.aO($t,z.u_texsize_icon),u_texture:new e.aH($t,z.u_texture),u_texture_icon:new e.aH($t,z.u_texture_icon),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),background:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_color:new e.aL($t,z.u_color)}),backgroundPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_image:new e.aH($t,z.u_image),u_pattern_tl_a:new e.aO($t,z.u_pattern_tl_a),u_pattern_br_a:new e.aO($t,z.u_pattern_br_a),u_pattern_tl_b:new e.aO($t,z.u_pattern_tl_b),u_pattern_br_b:new e.aO($t,z.u_pattern_br_b),u_texsize:new e.aO($t,z.u_texsize),u_mix:new e.aI($t,z.u_mix),u_pattern_size_a:new e.aO($t,z.u_pattern_size_a),u_pattern_size_b:new e.aO($t,z.u_pattern_size_b),u_scale_a:new e.aI($t,z.u_scale_a),u_scale_b:new e.aI($t,z.u_scale_b),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI($t,z.u_tile_units_to_pixels)}),terrain:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_ele_delta:new e.aI($t,z.u_ele_delta),u_fog_matrix:new e.aJ($t,z.u_fog_matrix),u_fog_color:new e.aL($t,z.u_fog_color),u_fog_ground_blend:new e.aI($t,z.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI($t,z.u_fog_ground_blend_opacity),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon_fog_blend:new e.aI($t,z.u_horizon_fog_blend)}),terrainDepth:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ele_delta:new e.aI($t,z.u_ele_delta)}),terrainCoords:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_terrain_coords_id:new e.aI($t,z.u_terrain_coords_id),u_ele_delta:new e.aI($t,z.u_ele_delta)}),sky:($t,z)=>({u_sky_color:new e.aL($t,z.u_sky_color),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon:new e.aI($t,z.u_horizon),u_sky_horizon_blend:new e.aI($t,z.u_sky_horizon_blend)})};class Us{constructor(z,ht,Et){this.context=z;let zt=z.gl;this.buffer=zt.createBuffer(),this.dynamicDraw=!!Et,this.context.unbindVAO(),z.bindElementBuffer.set(this.buffer),zt.bufferData(zt.ELEMENT_ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?zt.DYNAMIC_DRAW:zt.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(z){let ht=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ht.bufferSubData(ht.ELEMENT_ARRAY_BUFFER,0,z.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pa={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fo{constructor(z,ht,Et,zt){this.length=ht.length,this.attributes=Et,this.itemSize=ht.bytesPerElement,this.dynamicDraw=zt,this.context=z;let Ht=z.gl;this.buffer=Ht.createBuffer(),z.bindVertexBuffer.set(this.buffer),Ht.bufferData(Ht.ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Ht.DYNAMIC_DRAW:Ht.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(z){if(z.length!==this.length)throw new Error(`Length of new data is ${z.length}, which doesn't match current length of ${this.length}`);let ht=this.context.gl;this.bind(),ht.bufferSubData(ht.ARRAY_BUFFER,0,z.arrayBuffer)}enableAttributes(z,ht){for(let Et=0;Et0){let Or=e.H();e.aQ(Or,Oe.placementInvProjMatrix,$t.transform.glCoordMatrix),e.aQ(Or,Or,Oe.placementViewportMatrix),Ke.push({circleArray:wr,circleOffset:Dr,transform:je.posMatrix,invTransform:Or,coord:je}),vr+=wr.length/4,Dr=vr}$e&&Fe.draw(Ht,ke.LINES,tl.disabled,Ll.disabled,$t.colorModeForRenderPass(),Qo.disabled,{u_matrix:je.posMatrix,u_pixel_extrude_scale:[1/(Fr=$t.transform).width,1/Fr.height]},$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je),ht.id,$e.layoutVertexBuffer,$e.indexBuffer,$e.segments,null,$t.transform.zoom,null,null,$e.collisionVertexBuffer)}var Fr;if(!zt||!Ke.length)return;let un=$t.useProgram("collisionCircle"),Sn=new e.aR;Sn.resize(4*vr),Sn._trim();let Xt=0;for(let Ae of Ke)for(let je=0;je=0&&(Ae[Oe.associatedIconIndex]={shiftedAnchor:so,angle:Bo})}else Ar(Oe.numGlyphs,ae)}if(vr){xe.clear();let je=$t.icon.placedSymbolArray;for(let Oe=0;Oe$t.style.map.terrain.getElevation(Nn,On,Hi):null,zn=ht.layout.get("text-rotation-alignment")==="map";Ct(Ui,Nn.posMatrix,$t,zt,dc,At,Ae,vr,zn,ae,Nn.toUnwrapped(),Xt.width,Xt.height,Ut,xn)}let Pe=Nn.posMatrix,Ne=zt&&en||Me,sr=je||Ne?rc:dc,ar=$c,Er=Ta&&ht.paint.get(zt?"text-halo-width":"icon-halo-width").constantOr(1)!==0,rn;rn=Ta?Ui.iconsInText?As(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,vl,gu,In):Lo(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,zt,vl,!0,In):Ps(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,zt,vl,In);let Jr={program:So,buffers:pa,uniformValues:rn,atlasTexture:Ds,atlasTextureIcon:$s,atlasInterpolation:wl,atlasInterpolationIcon:Eu,isSDF:Ta,hasHalo:Er};if(wr&&Ui.canOverlap){Or=!0;let xn=pa.segments.get();for(let zn of xn)vn.push({segments:new e.a0([zn]),sortKey:zn.sortKey,state:Jr,terrainData:fl})}else vn.push({segments:pa.segments,sortKey:0,state:Jr,terrainData:fl})}Or&&vn.sort((Nn,ii)=>Nn.sortKey-ii.sortKey);for(let Nn of vn){let ii=Nn.state;if(un.activeTexture.set(Sn.TEXTURE0),ii.atlasTexture.bind(ii.atlasInterpolation,Sn.CLAMP_TO_EDGE),ii.atlasTextureIcon&&(un.activeTexture.set(Sn.TEXTURE1),ii.atlasTextureIcon&&ii.atlasTextureIcon.bind(ii.atlasInterpolationIcon,Sn.CLAMP_TO_EDGE)),ii.isSDF){let Ui=ii.uniformValues;ii.hasHalo&&(Ui.u_is_halo=1,Zf(ii.buffers,Nn.segments,ht,$t,ii.program,Nr,Dr,Fr,Ui,Nn.terrainData)),Ui.u_is_halo=0}Zf(ii.buffers,Nn.segments,ht,$t,ii.program,Nr,Dr,Fr,ii.uniformValues,Nn.terrainData)}}function Zf($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr){let Dr=Et.context;zt.draw(Dr,Dr.gl.TRIANGLES,Ht,ke,Fe,Qo.disabled,Ke,vr,ht.id,$t.layoutVertexBuffer,$t.indexBuffer,z,ht.paint,Et.transform.zoom,$t.programConfigurations.get(ht.id),$t.dynamicLayoutVertexBuffer,$t.opacityVertexBuffer)}function xf($t,z,ht,Et){let zt=$t.context,Ht=zt.gl,ke=Ll.disabled,Fe=new _u([Ht.ONE,Ht.ONE],e.aM.transparent,[!0,!0,!0,!0]),Ke=z.getBucket(ht);if(!Ke)return;let vr=Et.key,Dr=ht.heatmapFbos.get(vr);Dr||(Dr=Uf(zt,z.tileSize,z.tileSize),ht.heatmapFbos.set(vr,Dr)),zt.bindFramebuffer.set(Dr.framebuffer),zt.viewport.set([0,0,z.tileSize,z.tileSize]),zt.clear({color:e.aM.transparent});let Fr=Ke.programConfigurations.get(ht.id),un=$t.useProgram("heatmap",Fr),Sn=$t.style.map.terrain.getTerrainData(Et);un.draw(zt,Ht.TRIANGLES,tl.disabled,ke,Fe,Qo.disabled,Da(Et.posMatrix,z,$t.transform.zoom,ht.paint.get("heatmap-intensity")),Sn,ht.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Ke.segments,ht.paint,$t.transform.zoom,Fr)}function Hh($t,z,ht){let Et=$t.context,zt=Et.gl;Et.setColorMode($t.colorModeForRenderPass());let Ht=Vf(Et,z),ke=ht.key,Fe=z.heatmapFbos.get(ke);Fe&&(Et.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Fe.colorAttachment.get()),Et.activeTexture.set(zt.TEXTURE1),Ht.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),$t.useProgram("heatmapTexture").draw(Et,zt.TRIANGLES,tl.disabled,Ll.disabled,$t.colorModeForRenderPass(),Qo.disabled,ys($t,z,0,1),null,z.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments,z.paint,$t.transform.zoom),Fe.destroy(),z.heatmapFbos.delete(ke))}function Uf($t,z,ht){var Et,zt;let Ht=$t.gl,ke=Ht.createTexture();Ht.bindTexture(Ht.TEXTURE_2D,ke),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Ht.LINEAR),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,Ht.LINEAR);let Fe=(Et=$t.HALF_FLOAT)!==null&&Et!==void 0?Et:Ht.UNSIGNED_BYTE,Ke=(zt=$t.RGBA16F)!==null&&zt!==void 0?zt:Ht.RGBA;Ht.texImage2D(Ht.TEXTURE_2D,0,Ke,z,ht,0,Ht.RGBA,Fe,null);let vr=$t.createFramebuffer(z,ht,!1,!1);return vr.colorAttachment.set(ke),vr}function Vf($t,z){return z.colorRampTexture||(z.colorRampTexture=new p($t,z.colorRamp,$t.gl.RGBA)),z.colorRampTexture}function lh($t,z,ht,Et,zt){if(!ht||!Et||!Et.imageAtlas)return;let Ht=Et.imageAtlas.patternPositions,ke=Ht[ht.to.toString()],Fe=Ht[ht.from.toString()];if(!ke&&Fe&&(ke=Fe),!Fe&&ke&&(Fe=ke),!ke||!Fe){let Ke=zt.getPaintProperty(z);ke=Ht[Ke],Fe=Ht[Ke]}ke&&Fe&&$t.setConstantPatternPositions(ke,Fe)}function Gf($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context.gl,Ke="fill-pattern",vr=ht.paint.get(Ke),Dr=vr&&vr.constantOr(1),Fr=ht.getCrossfadeParameters(),un,Sn,Xt,ae,xe;ke?(Sn=Dr&&!ht.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",un=Fe.LINES):(Sn=Dr?"fillPattern":"fill",un=Fe.TRIANGLES);let Ae=vr.constantOr(null);for(let je of Et){let Oe=z.getTile(je);if(Dr&&!Oe.patternsLoaded())continue;let $e=Oe.getBucket(ht);if(!$e)continue;let wr=$e.programConfigurations.get(ht.id),Or=$t.useProgram(Sn,wr),Nr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je);Dr&&($t.context.activeTexture.set(Fe.TEXTURE0),Oe.imageAtlasTexture.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),wr.updatePaintBuffers(Fr)),lh(wr,Ke,Ae,Oe,ht);let en=Nr?je:null,vn=$t.translatePosMatrix(en?en.posMatrix:je.posMatrix,Oe,ht.paint.get("fill-translate"),ht.paint.get("fill-translate-anchor"));if(ke){ae=$e.indexBuffer2,xe=$e.segments2;let In=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];Xt=Sn==="fillOutlinePattern"&&Dr?Qa(vn,$t,Fr,Oe,In):Vi(vn,In)}else ae=$e.indexBuffer,xe=$e.segments,Xt=Dr?La(vn,$t,Fr,Oe):Zn(vn);Or.draw($t.context,un,zt,$t.stencilModeForClipping(je),Ht,Qo.disabled,Xt,Nr,ht.id,$e.layoutVertexBuffer,ae,xe,ht.paint,$t.transform.zoom,wr)}}function Eh($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context,Ke=Fe.gl,vr="fill-extrusion-pattern",Dr=ht.paint.get(vr),Fr=Dr.constantOr(1),un=ht.getCrossfadeParameters(),Sn=ht.paint.get("fill-extrusion-opacity"),Xt=Dr.constantOr(null);for(let ae of Et){let xe=z.getTile(ae),Ae=xe.getBucket(ht);if(!Ae)continue;let je=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ae),Oe=Ae.programConfigurations.get(ht.id),$e=$t.useProgram(Fr?"fillExtrusionPattern":"fillExtrusion",Oe);Fr&&($t.context.activeTexture.set(Ke.TEXTURE0),xe.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),Oe.updatePaintBuffers(un)),lh(Oe,vr,Xt,xe,ht);let wr=$t.translatePosMatrix(ae.posMatrix,xe,ht.paint.get("fill-extrusion-translate"),ht.paint.get("fill-extrusion-translate-anchor")),Or=ht.paint.get("fill-extrusion-vertical-gradient"),Nr=Fr?En(wr,$t,Or,Sn,ae,un,xe):Pn(wr,$t,Or,Sn);$e.draw(Fe,Fe.gl.TRIANGLES,zt,Ht,ke,Qo.backCCW,Nr,je,ht.id,Ae.layoutVertexBuffer,Ae.indexBuffer,Ae.segments,ht.paint,$t.transform.zoom,Oe,$t.style.map.terrain&&Ae.centroidVertexBuffer)}}function gh($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context,Ke=Fe.gl,vr=ht.fbo;if(!vr)return;let Dr=$t.useProgram("hillshade"),Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(z);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,vr.colorAttachment.get()),Dr.draw(Fe,Ke.TRIANGLES,zt,Ht,ke,Qo.disabled,((un,Sn,Xt,ae)=>{let xe=Xt.paint.get("hillshade-shadow-color"),Ae=Xt.paint.get("hillshade-highlight-color"),je=Xt.paint.get("hillshade-accent-color"),Oe=Xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Oe-=un.transform.angle);let $e=!un.options.moving;return{u_matrix:ae?ae.posMatrix:un.transform.calculatePosMatrix(Sn.tileID.toUnwrapped(),$e),u_image:0,u_latrange:os(0,Sn.tileID),u_light:[Xt.paint.get("hillshade-exaggeration"),Oe],u_shadow:xe,u_highlight:Ae,u_accent:je}})($t,ht,Et,Fr?z:null),Fr,Et.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments)}function uc($t,z,ht,Et,zt,Ht){let ke=$t.context,Fe=ke.gl,Ke=z.dem;if(Ke&&Ke.data){let vr=Ke.dim,Dr=Ke.stride,Fr=Ke.getPixels();if(ke.activeTexture.set(Fe.TEXTURE1),ke.pixelStoreUnpackPremultiplyAlpha.set(!1),z.demTexture=z.demTexture||$t.getTileTexture(Dr),z.demTexture){let Sn=z.demTexture;Sn.update(Fr,{premultiply:!1}),Sn.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE)}else z.demTexture=new p(ke,Fr,Fe.RGBA,{premultiply:!1}),z.demTexture.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE);ke.activeTexture.set(Fe.TEXTURE0);let un=z.fbo;if(!un){let Sn=new p(ke,{width:vr,height:vr,data:null},Fe.RGBA);Sn.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),un=z.fbo=ke.createFramebuffer(vr,vr,!0,!1),un.colorAttachment.set(Sn.texture)}ke.bindFramebuffer.set(un.framebuffer),ke.viewport.set([0,0,vr,vr]),$t.useProgram("hillshadePrepare").draw(ke,Fe.TRIANGLES,Et,zt,Ht,Qo.disabled,((Sn,Xt)=>{let ae=Xt.stride,xe=e.H();return e.aP(xe,0,e.X,-e.X,0,0,1),e.J(xe,xe,[0,-e.X,0]),{u_matrix:xe,u_image:1,u_dimension:[ae,ae],u_zoom:Sn.overscaledZ,u_unpack:Xt.getUnpackVector()}})(z.tileID,Ke),null,ht.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments),z.needsHillshadePrepare=!1}}function rf($t,z,ht,Et,zt,Ht){let ke=Et.paint.get("raster-fade-duration");if(!Ht&&ke>0){let Fe=o.now(),Ke=(Fe-$t.timeAdded)/ke,vr=z?(Fe-z.timeAdded)/ke:-1,Dr=ht.getSource(),Fr=zt.coveringZoomLevel({tileSize:Dr.tileSize,roundZoom:Dr.roundZoom}),un=!z||Math.abs(z.tileID.overscaledZ-Fr)>Math.abs($t.tileID.overscaledZ-Fr),Sn=un&&$t.refreshedUponExpiration?1:e.ac(un?Ke:1-vr,0,1);return $t.refreshedUponExpiration&&Ke>=1&&($t.refreshedUponExpiration=!1),z?{opacity:1,mix:1-Sn}:{opacity:Sn,mix:0}}return{opacity:1,mix:0}}let Hf=new e.aM(1,0,0,1),eu=new e.aM(0,1,0,1),Ef=new e.aM(0,0,1,1),Cd=new e.aM(1,0,1,1),Yf=new e.aM(0,1,1,1);function _f($t,z,ht,Et){Nc($t,0,z+ht/2,$t.transform.width,ht,Et)}function Kf($t,z,ht,Et){Nc($t,z-ht/2,0,ht,$t.transform.height,Et)}function Nc($t,z,ht,Et,zt,Ht){let ke=$t.context,Fe=ke.gl;Fe.enable(Fe.SCISSOR_TEST),Fe.scissor(z*$t.pixelRatio,ht*$t.pixelRatio,Et*$t.pixelRatio,zt*$t.pixelRatio),ke.clear({color:Ht}),Fe.disable(Fe.SCISSOR_TEST)}function Xf($t,z,ht){let Et=$t.context,zt=Et.gl,Ht=ht.posMatrix,ke=$t.useProgram("debug"),Fe=tl.disabled,Ke=Ll.disabled,vr=$t.colorModeForRenderPass(),Dr="$debug",Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ht);Et.activeTexture.set(zt.TEXTURE0);let un=z.getTileByID(ht.key).latestRawTileData,Sn=Math.floor((un&&un.byteLength||0)/1024),Xt=z.getTile(ht).tileSize,ae=512/Math.min(Xt,512)*(ht.overscaledZ/$t.transform.zoom)*.5,xe=ht.canonical.toString();ht.overscaledZ!==ht.canonical.z&&(xe+=` => ${ht.overscaledZ}`),function(Ae,je){Ae.initDebugOverlayCanvas();let Oe=Ae.debugOverlayCanvas,$e=Ae.context.gl,wr=Ae.debugOverlayCanvas.getContext("2d");wr.clearRect(0,0,Oe.width,Oe.height),wr.shadowColor="white",wr.shadowBlur=2,wr.lineWidth=1.5,wr.strokeStyle="white",wr.textBaseline="top",wr.font="bold 36px Open Sans, sans-serif",wr.fillText(je,5,5),wr.strokeText(je,5,5),Ae.debugOverlayTexture.update(Oe),Ae.debugOverlayTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE)}($t,`${xe} ${Sn}kB`),ke.draw(Et,zt.TRIANGLES,Fe,Ke,_u.alphaBlended,Qo.disabled,yo(Ht,e.aM.transparent,ae),null,Dr,$t.debugBuffer,$t.quadTriangleIndexBuffer,$t.debugSegments),ke.draw(Et,zt.LINE_STRIP,Fe,Ke,vr,Qo.disabled,yo(Ht,e.aM.red),Fr,Dr,$t.debugBuffer,$t.tileBorderIndexBuffer,$t.debugSegments)}function Ou($t,z,ht){let Et=$t.context,zt=Et.gl,Ht=$t.colorModeForRenderPass(),ke=new tl(zt.LEQUAL,tl.ReadWrite,$t.depthRangeFor3D),Fe=$t.useProgram("terrain"),Ke=z.getTerrainMesh();Et.bindFramebuffer.set(null),Et.viewport.set([0,0,$t.width,$t.height]);for(let vr of ht){let Dr=$t.renderToTexture.getTexture(vr),Fr=z.getTerrainData(vr.tileID);Et.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Dr.texture);let un=$t.transform.calculatePosMatrix(vr.tileID.toUnwrapped()),Sn=z.getMeshFrameDelta($t.transform.zoom),Xt=$t.transform.calculateFogMatrix(vr.tileID.toUnwrapped()),ae=Hr(un,Sn,Xt,$t.style.sky,$t.transform.pitch);Fe.draw(Et,zt.TRIANGLES,ke,Ll.disabled,Ht,Qo.backCCW,ae,Fr,"terrain",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}}class jc{constructor(z,ht,Et){this.vertexBuffer=z,this.indexBuffer=ht,this.segments=Et}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Wh{constructor(z,ht){this.context=new Ed(z),this.transform=ht,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ge.maxUnderzooming+Ge.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $r}resize(z,ht,Et){if(this.width=Math.floor(z*Et),this.height=Math.floor(ht*Et),this.pixelRatio=Et,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let zt of this.style._order)this.style._layers[zt].resize()}setup(){let z=this.context,ht=new e.aX;ht.emplaceBack(0,0),ht.emplaceBack(e.X,0),ht.emplaceBack(0,e.X),ht.emplaceBack(e.X,e.X),this.tileExtentBuffer=z.createVertexBuffer(ht,pn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let Et=new e.aX;Et.emplaceBack(0,0),Et.emplaceBack(e.X,0),Et.emplaceBack(0,e.X),Et.emplaceBack(e.X,e.X),this.debugBuffer=z.createVertexBuffer(Et,pn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let zt=new e.$;zt.emplaceBack(0,0,0,0),zt.emplaceBack(e.X,0,e.X,0),zt.emplaceBack(0,e.X,0,e.X),zt.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=z.createVertexBuffer(zt,Jt.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Ht=new e.aX;Ht.emplaceBack(0,0),Ht.emplaceBack(1,0),Ht.emplaceBack(0,1),Ht.emplaceBack(1,1),this.viewportBuffer=z.createVertexBuffer(Ht,pn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let ke=new e.aZ;ke.emplaceBack(0),ke.emplaceBack(1),ke.emplaceBack(3),ke.emplaceBack(2),ke.emplaceBack(0),this.tileBorderIndexBuffer=z.createIndexBuffer(ke);let Fe=new e.aY;Fe.emplaceBack(0,1,2),Fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=z.createIndexBuffer(Fe);let Ke=this.context.gl;this.stencilClearMode=new Ll({func:Ke.ALWAYS,mask:0},0,255,Ke.ZERO,Ke.ZERO,Ke.ZERO)}clearStencil(){let z=this.context,ht=z.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Et=e.H();e.aP(Et,0,this.width,this.height,0,0,1),e.K(Et,Et,[ht.drawingBufferWidth,ht.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(z,ht.TRIANGLES,tl.disabled,this.stencilClearMode,_u.disabled,Qo.disabled,Fo(Et),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(z,ht){if(this.currentStencilSource===z.source||!z.isTileClipped()||!ht||!ht.length)return;this.currentStencilSource=z.source;let Et=this.context,zt=Et.gl;this.nextStencilID+ht.length>256&&this.clearStencil(),Et.setColorMode(_u.disabled),Et.setDepthMode(tl.disabled);let Ht=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ke of ht){let Fe=this._tileClippingMaskIDs[ke.key]=this.nextStencilID++,Ke=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ke);Ht.draw(Et,zt.TRIANGLES,tl.disabled,new Ll({func:zt.ALWAYS,mask:0},Fe,255,zt.KEEP,zt.KEEP,zt.REPLACE),_u.disabled,Qo.disabled,Fo(ke.posMatrix),Ke,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let z=this.nextStencilID++,ht=this.context.gl;return new Ll({func:ht.NOTEQUAL,mask:255},z,255,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilModeForClipping(z){let ht=this.context.gl;return new Ll({func:ht.EQUAL,mask:255},this._tileClippingMaskIDs[z.key],0,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilConfigForOverlap(z){let ht=this.context.gl,Et=z.sort((ke,Fe)=>Fe.overscaledZ-ke.overscaledZ),zt=Et[Et.length-1].overscaledZ,Ht=Et[0].overscaledZ-zt+1;if(Ht>1){this.currentStencilSource=void 0,this.nextStencilID+Ht>256&&this.clearStencil();let ke={};for(let Fe=0;Fe({u_sky_color:Ae.properties.get("sky-color"),u_horizon_color:Ae.properties.get("horizon-color"),u_horizon:(je.height/2+je.getHorizon())*Oe,u_sky_horizon_blend:Ae.properties.get("sky-horizon-blend")*je.height/2*Oe}))(vr,Ke.style.map.transform,Ke.pixelRatio),Sn=new tl(Fr.LEQUAL,tl.ReadWrite,[0,1]),Xt=Ll.disabled,ae=Ke.colorModeForRenderPass(),xe=Ke.useProgram("sky");if(!vr.mesh){let Ae=new e.aX;Ae.emplaceBack(-1,-1),Ae.emplaceBack(1,-1),Ae.emplaceBack(1,1),Ae.emplaceBack(-1,1);let je=new e.aY;je.emplaceBack(0,1,2),je.emplaceBack(0,2,3),vr.mesh=new jc(Dr.createVertexBuffer(Ae,pn.members),Dr.createIndexBuffer(je),e.a0.simpleSegment(0,0,Ae.length,je.length))}xe.draw(Dr,Fr.TRIANGLES,Sn,Xt,ae,Qo.disabled,un,void 0,"sky",vr.mesh.vertexBuffer,vr.mesh.indexBuffer,vr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ht.showOverdrawInspector,this.depthRangeFor3D=[0,1-(z._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Et.length-1;this.currentLayer>=0;this.currentLayer--){let Ke=this.style._layers[Et[this.currentLayer]],vr=zt[Ke.source],Dr=Ht[Ke.source];this._renderTileClippingMasks(Ke,Dr),this.renderLayer(this,vr,Ke,Dr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerxe.source&&!xe.isHidden(Dr)?[vr.sourceCaches[xe.source]]:[]),Sn=un.filter(xe=>xe.getSource().type==="vector"),Xt=un.filter(xe=>xe.getSource().type!=="vector"),ae=xe=>{(!Fr||Fr.getSource().maxzoomae(xe)),Fr||Xt.forEach(xe=>ae(xe)),Fr}(this.style,this.transform.zoom);Ke&&function(vr,Dr,Fr){for(let un=0;un0),zt&&(e.b0(ht,Et),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Ht,ke){let Fe=Ht.context,Ke=Fe.gl,vr=_u.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),un=ke.sourceCache.getRenderableTiles(),Sn=Ht.useProgram("terrainDepth");Fe.bindFramebuffer.set(ke.getFramebuffer("depth").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1});for(let Xt of un){let ae=ke.getTerrainData(Xt.tileID),xe={u_matrix:Ht.transform.calculatePosMatrix(Xt.tileID.toUnwrapped()),u_ele_delta:ke.getMeshFrameDelta(Ht.transform.zoom)};Sn.draw(Fe,Ke.TRIANGLES,Dr,Ll.disabled,vr,Qo.backCCW,xe,ae,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain),function(Ht,ke){let Fe=Ht.context,Ke=Fe.gl,vr=_u.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),un=ke.getCoordsTexture(),Sn=ke.sourceCache.getRenderableTiles(),Xt=Ht.useProgram("terrainCoords");Fe.bindFramebuffer.set(ke.getFramebuffer("coords").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1}),ke.coordsIndex=[];for(let ae of Sn){let xe=ke.getTerrainData(ae.tileID);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,un.texture);let Ae={u_matrix:Ht.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-ke.coordsIndex.length)/255,u_texture:0,u_ele_delta:ke.getMeshFrameDelta(Ht.transform.zoom)};Xt.draw(Fe,Ke.TRIANGLES,Dr,Ll.disabled,vr,Qo.backCCW,Ae,xe,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments),ke.coordsIndex.push(ae.tileID.key)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain))}renderLayer(z,ht,Et,zt){if(!Et.isHidden(this.transform.zoom)&&(Et.type==="background"||Et.type==="custom"||(zt||[]).length))switch(this.id=Et.id,Et.type){case"symbol":(function(Ht,ke,Fe,Ke,vr){if(Ht.renderPass!=="translucent")return;let Dr=Ll.disabled,Fr=Ht.colorModeForRenderPass();(Fe._unevaluatedLayout.hasValue("text-variable-anchor")||Fe._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(un,Sn,Xt,ae,xe,Ae,je,Oe,$e){let wr=Sn.transform,Or=Xi(),Nr=xe==="map",en=Ae==="map";for(let vn of un){let In=ae.getTile(vn),Nn=In.getBucket(Xt);if(!Nn||!Nn.text||!Nn.text.segments.get().length)continue;let ii=e.ag(Nn.textSizeData,wr.zoom),Ui=Wn(In,1,Sn.transform.zoom),pa=Xr(vn.posMatrix,en,Nr,Sn.transform,Ui),fa=Xt.layout.get("icon-text-fit")!=="none"&&Nn.hasIconData();if(ii){let Ta=Math.pow(2,wr.zoom-In.tileID.overscaledZ),so=Sn.style.map.terrain?(So,ds)=>Sn.style.map.terrain.getElevation(vn,So,ds):null,Bo=Or.translatePosition(wr,In,je,Oe);yf(Nn,Nr,en,$e,wr,pa,vn.posMatrix,Ta,ii,fa,Or,Bo,vn.toUnwrapped(),so)}}}(Ke,Ht,Fe,ke,Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),vr),Fe.paint.get("icon-opacity").constantOr(1)!==0&&hd(Ht,ke,Fe,Ke,!1,Fe.paint.get("icon-translate"),Fe.paint.get("icon-translate-anchor"),Fe.layout.get("icon-rotation-alignment"),Fe.layout.get("icon-pitch-alignment"),Fe.layout.get("icon-keep-upright"),Dr,Fr),Fe.paint.get("text-opacity").constantOr(1)!==0&&hd(Ht,ke,Fe,Ke,!0,Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.layout.get("text-keep-upright"),Dr,Fr),ke.map.showCollisionBoxes&&(sh(Ht,ke,Fe,Ke,!0),sh(Ht,ke,Fe,Ke,!1))})(z,ht,Et,zt,this.style.placement.variableOffsets);break;case"circle":(function(Ht,ke,Fe,Ke){if(Ht.renderPass!=="translucent")return;let vr=Fe.paint.get("circle-opacity"),Dr=Fe.paint.get("circle-stroke-width"),Fr=Fe.paint.get("circle-stroke-opacity"),un=!Fe.layout.get("circle-sort-key").isConstant();if(vr.constantOr(1)===0&&(Dr.constantOr(1)===0||Fr.constantOr(1)===0))return;let Sn=Ht.context,Xt=Sn.gl,ae=Ht.depthModeForSublayer(0,tl.ReadOnly),xe=Ll.disabled,Ae=Ht.colorModeForRenderPass(),je=[];for(let Oe=0;OeOe.sortKey-$e.sortKey);for(let Oe of je){let{programConfiguration:$e,program:wr,layoutVertexBuffer:Or,indexBuffer:Nr,uniformValues:en,terrainData:vn}=Oe.state;wr.draw(Sn,Xt.TRIANGLES,ae,xe,Ae,Qo.disabled,en,vn,Fe.id,Or,Nr,Oe.segments,Fe.paint,Ht.transform.zoom,$e)}})(z,ht,Et,zt);break;case"heatmap":(function(Ht,ke,Fe,Ke){if(Fe.paint.get("heatmap-opacity")===0)return;let vr=Ht.context;if(Ht.style.map.terrain){for(let Dr of Ke){let Fr=ke.getTile(Dr);ke.hasRenderableParent(Dr)||(Ht.renderPass==="offscreen"?xf(Ht,Fr,Fe,Dr):Ht.renderPass==="translucent"&&Hh(Ht,Fe,Dr))}vr.viewport.set([0,0,Ht.width,Ht.height])}else Ht.renderPass==="offscreen"?function(Dr,Fr,un,Sn){let Xt=Dr.context,ae=Xt.gl,xe=Ll.disabled,Ae=new _u([ae.ONE,ae.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(je,Oe,$e){let wr=je.gl;je.activeTexture.set(wr.TEXTURE1),je.viewport.set([0,0,Oe.width/4,Oe.height/4]);let Or=$e.heatmapFbos.get(e.aU);Or?(wr.bindTexture(wr.TEXTURE_2D,Or.colorAttachment.get()),je.bindFramebuffer.set(Or.framebuffer)):(Or=Uf(je,Oe.width/4,Oe.height/4),$e.heatmapFbos.set(e.aU,Or))})(Xt,Dr,un),Xt.clear({color:e.aM.transparent});for(let je=0;je20&&Dr.texParameterf(Dr.TEXTURE_2D,vr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,vr.extTextureFilterAnisotropicMax);let Nn=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(je),ii=Nn?je:null,Ui=ii?ii.posMatrix:Ht.transform.calculatePosMatrix(je.toUnwrapped(),Ae),pa=Nl(Ui,vn||[0,0],en||1,Nr,Fe);Fr instanceof ge?un.draw(vr,Dr.TRIANGLES,Oe,Ll.disabled,Sn,Qo.disabled,pa,Nn,Fe.id,Fr.boundsBuffer,Ht.quadTriangleIndexBuffer,Fr.boundsSegments):un.draw(vr,Dr.TRIANGLES,Oe,Xt[je.overscaledZ],Sn,Qo.disabled,pa,Nn,Fe.id,Ht.rasterBoundsBuffer,Ht.quadTriangleIndexBuffer,Ht.rasterBoundsSegments)}})(z,ht,Et,zt);break;case"background":(function(Ht,ke,Fe,Ke){let vr=Fe.paint.get("background-color"),Dr=Fe.paint.get("background-opacity");if(Dr===0)return;let Fr=Ht.context,un=Fr.gl,Sn=Ht.transform,Xt=Sn.tileSize,ae=Fe.paint.get("background-pattern");if(Ht.isPatternMissing(ae))return;let xe=!ae&&vr.a===1&&Dr===1&&Ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(Ht.renderPass!==xe)return;let Ae=Ll.disabled,je=Ht.depthModeForSublayer(0,xe==="opaque"?tl.ReadWrite:tl.ReadOnly),Oe=Ht.colorModeForRenderPass(),$e=Ht.useProgram(ae?"backgroundPattern":"background"),wr=Ke||Sn.coveringTiles({tileSize:Xt,terrain:Ht.style.map.terrain});ae&&(Fr.activeTexture.set(un.TEXTURE0),Ht.imageManager.bind(Ht.context));let Or=Fe.getCrossfadeParameters();for(let Nr of wr){let en=Ke?Nr.posMatrix:Ht.transform.calculatePosMatrix(Nr.toUnwrapped()),vn=ae?ql(en,Dr,Ht,ae,{tileID:Nr,tileSize:Xt},Or):kl(en,Dr,vr),In=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(Nr);$e.draw(Fr,un.TRIANGLES,je,Ae,Oe,Qo.disabled,vn,In,Fe.id,Ht.tileExtentBuffer,Ht.quadTriangleIndexBuffer,Ht.tileExtentSegments)}})(z,0,Et,zt);break;case"custom":(function(Ht,ke,Fe){let Ke=Ht.context,vr=Fe.implementation;if(Ht.renderPass==="offscreen"){let Dr=vr.prerender;Dr&&(Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Dr.call(vr,Ke.gl,Ht.transform.customLayerMatrix()),Ke.setDirty(),Ht.setBaseState())}else if(Ht.renderPass==="translucent"){Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Ke.setStencilMode(Ll.disabled);let Dr=vr.renderingMode==="3d"?new tl(Ht.context.gl.LEQUAL,tl.ReadWrite,Ht.depthRangeFor3D):Ht.depthModeForSublayer(0,tl.ReadOnly);Ke.setDepthMode(Dr),vr.render(Ke.gl,Ht.transform.customLayerMatrix(),{farZ:Ht.transform.farZ,nearZ:Ht.transform.nearZ,fov:Ht.transform._fov,modelViewProjectionMatrix:Ht.transform.modelViewProjectionMatrix,projectionMatrix:Ht.transform.projectionMatrix}),Ke.setDirty(),Ht.setBaseState(),Ke.bindFramebuffer.set(null)}})(z,0,Et)}}translatePosMatrix(z,ht,Et,zt,Ht){if(!Et[0]&&!Et[1])return z;let ke=Ht?zt==="map"?this.transform.angle:0:zt==="viewport"?-this.transform.angle:0;if(ke){let vr=Math.sin(ke),Dr=Math.cos(ke);Et=[Et[0]*Dr-Et[1]*vr,Et[0]*vr+Et[1]*Dr]}let Fe=[Ht?Et[0]:Wn(ht,Et[0],this.transform.zoom),Ht?Et[1]:Wn(ht,Et[1],this.transform.zoom),0],Ke=new Float32Array(16);return e.J(Ke,z,Fe),Ke}saveTileTexture(z){let ht=this._tileTextures[z.size[0]];ht?ht.push(z):this._tileTextures[z.size[0]]=[z]}getTileTexture(z){let ht=this._tileTextures[z];return ht&&ht.length>0?ht.pop():null}isPatternMissing(z){if(!z)return!1;if(!z.from||!z.to)return!0;let ht=this.imageManager.getPattern(z.from.toString()),Et=this.imageManager.getPattern(z.to.toString());return!ht||!Et}useProgram(z,ht){this.cache=this.cache||{};let Et=z+(ht?ht.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Et]||(this.cache[Et]=new Fn(this.context,on[z],ht,Jl[z],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Et]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(z.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:z,drawingBufferHeight:ht}=this.context.gl;return this.width!==z||this.height!==ht}}class hu{constructor(z,ht){this.points=z,this.planes=ht}static fromInvProjectionMatrix(z,ht,Et){let zt=Math.pow(2,Et),Ht=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Fe=>{let Ke=1/(Fe=e.af([],Fe,z))[3]/ht*zt;return e.b1(Fe,Fe,[Ke,Ke,1/Fe[3],Ke])}),ke=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Fe=>{let Ke=function(un,Sn){var Xt=Sn[0],ae=Sn[1],xe=Sn[2],Ae=Xt*Xt+ae*ae+xe*xe;return Ae>0&&(Ae=1/Math.sqrt(Ae)),un[0]=Sn[0]*Ae,un[1]=Sn[1]*Ae,un[2]=Sn[2]*Ae,un}([],function(un,Sn,Xt){var ae=Sn[0],xe=Sn[1],Ae=Sn[2],je=Xt[0],Oe=Xt[1],$e=Xt[2];return un[0]=xe*$e-Ae*Oe,un[1]=Ae*je-ae*$e,un[2]=ae*Oe-xe*je,un}([],M([],Ht[Fe[0]],Ht[Fe[1]]),M([],Ht[Fe[2]],Ht[Fe[1]]))),vr=-((Dr=Ke)[0]*(Fr=Ht[Fe[1]])[0]+Dr[1]*Fr[1]+Dr[2]*Fr[2]);var Dr,Fr;return Ke.concat(vr)});return new hu(Ht,ke)}}class Ch{constructor(z,ht){this.min=z,this.max=ht,this.center=function(Et,zt,Ht){return Et[0]=.5*zt[0],Et[1]=.5*zt[1],Et[2]=.5*zt[2],Et}([],function(Et,zt,Ht){return Et[0]=zt[0]+Ht[0],Et[1]=zt[1]+Ht[1],Et[2]=zt[2]+Ht[2],Et}([],this.min,this.max))}quadrant(z){let ht=[z%2==0,z<2],Et=_(this.min),zt=_(this.max);for(let Ht=0;Ht=0&&ke++;if(ke===0)return 0;ke!==ht.length&&(Et=!1)}if(Et)return 2;for(let zt=0;zt<3;zt++){let Ht=Number.MAX_VALUE,ke=-Number.MAX_VALUE;for(let Fe=0;Fethis.max[zt]-this.min[zt])return 0}return 1}}class Mc{constructor(z=0,ht=0,Et=0,zt=0){if(isNaN(z)||z<0||isNaN(ht)||ht<0||isNaN(Et)||Et<0||isNaN(zt)||zt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=z,this.bottom=ht,this.left=Et,this.right=zt}interpolate(z,ht,Et){return ht.top!=null&&z.top!=null&&(this.top=e.y.number(z.top,ht.top,Et)),ht.bottom!=null&&z.bottom!=null&&(this.bottom=e.y.number(z.bottom,ht.bottom,Et)),ht.left!=null&&z.left!=null&&(this.left=e.y.number(z.left,ht.left,Et)),ht.right!=null&&z.right!=null&&(this.right=e.y.number(z.right,ht.right,Et)),this}getCenter(z,ht){let Et=e.ac((this.left+z-this.right)/2,0,z),zt=e.ac((this.top+ht-this.bottom)/2,0,ht);return new e.P(Et,zt)}equals(z){return this.top===z.top&&this.bottom===z.bottom&&this.left===z.left&&this.right===z.right}clone(){return new Mc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Uc=85.051129;class bu{constructor(z,ht,Et,zt,Ht){this.tileSize=512,this._renderWorldCopies=Ht===void 0||!!Ht,this._minZoom=z||0,this._maxZoom=ht||22,this._minPitch=Et??0,this._maxPitch=zt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Mc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let z=new bu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return z.apply(this),z}apply(z){this.tileSize=z.tileSize,this.latRange=z.latRange,this.lngRange=z.lngRange,this.width=z.width,this.height=z.height,this._center=z._center,this._elevation=z._elevation,this.minElevationForCurrentTile=z.minElevationForCurrentTile,this.zoom=z.zoom,this.angle=z.angle,this._fov=z._fov,this._pitch=z._pitch,this._unmodified=z._unmodified,this._edgeInsets=z._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(z){this._minZoom!==z&&(this._minZoom=z,this.zoom=Math.max(this.zoom,z))}get maxZoom(){return this._maxZoom}set maxZoom(z){this._maxZoom!==z&&(this._maxZoom=z,this.zoom=Math.min(this.zoom,z))}get minPitch(){return this._minPitch}set minPitch(z){this._minPitch!==z&&(this._minPitch=z,this.pitch=Math.max(this.pitch,z))}get maxPitch(){return this._maxPitch}set maxPitch(z){this._maxPitch!==z&&(this._maxPitch=z,this.pitch=Math.min(this.pitch,z))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(z){z===void 0?z=!0:z===null&&(z=!1),this._renderWorldCopies=z}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(z){let ht=-e.b3(z,-180,180)*Math.PI/180;this.angle!==ht&&(this._unmodified=!1,this.angle=ht,this._calcMatrices(),this.rotationMatrix=function(){var Et=new e.A(4);return e.A!=Float32Array&&(Et[1]=0,Et[2]=0),Et[0]=1,Et[3]=1,Et}(),function(Et,zt,Ht){var ke=zt[0],Fe=zt[1],Ke=zt[2],vr=zt[3],Dr=Math.sin(Ht),Fr=Math.cos(Ht);Et[0]=ke*Fr+Ke*Dr,Et[1]=Fe*Fr+vr*Dr,Et[2]=ke*-Dr+Ke*Fr,Et[3]=Fe*-Dr+vr*Fr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(z){let ht=e.ac(z,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ht&&(this._unmodified=!1,this._pitch=ht,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(z){z=Math.max(.01,Math.min(60,z)),this._fov!==z&&(this._unmodified=!1,this._fov=z/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(z){let ht=Math.min(Math.max(z,this.minZoom),this.maxZoom);this._zoom!==ht&&(this._unmodified=!1,this._zoom=ht,this.tileZoom=Math.max(0,Math.floor(ht)),this.scale=this.zoomScale(ht),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(z){z.lat===this._center.lat&&z.lng===this._center.lng||(this._unmodified=!1,this._center=z,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(z){z!==this._elevation&&(this._elevation=z,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(z){this._edgeInsets.equals(z)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,z,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(z){return this._edgeInsets.equals(z)}interpolatePadding(z,ht,Et){this._unmodified=!1,this._edgeInsets.interpolate(z,ht,Et),this._constrain(),this._calcMatrices()}coveringZoomLevel(z){let ht=(z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/z.tileSize));return Math.max(0,ht)}getVisibleUnwrappedCoordinates(z){let ht=[new e.b4(0,z)];if(this._renderWorldCopies){let Et=this.pointCoordinate(new e.P(0,0)),zt=this.pointCoordinate(new e.P(this.width,0)),Ht=this.pointCoordinate(new e.P(this.width,this.height)),ke=this.pointCoordinate(new e.P(0,this.height)),Fe=Math.floor(Math.min(Et.x,zt.x,Ht.x,ke.x)),Ke=Math.floor(Math.max(Et.x,zt.x,Ht.x,ke.x)),vr=1;for(let Dr=Fe-vr;Dr<=Ke+vr;Dr++)Dr!==0&&ht.push(new e.b4(Dr,z))}return ht}coveringTiles(z){var ht,Et;let zt=this.coveringZoomLevel(z),Ht=zt;if(z.minzoom!==void 0&&ztz.maxzoom&&(zt=z.maxzoom);let ke=this.pointCoordinate(this.getCameraPoint()),Fe=e.Z.fromLngLat(this.center),Ke=Math.pow(2,zt),vr=[Ke*ke.x,Ke*ke.y,0],Dr=[Ke*Fe.x,Ke*Fe.y,0],Fr=hu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,zt),un=z.minzoom||0;!z.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(un=zt);let Sn=z.terrain?2/Math.min(this.tileSize,z.tileSize)*this.tileSize:3,Xt=Oe=>({aabb:new Ch([Oe*Ke,0,0],[(Oe+1)*Ke,Ke,0]),zoom:0,x:0,y:0,wrap:Oe,fullyVisible:!1}),ae=[],xe=[],Ae=zt,je=z.reparseOverscaled?Ht:zt;if(this._renderWorldCopies)for(let Oe=1;Oe<=3;Oe++)ae.push(Xt(-Oe)),ae.push(Xt(Oe));for(ae.push(Xt(0));ae.length>0;){let Oe=ae.pop(),$e=Oe.x,wr=Oe.y,Or=Oe.fullyVisible;if(!Or){let Nn=Oe.aabb.intersects(Fr);if(Nn===0)continue;Or=Nn===2}let Nr=z.terrain?vr:Dr,en=Oe.aabb.distanceX(Nr),vn=Oe.aabb.distanceY(Nr),In=Math.max(Math.abs(en),Math.abs(vn));if(Oe.zoom===Ae||In>Sn+(1<=un){let Nn=Ae-Oe.zoom,ii=vr[0]-.5-($e<>1),pa=Oe.zoom+1,fa=Oe.aabb.quadrant(Nn);if(z.terrain){let Ta=new e.S(pa,Oe.wrap,pa,ii,Ui),so=z.terrain.getMinMaxElevation(Ta),Bo=(ht=so.minElevation)!==null&&ht!==void 0?ht:this.elevation,So=(Et=so.maxElevation)!==null&&Et!==void 0?Et:this.elevation;fa=new Ch([fa.min[0],fa.min[1],Bo],[fa.max[0],fa.max[1],So])}ae.push({aabb:fa,zoom:pa,x:ii,y:Ui,wrap:Oe.wrap,fullyVisible:Or})}}return xe.sort((Oe,$e)=>Oe.distanceSq-$e.distanceSq).map(Oe=>Oe.tileID)}resize(z,ht){this.width=z,this.height=ht,this.pixelsToGLUnits=[2/z,-2/ht],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(z){return Math.pow(2,z)}scaleZoom(z){return Math.log(z)/Math.LN2}project(z){let ht=e.ac(z.lat,-85.051129,Uc);return new e.P(e.O(z.lng)*this.worldSize,e.Q(ht)*this.worldSize)}unproject(z){return new e.Z(z.x/this.worldSize,z.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(z){let ht=this.elevation,Et=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,zt=this.pointLocation(this.centerPoint,z),Ht=z.getElevationForLngLatZoom(zt,this.tileZoom);if(!(this.elevation-Ht))return;let ke=Et+ht-Ht,Fe=Math.cos(this._pitch)*this.cameraToCenterDistance/ke/e.b5(1,zt.lat),Ke=this.scaleZoom(Fe/this.tileSize);this._elevation=Ht,this._center=zt,this.zoom=Ke}setLocationAtPoint(z,ht){let Et=this.pointCoordinate(ht),zt=this.pointCoordinate(this.centerPoint),Ht=this.locationCoordinate(z),ke=new e.Z(Ht.x-(Et.x-zt.x),Ht.y-(Et.y-zt.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(z,ht){return ht?this.coordinatePoint(this.locationCoordinate(z),ht.getElevationForLngLatZoom(z,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(z))}pointLocation(z,ht){return this.coordinateLocation(this.pointCoordinate(z,ht))}locationCoordinate(z){return e.Z.fromLngLat(z)}coordinateLocation(z){return z&&z.toLngLat()}pointCoordinate(z,ht){if(ht){let un=ht.pointCoordinate(z);if(un!=null)return un}let Et=[z.x,z.y,0,1],zt=[z.x,z.y,1,1];e.af(Et,Et,this.pixelMatrixInverse),e.af(zt,zt,this.pixelMatrixInverse);let Ht=Et[3],ke=zt[3],Fe=Et[1]/Ht,Ke=zt[1]/ke,vr=Et[2]/Ht,Dr=zt[2]/ke,Fr=vr===Dr?0:(0-vr)/(Dr-vr);return new e.Z(e.y.number(Et[0]/Ht,zt[0]/ke,Fr)/this.worldSize,e.y.number(Fe,Ke,Fr)/this.worldSize)}coordinatePoint(z,ht=0,Et=this.pixelMatrix){let zt=[z.x*this.worldSize,z.y*this.worldSize,ht,1];return e.af(zt,zt,Et),new e.P(zt[0]/zt[3],zt[1]/zt[3])}getBounds(){let z=Math.max(0,this.height/2-this.getHorizon());return new ut().extend(this.pointLocation(new e.P(0,z))).extend(this.pointLocation(new e.P(this.width,z))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ut([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(z){z?(this.lngRange=[z.getWest(),z.getEast()],this.latRange=[z.getSouth(),z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Uc])}calculateTileMatrix(z){let ht=z.canonical,Et=this.worldSize/this.zoomScale(ht.z),zt=ht.x+Math.pow(2,ht.z)*z.wrap,Ht=e.an(new Float64Array(16));return e.J(Ht,Ht,[zt*Et,ht.y*Et,0]),e.K(Ht,Ht,[Et/e.X,Et/e.X,1]),Ht}calculatePosMatrix(z,ht=!1){let Et=z.key,zt=ht?this._alignedPosMatrixCache:this._posMatrixCache;if(zt[Et])return zt[Et];let Ht=this.calculateTileMatrix(z);return e.L(Ht,ht?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Ht),zt[Et]=new Float32Array(Ht),zt[Et]}calculateFogMatrix(z){let ht=z.key,Et=this._fogMatrixCache;if(Et[ht])return Et[ht];let zt=this.calculateTileMatrix(z);return e.L(zt,this.fogMatrix,zt),Et[ht]=new Float32Array(zt),Et[ht]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(z,ht){ht=e.ac(+ht,this.minZoom,this.maxZoom);let Et={center:new e.N(z.lng,z.lat),zoom:ht},zt=this.lngRange;if(!this._renderWorldCopies&&zt===null){let Oe=179.9999999999;zt=[-Oe,Oe]}let Ht=this.tileSize*this.zoomScale(Et.zoom),ke=0,Fe=Ht,Ke=0,vr=Ht,Dr=0,Fr=0,{x:un,y:Sn}=this.size;if(this.latRange){let Oe=this.latRange;ke=e.Q(Oe[1])*Ht,Fe=e.Q(Oe[0])*Ht,Fe-keFe&&(Ae=Fe-Oe)}if(zt){let Oe=(Ke+vr)/2,$e=Xt;this._renderWorldCopies&&($e=e.b3(Xt,Oe-Ht/2,Oe+Ht/2));let wr=un/2;$e-wrvr&&(xe=vr-wr)}if(xe!==void 0||Ae!==void 0){let Oe=new e.P(xe??Xt,Ae??ae);Et.center=this.unproject.call({worldSize:Ht},Oe).wrap()}return Et}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let z=this._unmodified,{center:ht,zoom:Et}=this.getConstrained(this.center,this.zoom);this.center=ht,this.zoom=Et,this._unmodified=z,this._constraining=!1}_calcMatrices(){if(!this.height)return;let z=this.centerOffset,ht=this.point.x,Et=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let zt=e.an(new Float64Array(16));e.K(zt,zt,[this.width/2,-this.height/2,1]),e.J(zt,zt,[1,-1,0]),this.labelPlaneMatrix=zt,zt=e.an(new Float64Array(16)),e.K(zt,zt,[1,-1,1]),e.J(zt,zt,[-1,-1,0]),e.K(zt,zt,[2/this.width,2/this.height,1]),this.glCoordMatrix=zt;let Ht=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ke=Math.min(this.elevation,this.minElevationForCurrentTile),Fe=Ht-ke*this._pixelPerMeter/Math.cos(this._pitch),Ke=ke<0?Fe:Ht,vr=Math.PI/2+this._pitch,Dr=this._fov*(.5+z.y/this.height),Fr=Math.sin(Dr)*Ke/Math.sin(e.ac(Math.PI-vr-Dr,.01,Math.PI-.01)),un=this.getHorizon(),Sn=2*Math.atan(un/this.cameraToCenterDistance)*(.5+z.y/(2*un)),Xt=Math.sin(Sn)*Ke/Math.sin(e.ac(Math.PI-vr-Sn,.01,Math.PI-.01)),ae=Math.min(Fr,Xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ke),this.nearZ=this.height/50,zt=new Float64Array(16),e.b6(zt,this._fov,this.width/this.height,this.nearZ,this.farZ),zt[8]=2*-z.x/this.width,zt[9]=2*z.y/this.height,this.projectionMatrix=e.ae(zt),e.K(zt,zt,[1,-1,1]),e.J(zt,zt,[0,0,-this.cameraToCenterDistance]),e.b7(zt,zt,this._pitch),e.ad(zt,zt,this.angle),e.J(zt,zt,[-ht,-Et,0]),this.mercatorMatrix=e.K([],zt,[this.worldSize,this.worldSize,this.worldSize]),e.K(zt,zt,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,zt),e.J(zt,zt,[0,0,-this.elevation]),this.modelViewProjectionMatrix=zt,this.invModelViewProjectionMatrix=e.as([],zt),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Ht,this.farZ),this.fogMatrix[8]=2*-z.x/this.width,this.fogMatrix[9]=2*z.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-ht,-Et,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,zt);let xe=this.width%2/2,Ae=this.height%2/2,je=Math.cos(this.angle),Oe=Math.sin(this.angle),$e=ht-Math.round(ht)+je*xe+Oe*Ae,wr=Et-Math.round(Et)+je*Ae+Oe*xe,Or=new Float64Array(zt);if(e.J(Or,Or,[$e>.5?$e-1:$e,wr>.5?wr-1:wr,0]),this.alignedModelViewProjectionMatrix=Or,zt=e.as(new Float64Array(16),this.pixelMatrix),!zt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=zt,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let z=this.pointCoordinate(new e.P(0,0)),ht=[z.x*this.worldSize,z.y*this.worldSize,0,1];return e.af(ht,ht,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let z=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,z))}getCameraQueryGeometry(z){let ht=this.getCameraPoint();if(z.length===1)return[z[0],ht];{let Et=ht.x,zt=ht.y,Ht=ht.x,ke=ht.y;for(let Fe of z)Et=Math.min(Et,Fe.x),zt=Math.min(zt,Fe.y),Ht=Math.max(Ht,Fe.x),ke=Math.max(ke,Fe.y);return[new e.P(Et,zt),new e.P(Ht,zt),new e.P(Ht,ke),new e.P(Et,ke),new e.P(Et,zt)]}}lngLatToCameraDepth(z,ht){let Et=this.locationCoordinate(z),zt=[Et.x*this.worldSize,Et.y*this.worldSize,ht,1];return e.af(zt,zt,this.modelViewProjectionMatrix),zt[2]/zt[3]}}function uf($t,z){let ht,Et=!1,zt=null,Ht=null,ke=()=>{zt=null,Et&&($t.apply(Ht,ht),zt=setTimeout(ke,z),Et=!1)};return(...Fe)=>(Et=!0,Ht=this,ht=Fe,zt||ke(),zt)}class vh{constructor(z){this._getCurrentHash=()=>{let ht=window.location.hash.replace("#","");if(this._hashName){let Et;return ht.split("&").map(zt=>zt.split("=")).forEach(zt=>{zt[0]===this._hashName&&(Et=zt)}),(Et&&Et[1]||"").split("/")}return ht.split("/")},this._onHashChange=()=>{let ht=this._getCurrentHash();if(ht.length>=3&&!ht.some(Et=>isNaN(Et))){let Et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ht[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ht[2],+ht[1]],zoom:+ht[0],bearing:Et,pitch:+(ht[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ht=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ht)},this._removeHash=()=>{let ht=this._getCurrentHash();if(ht.length===0)return;let Et=ht.join("/"),zt=Et;zt.split("&").length>0&&(zt=zt.split("&")[0]),this._hashName&&(zt=`${this._hashName}=${Et}`);let Ht=window.location.hash.replace(zt,"");Ht.startsWith("#&")?Ht=Ht.slice(0,1)+Ht.slice(2):Ht==="#"&&(Ht="");let ke=window.location.href.replace(/(#.+)?$/,Ht);ke=ke.replace("&&","&"),window.history.replaceState(window.history.state,null,ke)},this._updateHash=uf(this._updateHashUnthrottled,300),this._hashName=z&&encodeURIComponent(z)}addTo(z){return this._map=z,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(z){let ht=this._map.getCenter(),Et=Math.round(100*this._map.getZoom())/100,zt=Math.ceil((Et*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ht=Math.pow(10,zt),ke=Math.round(ht.lng*Ht)/Ht,Fe=Math.round(ht.lat*Ht)/Ht,Ke=this._map.getBearing(),vr=this._map.getPitch(),Dr="";if(Dr+=z?`/${ke}/${Fe}/${Et}`:`${Et}/${Fe}/${ke}`,(Ke||vr)&&(Dr+="/"+Math.round(10*Ke)/10),vr&&(Dr+=`/${Math.round(vr)}`),this._hashName){let Fr=this._hashName,un=!1,Sn=window.location.hash.slice(1).split("&").map(Xt=>{let ae=Xt.split("=")[0];return ae===Fr?(un=!0,`${ae}=${Dr}`):Xt}).filter(Xt=>Xt);return un||Sn.push(`${Fr}=${Dr}`),`#${Sn.join("&")}`}return`#${Dr}`}}let qh={linearity:.3,easing:e.b8(0,0,.3,1)},Cf=e.e({deceleration:2500,maxSpeed:1400},qh),Ld=e.e({deceleration:20,maxSpeed:1400},qh),Jd=e.e({deceleration:1e3,maxSpeed:360},qh),cf=e.e({deceleration:1e3,maxSpeed:90},qh);class Lf{constructor(z){this._map=z,this.clear()}clear(){this._inertiaBuffer=[]}record(z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.now(),settings:z})}_drainInertiaBuffer(){let z=this._inertiaBuffer,ht=o.now();for(;z.length>0&&ht-z[0].time>160;)z.shift()}_onMoveEnd(z){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ht={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Ht}of this._inertiaBuffer)ht.zoom+=Ht.zoomDelta||0,ht.bearing+=Ht.bearingDelta||0,ht.pitch+=Ht.pitchDelta||0,Ht.panDelta&&ht.pan._add(Ht.panDelta),Ht.around&&(ht.around=Ht.around),Ht.pinchAround&&(ht.pinchAround=Ht.pinchAround);let Et=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,zt={};if(ht.pan.mag()){let Ht=hf(ht.pan.mag(),Et,e.e({},Cf,z||{}));zt.offset=ht.pan.mult(Ht.amount/ht.pan.mag()),zt.center=this._map.transform.center,wc(zt,Ht)}if(ht.zoom){let Ht=hf(ht.zoom,Et,Ld);zt.zoom=this._map.transform.zoom+Ht.amount,wc(zt,Ht)}if(ht.bearing){let Ht=hf(ht.bearing,Et,Jd);zt.bearing=this._map.transform.bearing+e.ac(Ht.amount,-179,179),wc(zt,Ht)}if(ht.pitch){let Ht=hf(ht.pitch,Et,cf);zt.pitch=this._map.transform.pitch+Ht.amount,wc(zt,Ht)}if(zt.zoom||zt.bearing){let Ht=ht.pinchAround===void 0?ht.around:ht.pinchAround;zt.around=Ht?this._map.unproject(Ht):this._map.getCenter()}return this.clear(),e.e(zt,{noMoveStart:!0})}}function wc($t,z){(!$t.duration||$t.durationht.unproject(Ke)),Fe=Ht.reduce((Ke,vr,Dr,Fr)=>Ke.add(vr.div(Fr.length)),new e.P(0,0));super(z,{points:Ht,point:Fe,lngLats:ke,lngLat:ht.unproject(Fe),originalEvent:Et}),this._defaultPrevented=!1}}class Pf extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(z,ht,Et){super(z,{originalEvent:Et}),this._defaultPrevented=!1}}class yh{constructor(z,ht){this._map=z,this._clickTolerance=ht.clickTolerance}reset(){delete this._mousedownPos}wheel(z){return this._firePreventable(new Pf(z.type,this._map,z))}mousedown(z,ht){return this._mousedownPos=ht,this._firePreventable(new Qc(z.type,this._map,z))}mouseup(z){this._map.fire(new Qc(z.type,this._map,z))}click(z,ht){this._mousedownPos&&this._mousedownPos.dist(ht)>=this._clickTolerance||this._map.fire(new Qc(z.type,this._map,z))}dblclick(z){return this._firePreventable(new Qc(z.type,this._map,z))}mouseover(z){this._map.fire(new Qc(z.type,this._map,z))}mouseout(z){this._map.fire(new Qc(z.type,this._map,z))}touchstart(z){return this._firePreventable(new ff(z.type,this._map,z))}touchmove(z){this._map.fire(new ff(z.type,this._map,z))}touchend(z){this._map.fire(new ff(z.type,this._map,z))}touchcancel(z){this._map.fire(new ff(z.type,this._map,z))}_firePreventable(z){if(this._map.fire(z),z.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wu{constructor(z){this._map=z}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(z){this._map.fire(new Qc(z.type,this._map,z))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(z){this._delayContextMenu?this._contextMenuEvent=z:this._ignoreContextMenu||this._map.fire(new Qc(z.type,this._map,z)),this._map.listens("contextmenu")&&z.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lh{constructor(z){this._map=z}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(z){return this.transform.pointLocation(e.P.convert(z),this._map.terrain)}}class Vc{constructor(z,ht){this._map=z,this._tr=new Lh(z),this._el=z.getCanvasContainer(),this._container=z.getContainer(),this._clickTolerance=ht.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(z,ht){this.isEnabled()&&z.shiftKey&&z.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ht,this._active=!0)}mousemoveWindow(z,ht){if(!this._active)return;let Et=ht;if(this._lastPos.equals(Et)||!this._box&&Et.dist(this._startPos)Ht.fitScreenCoordinates(Et,zt,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",z)}keydown(z){this._active&&z.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",z))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(z,ht){return this._map.fire(new e.k(z,{originalEvent:ht}))}}function fd($t,z){if($t.length!==z.length)throw new Error(`The number of touches and points are not equal - touches ${$t.length}, points ${z.length}`);let ht={};for(let Et=0;Et<$t.length;Et++)ht[$t[Et].identifier]=z[Et];return ht}class yu{constructor(z){this.reset(),this.numTouches=z.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(z,ht,Et){(this.centroid||Et.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=z.timeStamp),Et.length===this.numTouches&&(this.centroid=function(zt){let Ht=new e.P(0,0);for(let ke of zt)Ht._add(ke);return Ht.div(zt.length)}(ht),this.touches=fd(Et,ht)))}touchmove(z,ht,Et){if(this.aborted||!this.centroid)return;let zt=fd(Et,ht);for(let Ht in this.touches){let ke=zt[Ht];(!ke||ke.dist(this.touches[Ht])>30)&&(this.aborted=!0)}}touchend(z,ht,Et){if((!this.centroid||z.timeStamp-this.startTime>500)&&(this.aborted=!0),Et.length===0){let zt=!this.aborted&&this.centroid;if(this.reset(),zt)return zt}}}class bf{constructor(z){this.singleTap=new yu(z),this.numTaps=z.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(z,ht,Et){this.singleTap.touchstart(z,ht,Et)}touchmove(z,ht,Et){this.singleTap.touchmove(z,ht,Et)}touchend(z,ht,Et){let zt=this.singleTap.touchend(z,ht,Et);if(zt){let Ht=z.timeStamp-this.lastTime<500,ke=!this.lastTap||this.lastTap.dist(zt)<30;if(Ht&&ke||this.reset(),this.count++,this.lastTime=z.timeStamp,this.lastTap=zt,this.count===this.numTaps)return this.reset(),zt}}}class $h{constructor(z){this._tr=new Lh(z),this._zoomIn=new bf({numTouches:1,numTaps:2}),this._zoomOut=new bf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(z,ht,Et){this._zoomIn.touchstart(z,ht,Et),this._zoomOut.touchstart(z,ht,Et)}touchmove(z,ht,Et){this._zoomIn.touchmove(z,ht,Et),this._zoomOut.touchmove(z,ht,Et)}touchend(z,ht,Et){let zt=this._zoomIn.touchend(z,ht,Et),Ht=this._zoomOut.touchend(z,ht,Et),ke=this._tr;return zt?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:ke.zoom+1,around:ke.unproject(zt)},{originalEvent:z})}):Ht?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:ke.zoom-1,around:ke.unproject(Ht)},{originalEvent:z})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class th{constructor(z){this._enabled=!!z.enable,this._moveStateManager=z.moveStateManager,this._clickTolerance=z.clickTolerance||1,this._moveFunction=z.move,this._activateOnStart=!!z.activateOnStart,z.assignEvents(this),this.reset()}reset(z){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(z)}_move(...z){let ht=this._moveFunction(...z);if(ht.bearingDelta||ht.pitchDelta||ht.around||ht.panDelta)return this._active=!0,ht}dragStart(z,ht){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(z)&&(this._moveStateManager.startMove(z),this._lastPoint=ht.length?ht[0]:ht,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(z,ht){if(!this.isEnabled())return;let Et=this._lastPoint;if(!Et)return;if(z.preventDefault(),!this._moveStateManager.isValidMoveEvent(z))return void this.reset(z);let zt=ht.length?ht[0]:ht;return!this._moved&&zt.dist(Et){$t.mousedown=$t.dragStart,$t.mousemoveWindow=$t.dragMove,$t.mouseup=$t.dragEnd,$t.contextmenu=z=>{z.preventDefault()}},gc=({enable:$t,clickTolerance:z,bearingDegreesPerPixelMoved:ht=.8})=>{let Et=new Zh({checkCorrectEvent:zt=>i.mouseButton(zt)===0&&zt.ctrlKey||i.mouseButton(zt)===2});return new th({clickTolerance:z,move:(zt,Ht)=>({bearingDelta:(Ht.x-zt.x)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})},Jf=({enable:$t,clickTolerance:z,pitchDegreesPerPixelMoved:ht=-.5})=>{let Et=new Zh({checkCorrectEvent:zt=>i.mouseButton(zt)===0&&zt.ctrlKey||i.mouseButton(zt)===2});return new th({clickTolerance:z,move:(zt,Ht)=>({pitchDelta:(Ht.y-zt.y)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})};class eh{constructor(z,ht){this._clickTolerance=z.clickTolerance||1,this._map=ht,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(z){return z<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(z,ht,Et){return this._calculateTransform(z,ht,Et)}touchmove(z,ht,Et){if(this._active){if(!this._shouldBePrevented(Et.length))return z.preventDefault(),this._calculateTransform(z,ht,Et);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",z)}}touchend(z,ht,Et){this._calculateTransform(z,ht,Et),this._active&&this._shouldBePrevented(Et.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(z,ht,Et){Et.length>0&&(this._active=!0);let zt=fd(Et,ht),Ht=new e.P(0,0),ke=new e.P(0,0),Fe=0;for(let vr in zt){let Dr=zt[vr],Fr=this._touches[vr];Fr&&(Ht._add(Dr),ke._add(Dr.sub(Fr)),Fe++,zt[vr]=Dr)}if(this._touches=zt,this._shouldBePrevented(Fe)||!ke.mag())return;let Ke=ke.div(Fe);return this._sum._add(Ke),this._sum.mag()Math.abs($t.x)}class Wf extends Ph{constructor(z){super(),this._currentTouchCount=0,this._map=z}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(z,ht,Et){super.touchstart(z,ht,Et),this._currentTouchCount=Et.length}_start(z){this._lastPoints=z,bh(z[0].sub(z[1]))&&(this._valid=!1)}_move(z,ht,Et){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let zt=z[0].sub(this._lastPoints[0]),Ht=z[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(zt,Ht,Et.timeStamp),this._valid?(this._lastPoints=z,this._active=!0,{pitchDelta:(zt.y+Ht.y)/2*-.5}):void 0}gestureBeginsVertically(z,ht,Et){if(this._valid!==void 0)return this._valid;let zt=z.mag()>=2,Ht=ht.mag()>=2;if(!zt&&!Ht)return;if(!zt||!Ht)return this._firstMove===void 0&&(this._firstMove=Et),Et-this._firstMove<100&&void 0;let ke=z.y>0==ht.y>0;return bh(z)&&bh(ht)&&ke}}let gr={panStep:100,bearingStep:15,pitchStep:10};class Ur{constructor(z){this._tr=new Lh(z);let ht=gr;this._panStep=ht.panStep,this._bearingStep=ht.bearingStep,this._pitchStep=ht.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(z){if(z.altKey||z.ctrlKey||z.metaKey)return;let ht=0,Et=0,zt=0,Ht=0,ke=0;switch(z.keyCode){case 61:case 107:case 171:case 187:ht=1;break;case 189:case 109:case 173:ht=-1;break;case 37:z.shiftKey?Et=-1:(z.preventDefault(),Ht=-1);break;case 39:z.shiftKey?Et=1:(z.preventDefault(),Ht=1);break;case 38:z.shiftKey?zt=1:(z.preventDefault(),ke=-1);break;case 40:z.shiftKey?zt=-1:(z.preventDefault(),ke=1);break;default:return}return this._rotationDisabled&&(Et=0,zt=0),{cameraAnimation:Fe=>{let Ke=this._tr;Fe.easeTo({duration:300,easeId:"keyboardHandler",easing:wn,zoom:ht?Math.round(Ke.zoom)+ht*(z.shiftKey?2:1):Ke.zoom,bearing:Ke.bearing+Et*this._bearingStep,pitch:Ke.pitch+zt*this._pitchStep,offset:[-Ht*this._panStep,-ke*this._panStep],center:Ke.center},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function wn($t){return $t*(2-$t)}let hn=4.000244140625;class qn{constructor(z,ht){this._onTimeout=Et=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Et)},this._map=z,this._tr=new Lh(z),this._triggerRenderFrame=ht,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(z){this._defaultZoomRate=z}setWheelZoomRate(z){this._wheelZoomRate=z}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!z&&z.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(z){return!!this._map.cooperativeGestures.isEnabled()&&!(z.ctrlKey||this._map.cooperativeGestures.isBypassed(z))}wheel(z){if(!this.isEnabled())return;if(this._shouldBePrevented(z))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",z);let ht=z.deltaMode===WheelEvent.DOM_DELTA_LINE?40*z.deltaY:z.deltaY,Et=o.now(),zt=Et-(this._lastWheelEventTime||0);this._lastWheelEventTime=Et,ht!==0&&ht%hn==0?this._type="wheel":ht!==0&&Math.abs(ht)<4?this._type="trackpad":zt>400?(this._type=null,this._lastValue=ht,this._timeout=setTimeout(this._onTimeout,40,z)):this._type||(this._type=Math.abs(zt*ht)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ht+=this._lastValue)),z.shiftKey&&ht&&(ht/=4),this._type&&(this._lastWheelEvent=z,this._delta-=ht,this._active||this._start(z)),z.preventDefault()}_start(z){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ht=i.mousePos(this._map.getCanvas(),z),Et=this._tr;this._around=ht.y>Et.transform.height/2-Et.transform.getHorizon()?e.N.convert(this._aroundCenter?Et.center:Et.unproject(ht)):e.N.convert(Et.center),this._aroundPoint=Et.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let z=this._tr.transform;if(this._delta!==0){let Ke=this._type==="wheel"&&Math.abs(this._delta)>hn?this._wheelZoomRate:this._defaultZoomRate,vr=2/(1+Math.exp(-Math.abs(this._delta*Ke)));this._delta<0&&vr!==0&&(vr=1/vr);let Dr=typeof this._targetZoom=="number"?z.zoomScale(this._targetZoom):z.scale;this._targetZoom=Math.min(z.maxZoom,Math.max(z.minZoom,z.scaleZoom(Dr*vr))),this._type==="wheel"&&(this._startZoom=z.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ht=typeof this._targetZoom=="number"?this._targetZoom:z.zoom,Et=this._startZoom,zt=this._easing,Ht,ke=!1,Fe=o.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Et&&zt&&Fe){let Ke=Math.min(Fe/200,1),vr=zt(Ke);Ht=e.y.number(Et,ht,vr),Ke<1?this._frameId||(this._frameId=!0):ke=!0}else Ht=ht,ke=!0;return this._active=!0,ke&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ke,zoomDelta:Ht-z.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(z){let ht=e.b9;if(this._prevEase){let Et=this._prevEase,zt=(o.now()-Et.start)/Et.duration,Ht=Et.easing(zt+.01)-Et.easing(zt),ke=.27/Math.sqrt(Ht*Ht+1e-4)*.01,Fe=Math.sqrt(.0729-ke*ke);ht=e.b8(ke,Fe,.25,1)}return this._prevEase={start:o.now(),duration:z,easing:ht},ht}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class di{constructor(z,ht){this._clickZoom=z,this._tapZoom=ht}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class aa{constructor(z){this._tr=new Lh(z),this.reset()}reset(){this._active=!1}dblclick(z,ht){return z.preventDefault(),{cameraAnimation:Et=>{Et.easeTo({duration:300,zoom:this._tr.zoom+(z.shiftKey?-1:1),around:this._tr.unproject(ht)},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class va{constructor(){this._tap=new bf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(z,ht,Et){if(!this._swipePoint)if(this._tapTime){let zt=ht[0],Ht=z.timeStamp-this._tapTime<500,ke=this._tapPoint.dist(zt)<30;Ht&&ke?Et.length>0&&(this._swipePoint=zt,this._swipeTouch=Et[0].identifier):this.reset()}else this._tap.touchstart(z,ht,Et)}touchmove(z,ht,Et){if(this._tapTime){if(this._swipePoint){if(Et[0].identifier!==this._swipeTouch)return;let zt=ht[0],Ht=zt.y-this._swipePoint.y;return this._swipePoint=zt,z.preventDefault(),this._active=!0,{zoomDelta:Ht/128}}}else this._tap.touchmove(z,ht,Et)}touchend(z,ht,Et){if(this._tapTime)this._swipePoint&&Et.length===0&&this.reset();else{let zt=this._tap.touchend(z,ht,Et);zt&&(this._tapTime=z.timeStamp,this._tapPoint=zt)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ba{constructor(z,ht,Et){this._el=z,this._mousePan=ht,this._touchPan=Et}enable(z){this._inertiaOptions=z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Za{constructor(z,ht,Et){this._pitchWithRotate=z.pitchWithRotate,this._mouseRotate=ht,this._mousePitch=Et}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class ca{constructor(z,ht,Et,zt){this._el=z,this._touchZoom=ht,this._touchRotate=Et,this._tapDragZoom=zt,this._rotationDisabled=!1,this._enabled=!0}enable(z){this._touchZoom.enable(z),this._rotationDisabled||this._touchRotate.enable(z),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Oa{constructor(z,ht){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=z,this._options=ht,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let z=this._map.getCanvasContainer();z.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",z);let ht=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ht=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Et=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),zt=document.createElement("div");zt.className="maplibregl-desktop-message",zt.textContent=ht,this._container.appendChild(zt);let Ht=document.createElement("div");Ht.className="maplibregl-mobile-message",Ht.textContent=Et,this._container.appendChild(Ht),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(z){return z[this._bypassKey]}notifyGestureBlocked(z,ht){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:z,originalEvent:ht})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let ka=$t=>$t.zoom||$t.drag||$t.pitch||$t.rotate;class na extends e.k{}function io($t){return $t.panDelta&&$t.panDelta.mag()||$t.zoomDelta||$t.bearingDelta||$t.pitchDelta}class ns{constructor(z,ht){this.handleWindowEvent=zt=>{this.handleEvent(zt,`${zt.type}Window`)},this.handleEvent=(zt,Ht)=>{if(zt.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ke=zt.type==="renderFrame"?void 0:zt,Fe={needsRenderFrame:!1},Ke={},vr={},Dr=zt.touches,Fr=Dr?this._getMapTouches(Dr):void 0,un=Fr?i.touchPos(this._map.getCanvas(),Fr):i.mousePos(this._map.getCanvas(),zt);for(let{handlerName:ae,handler:xe,allowed:Ae}of this._handlers){if(!xe.isEnabled())continue;let je;this._blockedByActive(vr,Ae,ae)?xe.reset():xe[Ht||zt.type]&&(je=xe[Ht||zt.type](zt,un,Fr),this.mergeHandlerResult(Fe,Ke,je,ae,ke),je&&je.needsRenderFrame&&this._triggerRenderFrame()),(je||xe.isActive())&&(vr[ae]=xe)}let Sn={};for(let ae in this._previousActiveHandlers)vr[ae]||(Sn[ae]=ke);this._previousActiveHandlers=vr,(Object.keys(Sn).length||io(Fe))&&(this._changes.push([Fe,Ke,Sn]),this._triggerRenderFrame()),(Object.keys(vr).length||io(Fe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Xt}=Fe;Xt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Xt(this._map))},this._map=z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Lf(z),this._bearingSnap=ht.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ht);let Et=this._el;this._listeners=[[Et,"touchstart",{passive:!0}],[Et,"touchmove",{passive:!1}],[Et,"touchend",void 0],[Et,"touchcancel",void 0],[Et,"mousedown",void 0],[Et,"mousemove",void 0],[Et,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Et,"mouseover",void 0],[Et,"mouseout",void 0],[Et,"dblclick",void 0],[Et,"click",void 0],[Et,"keydown",{capture:!1}],[Et,"keyup",void 0],[Et,"wheel",{passive:!1}],[Et,"contextmenu",void 0],[window,"blur",void 0]];for(let[zt,Ht,ke]of this._listeners)i.addEventListener(zt,Ht,zt===document?this.handleWindowEvent:this.handleEvent,ke)}destroy(){for(let[z,ht,Et]of this._listeners)i.removeEventListener(z,ht,z===document?this.handleWindowEvent:this.handleEvent,Et)}_addDefaultHandlers(z){let ht=this._map,Et=ht.getCanvasContainer();this._add("mapEvent",new yh(ht,z));let zt=ht.boxZoom=new Vc(ht,z);this._add("boxZoom",zt),z.interactive&&z.boxZoom&&zt.enable();let Ht=ht.cooperativeGestures=new Oa(ht,z.cooperativeGestures);this._add("cooperativeGestures",Ht),z.cooperativeGestures&&Ht.enable();let ke=new $h(ht),Fe=new aa(ht);ht.doubleClickZoom=new di(Fe,ke),this._add("tapZoom",ke),this._add("clickZoom",Fe),z.interactive&&z.doubleClickZoom&&ht.doubleClickZoom.enable();let Ke=new va;this._add("tapDragZoom",Ke);let vr=ht.touchPitch=new Wf(ht);this._add("touchPitch",vr),z.interactive&&z.touchPitch&&ht.touchPitch.enable(z.touchPitch);let Dr=gc(z),Fr=Jf(z);ht.dragRotate=new Za(z,Dr,Fr),this._add("mouseRotate",Dr,["mousePitch"]),this._add("mousePitch",Fr,["mouseRotate"]),z.interactive&&z.dragRotate&&ht.dragRotate.enable();let un=(({enable:je,clickTolerance:Oe})=>{let $e=new Zh({checkCorrectEvent:wr=>i.mouseButton(wr)===0&&!wr.ctrlKey});return new th({clickTolerance:Oe,move:(wr,Or)=>({around:Or,panDelta:Or.sub(wr)}),activateOnStart:!0,moveStateManager:$e,enable:je,assignEvents:Pd})})(z),Sn=new eh(z,ht);ht.dragPan=new Ba(Et,un,Sn),this._add("mousePan",un),this._add("touchPan",Sn,["touchZoom","touchRotate"]),z.interactive&&z.dragPan&&ht.dragPan.enable(z.dragPan);let Xt=new df,ae=new iu;ht.touchZoomRotate=new ca(Et,ae,Xt,Ke),this._add("touchRotate",Xt,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),z.interactive&&z.touchZoomRotate&&ht.touchZoomRotate.enable(z.touchZoomRotate);let xe=ht.scrollZoom=new qn(ht,()=>this._triggerRenderFrame());this._add("scrollZoom",xe,["mousePan"]),z.interactive&&z.scrollZoom&&ht.scrollZoom.enable(z.scrollZoom);let Ae=ht.keyboard=new Ur(ht);this._add("keyboard",Ae),z.interactive&&z.keyboard&&ht.keyboard.enable(),this._add("blockableMapEvent",new wu(ht))}_add(z,ht,Et){this._handlers.push({handlerName:z,handler:ht,allowed:Et}),this._handlersById[z]=ht}stop(z){if(!this._updatingCamera){for(let{handler:ht}of this._handlers)ht.reset();this._inertia.clear(),this._fireEvents({},{},z),this._changes=[]}}isActive(){for(let{handler:z}of this._handlers)if(z.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ka(this._eventsInProgress)||this.isZooming()}_blockedByActive(z,ht,Et){for(let zt in z)if(zt!==Et&&(!ht||ht.indexOf(zt)<0))return!0;return!1}_getMapTouches(z){let ht=[];for(let Et of z)this._el.contains(Et.target)&&ht.push(Et);return ht}mergeHandlerResult(z,ht,Et,zt,Ht){if(!Et)return;e.e(z,Et);let ke={handlerName:zt,originalEvent:Et.originalEvent||Ht};Et.zoomDelta!==void 0&&(ht.zoom=ke),Et.panDelta!==void 0&&(ht.drag=ke),Et.pitchDelta!==void 0&&(ht.pitch=ke),Et.bearingDelta!==void 0&&(ht.rotate=ke)}_applyChanges(){let z={},ht={},Et={};for(let[zt,Ht,ke]of this._changes)zt.panDelta&&(z.panDelta=(z.panDelta||new e.P(0,0))._add(zt.panDelta)),zt.zoomDelta&&(z.zoomDelta=(z.zoomDelta||0)+zt.zoomDelta),zt.bearingDelta&&(z.bearingDelta=(z.bearingDelta||0)+zt.bearingDelta),zt.pitchDelta&&(z.pitchDelta=(z.pitchDelta||0)+zt.pitchDelta),zt.around!==void 0&&(z.around=zt.around),zt.pinchAround!==void 0&&(z.pinchAround=zt.pinchAround),zt.noInertia&&(z.noInertia=zt.noInertia),e.e(ht,Ht),e.e(Et,ke);this._updateMapTransform(z,ht,Et),this._changes=[]}_updateMapTransform(z,ht,Et){let zt=this._map,Ht=zt._getTransformForUpdate(),ke=zt.terrain;if(!(io(z)||ke&&this._terrainMovement))return this._fireEvents(ht,Et,!0);let{panDelta:Fe,zoomDelta:Ke,bearingDelta:vr,pitchDelta:Dr,around:Fr,pinchAround:un}=z;un!==void 0&&(Fr=un),zt._stop(!0),Fr=Fr||zt.transform.centerPoint;let Sn=Ht.pointLocation(Fe?Fr.sub(Fe):Fr);vr&&(Ht.bearing+=vr),Dr&&(Ht.pitch+=Dr),Ke&&(Ht.zoom+=Ke),ke?this._terrainMovement||!ht.drag&&!ht.zoom?ht.drag&&this._terrainMovement?Ht.center=Ht.pointLocation(Ht.centerPoint.sub(Fe)):Ht.setLocationAtPoint(Sn,Fr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Ht.setLocationAtPoint(Sn,Fr)):Ht.setLocationAtPoint(Sn,Fr),zt._applyUpdatedTransform(Ht),this._map._update(),z.noInertia||this._inertia.record(z),this._fireEvents(ht,Et,!0)}_fireEvents(z,ht,Et){let zt=ka(this._eventsInProgress),Ht=ka(z),ke={};for(let Fr in z){let{originalEvent:un}=z[Fr];this._eventsInProgress[Fr]||(ke[`${Fr}start`]=un),this._eventsInProgress[Fr]=z[Fr]}!zt&&Ht&&this._fireEvent("movestart",Ht.originalEvent);for(let Fr in ke)this._fireEvent(Fr,ke[Fr]);Ht&&this._fireEvent("move",Ht.originalEvent);for(let Fr in z){let{originalEvent:un}=z[Fr];this._fireEvent(Fr,un)}let Fe={},Ke;for(let Fr in this._eventsInProgress){let{handlerName:un,originalEvent:Sn}=this._eventsInProgress[Fr];this._handlersById[un].isActive()||(delete this._eventsInProgress[Fr],Ke=ht[un]||Sn,Fe[`${Fr}end`]=Ke)}for(let Fr in Fe)this._fireEvent(Fr,Fe[Fr]);let vr=ka(this._eventsInProgress),Dr=(zt||Ht)&&!vr;if(Dr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Fr=this._map._getTransformForUpdate();Fr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Fr)}if(Et&&Dr){this._updatingCamera=!0;let Fr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),un=Sn=>Sn!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new na("renderFrame",{timeStamp:z})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ko extends e.E{constructor(z,ht){super(),this._renderFrameCallback=()=>{let Et=Math.min((o.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Et)),Et<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=z,this._bearingSnap=ht.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(z,ht){return this.jumpTo({center:z},ht)}panBy(z,ht,Et){return z=e.P.convert(z).mult(-1),this.panTo(this.transform.center,e.e({offset:z},ht),Et)}panTo(z,ht,Et){return this.easeTo(e.e({center:z},ht),Et)}getZoom(){return this.transform.zoom}setZoom(z,ht){return this.jumpTo({zoom:z},ht),this}zoomTo(z,ht,Et){return this.easeTo(e.e({zoom:z},ht),Et)}zoomIn(z,ht){return this.zoomTo(this.getZoom()+1,z,ht),this}zoomOut(z,ht){return this.zoomTo(this.getZoom()-1,z,ht),this}getBearing(){return this.transform.bearing}setBearing(z,ht){return this.jumpTo({bearing:z},ht),this}getPadding(){return this.transform.padding}setPadding(z,ht){return this.jumpTo({padding:z},ht),this}rotateTo(z,ht,Et){return this.easeTo(e.e({bearing:z},ht),Et)}resetNorth(z,ht){return this.rotateTo(0,e.e({duration:1e3},z),ht),this}resetNorthPitch(z,ht){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},z),ht),this}snapToNorth(z,ht){return Math.abs(this.getBearing()){if(this._zooming&&(zt.zoom=e.y.number(Ht,xe,Nr)),this._rotating&&(zt.bearing=e.y.number(ke,vr,Nr)),this._pitching&&(zt.pitch=e.y.number(Fe,Dr,Nr)),this._padding&&(zt.interpolatePadding(Ke,Fr,Nr),Sn=zt.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Nr),$e)zt.setLocationAtPoint($e,wr);else{let en=zt.zoomScale(zt.zoom-Ht),vn=xe>Ht?Math.min(2,Oe):Math.max(.5,Oe),In=Math.pow(vn,1-Nr),Nn=zt.unproject(Ae.add(je.mult(Nr*In)).mult(en));zt.setLocationAtPoint(zt.renderWorldCopies?Nn.wrap():Nn,Sn)}this._applyUpdatedTransform(zt),this._fireMoveEvents(ht)},Nr=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht,Nr)},z),this}_prepareEase(z,ht,Et={}){this._moving=!0,ht||Et.moving||this.fire(new e.k("movestart",z)),this._zooming&&!Et.zooming&&this.fire(new e.k("zoomstart",z)),this._rotating&&!Et.rotating&&this.fire(new e.k("rotatestart",z)),this._pitching&&!Et.pitching&&this.fire(new e.k("pitchstart",z))}_prepareElevation(z){this._elevationCenter=z,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(z,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(z){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ht=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(z<1&&ht!==this._elevationTarget){let Et=this._elevationTarget-this._elevationStart;this._elevationStart+=z*(Et-(ht-(Et*z+this._elevationStart))/(1-z)),this._elevationTarget=ht}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,z)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(z){let ht=z.getCameraPosition(),Et=this.terrain.getElevationForLngLatZoom(ht.lngLat,z.zoom);if(ht.altitudethis._elevateCameraIfInsideTerrain(zt)),this.transformCameraUpdate&&ht.push(zt=>this.transformCameraUpdate(zt)),!ht.length)return;let Et=z.clone();for(let zt of ht){let Ht=Et.clone(),{center:ke,zoom:Fe,pitch:Ke,bearing:vr,elevation:Dr}=zt(Ht);ke&&(Ht.center=ke),Fe!==void 0&&(Ht.zoom=Fe),Ke!==void 0&&(Ht.pitch=Ke),vr!==void 0&&(Ht.bearing=vr),Dr!==void 0&&(Ht.elevation=Dr),Et.apply(Ht)}this.transform.apply(Et)}_fireMoveEvents(z){this.fire(new e.k("move",z)),this._zooming&&this.fire(new e.k("zoom",z)),this._rotating&&this.fire(new e.k("rotate",z)),this._pitching&&this.fire(new e.k("pitch",z))}_afterEase(z,ht){if(this._easeId&&ht&&this._easeId===ht)return;delete this._easeId;let Et=this._zooming,zt=this._rotating,Ht=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Et&&this.fire(new e.k("zoomend",z)),zt&&this.fire(new e.k("rotateend",z)),Ht&&this.fire(new e.k("pitchend",z)),this.fire(new e.k("moveend",z))}flyTo(z,ht){var Et;if(!z.essential&&o.prefersReducedMotion){let Ta=e.M(z,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ta,ht)}this.stop(),z=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},z);let zt=this._getTransformForUpdate(),Ht=zt.zoom,ke=zt.bearing,Fe=zt.pitch,Ke=zt.padding,vr="bearing"in z?this._normalizeBearing(z.bearing,ke):ke,Dr="pitch"in z?+z.pitch:Fe,Fr="padding"in z?z.padding:zt.padding,un=e.P.convert(z.offset),Sn=zt.centerPoint.add(un),Xt=zt.pointLocation(Sn),{center:ae,zoom:xe}=zt.getConstrained(e.N.convert(z.center||Xt),(Et=z.zoom)!==null&&Et!==void 0?Et:Ht);this._normalizeCenter(ae,zt);let Ae=zt.zoomScale(xe-Ht),je=zt.project(Xt),Oe=zt.project(ae).sub(je),$e=z.curve,wr=Math.max(zt.width,zt.height),Or=wr/Ae,Nr=Oe.mag();if("minZoom"in z){let Ta=e.ac(Math.min(z.minZoom,Ht,xe),zt.minZoom,zt.maxZoom),so=wr/zt.zoomScale(Ta-Ht);$e=Math.sqrt(so/Nr*2)}let en=$e*$e;function vn(Ta){let so=(Or*Or-wr*wr+(Ta?-1:1)*en*en*Nr*Nr)/(2*(Ta?Or:wr)*en*Nr);return Math.log(Math.sqrt(so*so+1)-so)}function In(Ta){return(Math.exp(Ta)-Math.exp(-Ta))/2}function Nn(Ta){return(Math.exp(Ta)+Math.exp(-Ta))/2}let ii=vn(!1),Ui=function(Ta){return Nn(ii)/Nn(ii+$e*Ta)},pa=function(Ta){return wr*((Nn(ii)*(In(so=ii+$e*Ta)/Nn(so))-In(ii))/en)/Nr;var so},fa=(vn(!0)-ii)/$e;if(Math.abs(Nr)<1e-6||!isFinite(fa)){if(Math.abs(wr-Or)<1e-6)return this.easeTo(z,ht);let Ta=Or0,Ui=so=>Math.exp(Ta*$e*so)}return z.duration="duration"in z?+z.duration:1e3*fa/("screenSpeed"in z?+z.screenSpeed/$e:+z.speed),z.maxDuration&&z.duration>z.maxDuration&&(z.duration=0),this._zooming=!0,this._rotating=ke!==vr,this._pitching=Dr!==Fe,this._padding=!zt.isPaddingEqual(Fr),this._prepareEase(ht,!1),this.terrain&&this._prepareElevation(ae),this._ease(Ta=>{let so=Ta*fa,Bo=1/Ui(so);zt.zoom=Ta===1?xe:Ht+zt.scaleZoom(Bo),this._rotating&&(zt.bearing=e.y.number(ke,vr,Ta)),this._pitching&&(zt.pitch=e.y.number(Fe,Dr,Ta)),this._padding&&(zt.interpolatePadding(Ke,Fr,Ta),Sn=zt.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Ta);let So=Ta===1?ae:zt.unproject(je.add(Oe.mult(pa(so))).mult(Bo));zt.setLocationAtPoint(zt.renderWorldCopies?So.wrap():So,Sn),this._applyUpdatedTransform(zt),this._fireMoveEvents(ht)},()=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht)},z),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(z,ht){var Et;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let zt=this._onEaseEnd;delete this._onEaseEnd,zt.call(this,ht)}return z||(Et=this.handlers)===null||Et===void 0||Et.stop(!1),this}_ease(z,ht,Et){Et.animate===!1||Et.duration===0?(z(1),ht()):(this._easeStart=o.now(),this._easeOptions=Et,this._onEaseFrame=z,this._onEaseEnd=ht,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(z,ht){z=e.b3(z,-180,180);let Et=Math.abs(z-ht);return Math.abs(z-360-ht)180?-360:Et<-180?360:0}queryTerrainElevation(z){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(z),this.transform.tileZoom)-this.transform.elevation:null}}let ls={compact:!0,customAttribution:'MapLibre'};class ps{constructor(z=ls){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=ht=>{!ht||ht.sourceDataType!=="metadata"&&ht.sourceDataType!=="visibility"&&ht.dataType!=="style"&&ht.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=z}getDefaultPosition(){return"bottom-right"}onAdd(z){return this._map=z,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(z,ht){let Et=this._map._getUIString(`AttributionControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)}_updateAttributions(){if(!this._map.style)return;let z=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?z=z.concat(this.options.customAttribution.map(zt=>typeof zt!="string"?"":zt)):typeof this.options.customAttribution=="string"&&z.push(this.options.customAttribution)),this._map.style.stylesheet){let zt=this._map.style.stylesheet;this.styleOwner=zt.owner,this.styleId=zt.id}let ht=this._map.style.sourceCaches;for(let zt in ht){let Ht=ht[zt];if(Ht.used||Ht.usedForTerrain){let ke=Ht.getSource();ke.attribution&&z.indexOf(ke.attribution)<0&&z.push(ke.attribution)}}z=z.filter(zt=>String(zt).trim()),z.sort((zt,Ht)=>zt.length-Ht.length),z=z.filter((zt,Ht)=>{for(let ke=Ht+1;ke=0)return!1;return!0});let Et=z.join(" | ");Et!==this._attribHTML&&(this._attribHTML=Et,z.length?(this._innerContainer.innerHTML=Et,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class oo{constructor(z={}){this._updateCompact=()=>{let ht=this._container.children;if(ht.length){let Et=ht[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Et.classList.add("maplibregl-compact"):Et.classList.remove("maplibregl-compact")}},this.options=z}getDefaultPosition(){return"bottom-left"}onAdd(z){this._map=z,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ht=i.create("a","maplibregl-ctrl-logo");return ht.target="_blank",ht.rel="noopener nofollow",ht.href="https://maplibre.org/",ht.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ht.setAttribute("rel","noopener nofollow"),this._container.appendChild(ht),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class qa{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(z){let ht=++this._id;return this._queue.push({callback:z,id:ht,cancelled:!1}),ht}remove(z){let ht=this._currentlyRunning,Et=ht?this._queue.concat(ht):this._queue;for(let zt of Et)if(zt.id===z)return void(zt.cancelled=!0)}run(z=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ht=this._currentlyRunning=this._queue;this._queue=[];for(let Et of ht)if(!Et.cancelled&&(Et.callback(z),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var gs=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class el extends e.E{constructor(z){super(),this.sourceCache=z,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,z.usedForTerrain=!0,z.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(z,ht){this.sourceCache.update(z,ht),this._renderableTilesKeys=[];let Et={};for(let zt of z.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ht}))Et[zt.key]=!0,this._renderableTilesKeys.push(zt.key),this._tiles[zt.key]||(zt.posMatrix=new Float64Array(16),e.aP(zt.posMatrix,0,e.X,0,e.X,0,1),this._tiles[zt.key]=new oe(zt,this.tileSize));for(let zt in this._tiles)Et[zt]||delete this._tiles[zt]}freeRtt(z){for(let ht in this._tiles){let Et=this._tiles[ht];(!z||Et.tileID.equals(z)||Et.tileID.isChildOf(z)||z.isChildOf(Et.tileID))&&(Et.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(z=>this.getTileByID(z))}getTileByID(z){return this._tiles[z]}getTerrainCoords(z){let ht={};for(let Et of this._renderableTilesKeys){let zt=this._tiles[Et].tileID;if(zt.canonical.equals(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16),e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),ht[Et]=Ht}else if(zt.canonical.isChildOf(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let ke=zt.canonical.z-z.canonical.z,Fe=zt.canonical.x-(zt.canonical.x>>ke<>ke<>ke;e.aP(Ht.posMatrix,0,vr,0,vr,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[-Fe*vr,-Ke*vr,0]),ht[Et]=Ht}else if(z.canonical.isChildOf(zt.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let ke=z.canonical.z-zt.canonical.z,Fe=z.canonical.x-(z.canonical.x>>ke<>ke<>ke;e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[Fe*vr,Ke*vr,0]),e.K(Ht.posMatrix,Ht.posMatrix,[1/2**ke,1/2**ke,0]),ht[Et]=Ht}}return ht}getSourceTile(z,ht){let Et=this.sourceCache._source,zt=z.overscaledZ-this.deltaZoom;if(zt>Et.maxzoom&&(zt=Et.maxzoom),zt=Et.minzoom&&(!Ht||!Ht.dem);)Ht=this.sourceCache.getTileByID(z.scaledTo(zt--).key);return Ht}tilesAfterTime(z=Date.now()){return Object.values(this._tiles).filter(ht=>ht.timeAdded>=z)}}class Pl{constructor(z,ht,Et){this.painter=z,this.sourceCache=new el(ht),this.options=Et,this.exaggeration=typeof Et.exaggeration=="number"?Et.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(z,ht,Et,zt=e.X){var Ht;if(!(ht>=0&&ht=0&&Etz.canonical.z&&(z.canonical.z>=zt?Ht=z.canonical.z-zt:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ke=z.canonical.x-(z.canonical.x>>Ht<>Ht<>8<<4|Ht>>8,ht[ke+3]=0;let Et=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ht.buffer)),zt=new p(z,Et,z.gl.RGBA,{premultiply:!1});return zt.bind(z.gl.NEAREST,z.gl.CLAMP_TO_EDGE),this._coordsTexture=zt,zt}pointCoordinate(z){this.painter.maybeDrawDepthAndCoords(!0);let ht=new Uint8Array(4),Et=this.painter.context,zt=Et.gl,Ht=Math.round(z.x*this.painter.pixelRatio/devicePixelRatio),ke=Math.round(z.y*this.painter.pixelRatio/devicePixelRatio),Fe=Math.round(this.painter.height/devicePixelRatio);Et.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),zt.readPixels(Ht,Fe-ke-1,1,1,zt.RGBA,zt.UNSIGNED_BYTE,ht),Et.bindFramebuffer.set(null);let Ke=ht[0]+(ht[2]>>4<<8),vr=ht[1]+((15&ht[2])<<8),Dr=this.coordsIndex[255-ht[3]],Fr=Dr&&this.sourceCache.getTileByID(Dr);if(!Fr)return null;let un=this._coordsTextureSize,Sn=(1<z.id!==ht),this._recentlyUsed.push(z.id)}stampObject(z){z.stamp=++this._stamp}getOrCreateFreeObject(){for(let ht of this._recentlyUsed)if(!this._objects[ht].inUse)return this._objects[ht];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let z=this._createObject(this._objects.length);return this._objects.push(z),z}freeObject(z){z.inUse=!1}freeAllObjects(){for(let z of this._objects)this.freeObject(z)}isFull(){return!(this._objects.length!z.inUse)===!1}}let $l={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class lu{constructor(z,ht){this.painter=z,this.terrain=ht,this.pool=new su(z.context,30,ht.sourceCache.tileSize*ht.qualityFactor)}destruct(){this.pool.destruct()}getTexture(z){return this.pool.getObjectForId(z.rtt[this._stacks.length-1].id).texture}prepareForRender(z,ht){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=z._order.filter(Et=>!z._layers[Et].isHidden(ht)),this._coordsDescendingInv={};for(let Et in z.sourceCaches){this._coordsDescendingInv[Et]={};let zt=z.sourceCaches[Et].getVisibleCoordinates();for(let Ht of zt){let ke=this.terrain.sourceCache.getTerrainCoords(Ht);for(let Fe in ke)this._coordsDescendingInv[Et][Fe]||(this._coordsDescendingInv[Et][Fe]=[]),this._coordsDescendingInv[Et][Fe].push(ke[Fe])}}this._coordsDescendingInvStr={};for(let Et of z._order){let zt=z._layers[Et],Ht=zt.source;if($l[zt.type]&&!this._coordsDescendingInvStr[Ht]){this._coordsDescendingInvStr[Ht]={};for(let ke in this._coordsDescendingInv[Ht])this._coordsDescendingInvStr[Ht][ke]=this._coordsDescendingInv[Ht][ke].map(Fe=>Fe.key).sort().join()}}for(let Et of this._renderableTiles)for(let zt in this._coordsDescendingInvStr){let Ht=this._coordsDescendingInvStr[zt][Et.tileID.key];Ht&&Ht!==Et.rttCoords[zt]&&(Et.rtt=[])}}renderLayer(z){if(z.isHidden(this.painter.transform.zoom))return!1;let ht=z.type,Et=this.painter,zt=this._renderableLayerIds[this._renderableLayerIds.length-1]===z.id;if($l[ht]&&(this._prevType&&$l[this._prevType]||this._stacks.push([]),this._prevType=ht,this._stacks[this._stacks.length-1].push(z.id),!zt))return!0;if($l[this._prevType]||$l[ht]&&zt){this._prevType=ht;let Ht=this._stacks.length-1,ke=this._stacks[Ht]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(Ou(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[Ht]){let vr=this.pool.getObjectForId(Fe.rtt[Ht].id);if(vr.stamp===Fe.rtt[Ht].stamp){this.pool.useObject(vr);continue}}let Ke=this.pool.getOrCreateFreeObject();this.pool.useObject(Ke),this.pool.stampObject(Ke),Fe.rtt[Ht]={id:Ke.id,stamp:Ke.stamp},Et.context.bindFramebuffer.set(Ke.fbo.framebuffer),Et.context.clear({color:e.aM.transparent,stencil:0}),Et.currentStencilSource=void 0;for(let vr=0;vr{$t.touchstart=$t.dragStart,$t.touchmoveWindow=$t.dragMove,$t.touchend=$t.dragEnd},Oo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Es{constructor(z,ht,Et=!1){this.mousedown=ke=>{this.startMouse(e.e({},ke,{ctrlKey:!0,preventDefault:()=>ke.preventDefault()}),i.mousePos(this.element,ke)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ke=>{this.moveMouse(ke,i.mousePos(this.element,ke))},this.mouseup=ke=>{this.mouseRotate.dragEnd(ke),this.mousePitch&&this.mousePitch.dragEnd(ke),this.offTemp()},this.touchstart=ke=>{ke.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.startTouch(ke,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ke=>{ke.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.moveTouch(ke,this._lastPos))},this.touchend=ke=>{ke.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let zt=z.dragRotate._mouseRotate.getClickTolerance(),Ht=z.dragRotate._mousePitch.getClickTolerance();this.element=ht,this.mouseRotate=gc({clickTolerance:zt,enable:!0}),this.touchRotate=(({enable:ke,clickTolerance:Fe,bearingDegreesPerPixelMoved:Ke=.8})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({bearingDelta:(Fr.x-Dr.x)*Ke}),moveStateManager:vr,enable:ke,assignEvents:fu})})({clickTolerance:zt,enable:!0}),this.map=z,Et&&(this.mousePitch=Jf({clickTolerance:Ht,enable:!0}),this.touchPitch=(({enable:ke,clickTolerance:Fe,pitchDegreesPerPixelMoved:Ke=-.5})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({pitchDelta:(Fr.y-Dr.y)*Ke}),moveStateManager:vr,enable:ke,assignEvents:fu})})({clickTolerance:Ht,enable:!0})),i.addEventListener(ht,"mousedown",this.mousedown),i.addEventListener(ht,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ht,"touchcancel",this.reset)}startMouse(z,ht){this.mouseRotate.dragStart(z,ht),this.mousePitch&&this.mousePitch.dragStart(z,ht),i.disableDrag()}startTouch(z,ht){this.touchRotate.dragStart(z,ht),this.touchPitch&&this.touchPitch.dragStart(z,ht),i.disableDrag()}moveMouse(z,ht){let Et=this.map,{bearingDelta:zt}=this.mouseRotate.dragMove(z,ht)||{};if(zt&&Et.setBearing(Et.getBearing()+zt),this.mousePitch){let{pitchDelta:Ht}=this.mousePitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}moveTouch(z,ht){let Et=this.map,{bearingDelta:zt}=this.touchRotate.dragMove(z,ht)||{};if(zt&&Et.setBearing(Et.getBearing()+zt),this.touchPitch){let{pitchDelta:Ht}=this.touchPitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}off(){let z=this.element;i.removeEventListener(z,"mousedown",this.mousedown),i.removeEventListener(z,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(z,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Kl;function Rl($t,z,ht){let Et=new e.N($t.lng,$t.lat);if($t=new e.N($t.lng,$t.lat),z){let zt=new e.N($t.lng-360,$t.lat),Ht=new e.N($t.lng+360,$t.lat),ke=ht.locationPoint($t).distSqr(z);ht.locationPoint(zt).distSqr(z)180;){let zt=ht.locationPoint($t);if(zt.x>=0&&zt.y>=0&&zt.x<=ht.width&&zt.y<=ht.height)break;$t.lng>ht.center.lng?$t.lng-=360:$t.lng+=360}return $t.lng!==Et.lng&&ht.locationPoint($t).y>ht.height/2-ht.getHorizon()?$t:Et}let vc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hc($t,z,ht){let Et=$t.classList;for(let zt in vc)Et.remove(`maplibregl-${ht}-anchor-${zt}`);Et.add(`maplibregl-${ht}-anchor-${z}`)}class Lc extends e.E{constructor(z){if(super(),this._onKeyPress=ht=>{let Et=ht.code,zt=ht.charCode||ht.keyCode;Et!=="Space"&&Et!=="Enter"&&zt!==32&&zt!==13||this.togglePopup()},this._onMapClick=ht=>{let Et=ht.originalEvent.target,zt=this._element;this._popup&&(Et===zt||zt.contains(Et))&&this.togglePopup()},this._update=ht=>{var Et;if(!this._map)return;let zt=this._map.loaded()&&!this._map.isMoving();(ht?.type==="terrain"||ht?.type==="render"&&!zt)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rl(this._lngLat,this._flatPos,this._map.transform):(Et=this._lngLat)===null||Et===void 0?void 0:Et.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ht="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Ht=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Ht=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ke="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ke="rotateX(0deg)":this._pitchAlignment==="map"&&(ke=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ht&&ht.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${vc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ke} ${Ht}`),o.frameAsync(new AbortController).then(()=>{this._updateOpacity(ht&&ht.type==="moveend")}).catch(()=>{})},this._onMove=ht=>{if(!this._isDragging){let Et=this._clickTolerance||this._map._clickTolerance;this._isDragging=ht.point.dist(this._pointerdownPos)>=Et}this._isDragging&&(this._pos=ht.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=ht=>{this._element.contains(ht.originalEvent.target)&&(ht.preventDefault(),this._positionDelta=ht.point.sub(this._pos).add(this._offset),this._pointerdownPos=ht.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=z&&z.anchor||"center",this._color=z&&z.color||"#3FB1CE",this._scale=z&&z.scale||1,this._draggable=z&&z.draggable||!1,this._clickTolerance=z&&z.clickTolerance||0,this._subpixelPositioning=z&&z.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=z&&z.rotation||0,this._rotationAlignment=z&&z.rotationAlignment||"auto",this._pitchAlignment=z&&z.pitchAlignment&&z.pitchAlignment!=="auto"?z.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(z?.opacity,z?.opacityWhenCovered),z&&z.element)this._element=z.element,this._offset=e.P.convert(z&&z.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ht=i.createNS("http://www.w3.org/2000/svg","svg"),Et=41,zt=27;ht.setAttributeNS(null,"display","block"),ht.setAttributeNS(null,"height",`${Et}px`),ht.setAttributeNS(null,"width",`${zt}px`),ht.setAttributeNS(null,"viewBox",`0 0 ${zt} ${Et}`);let Ht=i.createNS("http://www.w3.org/2000/svg","g");Ht.setAttributeNS(null,"stroke","none"),Ht.setAttributeNS(null,"stroke-width","1"),Ht.setAttributeNS(null,"fill","none"),Ht.setAttributeNS(null,"fill-rule","evenodd");let ke=i.createNS("http://www.w3.org/2000/svg","g");ke.setAttributeNS(null,"fill-rule","nonzero");let Fe=i.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Fe.setAttributeNS(null,"fill","#000000");let Ke=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Ae of Ke){let je=i.createNS("http://www.w3.org/2000/svg","ellipse");je.setAttributeNS(null,"opacity","0.04"),je.setAttributeNS(null,"cx","10.5"),je.setAttributeNS(null,"cy","5.80029008"),je.setAttributeNS(null,"rx",Ae.rx),je.setAttributeNS(null,"ry",Ae.ry),Fe.appendChild(je)}let vr=i.createNS("http://www.w3.org/2000/svg","g");vr.setAttributeNS(null,"fill",this._color);let Dr=i.createNS("http://www.w3.org/2000/svg","path");Dr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),vr.appendChild(Dr);let Fr=i.createNS("http://www.w3.org/2000/svg","g");Fr.setAttributeNS(null,"opacity","0.25"),Fr.setAttributeNS(null,"fill","#000000");let un=i.createNS("http://www.w3.org/2000/svg","path");un.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Fr.appendChild(un);let Sn=i.createNS("http://www.w3.org/2000/svg","g");Sn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sn.setAttributeNS(null,"fill","#FFFFFF");let Xt=i.createNS("http://www.w3.org/2000/svg","g");Xt.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=i.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let xe=i.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#FFFFFF"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962"),Xt.appendChild(ae),Xt.appendChild(xe),ke.appendChild(Fe),ke.appendChild(vr),ke.appendChild(Fr),ke.appendChild(Sn),ke.appendChild(Xt),ht.appendChild(ke),ht.setAttributeNS(null,"height",Et*this._scale+"px"),ht.setAttributeNS(null,"width",zt*this._scale+"px"),this._element.appendChild(ht),this._offset=e.P.convert(z&&z.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ht=>{ht.preventDefault()}),this._element.addEventListener("mousedown",ht=>{ht.preventDefault()}),Hc(this._element,this._anchor,"marker"),z&&z.className)for(let ht of z.className.split(" "))this._element.classList.add(ht);this._popup=null}addTo(z){return this.remove(),this._map=z,this._element.setAttribute("aria-label",z._getUIString("Marker.Title")),z.getCanvasContainer().appendChild(this._element),z.on("move",this._update),z.on("moveend",this._update),z.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(z){return this._lngLat=e.N.convert(z),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(z){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),z){if(!("offset"in z.options)){let ht=Math.abs(13.5)/Math.SQRT2;z.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ht,-1*(38.1-13.5+ht)],"bottom-right":[-ht,-1*(38.1-13.5+ht)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=z,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(z){return this._subpixelPositioning=z,this}getPopup(){return this._popup}togglePopup(){let z=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:z?(z.isOpen()?z.remove():(z.setLngLat(this._lngLat),z.addTo(this._map)),this):this}_updateOpacity(z=!1){var ht,Et;if(!(!((ht=this._map)===null||ht===void 0)&&ht.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(z)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let zt=this._map,Ht=zt.terrain.depthAtPoint(this._pos),ke=zt.terrain.getElevationForLngLatZoom(this._lngLat,zt.transform.tileZoom);if(zt.transform.lngLatToCameraDepth(this._lngLat,ke)-Ht<.006)return void(this._element.style.opacity=this._opacity);let Fe=-this._offset.y/zt.transform._pixelPerMeter,Ke=Math.sin(zt.getPitch()*Math.PI/180)*Fe,vr=zt.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Dr=zt.transform.lngLatToCameraDepth(this._lngLat,ke+Ke)-vr>.006;!((Et=this._popup)===null||Et===void 0)&&Et.isOpen()&&Dr&&this._popup.remove(),this._element.style.opacity=Dr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(z){return this._offset=e.P.convert(z),this._update(),this}addClassName(z){this._element.classList.add(z)}removeClassName(z){this._element.classList.remove(z)}toggleClassName(z){return this._element.classList.toggle(z)}setDraggable(z){return this._draggable=!!z,this._map&&(z?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(z){return this._rotation=z||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(z){return this._rotationAlignment=z||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(z){return this._pitchAlignment=z&&z!=="auto"?z:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(z,ht){return z===void 0&&ht===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),z!==void 0&&(this._opacity=z),ht!==void 0&&(this._opacityWhenCovered=ht),this._map&&this._updateOpacity(!0),this}}let Ih={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wc=0,zh=!1,Du={maxWidth:100,unit:"metric"};function Oh($t,z,ht){let Et=ht&&ht.maxWidth||100,zt=$t._container.clientHeight/2,Ht=$t.unproject([0,zt]),ke=$t.unproject([Et,zt]),Fe=Ht.distanceTo(ke);if(ht&&ht.unit==="imperial"){let Ke=3.2808*Fe;Ke>5280?rs(z,Et,Ke/5280,$t._getUIString("ScaleControl.Miles")):rs(z,Et,Ke,$t._getUIString("ScaleControl.Feet"))}else ht&&ht.unit==="nautical"?rs(z,Et,Fe/1852,$t._getUIString("ScaleControl.NauticalMiles")):Fe>=1e3?rs(z,Et,Fe/1e3,$t._getUIString("ScaleControl.Kilometers")):rs(z,Et,Fe,$t._getUIString("ScaleControl.Meters"))}function rs($t,z,ht,Et){let zt=function(Ht){let ke=Math.pow(10,`${Math.floor(Ht)}`.length-1),Fe=Ht/ke;return Fe=Fe>=10?10:Fe>=5?5:Fe>=3?3:Fe>=2?2:Fe>=1?1:function(Ke){let vr=Math.pow(10,Math.ceil(-Math.log(Ke)/Math.LN10));return Math.round(Ke*vr)/vr}(Fe),ke*Fe}(ht);$t.style.width=z*(zt/ht)+"px",$t.innerHTML=`${zt} ${Et}`}let zs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function $u($t){if($t){if(typeof $t=="number"){let z=Math.round(Math.abs($t)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,$t),"top-left":new e.P(z,z),"top-right":new e.P(-z,z),bottom:new e.P(0,-$t),"bottom-left":new e.P(z,-z),"bottom-right":new e.P(-z,-z),left:new e.P($t,0),right:new e.P(-$t,0)}}if($t instanceof e.P||Array.isArray($t)){let z=e.P.convert($t);return{center:z,top:z,"top-left":z,"top-right":z,bottom:z,"bottom-left":z,"bottom-right":z,left:z,right:z}}return{center:e.P.convert($t.center||[0,0]),top:e.P.convert($t.top||[0,0]),"top-left":e.P.convert($t["top-left"]||[0,0]),"top-right":e.P.convert($t["top-right"]||[0,0]),bottom:e.P.convert($t.bottom||[0,0]),"bottom-left":e.P.convert($t["bottom-left"]||[0,0]),"bottom-right":e.P.convert($t["bottom-right"]||[0,0]),left:e.P.convert($t.left||[0,0]),right:e.P.convert($t.right||[0,0])}}return $u(new e.P(0,0))}let qf=r;t.AJAXError=e.bh,t.Evented=e.E,t.LngLat=e.N,t.MercatorCoordinate=e.Z,t.Point=e.P,t.addProtocol=e.bi,t.config=e.a,t.removeProtocol=e.bj,t.AttributionControl=ps,t.BoxZoomHandler=Vc,t.CanvasSource=pe,t.CooperativeGesturesHandler=Oa,t.DoubleClickZoomHandler=di,t.DragPanHandler=Ba,t.DragRotateHandler=Za,t.EdgeInsets=Mc,t.FullscreenControl=class extends e.E{constructor($t={}){super(),this._onFullscreenChange=()=>{var z;let ht=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((z=ht?.shadowRoot)===null||z===void 0)&&z.fullscreenElement;)ht=ht.shadowRoot.fullscreenElement;ht===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,$t&&$t.container&&($t.container instanceof HTMLElement?this._container=$t.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd($t){return this._map=$t,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let $t=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",$t).setAttribute("aria-hidden","true"),$t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let $t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$t),this._fullscreenButton.title=$t}_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 e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Wt,t.GeolocateControl=class extends e.E{constructor($t){super(),this._onSuccess=z=>{if(this._map){if(this._isOutOfMapMaxBounds(z))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",z)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=z,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(z),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(z),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",z)),this._finish()}},this._updateCamera=z=>{let ht=new e.N(z.coords.longitude,z.coords.latitude),Et=z.coords.accuracy,zt=this._map.getBearing(),Ht=e.e({bearing:zt},this.options.fitBoundsOptions),ke=ut.fromLngLat(ht,Et);this._map.fitBounds(ke,Ht,{geolocateSource:!0})},this._updateMarker=z=>{if(z){let ht=new e.N(z.coords.longitude,z.coords.latitude);this._accuracyCircleMarker.setLngLat(ht).addTo(this._map),this._userLocationDotMarker.setLngLat(ht).addTo(this._map),this._accuracy=z.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=z=>{if(this._map){if(this.options.trackUserLocation)if(z.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 ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(z.code===3&&zh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",z)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",z=>z.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=z=>{if(this._map){if(z===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}else{let ht=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Lc({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Lc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ht=>{ht.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ht.originalEvent&&ht.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Ih,$t)}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(z=!1){if(Kl!==void 0&&!z)return Kl;if(window.navigator.permissions===void 0)return Kl=!!window.navigator.geolocation,Kl;try{Kl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Kl=!!window.navigator.geolocation}return Kl})}().then(z=>this._finishSetupUI(z)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wc=0,zh=!1}_isOutOfMapMaxBounds($t){let z=this._map.getMaxBounds(),ht=$t.coords;return z&&(ht.longitudez.getEast()||ht.latitudez.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let $t=this._map.getBounds(),z=$t.getSouthEast(),ht=$t.getNorthEast(),Et=z.distanceTo(ht),zt=Math.ceil(this._accuracy/(Et/this._map._container.clientHeight)*2);this._circleElement.style.width=`${zt}px`,this._circleElement.style.height=`${zt}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wc--,zh=!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 e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let $t;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wc++,Wc>1?($t={maximumAge:6e5,timeout:0},zh=!0):($t=this.options.positionOptions,zh=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,$t)}}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)}},t.Hash=vh,t.ImageSource=ge,t.KeyboardHandler=Ur,t.LngLatBounds=ut,t.LogoControl=oo,t.Map=class extends Ko{constructor($t){e.bf.mark(e.bg.create);let z=Object.assign(Object.assign({},Iu),$t);if(z.minZoom!=null&&z.maxZoom!=null&&z.minZoom>z.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(z.minPitch!=null&&z.maxPitch!=null&&z.minPitch>z.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(z.minPitch!=null&&z.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(z.maxPitch!=null&&z.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new bu(z.minZoom,z.maxZoom,z.minPitch,z.maxPitch,z.renderWorldCopies),{bearingSnap:z.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new qa,this._controls=[],this._mapId=e.a4(),this._contextLost=ht=>{ht.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:ht}))},this._contextRestored=ht=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:ht}))},this._onMapScroll=ht=>{if(ht.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=z.interactive,this._maxTileCacheSize=z.maxTileCacheSize,this._maxTileCacheZoomLevels=z.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=z.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=z.preserveDrawingBuffer===!0,this._antialias=z.antialias===!0,this._trackResize=z.trackResize===!0,this._bearingSnap=z.bearingSnap,this._refreshExpiredTiles=z.refreshExpiredTiles===!0,this._fadeDuration=z.fadeDuration,this._crossSourceCollisions=z.crossSourceCollisions===!0,this._collectResourceTiming=z.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ml),z.locale),this._clickTolerance=z.clickTolerance,this._overridePixelRatio=z.pixelRatio,this._maxCanvasSize=z.maxCanvasSize,this.transformCameraUpdate=z.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=z.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=u.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(z.transformRequest),typeof z.container=="string"){if(this._container=document.getElementById(z.container),!this._container)throw new Error(`Container '${z.container}' not found.`)}else{if(!(z.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=z.container}if(z.maxBounds&&this.setMaxBounds(z.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ht=!1,Et=uf(zt=>{this._trackResize&&!this._removed&&(this.resize(zt),this.redraw())},50);this._resizeObserver=new ResizeObserver(zt=>{ht?Et(zt):ht=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ns(this,z),this._hash=z.hash&&new vh(typeof z.hash=="string"&&z.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:z.center,zoom:z.zoom,bearing:z.bearing,pitch:z.pitch}),z.bounds&&(this.resize(),this.fitBounds(z.bounds,e.e({},z.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=z.localIdeographFontFamily,this._validateStyle=z.validateStyle,z.style&&this.setStyle(z.style,{localIdeographFontFamily:z.localIdeographFontFamily}),z.attributionControl&&this.addControl(new ps(typeof z.attributionControl=="boolean"?void 0:z.attributionControl)),z.maplibreLogo&&this.addControl(new oo,z.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ht=>{this._update(ht.dataType==="style"),this.fire(new e.k(`${ht.dataType}data`,ht))}),this.on("dataloading",ht=>{this.fire(new e.k(`${ht.dataType}dataloading`,ht))}),this.on("dataabort",ht=>{this.fire(new e.k("sourcedataabort",ht))})}_getMapId(){return this._mapId}addControl($t,z){if(z===void 0&&(z=$t.getDefaultPosition?$t.getDefaultPosition():"top-right"),!$t||!$t.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ht=$t.onAdd(this);this._controls.push($t);let Et=this._controlPositions[z];return z.indexOf("bottom")!==-1?Et.insertBefore(ht,Et.firstChild):Et.appendChild(ht),this}removeControl($t){if(!$t||!$t.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let z=this._controls.indexOf($t);return z>-1&&this._controls.splice(z,1),$t.onRemove(this),this}hasControl($t){return this._controls.indexOf($t)>-1}calculateCameraOptionsFromTo($t,z,ht,Et){return Et==null&&this.terrain&&(Et=this.terrain.getElevationForLngLatZoom(ht,this.transform.tileZoom)),super.calculateCameraOptionsFromTo($t,z,ht,Et)}resize($t){var z;let ht=this._containerDimensions(),Et=ht[0],zt=ht[1],Ht=this._getClampedPixelRatio(Et,zt);if(this._resizeCanvas(Et,zt,Ht),this.painter.resize(Et,zt,Ht),this.painter.overLimit()){let Fe=this.painter.context.gl;this._maxCanvasSize=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];let Ke=this._getClampedPixelRatio(Et,zt);this._resizeCanvas(Et,zt,Ke),this.painter.resize(Et,zt,Ke)}this.transform.resize(Et,zt),(z=this._requestedCameraState)===null||z===void 0||z.resize(Et,zt);let ke=!this._moving;return ke&&(this.stop(),this.fire(new e.k("movestart",$t)).fire(new e.k("move",$t))),this.fire(new e.k("resize",$t)),ke&&this.fire(new e.k("moveend",$t)),this}_getClampedPixelRatio($t,z){let{0:ht,1:Et}=this._maxCanvasSize,zt=this.getPixelRatio(),Ht=$t*zt,ke=z*zt;return Math.min(Ht>ht?ht/Ht:1,ke>Et?Et/ke:1)*zt}getPixelRatio(){var $t;return($t=this._overridePixelRatio)!==null&&$t!==void 0?$t:devicePixelRatio}setPixelRatio($t){this._overridePixelRatio=$t,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds($t){return this.transform.setMaxBounds(ut.convert($t)),this._update()}setMinZoom($t){if(($t=$t??-2)>=-2&&$t<=this.transform.maxZoom)return this.transform.minZoom=$t,this._update(),this.getZoom()<$t&&this.setZoom($t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom($t){if(($t=$t??22)>=this.transform.minZoom)return this.transform.maxZoom=$t,this._update(),this.getZoom()>$t&&this.setZoom($t),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch($t){if(($t=$t??0)<0)throw new Error("minPitch must be greater than or equal to 0");if($t>=0&&$t<=this.transform.maxPitch)return this.transform.minPitch=$t,this._update(),this.getPitch()<$t&&this.setPitch($t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch($t){if(($t=$t??60)>85)throw new Error("maxPitch must be less than or equal to 85");if($t>=this.transform.minPitch)return this.transform.maxPitch=$t,this._update(),this.getPitch()>$t&&this.setPitch($t),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies($t){return this.transform.renderWorldCopies=$t,this._update()}project($t){return this.transform.locationPoint(e.N.convert($t),this.style&&this.terrain)}unproject($t){return this.transform.pointLocation(e.P.convert($t),this.terrain)}isMoving(){var $t;return this._moving||(($t=this.handlers)===null||$t===void 0?void 0:$t.isMoving())}isZooming(){var $t;return this._zooming||(($t=this.handlers)===null||$t===void 0?void 0:$t.isZooming())}isRotating(){var $t;return this._rotating||(($t=this.handlers)===null||$t===void 0?void 0:$t.isRotating())}_createDelegatedListener($t,z,ht){if($t==="mouseenter"||$t==="mouseover"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:zt=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),ke=Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[];ke.length?Et||(Et=!0,ht.call(this,new Qc($t,this,zt.originalEvent,{features:ke}))):Et=!1},mouseout:()=>{Et=!1}}}}if($t==="mouseleave"||$t==="mouseout"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:zt=>{let Ht=z.filter(ke=>this.getLayer(ke));(Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[]).length?Et=!0:Et&&(Et=!1,ht.call(this,new Qc($t,this,zt.originalEvent)))},mouseout:zt=>{Et&&(Et=!1,ht.call(this,new Qc($t,this,zt.originalEvent)))}}}}{let Et=zt=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),ke=Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[];ke.length&&(zt.features=ke,ht.call(this,zt),delete zt.features)};return{layers:z,listener:ht,delegates:{[$t]:Et}}}}_saveDelegatedListener($t,z){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$t]=this._delegatedListeners[$t]||[],this._delegatedListeners[$t].push(z)}_removeDelegatedListener($t,z,ht){if(!this._delegatedListeners||!this._delegatedListeners[$t])return;let Et=this._delegatedListeners[$t];for(let zt=0;ztz.includes(ke))){for(let ke in Ht.delegates)this.off(ke,Ht.delegates[ke]);return void Et.splice(zt,1)}}}on($t,z,ht){if(ht===void 0)return super.on($t,z);let Et=this._createDelegatedListener($t,typeof z=="string"?[z]:z,ht);this._saveDelegatedListener($t,Et);for(let zt in Et.delegates)this.on(zt,Et.delegates[zt]);return this}once($t,z,ht){if(ht===void 0)return super.once($t,z);let Et=typeof z=="string"?[z]:z,zt=this._createDelegatedListener($t,Et,ht);for(let Ht in zt.delegates){let ke=zt.delegates[Ht];zt.delegates[Ht]=(...Fe)=>{this._removeDelegatedListener($t,Et,ht),ke(...Fe)}}this._saveDelegatedListener($t,zt);for(let Ht in zt.delegates)this.once(Ht,zt.delegates[Ht]);return this}off($t,z,ht){return ht===void 0?super.off($t,z):(this._removeDelegatedListener($t,typeof z=="string"?[z]:z,ht),this)}queryRenderedFeatures($t,z){if(!this.style)return[];let ht,Et=$t instanceof e.P||Array.isArray($t),zt=Et?$t:[[0,0],[this.transform.width,this.transform.height]];if(z=z||(Et?{}:$t)||{},zt instanceof e.P||typeof zt[0]=="number")ht=[e.P.convert(zt)];else{let Ht=e.P.convert(zt[0]),ke=e.P.convert(zt[1]);ht=[Ht,new e.P(ke.x,Ht.y),ke,new e.P(Ht.x,ke.y),Ht]}return this.style.queryRenderedFeatures(ht,z,this.transform)}querySourceFeatures($t,z){return this.style.querySourceFeatures($t,z)}setStyle($t,z){return(z=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},z)).diff!==!1&&z.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&$t?(this._diffStyle($t,z),this):(this._localIdeographFontFamily=z.localIdeographFontFamily,this._updateStyle($t,z))}setTransformRequest($t){return this._requestManager.setTransformRequest($t),this}_getUIString($t){let z=this._locale[$t];if(z==null)throw new Error(`Missing UI string '${$t}'`);return z}_updateStyle($t,z){if(z.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle($t,z));let ht=this.style&&z.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!$t)),$t?(this.style=new Yr(this,z||{}),this.style.setEventedParent(this,{style:this.style}),typeof $t=="string"?this.style.loadURL($t,z,ht):this.style.loadJSON($t,z,ht),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Yr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle($t,z){if(typeof $t=="string"){let ht=this._requestManager.transformRequest($t,"Style");e.h(ht,new AbortController).then(Et=>{this._updateDiff(Et.data,z)}).catch(Et=>{Et&&this.fire(new e.j(Et))})}else typeof $t=="object"&&this._updateDiff($t,z)}_updateDiff($t,z){try{this.style.setState($t,z)&&this._update(!0)}catch(ht){e.w(`Unable to perform style diff: ${ht.message||ht.error||ht}. Rebuilding the style from scratch.`),this._updateStyle($t,z)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource($t,z){return this._lazyInitEmptyStyle(),this.style.addSource($t,z),this._update(!0)}isSourceLoaded($t){let z=this.style&&this.style.sourceCaches[$t];if(z!==void 0)return z.loaded();this.fire(new e.j(new Error(`There is no source with ID '${$t}'`)))}setTerrain($t){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),$t){let z=this.style.sourceCaches[$t.source];if(!z)throw new Error(`cannot load terrain, because there exists no source with ID: ${$t.source}`);this.terrain===null&&z.reload();for(let ht in this.style._layers){let Et=this.style._layers[ht];Et.type==="hillshade"&&Et.source===$t.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Pl(this.painter,z,$t),this.painter.renderToTexture=new lu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ht=>{ht.dataType==="style"?this.terrain.sourceCache.freeRtt():ht.dataType==="source"&&ht.tile&&(ht.sourceId!==$t.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ht.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:$t})),this}getTerrain(){var $t,z;return(z=($t=this.terrain)===null||$t===void 0?void 0:$t.options)!==null&&z!==void 0?z:null}areTilesLoaded(){let $t=this.style&&this.style.sourceCaches;for(let z in $t){let ht=$t[z]._tiles;for(let Et in ht){let zt=ht[Et];if(zt.state!=="loaded"&&zt.state!=="errored")return!1}}return!0}removeSource($t){return this.style.removeSource($t),this._update(!0)}getSource($t){return this.style.getSource($t)}addImage($t,z,ht={}){let{pixelRatio:Et=1,sdf:zt=!1,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr}=ht;if(this._lazyInitEmptyStyle(),!(z instanceof HTMLImageElement||e.b(z))){if(z.width===void 0||z.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Dr,height:Fr,data:un}=z,Sn=z;return this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},new Uint8Array(un)),pixelRatio:Et,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:zt,version:0,userImage:Sn}),Sn.onAdd&&Sn.onAdd(this,$t),this}}{let{width:Dr,height:Fr,data:un}=o.getImageData(z);this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},un),pixelRatio:Et,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:zt,version:0})}}updateImage($t,z){let ht=this.style.getImage($t);if(!ht)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Et=z instanceof HTMLImageElement||e.b(z)?o.getImageData(z):z,{width:zt,height:Ht,data:ke}=Et;if(zt===void 0||Ht===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(zt!==ht.data.width||Ht!==ht.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Fe=!(z instanceof HTMLImageElement||e.b(z));return ht.data.replace(ke,Fe),this.style.updateImage($t,ht),this}getImage($t){return this.style.getImage($t)}hasImage($t){return $t?!!this.style.getImage($t):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage($t){this.style.removeImage($t)}loadImage($t){return u.getImage(this._requestManager.transformRequest($t,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer($t,z){return this._lazyInitEmptyStyle(),this.style.addLayer($t,z),this._update(!0)}moveLayer($t,z){return this.style.moveLayer($t,z),this._update(!0)}removeLayer($t){return this.style.removeLayer($t),this._update(!0)}getLayer($t){return this.style.getLayer($t)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange($t,z,ht){return this.style.setLayerZoomRange($t,z,ht),this._update(!0)}setFilter($t,z,ht={}){return this.style.setFilter($t,z,ht),this._update(!0)}getFilter($t){return this.style.getFilter($t)}setPaintProperty($t,z,ht,Et={}){return this.style.setPaintProperty($t,z,ht,Et),this._update(!0)}getPaintProperty($t,z){return this.style.getPaintProperty($t,z)}setLayoutProperty($t,z,ht,Et={}){return this.style.setLayoutProperty($t,z,ht,Et),this._update(!0)}getLayoutProperty($t,z){return this.style.getLayoutProperty($t,z)}setGlyphs($t,z={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs($t,z),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite($t,z,ht={}){return this._lazyInitEmptyStyle(),this.style.addSprite($t,z,ht,Et=>{Et||this._update(!0)}),this}removeSprite($t){return this._lazyInitEmptyStyle(),this.style.removeSprite($t),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite($t,z={}){return this._lazyInitEmptyStyle(),this.style.setSprite($t,z,ht=>{ht||this._update(!0)}),this}setLight($t,z={}){return this._lazyInitEmptyStyle(),this.style.setLight($t,z),this._update(!0)}getLight(){return this.style.getLight()}setSky($t){return this._lazyInitEmptyStyle(),this.style.setSky($t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState($t,z){return this.style.setFeatureState($t,z),this._update()}removeFeatureState($t,z){return this.style.removeFeatureState($t,z),this._update()}getFeatureState($t){return this.style.getFeatureState($t)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let $t=0,z=0;return this._container&&($t=this._container.clientWidth||400,z=this._container.clientHeight||300),[$t,z]}_setupContainer(){let $t=this._container;$t.classList.add("maplibregl-map");let z=this._canvasContainer=i.create("div","maplibregl-canvas-container",$t);this._interactive&&z.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",z),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 ht=this._containerDimensions(),Et=this._getClampedPixelRatio(ht[0],ht[1]);this._resizeCanvas(ht[0],ht[1],Et);let zt=this._controlContainer=i.create("div","maplibregl-control-container",$t),Ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ke=>{Ht[ke]=i.create("div",`maplibregl-ctrl-${ke} `,zt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas($t,z,ht){this._canvas.width=Math.floor(ht*$t),this._canvas.height=Math.floor(ht*z),this._canvas.style.width=`${$t}px`,this._canvas.style.height=`${z}px`}_setupPainter(){let $t={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},z=null;this._canvas.addEventListener("webglcontextcreationerror",Et=>{z={requestedAttributes:$t},Et&&(z.statusMessage=Et.statusMessage,z.type=Et.type)},{once:!0});let ht=this._canvas.getContext("webgl2",$t)||this._canvas.getContext("webgl",$t);if(!ht){let Et="Failed to initialize WebGL";throw z?(z.message=Et,new Error(JSON.stringify(z))):new Error(Et)}this.painter=new Wh(ht,this.transform),l.testSupport(ht)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update($t){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||$t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame($t){return this._update(),this._renderTaskQueue.add($t)}_cancelRenderFrame($t){this._renderTaskQueue.remove($t)}_render($t){let z=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run($t),this._removed)return;let ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let zt=this.transform.zoom,Ht=o.now();this.style.zoomHistory.update(zt,Ht);let ke=new e.z(zt,{now:Ht,fadeDuration:z,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fe=ke.crossFadingFactor();Fe===1&&Fe===this._crossFadingFactor||(ht=!0,this._crossFadingFactor=Fe),this.style.update(ke)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,z,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:z,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Et=this._sourcesDirty||this._styleDirty||this._placementDirty;return Et||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||Et||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var $t;this._hash&&this._hash.remove();for(let ht of this._controls)ht.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),u.removeThrottleControl(this._imageQueueHandle),($t=this._resizeObserver)===null||$t===void 0||$t.disconnect();let z=this.painter.context.gl.getExtension("WEBGL_lose_context");z!=null&&z.loseContext&&z.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then($t=>{e.bf.frame($t),this._frameRequest=null,this._render($t)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries($t){this._showTileBoundaries!==$t&&(this._showTileBoundaries=$t,this._update())}get showPadding(){return!!this._showPadding}set showPadding($t){this._showPadding!==$t&&(this._showPadding=$t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes($t){this._showCollisionBoxes!==$t&&(this._showCollisionBoxes=$t,$t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector($t){this._showOverdrawInspector!==$t&&(this._showOverdrawInspector=$t,this._update())}get repaint(){return!!this._repaint}set repaint($t){this._repaint!==$t&&(this._repaint=$t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices($t){this._vertices=$t,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=Qc,t.MapTouchEvent=ff,t.MapWheelEvent=Pf,t.Marker=Lc,t.NavigationControl=class{constructor($t){this._updateZoomButtons=()=>{let z=this._map.getZoom(),ht=z===this._map.getMaxZoom(),Et=z===this._map.getMinZoom();this._zoomInButton.disabled=ht,this._zoomOutButton.disabled=Et,this._zoomInButton.setAttribute("aria-disabled",ht.toString()),this._zoomOutButton.setAttribute("aria-disabled",Et.toString())},this._rotateCompassArrow=()=>{let z=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=z},this._setButtonTitle=(z,ht)=>{let Et=this._map._getUIString(`NavigationControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)},this.options=e.e({},Oo,$t),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",z=>z.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",z=>this._map.zoomIn({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",z=>this._map.zoomOut({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",z=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:z}):this._map.resetNorth({},{originalEvent:z})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd($t){return this._map=$t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Es(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton($t,z){let ht=i.create("button",$t,this._container);return ht.type="button",ht.addEventListener("click",z),ht}},t.Popup=class extends e.E{constructor($t){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=z=>{this._update(z.point)},this._onMouseMove=z=>{this._update(z.point)},this._onDrag=z=>{this._update(z.point)},this._update=z=>{var ht;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Fe of this.options.className.split(" "))this._container.classList.add(Fe);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Rl(this._lngLat,this._flatPos,this._map.transform):(ht=this._lngLat)===null||ht===void 0?void 0:ht.wrap(),this._trackPointer&&!z)return;let Et=this._flatPos=this._pos=this._trackPointer&&z?z:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&z?z:this._map.transform.locationPoint(this._lngLat));let zt=this.options.anchor,Ht=$u(this.options.offset);if(!zt){let Fe=this._container.offsetWidth,Ke=this._container.offsetHeight,vr;vr=Et.y+Ht.bottom.ythis._map.transform.height-Ke?["bottom"]:[],Et.xthis._map.transform.width-Fe/2&&vr.push("right"),zt=vr.length===0?"bottom":vr.join("-")}let ke=Et.add(Ht[zt]);this.options.subpixelPositioning||(ke=ke.round()),i.setTransform(this._container,`${vc[zt]} translate(${ke.x}px,${ke.y}px)`),Hc(this._container,zt,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(zs),$t)}addTo($t){return this._map&&this.remove(),this._map=$t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat($t){return this._lngLat=e.N.convert($t),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText($t){return this.setDOMContent(document.createTextNode($t))}setHTML($t){let z=document.createDocumentFragment(),ht=document.createElement("body"),Et;for(ht.innerHTML=$t;Et=ht.firstChild,Et;)z.appendChild(Et);return this.setDOMContent(z)}getMaxWidth(){var $t;return($t=this._container)===null||$t===void 0?void 0:$t.style.maxWidth}setMaxWidth($t){return this.options.maxWidth=$t,this._update(),this}setDOMContent($t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild($t),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName($t){return this._container&&this._container.classList.add($t),this}removeClassName($t){return this._container&&this._container.classList.remove($t),this}setOffset($t){return this.options.offset=$t,this._update(),this}toggleClassName($t){if(this._container)return this._container.classList.toggle($t)}setSubpixelPositioning($t){this.options.subpixelPositioning=$t}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let $t=this._container.querySelector(qc);$t&&$t.focus()}},t.RasterDEMTileSource=qt,t.RasterTileSource=Pt,t.ScaleControl=class{constructor($t){this._onMove=()=>{Oh(this._map,this._container,this.options)},this.setUnit=z=>{this.options.unit=z,Oh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Du),$t)}getDefaultPosition(){return"bottom-left"}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",$t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=qn,t.Style=Yr,t.TerrainControl=class{constructor($t){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=$t}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=Wf,t.TwoFingersTouchRotateHandler=df,t.TwoFingersTouchZoomHandler=iu,t.TwoFingersTouchZoomRotateHandler=ca,t.VectorTileSource=It,t.VideoSource=fe,t.addSourceType=($t,z)=>e._(void 0,void 0,void 0,function*(){if(Tt($t))throw new Error(`A source type called "${$t}" already exists.`);((ht,Et)=>{se[ht]=Et})($t,z)}),t.clearPrewarmedResources=function(){let $t=st;$t&&($t.isPreloaded()&&$t.numActive()===1?($t.release(lt),st=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()"))},t.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return ve().getRTLTextPluginStatus()},t.getVersion=function(){return qf},t.getWorkerCount=function(){return yt.workerCount},t.getWorkerUrl=function(){return e.a.WORKER_URL},t.importScriptInWorkers=function($t){return at().broadcast("IS",$t)},t.prewarm=function(){dt().acquire(lt)},t.setMaxParallelImageRequests=function($t){e.a.MAX_PARALLEL_IMAGE_REQUESTS=$t},t.setRTLTextPlugin=function($t,z){return ve().setRTLTextPlugin($t,z)},t.setWorkerCount=function($t){yt.workerCount=$t},t.setWorkerUrl=function($t){e.a.WORKER_URL=$t}});var S=c;return S})}),JW=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=LE(),S=G1();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),QW=Dt((Q,Z)=>{var c=XW(),g=kn(),I=W1(),S=Jo(),t=Ls(),e=up(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=G1(),v=JW();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k;p.map?k=new Promise(function(w,R){p.updateMap(C,A,w,R)}):k=new Promise(function(w,R){p.createMap(C,A,w,R)}),h.push(k)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style),O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0})),H={};V.on("styleimagemissing",function(U){var W=U.id;if(!H[W]&&W.includes("-15")){H[W]=!0;var q=new Image(15,15);q.onload=function(){V.addImage(W,q)},q.crossOrigin="Anonymous",q.src="https://unpkg.com/maki@2.1.0/icons/"+W+".svg"}}),V.setTransformRequest(function(U){return U=U.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:U}}),V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var F=[];F.push(new Promise(function(U){V.once("load",U)})),F=F.concat(I.fetchTraceGeoData(C)),Promise.all(F).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],j=_(R.style);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,R;R=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=z1(),I=Ad(),S=I3();Z.exports=function(r,a,n){g(r,a,n,{type:"map",attributes:S,handleDefaults:t,partition:"y"})};function t(r,a,n){n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var o=n("bounds.west"),i=n("bounds.east"),l=n("bounds.south"),f=n("bounds.north");(o===void 0||i===void 0||l===void 0||f===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),AT=Dt(Q=>{var Z=kn(),c=Z.strTranslate,g=Z.strScale,I=ud().getSubplotCalcData,S=Dp(),t=qr(),e=Vs(),r=ec(),a=QW(),n="map";Q.name=n,Q.attr="subplot",Q.idRoot=n,Q.idRegex=Q.attrRegex=Z.counterRegex(n),Q.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Q.layoutAttributes=I3(),Q.supplyLayoutDefaults=tq(),Q.plot=function(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[n],x=0;xh/2){var p=P.split("|").join("
");C.text(p).attr("data-unformatted",p).call(r.convertToTspans,o),A=e.bBox(C.node())}C.attr("transform",c(-3,-A.height+8)),M.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;A.width+6>h&&(k=h/(A.width+6));var w=[f.l+f.w*v.x[1],f.t+f.h*(1-v.y[0])];M.attr("transform",c(w[0],w[1])+g(k))}},Q.updateFx=function(o){for(var i=o._fullLayout,l=i._subplots[n],f=0;f{Z.exports={attributes:kT(),supplyDefaults:$W(),colorbar:xo(),formatLabels:CE(),calc:tT(),plot:GW(),hoverPoints:TT().hoverPoints,eventData:YW(),selectPoints:KW(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermap",basePlotModule:AT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}),rq=Dt((Q,Z)=>{Z.exports=eq()}),PE=Dt((Q,Z)=>{var c=gb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ho(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),nq=Dt((Q,Z)=>{var c=kn(),g=mc(),I=PE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),IE=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=IE().convert,g=IE().convertOnSelect,I=G1().traceLayerPrefix;function S(e,r){this.type="choroplethmap",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),aq=Dt((Q,Z)=>{Z.exports={attributes:PE(),supplyDefaults:nq(),colorbar:I1(),calc:iT(),plot:iq(),hoverPoints:oT(),eventData:sT(),selectPoints:lT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=aq()}),zE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ho(),t=kT(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),sq=Dt((Q,Z)=>{var c=kn(),g=mc(),I=zE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),lq=Dt((Q,Z)=>{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Yi(),g=kn(),I=hi(),S=Xc(),t=Ca().BADNUM,e=H1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=uq(),g=G1().traceLayerPrefix;function I(t,e){this.type="densitymap",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),hq=Dt((Q,Z)=>{var c=Ls(),g=TT().hoverPoints,I=TT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),fq=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),dq=Dt((Q,Z)=>{Z.exports={attributes:zE(),supplyDefaults:sq(),colorbar:I1(),formatLabels:CE(),calc:lq(),plot:cq(),hoverPoints:hq(),eventData:fq(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=dq()}),OE=Dt((Q,Z)=>{var c=da(),g=Ho(),I=wi(),S=us(),t=jh().attributes,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=kc(),n=mu().templatedArray,o=dh().descriptionOnlyNumbers,i=Ia().extendFlat,l=Yc().overrideAll;Z.exports=l({hoverinfo:i({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:S.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:c({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:I.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:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:I.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:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:n("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(a().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}),mq=Dt((Q,Z)=>{var c=kn(),g=OE(),I=hi(),S=ro(),t=jh().defaults,e=Tg(),r=mu(),a=Ad();Z.exports=function(o,i,l,f){function x(R,O){return c.coerce(o,i,g,R,O)}var y=c.extendDeep(f.hoverlabel,o.hoverlabel),v=o.node,T=r.newContainer(i,"node");function u(R,O){return c.coerce(v,T,g.node,R,O)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",o.hoverinfo),e(v,T,u,y),u("hovertemplate"),u("align");var b=f.colorway,_=function(R){return b[R%b.length]};u("color",T.label.map(function(R,O){return I.addOpacity(_(O),.8)})),u("customdata");var P=o.link||{},M=r.newContainer(i,"link");function C(R,O){return c.coerce(P,M,g.link,R,O)}C("label"),C("arrowlen"),C("source"),C("target"),C("value"),C("line.color"),C("line.width"),C("hoverinfo",o.hoverinfo),e(P,M,C,y),C("hovertemplate");var A=S(f.paper_bgcolor).getLuminance()<.333,h=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=C("color",h);function k(R){var O=S(R);if(!O.isValid())return R;var j=O.getAlpha();return j<=.8?O.setAlpha(j+.2):O=A?O.brighten():O.darken(),O.toRgbString()}C("hovercolor",Array.isArray(p)?p.map(k):k(p)),C("customdata"),a(P,M,{name:"colorscales",handleItemDefaults:n}),t(i,f,x),x("orientation"),x("valueformat"),x("valuesuffix");var w;T.x.length&&T.y.length&&(w="freeform"),x("arrangement",w),c.coerceFont(x,"textfont",f.font,{autoShadowDflt:!0}),i._length=null};function n(o,i){function l(f,x){return c.coerce(o,i,g.link.colorscales,f,x)}l("label"),l("cmin"),l("cmax"),l("colorscale")}}),DE=Dt((Q,Z)=>{Z.exports=c;function c(g){for(var I=g.length,S=new Array(I),t=new Array(I),e=new Array(I),r=new Array(I),a=new Array(I),n=new Array(I),o=0;o0;){u=_[_.length-1];var P=g[u];if(r[u]=0&&n[u].push(a[C])}r[u]=M}else{if(t[u]===S[u]){for(var A=[],h=[],p=0,M=b.length-1;M>=0;--M){var k=b[M];if(e[k]=!1,A.push(k),h.push(n[k]),p+=n[k].length,a[k]=l.length,k===u){b.length=M;break}}l.push(A);for(var w=new Array(p),M=0;M{var c=DE(),g=kn(),I=zg().wrap,S=g.isArrayOrTypedArray,t=g.isIndex,e=Xc();function r(n){var o=n.node,i=n.link,l=[],f=S(i.color),x=S(i.hovercolor),y=S(i.customdata),v={},T={},u=i.colorscales.length,b;for(b=0;bC&&(C=i.source[b]),i.target[b]>C&&(C=i.target[b]);var A=C+1;n.node._count=A;var h,p=n.node.groups,k={};for(b=0;b0&&t(H,A)&&t(F,A)&&!(k.hasOwnProperty(H)&&k.hasOwnProperty(F)&&k[H]===k[F])){k.hasOwnProperty(F)&&(F=k[F]),k.hasOwnProperty(H)&&(H=k[H]),H=+H,F=+F,v[H]=v[F]=!0;var U="";i.label&&i.label[b]&&(U=i.label[b]);var W=null;U&&T.hasOwnProperty(U)&&(W=T[U]),l.push({pointNumber:b,label:U,color:f?i.color[b]:i.color,hovercolor:x?i.hovercolor[b]:i.hovercolor,customdata:y?i.customdata[b]:i.customdata,concentrationscale:W,source:H,target:F,value:+V}),j.source.push(H),j.target.push(F)}}var q=A+p.length,J=S(o.color),lt=S(o.customdata),yt=[];for(b=0;bA-1,childrenNodes:[],pointNumber:b,label:mt,color:J?o.color[b]:o.color,customdata:lt?o.customdata[b]:o.customdata})}var st=!1;return a(q,j.source,j.target)&&(st=!0),{circular:st,links:l,nodes:yt,groups:p,groupLookup:k}}function a(n,o,i){for(var l=g.init2dArray(n,0),f=0;f1})}Z.exports=function(n,o){var i=r(o);return I({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}}),vq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){var h=+this._x.call(null,A),p=+this._y.call(null,A);return I(this.cover(h,p),h,p,A)}function I(A,h,p,k){if(isNaN(h)||isNaN(p))return A;var w,R=A._root,O={data:k},j=A._x0,V=A._y0,H=A._x1,F=A._y1,U,W,q,J,lt,yt,mt,st;if(!R)return A._root=O,A;for(;R.length;)if((lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W,w=R,!(R=R[mt=yt<<1|lt]))return w[mt]=O,A;if(q=+A._x.call(null,R.data),J=+A._y.call(null,R.data),h===q&&p===J)return O.next=R,w?w[mt]=O:A._root=O,A;do w=w?w[mt]=new Array(4):A._root=new Array(4),(lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W;while((mt=yt<<1|lt)===(st=(J>=W)<<1|q>=U));return w[st]=R,w[mt]=O,A}function S(A){var h,p,k=A.length,w,R,O=new Array(k),j=new Array(k),V=1/0,H=1/0,F=-1/0,U=-1/0;for(p=0;pF&&(F=w),RU&&(U=R));if(V>F||H>U)return this;for(this.cover(V,H).cover(F,U),p=0;pA||A>=w||k>h||h>=R;)switch(H=(hF||(j=J.y0)>U||(V=J.x1)=mt)<<1|A>=yt)&&(J=W[W.length-1],W[W.length-1]=W[W.length-1-lt],W[W.length-1-lt]=J)}else{var st=A-+this._x.call(null,q.data),tt=h-+this._y.call(null,q.data),dt=st*st+tt*tt;if(dt=(W=(O+V)/2))?O=W:V=W,(lt=U>=(q=(j+H)/2))?j=q:H=q,h=p,!(p=p[yt=lt<<1|J]))return this;if(!p.length)break;(h[yt+1&3]||h[yt+2&3]||h[yt+3&3])&&(k=h,mt=yt)}for(;p.data!==A;)if(w=p,!(p=p.next))return this;return(R=p.next)&&delete p.next,w?(R?w.next=R:delete w.next,this):h?(R?h[yt]=R:delete h[yt],(p=h[0]||h[1]||h[2]||h[3])&&p===(h[3]||h[2]||h[1]||h[0])&&!p.length&&(k?k[mt]=p:this._root=p),this):(this._root=R,this)}function i(A){for(var h=0,p=A.length;h{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){var g="$";function I(){}I.prototype=S.prototype={constructor:I,has:function(v){return g+v in this},get:function(v){return this[g+v]},set:function(v,T){return this[g+v]=T,this},remove:function(v){var T=g+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===g&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===g&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===g&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===g&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===g&&++v;return v},empty:function(){for(var v in this)if(v[0]===g)return!1;return!0},each:function(v){for(var T in this)T[0]===g&&v(this[T],T.slice(1),this)}};function S(v,T){var u=new I;if(v instanceof I)v.each(function(C,A){u.set(A,C)});else if(Array.isArray(v)){var b=-1,_=v.length,P;if(T==null)for(;++b<_;)u.set(b,v[b]);else for(;++b<_;)u.set(T(P=v[b],b,v),P)}else if(v)for(var M in v)u.set(M,v[M]);return u}function t(){var v=[],T=[],u,b,_;function P(C,A,h,p){if(A>=v.length)return u!=null&&C.sort(u),b!=null?b(C):C;for(var k=-1,w=C.length,R=v[A++],O,j,V=S(),H,F=h();++kv.length)return C;var h,p=T[A-1];return b!=null&&A>=v.length?h=C.entries():(h=[],C.each(function(k,w){h.push({key:w,values:M(k,A)})})),p!=null?h.sort(function(k,w){return p(k.key,w.key)}):h}return _={object:function(C){return P(C,0,e,r)},map:function(C){return P(C,0,a,n)},entries:function(C){return M(P(C,0,a,n),0)},key:function(C){return v.push(C),_},sortKeys:function(C){return T[v.length-1]=C,_},sortValues:function(C){return u=C,_},rollup:function(C){return b=C,_}}}function e(){return{}}function r(v,T,u){v[T]=u}function a(){return S()}function n(v,T,u){v.set(T,u)}function o(){}var i=S.prototype;o.prototype=l.prototype={constructor:o,has:i.has,add:function(v){return v+="",this[g+v]=v,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function l(v,T){var u=new o;if(v instanceof o)v.each(function(P){u.add(P)});else if(v){var b=-1,_=v.length;if(T==null)for(;++b<_;)u.add(v[b]);else for(;++b<_;)u.add(T(v[b],b,v))}return u}function f(v){var T=[];for(var u in v)T.push(u);return T}function x(v){var T=[];for(var u in v)T.push(v[u]);return T}function y(v){var T=[];for(var u in v)T.push({key:u,value:v[u]});return T}c.nest=t,c.set=l,c.map=S,c.keys=f,c.values=x,c.entries=y,Object.defineProperty(c,"__esModule",{value:!0})})}),yq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g={value:function(){}};function I(){for(var a=0,n=arguments.length,o={},i;a=0&&(i=o.slice(l+1),o=o.slice(0,l)),o&&!n.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:i}})}S.prototype=I.prototype={constructor:S,on:function(a,n){var o=this._,i=t(a+"",o),l,f=-1,x=i.length;if(arguments.length<2){for(;++f0)for(var o=new Array(l),i=0,l,f;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=0,I=0,S=0,t=1e3,e,r,a=0,n=0,o=0,i=typeof performance=="object"&&performance.now?performance:Date,l=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function f(){return n||(l(x),n=i.now()+o)}function x(){n=0}function y(){this._call=this._time=this._next=null}y.prototype=v.prototype={constructor:y,restart:function(A,h,p){if(typeof A!="function")throw new TypeError("callback is not a function");p=(p==null?f():+p)+(h==null?0:+h),!this._next&&r!==this&&(r?r._next=this:e=this,r=this),this._call=A,this._time=p,P()},stop:function(){this._call&&(this._call=null,this._time=1/0,P())}};function v(A,h,p){var k=new y;return k.restart(A,h,p),k}function T(){f(),++g;for(var A=e,h;A;)(h=n-A._time)>=0&&A._call.call(null,h),A=A._next;--g}function u(){n=(a=i.now())+o,g=I=0;try{T()}finally{g=0,_(),n=0}}function b(){var A=i.now(),h=A-a;h>t&&(o-=h,a=A)}function _(){for(var A,h=e,p,k=1/0;h;)h._call?(k>h._time&&(k=h._time),A=h,h=h._next):(p=h._next,h._next=null,h=A?A._next=p:e=p);r=A,P(k)}function P(A){if(!g){I&&(I=clearTimeout(I));var h=A-n;h>24?(A<1/0&&(I=setTimeout(u,A-i.now()-o)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,t)),g=1,l(u))}}function M(A,h,p){var k=new y;return h=h==null?0:+h,k.restart(function(w){k.stop(),A(w+h)},h,p),k}function C(A,h,p){var k=new y,w=h;return h==null?(k.restart(A,h,p),k):(h=+h,p=p==null?f():+p,k.restart(function R(O){O+=w,k.restart(R,w+=h,p),A(O)},h,p),k)}c.interval=C,c.now=f,c.timeout=M,c.timer=v,c.timerFlush=T,Object.defineProperty(c,"__esModule",{value:!0})})}),_q=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,vq(),MT(),yq(),xq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,c.d3)})(Q,function(c,g,I,S,t){function e(A,h){var p;A==null&&(A=0),h==null&&(h=0);function k(){var w,R=p.length,O,j=0,V=0;for(w=0;wU.index){var ft=W-vt.x-vt.vx,ut=q-vt.y-vt.vy,kt=ft*ft+ut*ut;ktW+Y||rtq+Y||atV.r&&(V.r=V[H].r)}function j(){if(h){var V,H=h.length,F;for(p=new Array(H),V=0;V1?(lt==null?j.remove(J):j.set(J,q(lt)),h):j.get(J)},find:function(J,lt,yt){var mt=0,st=A.length,tt,dt,rt,at,vt;for(yt==null?yt=1/0:yt*=yt,mt=0;mt1?(H.on(J,lt),h):H.on(J)}}}function _(){var A,h,p,k=r(-30),w,R=1,O=1/0,j=.81;function V(W){var q,J=A.length,lt=g.quadtree(A,y,v).visitAfter(F);for(p=W,q=0;q=O)){(W.data!==h||W.next)&&(yt===0&&(yt=a(),tt+=yt*yt),mt===0&&(mt=a(),tt+=mt*mt),tt{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=Math.PI,I=2*g,S=1e-6,t=I-S;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new e}e.prototype=r.prototype={constructor:e,moveTo:function(a,n){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,n){this._+="L"+(this._x1=+a)+","+(this._y1=+n)},quadraticCurveTo:function(a,n,o,i){this._+="Q"+ +a+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},bezierCurveTo:function(a,n,o,i,l,f){this._+="C"+ +a+","+ +n+","+ +o+","+ +i+","+(this._x1=+l)+","+(this._y1=+f)},arcTo:function(a,n,o,i,l){a=+a,n=+n,o=+o,i=+i,l=+l;var f=this._x1,x=this._y1,y=o-a,v=i-n,T=f-a,u=x-n,b=T*T+u*u;if(l<0)throw new Error("negative radius: "+l);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=n);else if(b>S)if(!(Math.abs(u*y-v*T)>S)||!l)this._+="L"+(this._x1=a)+","+(this._y1=n);else{var _=o-f,P=i-x,M=y*y+v*v,C=_*_+P*P,A=Math.sqrt(M),h=Math.sqrt(b),p=l*Math.tan((g-Math.acos((M+b-C)/(2*A*h)))/2),k=p/h,w=p/A;Math.abs(k-1)>S&&(this._+="L"+(a+k*T)+","+(n+k*u)),this._+="A"+l+","+l+",0,0,"+ +(u*_>T*P)+","+(this._x1=a+w*y)+","+(this._y1=n+w*v)}},arc:function(a,n,o,i,l,f){a=+a,n=+n,o=+o,f=!!f;var x=o*Math.cos(i),y=o*Math.sin(i),v=a+x,T=n+y,u=1^f,b=f?i-l:l-i;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>S||Math.abs(this._y1-T)>S)&&(this._+="L"+v+","+T),o&&(b<0&&(b=b%I+I),b>t?this._+="A"+o+","+o+",0,1,"+u+","+(a-x)+","+(n-y)+"A"+o+","+o+",0,1,"+u+","+(this._x1=v)+","+(this._y1=T):b>S&&(this._+="A"+o+","+o+",0,"+ +(b>=g)+","+u+","+(this._x1=a+o*Math.cos(l))+","+(this._y1=n+o*Math.sin(l))))},rect:function(a,n,o,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +i+"h"+-o+"Z"},toString:function(){return this._}},c.path=r,Object.defineProperty(c,"__esModule",{value:!0})})}),FE=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,bq()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Ce){return function(){return Ce}}var S=Math.abs,t=Math.atan2,e=Math.cos,r=Math.max,a=Math.min,n=Math.sin,o=Math.sqrt,i=1e-12,l=Math.PI,f=l/2,x=2*l;function y(Ce){return Ce>1?0:Ce<-1?l:Math.acos(Ce)}function v(Ce){return Ce>=1?f:Ce<=-1?-f:Math.asin(Ce)}function T(Ce){return Ce.innerRadius}function u(Ce){return Ce.outerRadius}function b(Ce){return Ce.startAngle}function _(Ce){return Ce.endAngle}function P(Ce){return Ce&&Ce.padAngle}function M(Ce,dr,Hr,_n,Fn,Qn,Pn,En){var Zn=Hr-Ce,La=_n-dr,Vi=Pn-Fn,Qa=En-Qn,Ja=Qa*Zn-Vi*La;if(!(Ja*Jakl*kl+ql*ql&&(Qs=cs,Nl=Ps),{cx:Qs,cy:Nl,x01:-Vi,y01:-Qa,x11:Qs*(Fn/Ks-1),y11:Nl*(Fn/Ks-1)}}function A(){var Ce=T,dr=u,Hr=I(0),_n=null,Fn=b,Qn=_,Pn=P,En=null;function Zn(){var La,Vi,Qa=+Ce.apply(this,arguments),Ja=+dr.apply(this,arguments),Do=Fn.apply(this,arguments)-f,yo=Qn.apply(this,arguments)-f,Fo=S(yo-Do),Da=yo>Do;if(En||(En=La=g.path()),Jai))En.moveTo(0,0);else if(Fo>x-i)En.moveTo(Ja*e(Do),Ja*n(Do)),En.arc(0,0,Ja,Do,yo,!Da),Qa>i&&(En.moveTo(Qa*e(yo),Qa*n(yo)),En.arc(0,0,Qa,yo,Do,Da));else{var ys=Do,os=yo,ul=Do,Zo=yo,Ks=Fo,ss=Fo,cl=Pn.apply(this,arguments)/2,Qs=cl>i&&(_n?+_n.apply(this,arguments):o(Qa*Qa+Ja*Ja)),Nl=a(S(Ja-Qa)/2,+Hr.apply(this,arguments)),cs=Nl,Ps=Nl,Lo,As;if(Qs>i){var kl=v(Qs/Qa*n(cl)),ql=v(Qs/Ja*n(cl));(Ks-=kl*2)>i?(kl*=Da?1:-1,ul+=kl,Zo-=kl):(Ks=0,ul=Zo=(Do+yo)/2),(ss-=ql*2)>i?(ql*=Da?1:-1,ys+=ql,os-=ql):(ss=0,ys=os=(Do+yo)/2)}var Jl=Ja*e(ys),Us=Ja*n(ys),Pa=Qa*e(Zo),fo=Qa*n(Zo);if(Nl>i){var qs=Ja*e(os),Ql=Ja*n(os),Xo=Qa*e(ul),Gl=Qa*n(ul),al;if(Foi?Ps>i?(Lo=C(Xo,Gl,Jl,Us,Ja,Ps,Da),As=C(qs,Ql,Pa,fo,Ja,Ps,Da),En.moveTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),Psi)||!(Ks>i)?En.lineTo(Pa,fo):cs>i?(Lo=C(Pa,fo,qs,Ql,Qa,-cs,Da),As=C(Jl,Us,Xo,Gl,Qa,-cs,Da),En.lineTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),cs=Ja;--Do)En.point(os[Do],ul[Do]);En.lineEnd(),En.areaEnd()}Da&&(os[Qa]=+Ce(Fo,Qa,Vi),ul[Qa]=+Hr(Fo,Qa,Vi),En.point(dr?+dr(Fo,Qa,Vi):os[Qa],_n?+_n(Fo,Qa,Vi):ul[Qa]))}if(ys)return En=null,ys+""||null}function La(){return R().defined(Fn).curve(Pn).context(Qn)}return Zn.x=function(Vi){return arguments.length?(Ce=typeof Vi=="function"?Vi:I(+Vi),dr=null,Zn):Ce},Zn.x0=function(Vi){return arguments.length?(Ce=typeof Vi=="function"?Vi:I(+Vi),Zn):Ce},Zn.x1=function(Vi){return arguments.length?(dr=Vi==null?null:typeof Vi=="function"?Vi:I(+Vi),Zn):dr},Zn.y=function(Vi){return arguments.length?(Hr=typeof Vi=="function"?Vi:I(+Vi),_n=null,Zn):Hr},Zn.y0=function(Vi){return arguments.length?(Hr=typeof Vi=="function"?Vi:I(+Vi),Zn):Hr},Zn.y1=function(Vi){return arguments.length?(_n=Vi==null?null:typeof Vi=="function"?Vi:I(+Vi),Zn):_n},Zn.lineX0=Zn.lineY0=function(){return La().x(Ce).y(Hr)},Zn.lineY1=function(){return La().x(Ce).y(_n)},Zn.lineX1=function(){return La().x(dr).y(Hr)},Zn.defined=function(Vi){return arguments.length?(Fn=typeof Vi=="function"?Vi:I(!!Vi),Zn):Fn},Zn.curve=function(Vi){return arguments.length?(Pn=Vi,Qn!=null&&(En=Pn(Qn)),Zn):Pn},Zn.context=function(Vi){return arguments.length?(Vi==null?Qn=En=null:En=Pn(Qn=Vi),Zn):Qn},Zn}function j(Ce,dr){return drCe?1:dr>=Ce?0:NaN}function V(Ce){return Ce}function H(){var Ce=V,dr=j,Hr=null,_n=I(0),Fn=I(x),Qn=I(0);function Pn(En){var Zn,La=En.length,Vi,Qa,Ja=0,Do=new Array(La),yo=new Array(La),Fo=+_n.apply(this,arguments),Da=Math.min(x,Math.max(-x,Fn.apply(this,arguments)-Fo)),ys,os=Math.min(Math.abs(Da)/La,Qn.apply(this,arguments)),ul=os*(Da<0?-1:1),Zo;for(Zn=0;Zn0&&(Ja+=Zo);for(dr!=null?Do.sort(function(Ks,ss){return dr(yo[Ks],yo[ss])}):Hr!=null&&Do.sort(function(Ks,ss){return Hr(En[Ks],En[ss])}),Zn=0,Qa=Ja?(Da-La*ul)/Ja:0;Zn0?Zo*Qa:0)+ul,yo[Vi]={data:En[Vi],index:Zn,value:Zo,startAngle:Fo,endAngle:ys,padAngle:os};return yo}return Pn.value=function(En){return arguments.length?(Ce=typeof En=="function"?En:I(+En),Pn):Ce},Pn.sortValues=function(En){return arguments.length?(dr=En,Hr=null,Pn):dr},Pn.sort=function(En){return arguments.length?(Hr=En,dr=null,Pn):Hr},Pn.startAngle=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.endAngle=function(En){return arguments.length?(Fn=typeof En=="function"?En:I(+En),Pn):Fn},Pn.padAngle=function(En){return arguments.length?(Qn=typeof En=="function"?En:I(+En),Pn):Qn},Pn}var F=W(p);function U(Ce){this._curve=Ce}U.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ce,dr){this._curve.point(dr*Math.sin(Ce),dr*-Math.cos(Ce))}};function W(Ce){function dr(Hr){return new U(Ce(Hr))}return dr._curve=Ce,dr}function q(Ce){var dr=Ce.curve;return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce.curve=function(Hr){return arguments.length?dr(W(Hr)):dr()._curve},Ce}function J(){return q(R().curve(F))}function lt(){var Ce=O().curve(F),dr=Ce.curve,Hr=Ce.lineX0,_n=Ce.lineX1,Fn=Ce.lineY0,Qn=Ce.lineY1;return Ce.angle=Ce.x,delete Ce.x,Ce.startAngle=Ce.x0,delete Ce.x0,Ce.endAngle=Ce.x1,delete Ce.x1,Ce.radius=Ce.y,delete Ce.y,Ce.innerRadius=Ce.y0,delete Ce.y0,Ce.outerRadius=Ce.y1,delete Ce.y1,Ce.lineStartAngle=function(){return q(Hr())},delete Ce.lineX0,Ce.lineEndAngle=function(){return q(_n())},delete Ce.lineX1,Ce.lineInnerRadius=function(){return q(Fn())},delete Ce.lineY0,Ce.lineOuterRadius=function(){return q(Qn())},delete Ce.lineY1,Ce.curve=function(Pn){return arguments.length?dr(W(Pn)):dr()._curve},Ce}function yt(Ce,dr){return[(dr=+dr)*Math.cos(Ce-=Math.PI/2),dr*Math.sin(Ce)]}var mt=Array.prototype.slice;function st(Ce){return Ce.source}function tt(Ce){return Ce.target}function dt(Ce){var dr=st,Hr=tt,_n=k,Fn=w,Qn=null;function Pn(){var En,Zn=mt.call(arguments),La=dr.apply(this,Zn),Vi=Hr.apply(this,Zn);if(Qn||(Qn=En=g.path()),Ce(Qn,+_n.apply(this,(Zn[0]=La,Zn)),+Fn.apply(this,Zn),+_n.apply(this,(Zn[0]=Vi,Zn)),+Fn.apply(this,Zn)),En)return Qn=null,En+""||null}return Pn.source=function(En){return arguments.length?(dr=En,Pn):dr},Pn.target=function(En){return arguments.length?(Hr=En,Pn):Hr},Pn.x=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.y=function(En){return arguments.length?(Fn=typeof En=="function"?En:I(+En),Pn):Fn},Pn.context=function(En){return arguments.length?(Qn=En??null,Pn):Qn},Pn}function rt(Ce,dr,Hr,_n,Fn){Ce.moveTo(dr,Hr),Ce.bezierCurveTo(dr=(dr+_n)/2,Hr,dr,Fn,_n,Fn)}function at(Ce,dr,Hr,_n,Fn){Ce.moveTo(dr,Hr),Ce.bezierCurveTo(dr,Hr=(Hr+Fn)/2,_n,Hr,_n,Fn)}function vt(Ce,dr,Hr,_n,Fn){var Qn=yt(dr,Hr),Pn=yt(dr,Hr=(Hr+Fn)/2),En=yt(_n,Hr),Zn=yt(_n,Fn);Ce.moveTo(Qn[0],Qn[1]),Ce.bezierCurveTo(Pn[0],Pn[1],En[0],En[1],Zn[0],Zn[1])}function it(){return dt(rt)}function Y(){return dt(at)}function ft(){var Ce=dt(vt);return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce}var ut={draw:function(Ce,dr){var Hr=Math.sqrt(dr/l);Ce.moveTo(Hr,0),Ce.arc(0,0,Hr,0,x)}},kt={draw:function(Ce,dr){var Hr=Math.sqrt(dr/5)/2;Ce.moveTo(-3*Hr,-Hr),Ce.lineTo(-Hr,-Hr),Ce.lineTo(-Hr,-3*Hr),Ce.lineTo(Hr,-3*Hr),Ce.lineTo(Hr,-Hr),Ce.lineTo(3*Hr,-Hr),Ce.lineTo(3*Hr,Hr),Ce.lineTo(Hr,Hr),Ce.lineTo(Hr,3*Hr),Ce.lineTo(-Hr,3*Hr),Ce.lineTo(-Hr,Hr),Ce.lineTo(-3*Hr,Hr),Ce.closePath()}},It=Math.sqrt(1/3),Pt=It*2,qt={draw:function(Ce,dr){var Hr=Math.sqrt(dr/Pt),_n=Hr*It;Ce.moveTo(0,-Hr),Ce.lineTo(_n,0),Ce.lineTo(0,Hr),Ce.lineTo(-_n,0),Ce.closePath()}},Wt=.8908130915292852,Jt=Math.sin(l/10)/Math.sin(7*l/10),ge=Math.sin(x/10)*Jt,fe=-Math.cos(x/10)*Jt,pe={draw:function(Ce,dr){var Hr=Math.sqrt(dr*Wt),_n=ge*Hr,Fn=fe*Hr;Ce.moveTo(0,-Hr),Ce.lineTo(_n,Fn);for(var Qn=1;Qn<5;++Qn){var Pn=x*Qn/5,En=Math.cos(Pn),Zn=Math.sin(Pn);Ce.lineTo(Zn*Hr,-En*Hr),Ce.lineTo(En*_n-Zn*Fn,Zn*_n+En*Fn)}Ce.closePath()}},se={draw:function(Ce,dr){var Hr=Math.sqrt(dr),_n=-Hr/2;Ce.rect(_n,_n,Hr,Hr)}},Tt=Math.sqrt(3),Lt={draw:function(Ce,dr){var Hr=-Math.sqrt(dr/(Tt*3));Ce.moveTo(0,Hr*2),Ce.lineTo(-Tt*Hr,-Hr),Ce.lineTo(Tt*Hr,-Hr),Ce.closePath()}},Mt=-.5,ee=Math.sqrt(3)/2,ve=1/Math.sqrt(12),oe=(ve/2+1)*3,Te={draw:function(Ce,dr){var Hr=Math.sqrt(dr/oe),_n=Hr/2,Fn=Hr*ve,Qn=_n,Pn=Hr*ve+Hr,En=-Qn,Zn=Pn;Ce.moveTo(_n,Fn),Ce.lineTo(Qn,Pn),Ce.lineTo(En,Zn),Ce.lineTo(Mt*_n-ee*Fn,ee*_n+Mt*Fn),Ce.lineTo(Mt*Qn-ee*Pn,ee*Qn+Mt*Pn),Ce.lineTo(Mt*En-ee*Zn,ee*En+Mt*Zn),Ce.lineTo(Mt*_n+ee*Fn,Mt*Fn-ee*_n),Ce.lineTo(Mt*Qn+ee*Pn,Mt*Pn-ee*Qn),Ce.lineTo(Mt*En+ee*Zn,Mt*Zn-ee*En),Ce.closePath()}},He=[ut,kt,qt,se,pe,Lt,Te];function Ge(){var Ce=I(ut),dr=I(64),Hr=null;function _n(){var Fn;if(Hr||(Hr=Fn=g.path()),Ce.apply(this,arguments).draw(Hr,+dr.apply(this,arguments)),Fn)return Hr=null,Fn+""||null}return _n.type=function(Fn){return arguments.length?(Ce=typeof Fn=="function"?Fn:I(Fn),_n):Ce},_n.size=function(Fn){return arguments.length?(dr=typeof Fn=="function"?Fn:I(+Fn),_n):dr},_n.context=function(Fn){return arguments.length?(Hr=Fn??null,_n):Hr},_n}function cr(){}function ur(Ce,dr,Hr){Ce._context.bezierCurveTo((2*Ce._x0+Ce._x1)/3,(2*Ce._y0+Ce._y1)/3,(Ce._x0+2*Ce._x1)/3,(Ce._y0+2*Ce._y1)/3,(Ce._x0+4*Ce._x1+dr)/6,(Ce._y0+4*Ce._y1+Hr)/6)}function jr(Ce){this._context=Ce}jr.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:ur(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(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);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:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Wr(Ce){return new jr(Ce)}function br(Ce){this._context=Ce}br.prototype={areaStart:cr,areaEnd:cr,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(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._x2=Ce,this._y2=dr;break;case 1:this._point=2,this._x3=Ce,this._y3=dr;break;case 2:this._point=3,this._x4=Ce,this._y4=dr,this._context.moveTo((this._x0+4*this._x1+Ce)/6,(this._y0+4*this._y1+dr)/6);break;default:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Xr(Ce){return new br(Ce)}function nn(Ce){this._context=Ce}nn.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(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Hr=(this._x0+4*this._x1+Ce)/6,_n=(this._y0+4*this._y1+dr)/6;this._line?this._context.lineTo(Hr,_n):this._context.moveTo(Hr,_n);break;case 3:this._point=4;default:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Le(Ce){return new nn(Ce)}function Gt(Ce,dr){this._basis=new jr(Ce),this._beta=dr}Gt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ce=this._x,dr=this._y,Hr=Ce.length-1;if(Hr>0)for(var _n=Ce[0],Fn=dr[0],Qn=Ce[Hr]-_n,Pn=dr[Hr]-Fn,En=-1,Zn;++En<=Hr;)Zn=En/Hr,this._basis.point(this._beta*Ce[En]+(1-this._beta)*(_n+Zn*Qn),this._beta*dr[En]+(1-this._beta)*(Fn+Zn*Pn));this._x=this._y=null,this._basis.lineEnd()},point:function(Ce,dr){this._x.push(+Ce),this._y.push(+dr)}};var ne=function Ce(dr){function Hr(_n){return dr===1?new jr(_n):new Gt(_n,dr)}return Hr.beta=function(_n){return Ce(+_n)},Hr}(.85);function Ct(Ce,dr,Hr){Ce._context.bezierCurveTo(Ce._x1+Ce._k*(Ce._x2-Ce._x0),Ce._y1+Ce._k*(Ce._y2-Ce._y0),Ce._x2+Ce._k*(Ce._x1-dr),Ce._y2+Ce._k*(Ce._y1-Hr),Ce._x2,Ce._y2)}function gt(Ce,dr){this._context=Ce,this._k=(1-dr)/6}gt.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:Ct(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2,this._x1=Ce,this._y1=dr;break;case 2:this._point=3;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var St=function Ce(dr){function Hr(_n){return new gt(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Nt(Ce,dr){this._context=Ce,this._k=(1-dr)/6}Nt.prototype={areaStart:cr,areaEnd:cr,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(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._x3=Ce,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=dr);break;case 2:this._point=3,this._x5=Ce,this._y5=dr;break;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var re=function Ce(dr){function Hr(_n){return new Nt(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function le(Ce,dr){this._context=Ce,this._k=(1-dr)/6}le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var we=function Ce(dr){function Hr(_n){return new le(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Ue(Ce,dr,Hr){var _n=Ce._x1,Fn=Ce._y1,Qn=Ce._x2,Pn=Ce._y2;if(Ce._l01_a>i){var En=2*Ce._l01_2a+3*Ce._l01_a*Ce._l12_a+Ce._l12_2a,Zn=3*Ce._l01_a*(Ce._l01_a+Ce._l12_a);_n=(_n*En-Ce._x0*Ce._l12_2a+Ce._x2*Ce._l01_2a)/Zn,Fn=(Fn*En-Ce._y0*Ce._l12_2a+Ce._y2*Ce._l01_2a)/Zn}if(Ce._l23_a>i){var La=2*Ce._l23_2a+3*Ce._l23_a*Ce._l12_a+Ce._l12_2a,Vi=3*Ce._l23_a*(Ce._l23_a+Ce._l12_a);Qn=(Qn*La+Ce._x1*Ce._l23_2a-dr*Ce._l12_2a)/Vi,Pn=(Pn*La+Ce._y1*Ce._l23_2a-Hr*Ce._l12_2a)/Vi}Ce._context.bezierCurveTo(_n,Fn,Qn,Pn,Ce._x2,Ce._y2)}function qe(Ce,dr){this._context=Ce,this._alpha=dr}qe.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(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ue(this,Ce,dr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var or=function Ce(dr){function Hr(_n){return dr?new qe(_n,dr):new gt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Sr(Ce,dr){this._context=Ce,this._alpha=dr}Sr.prototype={areaStart:cr,areaEnd:cr,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(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ce,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=dr);break;case 2:this._point=3,this._x5=Ce,this._y5=dr;break;default:Ue(this,Ce,dr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Ar=function Ce(dr){function Hr(_n){return dr?new Sr(_n,dr):new Nt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function mr(Ce,dr){this._context=Ce,this._alpha=dr}mr.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(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,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:Ue(this,Ce,dr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Qr=function Ce(dr){function Hr(_n){return dr?new mr(_n,dr):new le(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Hn(Ce){this._context=Ce}Hn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ce,dr){Ce=+Ce,dr=+dr,this._point?this._context.lineTo(Ce,dr):(this._point=1,this._context.moveTo(Ce,dr))}};function Wn(Ce){return new Hn(Ce)}function Xn(Ce){return Ce<0?-1:1}function Ii(Ce,dr,Hr){var _n=Ce._x1-Ce._x0,Fn=dr-Ce._x1,Qn=(Ce._y1-Ce._y0)/(_n||Fn<0&&-0),Pn=(Hr-Ce._y1)/(Fn||_n<0&&-0),En=(Qn*Fn+Pn*_n)/(_n+Fn);return(Xn(Qn)+Xn(Pn))*Math.min(Math.abs(Qn),Math.abs(Pn),.5*Math.abs(En))||0}function oi(Ce,dr){var Hr=Ce._x1-Ce._x0;return Hr?(3*(Ce._y1-Ce._y0)/Hr-dr)/2:dr}function $n(Ce,dr,Hr){var _n=Ce._x0,Fn=Ce._y0,Qn=Ce._x1,Pn=Ce._y1,En=(Qn-_n)/3;Ce._context.bezierCurveTo(_n+En,Fn+En*dr,Qn-En,Pn-En*Hr,Qn,Pn)}function sa(Ce){this._context=Ce}sa.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:$n(this,this._t0,oi(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){var Hr=NaN;if(Ce=+Ce,dr=+dr,!(Ce===this._x1&&dr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;break;case 2:this._point=3,$n(this,oi(this,Hr=Ii(this,Ce,dr)),Hr);break;default:$n(this,this._t0,Hr=Ii(this,Ce,dr));break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr,this._t0=Hr}}};function Zi(Ce){this._context=new We(Ce)}(Zi.prototype=Object.create(sa.prototype)).point=function(Ce,dr){sa.prototype.point.call(this,dr,Ce)};function We(Ce){this._context=Ce}We.prototype={moveTo:function(Ce,dr){this._context.moveTo(dr,Ce)},closePath:function(){this._context.closePath()},lineTo:function(Ce,dr){this._context.lineTo(dr,Ce)},bezierCurveTo:function(Ce,dr,Hr,_n,Fn,Qn){this._context.bezierCurveTo(dr,Ce,_n,Hr,Qn,Fn)}};function nr(Ce){return new sa(Ce)}function fr(Ce){return new Zi(Ce)}function _r(Ce){this._context=Ce}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ce=this._x,dr=this._y,Hr=Ce.length;if(Hr)if(this._line?this._context.lineTo(Ce[0],dr[0]):this._context.moveTo(Ce[0],dr[0]),Hr===2)this._context.lineTo(Ce[1],dr[1]);else for(var _n=tn(Ce),Fn=tn(dr),Qn=0,Pn=1;Pn=0;--dr)Fn[dr]=(Pn[dr]-Fn[dr+1])/Qn[dr];for(Qn[Hr-1]=(Ce[Hr]+Fn[Hr-1])/2,dr=0;dr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,dr),this._context.lineTo(Ce,dr);else{var Hr=this._x*(1-this._t)+Ce*this._t;this._context.lineTo(Hr,this._y),this._context.lineTo(Hr,dr)}break}}this._x=Ce,this._y=dr}};function Mn(Ce){return new Tn(Ce,.5)}function fi(Ce){return new Tn(Ce,0)}function ki(Ce){return new Tn(Ce,1)}function Oi(Ce,dr){if((Pn=Ce.length)>1)for(var Hr=1,_n,Fn,Qn=Ce[dr[0]],Pn,En=Qn.length;Hr=0;)Hr[dr]=dr;return Hr}function Xi(Ce,dr){return Ce[dr]}function ci(){var Ce=I([]),dr=ji,Hr=Oi,_n=Xi;function Fn(Qn){var Pn=Ce.apply(this,arguments),En,Zn=Qn.length,La=Pn.length,Vi=new Array(La),Qa;for(En=0;En0){for(var Hr,_n,Fn=0,Qn=Ce[0].length,Pn;Fn0)for(var Hr,_n=0,Fn,Qn,Pn,En,Zn,La=Ce[dr[0]].length;_n0?(Fn[0]=Pn,Fn[1]=Pn+=Qn):Qn<0?(Fn[1]=En,Fn[0]=En+=Qn):(Fn[0]=0,Fn[1]=Qn)}function ze(Ce,dr){if((Fn=Ce.length)>0){for(var Hr=0,_n=Ce[dr[0]],Fn,Qn=_n.length;Hr0)||!((Qn=(Fn=Ce[dr[0]]).length)>0))){for(var Hr=0,_n=1,Fn,Qn,Pn;_nQn&&(Qn=Fn,Hr=dr);return Hr}function Gr(Ce){var dr=Ce.map(Br);return ji(Ce).sort(function(Hr,_n){return dr[Hr]-dr[_n]})}function Br(Ce){for(var dr=0,Hr=-1,_n=Ce.length,Fn;++Hr<_n;)(Fn=+Ce[Hr][1])&&(dr+=Fn);return dr}function Yr(Ce){return Gr(Ce).reverse()}function pn(Ce){var dr=Ce.length,Hr,_n,Fn=Ce.map(Br),Qn=Rr(Ce),Pn=0,En=0,Zn=[],La=[];for(Hr=0;Hr{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3(),MT(),FE()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3)})(Q,function(c,g,I,S){function t(p){return p.target.depth}function e(p){return p.depth}function r(p,k){return k-1-p.height}function a(p,k){return p.sourceLinks.length?p.depth:k-1}function n(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?g.min(p.sourceLinks,t)-1:0}function o(p){return function(){return p}}function i(p,k){return f(p.source,k.source)||p.index-k.index}function l(p,k){return f(p.target,k.target)||p.index-k.index}function f(p,k){return p.y0-k.y0}function x(p){return p.value}function y(p){return(p.y0+p.y1)/2}function v(p){return y(p.source)*p.value}function T(p){return y(p.target)*p.value}function u(p){return p.index}function b(p){return p.nodes}function _(p){return p.links}function P(p,k){var w=p.get(k);if(!w)throw new Error("missing: "+k);return w}var M=function(){var p=0,k=0,w=1,R=1,O=24,j=8,V=u,H=a,F=b,U=_,W=32,q=2/3;function J(){var dt={nodes:F.apply(null,arguments),links:U.apply(null,arguments)};return lt(dt),yt(dt),mt(dt),st(dt),tt(dt),dt}J.update=function(dt){return tt(dt),dt},J.nodeId=function(dt){return arguments.length?(V=typeof dt=="function"?dt:o(dt),J):V},J.nodeAlign=function(dt){return arguments.length?(H=typeof dt=="function"?dt:o(dt),J):H},J.nodeWidth=function(dt){return arguments.length?(O=+dt,J):O},J.nodePadding=function(dt){return arguments.length?(j=+dt,J):j},J.nodes=function(dt){return arguments.length?(F=typeof dt=="function"?dt:o(dt),J):F},J.links=function(dt){return arguments.length?(U=typeof dt=="function"?dt:o(dt),J):U},J.size=function(dt){return arguments.length?(p=k=0,w=+dt[0],R=+dt[1],J):[w-p,R-k]},J.extent=function(dt){return arguments.length?(p=+dt[0][0],w=+dt[1][0],k=+dt[0][1],R=+dt[1][1],J):[[p,k],[w,R]]},J.iterations=function(dt){return arguments.length?(W=+dt,J):W};function lt(dt){dt.nodes.forEach(function(at,vt){at.index=vt,at.sourceLinks=[],at.targetLinks=[]});var rt=I.map(dt.nodes,V);dt.links.forEach(function(at,vt){at.index=vt;var it=at.source,Y=at.target;typeof it!="object"&&(it=at.source=P(rt,it)),typeof Y!="object"&&(Y=at.target=P(rt,Y)),it.sourceLinks.push(at),Y.targetLinks.push(at)})}function yt(dt){dt.nodes.forEach(function(rt){rt.value=Math.max(g.sum(rt.sourceLinks,x),g.sum(rt.targetLinks,x))})}function mt(dt){var rt,at,vt;for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.depth=vt,Y.sourceLinks.forEach(function(ft){at.indexOf(ft.target)<0&&at.push(ft.target)})});for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.height=vt,Y.targetLinks.forEach(function(ft){at.indexOf(ft.source)<0&&at.push(ft.source)})});var it=(w-p-O)/(vt-1);dt.nodes.forEach(function(Y){Y.x1=(Y.x0=p+Math.max(0,Math.min(vt-1,Math.floor(H.call(null,Y,vt))))*it)+O})}function st(dt){var rt=I.nest().key(function(kt){return kt.x0}).sortKeys(g.ascending).entries(dt.nodes).map(function(kt){return kt.values});it(),ut();for(var at=1,vt=W;vt>0;--vt)ft(at*=.99),ut(),Y(at),ut();function it(){var kt=g.max(rt,function(qt){return qt.length}),It=q*(R-k)/(kt-1);j>It&&(j=It);var Pt=g.min(rt,function(qt){return(R-k-(qt.length-1)*j)/g.sum(qt,x)});rt.forEach(function(qt){qt.forEach(function(Wt,Jt){Wt.y1=(Wt.y0=Jt)+Wt.value*Pt})}),dt.links.forEach(function(qt){qt.width=qt.value*Pt})}function Y(kt){rt.forEach(function(It){It.forEach(function(Pt){if(Pt.targetLinks.length){var qt=(g.sum(Pt.targetLinks,v)/g.sum(Pt.targetLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ft(kt){rt.slice().reverse().forEach(function(It){It.forEach(function(Pt){if(Pt.sourceLinks.length){var qt=(g.sum(Pt.sourceLinks,T)/g.sum(Pt.sourceLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ut(){rt.forEach(function(kt){var It,Pt,qt=k,Wt=kt.length,Jt;for(kt.sort(f),Jt=0;Jt0&&(It.y0+=Pt,It.y1+=Pt),qt=It.y1+j;if(Pt=qt-j-R,Pt>0)for(qt=It.y0-=Pt,It.y1-=Pt,Jt=Wt-2;Jt>=0;--Jt)It=kt[Jt],Pt=It.y1+j-qt,Pt>0&&(It.y0-=Pt,It.y1-=Pt),qt=It.y0})}}function tt(dt){dt.nodes.forEach(function(rt){rt.sourceLinks.sort(l),rt.targetLinks.sort(i)}),dt.nodes.forEach(function(rt){var at=rt.y0,vt=at;rt.sourceLinks.forEach(function(it){it.y0=at+it.width/2,at+=it.width}),rt.targetLinks.forEach(function(it){it.y1=vt+it.width/2,vt+=it.width})})}return J};function C(p){return[p.source.x1,p.y0]}function A(p){return[p.target.x0,p.y1]}var h=function(){return S.linkHorizontal().source(C).target(A)};c.sankey=M,c.sankeyCenter=n,c.sankeyLeft=e,c.sankeyRight=r,c.sankeyJustify=a,c.sankeyLinkHorizontal=h,Object.defineProperty(c,"__esModule",{value:!0})})}),kq=Dt((Q,Z)=>{var c=DE();Z.exports=function(g,I){var S=[],t=[],e=[],r={},a=[],n;function o(_){e[_]=!1,r.hasOwnProperty(_)&&Object.keys(r[_]).forEach(function(P){delete r[_][P],e[P]&&o(P)})}function i(_){var P=!1;t.push(_),e[_]=!0;var M,C;for(M=0;M=_})}function x(_){f(_);for(var P=g,M=c(P),C=M.components.filter(function(O){return O.length>1}),A=1/0,h,p=0;p{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3(),MT(),FE(),kq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,null)})(Q,function(c,g,I,S,t){t=t&&t.hasOwnProperty("default")?t.default:t;function e(Wt){return Wt.target.depth}function r(Wt){return Wt.depth}function a(Wt,Jt){return Jt-1-Wt.height}function n(Wt,Jt){return Wt.sourceLinks.length?Wt.depth:Jt-1}function o(Wt){return Wt.targetLinks.length?Wt.depth:Wt.sourceLinks.length?g.min(Wt.sourceLinks,e)-1:0}function i(Wt){return function(){return Wt}}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Wt){return typeof Wt}:function(Wt){return Wt&&typeof Symbol=="function"&&Wt.constructor===Symbol&&Wt!==Symbol.prototype?"symbol":typeof Wt};function f(Wt,Jt){return y(Wt.source,Jt.source)||Wt.index-Jt.index}function x(Wt,Jt){return y(Wt.target,Jt.target)||Wt.index-Jt.index}function y(Wt,Jt){return Wt.partOfCycle===Jt.partOfCycle?Wt.y0-Jt.y0:Wt.circularLinkType==="top"||Jt.circularLinkType==="bottom"?-1:1}function v(Wt){return Wt.value}function T(Wt){return(Wt.y0+Wt.y1)/2}function u(Wt){return T(Wt.source)}function b(Wt){return T(Wt.target)}function _(Wt){return Wt.index}function P(Wt){return Wt.nodes}function M(Wt){return Wt.links}function C(Wt,Jt){var ge=Wt.get(Jt);if(!ge)throw new Error("missing: "+Jt);return ge}function A(Wt,Jt){return Jt(Wt)}var h=25,p=10,k=.3;function w(){var Wt=0,Jt=0,ge=1,fe=1,pe=24,se,Tt=_,Lt=n,Mt=P,ee=M,ve=32,oe=2,Te,He=null;function Ge(){var Le={nodes:Mt.apply(null,arguments),links:ee.apply(null,arguments)};cr(Le),R(Le,Tt,He),ur(Le),br(Le),O(Le,Tt),Xr(Le,ve,Tt),nn(Le);for(var Gt=4,ne=0;ne"u"?"undefined":l(gt))!=="object"&&(gt=ne.source=C(Gt,gt)),(typeof St>"u"?"undefined":l(St))!=="object"&&(St=ne.target=C(Gt,St)),gt.sourceLinks.push(ne),St.targetLinks.push(ne)}),Le}function ur(Le){Le.nodes.forEach(function(Gt){Gt.partOfCycle=!1,Gt.value=Math.max(g.sum(Gt.sourceLinks,v),g.sum(Gt.targetLinks,v)),Gt.sourceLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)}),Gt.targetLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)})})}function jr(Le){var Gt=0,ne=0,Ct=0,gt=0,St=g.max(Le.nodes,function(Nt){return Nt.column});return Le.links.forEach(function(Nt){Nt.circular&&(Nt.circularLinkType=="top"?Gt=Gt+Nt.width:ne=ne+Nt.width,Nt.target.column==0&&(gt=gt+Nt.width),Nt.source.column==St&&(Ct=Ct+Nt.width))}),Gt=Gt>0?Gt+h+p:Gt,ne=ne>0?ne+h+p:ne,Ct=Ct>0?Ct+h+p:Ct,gt=gt>0?gt+h+p:gt,{top:Gt,bottom:ne,left:gt,right:Ct}}function Wr(Le,Gt){var ne=g.max(Le.nodes,function(we){return we.column}),Ct=ge-Wt,gt=fe-Jt,St=Ct+Gt.right+Gt.left,Nt=gt+Gt.top+Gt.bottom,re=Ct/St,le=gt/Nt;return Wt=Wt*re+Gt.left,ge=Gt.right==0?ge:ge*re,Jt=Jt*le+Gt.top,fe=fe*le,Le.nodes.forEach(function(we){we.x0=Wt+we.column*((ge-Wt-pe)/ne),we.x1=we.x0+pe}),le}function br(Le){var Gt,ne,Ct;for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.depth=Ct,gt.sourceLinks.forEach(function(St){ne.indexOf(St.target)<0&&!St.circular&&ne.push(St.target)})});for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.height=Ct,gt.targetLinks.forEach(function(St){ne.indexOf(St.source)<0&&!St.circular&&ne.push(St.source)})});Le.nodes.forEach(function(gt){gt.column=Math.floor(Lt.call(null,gt,Ct))})}function Xr(Le,Gt,ne){var Ct=I.nest().key(function(we){return we.column}).sortKeys(g.ascending).entries(Le.nodes).map(function(we){return we.values});Nt(ne),le();for(var gt=1,St=Gt;St>0;--St)re(gt*=.99,ne),le();function Nt(we){if(Te){var Ue=1/0;Ct.forEach(function(Ar){var mr=fe*Te/(Ar.length+1);Ue=mr0))if(Ar==0&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else if(Ar==qe-1&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else{var Hn=0,Wn=g.mean(mr.sourceLinks,b),Xn=g.mean(mr.targetLinks,u);Wn&&Xn?Hn=(Wn+Xn)/2:Hn=Wn||Xn;var Ii=(Hn-T(mr))*we;mr.y0+=Ii,mr.y1+=Ii}})})}function le(){Ct.forEach(function(we){var Ue,qe,or=Jt,Sr=we.length,Ar;for(we.sort(y),Ar=0;Ar0&&(Ue.y0+=qe,Ue.y1+=qe),or=Ue.y1+se;if(qe=or-se-fe,qe>0)for(or=Ue.y0-=qe,Ue.y1-=qe,Ar=Sr-2;Ar>=0;--Ar)Ue=we[Ar],qe=Ue.y1+se-or,qe>0&&(Ue.y0-=qe,Ue.y1-=qe),or=Ue.y0})}}function nn(Le){Le.nodes.forEach(function(Gt){Gt.sourceLinks.sort(x),Gt.targetLinks.sort(f)}),Le.nodes.forEach(function(Gt){var ne=Gt.y0,Ct=ne,gt=Gt.y1,St=gt;Gt.sourceLinks.forEach(function(Nt){Nt.circular?(Nt.y0=gt-Nt.width/2,gt=gt-Nt.width):(Nt.y0=ne+Nt.width/2,ne+=Nt.width)}),Gt.targetLinks.forEach(function(Nt){Nt.circular?(Nt.y1=St-Nt.width/2,St=St-Nt.width):(Nt.y1=Ct+Nt.width/2,Ct+=Nt.width)})})}return Ge}function R(Wt,Jt,ge){var fe=0;if(ge===null){for(var pe=[],se=0;seJt.source.column)}function H(Wt,Jt){var ge=0;Wt.sourceLinks.forEach(function(pe){ge=pe.circular&&!Pt(pe,Jt)?ge+1:ge});var fe=0;return Wt.targetLinks.forEach(function(pe){fe=pe.circular&&!Pt(pe,Jt)?fe+1:fe}),ge+fe}function F(Wt){var Jt=Wt.source.sourceLinks,ge=0;Jt.forEach(function(se){ge=se.circular?ge+1:ge});var fe=Wt.target.targetLinks,pe=0;return fe.forEach(function(se){pe=se.circular?pe+1:pe}),!(ge>1||pe>1)}function U(Wt,Jt,ge){return Wt.sort(J),Wt.forEach(function(fe,pe){var se=0;if(Pt(fe,ge)&&F(fe))fe.circularPathData.verticalBuffer=se+fe.width/2;else{var Tt=0;for(Tt;Ttse?Lt:se}fe.circularPathData.verticalBuffer=se+fe.width/2}}),Wt}function W(Wt,Jt,ge,fe){var pe=5,se=g.min(Wt.links,function(Mt){return Mt.source.y0});Wt.links.forEach(function(Mt){Mt.circular&&(Mt.circularPathData={})});var Tt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="top"});U(Tt,Jt,fe);var Lt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="bottom"});U(Lt,Jt,fe),Wt.links.forEach(function(Mt){if(Mt.circular){if(Mt.circularPathData.arcRadius=Mt.width+p,Mt.circularPathData.leftNodeBuffer=pe,Mt.circularPathData.rightNodeBuffer=pe,Mt.circularPathData.sourceWidth=Mt.source.x1-Mt.source.x0,Mt.circularPathData.sourceX=Mt.source.x0+Mt.circularPathData.sourceWidth,Mt.circularPathData.targetX=Mt.target.x0,Mt.circularPathData.sourceY=Mt.y0,Mt.circularPathData.targetY=Mt.y1,Pt(Mt,fe)&&F(Mt))Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2,Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2,Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Mt.source.y1+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=Mt.source.y0-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius);else{var ee=Mt.source.column,ve=Mt.circularLinkType,oe=Wt.links.filter(function(Ge){return Ge.source.column==ee&&Ge.circularLinkType==ve});Mt.circularLinkType=="bottom"?oe.sort(yt):oe.sort(lt);var Te=0;oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),ee=Mt.target.column,oe=Wt.links.filter(function(Ge){return Ge.target.column==ee&&Ge.circularLinkType==ve}),Mt.circularLinkType=="bottom"?oe.sort(st):oe.sort(mt),Te=0,oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Math.max(ge,Mt.source.y1,Mt.target.y1)+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=se-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius)}Mt.circularPathData.leftInnerExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightInnerExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightNodeBuffer,Mt.circularPathData.leftFullExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftLargeArcRadius+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightFullExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightLargeArcRadius-Mt.circularPathData.rightNodeBuffer}if(Mt.circular)Mt.path=q(Mt);else{var He=S.linkHorizontal().source(function(Ge){var cr=Ge.source.x0+(Ge.source.x1-Ge.source.x0),ur=Ge.y0;return[cr,ur]}).target(function(Ge){var cr=Ge.target.x0,ur=Ge.y1;return[cr,ur]});Mt.path=He(Mt)}})}function q(Wt){var Jt="";return Wt.circularLinkType=="top"?Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY-Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY-Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY:Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY+Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY+Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY,Jt}function J(Wt,Jt){return tt(Wt)==tt(Jt)?Wt.circularLinkType=="bottom"?yt(Wt,Jt):lt(Wt,Jt):tt(Jt)-tt(Wt)}function lt(Wt,Jt){return Wt.y0-Jt.y0}function yt(Wt,Jt){return Jt.y0-Wt.y0}function mt(Wt,Jt){return Wt.y1-Jt.y1}function st(Wt,Jt){return Jt.y1-Wt.y1}function tt(Wt){return Wt.target.column-Wt.source.column}function dt(Wt){return Wt.target.x0-Wt.source.x1}function rt(Wt,Jt){var ge=j(Wt),fe=dt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1+fe:Wt.y1-fe;return pe}function at(Wt,Jt){var ge=j(Wt),fe=dt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1-fe:Wt.y1+fe;return pe}function vt(Wt,Jt,ge,fe){Wt.links.forEach(function(pe){if(!pe.circular&&pe.target.column-pe.source.column>1){var se=pe.source.column+1,Tt=pe.target.column-1,Lt=1,Mt=Tt-se+1;for(Lt=1;se<=Tt;se++,Lt++)Wt.nodes.forEach(function(ee){if(ee.column==se){var ve=Lt/(Mt+1),oe=Math.pow(1-ve,3),Te=3*ve*Math.pow(1-ve,2),He=3*Math.pow(ve,2)*(1-ve),Ge=Math.pow(ve,3),cr=oe*pe.y0+Te*pe.y0+He*pe.y1+Ge*pe.y1,ur=cr-pe.width/2,jr=cr+pe.width/2,Wr;ur>ee.y0&&uree.y0&&jree.y1&&Y(br,Wr,Jt,ge)})):uree.y1&&(Wr=jr-ee.y0+10,ee=Y(ee,Wr,Jt,ge),Wt.nodes.forEach(function(br){A(br,fe)==A(ee,fe)||br.column!=ee.column||br.y0ee.y1&&Y(br,Wr,Jt,ge)}))}})}})}function it(Wt,Jt){return Wt.y0>Jt.y0&&Wt.y0Jt.y0&&Wt.y1Jt.y1}function Y(Wt,Jt,ge,fe){return Wt.y0+Jt>=ge&&Wt.y1+Jt<=fe&&(Wt.y0=Wt.y0+Jt,Wt.y1=Wt.y1+Jt,Wt.targetLinks.forEach(function(pe){pe.y1=pe.y1+Jt}),Wt.sourceLinks.forEach(function(pe){pe.y0=pe.y0+Jt})),Wt}function ft(Wt,Jt,ge,fe){Wt.nodes.forEach(function(pe){fe&&pe.y+(pe.y1-pe.y0)>Jt&&(pe.y=pe.y-(pe.y+(pe.y1-pe.y0)-Jt));var se=Wt.links.filter(function(Mt){return A(Mt.source,ge)==A(pe,ge)}),Tt=se.length;Tt>1&&se.sort(function(Mt,ee){if(!Mt.circular&&!ee.circular){if(Mt.target.column==ee.target.column)return Mt.y1-ee.y1;if(kt(Mt,ee)){if(Mt.target.column>ee.target.column){var ve=at(ee,Mt);return Mt.y1-ve}if(ee.target.column>Mt.target.column){var oe=at(Mt,ee);return oe-ee.y1}}else return Mt.y1-ee.y1}if(Mt.circular&&!ee.circular)return Mt.circularLinkType=="top"?-1:1;if(ee.circular&&!Mt.circular)return ee.circularLinkType=="top"?1:-1;if(Mt.circular&&ee.circular)return Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="top"?Mt.target.column===ee.target.column?Mt.target.y1-ee.target.y1:ee.target.column-Mt.target.column:Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="bottom"?Mt.target.column===ee.target.column?ee.target.y1-Mt.target.y1:Mt.target.column-ee.target.column:Mt.circularLinkType=="top"?-1:1});var Lt=pe.y0;se.forEach(function(Mt){Mt.y0=Lt+Mt.width/2,Lt=Lt+Mt.width}),se.forEach(function(Mt,ee){if(Mt.circularLinkType=="bottom"){var ve=ee+1,oe=0;for(ve;ve1&&pe.sort(function(Lt,Mt){if(!Lt.circular&&!Mt.circular){if(Lt.source.column==Mt.source.column)return Lt.y0-Mt.y0;if(kt(Lt,Mt)){if(Mt.source.column0?"up":"down"}function Pt(Wt,Jt){return A(Wt.source,Jt)==A(Wt.target,Jt)}function qt(Wt,Jt,ge){var fe=Wt.nodes,pe=Wt.links,se=!1,Tt=!1;if(pe.forEach(function(Te){Te.circularLinkType=="top"?se=!0:Te.circularLinkType=="bottom"&&(Tt=!0)}),se==!1||Tt==!1){var Lt=g.min(fe,function(Te){return Te.y0}),Mt=g.max(fe,function(Te){return Te.y1}),ee=Mt-Lt,ve=ge-Jt,oe=ve/ee;fe.forEach(function(Te){var He=(Te.y1-Te.y0)*oe;Te.y0=(Te.y0-Lt)*oe,Te.y1=Te.y0+He}),pe.forEach(function(Te){Te.y0=(Te.y0-Lt)*oe,Te.y1=(Te.y1-Lt)*oe,Te.width=Te.width*oe})}}c.sankeyCircular=w,c.sankeyCenter=o,c.sankeyLeft=r,c.sankeyRight=a,c.sankeyJustify=n,Object.defineProperty(c,"__esModule",{value:!0})})}),RE=Dt((Q,Z)=>{Z.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"}}}),Aq=Dt((Q,Z)=>{var c=_q(),g=(mx(),ni(j1)).interpolateNumber,I=qr(),S=wq(),t=Tq(),e=RE(),r=ro(),a=hi(),n=Vs(),o=kn(),i=o.strTranslate,l=o.strRotate,f=zg(),x=f.keyFun,y=f.repeat,v=f.unwrap,T=ec(),u=Jo(),b=Af(),_=b.CAP_SHIFT,P=b.LINE_SPACING,M=3;function C(rt,at,vt){var it=v(at),Y=it.trace,ft=Y.domain,ut=Y.orientation==="h",kt=Y.node.pad,It=Y.node.thickness,Pt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[Y.node.align],qt=rt.width*(ft.x[1]-ft.x[0]),Wt=rt.height*(ft.y[1]-ft.y[0]),Jt=it._nodes,ge=it._links,fe=it.circular,pe;fe?pe=t.sankeyCircular().circularLinkGap(0):pe=S.sankey(),pe.iterations(e.sankeyIterations).size(ut?[qt,Wt]:[Wt,qt]).nodeWidth(It).nodePadding(kt).nodeId(function(br){return br.pointNumber}).nodeAlign(Pt).nodes(Jt).links(ge);var se=pe();pe.nodePadding()=Gt||(Le=Gt-nn.y0,Le>1e-6&&(nn.y0+=Le,nn.y1+=Le)),Gt=nn.y1+kt})}function cr(br){var Xr=br.map(function(St,Nt){return{x0:St.x0,index:Nt}}).sort(function(St,Nt){return St.x0-Nt.x0}),nn=[],Le=-1,Gt,ne=-1/0,Ct;for(Tt=0;Ttne+It&&(Le+=1,Gt=gt.x0),ne=gt.x0,nn[Le]||(nn[Le]=[]),nn[Le].push(gt),Ct=Gt-gt.x0,gt.x0+=Ct,gt.x1+=Ct}return nn}if(Y.node.x.length&&Y.node.y.length){for(Tt=0;Tt0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(vt="M "+(Y.targetX-at)+" "+(Y.targetY-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.targetY-it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightSmallArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent-it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-it-at)+" "+Y.verticalRightInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-it-at)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent+it-at-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent-at-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.leftFullExtent+it+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent+it)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+it)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent,vt+=" L "+(Y.leftFullExtent+it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftSmallArcRadius+it)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY+it)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+it)+" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-it)+" "+Y.verticalLeftInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightFullExtent+it-at+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent-at-it)+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:vt+=" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftLargeArcRadius-it)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightLargeArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent,vt+=" L "+(Y.rightFullExtent+it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightInnerExtent-at)+" "+(Y.targetY+it)+" L "+(Y.targetX-at)+" "+(Y.targetY+it)+(at>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),vt}function p(){var rt=.5;function at(vt){var it=vt.linkArrowLength;if(vt.link.circular)return h(vt.link,it);var Y=Math.abs((vt.link.target.x0-vt.link.source.x1)/2);it>Y&&(it=Y);var ft=vt.link.source.x1,ut=vt.link.target.x0-it,kt=g(ft,ut),It=kt(rt),Pt=kt(1-rt),qt=vt.link.y0-vt.link.width/2,Wt=vt.link.y0+vt.link.width/2,Jt=vt.link.y1-vt.link.width/2,ge=vt.link.y1+vt.link.width/2,fe="M"+ft+","+qt,pe="C"+It+","+qt+" "+Pt+","+Jt+" "+ut+","+Jt,se="C"+Pt+","+ge+" "+It+","+Wt+" "+ft+","+Wt,Tt=it>0?"L"+(ut+it)+","+(Jt+vt.link.width/2):"";return Tt+="L"+ut+","+ge,fe+pe+Tt+se+"Z"}return at}function k(rt,at){var vt=r(at.color),it=e.nodePadAcross,Y=rt.nodePad/2;at.dx=at.x1-at.x0,at.dy=at.y1-at.y0;var ft=at.dx,ut=Math.max(.5,at.dy),kt="node_"+at.pointNumber;return at.group&&(kt=o.randstr()),at.trace=rt.trace,at.curveNumber=rt.trace.index,{index:at.pointNumber,key:kt,partOfGroup:at.partOfGroup||!1,group:at.group,traceId:rt.key,trace:rt.trace,node:at,nodePad:rt.nodePad,nodeLineColor:rt.nodeLineColor,nodeLineWidth:rt.nodeLineWidth,textFont:rt.textFont,size:rt.horizontal?rt.height:rt.width,visibleWidth:Math.ceil(ft),visibleHeight:ut,zoneX:-it,zoneY:-Y,zoneWidth:ft+2*it,zoneHeight:ut+2*Y,labelY:rt.horizontal?at.dy/2+1:at.dx/2+1,left:at.originalLayer===1,sizeAcross:rt.width,forceLayouts:rt.forceLayouts,horizontal:rt.horizontal,darkBackground:vt.getBrightness()<=128,tinyColorHue:a.tinyRGB(vt),tinyColorAlpha:vt.getAlpha(),valueFormat:rt.valueFormat,valueSuffix:rt.valueSuffix,sankey:rt.sankey,graph:rt.graph,arrangement:rt.arrangement,uniqueNodeLabelPathId:[rt.guid,rt.key,kt].join("_"),interactionState:rt.interactionState,figure:rt}}function w(rt){rt.attr("transform",function(at){return i(at.node.x0.toFixed(3),at.node.y0.toFixed(3))})}function R(rt){rt.call(w)}function O(rt,at){rt.call(R),at.attr("d",p())}function j(rt){rt.attr("width",function(at){return at.node.x1-at.node.x0}).attr("height",function(at){return at.visibleHeight})}function V(rt){return rt.link.width>1||rt.linkLineWidth>0}function H(rt){var at=i(rt.translateX,rt.translateY);return at+(rt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(rt,at,vt){rt.on(".basic",null).on("mouseover.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.hover(this,it,at),it.interactionState.hovered=[this,it])}).on("mousemove.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.follow(this,it),it.interactionState.hovered=[this,it])}).on("mouseout.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.unhover(this,it,at),it.interactionState.hovered=!1)}).on("click.basic",function(it){it.interactionState.hovered&&(vt.unhover(this,it,at),it.interactionState.hovered=!1),!it.interactionState.dragInProgress&&!it.partOfGroup&&vt.select(this,it,at)})}function U(rt,at,vt,it){var Y=I.behavior.drag().origin(function(ft){return{x:ft.node.x0+ft.visibleWidth/2,y:ft.node.y0+ft.visibleHeight/2}}).on("dragstart",function(ft){if(ft.arrangement!=="fixed"&&(o.ensureSingle(it._fullLayout._infolayer,"g","dragcover",function(kt){it._fullLayout._dragCover=kt}),o.raiseToTop(this),ft.interactionState.dragInProgress=ft.node,mt(ft.node),ft.interactionState.hovered&&(vt.nodeEvents.unhover.apply(0,ft.interactionState.hovered),ft.interactionState.hovered=!1),ft.arrangement==="snap")){var ut=ft.traceId+"|"+ft.key;ft.forceLayouts[ut]?ft.forceLayouts[ut].alpha(1):W(rt,ut,ft),q(rt,at,ft,ut,it)}}).on("drag",function(ft){if(ft.arrangement!=="fixed"){var ut=I.event.x,kt=I.event.y;ft.arrangement==="snap"?(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2,ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2):(ft.arrangement==="freeform"&&(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2),kt=Math.max(0,Math.min(ft.size-ft.visibleHeight/2,kt)),ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2),mt(ft.node),ft.arrangement!=="snap"&&(ft.sankey.update(ft.graph),O(rt.filter(st(ft)),at))}}).on("dragend",function(ft){if(ft.arrangement!=="fixed"){ft.interactionState.dragInProgress=!1;for(var ut=0;ut0)window.requestAnimationFrame(ft);else{var It=vt.node.originalX;vt.node.x0=It-vt.visibleWidth/2,vt.node.x1=It+vt.visibleWidth/2,lt(vt,Y)}})}function J(rt,at,vt,it){return function(){for(var Y=0,ft=0;ft0&&it.forceLayouts[at].alpha(0)}}function lt(rt,at){for(var vt=[],it=[],Y=0;Y{var c=qr(),g=kn(),I=g.numberFormat,S=Aq(),t=tf(),e=hi(),r=RE().cn,a=g._;function n(_){return _!==""}function o(_,P){return _.filter(function(M){return M.key===P.traceId})}function i(_,P){c.select(_).select("path").style("fill-opacity",P),c.select(_).select("rect").style("fill-opacity",P)}function l(_){c.select(_).select("text.name").style("fill","black")}function f(_){return function(P){return _.node.sourceLinks.indexOf(P.link)!==-1||_.node.targetLinks.indexOf(P.link)!==-1}}function x(_){return function(P){return P.node.sourceLinks.indexOf(_.link)!==-1||P.node.targetLinks.indexOf(_.link)!==-1}}function y(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(T.bind(0,P,M,!1))}function v(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(u.bind(0,P,M,!1))}function T(_,P,M,C){C.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha})}),M&&o(P,_).selectAll("."+r.sankeyNode).filter(x(_)).call(y)}function u(_,P,M,C){C.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha})}),M&&o(P,_).selectAll(r.sankeyNode).filter(x(_)).call(v)}function b(_,P){var M=_.hoverlabel||{},C=g.nestedProperty(M,P).get();return Array.isArray(C)?!1:C}Z.exports=function(_,P){for(var M=_._fullLayout,C=M._paper,A=M._size,h=0;h<_._fullData.length;h++)if(_._fullData[h].visible&&_._fullData[h].type===r.sankey&&!_._fullData[h]._viewInitial){var p=_._fullData[h].node;_._fullData[h]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var k=function(yt,mt){var st=mt.link;st.originalEvent=c.event,_._hoverdata=[st],t.click(_,{target:!0})},w=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(T.bind(0,mt,st,!0)),mt.link.trace.link.hoverinfo!=="skip"&&(mt.link.fullData=mt.link.trace,_.emit("plotly_hover",{event:c.event,points:[mt.link]})))},R=a(_,"source:")+" ",O=a(_,"target:")+" ",j=a(_,"concentration:")+" ",V=a(_,"incoming flow count:")+" ",H=a(_,"outgoing flow count:")+" ",F=function(yt,mt){if(_._fullLayout.hovermode===!1)return;var st=mt.link.trace.link;if(st.hoverinfo==="none"||st.hoverinfo==="skip")return;var tt=[];function dt(ut){var kt,It;ut.circular?(kt=(ut.circularPathData.leftInnerExtent+ut.circularPathData.rightInnerExtent)/2,It=ut.circularPathData.verticalFullExtent):(kt=(ut.source.x1+ut.target.x0)/2,It=(ut.y0+ut.y1)/2);var Pt=[kt,It];return ut.trace.orientation==="v"&&Pt.reverse(),Pt[0]+=mt.parent.translateX,Pt[1]+=mt.parent.translateY,Pt}for(var rt=0,at=0;at"),color:b(st,"bgcolor")||e.addOpacity(vt.color,1),borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:c.event.x"),color:b(st,"bgcolor")||mt.tinyColorHue,borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:"left",hovertemplate:st.hovertemplate,hovertemplateLabels:Y,eventData:[mt.node]},{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:_});i(kt,.85),l(kt)}}},lt=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(v,mt,st),mt.node.trace.node.hoverinfo!=="skip"&&(mt.node.fullData=mt.node.trace,_.emit("plotly_unhover",{event:c.event,points:[mt.node]})),t.loneUnhover(M._hoverlayer.node()))};S(_,C,P,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{linkEvents:{hover:w,follow:F,unhover:U,select:k},nodeEvents:{hover:q,follow:J,unhover:lt,select:W}})}}),Mq=Dt(Q=>{var Z=Yc().overrideAll,c=ud().getModuleCalcData,g=BE(),I=po(),S=P0(),t=up(),e=vf().prepSelect,r=kn(),a=Jo(),n="sankey";Q.name=n,Q.baseLayoutAttrOverrides=Z({hoverlabel:I.hoverlabel},"plot","nested"),Q.plot=function(i){var l=c(i.calcdata,n)[0];g(i,l),Q.updateFx(i)},Q.clean=function(i,l,f,x){var y=x._has&&x._has(n),v=l._has&&l._has(n);y&&!v&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},Q.updateFx=function(i){for(var l=0;l{Z.exports=function(c,g){for(var I=c.cd,S=[],t=I[0].trace,e=t._sankey.graph.nodes,r=0;r{Z.exports={attributes:OE(),supplyDefaults:mq(),calc:gq(),plot:BE(),moduleType:"trace",name:"sankey",basePlotModule:Mq(),selectPoints:Sq(),categories:["noOpacity"],meta:{}}}),Cq=Dt((Q,Z)=>{Z.exports=Eq()}),Lq=Dt(Q=>{var Z=Kc();Q.name="indicator",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),NE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Ia().extendDeep,I=Yc().overrideAll,S=da(),t=wi(),e=jh().attributes,r=Td(),a=mu().templatedArray,n=rb(),o=dh().descriptionOnlyNumbers,i=S({editType:"plot",colorEditType:"plot"}),l={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.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"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=a("step",g({},l,{range:f}));Z.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:e({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:c({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:o("value")},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:o("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},l,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:I({range:f,visible:c({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:c({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:S({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:c({},l.line.color,{}),width:c({},l.line.width,{dflt:1}),editType:"plot"},thickness:c({},l.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}),jE=Dt((Q,Z)=>{Z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}),Pq=Dt((Q,Z)=>{var c=kn(),g=NE(),I=jh().defaults,S=mu(),t=Ad(),e=jE(),r=yg(),a=xg(),n=n0(),o=dm();function i(f,x,y,v){function T(U,W){return c.coerce(f,x,g,U,W)}I(x,v,T),T("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var u=T("value");x._range=[0,typeof u=="number"?1.5*u:1];var b=new Array(2),_;if(x._hasNumber){T("number.valueformat");var P=c.extendFlat({},v.font);P.size=void 0,c.coerceFont(T,"number.font",P),x.number.font.size===void 0&&(x.number.font.size=e.defaultNumberFontSize,b[0]=!0),T("number.prefix"),T("number.suffix"),_=x.number.font.size}var M;if(x._hasDelta){var C=c.extendFlat({},v.font);C.size=void 0,c.coerceFont(T,"delta.font",C),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(_||e.defaultNumberFontSize),b[1]=!0),T("delta.reference",x.value),T("delta.relative"),T("delta.valueformat",x.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||b[0])&&(!x._hasDelta||b[1])||!1;var A=c.extendFlat({},v.font);A.size=.25*(_||M||e.defaultNumberFontSize),c.coerceFont(T,"title.font",A),T("title.text");var h,p,k,w;function R(U,W){return c.coerce(h,p,g.gauge,U,W)}function O(U,W){return c.coerce(k,w,g.gauge.axis,U,W)}if(x._hasGauge){h=f.gauge,h||(h={}),p=S.newContainer(x,"gauge"),R("shape");var j=x._isBullet=x.gauge.shape==="bullet";j||T("title.align","center");var V=x._isAngular=x.gauge.shape==="angular";V||T("align","center"),R("bgcolor",v.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var H=e.valueThickness*(x.gauge.shape==="bullet"?.5:1);R("bar.thickness",H),t(h,p,{name:"steps",handleItemDefaults:l}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),k={},h&&(k=h.axis||{}),w=S.newContainer(p,"axis"),O("visible"),x._range=O("range",x._range);var F={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(k,w,O,"linear"),o(k,w,O,"linear",F),n(k,w,O,"linear",F),a(k,w,O,F)}else T("title.align","center"),T("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function l(f,x){function y(v,T){return c.coerce(f,x,g.gauge.steps,v,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}Z.exports={supplyDefaults:i}}),Iq=Dt((Q,Z)=>{function c(g,I){var S=[],t=I.value;typeof I._lastValue!="number"&&(I._lastValue=I.value);var e=I._lastValue,r=e;return I._hasDelta&&typeof I.delta.reference=="number"&&(r=I.delta.reference),S[0]={y:t,lastY:e,delta:t-r,relativeDelta:(t-r)/r},S}Z.exports={calc:c}}),zq=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolate,I=(mx(),ni(j1)).interpolateNumber,S=kn(),t=S.strScale,e=S.strTranslate,r=S.rad2deg,a=Af().MID_SHIFT,n=Vs(),o=jE(),i=ec(),l=Ls(),f=tx(),x=K_(),y=Td(),v=hi(),T={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},b=/[yzafpnµmkMGTPEZY]/;function _(j){return j&&j.duration>0}Z.exports=function(j,V,H,F){var U=j._fullLayout,W;_(H)&&F&&(W=F()),S.makeTraceGroups(U._indicatorlayer,V,"trace").each(function(q){var J=q[0],lt=J.trace,yt=c.select(this),mt=lt._hasGauge,st=lt._isAngular,tt=lt._isBullet,dt=lt.domain,rt={w:U._size.w*(dt.x[1]-dt.x[0]),h:U._size.h*(dt.y[1]-dt.y[0]),l:U._size.l+U._size.w*dt.x[0],r:U._size.r+U._size.w*(1-dt.x[1]),t:U._size.t+U._size.h*(1-dt.y[1]),b:U._size.b+U._size.h*dt.y[0]},at=rt.l+rt.w/2,vt=rt.t+rt.h/2,it=Math.min(rt.w/2,rt.h),Y=o.innerRadius*it,ft,ut,kt,It=lt.align||"center";if(ut=vt,!mt)ft=rt.l+u[It]*rt.w,kt=function(Lt){return k(Lt,rt.w,rt.h)};else if(st&&(ft=at,ut=vt+it/2,kt=function(Lt){return w(Lt,.9*Y)}),tt){var Pt=o.bulletPadding,qt=1-o.bulletNumberDomainSize+Pt;ft=rt.l+(qt+(1-qt)*u[It])*rt.w,kt=function(Lt){return k(Lt,(o.bulletNumberDomainSize-Pt)*rt.w,rt.h)}}C(j,yt,q,{numbersX:ft,numbersY:ut,numbersScaler:kt,transitionOpts:H,onComplete:W});var Wt,Jt;mt&&(Wt={range:lt.gauge.axis.range,color:lt.gauge.bgcolor,line:{color:lt.gauge.bordercolor,width:0},thickness:1},Jt={range:lt.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:lt.gauge.bordercolor,width:lt.gauge.borderwidth},thickness:1});var ge=yt.selectAll("g.angular").data(st?q:[]);ge.exit().remove();var fe=yt.selectAll("g.angularaxis").data(st?q:[]);fe.exit().remove(),st&&M(j,yt,q,{radius:it,innerRadius:Y,gauge:ge,layer:fe,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var pe=yt.selectAll("g.bullet").data(tt?q:[]);pe.exit().remove();var se=yt.selectAll("g.bulletaxis").data(tt?q:[]);se.exit().remove(),tt&&P(j,yt,q,{gauge:pe,layer:se,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var Tt=yt.selectAll("text.title").data(q);Tt.exit().remove(),Tt.enter().append("text").classed("title",!0),Tt.attr("text-anchor",function(){return tt?T.right:T[lt.title.align]}).text(lt.title.text).call(n.font,lt.title.font).call(i.convertToTspans,j),Tt.attr("transform",function(){var Lt=rt.l+rt.w*u[lt.title.align],Mt,ee=o.titlePadding,ve=n.bBox(Tt.node());if(mt){if(st)if(lt.gauge.axis.visible){var oe=n.bBox(fe.node());Mt=oe.top-ee-ve.bottom}else Mt=rt.t+rt.h/2-it/2-ve.bottom-ee;tt&&(Mt=ut-(ve.top+ve.bottom)/2,Lt=rt.l-o.bulletPadding*rt.w)}else Mt=lt._numbersTop-ee-ve.bottom;return e(Lt,Mt)})})};function P(j,V,H,F){var U=H[0].trace,W=F.gauge,q=F.layer,J=F.gaugeBg,lt=F.gaugeOutline,yt=F.size,mt=U.domain,st=F.transitionOpts,tt=F.onComplete,dt,rt,at,vt,it;W.enter().append("g").classed("bullet",!0),W.attr("transform",e(yt.l,yt.t)),q.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),q.selectAll("g.xbulletaxistick,path,text").remove();var Y=yt.h,ft=U.gauge.bar.thickness*Y,ut=mt.x[0],kt=mt.x[0]+(mt.x[1]-mt.x[0])*(U._hasNumber||U._hasDelta?1-o.bulletNumberDomainSize:1);dt=p(j,U.gauge.axis),dt._id="xbulletaxis",dt.domain=[ut,kt],dt.setScale(),rt=l.calcTicks(dt),at=l.makeTransTickFn(dt),vt=l.getTickSigns(dt)[2],it=yt.t+yt.h,dt.visible&&(l.drawTicks(j,dt,{vals:dt.ticks==="inside"?l.clipEnds(dt,rt):rt,layer:q,path:l.makeTickPath(dt,it,vt),transFn:at}),l.drawLabels(j,dt,{vals:rt,layer:q,transFn:at,labelFns:l.makeLabelFns(dt,it)}));function It(pe){pe.attr("width",function(se){return Math.max(0,dt.c2p(se.range[1])-dt.c2p(se.range[0]))}).attr("x",function(se){return dt.c2p(se.range[0])}).attr("y",function(se){return .5*(1-se.thickness)*Y}).attr("height",function(se){return se.thickness*Y})}var Pt=[J].concat(U.gauge.steps),qt=W.selectAll("g.bg-bullet").data(Pt);qt.enter().append("g").classed("bg-bullet",!0).append("rect"),qt.select("rect").call(It).call(A),qt.exit().remove();var Wt=W.selectAll("g.value-bullet").data([U.gauge.bar]);Wt.enter().append("g").classed("value-bullet",!0).append("rect"),Wt.select("rect").attr("height",ft).attr("y",(Y-ft)/2).call(A),_(st)?Wt.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y)))):Wt.select("rect").attr("width",typeof H[0].y=="number"?Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y))):0),Wt.exit().remove();var Jt=H.filter(function(){return U.gauge.threshold.value||U.gauge.threshold.value===0}),ge=W.selectAll("g.threshold-bullet").data(Jt);ge.enter().append("g").classed("threshold-bullet",!0).append("line"),ge.select("line").attr("x1",dt.c2p(U.gauge.threshold.value)).attr("x2",dt.c2p(U.gauge.threshold.value)).attr("y1",(1-U.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-U.gauge.threshold.thickness)/2)*Y).call(v.stroke,U.gauge.threshold.line.color).style("stroke-width",U.gauge.threshold.line.width),ge.exit().remove();var fe=W.selectAll("g.gauge-outline").data([lt]);fe.enter().append("g").classed("gauge-outline",!0).append("rect"),fe.select("rect").call(It).call(A),fe.exit().remove()}function M(j,V,H,F){var U=H[0].trace,W=F.size,q=F.radius,J=F.innerRadius,lt=F.gaugeBg,yt=F.gaugeOutline,mt=[W.l+W.w/2,W.t+W.h/2+q/2],st=F.gauge,tt=F.layer,dt=F.transitionOpts,rt=F.onComplete,at=Math.PI/2;function vt(He){var Ge=U.gauge.axis.range[0],cr=U.gauge.axis.range[1],ur=(He-Ge)/(cr-Ge)*Math.PI-at;return ur<-at?-at:ur>at?at:ur}function it(He){return c.svg.arc().innerRadius((J+q)/2-He/2*(q-J)).outerRadius((J+q)/2+He/2*(q-J)).startAngle(-at)}function Y(He){He.attr("d",function(Ge){return it(Ge.thickness).startAngle(vt(Ge.range[0])).endAngle(vt(Ge.range[1]))()})}var ft,ut,kt,It;st.enter().append("g").classed("angular",!0),st.attr("transform",e(mt[0],mt[1])),tt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),tt.selectAll("g.xangularaxistick,path,text").remove(),ft=p(j,U.gauge.axis),ft.type="linear",ft.range=U.gauge.axis.range,ft._id="xangularaxis",ft.ticklabeloverflow="allow",ft.setScale();var Pt=function(He){return(ft.range[0]-He.x)/(ft.range[1]-ft.range[0])*Math.PI+Math.PI},qt={},Wt=l.makeLabelFns(ft,0),Jt=Wt.labelStandoff;qt.xFn=function(He){var Ge=Pt(He);return Math.cos(Ge)*Jt},qt.yFn=function(He){var Ge=Pt(He),cr=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(Jt+He.fontSize*cr)+Math.abs(Math.cos(Ge))*(He.fontSize*a)},qt.anchorFn=function(He){var Ge=Pt(He),cr=Math.cos(Ge);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},qt.heightFn=function(He,Ge,cr){var ur=Pt(He);return-.5*(1+Math.sin(ur))*cr};var ge=function(He){return e(mt[0]+q*Math.cos(He),mt[1]-q*Math.sin(He))};kt=function(He){return ge(Pt(He))};var fe=function(He){var Ge=Pt(He);return ge(Ge)+"rotate("+-r(Ge)+")"};if(ut=l.calcTicks(ft),It=l.getTickSigns(ft)[2],ft.visible){It=ft.ticks==="inside"?-1:1;var pe=(ft.linewidth||1)/2;l.drawTicks(j,ft,{vals:ut,layer:tt,path:"M"+It*pe+",0h"+It*ft.ticklen,transFn:fe}),l.drawLabels(j,ft,{vals:ut,layer:tt,transFn:kt,labelFns:qt})}var se=[lt].concat(U.gauge.steps),Tt=st.selectAll("g.bg-arc").data(se);Tt.enter().append("g").classed("bg-arc",!0).append("path"),Tt.select("path").call(Y).call(A),Tt.exit().remove();var Lt=it(U.gauge.bar.thickness),Mt=st.selectAll("g.value-arc").data([U.gauge.bar]);Mt.enter().append("g").classed("value-arc",!0).append("path");var ee=Mt.select("path");_(dt)?(ee.transition().duration(dt.duration).ease(dt.easing).each("end",function(){rt&&rt()}).each("interrupt",function(){rt&&rt()}).attrTween("d",h(Lt,vt(H[0].lastY),vt(H[0].y))),U._lastValue=H[0].y):ee.attr("d",typeof H[0].y=="number"?Lt.endAngle(vt(H[0].y)):"M0,0Z"),ee.call(A),Mt.exit().remove(),se=[];var ve=U.gauge.threshold.value;(ve||ve===0)&&se.push({range:[ve,ve],color:U.gauge.threshold.color,line:{color:U.gauge.threshold.line.color,width:U.gauge.threshold.line.width},thickness:U.gauge.threshold.thickness});var oe=st.selectAll("g.threshold-arc").data(se);oe.enter().append("g").classed("threshold-arc",!0).append("path"),oe.select("path").call(Y).call(A),oe.exit().remove();var Te=st.selectAll("g.gauge-outline").data([yt]);Te.enter().append("g").classed("gauge-outline",!0).append("path"),Te.select("path").call(Y).call(A),Te.exit().remove()}function C(j,V,H,F){var U=H[0].trace,W=F.numbersX,q=F.numbersY,J=U.align||"center",lt=T[J],yt=F.transitionOpts,mt=F.onComplete,st=S.ensureSingle(V,"g","numbers"),tt,dt,rt,at=[];U._hasNumber&&at.push("number"),U._hasDelta&&(at.push("delta"),U.delta.position==="left"&&at.reverse());var vt=st.selectAll("text").data(at);vt.enter().append("text"),vt.attr("text-anchor",function(){return lt}).attr("class",function(ge){return ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();function it(ge,fe,pe,se){if(ge.match("s")&&pe>=0!=se>=0&&!fe(pe).slice(-1).match(b)&&!fe(se).slice(-1).match(b)){var Tt=ge.slice().replace("s","f").replace(/\d+/,function(Mt){return parseInt(Mt)-1}),Lt=p(j,{tickformat:Tt});return function(Mt){return Math.abs(Mt)<1?l.tickText(Lt,Mt).text:fe(Mt)}}else return fe}function Y(){var ge=p(j,{tickformat:U.number.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(Mt){return l.tickText(ge,Mt).text},pe=U.number.suffix,se=U.number.prefix,Tt=st.select("text.number");function Lt(){var Mt=typeof H[0].y=="number"?se+fe(H[0].y)+pe:"-";Tt.text(Mt).call(n.font,U.number.font).call(i.convertToTspans,j)}return _(yt)?Tt.transition().duration(yt.duration).ease(yt.easing).each("end",function(){Lt(),mt&&mt()}).each("interrupt",function(){Lt(),mt&&mt()}).attrTween("text",function(){var Mt=c.select(this),ee=I(H[0].lastY,H[0].y);U._lastValue=H[0].y;var ve=it(U.number.valueformat,fe,H[0].lastY,H[0].y);return function(oe){Mt.text(se+ve(ee(oe))+pe)}}):Lt(),tt=R(se+fe(H[0].y)+pe,U.number.font,lt,j),Tt}function ft(){var ge=p(j,{tickformat:U.delta.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(oe){return l.tickText(ge,oe).text},pe=U.delta.suffix,se=U.delta.prefix,Tt=function(oe){var Te=U.delta.relative?oe.relativeDelta:oe.delta;return Te},Lt=function(oe,Te){return oe===0||typeof oe!="number"||isNaN(oe)?"-":(oe>0?U.delta.increasing.symbol:U.delta.decreasing.symbol)+se+Te(oe)+pe},Mt=function(oe){return oe.delta>=0?U.delta.increasing.color:U.delta.decreasing.color};U._deltaLastValue===void 0&&(U._deltaLastValue=Tt(H[0]));var ee=st.select("text.delta");ee.call(n.font,U.delta.font).call(v.fill,Mt({delta:U._deltaLastValue}));function ve(){ee.text(Lt(Tt(H[0]),fe)).call(v.fill,Mt(H[0])).call(i.convertToTspans,j)}return _(yt)?ee.transition().duration(yt.duration).ease(yt.easing).tween("text",function(){var oe=c.select(this),Te=Tt(H[0]),He=U._deltaLastValue,Ge=it(U.delta.valueformat,fe,He,Te),cr=I(He,Te);return U._deltaLastValue=Te,function(ur){oe.text(Lt(cr(ur),Ge)),oe.call(v.fill,Mt({delta:cr(ur)}))}}).each("end",function(){ve(),mt&&mt()}).each("interrupt",function(){ve(),mt&&mt()}):ve(),dt=R(Lt(Tt(H[0]),fe),U.delta.font,lt,j),ee}var ut=U.mode+U.align,kt;if(U._hasDelta&&(kt=ft(),ut+=U.delta.position+U.delta.font.size+U.delta.font.family+U.delta.valueformat,ut+=U.delta.increasing.symbol+U.delta.decreasing.symbol,rt=dt),U._hasNumber&&(Y(),ut+=U.number.font.size+U.number.font.family+U.number.valueformat+U.number.suffix+U.number.prefix,rt=tt),U._hasDelta&&U._hasNumber){var It=[(tt.left+tt.right)/2,(tt.top+tt.bottom)/2],Pt=[(dt.left+dt.right)/2,(dt.top+dt.bottom)/2],qt,Wt,Jt=.75*U.delta.font.size;U.delta.position==="left"&&(qt=O(U,"deltaPos",0,-1*(tt.width*u[U.align]+dt.width*(1-u[U.align])+Jt),ut,Math.min),Wt=It[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:dt.left+qt,right:tt.right,top:Math.min(tt.top,dt.top+Wt),bottom:Math.max(tt.bottom,dt.bottom+Wt)}),U.delta.position==="right"&&(qt=O(U,"deltaPos",0,tt.width*(1-u[U.align])+dt.width*u[U.align]+Jt,ut,Math.max),Wt=It[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:tt.left,right:dt.right+qt,top:Math.min(tt.top,dt.top+Wt),bottom:Math.max(tt.bottom,dt.bottom+Wt)}),U.delta.position==="bottom"&&(qt=null,Wt=dt.height,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height,bottom:tt.bottom+dt.height}),U.delta.position==="top"&&(qt=null,Wt=tt.top,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height-dt.height,bottom:tt.bottom}),kt.attr({dx:qt,dy:Wt})}(U._hasNumber||U._hasDelta)&&st.attr("transform",function(){var ge=F.numbersScaler(rt);ut+=ge[2];var fe=O(U,"numbersScale",1,ge[0],ut,Math.min),pe;U._scaleNumbers||(fe=1),U._isAngular?pe=q-fe*rt.bottom:pe=q-fe*(rt.top+rt.bottom)/2,U._numbersTop=fe*rt.top+pe;var se=rt[J];J==="center"&&(se=(rt.left+rt.right)/2);var Tt=W-fe*se;return Tt=O(U,"numbersTranslate",0,Tt,ut,Math.max),e(Tt,pe)+t(fe)})}function A(j){j.each(function(V){v.stroke(c.select(this),V.line.color)}).each(function(V){v.fill(c.select(this),V.color)}).style("stroke-width",function(V){return V.line.width})}function h(j,V,H){return function(){var F=g(V,H);return function(U){return j.endAngle(F(U))()}}}function p(j,V,H){var F=j._fullLayout,U=S.extendFlat({type:"linear",ticks:"outside",range:H,showline:!0},V),W={type:"linear",_id:"x"+V._id},q={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function J(lt,yt){return S.coerce(U,W,y,lt,yt)}return f(U,W,J,q,F),x(U,W,J,q),W}function k(j,V,H){var F=Math.min(V/j.width,H/j.height);return[F,j,V+"x"+H]}function w(j,V){var H=Math.sqrt(j.width/2*(j.width/2)+j.height*j.height),F=V/H;return[F,j,V]}function R(j,V,H,F){var U=document.createElementNS("http://www.w3.org/2000/svg","text"),W=c.select(U);return W.text(j).attr("x",0).attr("y",0).attr("text-anchor",H).attr("data-unformatted",j).call(i.convertToTspans,F).call(n.font,V),n.bBox(W.node())}function O(j,V,H,F,U,W){var q="_cache"+V;j[q]&&j[q].key===U||(j[q]={key:U,value:H});var J=S.aggNums(W,null,[j[q].value,F],2);return j[q].value=J,J}}),Oq=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"indicator",basePlotModule:Lq(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:NE(),supplyDefaults:Pq().supplyDefaults,calc:Iq().calc,plot:zq(),meta:{}}}),Dq=Dt((Q,Z)=>{Z.exports=Oq()}),UE=Dt((Q,Z)=>{var c=gm(),g=Ia().extendFlat,I=Yc().overrideAll,S=da(),t=jh().attributes,e=dh().descriptionOnlyNumbers;Z.exports=I({domain:t({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:g({},c.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:g({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:g({},c.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:g({},S({arrayOk:!0}))}},"calc","from-root")}),Fq=Dt((Q,Z)=>{var c=kn(),g=UE(),I=jh().defaults;function S(t,e){for(var r=t.columnorder||[],a=t.header.values.length,n=r.slice(0,a),o=n.slice().sort(function(f,x){return f-x}),i=n.map(function(f){return o.indexOf(f)}),l=i.length;l{var c=zg().wrap;Z.exports=function(){return c({})}}),VE=Dt((Q,Z)=>{Z.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}),Bq=Dt((Q,Z)=>{var c=VE(),g=Ia().extendFlat,I=Yi(),S=Ma().isTypedArray,t=Ma().isArrayOrTypedArray;Z.exports=function(x,y){var v=a(y.cells.values),T=function(J){return J.slice(y.header.values.length,J.length)},u=a(y.header.values);u.length&&!u[0].length&&(u[0]=[""],u=a(u));var b=u.concat(T(v).map(function(){return n((u[0]||[""]).length)})),_=y.domain,P=Math.floor(x._fullLayout._size.w*(_.x[1]-_.x[0])),M=Math.floor(x._fullLayout._size.h*(_.y[1]-_.y[0])),C=y.header.values.length?b[0].map(function(){return y.header.height}):[c.emptyHeaderHeight],A=v.length?v[0].map(function(){return y.cells.height}):[],h=C.reduce(r,0),p=M-h,k=p+c.uplift,w=l(A,k),R=l(C,h),O=i(R,[]),j=i(w,O),V={},H=y._fullInput.columnorder;t(H)&&(H=Array.from(H)),H=H.concat(T(v.map(function(J,lt){return lt})));var F=b.map(function(J,lt){var yt=t(y.columnwidth)?y.columnwidth[Math.min(lt,y.columnwidth.length-1)]:y.columnwidth;return I(yt)?Number(yt):1}),U=F.reduce(r,0);F=F.map(function(J){return J/U*P});var W=Math.max(e(y.header.line.width),e(y.cells.line.width)),q={key:y.uid+x._context.staticPlot,translateX:_.x[0]*x._fullLayout._size.w,translateY:x._fullLayout._size.h*(1-_.y[1]),size:x._fullLayout._size,width:P,maxLineWidth:W,height:M,columnOrder:H,groupHeight:M,rowBlocks:j,headerRowBlocks:O,scrollY:0,cells:g({},y.cells,{values:v}),headerCells:g({},y.header,{values:b}),gdColumns:b.map(function(J){return J[0]}),gdColumnsOriginalOrder:b.map(function(J){return J[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:b.map(function(J,lt){var yt=V[J];V[J]=(yt||0)+1;var mt=J+"__"+V[J];return{key:mt,label:J,specIndex:lt,xIndex:H[lt],xScale:o,x:void 0,calcdata:void 0,columnWidth:F[lt]}})};return q.columns.forEach(function(J){J.calcdata=q,J.x=o(J)}),q};function e(x){if(t(x)){for(var y=0,v=0;v=y||C===x.length-1)&&(v[u]=_,_.key=M++,_.firstRowIndex=P,_.lastRowIndex=C,_=f(),u+=b,P=C+1,b=0);return v}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}),Nq=Dt(Q=>{var Z=Ia().extendFlat;Q.splitToPanels=function(g){var I=[0,0],S=Z({},g,{key:"header",type:"header",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:Z({},g.calcdata,{cells:g.calcdata.headerCells})}),t=Z({},g,{key:"cells1",type:"cells",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),e=Z({},g,{key:"cells2",type:"cells",page:1,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks});return[t,e,S]},Q.splitToCells=function(g){var I=c(g);return(g.values||[]).slice(I[0],I[1]).map(function(S,t){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+e,key:I[0]+t,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:S}})};function c(g){var I=g.rowBlocks[g.page],S=I?I.rows[0].rowIndex:0,t=I?S+I.rows.length:0;return[S,t]}}),HE=Dt((Q,Z)=>{var c=VE(),g=qr(),I=kn(),S=I.numberFormat,t=zg(),e=Vs(),r=ec(),a=kn().raiseToTop,n=kn().strTranslate,o=kn().cancelTransition,i=Bq(),l=Nq(),f=hi();Z.exports=function(ft,ut){var kt=!ft._context.staticPlot,It=ft._fullLayout._paper.selectAll("."+c.cn.table).data(ut.map(function(oe){var Te=t.unwrap(oe),He=Te.trace;return i(ft,He)}),t.keyFun);It.exit().remove(),It.enter().append("g").classed(c.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"),It.attr("width",function(oe){return oe.width+oe.size.l+oe.size.r}).attr("height",function(oe){return oe.height+oe.size.t+oe.size.b}).attr("transform",function(oe){return n(oe.translateX,oe.translateY)});var Pt=It.selectAll("."+c.cn.tableControlView).data(t.repeat,t.keyFun),qt=Pt.enter().append("g").classed(c.cn.tableControlView,!0).style("box-sizing","content-box");if(kt){var Wt="onwheel"in document?"wheel":"mousewheel";qt.on("mousemove",function(oe){Pt.filter(function(Te){return oe===Te}).call(u,ft)}).on(Wt,function(oe){if(!oe.scrollbarState.wheeling){oe.scrollbarState.wheeling=!0;var Te=oe.scrollY+g.event.deltaY,He=lt(ft,Pt,null,Te)(oe);He||(g.event.stopPropagation(),g.event.preventDefault()),oe.scrollbarState.wheeling=!1}}).call(u,ft,!0)}Pt.attr("transform",function(oe){return n(oe.size.l,oe.size.t)});var Jt=Pt.selectAll("."+c.cn.scrollBackground).data(t.repeat,t.keyFun);Jt.enter().append("rect").classed(c.cn.scrollBackground,!0).attr("fill","none"),Jt.attr("width",function(oe){return oe.width}).attr("height",function(oe){return oe.height}),Pt.each(function(oe){e.setClipUrl(g.select(this),y(ft,oe),ft)});var ge=Pt.selectAll("."+c.cn.yColumn).data(function(oe){return oe.columns},t.keyFun);ge.enter().append("g").classed(c.cn.yColumn,!0),ge.exit().remove(),ge.attr("transform",function(oe){return n(oe.x,0)}),kt&&ge.call(g.behavior.drag().origin(function(oe){var Te=g.select(this);return H(Te,oe,-c.uplift),a(this),oe.calcdata.columnDragInProgress=!0,u(Pt.filter(function(He){return oe.calcdata.key===He.key}),ft),oe}).on("drag",function(oe){var Te=g.select(this),He=function(ur){return(oe===ur?g.event.x:ur.x)+ur.columnWidth/2};oe.x=Math.max(-c.overdrag,Math.min(oe.calcdata.width+c.overdrag-oe.columnWidth,g.event.x));var Ge=T(ge).filter(function(ur){return ur.calcdata.key===oe.calcdata.key}),cr=Ge.sort(function(ur,jr){return He(ur)-He(jr)});cr.forEach(function(ur,jr){ur.xIndex=jr,ur.x=oe===ur?ur.x:ur.xScale(ur)}),ge.filter(function(ur){return oe!==ur}).transition().ease(c.transitionEase).duration(c.transitionDuration).attr("transform",function(ur){return n(ur.x,0)}),Te.call(o).attr("transform",n(oe.x,-c.uplift))}).on("dragend",function(oe){var Te=g.select(this),He=oe.calcdata;oe.x=oe.xScale(oe),oe.calcdata.columnDragInProgress=!1,H(Te,oe,0),j(ft,He,He.columns.map(function(Ge){return Ge.xIndex}))})),ge.each(function(oe){e.setClipUrl(g.select(this),v(ft,oe),ft)});var fe=ge.selectAll("."+c.cn.columnBlock).data(l.splitToPanels,t.keyFun);fe.enter().append("g").classed(c.cn.columnBlock,!0).attr("id",function(oe){return oe.key}),fe.style("cursor",function(oe){return oe.dragHandle?"ew-resize":oe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var pe=fe.filter(U),se=fe.filter(F);kt&&se.call(g.behavior.drag().origin(function(oe){return g.event.stopPropagation(),oe}).on("drag",lt(ft,Pt,-1)).on("dragend",function(){})),b(ft,Pt,pe,fe),b(ft,Pt,se,fe);var Tt=Pt.selectAll("."+c.cn.scrollAreaClip).data(t.repeat,t.keyFun);Tt.enter().append("clipPath").classed(c.cn.scrollAreaClip,!0).attr("id",function(oe){return y(ft,oe)});var Lt=Tt.selectAll("."+c.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);Lt.enter().append("rect").classed(c.cn.scrollAreaClipRect,!0).attr("x",-c.overdrag).attr("y",-c.uplift).attr("fill","none"),Lt.attr("width",function(oe){return oe.width+2*c.overdrag}).attr("height",function(oe){return oe.height+c.uplift});var Mt=ge.selectAll("."+c.cn.columnBoundary).data(t.repeat,t.keyFun);Mt.enter().append("g").classed(c.cn.columnBoundary,!0);var ee=ge.selectAll("."+c.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);ee.enter().append("clipPath").classed(c.cn.columnBoundaryClippath,!0),ee.attr("id",function(oe){return v(ft,oe)});var ve=ee.selectAll("."+c.cn.columnBoundaryRect).data(t.repeat,t.keyFun);ve.enter().append("rect").classed(c.cn.columnBoundaryRect,!0).attr("fill","none"),ve.attr("width",function(oe){return oe.columnWidth+2*x(oe)}).attr("height",function(oe){return oe.calcdata.height+2*x(oe)+c.uplift}).attr("x",function(oe){return-x(oe)}).attr("y",function(oe){return-x(oe)}),J(null,se,Pt)};function x(ft){return Math.ceil(ft.calcdata.maxLineWidth/2)}function y(ft,ut){return"clip"+ft._fullLayout._uid+"_scrollAreaBottomClip_"+ut.key}function v(ft,ut){return"clip"+ft._fullLayout._uid+"_columnBoundaryClippath_"+ut.calcdata.key+"_"+ut.specIndex}function T(ft){return[].concat.apply([],ft.map(function(ut){return ut})).map(function(ut){return ut.__data__})}function u(ft,ut,kt){function It(fe){var pe=fe.rowBlocks;return rt(pe,pe.length-1)+(pe.length?at(pe[pe.length-1],1/0):1)}var Pt=ft.selectAll("."+c.cn.scrollbarKit).data(t.repeat,t.keyFun);Pt.enter().append("g").classed(c.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Pt.each(function(fe){var pe=fe.scrollbarState;pe.totalHeight=It(fe),pe.scrollableAreaHeight=fe.groupHeight-W(fe),pe.currentlyVisibleHeight=Math.min(pe.totalHeight,pe.scrollableAreaHeight),pe.ratio=pe.currentlyVisibleHeight/pe.totalHeight,pe.barLength=Math.max(pe.ratio*pe.currentlyVisibleHeight,c.goldenRatio*c.scrollbarWidth),pe.barWiggleRoom=pe.currentlyVisibleHeight-pe.barLength,pe.wiggleRoom=Math.max(0,pe.totalHeight-pe.scrollableAreaHeight),pe.topY=pe.barWiggleRoom===0?0:fe.scrollY/pe.wiggleRoom*pe.barWiggleRoom,pe.bottomY=pe.topY+pe.barLength,pe.dragMultiplier=pe.wiggleRoom/pe.barWiggleRoom}).attr("transform",function(fe){var pe=fe.width+c.scrollbarWidth/2+c.scrollbarOffset;return n(pe,W(fe))});var qt=Pt.selectAll("."+c.cn.scrollbar).data(t.repeat,t.keyFun);qt.enter().append("g").classed(c.cn.scrollbar,!0);var Wt=qt.selectAll("."+c.cn.scrollbarSlider).data(t.repeat,t.keyFun);Wt.enter().append("g").classed(c.cn.scrollbarSlider,!0),Wt.attr("transform",function(fe){return n(0,fe.scrollbarState.topY||0)});var Jt=Wt.selectAll("."+c.cn.scrollbarGlyph).data(t.repeat,t.keyFun);Jt.enter().append("line").classed(c.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",c.scrollbarWidth).attr("stroke-linecap","round").attr("y1",c.scrollbarWidth/2),Jt.attr("y2",function(fe){return fe.scrollbarState.barLength-c.scrollbarWidth/2}).attr("stroke-opacity",function(fe){return fe.columnDragInProgress||!fe.scrollbarState.barWiggleRoom||kt?0:.4}),Jt.transition().delay(0).duration(0),Jt.transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration).attr("stroke-opacity",0);var ge=qt.selectAll("."+c.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);ge.enter().append("line").classed(c.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",c.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(fe){var pe=g.event.y,se=this.getBoundingClientRect(),Tt=fe.scrollbarState,Lt=pe-se.top,Mt=g.scale.linear().domain([0,Tt.scrollableAreaHeight]).range([0,Tt.totalHeight]).clamp(!0);Tt.topY<=Lt&&Lt<=Tt.bottomY||lt(ut,ft,null,Mt(Lt-Tt.barLength/2))(fe)}).call(g.behavior.drag().origin(function(fe){return g.event.stopPropagation(),fe.scrollbarState.scrollbarScrollInProgress=!0,fe}).on("drag",lt(ut,ft)).on("dragend",function(){})),ge.attr("y2",function(fe){return fe.scrollbarState.scrollableAreaHeight}),ut._context.staticPlot&&(Jt.remove(),ge.remove())}function b(ft,ut,kt,It){var Pt=_(kt),qt=P(Pt);h(qt);var Wt=M(qt);k(Wt);var Jt=A(qt),ge=C(Jt);p(ge),w(ge,ut,It,ft),dt(qt)}function _(ft){var ut=ft.selectAll("."+c.cn.columnCells).data(t.repeat,t.keyFun);return ut.enter().append("g").classed(c.cn.columnCells,!0),ut.exit().remove(),ut}function P(ft){var ut=ft.selectAll("."+c.cn.columnCell).data(l.splitToCells,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.columnCell,!0),ut.exit().remove(),ut}function M(ft){var ut=ft.selectAll("."+c.cn.cellRect).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("rect").classed(c.cn.cellRect,!0),ut}function C(ft){var ut=ft.selectAll("."+c.cn.cellText).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("text").classed(c.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),ut}function A(ft){var ut=ft.selectAll("."+c.cn.cellTextHolder).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ut}function h(ft){ft.each(function(ut,kt){var It=ut.calcdata.cells.font,Pt=ut.column.specIndex,qt={size:V(It.size,Pt,kt),color:V(It.color,Pt,kt),family:V(It.family,Pt,kt),weight:V(It.weight,Pt,kt),style:V(It.style,Pt,kt),variant:V(It.variant,Pt,kt),textcase:V(It.textcase,Pt,kt),lineposition:V(It.lineposition,Pt,kt),shadow:V(It.shadow,Pt,kt)};ut.rowNumber=ut.key,ut.align=V(ut.calcdata.cells.align,Pt,kt),ut.cellBorderWidth=V(ut.calcdata.cells.line.width,Pt,kt),ut.font=qt})}function p(ft){ft.each(function(ut){e.font(g.select(this),ut.font)})}function k(ft){ft.attr("width",function(ut){return ut.column.columnWidth}).attr("stroke-width",function(ut){return ut.cellBorderWidth}).each(function(ut){var kt=g.select(this);f.stroke(kt,V(ut.calcdata.cells.line.color,ut.column.specIndex,ut.rowNumber)),f.fill(kt,V(ut.calcdata.cells.fill.color,ut.column.specIndex,ut.rowNumber))})}function w(ft,ut,kt,It){ft.text(function(Pt){var qt=Pt.column.specIndex,Wt=Pt.rowNumber,Jt=Pt.value,ge=typeof Jt=="string",fe=ge&&Jt.match(/
/i),pe=!ge||fe;Pt.mayHaveMarkup=ge&&Jt.match(/[<&>]/);var se=R(Jt);Pt.latex=se;var Tt=se?"":V(Pt.calcdata.cells.prefix,qt,Wt)||"",Lt=se?"":V(Pt.calcdata.cells.suffix,qt,Wt)||"",Mt=se?null:V(Pt.calcdata.cells.format,qt,Wt)||null,ee=Tt+(Mt?S(Mt)(Pt.value):Pt.value)+Lt,ve;Pt.wrappingNeeded=!Pt.wrapped&&!pe&&!se&&(ve=O(ee)),Pt.cellHeightMayIncrease=fe||se||Pt.mayHaveMarkup||(ve===void 0?O(ee):ve),Pt.needsConvertToTspans=Pt.mayHaveMarkup||Pt.wrappingNeeded||Pt.latex;var oe;if(Pt.wrappingNeeded){var Te=c.wrapSplitCharacter===" "?ee.replace(/Pt&&It.push(qt),Pt+=ge}return It}function J(ft,ut,kt){var It=T(ut)[0];if(It!==void 0){var Pt=It.rowBlocks,qt=It.calcdata,Wt=rt(Pt,Pt.length),Jt=It.calcdata.groupHeight-W(It),ge=qt.scrollY=Math.max(0,Math.min(Wt-Jt,qt.scrollY)),fe=q(Pt,ge,Jt);fe.length===1&&(fe[0]===Pt.length-1?fe.unshift(fe[0]-1):fe.push(fe[0]+1)),fe[0]%2&&fe.reverse(),ut.each(function(pe,se){pe.page=fe[se],pe.scrollY=ge}),ut.attr("transform",function(pe){var se=rt(pe.rowBlocks,pe.page)-pe.scrollY;return n(0,se)}),ft&&(yt(ft,kt,ut,fe,It.prevPages,It,0),yt(ft,kt,ut,fe,It.prevPages,It,1),u(kt,ft))}}function lt(ft,ut,kt,It){return function(Pt){var qt=Pt.calcdata?Pt.calcdata:Pt,Wt=ut.filter(function(pe){return qt.key===pe.key}),Jt=kt||qt.scrollbarState.dragMultiplier,ge=qt.scrollY;qt.scrollY=It===void 0?qt.scrollY+Jt*g.event.dy:It;var fe=Wt.selectAll("."+c.cn.yColumn).selectAll("."+c.cn.columnBlock).filter(F);return J(ft,fe,Wt),qt.scrollY===ge}}function yt(ft,ut,kt,It,Pt,qt,Wt){var Jt=It[Wt]!==Pt[Wt];Jt&&(clearTimeout(qt.currentRepaint[Wt]),qt.currentRepaint[Wt]=setTimeout(function(){var ge=kt.filter(function(fe,pe){return pe===Wt&&It[pe]!==Pt[pe]});b(ft,ut,ge,kt),Pt[Wt]=It[Wt]}))}function mt(ft,ut,kt,It){return function(){var Pt=g.select(ut.parentNode);Pt.each(function(qt){var Wt=qt.fragments;Pt.selectAll("tspan.line").each(function(Mt,ee){Wt[ee].width=this.getComputedTextLength()});var Jt=Wt[Wt.length-1].width,ge=Wt.slice(0,-1),fe=[],pe,se,Tt=0,Lt=qt.column.columnWidth-2*c.cellPad;for(qt.value="";ge.length;)pe=ge.shift(),se=pe.width+Jt,Tt+se>Lt&&(qt.value+=fe.join(c.wrapSpacer)+c.lineBreaker,fe=[],Tt=0),fe.push(pe.text),Tt+=se;Tt&&(qt.value+=fe.join(c.wrapSpacer)),qt.wrapped=!0}),Pt.selectAll("tspan.line").remove(),w(Pt.select("."+c.cn.cellText),kt,ft,It),g.select(ut.parentNode.parentNode).call(dt)}}function st(ft,ut,kt,It,Pt){return function(){if(!Pt.settledY){var qt=g.select(ut.parentNode),Wt=it(Pt),Jt=Pt.key-Wt.firstRowIndex,ge=Wt.rows[Jt].rowHeight,fe=Pt.cellHeightMayIncrease?ut.parentNode.getBoundingClientRect().height+2*c.cellPad:ge,pe=Math.max(fe,ge),se=pe-Wt.rows[Jt].rowHeight;se&&(Wt.rows[Jt].rowHeight=pe,ft.selectAll("."+c.cn.columnCell).call(dt),J(null,ft.filter(F),0),u(kt,It,!0)),qt.attr("transform",function(){var Tt=this,Lt=Tt.parentNode,Mt=Lt.getBoundingClientRect(),ee=g.select(Tt.parentNode).select("."+c.cn.cellRect).node().getBoundingClientRect(),ve=Tt.transform.baseVal.consolidate(),oe=ee.top-Mt.top+(ve?ve.matrix.f:c.cellPad);return n(tt(Pt,g.select(Tt.parentNode).select("."+c.cn.cellTextHolder).node().getBoundingClientRect().width),oe)}),Pt.settledY=!0}}}function tt(ft,ut){switch(ft.align){case"left":return c.cellPad;case"right":return ft.column.columnWidth-(ut||0)-c.cellPad;case"center":return(ft.column.columnWidth-(ut||0))/2;default:return c.cellPad}}function dt(ft){ft.attr("transform",function(ut){var kt=ut.rowBlocks[0].auxiliaryBlocks.reduce(function(Wt,Jt){return Wt+at(Jt,1/0)},0),It=it(ut),Pt=at(It,ut.key),qt=Pt+kt;return n(0,qt)}).selectAll("."+c.cn.cellRect).attr("height",function(ut){return Y(it(ut),ut.key).rowHeight})}function rt(ft,ut){for(var kt=0,It=ut-1;It>=0;It--)kt+=vt(ft[It]);return kt}function at(ft,ut){for(var kt=0,It=0;It{var Z=ud().getModuleCalcData,c=HE(),g="table";Q.name=g,Q.plot=function(I){var S=Z(I.calcdata,g)[0];S.length&&c(I,S)},Q.clean=function(I,S,t,e){var r=e._has&&e._has(g),a=S._has&&S._has(g);r&&!a&&e._paperdiv.selectAll(".table").remove()}}),Uq=Dt((Q,Z)=>{Z.exports={attributes:UE(),supplyDefaults:Fq(),calc:Rq(),plot:HE(),moduleType:"trace",name:"table",basePlotModule:jq(),categories:["noOpacity"],meta:{}}}),Vq=Dt((Q,Z)=>{Z.exports=Uq()}),Hq=Dt((Q,Z)=>{var c=da(),g=wi(),I=Td(),S=dh().descriptionWithDates,t=Yc().overrideAll,e=kd().dash,r=Ia().extendFlat;Z.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:c({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:I.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},I.labelalias,{editType:"calc"}),tickfont:c({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:S("tick label")},tickformatstops:t(I.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g.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"}}),ST=Dt((Q,Z)=>{var c=da(),g=Hq(),I=wi(),S=c({editType:"calc"}),t=ef().zorder;S.family.dflt='"Open Sans", verdana, arial, sans-serif',S.size.dflt=12,S.color.dflt=I.defaultLine,Z.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:g,baxis:g,font:S,color:{valType:"color",dflt:I.defaultLine,editType:"plot"},zorder:t}}),Wq=Dt((Q,Z)=>{var c=kn().isArray1D;Z.exports=function(g,I,S){var t=S("x"),e=t&&t.length,r=S("y"),a=r&&r.length;if(!e&&!a)return!1;if(I._cheater=!t,(!e||c(t))&&(!a||c(r))){var n=e?t.length:1/0;a&&(n=Math.min(n,r.length)),I.a&&I.a.length&&(n=Math.min(n,I.a.length)),I.b&&I.b.length&&(n=Math.min(n,I.b.length)),I._length=n}else I._length=null;return!0}}),qq=Dt((Q,Z)=>{var c=ST(),g=hi().addOpacity,I=Jo(),S=kn(),t=yg(),e=n0(),r=dm(),a=Wm(),n=i0(),o=dv();Z.exports=function(l,f,x){var y=x.letter,v=x.font||{},T=c[y+"axis"];function u(W,q){return S.coerce(l,f,T,W,q)}function b(W,q){return S.coerce2(l,f,T,W,q)}x.name&&(f._name=x.name,f._id=x.name),u("autotypenumbers",x.autotypenumbersDflt);var _=u("type");if(_==="-"&&(x.data&&i(f,x.data),f.type==="-"?f.type="linear":_=l.type=f.type),u("smoothing"),u("cheatertype"),u("showticklabels"),u("labelprefix",y+" = "),u("labelsuffix"),u("showtickprefix"),u("showticksuffix"),u("separatethousands"),u("tickformat"),u("exponentformat"),u("minexponent"),u("showexponent"),u("categoryorder"),u("tickmode"),u("tickvals"),u("ticktext"),u("tick0"),u("dtick"),f.tickmode==="array"&&(u("arraytick0"),u("arraydtick")),u("labelpadding"),f._hovertitle=y,_==="date"){var P=I.getComponentMethod("calendars","handleDefaults");P(l,f,"calendar",x.calendar)}n(f,x.fullLayout),f.c2p=S.identity;var M=u("color",x.dfltColor),C=M===l.color?M:v.color,A=u("title.text");A&&(S.coerceFont(u,"title.font",v,{overrideDflt:{size:S.bigFont(v.size),color:C}}),u("title.offset")),u("tickangle");var h=u("autorange",!f.isValidRange(l.range));h&&u("rangemode"),u("range"),f.cleanRange(),u("fixedrange"),t(l,f,u,_),r(l,f,u,_,x),e(l,f,u,_,x),a(l,f,u,{data:x.data,dataAttr:y});var p=b("gridcolor",g(M,.3)),k=b("gridwidth"),w=b("griddash"),R=u("showgrid");R||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var O=b("startlinecolor",M),j=b("startlinewidth",k),V=u("startline",f.showgrid||!!O||!!j);V||(delete f.startlinecolor,delete f.startlinewidth);var H=b("endlinecolor",M),F=b("endlinewidth",k),U=u("endline",f.showgrid||!!H||!!F);return U||(delete f.endlinecolor,delete f.endlinewidth),R?(u("minorgridcount"),u("minorgridwidth",k),u("minorgriddash",w),u("minorgridcolor",g(p,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,u("tickmode"),f};function i(l,f){if(l.type==="-"){var x=l._id,y=x.charAt(0),v=y+"calendar",T=l[v];l.type=o(f,T,{autotypenumbers:l.autotypenumbers})}}}),$q=Dt((Q,Z)=>{var c=qq(),g=mu();Z.exports=function(S,t,e,r,a){var n=r("a");n||(r("da"),r("a0"));var o=r("b");o||(r("db"),r("b0")),I(S,t,e,a)};function I(S,t,e,r){var a=["aaxis","baxis"];a.forEach(function(n){var o=n.charAt(0),i=S[n]||{},l=g.newContainer(t,n),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:n,data:S[o],calendar:t.calendar,dfltColor:r,bgColor:e.paper_bgcolor,autotypenumbersDflt:e.autotypenumbers,fullLayout:e};c(i,l,f),l._categories=l._categories||[],!S[n]&&i.type!=="-"&&(S[n]={type:i.type})})}}),Zq=Dt((Q,Z)=>{var c=kn(),g=Wq(),I=$q(),S=ST(),t=wi();Z.exports=function(e,r,a,n){function o(f,x){return c.coerce(e,r,S,f,x)}r._clipPathId="clip"+r.uid+"carpet";var i=o("color",t.defaultLine);if(c.coerceFont(o,"font",n.font),o("carpet"),I(e,r,n,o,i),!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 l=g(e,r,o);l||(r.visible=!1),r._cheater&&o("cheaterslope"),o("zorder")}}),WE=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t;for(c(g)?g.length>I.length&&(g=g.slice(0,I.length)):g=[],t=0;t{Z.exports=function(c,g,I){if(c.length===0)return"";var S,t=[],e=I?3:1;for(S=0;S{Z.exports=function(c,g,I,S,t,e){var r=t[0]*c.dpdx(g),a=t[1]*c.dpdy(I),n=1,o=1;if(e){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=(t[0]*e[0]+t[1]*e[1])/i/l;o=Math.max(0,f)}var x=Math.atan2(a,r)*180/Math.PI;return x<-90?(x+=180,n=-n):x>90&&(x-=180,n=-n),{angle:x,flip:n,p:c.c2p(S,g,I),offsetMultplier:o}}}),Yq=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=WE(),S=qE(),t=Gq(),e=ec(),r=kn(),a=r.strRotate,n=r.strTranslate,o=Af();Z.exports=function(u,b,_,P){var M=u._context.staticPlot,C=b.xaxis,A=b.yaxis,h=u._fullLayout,p=h._clips;r.makeTraceGroups(P,_,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace,j=O.aaxis,V=O.baxis,H=r.ensureSingle(w,"g","minorlayer"),F=r.ensureSingle(w,"g","majorlayer"),U=r.ensureSingle(w,"g","boundarylayer"),W=r.ensureSingle(w,"g","labellayer");w.style("opacity",O.opacity),l(C,A,F,j,"a",j._gridlines,!0),l(C,A,F,V,"b",V._gridlines,!0),l(C,A,H,j,"a",j._minorgridlines,!0),l(C,A,H,V,"b",V._minorgridlines,!0),l(C,A,U,j,"a-boundary",j._boundarylines,M),l(C,A,U,V,"b-boundary",V._boundarylines,M);var q=f(u,C,A,O,R,W,j._labels,"a-label"),J=f(u,C,A,O,R,W,V._labels,"b-label");x(u,W,O,R,C,A,q,J),i(O,R,p,C,A)})};function i(u,b,_,P,M){var C,A,h,p,k=_.select("#"+u._clipPathId);k.size()||(k=_.append("clipPath").classed("carpetclip",!0));var w=r.ensureSingle(k,"path","carpetboundary"),R=b.clipsegments,O=[];for(p=0;p0?"start":"end","data-notex":1}).call(g.font,R.font).text(R.text).call(e.convertToTspans,u),U=g.bBox(this);F.attr("transform",n(j.p[0],j.p[1])+a(j.angle)+n(R.axis.labelpadding*H,U.height*.3)),k=Math.max(k,U.width+R.axis.labelpadding)}),p.exit().remove(),w.maxExtent=k,w}function x(u,b,_,P,M,C,A,h){var p,k,w,R,O=r.aggNums(Math.min,null,_.a),j=r.aggNums(Math.max,null,_.a),V=r.aggNums(Math.min,null,_.b),H=r.aggNums(Math.max,null,_.b);p=.5*(O+j),k=V,w=_.ab2xy(p,k,!0),R=_.dxyda_rough(p,k),A.angle===void 0&&r.extendFlat(A,t(_,M,C,w,_.dxydb_rough(p,k))),T(u,b,_,P,w,R,_.aaxis,M,C,A,"a-title"),p=O,k=.5*(V+H),w=_.ab2xy(p,k,!0),R=_.dxydb_rough(p,k),h.angle===void 0&&r.extendFlat(h,t(_,M,C,w,_.dxyda_rough(p,k))),T(u,b,_,P,w,R,_.baxis,M,C,h,"b-title")}var y=o.LINE_SPACING,v=(1-o.MID_SHIFT)/y+1;function T(u,b,_,P,M,C,A,h,p,k,w){var R=[];A.title.text&&R.push(A.title.text);var O=b.selectAll("text."+w).data(R),j=k.maxExtent;O.enter().append("text").classed(w,!0),O.each(function(){var V=t(_,h,p,M,C);["start","both"].indexOf(A.showticklabels)===-1&&(j=0);var H=A.title.font.size;j+=H+A.title.offset;var F=k.angle+(k.flip<0?180:0),U=(F-V.angle+450)%360,W=U>90&&U<270,q=c.select(this);q.text(A.title.text).call(e.convertToTspans,u),W&&(j=(-e.lineCount(q)+v)*y*H-j),q.attr("transform",n(V.p[0],V.p[1])+a(V.angle)+n(0,j)).attr("text-anchor","middle").call(g.font,A.title.font)}),O.exit().remove()}}),Kq=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t,e,r,a,n,o,i=[],l=c(g)?g.length:g,f=c(I)?I.length:I,x=c(g)?g:null,y=c(I)?I:null;x&&(r=(x.length-1)/(x[x.length-1]-x[0])/(l-1)),y&&(a=(y.length-1)/(y[y.length-1]-y[0])/(f-1));var v,T=1/0,u=-1/0;for(e=0;e{var c=kn().isArrayOrTypedArray;Z.exports=function(I){return g(I,0)};function g(I,S){if(!c(I)||S>=10)return null;for(var t=1/0,e=-1/0,r=I.length,a=0;a{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b,_=I["_"+S],P=I[S+"axis"],M=P._gridlines=[],C=P._minorgridlines=[],A=P._boundarylines=[],h=I["_"+t],p=I[t+"axis"];P.tickmode==="array"&&(P.tickvals=_.slice());var k=I._xctrl,w=I._yctrl,R=k[0].length,O=k.length,j=I._a.length,V=I._b.length;c.prepTicks(P),P.tickmode==="array"&&delete P.tickvals;var H=P.smoothing?3:1;function F(W){var q,J,lt,yt,mt,st,tt,dt,rt,at,vt,it,Y=[],ft=[],ut={};if(S==="b")for(J=I.b2j(W),lt=Math.floor(Math.max(0,Math.min(V-2,J))),yt=J-lt,ut.length=V,ut.crossLength=j,ut.xy=function(kt){return I.evalxy([],kt,J)},ut.dxy=function(kt,It){return I.dxydi([],kt,lt,It,yt)},q=0;q0&&(rt=I.dxydi([],q-1,lt,0,yt),Y.push(mt[0]+rt[0]/3),ft.push(mt[1]+rt[1]/3),at=I.dxydi([],q-1,lt,1,yt),Y.push(dt[0]-at[0]/3),ft.push(dt[1]-at[1]/3)),Y.push(dt[0]),ft.push(dt[1]),mt=dt;else for(q=I.a2i(W),st=Math.floor(Math.max(0,Math.min(j-2,q))),tt=q-st,ut.length=j,ut.crossLength=V,ut.xy=function(kt){return I.evalxy([],q,kt)},ut.dxy=function(kt,It){return I.dxydj([],st,kt,tt,It)},J=0;J0&&(vt=I.dxydj([],st,J-1,tt,0),Y.push(mt[0]+vt[0]/3),ft.push(mt[1]+vt[1]/3),it=I.dxydj([],st,J-1,tt,1),Y.push(dt[0]-it[0]/3),ft.push(dt[1]-it[1]/3)),Y.push(dt[0]),ft.push(dt[1]),mt=dt;return ut.axisLetter=S,ut.axis=P,ut.crossAxis=p,ut.value=W,ut.constvar=t,ut.index=f,ut.x=Y,ut.y=ft,ut.smoothing=p.smoothing,ut}function U(W){var q,J,lt,yt,mt,st=[],tt=[],dt={};if(dt.length=_.length,dt.crossLength=h.length,S==="b")for(lt=Math.max(0,Math.min(V-2,W)),mt=Math.min(1,Math.max(0,W-lt)),dt.xy=function(rt){return I.evalxy([],rt,W)},dt.dxy=function(rt,at){return I.dxydi([],rt,lt,at,mt)},q=0;q_.length-1)&&M.push(g(U(r),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i;f_.length-1)&&!(v<0||v>_.length-1))for(T=_[a],u=_[v],e=0;e_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash})));P.startline&&A.push(g(U(0),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(U(_.length-1),{color:P.endlinecolor,width:P.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((_[_.length-1]-P.tick0)/P.dtick*(1+n)),Math.ceil((_[0]-P.tick0)/P.dtick/(1+n))].sort(function(W,q){return W-q}),i=o[0],l=o[1],f=i;f<=l;f++)x=P.tick0+P.dtick*f,M.push(g(F(x),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i-1;f_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash}));P.startline&&A.push(g(F(_[0]),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(F(_[_.length-1]),{color:P.endlinecolor,width:P.endlinewidth}))}}}),Qq=Dt((Q,Z)=>{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S){var t,e,r,a,n,o=S._labels=[],i=S._gridlines;for(t=0;t{Z.exports=function(c,g,I,S){var t,e,r,a=[],n=!!I.smoothing,o=!!S.smoothing,i=c[0].length-1,l=c.length-1;for(t=0,e=[],r=[];t<=i;t++)e[t]=c[0][t],r[t]=g[0][t];for(a.push({x:e,y:r,bicubic:n}),t=0,e=[],r=[];t<=l;t++)e[t]=c[t][i],r[t]=g[t][i];for(a.push({x:e,y:r,bicubic:o}),t=i,e=[],r=[];t>=0;t--)e[i-t]=c[l][t],r[i-t]=g[l][t];for(a.push({x:e,y:r,bicubic:n}),t=l,e=[],r=[];t>=0;t--)e[l-t]=c[t][0],r[l-t]=g[t][0];return a.push({x:e,y:r,bicubic:o}),a}}),e$=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S){var t,e,r,a=[],n=[],o=g[0].length,i=g.length;function l(J,lt){var yt=0,mt,st=0;return J>0&&(mt=g[lt][J-1])!==void 0&&(st++,yt+=mt),J0&&(mt=g[lt-1][J])!==void 0&&(st++,yt+=mt),lt0&&e0&&th);return c.log("Smoother converged to",p,"after",w,"iterations"),g}}),r$=Dt((Q,Z)=>{Z.exports={RELATIVE_CULL_TOLERANCE:1e-6}}),n$=Dt((Q,Z)=>{var c=.5;Z.exports=function(g,I,S,t){var e=g[0]-I[0],r=g[1]-I[1],a=S[0]-I[0],n=S[1]-I[1],o=Math.pow(e*e+r*r,c/2),i=Math.pow(a*a+n*n,c/2),l=(i*i*e-o*o*a)*t,f=(i*i*r-o*o*n)*t,x=i*(o+i)*3,y=o*(o+i)*3;return[[I[0]+(x&&l/x),I[1]+(x&&f/x)],[I[0]-(y&&l/y),I[1]-(y&&f/y)]]}}),i$=Dt((Q,Z)=>{var c=n$(),g=kn().ensureArray;function I(S,t,e){var r=-.5*e[0]+1.5*t[0],a=-.5*e[1]+1.5*t[1];return[(2*r+S[0])/3,(2*a+S[1])/3]}Z.exports=function(S,t,e,r,a,n){var o,i,l,f,x,y,v,T,u,b,_=e[0].length,P=e.length,M=a?3*_-2:_,C=n?3*P-2:P;for(S=g(S,C),t=g(t,C),l=0;l{Z.exports=function(c,g,I,S,t){var e=g-2,r=I-2;return S&&t?function(a,n,o){a||(a=[]);var i,l,f,x,y,v,T=Math.max(0,Math.min(Math.floor(n),e)),u=Math.max(0,Math.min(Math.floor(o),r)),b=Math.max(0,Math.min(1,n-T)),_=Math.max(0,Math.min(1,o-u));T*=3,u*=3;var P=b*b,M=P*b,C=1-b,A=C*C,h=A*C,p=_*_,k=p*_,w=1-_,R=w*w,O=R*w;for(v=0;v{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=1-r,T=v*v,u=v*r*2,b=-3*T,_=3*(T-u),P=3*(u-y),M=3*y,C=a*a,A=C*a,h=1-a,p=h*h,k=p*h;for(x=0;x{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=y*r,T=1-r,u=T*T,b=u*T,_=a*a,P=1-a,M=P*P,C=P*a*2,A=-3*M,h=3*(M-C),p=3*(C-_),k=3*_;for(x=0;x{var c=r$(),g=E_().findBin,I=i$(),S=a$(),t=o$(),e=s$();Z.exports=function(r){var a=r._a,n=r._b,o=a.length,i=n.length,l=r.aaxis,f=r.baxis,x=a[0],y=a[o-1],v=n[0],T=n[i-1],u=a[a.length-1]-a[0],b=n[n.length-1]-n[0],_=u*c.RELATIVE_CULL_TOLERANCE,P=b*c.RELATIVE_CULL_TOLERANCE;x-=_,y+=_,v-=P,T+=P,r.isVisible=function(M,C){return M>x&&Mv&&Cy||CT},r.setScale=function(){var M=r._x,C=r._y,A=I(r._xctrl,r._yctrl,M,C,l.smoothing,f.smoothing);r._xctrl=A[0],r._yctrl=A[1],r.evalxy=S([r._xctrl,r._yctrl],o,i,l.smoothing,f.smoothing),r.dxydi=t([r._xctrl,r._yctrl],l.smoothing,f.smoothing),r.dxydj=e([r._xctrl,r._yctrl],l.smoothing,f.smoothing)},r.i2a=function(M){var C=Math.max(0,Math.floor(M[0]),o-2),A=M[0]-C;return(1-A)*a[C]+A*a[C+1]},r.j2b=function(M){var C=Math.max(0,Math.floor(M[1]),o-2),A=M[1]-C;return(1-A)*n[C]+A*n[C+1]},r.ij2ab=function(M){return[r.i2a(M[0]),r.j2b(M[1])]},r.a2i=function(M){var C=Math.max(0,Math.min(g(M,a),o-2)),A=a[C],h=a[C+1];return Math.max(0,Math.min(o-1,C+(M-A)/(h-A)))},r.b2j=function(M){var C=Math.max(0,Math.min(g(M,n),i-2)),A=n[C],h=n[C+1];return Math.max(0,Math.min(i-1,C+(M-A)/(h-A)))},r.ab2ij=function(M){return[r.a2i(M[0]),r.b2j(M[1])]},r.i2c=function(M,C){return r.evalxy([],M,C)},r.ab2xy=function(M,C,A){if(!A&&(Ma[o-1]|Cn[i-1]))return[!1,!1];var h=r.a2i(M),p=r.b2j(C),k=r.evalxy([],h,p);if(A){var w=0,R=0,O=[],j,V,H,F;Ma[o-1]?(j=o-2,V=1,w=(M-a[o-1])/(a[o-1]-a[o-2])):(j=Math.max(0,Math.min(o-2,Math.floor(h))),V=h-j),Cn[i-1]?(H=i-2,F=1,R=(C-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(p))),F=p-H),w&&(r.dxydi(O,j,H,V,F),k[0]+=O[0]*w,k[1]+=O[1]*w),R&&(r.dxydj(O,j,H,V,F),k[0]+=O[0]*R,k[1]+=O[1]*R)}return k},r.c2p=function(M,C,A){return[C.c2p(M[0]),A.c2p(M[1])]},r.p2x=function(M,C,A){return[C.p2c(M[0]),A.p2c(M[1])]},r.dadi=function(M){var C=Math.max(0,Math.min(a.length-2,M));return a[C+1]-a[C]},r.dbdj=function(M){var C=Math.max(0,Math.min(n.length-2,M));return n[C+1]-n[C]},r.dxyda=function(M,C,A,h){var p=r.dxydi(null,M,C,A,h),k=r.dadi(M,A);return[p[0]/k,p[1]/k]},r.dxydb=function(M,C,A,h){var p=r.dxydj(null,M,C,A,h),k=r.dbdj(C,h);return[p[0]/k,p[1]/k]},r.dxyda_rough=function(M,C,A){var h=u*(A||.1),p=r.ab2xy(M+h,C,!0),k=r.ab2xy(M-h,C,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dxydb_rough=function(M,C,A){var h=b*(A||.1),p=r.ab2xy(M,C+h,!0),k=r.ab2xy(M,C-h,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dpdx=function(M){return M._m},r.dpdy=function(M){return M._m}}}),u$=Dt((Q,Z)=>{var c=Ls(),g=kn().isArray1D,I=Kq(),S=Xq(),t=Jq(),e=Qq(),r=t$(),a=q6(),n=e$(),o=W6(),i=l$();Z.exports=function(l,f){var x=c.getFromId(l,f.xaxis),y=c.getFromId(l,f.yaxis),v=f.aaxis,T=f.baxis,u=f.x,b=f.y,_=[];u&&g(u)&&_.push("x"),b&&g(b)&&_.push("y"),_.length&&o(f,v,T,"a","b",_);var P=f._a=f._a||f.a,M=f._b=f._b||f.b;u=f._x||f.x,b=f._y||f.y;var C={};if(f._cheater){var A=v.cheatertype==="index"?P.length:P,h=T.cheatertype==="index"?M.length:M;u=I(A,h,f.cheaterslope)}f._x=u=a(u),f._y=b=a(b),n(u,P,M),n(b,P,M),i(f),f.setScale();var p=S(u),k=S(b),w=.5*(p[1]-p[0]),R=.5*(p[1]+p[0]),O=.5*(k[1]-k[0]),j=.5*(k[1]+k[0]),V=1.3;return p=[R-w*V,R+w*V],k=[j-O*V,j+O*V],f._extremes[x._id]=c.findExtremes(x,p,{padded:!0}),f._extremes[y._id]=c.findExtremes(y,k,{padded:!0}),t(f,"a","b"),t(f,"b","a"),e(f,v),e(f,T),C.clipsegments=r(f._xctrl,f._yctrl,v,T),C.x=u,C.y=b,C.a=P,C.b=M,[C]}}),c$=Dt((Q,Z)=>{Z.exports={attributes:ST(),supplyDefaults:Zq(),plot:Yq(),calc:u$(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}),h$=Dt((Q,Z)=>{Z.exports=c$()}),$E=Dt((Q,Z)=>{var c=I0(),g=ef(),I=Ho(),{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=kc(),a=Ia().extendFlat,n=g.marker,o=g.line,i=n.line;Z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},g.mode,{dflt:"markers"}),text:a({},g.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:a({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:a({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c(),marker:a({symbol:n.symbol,opacity:n.opacity,maxdisplayed:n.maxdisplayed,angle:n.angle,angleref:n.angleref,standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:i.width,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:a({},I.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:g.zorder}}),f$=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=z0(),e=xv(),r=x0(),a=O0(),n=$E();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}x("carpet"),i.xaxis="x",i.yaxis="y";var y=x("a"),v=x("b"),T=Math.min(y.length,v.length);if(!T){i.visible=!1;return}i._length=T,x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext");var u=T{Z.exports=function(c,g){var I={},S=g._carpet,t=S.ab2ij([c.a,c.b]),e=Math.floor(t[0]),r=t[0]-e,a=Math.floor(t[1]),n=t[1]-a,o=S.evalxy([],e,a,r,n);return I.yLabel=o[1].toFixed(3),I}}),ET=Dt((Q,Z)=>{Z.exports=function(c,g){for(var I=c._fullData.length,S,t=0;t{var c=Yi(),g=F0(),I=ct(),S=Bt(),t=me().calcMarkerSize,e=ET();Z.exports=function(r,a){var n=a._carpetTrace=e(r,a);if(!(!n||!n.visible||n.visible==="legendonly")){var o;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var i=a._length,l=new Array(i),f,x,y=!1;for(o=0;o{var c=Ka(),g=Ls(),I=Vs();Z.exports=function(S,t,e,r){var a,n,o,i=e[0][0].carpet,l=g.getFromId(S,i.xaxis||"x"),f=g.getFromId(S,i.yaxis||"y"),x={xaxis:l,yaxis:f,plot:t.plot};for(a=0;a{var c=Md(),g=kn().fillText;Z.exports=function(I,S,t,e){var r=c(I,S,t,e);if(!r||r[0].index===!1)return;var a=r[0];if(a.index===void 0){var n=1-a.y0/I.ya._length,o=I.xa._length,i=o*n/2,l=o-i;return a.x0=Math.max(Math.min(a.x0,l),i),a.x1=Math.max(Math.min(a.x1,l),i),r}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var x=a.trace,y=x._carpet,v=x._module.formatLabels(f,x);a.yLabel=v.yLabel,delete a.text;var T=[];function u(P,M){var C;P.labelprefix&&P.labelprefix.length>0?C=P.labelprefix.replace(/ = $/,""):C=P._hovertitle,T.push(C+": "+M.toFixed(3)+P.labelsuffix)}if(!x.hovertemplate){var b=f.hi||x.hoverinfo,_=b.split("+");_.indexOf("all")!==-1&&(_=["a","b","text"]),_.indexOf("a")!==-1&&u(y.aaxis,f.a),_.indexOf("b")!==-1&&u(y.baxis,f.b),T.push("y: "+a.yLabel),_.indexOf("text")!==-1&&g(f,x,T),a.extraText=T.join("
")}return r}}),v$=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=S[t];return c.a=e.a,c.b=e.b,c.y=e.y,c}}),y$=Dt((Q,Z)=>{Z.exports={attributes:$E(),supplyDefaults:f$(),colorbar:xo(),formatLabels:d$(),calc:p$(),plot:m$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:g$(),selectPoints:Rf(),eventData:v$(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}),x$=Dt((Q,Z)=>{Z.exports=y$()}),ZE=Dt((Q,Z)=>{var c=eb(),g=Zw(),I=kc(),S=Ia().extendFlat,t=g.contours;Z.exports=S({carpet:{valType:"string",editType:"calc"},z:c.z,a:c.x,a0:c.x0,da:c.dx,b:c.y,b0:c.y0,db:c.dy,text:c.text,hovertext:c.hovertext,transpose:c.transpose,atype:c.xtype,btype:c.ytype,fillcolor:g.fillcolor,autocontour:g.autocontour,ncontours:g.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},zorder:g.zorder},I("",{cLetter:"z",autoColorDflt:!1}))}),GE=Dt((Q,Z)=>{var c=kn(),g=H6(),I=ZE(),S=x7(),t=nk(),e=ik();Z.exports=function(r,a,n,o){function i(y,v){return c.coerce(r,a,I,y,v)}function l(y){return c.coerce2(r,a,I,y)}if(i("carpet"),r.a&&r.b){var f=g(r,a,i,o,"a","b");if(!f){a.visible=!1;return}i("text");var x=i("contours.type")==="constraint";x?S(r,a,i,o,n,{hasHover:!1}):(t(r,a,i,l),e(r,a,i,o,{hasHover:!1}))}else a._defaultColor=n,a._length=null;i("zorder")}}),_$=Dt((Q,Z)=>{var c=Xd(),g=kn(),I=W6(),S=q6(),t=$6(),e=Z6(),r=n7(),a=GE(),n=ET(),o=c7();Z.exports=function(l,f){var x=f._carpetTrace=n(l,f);if(!(!x||!x.visible||x.visible==="legendonly")){if(!f.a||!f.b){var y=l.data[x.index],v=l.data[f.index];v.a||(v.a=y.a),v.b||(v.b=y.b),a(v,f,f._defaultColor,l._fullLayout)}var T=i(l,f);return o(f,f._z),T}};function i(l,f){var x=f._carpetTrace,y=x.aaxis,v=x.baxis,T,u,b,_,P,M,C;y._minDtick=0,v._minDtick=0,g.isArray1D(f.z)&&I(f,y,v,"a","b",["z"]),T=f._a=f._a||f.a,_=f._b=f._b||f.b,T=T?y.makeCalcdata(f,"_a"):[],_=_?v.makeCalcdata(f,"_b"):[],u=f.a0||0,b=f.da||1,P=f.b0||0,M=f.db||1,C=f._z=S(f._z||f.z,f.transpose),f._emptypoints=e(C),t(C,f._emptypoints);var A=g.maxRowLength(C),h=f.xtype==="scaled"?"":T,p=r(f,h,u,b,A,y),k=f.ytype==="scaled"?"":_,w=r(f,k,P,M,C.length,v),R={a:p,b:w,z:C};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&c(l,f,{vals:C,containerStr:"",cLetter:"z"}),[R]}}),b$=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b=c(S)?"a":"b",_=b==="a"?g.aaxis:g.baxis,P=_.smoothing,M=b==="a"?g.a2i:g.b2j,C=b==="a"?S:t,A=b==="a"?t:S,h=b==="a"?I.a.length:I.b.length,p=b==="a"?I.b.length:I.a.length,k=Math.floor(b==="a"?g.b2j(A):g.a2i(A)),w=b==="a"?function(yt){return g.evalxy([],yt,k)}:function(yt){return g.evalxy([],k,yt)};P&&(a=Math.max(0,Math.min(p-2,k)),n=k-a,r=b==="a"?function(yt,mt){return g.dxydi([],yt,a,mt,n)}:function(yt,mt){return g.dxydj([],a,yt,n,mt)});var R=M(C[0]),O=M(C[1]),j=R0?Math.floor:Math.ceil,F=j>0?Math.ceil:Math.floor,U=j>0?Math.min:Math.max,W=j>0?Math.max:Math.min,q=H(R+V),J=F(O-V);l=w(R);var lt=[[l]];for(e=q;e*j{var c=qr(),g=WE(),I=qE(),S=Vs(),t=kn(),e=f7(),r=d7(),a=ak(),n=Yw(),o=m7(),i=p7(),l=g7(),f=ET(),x=b$();Z.exports=function(A,h,p,k){var w=h.xaxis,R=h.yaxis;t.makeTraceGroups(k,p,"contour").each(function(O){var j=c.select(this),V=O[0],H=V.trace,F=H._carpetTrace=f(A,H),U=A.calcdata[F.index][0];if(!F.visible||F.visible==="legendonly")return;var W=V.a,q=V.b,J=H.contours,lt=i(J,h,V),yt=J.type==="constraint",mt=J._operation,st=yt?mt==="="?"lines":"fill":J.coloring;function tt(Pt){var qt=F.ab2xy(Pt[0],Pt[1],!0);return[w.c2p(qt[0]),R.c2p(qt[1])]}var dt=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];e(lt);var rt=(W[W.length-1]-W[0])*1e-8,at=(q[q.length-1]-q[0])*1e-8;r(lt,rt,at);var vt=lt;J.type==="constraint"&&(vt=o(lt,mt)),y(lt,tt);var it,Y,ft,ut,kt=[];for(ut=U.clipsegments.length-1;ut>=0;ut--)it=U.clipsegments[ut],Y=g([],it.x,w.c2p),ft=g([],it.y,R.c2p),Y.reverse(),ft.reverse(),kt.push(I(Y,ft,it.bicubic));var It="M"+kt.join("L")+"Z";P(j,U.clipsegments,w,R,yt,st),M(H,j,w,R,vt,dt,tt,F,U,st,It),v(j,lt,A,V,J,h,F),S.setClipUrl(j,F._clipPathId,A)})};function y(A,h){var p,k,w,R,O,j,V,H,F;for(p=0;pyt&&(k.max=yt),k.len=k.max-k.min}function u(A,h,p){var k=A.getPointAtLength(h),w=A.getPointAtLength(p),R=w.x-k.x,O=w.y-k.y,j=Math.sqrt(R*R+O*O);return[R/j,O/j]}function b(A){var h=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/h,A[1]/h]}function _(A,h){var p=Math.abs(A[0]*h[0]+A[1]*h[1]),k=Math.sqrt(1-p*p);return k/p}function P(A,h,p,k,w,R){var O,j,V,H,F=t.ensureSingle(A,"g","contourbg"),U=F.selectAll("path").data(R==="fill"&&!w?[0]:[]);U.enter().append("path"),U.exit().remove();var W=[];for(H=0;H=0&&(q=ft,lt=yt):Math.abs(W[1]-q[1])=0&&(q=ft,lt=yt):t.log("endpt to newendpt is not vert. or horz.",W,q,ft)}if(lt>=0)break;H+=it(W,q),W=q}if(lt===h.edgepaths.length){t.log("unclosed perimeter path");break}V=lt,U=F.indexOf(V)===-1,U&&(V=F[0],H+=it(W,q)+"Z",W=null)}for(V=0;V{Z.exports={attributes:ZE(),supplyDefaults:GE(),colorbar:sk(),calc:_$(),plot:w$(),style:ok(),moduleType:"trace",name:"contourcarpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}),T$=Dt((Q,Z)=>{Z.exports=k$()}),CT=Dt((Q,Z)=>{var c=kn().extendFlat,g=ef(),I=dh().axisHoverFormat,S=kd().dash,t=us(),e=rb(),r=e.INCREASING.COLOR,a=e.DECREASING.COLOR,n=g.line;function o(i){return{line:{color:c({},n.color,{dflt:i}),width:n.width,dash:S,editType:"style"},editType:"style"}}Z.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.xperiodalignment,xhoverformat:I("x"),yhoverformat:I("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:c({},n.width,{}),dash:c({},S,{}),editType:"style"},increasing:o(r),decreasing:o(a),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:c({},t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:g.zorder}}),YE=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("open"),n=t("high"),o=t("low"),i=t("close");t("hoverlabel.split");var l=c.getComponentMethod("calendars","handleTraceDefaults");if(l(I,S,["x"],e),!!(a&&n&&o&&i)){var f=Math.min(a.length,n.length,o.length,i.length);return r&&(f=Math.min(f,g.minRowLength(r))),S._length=f,f}}}),A$=Dt((Q,Z)=>{var c=kn(),g=YE(),I=Rp(),S=CT();Z.exports=function(e,r,a,n){function o(l,f){return c.coerce(e,r,S,l,f)}var i=g(e,r,o,n);if(!i){r.visible=!1;return}I(e,r,n,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(e,r,o,"increasing"),t(e,r,o,"decreasing"),o("text"),o("hovertext"),o("tickwidth"),n._requestRangeslider[r.xaxis]=!0,o("zorder")};function t(e,r,a,n){a(n+".line.color"),a(n+".line.width",r.line.width),a(n+".line.dash",r.line.dash)}}),KE=Dt((Q,Z)=>{var c=kn(),g=c._,I=Ls(),S=D0(),t=Ca().BADNUM;function e(o,i){var l=I.getFromId(o,i.xaxis),f=I.getFromId(o,i.yaxis),x=n(o,l,i),y=i._minDiff;i._minDiff=null;var v=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var u=a(o,i,v,T,f,r);return i._extremes[l._id]=I.findExtremes(l,T,{vpad:y/2}),u.length?(c.extendFlat(u[0].t,{wHover:y/2,tickLen:x}),u):[{t:{empty:!0}}]}function r(o,i,l,f){return{o,h:i,l,c:f}}function a(o,i,l,f,x,y){for(var v=x.makeCalcdata(i,"open"),T=x.makeCalcdata(i,"high"),u=x.makeCalcdata(i,"low"),b=x.makeCalcdata(i,"close"),_=c.isArrayOrTypedArray(i.text),P=c.isArrayOrTypedArray(i.hovertext),M=!0,C=null,A=!!i.xperiodalignment,h=[],p=0;pC):M=j>w,C=j;var V=y(w,R,O,j);V.pos=k,V.yc=(w+j)/2,V.i=p,V.dir=M?"increasing":"decreasing",V.x=V.pos,V.y=[O,R],A&&(V.orig_p=l[p]),_&&(V.tx=i.text[p]),P&&(V.htx=i.hovertext[p]),h.push(V)}else h.push({pos:k,empty:!0})}return i._extremes[x._id]=I.findExtremes(x,c.concat(u,T),{padded:!0}),h.length&&(h[0].t={labels:{open:g(o,"open:")+" ",high:g(o,"high:")+" ",low:g(o,"low:")+" ",close:g(o,"close:")+" "}}),h}function n(o,i,l){var f=l._minDiff;if(!f){var x=o._fullData,y=[];f=1/0;var v;for(v=0;v{var c=qr(),g=kn();Z.exports=function(I,S,t,e){var r=S.yaxis,a=S.xaxis,n=!!a.rangebreaks;g.makeTraceGroups(e,t,"trace ohlc").each(function(o){var i=c.select(this),l=o[0],f=l.t,x=l.trace;if(x.visible!==!0||f.empty){i.remove();return}var y=f.tickLen,v=i.selectAll("path").data(g.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(T){if(T.empty)return"M0,0Z";var u=a.c2p(T.pos-y,!0),b=a.c2p(T.pos+y,!0),_=n?(u+b)/2:a.c2p(T.pos,!0),P=r.c2p(T.o,!0),M=r.c2p(T.h,!0),C=r.c2p(T.l,!0),A=r.c2p(T.c,!0);return"M"+u+","+P+"H"+_+"M"+_+","+M+"V"+C+"M"+b+","+A+"H"+_})})}}),S$=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=hi();Z.exports=function(S,t,e){var r=e||c.select(S).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var n=a[0].trace;c.select(this).selectAll("path").each(function(o){if(!o.empty){var i=n[o.dir].line;c.select(this).style("fill","none").call(I.stroke,i.color).call(g.dashLine,i.dash,i.width).style("opacity",n.selectedpoints&&!o.selected?.3:1)}})})}}),XE=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=hi(),t=kn().fillText,e=rb(),r={increasing:e.INCREASING.SYMBOL,decreasing:e.DECREASING.SYMBOL};function a(l,f,x,y){var v=l.cd,T=v[0].trace;return T.hoverlabel.split?o(l,f,x,y):i(l,f,x,y)}function n(l,f,x,y){var v=l.cd,T=l.xa,u=v[0].trace,b=v[0].t,_=u.type,P=_==="ohlc"?"l":"min",M=_==="ohlc"?"h":"max",C,A,h=b.bPos||0,p=function(J){return J.pos+h-f},k=b.bdPos||b.tickLen,w=b.wHover,R=Math.min(1,k/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));C=l.maxHoverDistance-R,A=l.maxSpikeDistance-R;function O(J){var lt=p(J);return I.inbox(lt-w,lt+w,C)}function j(J){var lt=J[P],yt=J[M];return lt===yt||I.inbox(lt-x,yt-x,C)}function V(J){return(O(J)+j(J))/2}var H=I.getDistanceFunction(y,O,j,V);if(I.getClosest(v,H,l),l.index===!1)return null;var F=v[l.index];if(F.empty)return null;var U=F.dir,W=u[U],q=W.line.color;return S.opacity(q)&&W.line.width?l.color=q:l.color=W.fillcolor,l.x0=T.c2p(F.pos+h-k,!0),l.x1=T.c2p(F.pos+h+k,!0),l.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,l.spikeDistance=V(F)*A/C,l.xSpike=T.c2p(F.pos,!0),l}function o(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=[],P=n(l,f,x,y);if(!P)return[];var M=P.index,C=v[M],A=C.hi||u.hoverinfo,h=A.split("+"),p=A==="all",k=p||h.indexOf("y")!==-1;if(!k)return[];for(var w=["high","open","close","low"],R={},O=0;O"+b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat)):(F=g.extendFlat({},P),F.y0=F.y1=H,F.yLabelVal=V,F.yLabel=b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat),F.name="",_.push(F),R[V]=F)}return _}function i(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=n(l,f,x,y);if(!_)return[];var P=_.index,M=v[P],C=_.index=M.i,A=M.dir;function h(V){return b.labels[V]+c.hoverLabelText(T,u[V][C],u.yhoverformat)}var p=M.hi||u.hoverinfo,k=p.split("+"),w=p==="all",R=w||k.indexOf("y")!==-1,O=w||k.indexOf("text")!==-1,j=R?[h("open"),h("high"),h("low"),h("close")+" "+r[A]]:[];return O&&t(M,u,j),_.extraText=j.join("
"),_.y0=_.y1=T.c2p(M.yc,!0),[_]}Z.exports={hoverPoints:a,hoverSplit:o,hoverOnPoints:i}}),JE=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a=I[0].t.bPos||0;if(g===!1)for(r=0;r{Z.exports={moduleType:"trace",name:"ohlc",basePlotModule:Mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:CT(),supplyDefaults:A$(),calc:KE().calc,plot:M$(),style:S$(),hoverPoints:XE().hoverPoints,selectPoints:JE()}}),C$=Dt((Q,Z)=>{Z.exports=E$()}),QE=Dt((Q,Z)=>{var c=kn().extendFlat,g=dh().axisHoverFormat,I=CT(),S=Hw();function t(e){return{line:{color:c({},S.line.color,{dflt:e}),width:S.line.width,editType:"style"},fillcolor:S.fillcolor,editType:"style"}}Z.exports={xperiod:I.xperiod,xperiod0:I.xperiod0,xperiodalignment:I.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:I.x,open:I.open,high:I.high,low:I.low,close:I.close,line:{width:c({},S.line.width,{}),editType:"style"},increasing:t(I.increasing.line.color.dflt),decreasing:t(I.decreasing.line.color.dflt),text:I.text,hovertext:I.hovertext,whiskerwidth:c({},S.whiskerwidth,{dflt:0}),hoverlabel:I.hoverlabel,zorder:S.zorder}}),L$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=YE(),S=Rp(),t=QE();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,t,f,x)}var l=I(r,a,i,o);if(!l){a.visible=!1;return}S(r,a,o,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),e(r,a,i,"increasing"),e(r,a,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),o._requestRangeslider[a.xaxis]=!0,i("zorder")};function e(r,a,n,o){var i=n(o+".line.color");n(o+".line.width",a.line.width),n(o+".fillcolor",g.addOpacity(i,.5))}}),P$=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=D0(),S=KE().calcCommon;Z.exports=function(e,r){var a=e._fullLayout,n=g.getFromId(e,r.xaxis),o=g.getFromId(e,r.yaxis),i=n.makeCalcdata(r,"x"),l=I(r,n,"x",i).vals,f=S(e,r,i,l,o,t);return f.length?(c.extendFlat(f[0].t,{num:a._numBoxes,dPos:c.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),a._numBoxes++,f):[{t:{empty:!0}}]};function t(e,r,a,n){return{min:a,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:r}}}),I$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"candlestick",basePlotModule:Mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:QE(),layoutAttributes:Ww(),supplyLayoutDefaults:N6().supplyLayoutDefaults,crossTraceCalc:j6().crossTraceCalc,supplyDefaults:L$(),calc:P$(),plot:U6().plot,layerName:"boxlayer",style:V6().style,hoverPoints:XE().hoverPoints,selectPoints:JE()}}),z$=Dt((Q,Z)=>{Z.exports=I$()}),tC=Dt((Q,Z)=>{var c=kn(),g=i0(),I=c.deg2rad,S=c.rad2deg;Z.exports=function(n,o,i){switch(g(n,i),n._id){case"x":case"radialaxis":t(n,o);break;case"angularaxis":a(n,o);break}};function t(n,o){var i=o._subplot;n.setGeometry=function(){var l=n._rl[0],f=n._rl[1],x=i.innerRadius,y=(i.radius-x)/(f-l),v=x/y,T=l>f?function(u){return u<=0}:function(u){return u>=0};n.c2g=function(u){var b=n.c2l(u)-l;return(T(b)?b:0)+v},n.g2c=function(u){return n.l2c(u+l-v)},n.g2p=function(u){return u*y},n.c2p=function(u){return n.g2p(n.c2g(u))}}}function e(n,o){return o==="degrees"?I(n):n}function r(n,o){return o==="degrees"?S(n):n}function a(n,o){var i=n.type;if(i==="linear"){var l=n.d2c,f=n.c2d;n.d2c=function(x,y){return e(l(x),y)},n.c2d=function(x,y){return f(r(x,y))}}n.makeCalcdata=function(x,y){var v=x[y],T=x._length,u,b,_=function(h){return n.d2c(h,x.thetaunit)};if(v)for(u=new Array(T),b=0;b{Z.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}}),PT=Dt((Q,Z)=>{var c=kn(),g=mm().tester,I=c.findIndexOfMin,S=c.isAngleInsideSector,t=c.angleDelta,e=c.angleDist;function r(b,_,P,M,C){if(!S(_,M))return!1;var A,h;P[0]0?h:1/0},M=I(_,P),C=c.mod(M+1,_.length);return[_[M],_[C]]}function y(b){return Math.abs(b)>1e-10?b:0}function v(b,_,P){_=_||0,P=P||0;for(var M=b.length,C=new Array(M),A=0;A{function c(r){return r<0?-1:r>0?1:0}function g(r){var a=r[0],n=r[1];if(!isFinite(a)||!isFinite(n))return[1,0];var o=(a+1)*(a+1)+n*n;return[(a*a+n*n-1)/o,2*n/o]}function I(r,a){var n=a[0],o=a[1];return[n*r.radius+r.cx,-o*r.radius+r.cy]}function S(r,a){return a*r.radius}function t(r,a,n,o){var i=I(r,g([n,a])),l=i[0],f=i[1],x=I(r,g([o,a])),y=x[0],v=x[1];if(a===0)return["M"+l+","+f,"L"+y+","+v].join(" ");var T=S(r,1/Math.abs(a));return["M"+l+","+f,"A"+T+","+T+" 0 0,"+(a<0?1:0)+" "+y+","+v].join(" ")}function e(r,a,n,o){var i=S(r,1/(a+1)),l=I(r,g([a,n])),f=l[0],x=l[1],y=I(r,g([a,o])),v=y[0],T=y[1];if(c(n)!==c(o)){var u=I(r,g([a,0])),b=u[0],_=u[1];return["M"+f+","+x,"A"+i+","+i+" 0 0,"+(0{var c=qr(),g=ro(),I=Jo(),S=kn(),t=S.strRotate,e=S.strTranslate,r=hi(),a=Vs(),n=Kc(),o=Ls(),i=i0(),l=tC(),f=Y0().doAutoRange,x=C1(),y=up(),v=tf(),T=lp(),u=vf().prepSelect,b=vf().selectOnClick,_=vf().clearOutline,P=P0(),M=mv(),C=y0().redrawReglTraces,A=Af().MID_SHIFT,h=LT(),p=PT(),k=eC(),w=k.smith,R=k.reactanceArc,O=k.resistanceArc,j=k.smithTransform,V=S._,H=S.mod,F=S.deg2rad,U=S.rad2deg;function W(st,tt,dt){this.isSmith=dt||!1,this.id=tt,this.gd=st,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var rt=st._fullLayout,at="clip"+rt._uid+tt;this.clipIds.forTraces=at+"-for-traces",this.clipPaths.forTraces=rt._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=rt["_"+(dt?"smith":"polar")+"layer"].append("g").attr("class",tt),this.getHole=function(vt){return this.isSmith?0:vt.hole},this.getSector=function(vt){return this.isSmith?[0,360]:vt.sector},this.getRadial=function(vt){return this.isSmith?vt.realaxis:vt.radialaxis},this.getAngular=function(vt){return this.isSmith?vt.imaginaryaxis:vt.angularaxis},dt||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=W.prototype;Z.exports=function(st,tt,dt){return new W(st,tt,dt)},q.plot=function(st,tt){for(var dt=this,rt=tt[dt.id],at=!1,vt=0;vtge?(fe=ut,pe=ut*ge,Lt=(kt-pe)/at.h/2,se=[Y[0],Y[1]],Tt=[ft[0]+Lt,ft[1]-Lt]):(fe=kt/ge,pe=kt,Lt=(ut-fe)/at.w/2,se=[Y[0]+Lt,Y[1]-Lt],Tt=[ft[0],ft[1]]),dt.xLength2=fe,dt.yLength2=pe,dt.xDomain2=se,dt.yDomain2=Tt;var Mt=dt.xOffset2=at.l+at.w*se[0],ee=dt.yOffset2=at.t+at.h*(1-Tt[1]),ve=dt.radius=fe/qt,oe=dt.innerRadius=dt.getHole(tt)*ve,Te=dt.cx=Mt-ve*Pt[0],He=dt.cy=ee+ve*Pt[3],Ge=dt.cxx=Te-Mt,cr=dt.cyy=He-ee,ur=vt.side,jr;ur==="counterclockwise"?(jr=ur,ur="top"):ur==="clockwise"&&(jr=ur,ur="bottom"),dt.radialAxis=dt.mockAxis(st,tt,vt,{_id:"x",side:ur,_trueSide:jr,domain:[oe/at.w,ve/at.w]}),dt.angularAxis=dt.mockAxis(st,tt,it,{side:"right",domain:[0,Math.PI],autorange:!1}),dt.doAutoRange(st,tt),dt.updateAngularAxis(st,tt),dt.updateRadialAxis(st,tt),dt.updateRadialAxisTitle(st,tt),dt.xaxis=dt.mockCartesianAxis(st,tt,{_id:"x",domain:se}),dt.yaxis=dt.mockCartesianAxis(st,tt,{_id:"y",domain:Tt});var Wr=dt.pathSubplot();dt.clipPaths.forTraces.select("path").attr("d",Wr).attr("transform",e(Ge,cr)),rt.frontplot.attr("transform",e(Mt,ee)).call(a.setClipUrl,dt._hasClipOnAxisFalse?null:dt.clipIds.forTraces,dt.gd),rt.bg.attr("d",Wr).attr("transform",e(Te,He)).call(r.fill,tt.bgcolor)},q.mockAxis=function(st,tt,dt,rt){var at=S.extendFlat({},dt,rt);return l(at,tt,st),at},q.mockCartesianAxis=function(st,tt,dt){var rt=this,at=rt.isSmith,vt=dt._id,it=S.extendFlat({type:"linear"},dt);i(it,st);var Y={x:[0,2],y:[1,3]};return it.setRange=function(){var ft=rt.sectorBBox,ut=Y[vt],kt=rt.radialAxis._rl,It=(kt[1]-kt[0])/(1-rt.getHole(tt));it.range=[ft[ut[0]]*It,ft[ut[1]]*It]},it.isPtWithinRange=vt==="x"&&!at?function(ft){return rt.isPtInside(ft)}:function(){return!0},it.setRange(),it.setScale(),it},q.doAutoRange=function(st,tt){var dt=this,rt=dt.gd,at=dt.radialAxis,vt=dt.getRadial(tt);f(rt,at);var it=at.range;if(vt.range=it.slice(),vt._input.range=it.slice(),at._rl=[at.r2l(it[0],null,"gregorian"),at.r2l(it[1],null,"gregorian")],at.minallowed!==void 0){var Y=at.r2l(at.minallowed);at._rl[0]>at._rl[1]?at._rl[1]=Math.max(at._rl[1],Y):at._rl[0]=Math.max(at._rl[0],Y)}if(at.maxallowed!==void 0){var ft=at.r2l(at.maxallowed);at._rl[0]90&&kt<=270&&(It.tickangle=180);var Wt=qt?function(ve){var oe=j(dt,w([ve.x,0]));return e(oe[0]-Y,oe[1]-ft)}:function(ve){return e(It.l2p(ve.x)+it,0)},Jt=qt?function(ve){return O(dt,ve.x,-1/0,1/0)}:function(ve){return dt.pathArc(It.r2p(ve.x)+it)},ge=J(ut);if(dt.radialTickLayout!==ge&&(at["radial-axis"].selectAll(".xtick").remove(),dt.radialTickLayout=ge),Pt){It.setScale();var fe=0,pe=qt?(It.tickvals||[]).filter(function(ve){return ve>=0}).map(function(ve){return o.tickText(It,ve,!0,!1)}):o.calcTicks(It),se=qt?pe:o.clipEnds(It,pe),Tt=o.getTickSigns(It)[2];qt&&((It.ticks==="top"&&It.side==="bottom"||It.ticks==="bottom"&&It.side==="top")&&(Tt=-Tt),It.ticks==="top"&&It.side==="top"&&(fe=-It.ticklen),It.ticks==="bottom"&&It.side==="bottom"&&(fe=It.ticklen)),o.drawTicks(rt,It,{vals:pe,layer:at["radial-axis"],path:o.makeTickPath(It,0,Tt),transFn:Wt,crisp:!1}),o.drawGrid(rt,It,{vals:se,layer:at["radial-grid"],path:Jt,transFn:S.noop,crisp:!1}),o.drawLabels(rt,It,{vals:pe,layer:at["radial-axis"],transFn:Wt,labelFns:o.makeLabelFns(It,fe)})}var Lt=dt.radialAxisAngle=dt.vangles?U(yt(F(ut.angle),dt.vangles)):ut.angle,Mt=e(Y,ft),ee=Mt+t(-Lt);mt(at["radial-axis"],Pt&&(ut.showticklabels||ut.ticks),{transform:ee}),mt(at["radial-grid"],Pt&&ut.showgrid,{transform:qt?"":Mt}),mt(at["radial-line"].select("line"),Pt&&ut.showline,{x1:qt?-vt:it,y1:0,x2:vt,y2:0,transform:ee}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateRadialAxisTitle=function(st,tt,dt){if(!this.isSmith){var rt=this,at=rt.gd,vt=rt.radius,it=rt.cx,Y=rt.cy,ft=rt.getRadial(tt),ut=rt.id+"title",kt=0;if(ft.title){var It=a.bBox(rt.layers["radial-axis"].node()).height,Pt=ft.title.font.size,qt=ft.side;kt=qt==="top"?Pt:qt==="counterclockwise"?-(It+Pt*.4):It+Pt*.8}var Wt=dt!==void 0?dt:rt.radialAxisAngle,Jt=F(Wt),ge=Math.cos(Jt),fe=Math.sin(Jt),pe=it+vt/2*ge+kt*fe,se=Y-vt/2*fe+kt*ge;rt.layers["radial-axis-title"]=T.draw(at,ut,{propContainer:ft,propName:rt.id+".radialaxis.title.text",placeholder:V(at,"Click to enter radial axis title"),attributes:{x:pe,y:se,"text-anchor":"middle"},transform:{rotate:-Wt}})}},q.updateAngularAxis=function(st,tt){var dt=this,rt=dt.gd,at=dt.layers,vt=dt.radius,it=dt.innerRadius,Y=dt.cx,ft=dt.cy,ut=dt.getAngular(tt),kt=dt.angularAxis,It=dt.isSmith;It||(dt.fillViewInitialKey("angularaxis.rotation",ut.rotation),kt.setGeometry(),kt.setScale());var Pt=It?function(oe){var Te=j(dt,w([0,oe.x]));return Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2}:function(oe){return kt.t2g(oe.x)};kt.type==="linear"&&kt.thetaunit==="radians"&&(kt.tick0=U(kt.tick0),kt.dtick=U(kt.dtick));var qt=function(oe){return e(Y+vt*Math.cos(oe),ft-vt*Math.sin(oe))},Wt=It?function(oe){var Te=j(dt,w([0,oe.x]));return e(Te[0],Te[1])}:function(oe){return qt(Pt(oe))},Jt=It?function(oe){var Te=j(dt,w([0,oe.x])),He=Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2;return e(Te[0],Te[1])+t(-U(He))}:function(oe){var Te=Pt(oe);return qt(Te)+t(-U(Te))},ge=It?function(oe){return R(dt,oe.x,0,1/0)}:function(oe){var Te=Pt(oe),He=Math.cos(Te),Ge=Math.sin(Te);return"M"+[Y+it*He,ft-it*Ge]+"L"+[Y+vt*He,ft-vt*Ge]},fe=o.makeLabelFns(kt,0),pe=fe.labelStandoff,se={};se.xFn=function(oe){var Te=Pt(oe);return Math.cos(Te)*pe},se.yFn=function(oe){var Te=Pt(oe),He=Math.sin(Te)>0?.2:1;return-Math.sin(Te)*(pe+oe.fontSize*He)+Math.abs(Math.cos(Te))*(oe.fontSize*A)},se.anchorFn=function(oe){var Te=Pt(oe),He=Math.cos(Te);return Math.abs(He)<.1?"middle":He>0?"start":"end"},se.heightFn=function(oe,Te,He){var Ge=Pt(oe);return-.5*(1+Math.sin(Ge))*He};var Tt=J(ut);dt.angularTickLayout!==Tt&&(at["angular-axis"].selectAll("."+kt._id+"tick").remove(),dt.angularTickLayout=Tt);var Lt=It?[1/0].concat(kt.tickvals||[]).map(function(oe){return o.tickText(kt,oe,!0,!1)}):o.calcTicks(kt);It&&(Lt[0].text="∞",Lt[0].fontSize*=1.75);var Mt;if(tt.gridshape==="linear"?(Mt=Lt.map(Pt),S.angleDelta(Mt[0],Mt[1])<0&&(Mt=Mt.slice().reverse())):Mt=null,dt.vangles=Mt,kt.type==="category"&&(Lt=Lt.filter(function(oe){return S.isAngleInsideSector(Pt(oe),dt.sectorInRad)})),kt.visible){var ee=kt.ticks==="inside"?-1:1,ve=(kt.linewidth||1)/2;o.drawTicks(rt,kt,{vals:Lt,layer:at["angular-axis"],path:"M"+ee*ve+",0h"+ee*kt.ticklen,transFn:Jt,crisp:!1}),o.drawGrid(rt,kt,{vals:Lt,layer:at["angular-grid"],path:ge,transFn:S.noop,crisp:!1}),o.drawLabels(rt,kt,{vals:Lt,layer:at["angular-axis"],repositionOnUpdate:!0,transFn:Wt,labelFns:se})}mt(at["angular-line"].select("path"),ut.showline,{d:dt.pathSubplot(),transform:e(Y,ft)}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateFx=function(st,tt){if(!this.gd._context.staticPlot){var dt=!this.isSmith;dt&&(this.updateAngularDrag(st),this.updateRadialDrag(st,tt,0),this.updateRadialDrag(st,tt,1)),this.updateHoverAndMainDrag(st)}},q.updateHoverAndMainDrag=function(st){var tt=this,dt=tt.isSmith,rt=tt.gd,at=tt.layers,vt=st._zoomlayer,it=h.MINZOOM,Y=h.OFFEDGE,ft=tt.radius,ut=tt.innerRadius,kt=tt.cx,It=tt.cy,Pt=tt.cxx,qt=tt.cyy,Wt=tt.sectorInRad,Jt=tt.vangles,ge=tt.radialAxis,fe=p.clampTiny,pe=p.findXYatLength,se=p.findEnclosingVertexAngles,Tt=h.cornerHalfWidth,Lt=h.cornerLen/2,Mt,ee,ve=x.makeDragger(at,"path","maindrag",st.dragmode===!1?"none":"crosshair");c.select(ve).attr("d",tt.pathSubplot()).attr("transform",e(kt,It)),ve.onmousemove=function(Ar){v.hover(rt,Ar,tt.id),rt._fullLayout._lasthover=ve,rt._fullLayout._hoversubplot=tt.id},ve.onmouseout=function(Ar){rt._dragging||y.unhover(rt,Ar)};var oe={element:ve,gd:rt,subplot:tt.id,plotinfo:{id:tt.id,xaxis:tt.xaxis,yaxis:tt.yaxis},xaxes:[tt.xaxis],yaxes:[tt.yaxis]},Te,He,Ge,cr,ur,jr,Wr,br,Xr;function nn(Ar,mr){return Math.sqrt(Ar*Ar+mr*mr)}function Le(Ar,mr){return nn(Ar-Pt,mr-qt)}function Gt(Ar,mr){return Math.atan2(qt-mr,Ar-Pt)}function ne(Ar,mr){return[Ar*Math.cos(mr),Ar*Math.sin(-mr)]}function Ct(Ar,mr){if(Ar===0)return tt.pathSector(2*Tt);var Qr=Lt/Ar,Hn=mr-Qr,Wn=mr+Qr,Xn=Math.max(0,Math.min(Ar,ft)),Ii=Xn-Tt,oi=Xn+Tt;return"M"+ne(Ii,Hn)+"A"+[Ii,Ii]+" 0,0,0 "+ne(Ii,Wn)+"L"+ne(oi,Wn)+"A"+[oi,oi]+" 0,0,1 "+ne(oi,Hn)+"Z"}function gt(Ar,mr,Qr){if(Ar===0)return tt.pathSector(2*Tt);var Hn=ne(Ar,mr),Wn=ne(Ar,Qr),Xn=fe((Hn[0]+Wn[0])/2),Ii=fe((Hn[1]+Wn[1])/2),oi,$n;if(Xn&&Ii){var sa=Ii/Xn,Zi=-1/sa,We=pe(Tt,sa,Xn,Ii);oi=pe(Lt,Zi,We[0][0],We[0][1]),$n=pe(Lt,Zi,We[1][0],We[1][1])}else{var nr,fr;Ii?(nr=Lt,fr=Tt):(nr=Tt,fr=Lt),oi=[[Xn-nr,Ii-fr],[Xn+nr,Ii-fr]],$n=[[Xn-nr,Ii+fr],[Xn+nr,Ii+fr]]}return"M"+oi.join("L")+"L"+$n.reverse().join("L")+"Z"}function St(){Ge=null,cr=null,ur=tt.pathSubplot(),jr=!1;var Ar=rt._fullLayout[tt.id];Wr=g(Ar.bgcolor).getLuminance(),br=x.makeZoombox(vt,Wr,kt,It,ur),br.attr("fill-rule","evenodd"),Xr=x.makeCorners(vt,kt,It),_(rt)}function Nt(Ar,mr){return mr=Math.max(Math.min(mr,ft),ut),Arit?(Ar-1&&Ar===1&&b(mr,rt,[tt.xaxis],[tt.yaxis],tt.id,oe),Qr.indexOf("event")>-1&&v.click(rt,mr,tt.id)}oe.prepFn=function(Ar,mr,Qr){var Hn=rt._fullLayout.dragmode,Wn=ve.getBoundingClientRect();rt._fullLayout._calcInverseTransform(rt);var Xn=rt._fullLayout._invTransform;Mt=rt._fullLayout._invScaleX,ee=rt._fullLayout._invScaleY;var Ii=S.apply3DTransform(Xn)(mr-Wn.left,Qr-Wn.top);if(Te=Ii[0],He=Ii[1],Jt){var oi=p.findPolygonOffset(ft,Wt[0],Wt[1],Jt);Te+=Pt+oi[0],He+=qt+oi[1]}switch(Hn){case"zoom":oe.clickFn=Sr,dt||(Jt?oe.moveFn=Ue:oe.moveFn=le,oe.doneFn=qe,St());break;case"select":case"lasso":u(Ar,mr,Qr,oe,Hn);break}},y.init(oe)},q.updateRadialDrag=function(st,tt,dt){var rt=this,at=rt.gd,vt=rt.layers,it=rt.radius,Y=rt.innerRadius,ft=rt.cx,ut=rt.cy,kt=rt.radialAxis,It=h.radialDragBoxSize,Pt=It/2;if(!kt.visible)return;var qt=F(rt.radialAxisAngle),Wt=kt._rl,Jt=Wt[0],ge=Wt[1],fe=Wt[dt],pe=.75*(Wt[1]-Wt[0])/(1-rt.getHole(tt))/it,se,Tt,Lt;dt?(se=ft+(it+Pt)*Math.cos(qt),Tt=ut-(it+Pt)*Math.sin(qt),Lt="radialdrag"):(se=ft+(Y-Pt)*Math.cos(qt),Tt=ut-(Y-Pt)*Math.sin(qt),Lt="radialdrag-inner");var Mt=x.makeRectDragger(vt,Lt,"crosshair",-Pt,-Pt,It,It),ee={element:Mt,gd:at};st.dragmode===!1&&(ee.dragmode=!1),mt(c.select(Mt),kt.visible&&Y0!=(dt?Te>Jt:Te=90||at>90&&vt>=450?qt=1:Y<=0&&ut<=0?qt=0:qt=Math.max(Y,ut),at<=180&&vt>=180||at>180&&vt>=540?kt=-1:it>=0&&ft>=0?kt=0:kt=Math.min(it,ft),at<=270&&vt>=270||at>270&&vt>=630?It=-1:Y>=0&&ut>=0?It=0:It=Math.min(Y,ut),vt>=360?Pt=1:it<=0&&ft<=0?Pt=0:Pt=Math.max(it,ft),[kt,It,Pt,qt]}function yt(st,tt){var dt=function(at){return S.angleDist(st,at)},rt=S.findIndexOfMin(tt,dt);return tt[rt]}function mt(st,tt,dt){return tt?(st.attr("display",null),st.attr(dt)):st&&st.attr("display","none"),st}}),nC=Dt((Q,Z)=>{var c=wi(),g=Td(),I=jh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,minorloglabels:g.minorloglabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),a={visible:S({},g.visible,{dflt:!0}),type:S({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},autorange:S({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},g.minallowed,{editType:"plot"}),maxallowed:S({},g.maxallowed,{editType:"plot"}),range:S({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:g.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},g.title.text,{editType:"plot",dflt:""}),font:S({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,r);var n={visible:S({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.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:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(n,e,r),Z.exports={domain:I({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:c.background},radialaxis:a,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),O$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=z1(),t=ud().getSubplotData,e=yg(),r=xg(),a=n0(),n=dm(),o=Wm(),i=Qy(),l=bw(),f=dv(),x=nC(),y=tC(),v=LT(),T=v.axisNames;function u(_,P,M,C){var A=M("bgcolor");C.bgColor=g.combine(A,C.paper_bgcolor);var h=M("sector");M("hole");var p=t(C.fullData,v.name,C.id),k=C.layoutOut,w;function R(It,Pt){return M(w+"."+It,Pt)}for(var O=0;O{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=rC(),S=LT(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=I0(),e=ef(),r=Ho(),a=e.line;Z.exports={mode:e.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:e.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),zT=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=z3();function o(l,f,x,y){function v(b,_){return c.coerce(l,f,n,b,_)}var T=i(l,f,y,v);if(!T){f.visible=!1;return}v("thetaunit"),v("mode",T{var c=kn(),g=Ls();Z.exports=function(I,S,t){var e={},r=t[S.subplot]._subplot,a,n;r?(a=r.radialAxis,n=r.angularAxis):(r=t[S.subplot],a=r.radialaxis,n=r.angularaxis);var o=a.c2l(I.r);e.rLabel=g.tickText(a,o,!0).text;var i=n.thetaunit==="degrees"?c.rad2deg(I.theta):I.theta;return e.thetaLabel=g.tickText(n,i,!0).text,e}}),D$=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=Ls(),S=F0(),t=ct(),e=Bt(),r=me().calcMarkerSize;Z.exports=function(a,n){for(var o=a._fullLayout,i=n.subplot,l=o[i].radialaxis,f=o[i].angularaxis,x=l.makeCalcdata(n,"r"),y=f.makeCalcdata(n,"theta"),v=n._length,T=new Array(v),u=0;u{var c=Ka(),g=Ca().BADNUM;Z.exports=function(I,S,t){for(var e=S.layers.frontplot.select("g.scatterlayer"),r=S.xaxis,a=S.yaxis,n={xaxis:r,yaxis:a,plot:S.framework,layerClipId:S._hasClipOnAxisFalse?S.clipIds.forTraces:null},o=S.radialAxis,i=S.angularAxis,l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="r",n._hovertitle="θ";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&x(a,r.rLabel),y.indexOf("theta")!==-1&&x(n,r.thetaLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),R$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:IT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:z3(),supplyDefaults:zT().supplyDefaults,colorbar:xo(),formatLabels:OT(),calc:D$(),plot:F$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:DT().hoverPoints,selectPoints:Rf(),meta:{}}}),B$=Dt((Q,Z)=>{Z.exports=R$()}),iC=Dt((Q,Z)=>{var c=z3(),{cliponaxis:g,hoveron:I}=c,S=Vr(c,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:e,dash:r,width:a},fill:n,fillcolor:o,marker:i,textfont:l,textposition:f}=T3();Z.exports=Tr(Mr({},S),{connectgaps:t,fill:n,fillcolor:o,line:{color:e,dash:r,editType:"calc",width:a},marker:i,textfont:l,textposition:f})}),N$=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=zT().handleRThetaDefaults,S=s0(),t=z0(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=iC();Z.exports=function(o,i,l,f){function x(v,T){return c.coerce(o,i,n,v,T)}var y=I(o,i,f,x);if(!y){i.visible=!1;return}x("thetaunit"),x("mode",y{var c=OT();Z.exports=function(g,I,S){var t=g.i;return"r"in g||(g.r=I._r[t]),"theta"in g||(g.theta=I._theta[t]),c(g,I,S)}}),U$=Dt((Q,Z)=>{var c=F0(),g=me().calcMarkerSize,I=_x(),S=Ls(),t=q1().TOO_MANY_POINTS;Z.exports=function(e,r){var a=e._fullLayout,n=r.subplot,o=a[n].radialaxis,i=a[n].angularaxis,l=r._r=o.makeCalcdata(r,"r"),f=r._theta=i.makeCalcdata(r,"theta"),x=r._length,y={};x{var c=uT(),g=DT().makeHoverPointText;function I(S,t,e,r){var a=S.cd,n=a[0].t,o=n.r,i=n.theta,l=c.hoverPoints(S,t,e,r);if(!(!l||l[0].index===!1)){var f=l[0];if(f.index===void 0)return l;var x=S.subplot,y=f.cd[f.index],v=f.trace;if(y.r=o[f.index],y.theta=i[f.index],!!x.isPtInside(y))return f.xLabelVal=void 0,f.yLabelVal=void 0,g(y,v,x,f),l}}Z.exports={hoverPoints:I}}),H$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:IT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:N$(),colorbar:xo(),formatLabels:j$(),calc:U$(),hoverPoints:V$().hoverPoints,selectPoints:NS(),meta:{}}}),W$=Dt((Q,Z)=>{var c=hT(),g=Yi(),I=uE(),S=RS(),t=_x(),e=kn(),r=q1().TOO_MANY_POINTS,a={};Z.exports=function(n,o,i){if(i.length){var l=o.radialAxis,f=o.angularAxis,x=S(n,o);return i.forEach(function(y){if(!(!y||!y[0]||!y[0].trace)){var v=y[0],T=v.trace,u=v.t,b=T._length,_=u.r,P=u.theta,M=u.opts,C,A=_.slice(),h=P.slice();for(C=0;C<_.length;C++)o.isPtInside({r:_[C],theta:P[C]})||(A[C]=NaN,h[C]=NaN);var p=new Array(b*2),k=Array(b),w=Array(b);for(C=0;C=r&&(M.marker.cluster=u.tree),M.marker&&(M.markerSel.positions=M.markerUnsel.positions=M.marker.positions=p),M.line&&p.length>1&&e.extendFlat(M.line,t.linePositions(n,T,p)),M.text&&(e.extendFlat(M.text,{positions:p},t.textPosition(n,T,M.text,M.marker)),e.extendFlat(M.textSel,{positions:p},t.textPosition(n,T,M.text,M.markerSel)),e.extendFlat(M.textUnsel,{positions:p},t.textPosition(n,T,M.text,M.markerUnsel))),M.fill&&!x.fill2d&&(x.fill2d=!0),M.marker&&!x.scatter2d&&(x.scatter2d=!0),M.line&&!x.line2d&&(x.line2d=!0),M.text&&!x.glText&&(x.glText=!0),x.lineOptions.push(M.line),x.fillOptions.push(M.fill),x.markerOptions.push(M.marker),x.markerSelectedOptions.push(M.markerSel),x.markerUnselectedOptions.push(M.markerUnsel),x.textOptions.push(M.text),x.textSelectedOptions.push(M.textSel),x.textUnselectedOptions.push(M.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),u.x=k,u.y=w,u.rawx=k,u.rawy=w,u.r=_,u.theta=P,u.positions=p,u._scene=x,u.index=x.count,x.count++}}),I(n,o,i)}},Z.exports.reglPrecompiled=a}),q$=Dt((Q,Z)=>{var c=H$();c.plot=W$(),Z.exports=c}),$$=Dt((Q,Z)=>{Z.exports=q$()}),aC=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=Ia().extendFlat,S=z3(),t=Lg();Z.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:I({},t.base,{}),offset:I({},t.offset,{}),width:I({},t.width,{}),text:I({},t.text,{}),hovertext:I({},t.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:c(),hovertemplatefallback:g(),selected:t.selected,unselected:t.unselected};function e(){var r=I({},t.marker);return delete r.cornerradius,r}}),oC=Dt((Q,Z)=>{Z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}),Z$=Dt((Q,Z)=>{var c=kn(),g=zT().handleRThetaDefaults,I=R6(),S=aC();Z.exports=function(t,e,r,a){function n(i,l){return c.coerce(t,e,S,i,l)}var o=g(t,e,a,n);if(!o){e.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),I(t,e,n,r,a),c.coerceSelectionMarkerOpacity(e,n)}}),G$=Dt((Q,Z)=>{var c=kn(),g=oC();Z.exports=function(I,S,t){var e={},r;function a(i,l){return c.coerce(I[r]||{},S[r],g,i,l)}for(var n=0;n{var c=Ud().hasColorscale,g=Xd(),I=kn().isArrayOrTypedArray,S=Vw(),t=zr().setGroupPositions,e=Bt(),r=Jo().traceIs,a=kn().extendFlat;function n(i,l){for(var f=i._fullLayout,x=l.subplot,y=f[x].radialaxis,v=f[x].angularaxis,T=y.makeCalcdata(l,"r"),u=v.makeCalcdata(l,"theta"),b=l._length,_=new Array(b),P=T,M=u,C=0;C{var c=qr(),g=Yi(),I=kn(),S=Vs(),t=PT();Z.exports=function(r,a,n){var o=r._context.staticPlot,i=a.xaxis,l=a.yaxis,f=a.radialAxis,x=a.angularAxis,y=e(a),v=a.layers.frontplot.select("g.barlayer");I.makeTraceGroups(v,n,"trace bars").each(function(){var T=c.select(this),u=I.ensureSingle(T,"g","points"),b=u.selectAll("g.point").data(I.identity);b.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(_){var P=c.select(this),M=_.rp0=f.c2p(_.s0),C=_.rp1=f.c2p(_.s1),A=_.thetag0=x.c2g(_.p0),h=_.thetag1=x.c2g(_.p1),p;if(!g(M)||!g(C)||!g(A)||!g(h)||M===C||A===h)p="M0,0Z";else{var k=f.c2g(_.s1),w=(A+h)/2;_.ct=[i.c2p(k*Math.cos(w)),l.c2p(k*Math.sin(w))],p=y(M,C,A,h)}I.ensureSingle(P,"path").attr("d",p)}),S.setClipUrl(T,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,r)})};function e(r){var a=r.cxx,n=r.cyy;return r.vangles?function(o,i,l,f){var x,y;I.angleDelta(l,f)>0?(x=l,y=f):(x=f,y=l);var v=t.findEnclosingVertexAngles(x,r.vangles)[0],T=t.findEnclosingVertexAngles(y,r.vangles)[1],u=[v,(x+y)/2,T];return t.pathPolygonAnnulus(o,i,x,y,u,a,n)}:function(o,i,l,f){return I.pathAnnulus(o,i,l,f,a,n)}}}),K$=Dt((Q,Z)=>{var c=tf(),g=kn(),I=Q_().getTraceColor,S=g.fillText,t=DT().makeHoverPointText,e=PT().isPtInsidePolygon;Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.subplot,f=l.radialAxis,x=l.angularAxis,y=l.vangles,v=y?e:g.isPtInsideSector,T=r.maxHoverDistance,u=x._period||2*Math.PI,b=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),_=Math.atan2(n,a);f.range[0]>f.range[1]&&(_+=Math.PI);var P=function(h){return v(b,_,[h.rp0,h.rp1],[h.thetag0,h.thetag1],y)?T+Math.min(1,Math.abs(h.thetag1-h.thetag0)/u)-1+(h.rp1-b)/(h.rp1-h.rp0)-1:1/0};if(c.getClosest(o,P,r),r.index!==!1){var M=r.index,C=o[M];r.x0=r.x1=C.ct[0],r.y0=r.y1=C.ct[1];var A=g.extendFlat({},C,{r:C.s,theta:C.p});return S(C,i,r),t(A,i,l,r),r.hovertemplate=i.hovertemplate,r.color=I(i,C),r.xLabelVal=r.yLabelVal=void 0,C.s<0&&(r.idealAlign="left"),[r]}}}),X$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"barpolar",basePlotModule:IT(),categories:["polar","bar","showLegend"],attributes:aC(),layoutAttributes:oC(),supplyDefaults:Z$(),supplyLayoutDefaults:G$(),calc:sC().calc,crossTraceCalc:sC().crossTraceCalc,plot:Y$(),colorbar:xo(),formatLabels:OT(),style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:K$(),selectPoints:tb(),meta:{}}}),J$=Dt((Q,Z)=>{Z.exports=X$()}),lC=Dt((Q,Z)=>{Z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}),uC=Dt((Q,Z)=>{var c=wi(),g=Td(),I=jh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({ticklen:g.ticklen,tickwidth:S({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),a=S({visible:S({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},g.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,r),n=S({visible:S({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},e,r);Z.exports={domain:I({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:c.background},realaxis:a,imaginaryaxis:n,editType:"calc"}}),Q$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=z1(),t=ud().getSubplotData,e=dm(),r=n0(),a=Qy(),n=i0(),o=uC(),i=lC(),l=i.axisNames,f=y(function(v){return c.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function x(v,T,u,b){var _=u("bgcolor");b.bgColor=g.combine(_,b.paper_bgcolor);var P=t(b.fullData,i.name,b.id),M=b.layoutOut,C;function A(q,J){return u(C+"."+q,J)}for(var h=0;h{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=rC(),S=lC(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=I0(),e=ef(),r=Ho(),a=e.line;Z.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),eZ=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=cC();Z.exports=function(i,l,f,x){function y(u,b){return c.coerce(i,l,n,u,b)}var v=o(i,l,x,y);if(!v){l.visible=!1;return}y("mode",v{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.realLabel=c.tickText(e.radialAxis,g.real,!0).text,t.imagLabel=c.tickText(e.angularAxis,g.imag,!0).text,t}}),nZ=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=F0(),S=ct(),t=Bt(),e=me().calcMarkerSize;Z.exports=function(r,a){for(var n=r._fullLayout,o=a.subplot,i=n[o].realaxis,l=n[o].imaginaryaxis,f=i.makeCalcdata(a,"real"),x=l.makeCalcdata(a,"imag"),y=a._length,v=new Array(y),T=0;T{var c=Ka(),g=Ca().BADNUM,I=eC(),S=I.smith;Z.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),n=e.xaxis,o=e.yaxis,i={xaxis:n,yaxis:o,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="real",n._hovertitle="imag";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&x(a,r.realLabel),y.indexOf("imag")!==-1&&x(n,r.imagLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),oZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:tZ(),categories:["smith","symbols","showLegend","scatter-like"],attributes:cC(),supplyDefaults:eZ(),colorbar:xo(),formatLabels:rZ(),calc:nZ(),plot:iZ(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:aZ().hoverPoints,selectPoints:Rf(),meta:{}}}),sZ=Dt((Q,Z)=>{Z.exports=oZ()}),Np=Dt((Q,Z)=>{var c=Sd();function g(){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={}}c(g.prototype,{instance:function(a,n){a=(a||"gregorian").toLowerCase(),n=n||"";var o=this._localCals[a+"-"+n];if(!o&&this.calendars[a]&&(o=new this.calendars[a](n),this._localCals[a+"-"+n]=o),!o)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return o},newDate:function(a,n,o,i,l){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,l):i)||this.instance(),i.newDate(a,n,o)},substituteDigits:function(a){return function(n){return(n+"").replace(/[0-9]/g,function(o){return a[o]})}},substituteChineseDigits:function(a,n){return function(o){for(var i="",l=0;o>0;){var f=o%10;i=(f===0?"":a[f]+n[l])+i,l++,o=Math.floor(o/10)}return i.indexOf(a[1]+n[1])===0&&(i=i.substr(1)),i||a[0]}}});function I(a,n,o,i){if(this._calendar=a,this._year=n,this._month=o,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,n){return a=""+a,"000000".substring(0,n-a.length)+a}c(I.prototype,{newDate:function(a,n,o){return this._calendar.newDate(a??this,n,o)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,n,o){if(!this._calendar.isValid(a,n,o))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=n,this._day=o,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(a,n){return this._calendar.add(this,a,n)},set:function(a,n){return this._calendar.set(this,a,n)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var n=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function t(){this.shortYearCutoff="+10"}c(t.prototype,{_validateLevel:0,newDate:function(a,n,o){return a==null?this.today():(a.year&&(this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),o=a.day(),n=a.month(),a=a.year()),new I(this,a,n,o))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+S(Math.abs(n.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(a,n){var o=this._validate(a,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(o.month()+this.monthsInYear(o)-this.firstMonth)%this.monthsInYear(o)+this.minMonth},fromMonthOfYear:function(a,n){var o=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,o,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),o},daysInYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,n,o){return this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(a,n,o){return this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,n,o),n,o)},_add:function(a,n,o){if(this._validateLevel++,o==="d"||o==="w"){var i=a.toJD()+n*(o==="w"?this.daysInWeek():1),l=a.calendar().fromJD(i);return this._validateLevel--,[l.year(),l.month(),l.day()]}try{var f=a.year()+(o==="y"?n:0),x=a.monthOfYear()+(o==="m"?n:0),l=a.day(),y=function(u){for(;xb-1+u.minMonth;)f++,x-=b,b=u.monthsInYear(f)};o==="y"?(a.month()!==this.fromMonthOfYear(f,x)&&(x=this.newDate(f,a.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(f)),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x)))):o==="m"&&(y(this),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x))));var v=[f,this.fromMonthOfYear(f,x),l];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(a,n,o,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||a.year()>0!=n[0]>0)){var l={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],f=o<0?-1:1;n=this._add(a,o*l[0]+f*l[1],l[2])}return a.date(n[0],n[1],n[2])},set:function(a,n,o){this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=o==="y"?n:a.year(),l=o==="m"?n:a.month(),f=o==="d"?n:a.day();return(o==="y"||o==="m")&&(f=Math.min(f,this.daysInMonth(i,l))),a.date(i,l,f)},isValid:function(a,n,o){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var l=this.newDate(a,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth=this.minDay&&o-this.minDay13.5?13:1),T=l-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,y)},toJSDate:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),l=new Date(i.year(),i.month()-1,i.day());return l.setHours(0),l.setMinutes(0),l.setSeconds(0),l.setMilliseconds(0),l.setHours(l.getHours()>12?l.getHours()+2:0),l},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var r=Z.exports=new g;r.cdate=I,r.baseCalendar=t,r.calendars.gregorian=e}),lZ=Dt(()=>{var Q=Sd(),Z=Np();Q(Z.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"}),Z.local=Z.regionalOptions[""],Q(Z.cdate.prototype,{formatDate:function(c,g){return typeof c!="string"&&(g=c,c=""),this._calendar.formatDate(c||"",this,g)}}),Q(Z.baseCalendar.prototype,{UNIX_EPOCH:Z.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Z.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(c,g,I){if(typeof c!="string"&&(I=g,g=c,c=""),!g)return"";if(g.calendar()!==this)throw Z.local.invalidFormat||Z.regionalOptions[""].invalidFormat;c=c||this.local.dateFormat,I=I||{};for(var S=I.dayNamesShort||this.local.dayNamesShort,t=I.dayNames||this.local.dayNames,e=I.monthNumbers||this.local.monthNumbers,r=I.monthNamesShort||this.local.monthNamesShort,a=I.monthNames||this.local.monthNames,n=I.calculateWeek||this.local.calculateWeek,o=function(P,M){for(var C=1;_+C1},i=function(P,M,C,A){var h=""+M;if(o(P,A))for(;h.length1},b=function(R,O){var j=u(R,O),V=[2,3,j?4:2,j?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],H=new RegExp("^-?\\d{1,"+V+"}"),F=g.substring(h).match(H);if(!F)throw(Z.local.missingNumberAt||Z.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},_=this,P=function(){if(typeof a=="function"){u("m");var R=a.call(_,g.substring(h));return h+=R.length,R}return b("m")},M=function(R,O,j,V){for(var H=u(R,V)?j:O,F=0;F-1){f=1,x=y;for(var w=this.daysInMonth(l,f);x>w;w=this.daysInMonth(l,f))f++,x-=w}return i>-1?this.fromJD(i):this.newDate(l,f,x)},determineDate:function(c,g,I,S,t){I&&typeof I!="object"&&(t=S,S=I,I=null),typeof S!="string"&&(t=S,S="");var e=this,r=function(a){try{return e.parseDate(S,a,t)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&I?I.newDate():null)||e.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=o.exec(a);i;)n.add(parseInt(i[1],10),i[2]||"d"),i=o.exec(a);return n};return g=g?g.newDate():null,c=c==null?g:typeof c=="string"?r(c):typeof c=="number"?isNaN(c)||c===1/0||c===-1/0?g:e.today().add(c,"d"):e.newDate(c),c}})}),uZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,l){if(typeof i=="string"){var f=i.match(S);return f?f[0]:""}var x=this._validateYear(i),y=i.month(),v=""+this.toChineseMonth(x,y);return l&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(x,y)&&(v+="i"),v},monthNames:function(i){if(typeof i=="string"){var l=i.match(t);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},monthNamesShort:function(i){if(typeof i=="string"){var l=i.match(e);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},parseMonth:function(i,l){i=this._validateYear(i);var f=parseInt(l),x;if(isNaN(f))l[0]==="闰"&&(x=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var y=l[l.length-1];x=y==="i"||y==="I"}var v=this.toMonthIndex(i,f,x);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,l){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw l.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,l,f){var x=this.intercalaryMonth(i),y=f&&l!==x;if(y||l<1||l>12)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return x?!f&&l<=x?v=l-1:v=l:v=l-1,v},toChineseMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i),x=f?12:11;if(l<0||l>x)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return f?l>13;return f},isIntercalaryMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i);return!!f&&f===l},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,l,f){var x=this._validateYear(i,Q.local.invalidyear),y=a[x-a[0]],v=y>>9&4095,T=y>>5&15,u=y&31,b;b=c.newDate(v,T,u),b.add(4-(b.dayOfWeek()||7),"d");var _=this.toJD(i,l,f)-b.toJD();return 1+Math.floor(_/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,l){i.year&&(l=i.month(),i=i.year()),i=this._validateYear(i);var f=r[i-r[0]],x=f>>13,y=x?12:11;if(l>y)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=f&1<<12-l?30:29;return v},weekDay:function(i,l,f){return(this.dayOfWeek(i,l,f)||7)<6},toJD:function(i,l,f){var x=this._validate(i,v,f,Q.local.invalidDate);i=this._validateYear(x.year()),l=x.month(),f=x.day();var y=this.isIntercalaryMonth(i,l),v=this.toChineseMonth(i,l),T=o(i,v,f,y);return c.toJD(T.year,T.month,T.day)},fromJD:function(i){var l=c.fromJD(i),f=n(l.year(),l.month(),l.day()),x=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,x,f.day)},fromString:function(i){var l=i.match(I),f=this._validateYear(+l[1]),x=+l[2],y=!!l[3],v=this.toMonthIndex(f,x,y),T=+l[4];return this.newDate(f,v,T)},add:function(i,l,f){var x=i.year(),y=i.month(),v=this.isIntercalaryMonth(x,y),T=this.toChineseMonth(x,y),u=Object.getPrototypeOf(g.prototype).add.call(this,i,l,f);if(f==="y"){var b=u.year(),_=u.month(),P=this.isIntercalaryMonth(b,T),M=v&&P?this.toMonthIndex(b,T,!0):this.toMonthIndex(b,T,!1);M!==_&&u.month(M)}return u}});var I=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;Q.calendars.chinese=g;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[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 n(i,l,f,x){var y,v;if(typeof i=="object")y=i,v=l||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var u=typeof l=="number"&&l>=1&&l<=12;if(!u)throw new Error("Solar month outside range 1 - 12");var b=typeof f=="number"&&f>=1&&f<=31;if(!b)throw new Error("Solar day outside range 1 - 31");y={year:i,month:l,day:f},v={}}var _=a[y.year-a[0]],P=y.year<<9|y.month<<5|y.day;v.year=P>=_?y.year:y.year-1,_=a[v.year-a[0]];var M=_>>9&4095,C=_>>5&15,A=_&31,h,p=new Date(M,C-1,A),k=new Date(y.year,y.month-1,y.day);h=Math.round((k-p)/(24*3600*1e3));var w=r[v.year-r[0]],R;for(R=0;R<13;R++){var O=w&1<<12-R?30:29;if(h>13;return!j||R=1888&&i<=2111;if(!u)throw new Error("Lunar year outside range 1888-2111");var b=typeof l=="number"&&l>=1&&l<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var _=typeof f=="number"&&f>=1&&f<=30;if(!_)throw new Error("Lunar day outside range 1 - 30");var P;typeof x=="object"?(P=!1,v=x):(P=!!x,v={}),T={year:i,month:l,day:f,isIntercalary:P}}var M;M=T.day-1;var C=r[T.year-r[0]],A=C>>13,h;A&&(T.month>A||T.isIntercalary)?h=T.month:h=T.month-1;for(var p=0;p>9&4095,O=w>>5&15,j=w&31,V=new Date(R,O-1,j+M);return v.year=V.getFullYear(),v.month=1+V.getMonth(),v.day=V.getDate(),v}}),cZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.coptic=c}),hZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),!1},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),13},daysInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),400},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return(e.day()+1)%8},weekDay:function(I,S,t){var e=this.dayOfWeek(I,S,t);return e>=2&&e<=6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{century:g[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return I=e.year()+(e.year()<0?1:0),S=e.month(),t=e.day(),t+(S>1?16:0)+(S>2?(S-2)*32:0)+(I-1)*400+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(I/400)+1;I-=(S-1)*400,I+=I>15?16:0;var t=Math.floor(I/32)+1,e=I-(t-1)*32+1;return this.newDate(S<=0?S-1:S,t,e)}});var g={20:"Fruitbat",21:"Anchovy"};Q.calendars.discworld=c}),fZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.ethiopian=c}),dZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(I){return I=I<0?I+1:I,g(I*7+1,19)<7},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),this._leapYear(I.year?I.year():I)?13:12},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return I=S.year(),this.toJD(I===-1?1:I+1,7,1)-this.toJD(I,7,1)},daysInMonth:function(I,S){return I.year&&(S=I.month(),I=I.year()),this._validate(I,S,this.minDay,Q.local.invalidMonth),S===12&&this.leapYear(I)||S===8&&g(this.daysInYear(I),10)===5?30:S===9&&g(this.daysInYear(I),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=I<=0?I+1:I,a=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(S<7){for(var n=7;n<=this.monthsInYear(I);n++)a+=this.daysInMonth(I,n);for(var n=1;n=this.toJD(S===-1?1:S+1,7,1);)S++;for(var t=Ithis.toJD(S,t,this.daysInMonth(S,t));)t++;var e=I-this.toJD(S,t,1)+1;return this.newDate(S,t,e)}});function g(I,S){return I-S*Math.floor(I/S)}Q.calendars.hebrew=c}),pZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);return(I.year()*11+14)%30<11},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){return this.leapYear(g)?355:354},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==5},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g=g<=0?g+1:g,S+Math.ceil(29.5*(I-1))+(g-1)*354+Math.floor((3+11*g)/30)+this.jdEpoch-1},fromJD:function(g){g=Math.floor(g)+.5;var I=Math.floor((30*(g-this.jdEpoch)+10646)/10631);I=I<=0?I-1:I;var S=Math.min(12,Math.ceil((g-29-this.toJD(I,1,1))/29.5)+1),t=g-this.toJD(I,S,1)+1;return this.newDate(I,S,t)}}),Q.calendars.islamic=c}),mZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()<0?I.year()+1:I.year();return S%4===0},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g<0&&g++,I<=2&&(g--,I+=12),Math.floor(365.25*(g+4716))+Math.floor(30.6001*(I+1))+S-1524.5},fromJD:function(g){var I=Math.floor(g+.5),S=I+1524,t=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*t),r=Math.floor((S-e)/30.6001),a=r-Math.floor(r<14?1:13),n=t-Math.floor(a>2?4716:4715),o=S-e-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,a,o)}}),Q.calendars.julian=c}),gZ=Dt(()=>{var Q=Np(),Z=Sd();function c(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),!1},formatYear:function(S){var t=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear);S=t.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var r=Math.floor(S/20);return e+"."+r+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var t=0,e=0;e19||e>0&&r<0)throw"Invalid Mayan year";t=t*20+r}return t},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),18},weekOfYear:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),360},daysInMonth:function(S,t){return this._validate(S,t,this.minDay,Q.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()},weekDay:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),!0},extraInfo:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate),a=r.toJD(),n=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(S){S-=this.jdEpoch;var t=g(S+8+340,365);return[Math.floor(t/20)+1,g(t,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[I(S+20,20),I(S+4,13)]},toJD:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var t=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),r=S%20;return this.newDate(t,e,r)}});function g(S,t){return S-t*Math.floor(S/t)}function I(S,t){return g(S-1,t)+1}Q.calendars.mayan=c}),vZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar;var g=Q.instance("gregorian");Z(c.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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear);return g.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidMonth),r=e.year();r<0&&r++;for(var a=e.day(),n=1;n=this.toJD(S+1,1,1);)S++;for(var t=I-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;t>this.daysInMonth(S,e);)t-=this.daysInMonth(S,e),e++;return this.newDate(S,e,t)}}),Q.calendars.nanakshahi=c}),yZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(g){return this.daysInYear(g)!==this.daysPerYear},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);if(g=I.year(),typeof this.NEPALI_CALENDAR_DATA[g]>"u")return this.daysPerYear;for(var S=0,t=this.minMonth;t<=12;t++)S+=this.NEPALI_CALENDAR_DATA[g][t];return S},daysInMonth:function(g,I){return g.year&&(I=g.month(),g=g.year()),this._validate(g,I,this.minDay,Q.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[g]>"u"?this.daysPerMonth[I-1]:this.NEPALI_CALENDAR_DATA[g][I]},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);g=t.year(),I=t.month(),S=t.day();var e=Q.instance(),r=0,a=I,n=g;this._createMissingCalendarData(g);var o=g-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(I!==9&&(r=S,a--);a!==9;)a<=0&&(a=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][a],a--;return I===9?(r+=S-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=e.daysInYear(o))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],e.newDate(o,1,1).add(r,"d").toJD()},fromJD:function(g){var I=Q.instance(),S=I.fromJD(g),t=S.year(),e=S.dayOfYear(),r=t+56;this._createMissingCalendarData(r);for(var a=9,n=this.NEPALI_CALENDAR_DATA[r][0],o=this.NEPALI_CALENDAR_DATA[r][a]-n+1;e>o;)a++,a>12&&(a=1,r++),o+=this.NEPALI_CALENDAR_DATA[r][a];var i=this.NEPALI_CALENDAR_DATA[r][a]-(o-e);return this.newDate(r,a,i)},_createMissingCalendarData:function(g){var I=this.daysPerMonth.slice(0);I.unshift(17);for(var S=g-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=I)},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]}}),Q.calendars.nepali=c}),xZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}function g(I){var S=I-475;I<0&&S++;var t=.242197,e=t*S,r=t*(S+1),a=e-Math.floor(e),n=r-Math.floor(r);return a>n}c.prototype=new Q.baseCalendar,Z(c.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ārshanbeh","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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return g(S.year())},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=0;if(I>0)for(var a=1;a0?I-1:I)*365+r+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I)+.5;var S=475+(I-this.toJD(475,1,1))/365.242197,t=Math.floor(S);t<=0&&t--,I>this.toJD(t,12,g(t)?30:29)&&(t++,t===0&&t++);var e=I-this.toJD(t,1,1)+1,r=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=I-this.toJD(t,r,1)+1;return this.newDate(t,r,a)}}),Q.calendars.persian=c,Q.calendars.jalali=c}),_Z=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.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(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)},_g2tYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)}}),Q.calendars.taiwan=g}),bZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.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(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)},_g2tYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)}}),Q.calendars.thai=g}),wZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){for(var S=0,t=1;t<=12;t++)S+=this.daysInMonth(I,t);return S},daysInMonth:function(I,S){for(var t=this._validate(I,S,this.minDay,Q.local.invalidMonth),e=t.toJD()-24e5+.5,r=0,a=0;ae)return g[r]-g[r-1];r++}return 30},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate),r=12*(e.year()-1)+e.month()-15292,a=e.day()+g[r-1]-1;return a+24e5-.5},fromJD:function(I){for(var S=I-24e5+.5,t=0,e=0;eS);e++)t++;var r=t+15292,a=Math.floor((r-1)/12),n=a+1,o=r-12*a,i=S-g[t-1]+1;return this.newDate(n,o,i)},isValid:function(I,S,t){var e=Q.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(I=I.year!=null?I.year:I,e=I>=1276&&I<=1500),e},_validate:function(I,S,t,e){var r=Q.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw e.replace(/\{0\}/,this.local.name);return r}}),Q.calendars.ummalqura=c;var g=[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]}),kZ=Dt((Q,Z)=>{Z.exports=Np(),lZ(),uZ(),cZ(),hZ(),fZ(),dZ(),pZ(),mZ(),gZ(),vZ(),yZ(),xZ(),_Z(),bZ(),wZ()}),TZ=Dt((Q,Z)=>{var c=kZ(),g=kn(),I=Ca(),S=I.EPOCHJD,t=I.ONEDAY,e={valType:"enumerated",values:g.sortObjectKeys(c.calendars),editType:"calc",dflt:"gregorian"},r=function(C,A,h,p){var k={};return k[h]=e,g.coerce(C,A,k,h,p)},a=function(C,A,h,p){for(var k=0;k{Z.exports=TZ()}),MZ=Dt((Q,Z)=>{var c=nR();c.register([sR(),cR(),pR(),xR(),kR(),SR(),LR(),UR(),KR(),sB(),vB(),RN(),HN(),Cj(),Bj(),$j(),Qj(),gU(),_U(),wU(),MU(),PU(),FU(),jU(),eV(),iV(),UH(),rW(),mW(),bW(),PW(),DW(),HW(),rq(),oq(),pq(),Cq(),Dq(),Vq(),h$(),x$(),T$(),C$(),z$(),B$(),$$(),J$(),sZ(),AZ()]),Z.exports=c});return MZ()})();/*! +`}),staticAttributes:Et,staticUniforms:Te}}class pr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(z,ht,Et,Ot,Ht,Te,Fe,Ke,vr){this.context=z;let Dr=this.boundPaintVertexBuffers.length!==Ot.length;for(let Fr=0;!Dr&&Fr({u_matrix:$t,u_texture:0,u_ele_delta:z,u_fog_matrix:ht,u_fog_color:Et?Et.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:Et?Et.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Et?Et.calculateFogBlendOpacity(Ot):0,u_horizon_color:Et?Et.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:Et?Et.properties.get("horizon-fog-blend"):1});function _n($t){let z=[];for(let ht=0;ht<$t.length;ht++){if($t[ht]===null)continue;let Et=$t[ht].split(" ");z.push(Et.pop())}return z}class Bn{constructor(z,ht,Et,Ot,Ht,Te){let Fe=z.gl;this.program=Fe.createProgram();let Ke=_n(ht.staticAttributes),vr=Et?Et.getBinderAttributes():[],Dr=Ke.concat(vr),Fr=on.prelude.staticUniforms?_n(on.prelude.staticUniforms):[],un=ht.staticUniforms?_n(ht.staticUniforms):[],Sn=Et?Et.getBinderUniforms():[],Xt=Fr.concat(un).concat(Sn),ae=[];for(let Or of Xt)ae.indexOf(Or)<0&&ae.push(Or);let _e=Et?Et.defines():[];Ht&&_e.push("#define OVERDRAW_INSPECTOR;"),Te&&_e.push("#define TERRAIN3D;");let Me=_e.concat(on.prelude.fragmentSource,ht.fragmentSource).join(` +`),je=_e.concat(on.prelude.vertexSource,ht.vertexSource).join(` +`),De=Fe.createShader(Fe.FRAGMENT_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource(De,Me),Fe.compileShader(De),!Fe.getShaderParameter(De,Fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Fe.getShaderInfoLog(De)}`);Fe.attachShader(this.program,De);let $e=Fe.createShader(Fe.VERTEX_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource($e,je),Fe.compileShader($e),!Fe.getShaderParameter($e,Fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Fe.getShaderInfoLog($e)}`);Fe.attachShader(this.program,$e),this.attributes={};let wr={};this.numAttributes=Dr.length;for(let Or=0;Or({u_depth:new e.aH(Or,Nr.u_depth),u_terrain:new e.aH(Or,Nr.u_terrain),u_terrain_dim:new e.aI(Or,Nr.u_terrain_dim),u_terrain_matrix:new e.aJ(Or,Nr.u_terrain_matrix),u_terrain_unpack:new e.aK(Or,Nr.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Or,Nr.u_terrain_exaggeration)}))(z,wr),this.binderUniforms=Et?Et.getUniforms(z,wr):[]}draw(z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,_e,Me,je){let De=z.gl;if(this.failedToCreate)return;if(z.program.set(this.program),z.setDepthMode(Et),z.setStencilMode(Ot),z.setColorMode(Ht),z.setCullFace(Te),Ke){z.activeTexture.set(De.TEXTURE2),De.bindTexture(De.TEXTURE_2D,Ke.depthTexture),z.activeTexture.set(De.TEXTURE3),De.bindTexture(De.TEXTURE_2D,Ke.texture);for(let wr in this.terrainUniforms)this.terrainUniforms[wr].set(Ke[wr])}for(let wr in this.fixedUniforms)this.fixedUniforms[wr].set(Fe[wr]);ae&&ae.setUniforms(z,this.binderUniforms,Sn,{zoom:Xt});let $e=0;switch(ht){case De.LINES:$e=2;break;case De.TRIANGLES:$e=3;break;case De.LINE_STRIP:$e=1}for(let wr of un.get()){let Or=wr.vaos||(wr.vaos={});(Or[vr]||(Or[vr]=new pr)).bind(z,this,Dr,ae?ae.getPaintVertexBuffers():[],Fr,wr.vertexOffset,_e,Me,je),De.drawElements(ht,wr.primitiveLength*$e,De.UNSIGNED_SHORT,wr.primitiveOffset*$e*2)}}}function ri($t,z,ht){let Et=1/qn(ht,1,z.transform.tileZoom),Ot=Math.pow(2,ht.tileID.overscaledZ),Ht=ht.tileSize*Math.pow(2,z.transform.tileZoom)/Ot,Te=Ht*(ht.tileID.canonical.x+ht.tileID.wrap*Ot),Fe=Ht*ht.tileID.canonical.y;return{u_image:0,u_texsize:ht.imageAtlasTexture.size,u_scale:[Et,$t.fromScale,$t.toScale],u_fade:$t.t,u_pixel_coord_upper:[Te>>16,Fe>>16],u_pixel_coord_lower:[65535&Te,65535&Fe]}}let Pn=($t,z,ht,Et)=>{let Ot=z.style.light,Ht=Ot.properties.get("position"),Te=[Ht.x,Ht.y,Ht.z],Fe=function(){var vr=new e.A(9);return e.A!=Float32Array&&(vr[1]=0,vr[2]=0,vr[3]=0,vr[5]=0,vr[6]=0,vr[7]=0),vr[0]=1,vr[4]=1,vr[8]=1,vr}();Ot.properties.get("anchor")==="viewport"&&function(vr,Dr){var Fr=Math.sin(Dr),un=Math.cos(Dr);vr[0]=un,vr[1]=Fr,vr[2]=0,vr[3]=-Fr,vr[4]=un,vr[5]=0,vr[6]=0,vr[7]=0,vr[8]=1}(Fe,-z.transform.angle),function(vr,Dr,Fr){var un=Dr[0],Sn=Dr[1],Xt=Dr[2];vr[0]=un*Fr[0]+Sn*Fr[3]+Xt*Fr[6],vr[1]=un*Fr[1]+Sn*Fr[4]+Xt*Fr[7],vr[2]=un*Fr[2]+Sn*Fr[5]+Xt*Fr[8]}(Te,Te,Fe);let Ke=Ot.properties.get("color");return{u_matrix:$t,u_lightpos:Te,u_lightintensity:Ot.properties.get("intensity"),u_lightcolor:[Ke.r,Ke.g,Ke.b],u_vertical_gradient:+ht,u_opacity:Et}},En=($t,z,ht,Et,Ot,Ht,Te)=>e.e(Pn($t,z,ht,Et),ri(Ht,z,Te),{u_height_factor:-Math.pow(2,Ot.overscaledZ)/Te.tileSize/8}),Yn=$t=>({u_matrix:$t}),La=($t,z,ht,Et)=>e.e(Yn($t),ri(ht,z,Et)),qi=($t,z)=>({u_matrix:$t,u_world:z}),Qa=($t,z,ht,Et,Ot)=>e.e(La($t,z,ht,Et),{u_world:Ot}),Ja=($t,z,ht,Et)=>{let Ot=$t.transform,Ht,Te;if(Et.paint.get("circle-pitch-alignment")==="map"){let Fe=qn(ht,1,Ot.zoom);Ht=!0,Te=[Fe,Fe]}else Ht=!1,Te=Ot.pixelsToGLUnits;return{u_camera_to_center_distance:Ot.cameraToCenterDistance,u_scale_with_map:+(Et.paint.get("circle-pitch-scale")==="map"),u_matrix:$t.translatePosMatrix(z.posMatrix,ht,Et.paint.get("circle-translate"),Et.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ht,u_device_pixel_ratio:$t.pixelRatio,u_extrude_scale:Te}},Do=($t,z,ht)=>({u_matrix:$t,u_inv_matrix:z,u_camera_to_center_distance:ht.cameraToCenterDistance,u_viewport_size:[ht.width,ht.height]}),yo=($t,z,ht=1)=>({u_matrix:$t,u_color:z,u_overlay:0,u_overlay_scale:ht}),Bo=$t=>({u_matrix:$t}),Da=($t,z,ht,Et)=>({u_matrix:$t,u_extrude_scale:qn(z,1,ht),u_intensity:Et}),ys=($t,z,ht,Et)=>{let Ot=e.H();e.aP(Ot,0,$t.width,$t.height,0,0,1);let Ht=$t.context.gl;return{u_matrix:Ot,u_world:[Ht.drawingBufferWidth,Ht.drawingBufferHeight],u_image:ht,u_color_ramp:Et,u_opacity:z.paint.get("heatmap-opacity")}};function os($t,z){let ht=Math.pow(2,z.canonical.z),Et=z.canonical.y;return[new e.Z(0,Et/ht).toLngLat().lat,new e.Z(0,(Et+1)/ht).toLngLat().lat]}let ul=($t,z,ht,Et)=>{let Ot=$t.transform;return{u_matrix:Qs($t,z,ht,Et),u_ratio:1/qn(z,1,Ot.zoom),u_device_pixel_ratio:$t.pixelRatio,u_units_to_pixels:[1/Ot.pixelsToGLUnits[0],1/Ot.pixelsToGLUnits[1]]}},Go=($t,z,ht,Et,Ot)=>e.e(ul($t,z,ht,Ot),{u_image:0,u_image_height:Et}),Ks=($t,z,ht,Et,Ot)=>{let Ht=$t.transform,Te=cl(z,Ht);return{u_matrix:Qs($t,z,ht,Ot),u_texsize:z.imageAtlasTexture.size,u_ratio:1/qn(z,1,Ht.zoom),u_device_pixel_ratio:$t.pixelRatio,u_image:0,u_scale:[Te,Et.fromScale,Et.toScale],u_fade:Et.t,u_units_to_pixels:[1/Ht.pixelsToGLUnits[0],1/Ht.pixelsToGLUnits[1]]}},ss=($t,z,ht,Et,Ot,Ht)=>{let Te=$t.lineAtlas,Fe=cl(z,$t.transform),Ke=ht.layout.get("line-cap")==="round",vr=Te.getDash(Et.from,Ke),Dr=Te.getDash(Et.to,Ke),Fr=vr.width*Ot.fromScale,un=Dr.width*Ot.toScale;return e.e(ul($t,z,ht,Ht),{u_patternscale_a:[Fe/Fr,-vr.height/2],u_patternscale_b:[Fe/un,-Dr.height/2],u_sdfgamma:Te.width/(256*Math.min(Fr,un)*$t.pixelRatio)/2,u_image:0,u_tex_y_a:vr.y,u_tex_y_b:Dr.y,u_mix:Ot.t})};function cl($t,z){return 1/qn($t,1,z.tileZoom)}function Qs($t,z,ht,Et){return $t.translatePosMatrix(Et?Et.posMatrix:z.tileID.posMatrix,z,ht.paint.get("line-translate"),ht.paint.get("line-translate-anchor"))}let jl=($t,z,ht,Et,Ot)=>{return{u_matrix:$t,u_tl_parent:z,u_scale_parent:ht,u_buffer_scale:1,u_fade_t:Et.mix,u_opacity:Et.opacity*Ot.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Ot.paint.get("raster-brightness-min"),u_brightness_high:Ot.paint.get("raster-brightness-max"),u_saturation_factor:(Te=Ot.paint.get("raster-saturation"),Te>0?1-1/(1.001-Te):-Te),u_contrast_factor:(Ht=Ot.paint.get("raster-contrast"),Ht>0?1/(1-Ht):1+Ht),u_spin_weights:cs(Ot.paint.get("raster-hue-rotate"))};var Ht,Te};function cs($t){$t*=Math.PI/180;let z=Math.sin($t),ht=Math.cos($t);return[(2*ht+1)/3,(-Math.sqrt(3)*z-ht+1)/3,(Math.sqrt(3)*z-ht+1)/3]}let Ps=($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn)=>{let Xt=Te.transform;return{u_is_size_zoom_constant:+($t==="constant"||$t==="source"),u_is_size_feature_constant:+($t==="constant"||$t==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+ht,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:Te.options.fadeDuration?Te.symbolFadeChange:1,u_matrix:Fe,u_label_plane_matrix:Ke,u_coord_matrix:vr,u_is_text:+Fr,u_pitch_with_map:+Et,u_is_along_line:Ot,u_is_variable_anchor:Ht,u_texsize:un,u_texture:0,u_translation:Dr,u_pitched_scale:Sn}},Po=($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn,Xt)=>{let ae=Te.transform;return e.e(Ps($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Xt),{u_gamma_scale:Et?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:Te.pixelRatio,u_is_halo:1})},As=($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,Fr,un,Sn)=>e.e(Po($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr,Dr,!0,Fr,!0,Sn),{u_texsize_icon:un,u_texture_icon:1}),kl=($t,z,ht)=>({u_matrix:$t,u_opacity:z,u_color:ht}),ql=($t,z,ht,Et,Ot,Ht)=>e.e(function(Te,Fe,Ke,vr){let Dr=Ke.imageManager.getPattern(Te.from.toString()),Fr=Ke.imageManager.getPattern(Te.to.toString()),{width:un,height:Sn}=Ke.imageManager.getPixelSize(),Xt=Math.pow(2,vr.tileID.overscaledZ),ae=vr.tileSize*Math.pow(2,Ke.transform.tileZoom)/Xt,_e=ae*(vr.tileID.canonical.x+vr.tileID.wrap*Xt),Me=ae*vr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Dr.tl,u_pattern_br_a:Dr.br,u_pattern_tl_b:Fr.tl,u_pattern_br_b:Fr.br,u_texsize:[un,Sn],u_mix:Fe.t,u_pattern_size_a:Dr.displaySize,u_pattern_size_b:Fr.displaySize,u_scale_a:Fe.fromScale,u_scale_b:Fe.toScale,u_tile_units_to_pixels:1/qn(vr,1,Ke.transform.tileZoom),u_pixel_coord_upper:[_e>>16,Me>>16],u_pixel_coord_lower:[65535&_e,65535&Me]}}(Et,Ht,ht,Ot),{u_matrix:$t,u_opacity:z}),Jl={fillExtrusion:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_opacity:new e.aI($t,z.u_opacity)}),fillExtrusionPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_height_factor:new e.aI($t,z.u_height_factor),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade),u_opacity:new e.aI($t,z.u_opacity)}),fill:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),fillPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),fillOutline:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world)}),fillOutlinePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),circle:($t,z)=>({u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_scale_with_map:new e.aH($t,z.u_scale_with_map),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_extrude_scale:new e.aO($t,z.u_extrude_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_matrix:new e.aJ($t,z.u_matrix)}),collisionBox:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_pixel_extrude_scale:new e.aO($t,z.u_pixel_extrude_scale)}),collisionCircle:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_inv_matrix:new e.aJ($t,z.u_inv_matrix),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_viewport_size:new e.aO($t,z.u_viewport_size)}),debug:($t,z)=>({u_color:new e.aL($t,z.u_color),u_matrix:new e.aJ($t,z.u_matrix),u_overlay:new e.aH($t,z.u_overlay),u_overlay_scale:new e.aI($t,z.u_overlay_scale)}),clippingMask:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),heatmap:($t,z)=>({u_extrude_scale:new e.aI($t,z.u_extrude_scale),u_intensity:new e.aI($t,z.u_intensity),u_matrix:new e.aJ($t,z.u_matrix)}),heatmapTexture:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_color_ramp:new e.aH($t,z.u_color_ramp),u_opacity:new e.aI($t,z.u_opacity)}),hillshade:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_latrange:new e.aO($t,z.u_latrange),u_light:new e.aO($t,z.u_light),u_shadow:new e.aL($t,z.u_shadow),u_highlight:new e.aL($t,z.u_highlight),u_accent:new e.aL($t,z.u_accent)}),hillshadePrepare:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_dimension:new e.aO($t,z.u_dimension),u_zoom:new e.aI($t,z.u_zoom),u_unpack:new e.aK($t,z.u_unpack)}),line:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels)}),lineGradient:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_image:new e.aH($t,z.u_image),u_image_height:new e.aI($t,z.u_image_height)}),linePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texsize:new e.aO($t,z.u_texsize),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_image:new e.aH($t,z.u_image),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),lineSDF:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_patternscale_a:new e.aO($t,z.u_patternscale_a),u_patternscale_b:new e.aO($t,z.u_patternscale_b),u_sdfgamma:new e.aI($t,z.u_sdfgamma),u_image:new e.aH($t,z.u_image),u_tex_y_a:new e.aI($t,z.u_tex_y_a),u_tex_y_b:new e.aI($t,z.u_tex_y_b),u_mix:new e.aI($t,z.u_mix)}),raster:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_tl_parent:new e.aO($t,z.u_tl_parent),u_scale_parent:new e.aI($t,z.u_scale_parent),u_buffer_scale:new e.aI($t,z.u_buffer_scale),u_fade_t:new e.aI($t,z.u_fade_t),u_opacity:new e.aI($t,z.u_opacity),u_image0:new e.aH($t,z.u_image0),u_image1:new e.aH($t,z.u_image1),u_brightness_low:new e.aI($t,z.u_brightness_low),u_brightness_high:new e.aI($t,z.u_brightness_high),u_saturation_factor:new e.aI($t,z.u_saturation_factor),u_contrast_factor:new e.aI($t,z.u_contrast_factor),u_spin_weights:new e.aN($t,z.u_spin_weights)}),symbolIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolSDF:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolTextAndIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texsize_icon:new e.aO($t,z.u_texsize_icon),u_texture:new e.aH($t,z.u_texture),u_texture_icon:new e.aH($t,z.u_texture_icon),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),background:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_color:new e.aL($t,z.u_color)}),backgroundPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_image:new e.aH($t,z.u_image),u_pattern_tl_a:new e.aO($t,z.u_pattern_tl_a),u_pattern_br_a:new e.aO($t,z.u_pattern_br_a),u_pattern_tl_b:new e.aO($t,z.u_pattern_tl_b),u_pattern_br_b:new e.aO($t,z.u_pattern_br_b),u_texsize:new e.aO($t,z.u_texsize),u_mix:new e.aI($t,z.u_mix),u_pattern_size_a:new e.aO($t,z.u_pattern_size_a),u_pattern_size_b:new e.aO($t,z.u_pattern_size_b),u_scale_a:new e.aI($t,z.u_scale_a),u_scale_b:new e.aI($t,z.u_scale_b),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI($t,z.u_tile_units_to_pixels)}),terrain:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_ele_delta:new e.aI($t,z.u_ele_delta),u_fog_matrix:new e.aJ($t,z.u_fog_matrix),u_fog_color:new e.aL($t,z.u_fog_color),u_fog_ground_blend:new e.aI($t,z.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI($t,z.u_fog_ground_blend_opacity),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon_fog_blend:new e.aI($t,z.u_horizon_fog_blend)}),terrainDepth:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ele_delta:new e.aI($t,z.u_ele_delta)}),terrainCoords:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_terrain_coords_id:new e.aI($t,z.u_terrain_coords_id),u_ele_delta:new e.aI($t,z.u_ele_delta)}),sky:($t,z)=>({u_sky_color:new e.aL($t,z.u_sky_color),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon:new e.aI($t,z.u_horizon),u_sky_horizon_blend:new e.aI($t,z.u_sky_horizon_blend)})};class Us{constructor(z,ht,Et){this.context=z;let Ot=z.gl;this.buffer=Ot.createBuffer(),this.dynamicDraw=!!Et,this.context.unbindVAO(),z.bindElementBuffer.set(this.buffer),Ot.bufferData(Ot.ELEMENT_ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Ot.DYNAMIC_DRAW:Ot.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(z){let ht=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ht.bufferSubData(ht.ELEMENT_ARRAY_BUFFER,0,z.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pa={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fo{constructor(z,ht,Et,Ot){this.length=ht.length,this.attributes=Et,this.itemSize=ht.bytesPerElement,this.dynamicDraw=Ot,this.context=z;let Ht=z.gl;this.buffer=Ht.createBuffer(),z.bindVertexBuffer.set(this.buffer),Ht.bufferData(Ht.ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Ht.DYNAMIC_DRAW:Ht.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(z){if(z.length!==this.length)throw new Error(`Length of new data is ${z.length}, which doesn't match current length of ${this.length}`);let ht=this.context.gl;this.bind(),ht.bufferSubData(ht.ARRAY_BUFFER,0,z.arrayBuffer)}enableAttributes(z,ht){for(let Et=0;Et0){let Or=e.H();e.aQ(Or,De.placementInvProjMatrix,$t.transform.glCoordMatrix),e.aQ(Or,Or,De.placementViewportMatrix),Ke.push({circleArray:wr,circleOffset:Dr,transform:je.posMatrix,invTransform:Or,coord:je}),vr+=wr.length/4,Dr=vr}$e&&Fe.draw(Ht,Te.LINES,tl.disabled,Pl.disabled,$t.colorModeForRenderPass(),ts.disabled,{u_matrix:je.posMatrix,u_pixel_extrude_scale:[1/(Fr=$t.transform).width,1/Fr.height]},$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je),ht.id,$e.layoutVertexBuffer,$e.indexBuffer,$e.segments,null,$t.transform.zoom,null,null,$e.collisionVertexBuffer)}var Fr;if(!Ot||!Ke.length)return;let un=$t.useProgram("collisionCircle"),Sn=new e.aR;Sn.resize(4*vr),Sn._trim();let Xt=0;for(let Me of Ke)for(let je=0;je=0&&(Me[De.associatedIconIndex]={shiftedAnchor:lo,angle:No})}else Mr(De.numGlyphs,ae)}if(vr){_e.clear();let je=$t.icon.placedSymbolArray;for(let De=0;De$t.style.map.terrain.getElevation(jn,On,$i):null,zn=ht.layout.get("text-rotation-alignment")==="map";Ct(Wi,jn.posMatrix,$t,Ot,dc,At,Me,vr,zn,ae,jn.toUnwrapped(),Xt.width,Xt.height,Ut,xn)}let Pe=jn.posMatrix,Ne=Ot&&en||Se,sr=je||Ne?rc:dc,ar=$c,Er=Ma&&ht.paint.get(Ot?"text-halo-width":"icon-halo-width").constantOr(1)!==0,rn;rn=Ma?Wi.iconsInText?As(lo.kind,ds,De,Me,je,Ne,$t,Pe,sr,ar,Ut,vl,gu,In):Po(lo.kind,ds,De,Me,je,Ne,$t,Pe,sr,ar,Ut,Ot,vl,!0,In):Ps(lo.kind,ds,De,Me,je,Ne,$t,Pe,sr,ar,Ut,Ot,vl,In);let Jr={program:So,buffers:ga,uniformValues:rn,atlasTexture:Ds,atlasTextureIcon:$s,atlasInterpolation:wl,atlasInterpolationIcon:Lu,isSDF:Ma,hasHalo:Er};if(wr&&Wi.canOverlap){Or=!0;let xn=ga.segments.get();for(let zn of xn)vn.push({segments:new e.a0([zn]),sortKey:zn.sortKey,state:Jr,terrainData:fl})}else vn.push({segments:ga.segments,sortKey:0,state:Jr,terrainData:fl})}Or&&vn.sort((jn,si)=>jn.sortKey-si.sortKey);for(let jn of vn){let si=jn.state;if(un.activeTexture.set(Sn.TEXTURE0),si.atlasTexture.bind(si.atlasInterpolation,Sn.CLAMP_TO_EDGE),si.atlasTextureIcon&&(un.activeTexture.set(Sn.TEXTURE1),si.atlasTextureIcon&&si.atlasTextureIcon.bind(si.atlasInterpolationIcon,Sn.CLAMP_TO_EDGE)),si.isSDF){let Wi=si.uniformValues;si.hasHalo&&(Wi.u_is_halo=1,Gf(si.buffers,jn.segments,ht,$t,si.program,Nr,Dr,Fr,Wi,jn.terrainData)),Wi.u_is_halo=0}Gf(si.buffers,jn.segments,ht,$t,si.program,Nr,Dr,Fr,si.uniformValues,jn.terrainData)}}function Gf($t,z,ht,Et,Ot,Ht,Te,Fe,Ke,vr){let Dr=Et.context;Ot.draw(Dr,Dr.gl.TRIANGLES,Ht,Te,Fe,ts.disabled,Ke,vr,ht.id,$t.layoutVertexBuffer,$t.indexBuffer,z,ht.paint,Et.transform.zoom,$t.programConfigurations.get(ht.id),$t.dynamicLayoutVertexBuffer,$t.opacityVertexBuffer)}function xf($t,z,ht,Et){let Ot=$t.context,Ht=Ot.gl,Te=Pl.disabled,Fe=new bu([Ht.ONE,Ht.ONE],e.aM.transparent,[!0,!0,!0,!0]),Ke=z.getBucket(ht);if(!Ke)return;let vr=Et.key,Dr=ht.heatmapFbos.get(vr);Dr||(Dr=Hf(Ot,z.tileSize,z.tileSize),ht.heatmapFbos.set(vr,Dr)),Ot.bindFramebuffer.set(Dr.framebuffer),Ot.viewport.set([0,0,z.tileSize,z.tileSize]),Ot.clear({color:e.aM.transparent});let Fr=Ke.programConfigurations.get(ht.id),un=$t.useProgram("heatmap",Fr),Sn=$t.style.map.terrain.getTerrainData(Et);un.draw(Ot,Ht.TRIANGLES,tl.disabled,Te,Fe,ts.disabled,Da(Et.posMatrix,z,$t.transform.zoom,ht.paint.get("heatmap-intensity")),Sn,ht.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Ke.segments,ht.paint,$t.transform.zoom,Fr)}function Wh($t,z,ht){let Et=$t.context,Ot=Et.gl;Et.setColorMode($t.colorModeForRenderPass());let Ht=Wf(Et,z),Te=ht.key,Fe=z.heatmapFbos.get(Te);Fe&&(Et.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Fe.colorAttachment.get()),Et.activeTexture.set(Ot.TEXTURE1),Ht.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),$t.useProgram("heatmapTexture").draw(Et,Ot.TRIANGLES,tl.disabled,Pl.disabled,$t.colorModeForRenderPass(),ts.disabled,ys($t,z,0,1),null,z.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments,z.paint,$t.transform.zoom),Fe.destroy(),z.heatmapFbos.delete(Te))}function Hf($t,z,ht){var Et,Ot;let Ht=$t.gl,Te=Ht.createTexture();Ht.bindTexture(Ht.TEXTURE_2D,Te),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Ht.LINEAR),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,Ht.LINEAR);let Fe=(Et=$t.HALF_FLOAT)!==null&&Et!==void 0?Et:Ht.UNSIGNED_BYTE,Ke=(Ot=$t.RGBA16F)!==null&&Ot!==void 0?Ot:Ht.RGBA;Ht.texImage2D(Ht.TEXTURE_2D,0,Ke,z,ht,0,Ht.RGBA,Fe,null);let vr=$t.createFramebuffer(z,ht,!1,!1);return vr.colorAttachment.set(Te),vr}function Wf($t,z){return z.colorRampTexture||(z.colorRampTexture=new p($t,z.colorRamp,$t.gl.RGBA)),z.colorRampTexture}function uh($t,z,ht,Et,Ot){if(!ht||!Et||!Et.imageAtlas)return;let Ht=Et.imageAtlas.patternPositions,Te=Ht[ht.to.toString()],Fe=Ht[ht.from.toString()];if(!Te&&Fe&&(Te=Fe),!Fe&&Te&&(Fe=Te),!Te||!Fe){let Ke=Ot.getPaintProperty(z);Te=Ht[Ke],Fe=Ht[Ke]}Te&&Fe&&$t.setConstantPatternPositions(Te,Fe)}function Yf($t,z,ht,Et,Ot,Ht,Te){let Fe=$t.context.gl,Ke="fill-pattern",vr=ht.paint.get(Ke),Dr=vr&&vr.constantOr(1),Fr=ht.getCrossfadeParameters(),un,Sn,Xt,ae,_e;Te?(Sn=Dr&&!ht.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",un=Fe.LINES):(Sn=Dr?"fillPattern":"fill",un=Fe.TRIANGLES);let Me=vr.constantOr(null);for(let je of Et){let De=z.getTile(je);if(Dr&&!De.patternsLoaded())continue;let $e=De.getBucket(ht);if(!$e)continue;let wr=$e.programConfigurations.get(ht.id),Or=$t.useProgram(Sn,wr),Nr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je);Dr&&($t.context.activeTexture.set(Fe.TEXTURE0),De.imageAtlasTexture.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),wr.updatePaintBuffers(Fr)),uh(wr,Ke,Me,De,ht);let en=Nr?je:null,vn=$t.translatePosMatrix(en?en.posMatrix:je.posMatrix,De,ht.paint.get("fill-translate"),ht.paint.get("fill-translate-anchor"));if(Te){ae=$e.indexBuffer2,_e=$e.segments2;let In=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];Xt=Sn==="fillOutlinePattern"&&Dr?Qa(vn,$t,Fr,De,In):qi(vn,In)}else ae=$e.indexBuffer,_e=$e.segments,Xt=Dr?La(vn,$t,Fr,De):Yn(vn);Or.draw($t.context,un,Ot,$t.stencilModeForClipping(je),Ht,ts.disabled,Xt,Nr,ht.id,$e.layoutVertexBuffer,ae,_e,ht.paint,$t.transform.zoom,wr)}}function Ch($t,z,ht,Et,Ot,Ht,Te){let Fe=$t.context,Ke=Fe.gl,vr="fill-extrusion-pattern",Dr=ht.paint.get(vr),Fr=Dr.constantOr(1),un=ht.getCrossfadeParameters(),Sn=ht.paint.get("fill-extrusion-opacity"),Xt=Dr.constantOr(null);for(let ae of Et){let _e=z.getTile(ae),Me=_e.getBucket(ht);if(!Me)continue;let je=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ae),De=Me.programConfigurations.get(ht.id),$e=$t.useProgram(Fr?"fillExtrusionPattern":"fillExtrusion",De);Fr&&($t.context.activeTexture.set(Ke.TEXTURE0),_e.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),De.updatePaintBuffers(un)),uh(De,vr,Xt,_e,ht);let wr=$t.translatePosMatrix(ae.posMatrix,_e,ht.paint.get("fill-extrusion-translate"),ht.paint.get("fill-extrusion-translate-anchor")),Or=ht.paint.get("fill-extrusion-vertical-gradient"),Nr=Fr?En(wr,$t,Or,Sn,ae,un,_e):Pn(wr,$t,Or,Sn);$e.draw(Fe,Fe.gl.TRIANGLES,Ot,Ht,Te,ts.backCCW,Nr,je,ht.id,Me.layoutVertexBuffer,Me.indexBuffer,Me.segments,ht.paint,$t.transform.zoom,De,$t.style.map.terrain&&Me.centroidVertexBuffer)}}function vh($t,z,ht,Et,Ot,Ht,Te){let Fe=$t.context,Ke=Fe.gl,vr=ht.fbo;if(!vr)return;let Dr=$t.useProgram("hillshade"),Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(z);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,vr.colorAttachment.get()),Dr.draw(Fe,Ke.TRIANGLES,Ot,Ht,Te,ts.disabled,((un,Sn,Xt,ae)=>{let _e=Xt.paint.get("hillshade-shadow-color"),Me=Xt.paint.get("hillshade-highlight-color"),je=Xt.paint.get("hillshade-accent-color"),De=Xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(De-=un.transform.angle);let $e=!un.options.moving;return{u_matrix:ae?ae.posMatrix:un.transform.calculatePosMatrix(Sn.tileID.toUnwrapped(),$e),u_image:0,u_latrange:os(0,Sn.tileID),u_light:[Xt.paint.get("hillshade-exaggeration"),De],u_shadow:_e,u_highlight:Me,u_accent:je}})($t,ht,Et,Fr?z:null),Fr,Et.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments)}function uc($t,z,ht,Et,Ot,Ht){let Te=$t.context,Fe=Te.gl,Ke=z.dem;if(Ke&&Ke.data){let vr=Ke.dim,Dr=Ke.stride,Fr=Ke.getPixels();if(Te.activeTexture.set(Fe.TEXTURE1),Te.pixelStoreUnpackPremultiplyAlpha.set(!1),z.demTexture=z.demTexture||$t.getTileTexture(Dr),z.demTexture){let Sn=z.demTexture;Sn.update(Fr,{premultiply:!1}),Sn.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE)}else z.demTexture=new p(Te,Fr,Fe.RGBA,{premultiply:!1}),z.demTexture.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE);Te.activeTexture.set(Fe.TEXTURE0);let un=z.fbo;if(!un){let Sn=new p(Te,{width:vr,height:vr,data:null},Fe.RGBA);Sn.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),un=z.fbo=Te.createFramebuffer(vr,vr,!0,!1),un.colorAttachment.set(Sn.texture)}Te.bindFramebuffer.set(un.framebuffer),Te.viewport.set([0,0,vr,vr]),$t.useProgram("hillshadePrepare").draw(Te,Fe.TRIANGLES,Et,Ot,Ht,ts.disabled,((Sn,Xt)=>{let ae=Xt.stride,_e=e.H();return e.aP(_e,0,e.X,-e.X,0,0,1),e.J(_e,_e,[0,-e.X,0]),{u_matrix:_e,u_image:1,u_dimension:[ae,ae],u_zoom:Sn.overscaledZ,u_unpack:Xt.getUnpackVector()}})(z.tileID,Ke),null,ht.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments),z.needsHillshadePrepare=!1}}function rf($t,z,ht,Et,Ot,Ht){let Te=Et.paint.get("raster-fade-duration");if(!Ht&&Te>0){let Fe=o.now(),Ke=(Fe-$t.timeAdded)/Te,vr=z?(Fe-z.timeAdded)/Te:-1,Dr=ht.getSource(),Fr=Ot.coveringZoomLevel({tileSize:Dr.tileSize,roundZoom:Dr.roundZoom}),un=!z||Math.abs(z.tileID.overscaledZ-Fr)>Math.abs($t.tileID.overscaledZ-Fr),Sn=un&&$t.refreshedUponExpiration?1:e.ac(un?Ke:1-vr,0,1);return $t.refreshedUponExpiration&&Ke>=1&&($t.refreshedUponExpiration=!1),z?{opacity:1,mix:1-Sn}:{opacity:Sn,mix:0}}return{opacity:1,mix:0}}let qf=new e.aM(1,0,0,1),eu=new e.aM(0,1,0,1),Ef=new e.aM(0,0,1,1),Cd=new e.aM(1,0,1,1),Kf=new e.aM(0,1,1,1);function _f($t,z,ht,Et){Nc($t,0,z+ht/2,$t.transform.width,ht,Et)}function Xf($t,z,ht,Et){Nc($t,z-ht/2,0,ht,$t.transform.height,Et)}function Nc($t,z,ht,Et,Ot,Ht){let Te=$t.context,Fe=Te.gl;Fe.enable(Fe.SCISSOR_TEST),Fe.scissor(z*$t.pixelRatio,ht*$t.pixelRatio,Et*$t.pixelRatio,Ot*$t.pixelRatio),Te.clear({color:Ht}),Fe.disable(Fe.SCISSOR_TEST)}function Jf($t,z,ht){let Et=$t.context,Ot=Et.gl,Ht=ht.posMatrix,Te=$t.useProgram("debug"),Fe=tl.disabled,Ke=Pl.disabled,vr=$t.colorModeForRenderPass(),Dr="$debug",Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ht);Et.activeTexture.set(Ot.TEXTURE0);let un=z.getTileByID(ht.key).latestRawTileData,Sn=Math.floor((un&&un.byteLength||0)/1024),Xt=z.getTile(ht).tileSize,ae=512/Math.min(Xt,512)*(ht.overscaledZ/$t.transform.zoom)*.5,_e=ht.canonical.toString();ht.overscaledZ!==ht.canonical.z&&(_e+=` => ${ht.overscaledZ}`),function(Me,je){Me.initDebugOverlayCanvas();let De=Me.debugOverlayCanvas,$e=Me.context.gl,wr=Me.debugOverlayCanvas.getContext("2d");wr.clearRect(0,0,De.width,De.height),wr.shadowColor="white",wr.shadowBlur=2,wr.lineWidth=1.5,wr.strokeStyle="white",wr.textBaseline="top",wr.font="bold 36px Open Sans, sans-serif",wr.fillText(je,5,5),wr.strokeText(je,5,5),Me.debugOverlayTexture.update(De),Me.debugOverlayTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE)}($t,`${_e} ${Sn}kB`),Te.draw(Et,Ot.TRIANGLES,Fe,Ke,bu.alphaBlended,ts.disabled,yo(Ht,e.aM.transparent,ae),null,Dr,$t.debugBuffer,$t.quadTriangleIndexBuffer,$t.debugSegments),Te.draw(Et,Ot.LINE_STRIP,Fe,Ke,vr,ts.disabled,yo(Ht,e.aM.red),Fr,Dr,$t.debugBuffer,$t.tileBorderIndexBuffer,$t.debugSegments)}function Du($t,z,ht){let Et=$t.context,Ot=Et.gl,Ht=$t.colorModeForRenderPass(),Te=new tl(Ot.LEQUAL,tl.ReadWrite,$t.depthRangeFor3D),Fe=$t.useProgram("terrain"),Ke=z.getTerrainMesh();Et.bindFramebuffer.set(null),Et.viewport.set([0,0,$t.width,$t.height]);for(let vr of ht){let Dr=$t.renderToTexture.getTexture(vr),Fr=z.getTerrainData(vr.tileID);Et.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Dr.texture);let un=$t.transform.calculatePosMatrix(vr.tileID.toUnwrapped()),Sn=z.getMeshFrameDelta($t.transform.zoom),Xt=$t.transform.calculateFogMatrix(vr.tileID.toUnwrapped()),ae=Hr(un,Sn,Xt,$t.style.sky,$t.transform.pitch);Fe.draw(Et,Ot.TRIANGLES,Te,Pl.disabled,Ht,ts.backCCW,ae,Fr,"terrain",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}}class jc{constructor(z,ht,Et){this.vertexBuffer=z,this.indexBuffer=ht,this.segments=Et}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class qh{constructor(z,ht){this.context=new Ed(z),this.transform=ht,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ge.maxUnderzooming+Ge.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $r}resize(z,ht,Et){if(this.width=Math.floor(z*Et),this.height=Math.floor(ht*Et),this.pixelRatio=Et,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Ot of this.style._order)this.style._layers[Ot].resize()}setup(){let z=this.context,ht=new e.aX;ht.emplaceBack(0,0),ht.emplaceBack(e.X,0),ht.emplaceBack(0,e.X),ht.emplaceBack(e.X,e.X),this.tileExtentBuffer=z.createVertexBuffer(ht,mn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let Et=new e.aX;Et.emplaceBack(0,0),Et.emplaceBack(e.X,0),Et.emplaceBack(0,e.X),Et.emplaceBack(e.X,e.X),this.debugBuffer=z.createVertexBuffer(Et,mn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let Ot=new e.$;Ot.emplaceBack(0,0,0,0),Ot.emplaceBack(e.X,0,e.X,0),Ot.emplaceBack(0,e.X,0,e.X),Ot.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=z.createVertexBuffer(Ot,Jt.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Ht=new e.aX;Ht.emplaceBack(0,0),Ht.emplaceBack(1,0),Ht.emplaceBack(0,1),Ht.emplaceBack(1,1),this.viewportBuffer=z.createVertexBuffer(Ht,mn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let Te=new e.aZ;Te.emplaceBack(0),Te.emplaceBack(1),Te.emplaceBack(3),Te.emplaceBack(2),Te.emplaceBack(0),this.tileBorderIndexBuffer=z.createIndexBuffer(Te);let Fe=new e.aY;Fe.emplaceBack(0,1,2),Fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=z.createIndexBuffer(Fe);let Ke=this.context.gl;this.stencilClearMode=new Pl({func:Ke.ALWAYS,mask:0},0,255,Ke.ZERO,Ke.ZERO,Ke.ZERO)}clearStencil(){let z=this.context,ht=z.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Et=e.H();e.aP(Et,0,this.width,this.height,0,0,1),e.K(Et,Et,[ht.drawingBufferWidth,ht.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(z,ht.TRIANGLES,tl.disabled,this.stencilClearMode,bu.disabled,ts.disabled,Bo(Et),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(z,ht){if(this.currentStencilSource===z.source||!z.isTileClipped()||!ht||!ht.length)return;this.currentStencilSource=z.source;let Et=this.context,Ot=Et.gl;this.nextStencilID+ht.length>256&&this.clearStencil(),Et.setColorMode(bu.disabled),Et.setDepthMode(tl.disabled);let Ht=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Te of ht){let Fe=this._tileClippingMaskIDs[Te.key]=this.nextStencilID++,Ke=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Te);Ht.draw(Et,Ot.TRIANGLES,tl.disabled,new Pl({func:Ot.ALWAYS,mask:0},Fe,255,Ot.KEEP,Ot.KEEP,Ot.REPLACE),bu.disabled,ts.disabled,Bo(Te.posMatrix),Ke,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let z=this.nextStencilID++,ht=this.context.gl;return new Pl({func:ht.NOTEQUAL,mask:255},z,255,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilModeForClipping(z){let ht=this.context.gl;return new Pl({func:ht.EQUAL,mask:255},this._tileClippingMaskIDs[z.key],0,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilConfigForOverlap(z){let ht=this.context.gl,Et=z.sort((Te,Fe)=>Fe.overscaledZ-Te.overscaledZ),Ot=Et[Et.length-1].overscaledZ,Ht=Et[0].overscaledZ-Ot+1;if(Ht>1){this.currentStencilSource=void 0,this.nextStencilID+Ht>256&&this.clearStencil();let Te={};for(let Fe=0;Fe({u_sky_color:Me.properties.get("sky-color"),u_horizon_color:Me.properties.get("horizon-color"),u_horizon:(je.height/2+je.getHorizon())*De,u_sky_horizon_blend:Me.properties.get("sky-horizon-blend")*je.height/2*De}))(vr,Ke.style.map.transform,Ke.pixelRatio),Sn=new tl(Fr.LEQUAL,tl.ReadWrite,[0,1]),Xt=Pl.disabled,ae=Ke.colorModeForRenderPass(),_e=Ke.useProgram("sky");if(!vr.mesh){let Me=new e.aX;Me.emplaceBack(-1,-1),Me.emplaceBack(1,-1),Me.emplaceBack(1,1),Me.emplaceBack(-1,1);let je=new e.aY;je.emplaceBack(0,1,2),je.emplaceBack(0,2,3),vr.mesh=new jc(Dr.createVertexBuffer(Me,mn.members),Dr.createIndexBuffer(je),e.a0.simpleSegment(0,0,Me.length,je.length))}_e.draw(Dr,Fr.TRIANGLES,Sn,Xt,ae,ts.disabled,un,void 0,"sky",vr.mesh.vertexBuffer,vr.mesh.indexBuffer,vr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ht.showOverdrawInspector,this.depthRangeFor3D=[0,1-(z._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Et.length-1;this.currentLayer>=0;this.currentLayer--){let Ke=this.style._layers[Et[this.currentLayer]],vr=Ot[Ke.source],Dr=Ht[Ke.source];this._renderTileClippingMasks(Ke,Dr),this.renderLayer(this,vr,Ke,Dr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer_e.source&&!_e.isHidden(Dr)?[vr.sourceCaches[_e.source]]:[]),Sn=un.filter(_e=>_e.getSource().type==="vector"),Xt=un.filter(_e=>_e.getSource().type!=="vector"),ae=_e=>{(!Fr||Fr.getSource().maxzoom<_e.getSource().maxzoom)&&(Fr=_e)};return Sn.forEach(_e=>ae(_e)),Fr||Xt.forEach(_e=>ae(_e)),Fr}(this.style,this.transform.zoom);Ke&&function(vr,Dr,Fr){for(let un=0;un0),Ot&&(e.b0(ht,Et),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Ht,Te){let Fe=Ht.context,Ke=Fe.gl,vr=bu.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=Te.getTerrainMesh(),un=Te.sourceCache.getRenderableTiles(),Sn=Ht.useProgram("terrainDepth");Fe.bindFramebuffer.set(Te.getFramebuffer("depth").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1});for(let Xt of un){let ae=Te.getTerrainData(Xt.tileID),_e={u_matrix:Ht.transform.calculatePosMatrix(Xt.tileID.toUnwrapped()),u_ele_delta:Te.getMeshFrameDelta(Ht.transform.zoom)};Sn.draw(Fe,Ke.TRIANGLES,Dr,Pl.disabled,vr,ts.backCCW,_e,ae,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain),function(Ht,Te){let Fe=Ht.context,Ke=Fe.gl,vr=bu.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=Te.getTerrainMesh(),un=Te.getCoordsTexture(),Sn=Te.sourceCache.getRenderableTiles(),Xt=Ht.useProgram("terrainCoords");Fe.bindFramebuffer.set(Te.getFramebuffer("coords").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1}),Te.coordsIndex=[];for(let ae of Sn){let _e=Te.getTerrainData(ae.tileID);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,un.texture);let Me={u_matrix:Ht.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-Te.coordsIndex.length)/255,u_texture:0,u_ele_delta:Te.getMeshFrameDelta(Ht.transform.zoom)};Xt.draw(Fe,Ke.TRIANGLES,Dr,Pl.disabled,vr,ts.backCCW,Me,_e,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments),Te.coordsIndex.push(ae.tileID.key)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain))}renderLayer(z,ht,Et,Ot){if(!Et.isHidden(this.transform.zoom)&&(Et.type==="background"||Et.type==="custom"||(Ot||[]).length))switch(this.id=Et.id,Et.type){case"symbol":(function(Ht,Te,Fe,Ke,vr){if(Ht.renderPass!=="translucent")return;let Dr=Pl.disabled,Fr=Ht.colorModeForRenderPass();(Fe._unevaluatedLayout.hasValue("text-variable-anchor")||Fe._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(un,Sn,Xt,ae,_e,Me,je,De,$e){let wr=Sn.transform,Or=Ji(),Nr=_e==="map",en=Me==="map";for(let vn of un){let In=ae.getTile(vn),jn=In.getBucket(Xt);if(!jn||!jn.text||!jn.text.segments.get().length)continue;let si=e.ag(jn.textSizeData,wr.zoom),Wi=qn(In,1,Sn.transform.zoom),ga=Xr(vn.posMatrix,en,Nr,Sn.transform,Wi),pa=Xt.layout.get("icon-text-fit")!=="none"&&jn.hasIconData();if(si){let Ma=Math.pow(2,wr.zoom-In.tileID.overscaledZ),lo=Sn.style.map.terrain?(So,ds)=>Sn.style.map.terrain.getElevation(vn,So,ds):null,No=Or.translatePosition(wr,In,je,De);yf(jn,Nr,en,$e,wr,ga,vn.posMatrix,Ma,si,pa,Or,No,vn.toUnwrapped(),lo)}}}(Ke,Ht,Fe,Te,Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),vr),Fe.paint.get("icon-opacity").constantOr(1)!==0&&hd(Ht,Te,Fe,Ke,!1,Fe.paint.get("icon-translate"),Fe.paint.get("icon-translate-anchor"),Fe.layout.get("icon-rotation-alignment"),Fe.layout.get("icon-pitch-alignment"),Fe.layout.get("icon-keep-upright"),Dr,Fr),Fe.paint.get("text-opacity").constantOr(1)!==0&&hd(Ht,Te,Fe,Ke,!0,Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.layout.get("text-keep-upright"),Dr,Fr),Te.map.showCollisionBoxes&&(lh(Ht,Te,Fe,Ke,!0),lh(Ht,Te,Fe,Ke,!1))})(z,ht,Et,Ot,this.style.placement.variableOffsets);break;case"circle":(function(Ht,Te,Fe,Ke){if(Ht.renderPass!=="translucent")return;let vr=Fe.paint.get("circle-opacity"),Dr=Fe.paint.get("circle-stroke-width"),Fr=Fe.paint.get("circle-stroke-opacity"),un=!Fe.layout.get("circle-sort-key").isConstant();if(vr.constantOr(1)===0&&(Dr.constantOr(1)===0||Fr.constantOr(1)===0))return;let Sn=Ht.context,Xt=Sn.gl,ae=Ht.depthModeForSublayer(0,tl.ReadOnly),_e=Pl.disabled,Me=Ht.colorModeForRenderPass(),je=[];for(let De=0;DeDe.sortKey-$e.sortKey);for(let De of je){let{programConfiguration:$e,program:wr,layoutVertexBuffer:Or,indexBuffer:Nr,uniformValues:en,terrainData:vn}=De.state;wr.draw(Sn,Xt.TRIANGLES,ae,_e,Me,ts.disabled,en,vn,Fe.id,Or,Nr,De.segments,Fe.paint,Ht.transform.zoom,$e)}})(z,ht,Et,Ot);break;case"heatmap":(function(Ht,Te,Fe,Ke){if(Fe.paint.get("heatmap-opacity")===0)return;let vr=Ht.context;if(Ht.style.map.terrain){for(let Dr of Ke){let Fr=Te.getTile(Dr);Te.hasRenderableParent(Dr)||(Ht.renderPass==="offscreen"?xf(Ht,Fr,Fe,Dr):Ht.renderPass==="translucent"&&Wh(Ht,Fe,Dr))}vr.viewport.set([0,0,Ht.width,Ht.height])}else Ht.renderPass==="offscreen"?function(Dr,Fr,un,Sn){let Xt=Dr.context,ae=Xt.gl,_e=Pl.disabled,Me=new bu([ae.ONE,ae.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(je,De,$e){let wr=je.gl;je.activeTexture.set(wr.TEXTURE1),je.viewport.set([0,0,De.width/4,De.height/4]);let Or=$e.heatmapFbos.get(e.aU);Or?(wr.bindTexture(wr.TEXTURE_2D,Or.colorAttachment.get()),je.bindFramebuffer.set(Or.framebuffer)):(Or=Hf(je,De.width/4,De.height/4),$e.heatmapFbos.set(e.aU,Or))})(Xt,Dr,un),Xt.clear({color:e.aM.transparent});for(let je=0;je20&&Dr.texParameterf(Dr.TEXTURE_2D,vr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,vr.extTextureFilterAnisotropicMax);let jn=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(je),si=jn?je:null,Wi=si?si.posMatrix:Ht.transform.calculatePosMatrix(je.toUnwrapped(),Me),ga=jl(Wi,vn||[0,0],en||1,Nr,Fe);Fr instanceof ge?un.draw(vr,Dr.TRIANGLES,De,Pl.disabled,Sn,ts.disabled,ga,jn,Fe.id,Fr.boundsBuffer,Ht.quadTriangleIndexBuffer,Fr.boundsSegments):un.draw(vr,Dr.TRIANGLES,De,Xt[je.overscaledZ],Sn,ts.disabled,ga,jn,Fe.id,Ht.rasterBoundsBuffer,Ht.quadTriangleIndexBuffer,Ht.rasterBoundsSegments)}})(z,ht,Et,Ot);break;case"background":(function(Ht,Te,Fe,Ke){let vr=Fe.paint.get("background-color"),Dr=Fe.paint.get("background-opacity");if(Dr===0)return;let Fr=Ht.context,un=Fr.gl,Sn=Ht.transform,Xt=Sn.tileSize,ae=Fe.paint.get("background-pattern");if(Ht.isPatternMissing(ae))return;let _e=!ae&&vr.a===1&&Dr===1&&Ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(Ht.renderPass!==_e)return;let Me=Pl.disabled,je=Ht.depthModeForSublayer(0,_e==="opaque"?tl.ReadWrite:tl.ReadOnly),De=Ht.colorModeForRenderPass(),$e=Ht.useProgram(ae?"backgroundPattern":"background"),wr=Ke||Sn.coveringTiles({tileSize:Xt,terrain:Ht.style.map.terrain});ae&&(Fr.activeTexture.set(un.TEXTURE0),Ht.imageManager.bind(Ht.context));let Or=Fe.getCrossfadeParameters();for(let Nr of wr){let en=Ke?Nr.posMatrix:Ht.transform.calculatePosMatrix(Nr.toUnwrapped()),vn=ae?ql(en,Dr,Ht,ae,{tileID:Nr,tileSize:Xt},Or):kl(en,Dr,vr),In=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(Nr);$e.draw(Fr,un.TRIANGLES,je,Me,De,ts.disabled,vn,In,Fe.id,Ht.tileExtentBuffer,Ht.quadTriangleIndexBuffer,Ht.tileExtentSegments)}})(z,0,Et,Ot);break;case"custom":(function(Ht,Te,Fe){let Ke=Ht.context,vr=Fe.implementation;if(Ht.renderPass==="offscreen"){let Dr=vr.prerender;Dr&&(Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Dr.call(vr,Ke.gl,Ht.transform.customLayerMatrix()),Ke.setDirty(),Ht.setBaseState())}else if(Ht.renderPass==="translucent"){Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Ke.setStencilMode(Pl.disabled);let Dr=vr.renderingMode==="3d"?new tl(Ht.context.gl.LEQUAL,tl.ReadWrite,Ht.depthRangeFor3D):Ht.depthModeForSublayer(0,tl.ReadOnly);Ke.setDepthMode(Dr),vr.render(Ke.gl,Ht.transform.customLayerMatrix(),{farZ:Ht.transform.farZ,nearZ:Ht.transform.nearZ,fov:Ht.transform._fov,modelViewProjectionMatrix:Ht.transform.modelViewProjectionMatrix,projectionMatrix:Ht.transform.projectionMatrix}),Ke.setDirty(),Ht.setBaseState(),Ke.bindFramebuffer.set(null)}})(z,0,Et)}}translatePosMatrix(z,ht,Et,Ot,Ht){if(!Et[0]&&!Et[1])return z;let Te=Ht?Ot==="map"?this.transform.angle:0:Ot==="viewport"?-this.transform.angle:0;if(Te){let vr=Math.sin(Te),Dr=Math.cos(Te);Et=[Et[0]*Dr-Et[1]*vr,Et[0]*vr+Et[1]*Dr]}let Fe=[Ht?Et[0]:qn(ht,Et[0],this.transform.zoom),Ht?Et[1]:qn(ht,Et[1],this.transform.zoom),0],Ke=new Float32Array(16);return e.J(Ke,z,Fe),Ke}saveTileTexture(z){let ht=this._tileTextures[z.size[0]];ht?ht.push(z):this._tileTextures[z.size[0]]=[z]}getTileTexture(z){let ht=this._tileTextures[z];return ht&&ht.length>0?ht.pop():null}isPatternMissing(z){if(!z)return!1;if(!z.from||!z.to)return!0;let ht=this.imageManager.getPattern(z.from.toString()),Et=this.imageManager.getPattern(z.to.toString());return!ht||!Et}useProgram(z,ht){this.cache=this.cache||{};let Et=z+(ht?ht.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Et]||(this.cache[Et]=new Bn(this.context,on[z],ht,Jl[z],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Et]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(z.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:z,drawingBufferHeight:ht}=this.context.gl;return this.width!==z||this.height!==ht}}class hu{constructor(z,ht){this.points=z,this.planes=ht}static fromInvProjectionMatrix(z,ht,Et){let Ot=Math.pow(2,Et),Ht=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Fe=>{let Ke=1/(Fe=e.af([],Fe,z))[3]/ht*Ot;return e.b1(Fe,Fe,[Ke,Ke,1/Fe[3],Ke])}),Te=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Fe=>{let Ke=function(un,Sn){var Xt=Sn[0],ae=Sn[1],_e=Sn[2],Me=Xt*Xt+ae*ae+_e*_e;return Me>0&&(Me=1/Math.sqrt(Me)),un[0]=Sn[0]*Me,un[1]=Sn[1]*Me,un[2]=Sn[2]*Me,un}([],function(un,Sn,Xt){var ae=Sn[0],_e=Sn[1],Me=Sn[2],je=Xt[0],De=Xt[1],$e=Xt[2];return un[0]=_e*$e-Me*De,un[1]=Me*je-ae*$e,un[2]=ae*De-_e*je,un}([],M([],Ht[Fe[0]],Ht[Fe[1]]),M([],Ht[Fe[2]],Ht[Fe[1]]))),vr=-((Dr=Ke)[0]*(Fr=Ht[Fe[1]])[0]+Dr[1]*Fr[1]+Dr[2]*Fr[2]);var Dr,Fr;return Ke.concat(vr)});return new hu(Ht,Te)}}class Lh{constructor(z,ht){this.min=z,this.max=ht,this.center=function(Et,Ot,Ht){return Et[0]=.5*Ot[0],Et[1]=.5*Ot[1],Et[2]=.5*Ot[2],Et}([],function(Et,Ot,Ht){return Et[0]=Ot[0]+Ht[0],Et[1]=Ot[1]+Ht[1],Et[2]=Ot[2]+Ht[2],Et}([],this.min,this.max))}quadrant(z){let ht=[z%2==0,z<2],Et=_(this.min),Ot=_(this.max);for(let Ht=0;Ht=0&&Te++;if(Te===0)return 0;Te!==ht.length&&(Et=!1)}if(Et)return 2;for(let Ot=0;Ot<3;Ot++){let Ht=Number.MAX_VALUE,Te=-Number.MAX_VALUE;for(let Fe=0;Fethis.max[Ot]-this.min[Ot])return 0}return 1}}class Mc{constructor(z=0,ht=0,Et=0,Ot=0){if(isNaN(z)||z<0||isNaN(ht)||ht<0||isNaN(Et)||Et<0||isNaN(Ot)||Ot<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=z,this.bottom=ht,this.left=Et,this.right=Ot}interpolate(z,ht,Et){return ht.top!=null&&z.top!=null&&(this.top=e.y.number(z.top,ht.top,Et)),ht.bottom!=null&&z.bottom!=null&&(this.bottom=e.y.number(z.bottom,ht.bottom,Et)),ht.left!=null&&z.left!=null&&(this.left=e.y.number(z.left,ht.left,Et)),ht.right!=null&&z.right!=null&&(this.right=e.y.number(z.right,ht.right,Et)),this}getCenter(z,ht){let Et=e.ac((this.left+z-this.right)/2,0,z),Ot=e.ac((this.top+ht-this.bottom)/2,0,ht);return new e.P(Et,Ot)}equals(z){return this.top===z.top&&this.bottom===z.bottom&&this.left===z.left&&this.right===z.right}clone(){return new Mc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Uc=85.051129;class wu{constructor(z,ht,Et,Ot,Ht){this.tileSize=512,this._renderWorldCopies=Ht===void 0||!!Ht,this._minZoom=z||0,this._maxZoom=ht||22,this._minPitch=Et??0,this._maxPitch=Ot??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Mc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let z=new wu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return z.apply(this),z}apply(z){this.tileSize=z.tileSize,this.latRange=z.latRange,this.lngRange=z.lngRange,this.width=z.width,this.height=z.height,this._center=z._center,this._elevation=z._elevation,this.minElevationForCurrentTile=z.minElevationForCurrentTile,this.zoom=z.zoom,this.angle=z.angle,this._fov=z._fov,this._pitch=z._pitch,this._unmodified=z._unmodified,this._edgeInsets=z._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(z){this._minZoom!==z&&(this._minZoom=z,this.zoom=Math.max(this.zoom,z))}get maxZoom(){return this._maxZoom}set maxZoom(z){this._maxZoom!==z&&(this._maxZoom=z,this.zoom=Math.min(this.zoom,z))}get minPitch(){return this._minPitch}set minPitch(z){this._minPitch!==z&&(this._minPitch=z,this.pitch=Math.max(this.pitch,z))}get maxPitch(){return this._maxPitch}set maxPitch(z){this._maxPitch!==z&&(this._maxPitch=z,this.pitch=Math.min(this.pitch,z))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(z){z===void 0?z=!0:z===null&&(z=!1),this._renderWorldCopies=z}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(z){let ht=-e.b3(z,-180,180)*Math.PI/180;this.angle!==ht&&(this._unmodified=!1,this.angle=ht,this._calcMatrices(),this.rotationMatrix=function(){var Et=new e.A(4);return e.A!=Float32Array&&(Et[1]=0,Et[2]=0),Et[0]=1,Et[3]=1,Et}(),function(Et,Ot,Ht){var Te=Ot[0],Fe=Ot[1],Ke=Ot[2],vr=Ot[3],Dr=Math.sin(Ht),Fr=Math.cos(Ht);Et[0]=Te*Fr+Ke*Dr,Et[1]=Fe*Fr+vr*Dr,Et[2]=Te*-Dr+Ke*Fr,Et[3]=Fe*-Dr+vr*Fr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(z){let ht=e.ac(z,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ht&&(this._unmodified=!1,this._pitch=ht,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(z){z=Math.max(.01,Math.min(60,z)),this._fov!==z&&(this._unmodified=!1,this._fov=z/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(z){let ht=Math.min(Math.max(z,this.minZoom),this.maxZoom);this._zoom!==ht&&(this._unmodified=!1,this._zoom=ht,this.tileZoom=Math.max(0,Math.floor(ht)),this.scale=this.zoomScale(ht),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(z){z.lat===this._center.lat&&z.lng===this._center.lng||(this._unmodified=!1,this._center=z,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(z){z!==this._elevation&&(this._elevation=z,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(z){this._edgeInsets.equals(z)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,z,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(z){return this._edgeInsets.equals(z)}interpolatePadding(z,ht,Et){this._unmodified=!1,this._edgeInsets.interpolate(z,ht,Et),this._constrain(),this._calcMatrices()}coveringZoomLevel(z){let ht=(z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/z.tileSize));return Math.max(0,ht)}getVisibleUnwrappedCoordinates(z){let ht=[new e.b4(0,z)];if(this._renderWorldCopies){let Et=this.pointCoordinate(new e.P(0,0)),Ot=this.pointCoordinate(new e.P(this.width,0)),Ht=this.pointCoordinate(new e.P(this.width,this.height)),Te=this.pointCoordinate(new e.P(0,this.height)),Fe=Math.floor(Math.min(Et.x,Ot.x,Ht.x,Te.x)),Ke=Math.floor(Math.max(Et.x,Ot.x,Ht.x,Te.x)),vr=1;for(let Dr=Fe-vr;Dr<=Ke+vr;Dr++)Dr!==0&&ht.push(new e.b4(Dr,z))}return ht}coveringTiles(z){var ht,Et;let Ot=this.coveringZoomLevel(z),Ht=Ot;if(z.minzoom!==void 0&&Otz.maxzoom&&(Ot=z.maxzoom);let Te=this.pointCoordinate(this.getCameraPoint()),Fe=e.Z.fromLngLat(this.center),Ke=Math.pow(2,Ot),vr=[Ke*Te.x,Ke*Te.y,0],Dr=[Ke*Fe.x,Ke*Fe.y,0],Fr=hu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Ot),un=z.minzoom||0;!z.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(un=Ot);let Sn=z.terrain?2/Math.min(this.tileSize,z.tileSize)*this.tileSize:3,Xt=De=>({aabb:new Lh([De*Ke,0,0],[(De+1)*Ke,Ke,0]),zoom:0,x:0,y:0,wrap:De,fullyVisible:!1}),ae=[],_e=[],Me=Ot,je=z.reparseOverscaled?Ht:Ot;if(this._renderWorldCopies)for(let De=1;De<=3;De++)ae.push(Xt(-De)),ae.push(Xt(De));for(ae.push(Xt(0));ae.length>0;){let De=ae.pop(),$e=De.x,wr=De.y,Or=De.fullyVisible;if(!Or){let jn=De.aabb.intersects(Fr);if(jn===0)continue;Or=jn===2}let Nr=z.terrain?vr:Dr,en=De.aabb.distanceX(Nr),vn=De.aabb.distanceY(Nr),In=Math.max(Math.abs(en),Math.abs(vn));if(De.zoom===Me||In>Sn+(1<=un){let jn=Me-De.zoom,si=vr[0]-.5-($e<>1),ga=De.zoom+1,pa=De.aabb.quadrant(jn);if(z.terrain){let Ma=new e.S(ga,De.wrap,ga,si,Wi),lo=z.terrain.getMinMaxElevation(Ma),No=(ht=lo.minElevation)!==null&&ht!==void 0?ht:this.elevation,So=(Et=lo.maxElevation)!==null&&Et!==void 0?Et:this.elevation;pa=new Lh([pa.min[0],pa.min[1],No],[pa.max[0],pa.max[1],So])}ae.push({aabb:pa,zoom:ga,x:si,y:Wi,wrap:De.wrap,fullyVisible:Or})}}return _e.sort((De,$e)=>De.distanceSq-$e.distanceSq).map(De=>De.tileID)}resize(z,ht){this.width=z,this.height=ht,this.pixelsToGLUnits=[2/z,-2/ht],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(z){return Math.pow(2,z)}scaleZoom(z){return Math.log(z)/Math.LN2}project(z){let ht=e.ac(z.lat,-85.051129,Uc);return new e.P(e.O(z.lng)*this.worldSize,e.Q(ht)*this.worldSize)}unproject(z){return new e.Z(z.x/this.worldSize,z.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(z){let ht=this.elevation,Et=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Ot=this.pointLocation(this.centerPoint,z),Ht=z.getElevationForLngLatZoom(Ot,this.tileZoom);if(!(this.elevation-Ht))return;let Te=Et+ht-Ht,Fe=Math.cos(this._pitch)*this.cameraToCenterDistance/Te/e.b5(1,Ot.lat),Ke=this.scaleZoom(Fe/this.tileSize);this._elevation=Ht,this._center=Ot,this.zoom=Ke}setLocationAtPoint(z,ht){let Et=this.pointCoordinate(ht),Ot=this.pointCoordinate(this.centerPoint),Ht=this.locationCoordinate(z),Te=new e.Z(Ht.x-(Et.x-Ot.x),Ht.y-(Et.y-Ot.y));this.center=this.coordinateLocation(Te),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(z,ht){return ht?this.coordinatePoint(this.locationCoordinate(z),ht.getElevationForLngLatZoom(z,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(z))}pointLocation(z,ht){return this.coordinateLocation(this.pointCoordinate(z,ht))}locationCoordinate(z){return e.Z.fromLngLat(z)}coordinateLocation(z){return z&&z.toLngLat()}pointCoordinate(z,ht){if(ht){let un=ht.pointCoordinate(z);if(un!=null)return un}let Et=[z.x,z.y,0,1],Ot=[z.x,z.y,1,1];e.af(Et,Et,this.pixelMatrixInverse),e.af(Ot,Ot,this.pixelMatrixInverse);let Ht=Et[3],Te=Ot[3],Fe=Et[1]/Ht,Ke=Ot[1]/Te,vr=Et[2]/Ht,Dr=Ot[2]/Te,Fr=vr===Dr?0:(0-vr)/(Dr-vr);return new e.Z(e.y.number(Et[0]/Ht,Ot[0]/Te,Fr)/this.worldSize,e.y.number(Fe,Ke,Fr)/this.worldSize)}coordinatePoint(z,ht=0,Et=this.pixelMatrix){let Ot=[z.x*this.worldSize,z.y*this.worldSize,ht,1];return e.af(Ot,Ot,Et),new e.P(Ot[0]/Ot[3],Ot[1]/Ot[3])}getBounds(){let z=Math.max(0,this.height/2-this.getHorizon());return new ut().extend(this.pointLocation(new e.P(0,z))).extend(this.pointLocation(new e.P(this.width,z))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ut([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(z){z?(this.lngRange=[z.getWest(),z.getEast()],this.latRange=[z.getSouth(),z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Uc])}calculateTileMatrix(z){let ht=z.canonical,Et=this.worldSize/this.zoomScale(ht.z),Ot=ht.x+Math.pow(2,ht.z)*z.wrap,Ht=e.an(new Float64Array(16));return e.J(Ht,Ht,[Ot*Et,ht.y*Et,0]),e.K(Ht,Ht,[Et/e.X,Et/e.X,1]),Ht}calculatePosMatrix(z,ht=!1){let Et=z.key,Ot=ht?this._alignedPosMatrixCache:this._posMatrixCache;if(Ot[Et])return Ot[Et];let Ht=this.calculateTileMatrix(z);return e.L(Ht,ht?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Ht),Ot[Et]=new Float32Array(Ht),Ot[Et]}calculateFogMatrix(z){let ht=z.key,Et=this._fogMatrixCache;if(Et[ht])return Et[ht];let Ot=this.calculateTileMatrix(z);return e.L(Ot,this.fogMatrix,Ot),Et[ht]=new Float32Array(Ot),Et[ht]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(z,ht){ht=e.ac(+ht,this.minZoom,this.maxZoom);let Et={center:new e.N(z.lng,z.lat),zoom:ht},Ot=this.lngRange;if(!this._renderWorldCopies&&Ot===null){let De=179.9999999999;Ot=[-De,De]}let Ht=this.tileSize*this.zoomScale(Et.zoom),Te=0,Fe=Ht,Ke=0,vr=Ht,Dr=0,Fr=0,{x:un,y:Sn}=this.size;if(this.latRange){let De=this.latRange;Te=e.Q(De[1])*Ht,Fe=e.Q(De[0])*Ht,Fe-TeFe&&(Me=Fe-De)}if(Ot){let De=(Ke+vr)/2,$e=Xt;this._renderWorldCopies&&($e=e.b3(Xt,De-Ht/2,De+Ht/2));let wr=un/2;$e-wrvr&&(_e=vr-wr)}if(_e!==void 0||Me!==void 0){let De=new e.P(_e??Xt,Me??ae);Et.center=this.unproject.call({worldSize:Ht},De).wrap()}return Et}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let z=this._unmodified,{center:ht,zoom:Et}=this.getConstrained(this.center,this.zoom);this.center=ht,this.zoom=Et,this._unmodified=z,this._constraining=!1}_calcMatrices(){if(!this.height)return;let z=this.centerOffset,ht=this.point.x,Et=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let Ot=e.an(new Float64Array(16));e.K(Ot,Ot,[this.width/2,-this.height/2,1]),e.J(Ot,Ot,[1,-1,0]),this.labelPlaneMatrix=Ot,Ot=e.an(new Float64Array(16)),e.K(Ot,Ot,[1,-1,1]),e.J(Ot,Ot,[-1,-1,0]),e.K(Ot,Ot,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ot;let Ht=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Te=Math.min(this.elevation,this.minElevationForCurrentTile),Fe=Ht-Te*this._pixelPerMeter/Math.cos(this._pitch),Ke=Te<0?Fe:Ht,vr=Math.PI/2+this._pitch,Dr=this._fov*(.5+z.y/this.height),Fr=Math.sin(Dr)*Ke/Math.sin(e.ac(Math.PI-vr-Dr,.01,Math.PI-.01)),un=this.getHorizon(),Sn=2*Math.atan(un/this.cameraToCenterDistance)*(.5+z.y/(2*un)),Xt=Math.sin(Sn)*Ke/Math.sin(e.ac(Math.PI-vr-Sn,.01,Math.PI-.01)),ae=Math.min(Fr,Xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ke),this.nearZ=this.height/50,Ot=new Float64Array(16),e.b6(Ot,this._fov,this.width/this.height,this.nearZ,this.farZ),Ot[8]=2*-z.x/this.width,Ot[9]=2*z.y/this.height,this.projectionMatrix=e.ae(Ot),e.K(Ot,Ot,[1,-1,1]),e.J(Ot,Ot,[0,0,-this.cameraToCenterDistance]),e.b7(Ot,Ot,this._pitch),e.ad(Ot,Ot,this.angle),e.J(Ot,Ot,[-ht,-Et,0]),this.mercatorMatrix=e.K([],Ot,[this.worldSize,this.worldSize,this.worldSize]),e.K(Ot,Ot,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,Ot),e.J(Ot,Ot,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Ot,this.invModelViewProjectionMatrix=e.as([],Ot),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Ht,this.farZ),this.fogMatrix[8]=2*-z.x/this.width,this.fogMatrix[9]=2*z.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-ht,-Et,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,Ot);let _e=this.width%2/2,Me=this.height%2/2,je=Math.cos(this.angle),De=Math.sin(this.angle),$e=ht-Math.round(ht)+je*_e+De*Me,wr=Et-Math.round(Et)+je*Me+De*_e,Or=new Float64Array(Ot);if(e.J(Or,Or,[$e>.5?$e-1:$e,wr>.5?wr-1:wr,0]),this.alignedModelViewProjectionMatrix=Or,Ot=e.as(new Float64Array(16),this.pixelMatrix),!Ot)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ot,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let z=this.pointCoordinate(new e.P(0,0)),ht=[z.x*this.worldSize,z.y*this.worldSize,0,1];return e.af(ht,ht,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let z=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,z))}getCameraQueryGeometry(z){let ht=this.getCameraPoint();if(z.length===1)return[z[0],ht];{let Et=ht.x,Ot=ht.y,Ht=ht.x,Te=ht.y;for(let Fe of z)Et=Math.min(Et,Fe.x),Ot=Math.min(Ot,Fe.y),Ht=Math.max(Ht,Fe.x),Te=Math.max(Te,Fe.y);return[new e.P(Et,Ot),new e.P(Ht,Ot),new e.P(Ht,Te),new e.P(Et,Te),new e.P(Et,Ot)]}}lngLatToCameraDepth(z,ht){let Et=this.locationCoordinate(z),Ot=[Et.x*this.worldSize,Et.y*this.worldSize,ht,1];return e.af(Ot,Ot,this.modelViewProjectionMatrix),Ot[2]/Ot[3]}}function uf($t,z){let ht,Et=!1,Ot=null,Ht=null,Te=()=>{Ot=null,Et&&($t.apply(Ht,ht),Ot=setTimeout(Te,z),Et=!1)};return(...Fe)=>(Et=!0,Ht=this,ht=Fe,Ot||Te(),Ot)}class yh{constructor(z){this._getCurrentHash=()=>{let ht=window.location.hash.replace("#","");if(this._hashName){let Et;return ht.split("&").map(Ot=>Ot.split("=")).forEach(Ot=>{Ot[0]===this._hashName&&(Et=Ot)}),(Et&&Et[1]||"").split("/")}return ht.split("/")},this._onHashChange=()=>{let ht=this._getCurrentHash();if(ht.length>=3&&!ht.some(Et=>isNaN(Et))){let Et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ht[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ht[2],+ht[1]],zoom:+ht[0],bearing:Et,pitch:+(ht[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ht=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ht)},this._removeHash=()=>{let ht=this._getCurrentHash();if(ht.length===0)return;let Et=ht.join("/"),Ot=Et;Ot.split("&").length>0&&(Ot=Ot.split("&")[0]),this._hashName&&(Ot=`${this._hashName}=${Et}`);let Ht=window.location.hash.replace(Ot,"");Ht.startsWith("#&")?Ht=Ht.slice(0,1)+Ht.slice(2):Ht==="#"&&(Ht="");let Te=window.location.href.replace(/(#.+)?$/,Ht);Te=Te.replace("&&","&"),window.history.replaceState(window.history.state,null,Te)},this._updateHash=uf(this._updateHashUnthrottled,300),this._hashName=z&&encodeURIComponent(z)}addTo(z){return this._map=z,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(z){let ht=this._map.getCenter(),Et=Math.round(100*this._map.getZoom())/100,Ot=Math.ceil((Et*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ht=Math.pow(10,Ot),Te=Math.round(ht.lng*Ht)/Ht,Fe=Math.round(ht.lat*Ht)/Ht,Ke=this._map.getBearing(),vr=this._map.getPitch(),Dr="";if(Dr+=z?`/${Te}/${Fe}/${Et}`:`${Et}/${Fe}/${Te}`,(Ke||vr)&&(Dr+="/"+Math.round(10*Ke)/10),vr&&(Dr+=`/${Math.round(vr)}`),this._hashName){let Fr=this._hashName,un=!1,Sn=window.location.hash.slice(1).split("&").map(Xt=>{let ae=Xt.split("=")[0];return ae===Fr?(un=!0,`${ae}=${Dr}`):Xt}).filter(Xt=>Xt);return un||Sn.push(`${Fr}=${Dr}`),`#${Sn.join("&")}`}return`#${Dr}`}}let $h={linearity:.3,easing:e.b8(0,0,.3,1)},Cf=e.e({deceleration:2500,maxSpeed:1400},$h),Ld=e.e({deceleration:20,maxSpeed:1400},$h),Jd=e.e({deceleration:1e3,maxSpeed:360},$h),cf=e.e({deceleration:1e3,maxSpeed:90},$h);class Lf{constructor(z){this._map=z,this.clear()}clear(){this._inertiaBuffer=[]}record(z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.now(),settings:z})}_drainInertiaBuffer(){let z=this._inertiaBuffer,ht=o.now();for(;z.length>0&&ht-z[0].time>160;)z.shift()}_onMoveEnd(z){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ht={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Ht}of this._inertiaBuffer)ht.zoom+=Ht.zoomDelta||0,ht.bearing+=Ht.bearingDelta||0,ht.pitch+=Ht.pitchDelta||0,Ht.panDelta&&ht.pan._add(Ht.panDelta),Ht.around&&(ht.around=Ht.around),Ht.pinchAround&&(ht.pinchAround=Ht.pinchAround);let Et=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Ot={};if(ht.pan.mag()){let Ht=hf(ht.pan.mag(),Et,e.e({},Cf,z||{}));Ot.offset=ht.pan.mult(Ht.amount/ht.pan.mag()),Ot.center=this._map.transform.center,wc(Ot,Ht)}if(ht.zoom){let Ht=hf(ht.zoom,Et,Ld);Ot.zoom=this._map.transform.zoom+Ht.amount,wc(Ot,Ht)}if(ht.bearing){let Ht=hf(ht.bearing,Et,Jd);Ot.bearing=this._map.transform.bearing+e.ac(Ht.amount,-179,179),wc(Ot,Ht)}if(ht.pitch){let Ht=hf(ht.pitch,Et,cf);Ot.pitch=this._map.transform.pitch+Ht.amount,wc(Ot,Ht)}if(Ot.zoom||Ot.bearing){let Ht=ht.pinchAround===void 0?ht.around:ht.pinchAround;Ot.around=Ht?this._map.unproject(Ht):this._map.getCenter()}return this.clear(),e.e(Ot,{noMoveStart:!0})}}function wc($t,z){(!$t.duration||$t.durationht.unproject(Ke)),Fe=Ht.reduce((Ke,vr,Dr,Fr)=>Ke.add(vr.div(Fr.length)),new e.P(0,0));super(z,{points:Ht,point:Fe,lngLats:Te,lngLat:ht.unproject(Fe),originalEvent:Et}),this._defaultPrevented=!1}}class Pf extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(z,ht,Et){super(z,{originalEvent:Et}),this._defaultPrevented=!1}}class xh{constructor(z,ht){this._map=z,this._clickTolerance=ht.clickTolerance}reset(){delete this._mousedownPos}wheel(z){return this._firePreventable(new Pf(z.type,this._map,z))}mousedown(z,ht){return this._mousedownPos=ht,this._firePreventable(new Qc(z.type,this._map,z))}mouseup(z){this._map.fire(new Qc(z.type,this._map,z))}click(z,ht){this._mousedownPos&&this._mousedownPos.dist(ht)>=this._clickTolerance||this._map.fire(new Qc(z.type,this._map,z))}dblclick(z){return this._firePreventable(new Qc(z.type,this._map,z))}mouseover(z){this._map.fire(new Qc(z.type,this._map,z))}mouseout(z){this._map.fire(new Qc(z.type,this._map,z))}touchstart(z){return this._firePreventable(new ff(z.type,this._map,z))}touchmove(z){this._map.fire(new ff(z.type,this._map,z))}touchend(z){this._map.fire(new ff(z.type,this._map,z))}touchcancel(z){this._map.fire(new ff(z.type,this._map,z))}_firePreventable(z){if(this._map.fire(z),z.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(z){this._map=z}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(z){this._map.fire(new Qc(z.type,this._map,z))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(z){this._delayContextMenu?this._contextMenuEvent=z:this._ignoreContextMenu||this._map.fire(new Qc(z.type,this._map,z)),this._map.listens("contextmenu")&&z.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ph{constructor(z){this._map=z}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(z){return this.transform.pointLocation(e.P.convert(z),this._map.terrain)}}class Vc{constructor(z,ht){this._map=z,this._tr=new Ph(z),this._el=z.getCanvasContainer(),this._container=z.getContainer(),this._clickTolerance=ht.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(z,ht){this.isEnabled()&&z.shiftKey&&z.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ht,this._active=!0)}mousemoveWindow(z,ht){if(!this._active)return;let Et=ht;if(this._lastPos.equals(Et)||!this._box&&Et.dist(this._startPos)Ht.fitScreenCoordinates(Et,Ot,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",z)}keydown(z){this._active&&z.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",z))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(z,ht){return this._map.fire(new e.k(z,{originalEvent:ht}))}}function fd($t,z){if($t.length!==z.length)throw new Error(`The number of touches and points are not equal - touches ${$t.length}, points ${z.length}`);let ht={};for(let Et=0;Et<$t.length;Et++)ht[$t[Et].identifier]=z[Et];return ht}class yu{constructor(z){this.reset(),this.numTouches=z.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(z,ht,Et){(this.centroid||Et.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=z.timeStamp),Et.length===this.numTouches&&(this.centroid=function(Ot){let Ht=new e.P(0,0);for(let Te of Ot)Ht._add(Te);return Ht.div(Ot.length)}(ht),this.touches=fd(Et,ht)))}touchmove(z,ht,Et){if(this.aborted||!this.centroid)return;let Ot=fd(Et,ht);for(let Ht in this.touches){let Te=Ot[Ht];(!Te||Te.dist(this.touches[Ht])>30)&&(this.aborted=!0)}}touchend(z,ht,Et){if((!this.centroid||z.timeStamp-this.startTime>500)&&(this.aborted=!0),Et.length===0){let Ot=!this.aborted&&this.centroid;if(this.reset(),Ot)return Ot}}}class bf{constructor(z){this.singleTap=new yu(z),this.numTaps=z.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(z,ht,Et){this.singleTap.touchstart(z,ht,Et)}touchmove(z,ht,Et){this.singleTap.touchmove(z,ht,Et)}touchend(z,ht,Et){let Ot=this.singleTap.touchend(z,ht,Et);if(Ot){let Ht=z.timeStamp-this.lastTime<500,Te=!this.lastTap||this.lastTap.dist(Ot)<30;if(Ht&&Te||this.reset(),this.count++,this.lastTime=z.timeStamp,this.lastTap=Ot,this.count===this.numTaps)return this.reset(),Ot}}}class Zh{constructor(z){this._tr=new Ph(z),this._zoomIn=new bf({numTouches:1,numTaps:2}),this._zoomOut=new bf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(z,ht,Et){this._zoomIn.touchstart(z,ht,Et),this._zoomOut.touchstart(z,ht,Et)}touchmove(z,ht,Et){this._zoomIn.touchmove(z,ht,Et),this._zoomOut.touchmove(z,ht,Et)}touchend(z,ht,Et){let Ot=this._zoomIn.touchend(z,ht,Et),Ht=this._zoomOut.touchend(z,ht,Et),Te=this._tr;return Ot?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:Te.zoom+1,around:Te.unproject(Ot)},{originalEvent:z})}):Ht?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:Te.zoom-1,around:Te.unproject(Ht)},{originalEvent:z})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class th{constructor(z){this._enabled=!!z.enable,this._moveStateManager=z.moveStateManager,this._clickTolerance=z.clickTolerance||1,this._moveFunction=z.move,this._activateOnStart=!!z.activateOnStart,z.assignEvents(this),this.reset()}reset(z){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(z)}_move(...z){let ht=this._moveFunction(...z);if(ht.bearingDelta||ht.pitchDelta||ht.around||ht.panDelta)return this._active=!0,ht}dragStart(z,ht){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(z)&&(this._moveStateManager.startMove(z),this._lastPoint=ht.length?ht[0]:ht,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(z,ht){if(!this.isEnabled())return;let Et=this._lastPoint;if(!Et)return;if(z.preventDefault(),!this._moveStateManager.isValidMoveEvent(z))return void this.reset(z);let Ot=ht.length?ht[0]:ht;return!this._moved&&Ot.dist(Et){$t.mousedown=$t.dragStart,$t.mousemoveWindow=$t.dragMove,$t.mouseup=$t.dragEnd,$t.contextmenu=z=>{z.preventDefault()}},gc=({enable:$t,clickTolerance:z,bearingDegreesPerPixelMoved:ht=.8})=>{let Et=new Gh({checkCorrectEvent:Ot=>i.mouseButton(Ot)===0&&Ot.ctrlKey||i.mouseButton(Ot)===2});return new th({clickTolerance:z,move:(Ot,Ht)=>({bearingDelta:(Ht.x-Ot.x)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})},Qf=({enable:$t,clickTolerance:z,pitchDegreesPerPixelMoved:ht=-.5})=>{let Et=new Gh({checkCorrectEvent:Ot=>i.mouseButton(Ot)===0&&Ot.ctrlKey||i.mouseButton(Ot)===2});return new th({clickTolerance:z,move:(Ot,Ht)=>({pitchDelta:(Ht.y-Ot.y)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})};class eh{constructor(z,ht){this._clickTolerance=z.clickTolerance||1,this._map=ht,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(z){return z<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(z,ht,Et){return this._calculateTransform(z,ht,Et)}touchmove(z,ht,Et){if(this._active){if(!this._shouldBePrevented(Et.length))return z.preventDefault(),this._calculateTransform(z,ht,Et);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",z)}}touchend(z,ht,Et){this._calculateTransform(z,ht,Et),this._active&&this._shouldBePrevented(Et.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(z,ht,Et){Et.length>0&&(this._active=!0);let Ot=fd(Et,ht),Ht=new e.P(0,0),Te=new e.P(0,0),Fe=0;for(let vr in Ot){let Dr=Ot[vr],Fr=this._touches[vr];Fr&&(Ht._add(Dr),Te._add(Dr.sub(Fr)),Fe++,Ot[vr]=Dr)}if(this._touches=Ot,this._shouldBePrevented(Fe)||!Te.mag())return;let Ke=Te.div(Fe);return this._sum._add(Ke),this._sum.mag()Math.abs($t.x)}class $f extends Ih{constructor(z){super(),this._currentTouchCount=0,this._map=z}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(z,ht,Et){super.touchstart(z,ht,Et),this._currentTouchCount=Et.length}_start(z){this._lastPoints=z,wh(z[0].sub(z[1]))&&(this._valid=!1)}_move(z,ht,Et){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Ot=z[0].sub(this._lastPoints[0]),Ht=z[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Ot,Ht,Et.timeStamp),this._valid?(this._lastPoints=z,this._active=!0,{pitchDelta:(Ot.y+Ht.y)/2*-.5}):void 0}gestureBeginsVertically(z,ht,Et){if(this._valid!==void 0)return this._valid;let Ot=z.mag()>=2,Ht=ht.mag()>=2;if(!Ot&&!Ht)return;if(!Ot||!Ht)return this._firstMove===void 0&&(this._firstMove=Et),Et-this._firstMove<100&&void 0;let Te=z.y>0==ht.y>0;return wh(z)&&wh(ht)&&Te}}let gr={panStep:100,bearingStep:15,pitchStep:10};class Ur{constructor(z){this._tr=new Ph(z);let ht=gr;this._panStep=ht.panStep,this._bearingStep=ht.bearingStep,this._pitchStep=ht.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(z){if(z.altKey||z.ctrlKey||z.metaKey)return;let ht=0,Et=0,Ot=0,Ht=0,Te=0;switch(z.keyCode){case 61:case 107:case 171:case 187:ht=1;break;case 189:case 109:case 173:ht=-1;break;case 37:z.shiftKey?Et=-1:(z.preventDefault(),Ht=-1);break;case 39:z.shiftKey?Et=1:(z.preventDefault(),Ht=1);break;case 38:z.shiftKey?Ot=1:(z.preventDefault(),Te=-1);break;case 40:z.shiftKey?Ot=-1:(z.preventDefault(),Te=1);break;default:return}return this._rotationDisabled&&(Et=0,Ot=0),{cameraAnimation:Fe=>{let Ke=this._tr;Fe.easeTo({duration:300,easeId:"keyboardHandler",easing:wn,zoom:ht?Math.round(Ke.zoom)+ht*(z.shiftKey?2:1):Ke.zoom,bearing:Ke.bearing+Et*this._bearingStep,pitch:Ke.pitch+Ot*this._pitchStep,offset:[-Ht*this._panStep,-Te*this._panStep],center:Ke.center},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function wn($t){return $t*(2-$t)}let hn=4.000244140625;class Zn{constructor(z,ht){this._onTimeout=Et=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Et)},this._map=z,this._tr=new Ph(z),this._triggerRenderFrame=ht,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(z){this._defaultZoomRate=z}setWheelZoomRate(z){this._wheelZoomRate=z}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!z&&z.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(z){return!!this._map.cooperativeGestures.isEnabled()&&!(z.ctrlKey||this._map.cooperativeGestures.isBypassed(z))}wheel(z){if(!this.isEnabled())return;if(this._shouldBePrevented(z))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",z);let ht=z.deltaMode===WheelEvent.DOM_DELTA_LINE?40*z.deltaY:z.deltaY,Et=o.now(),Ot=Et-(this._lastWheelEventTime||0);this._lastWheelEventTime=Et,ht!==0&&ht%hn==0?this._type="wheel":ht!==0&&Math.abs(ht)<4?this._type="trackpad":Ot>400?(this._type=null,this._lastValue=ht,this._timeout=setTimeout(this._onTimeout,40,z)):this._type||(this._type=Math.abs(Ot*ht)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ht+=this._lastValue)),z.shiftKey&&ht&&(ht/=4),this._type&&(this._lastWheelEvent=z,this._delta-=ht,this._active||this._start(z)),z.preventDefault()}_start(z){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ht=i.mousePos(this._map.getCanvas(),z),Et=this._tr;this._around=ht.y>Et.transform.height/2-Et.transform.getHorizon()?e.N.convert(this._aroundCenter?Et.center:Et.unproject(ht)):e.N.convert(Et.center),this._aroundPoint=Et.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let z=this._tr.transform;if(this._delta!==0){let Ke=this._type==="wheel"&&Math.abs(this._delta)>hn?this._wheelZoomRate:this._defaultZoomRate,vr=2/(1+Math.exp(-Math.abs(this._delta*Ke)));this._delta<0&&vr!==0&&(vr=1/vr);let Dr=typeof this._targetZoom=="number"?z.zoomScale(this._targetZoom):z.scale;this._targetZoom=Math.min(z.maxZoom,Math.max(z.minZoom,z.scaleZoom(Dr*vr))),this._type==="wheel"&&(this._startZoom=z.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ht=typeof this._targetZoom=="number"?this._targetZoom:z.zoom,Et=this._startZoom,Ot=this._easing,Ht,Te=!1,Fe=o.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Et&&Ot&&Fe){let Ke=Math.min(Fe/200,1),vr=Ot(Ke);Ht=e.y.number(Et,ht,vr),Ke<1?this._frameId||(this._frameId=!0):Te=!0}else Ht=ht,Te=!0;return this._active=!0,Te&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Te,zoomDelta:Ht-z.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(z){let ht=e.b9;if(this._prevEase){let Et=this._prevEase,Ot=(o.now()-Et.start)/Et.duration,Ht=Et.easing(Ot+.01)-Et.easing(Ot),Te=.27/Math.sqrt(Ht*Ht+1e-4)*.01,Fe=Math.sqrt(.0729-Te*Te);ht=e.b8(Te,Fe,.25,1)}return this._prevEase={start:o.now(),duration:z,easing:ht},ht}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class gi{constructor(z,ht){this._clickZoom=z,this._tapZoom=ht}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class aa{constructor(z){this._tr=new Ph(z),this.reset()}reset(){this._active=!1}dblclick(z,ht){return z.preventDefault(),{cameraAnimation:Et=>{Et.easeTo({duration:300,zoom:this._tr.zoom+(z.shiftKey?-1:1),around:this._tr.unproject(ht)},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xa{constructor(){this._tap=new bf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(z,ht,Et){if(!this._swipePoint)if(this._tapTime){let Ot=ht[0],Ht=z.timeStamp-this._tapTime<500,Te=this._tapPoint.dist(Ot)<30;Ht&&Te?Et.length>0&&(this._swipePoint=Ot,this._swipeTouch=Et[0].identifier):this.reset()}else this._tap.touchstart(z,ht,Et)}touchmove(z,ht,Et){if(this._tapTime){if(this._swipePoint){if(Et[0].identifier!==this._swipeTouch)return;let Ot=ht[0],Ht=Ot.y-this._swipePoint.y;return this._swipePoint=Ot,z.preventDefault(),this._active=!0,{zoomDelta:Ht/128}}}else this._tap.touchmove(z,ht,Et)}touchend(z,ht,Et){if(this._tapTime)this._swipePoint&&Et.length===0&&this.reset();else{let Ot=this._tap.touchend(z,ht,Et);Ot&&(this._tapTime=z.timeStamp,this._tapPoint=Ot)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ra{constructor(z,ht,Et){this._el=z,this._mousePan=ht,this._touchPan=Et}enable(z){this._inertiaOptions=z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Ga{constructor(z,ht,Et){this._pitchWithRotate=z.pitchWithRotate,this._mouseRotate=ht,this._mousePitch=Et}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class fa{constructor(z,ht,Et,Ot){this._el=z,this._touchZoom=ht,this._touchRotate=Et,this._tapDragZoom=Ot,this._rotationDisabled=!1,this._enabled=!0}enable(z){this._touchZoom.enable(z),this._rotationDisabled||this._touchRotate.enable(z),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Oa{constructor(z,ht){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=z,this._options=ht,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let z=this._map.getCanvasContainer();z.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",z);let ht=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ht=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Et=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Ot=document.createElement("div");Ot.className="maplibregl-desktop-message",Ot.textContent=ht,this._container.appendChild(Ot);let Ht=document.createElement("div");Ht.className="maplibregl-mobile-message",Ht.textContent=Et,this._container.appendChild(Ht),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(z){return z[this._bypassKey]}notifyGestureBlocked(z,ht){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:z,originalEvent:ht})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Aa=$t=>$t.zoom||$t.drag||$t.pitch||$t.rotate;class na extends e.k{}function ao($t){return $t.panDelta&&$t.panDelta.mag()||$t.zoomDelta||$t.bearingDelta||$t.pitchDelta}class is{constructor(z,ht){this.handleWindowEvent=Ot=>{this.handleEvent(Ot,`${Ot.type}Window`)},this.handleEvent=(Ot,Ht)=>{if(Ot.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Te=Ot.type==="renderFrame"?void 0:Ot,Fe={needsRenderFrame:!1},Ke={},vr={},Dr=Ot.touches,Fr=Dr?this._getMapTouches(Dr):void 0,un=Fr?i.touchPos(this._map.getCanvas(),Fr):i.mousePos(this._map.getCanvas(),Ot);for(let{handlerName:ae,handler:_e,allowed:Me}of this._handlers){if(!_e.isEnabled())continue;let je;this._blockedByActive(vr,Me,ae)?_e.reset():_e[Ht||Ot.type]&&(je=_e[Ht||Ot.type](Ot,un,Fr),this.mergeHandlerResult(Fe,Ke,je,ae,Te),je&&je.needsRenderFrame&&this._triggerRenderFrame()),(je||_e.isActive())&&(vr[ae]=_e)}let Sn={};for(let ae in this._previousActiveHandlers)vr[ae]||(Sn[ae]=Te);this._previousActiveHandlers=vr,(Object.keys(Sn).length||ao(Fe))&&(this._changes.push([Fe,Ke,Sn]),this._triggerRenderFrame()),(Object.keys(vr).length||ao(Fe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Xt}=Fe;Xt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Xt(this._map))},this._map=z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Lf(z),this._bearingSnap=ht.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ht);let Et=this._el;this._listeners=[[Et,"touchstart",{passive:!0}],[Et,"touchmove",{passive:!1}],[Et,"touchend",void 0],[Et,"touchcancel",void 0],[Et,"mousedown",void 0],[Et,"mousemove",void 0],[Et,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Et,"mouseover",void 0],[Et,"mouseout",void 0],[Et,"dblclick",void 0],[Et,"click",void 0],[Et,"keydown",{capture:!1}],[Et,"keyup",void 0],[Et,"wheel",{passive:!1}],[Et,"contextmenu",void 0],[window,"blur",void 0]];for(let[Ot,Ht,Te]of this._listeners)i.addEventListener(Ot,Ht,Ot===document?this.handleWindowEvent:this.handleEvent,Te)}destroy(){for(let[z,ht,Et]of this._listeners)i.removeEventListener(z,ht,z===document?this.handleWindowEvent:this.handleEvent,Et)}_addDefaultHandlers(z){let ht=this._map,Et=ht.getCanvasContainer();this._add("mapEvent",new xh(ht,z));let Ot=ht.boxZoom=new Vc(ht,z);this._add("boxZoom",Ot),z.interactive&&z.boxZoom&&Ot.enable();let Ht=ht.cooperativeGestures=new Oa(ht,z.cooperativeGestures);this._add("cooperativeGestures",Ht),z.cooperativeGestures&&Ht.enable();let Te=new Zh(ht),Fe=new aa(ht);ht.doubleClickZoom=new gi(Fe,Te),this._add("tapZoom",Te),this._add("clickZoom",Fe),z.interactive&&z.doubleClickZoom&&ht.doubleClickZoom.enable();let Ke=new xa;this._add("tapDragZoom",Ke);let vr=ht.touchPitch=new $f(ht);this._add("touchPitch",vr),z.interactive&&z.touchPitch&&ht.touchPitch.enable(z.touchPitch);let Dr=gc(z),Fr=Qf(z);ht.dragRotate=new Ga(z,Dr,Fr),this._add("mouseRotate",Dr,["mousePitch"]),this._add("mousePitch",Fr,["mouseRotate"]),z.interactive&&z.dragRotate&&ht.dragRotate.enable();let un=(({enable:je,clickTolerance:De})=>{let $e=new Gh({checkCorrectEvent:wr=>i.mouseButton(wr)===0&&!wr.ctrlKey});return new th({clickTolerance:De,move:(wr,Or)=>({around:Or,panDelta:Or.sub(wr)}),activateOnStart:!0,moveStateManager:$e,enable:je,assignEvents:Pd})})(z),Sn=new eh(z,ht);ht.dragPan=new Ra(Et,un,Sn),this._add("mousePan",un),this._add("touchPan",Sn,["touchZoom","touchRotate"]),z.interactive&&z.dragPan&&ht.dragPan.enable(z.dragPan);let Xt=new df,ae=new iu;ht.touchZoomRotate=new fa(Et,ae,Xt,Ke),this._add("touchRotate",Xt,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),z.interactive&&z.touchZoomRotate&&ht.touchZoomRotate.enable(z.touchZoomRotate);let _e=ht.scrollZoom=new Zn(ht,()=>this._triggerRenderFrame());this._add("scrollZoom",_e,["mousePan"]),z.interactive&&z.scrollZoom&&ht.scrollZoom.enable(z.scrollZoom);let Me=ht.keyboard=new Ur(ht);this._add("keyboard",Me),z.interactive&&z.keyboard&&ht.keyboard.enable(),this._add("blockableMapEvent",new ku(ht))}_add(z,ht,Et){this._handlers.push({handlerName:z,handler:ht,allowed:Et}),this._handlersById[z]=ht}stop(z){if(!this._updatingCamera){for(let{handler:ht}of this._handlers)ht.reset();this._inertia.clear(),this._fireEvents({},{},z),this._changes=[]}}isActive(){for(let{handler:z}of this._handlers)if(z.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Aa(this._eventsInProgress)||this.isZooming()}_blockedByActive(z,ht,Et){for(let Ot in z)if(Ot!==Et&&(!ht||ht.indexOf(Ot)<0))return!0;return!1}_getMapTouches(z){let ht=[];for(let Et of z)this._el.contains(Et.target)&&ht.push(Et);return ht}mergeHandlerResult(z,ht,Et,Ot,Ht){if(!Et)return;e.e(z,Et);let Te={handlerName:Ot,originalEvent:Et.originalEvent||Ht};Et.zoomDelta!==void 0&&(ht.zoom=Te),Et.panDelta!==void 0&&(ht.drag=Te),Et.pitchDelta!==void 0&&(ht.pitch=Te),Et.bearingDelta!==void 0&&(ht.rotate=Te)}_applyChanges(){let z={},ht={},Et={};for(let[Ot,Ht,Te]of this._changes)Ot.panDelta&&(z.panDelta=(z.panDelta||new e.P(0,0))._add(Ot.panDelta)),Ot.zoomDelta&&(z.zoomDelta=(z.zoomDelta||0)+Ot.zoomDelta),Ot.bearingDelta&&(z.bearingDelta=(z.bearingDelta||0)+Ot.bearingDelta),Ot.pitchDelta&&(z.pitchDelta=(z.pitchDelta||0)+Ot.pitchDelta),Ot.around!==void 0&&(z.around=Ot.around),Ot.pinchAround!==void 0&&(z.pinchAround=Ot.pinchAround),Ot.noInertia&&(z.noInertia=Ot.noInertia),e.e(ht,Ht),e.e(Et,Te);this._updateMapTransform(z,ht,Et),this._changes=[]}_updateMapTransform(z,ht,Et){let Ot=this._map,Ht=Ot._getTransformForUpdate(),Te=Ot.terrain;if(!(ao(z)||Te&&this._terrainMovement))return this._fireEvents(ht,Et,!0);let{panDelta:Fe,zoomDelta:Ke,bearingDelta:vr,pitchDelta:Dr,around:Fr,pinchAround:un}=z;un!==void 0&&(Fr=un),Ot._stop(!0),Fr=Fr||Ot.transform.centerPoint;let Sn=Ht.pointLocation(Fe?Fr.sub(Fe):Fr);vr&&(Ht.bearing+=vr),Dr&&(Ht.pitch+=Dr),Ke&&(Ht.zoom+=Ke),Te?this._terrainMovement||!ht.drag&&!ht.zoom?ht.drag&&this._terrainMovement?Ht.center=Ht.pointLocation(Ht.centerPoint.sub(Fe)):Ht.setLocationAtPoint(Sn,Fr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Ht.setLocationAtPoint(Sn,Fr)):Ht.setLocationAtPoint(Sn,Fr),Ot._applyUpdatedTransform(Ht),this._map._update(),z.noInertia||this._inertia.record(z),this._fireEvents(ht,Et,!0)}_fireEvents(z,ht,Et){let Ot=Aa(this._eventsInProgress),Ht=Aa(z),Te={};for(let Fr in z){let{originalEvent:un}=z[Fr];this._eventsInProgress[Fr]||(Te[`${Fr}start`]=un),this._eventsInProgress[Fr]=z[Fr]}!Ot&&Ht&&this._fireEvent("movestart",Ht.originalEvent);for(let Fr in Te)this._fireEvent(Fr,Te[Fr]);Ht&&this._fireEvent("move",Ht.originalEvent);for(let Fr in z){let{originalEvent:un}=z[Fr];this._fireEvent(Fr,un)}let Fe={},Ke;for(let Fr in this._eventsInProgress){let{handlerName:un,originalEvent:Sn}=this._eventsInProgress[Fr];this._handlersById[un].isActive()||(delete this._eventsInProgress[Fr],Ke=ht[un]||Sn,Fe[`${Fr}end`]=Ke)}for(let Fr in Fe)this._fireEvent(Fr,Fe[Fr]);let vr=Aa(this._eventsInProgress),Dr=(Ot||Ht)&&!vr;if(Dr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Fr=this._map._getTransformForUpdate();Fr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Fr)}if(Et&&Dr){this._updatingCamera=!0;let Fr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),un=Sn=>Sn!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new na("renderFrame",{timeStamp:z})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xo extends e.E{constructor(z,ht){super(),this._renderFrameCallback=()=>{let Et=Math.min((o.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Et)),Et<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=z,this._bearingSnap=ht.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(z,ht){return this.jumpTo({center:z},ht)}panBy(z,ht,Et){return z=e.P.convert(z).mult(-1),this.panTo(this.transform.center,e.e({offset:z},ht),Et)}panTo(z,ht,Et){return this.easeTo(e.e({center:z},ht),Et)}getZoom(){return this.transform.zoom}setZoom(z,ht){return this.jumpTo({zoom:z},ht),this}zoomTo(z,ht,Et){return this.easeTo(e.e({zoom:z},ht),Et)}zoomIn(z,ht){return this.zoomTo(this.getZoom()+1,z,ht),this}zoomOut(z,ht){return this.zoomTo(this.getZoom()-1,z,ht),this}getBearing(){return this.transform.bearing}setBearing(z,ht){return this.jumpTo({bearing:z},ht),this}getPadding(){return this.transform.padding}setPadding(z,ht){return this.jumpTo({padding:z},ht),this}rotateTo(z,ht,Et){return this.easeTo(e.e({bearing:z},ht),Et)}resetNorth(z,ht){return this.rotateTo(0,e.e({duration:1e3},z),ht),this}resetNorthPitch(z,ht){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},z),ht),this}snapToNorth(z,ht){return Math.abs(this.getBearing()){if(this._zooming&&(Ot.zoom=e.y.number(Ht,_e,Nr)),this._rotating&&(Ot.bearing=e.y.number(Te,vr,Nr)),this._pitching&&(Ot.pitch=e.y.number(Fe,Dr,Nr)),this._padding&&(Ot.interpolatePadding(Ke,Fr,Nr),Sn=Ot.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Nr),$e)Ot.setLocationAtPoint($e,wr);else{let en=Ot.zoomScale(Ot.zoom-Ht),vn=_e>Ht?Math.min(2,De):Math.max(.5,De),In=Math.pow(vn,1-Nr),jn=Ot.unproject(Me.add(je.mult(Nr*In)).mult(en));Ot.setLocationAtPoint(Ot.renderWorldCopies?jn.wrap():jn,Sn)}this._applyUpdatedTransform(Ot),this._fireMoveEvents(ht)},Nr=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht,Nr)},z),this}_prepareEase(z,ht,Et={}){this._moving=!0,ht||Et.moving||this.fire(new e.k("movestart",z)),this._zooming&&!Et.zooming&&this.fire(new e.k("zoomstart",z)),this._rotating&&!Et.rotating&&this.fire(new e.k("rotatestart",z)),this._pitching&&!Et.pitching&&this.fire(new e.k("pitchstart",z))}_prepareElevation(z){this._elevationCenter=z,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(z,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(z){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ht=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(z<1&&ht!==this._elevationTarget){let Et=this._elevationTarget-this._elevationStart;this._elevationStart+=z*(Et-(ht-(Et*z+this._elevationStart))/(1-z)),this._elevationTarget=ht}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,z)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(z){let ht=z.getCameraPosition(),Et=this.terrain.getElevationForLngLatZoom(ht.lngLat,z.zoom);if(ht.altitudethis._elevateCameraIfInsideTerrain(Ot)),this.transformCameraUpdate&&ht.push(Ot=>this.transformCameraUpdate(Ot)),!ht.length)return;let Et=z.clone();for(let Ot of ht){let Ht=Et.clone(),{center:Te,zoom:Fe,pitch:Ke,bearing:vr,elevation:Dr}=Ot(Ht);Te&&(Ht.center=Te),Fe!==void 0&&(Ht.zoom=Fe),Ke!==void 0&&(Ht.pitch=Ke),vr!==void 0&&(Ht.bearing=vr),Dr!==void 0&&(Ht.elevation=Dr),Et.apply(Ht)}this.transform.apply(Et)}_fireMoveEvents(z){this.fire(new e.k("move",z)),this._zooming&&this.fire(new e.k("zoom",z)),this._rotating&&this.fire(new e.k("rotate",z)),this._pitching&&this.fire(new e.k("pitch",z))}_afterEase(z,ht){if(this._easeId&&ht&&this._easeId===ht)return;delete this._easeId;let Et=this._zooming,Ot=this._rotating,Ht=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Et&&this.fire(new e.k("zoomend",z)),Ot&&this.fire(new e.k("rotateend",z)),Ht&&this.fire(new e.k("pitchend",z)),this.fire(new e.k("moveend",z))}flyTo(z,ht){var Et;if(!z.essential&&o.prefersReducedMotion){let Ma=e.M(z,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ma,ht)}this.stop(),z=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},z);let Ot=this._getTransformForUpdate(),Ht=Ot.zoom,Te=Ot.bearing,Fe=Ot.pitch,Ke=Ot.padding,vr="bearing"in z?this._normalizeBearing(z.bearing,Te):Te,Dr="pitch"in z?+z.pitch:Fe,Fr="padding"in z?z.padding:Ot.padding,un=e.P.convert(z.offset),Sn=Ot.centerPoint.add(un),Xt=Ot.pointLocation(Sn),{center:ae,zoom:_e}=Ot.getConstrained(e.N.convert(z.center||Xt),(Et=z.zoom)!==null&&Et!==void 0?Et:Ht);this._normalizeCenter(ae,Ot);let Me=Ot.zoomScale(_e-Ht),je=Ot.project(Xt),De=Ot.project(ae).sub(je),$e=z.curve,wr=Math.max(Ot.width,Ot.height),Or=wr/Me,Nr=De.mag();if("minZoom"in z){let Ma=e.ac(Math.min(z.minZoom,Ht,_e),Ot.minZoom,Ot.maxZoom),lo=wr/Ot.zoomScale(Ma-Ht);$e=Math.sqrt(lo/Nr*2)}let en=$e*$e;function vn(Ma){let lo=(Or*Or-wr*wr+(Ma?-1:1)*en*en*Nr*Nr)/(2*(Ma?Or:wr)*en*Nr);return Math.log(Math.sqrt(lo*lo+1)-lo)}function In(Ma){return(Math.exp(Ma)-Math.exp(-Ma))/2}function jn(Ma){return(Math.exp(Ma)+Math.exp(-Ma))/2}let si=vn(!1),Wi=function(Ma){return jn(si)/jn(si+$e*Ma)},ga=function(Ma){return wr*((jn(si)*(In(lo=si+$e*Ma)/jn(lo))-In(si))/en)/Nr;var lo},pa=(vn(!0)-si)/$e;if(Math.abs(Nr)<1e-6||!isFinite(pa)){if(Math.abs(wr-Or)<1e-6)return this.easeTo(z,ht);let Ma=Or0,Wi=lo=>Math.exp(Ma*$e*lo)}return z.duration="duration"in z?+z.duration:1e3*pa/("screenSpeed"in z?+z.screenSpeed/$e:+z.speed),z.maxDuration&&z.duration>z.maxDuration&&(z.duration=0),this._zooming=!0,this._rotating=Te!==vr,this._pitching=Dr!==Fe,this._padding=!Ot.isPaddingEqual(Fr),this._prepareEase(ht,!1),this.terrain&&this._prepareElevation(ae),this._ease(Ma=>{let lo=Ma*pa,No=1/Wi(lo);Ot.zoom=Ma===1?_e:Ht+Ot.scaleZoom(No),this._rotating&&(Ot.bearing=e.y.number(Te,vr,Ma)),this._pitching&&(Ot.pitch=e.y.number(Fe,Dr,Ma)),this._padding&&(Ot.interpolatePadding(Ke,Fr,Ma),Sn=Ot.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Ma);let So=Ma===1?ae:Ot.unproject(je.add(De.mult(ga(lo))).mult(No));Ot.setLocationAtPoint(Ot.renderWorldCopies?So.wrap():So,Sn),this._applyUpdatedTransform(Ot),this._fireMoveEvents(ht)},()=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht)},z),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(z,ht){var Et;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Ot=this._onEaseEnd;delete this._onEaseEnd,Ot.call(this,ht)}return z||(Et=this.handlers)===null||Et===void 0||Et.stop(!1),this}_ease(z,ht,Et){Et.animate===!1||Et.duration===0?(z(1),ht()):(this._easeStart=o.now(),this._easeOptions=Et,this._onEaseFrame=z,this._onEaseEnd=ht,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(z,ht){z=e.b3(z,-180,180);let Et=Math.abs(z-ht);return Math.abs(z-360-ht)180?-360:Et<-180?360:0}queryTerrainElevation(z){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(z),this.transform.tileZoom)-this.transform.elevation:null}}let ls={compact:!0,customAttribution:'
MapLibre'};class ps{constructor(z=ls){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=ht=>{!ht||ht.sourceDataType!=="metadata"&&ht.sourceDataType!=="visibility"&&ht.dataType!=="style"&&ht.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=z}getDefaultPosition(){return"bottom-right"}onAdd(z){return this._map=z,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(z,ht){let Et=this._map._getUIString(`AttributionControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)}_updateAttributions(){if(!this._map.style)return;let z=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?z=z.concat(this.options.customAttribution.map(Ot=>typeof Ot!="string"?"":Ot)):typeof this.options.customAttribution=="string"&&z.push(this.options.customAttribution)),this._map.style.stylesheet){let Ot=this._map.style.stylesheet;this.styleOwner=Ot.owner,this.styleId=Ot.id}let ht=this._map.style.sourceCaches;for(let Ot in ht){let Ht=ht[Ot];if(Ht.used||Ht.usedForTerrain){let Te=Ht.getSource();Te.attribution&&z.indexOf(Te.attribution)<0&&z.push(Te.attribution)}}z=z.filter(Ot=>String(Ot).trim()),z.sort((Ot,Ht)=>Ot.length-Ht.length),z=z.filter((Ot,Ht)=>{for(let Te=Ht+1;Te=0)return!1;return!0});let Et=z.join(" | ");Et!==this._attribHTML&&(this._attribHTML=Et,z.length?(this._innerContainer.innerHTML=Et,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class so{constructor(z={}){this._updateCompact=()=>{let ht=this._container.children;if(ht.length){let Et=ht[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Et.classList.add("maplibregl-compact"):Et.classList.remove("maplibregl-compact")}},this.options=z}getDefaultPosition(){return"bottom-left"}onAdd(z){this._map=z,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ht=i.create("a","maplibregl-ctrl-logo");return ht.target="_blank",ht.rel="noopener nofollow",ht.href="https://maplibre.org/",ht.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ht.setAttribute("rel","noopener nofollow"),this._container.appendChild(ht),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class $a{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(z){let ht=++this._id;return this._queue.push({callback:z,id:ht,cancelled:!1}),ht}remove(z){let ht=this._currentlyRunning,Et=ht?this._queue.concat(ht):this._queue;for(let Ot of Et)if(Ot.id===z)return void(Ot.cancelled=!0)}run(z=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ht=this._currentlyRunning=this._queue;this._queue=[];for(let Et of ht)if(!Et.cancelled&&(Et.callback(z),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var gs=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class el extends e.E{constructor(z){super(),this.sourceCache=z,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,z.usedForTerrain=!0,z.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(z,ht){this.sourceCache.update(z,ht),this._renderableTilesKeys=[];let Et={};for(let Ot of z.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ht}))Et[Ot.key]=!0,this._renderableTilesKeys.push(Ot.key),this._tiles[Ot.key]||(Ot.posMatrix=new Float64Array(16),e.aP(Ot.posMatrix,0,e.X,0,e.X,0,1),this._tiles[Ot.key]=new oe(Ot,this.tileSize));for(let Ot in this._tiles)Et[Ot]||delete this._tiles[Ot]}freeRtt(z){for(let ht in this._tiles){let Et=this._tiles[ht];(!z||Et.tileID.equals(z)||Et.tileID.isChildOf(z)||z.isChildOf(Et.tileID))&&(Et.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(z=>this.getTileByID(z))}getTileByID(z){return this._tiles[z]}getTerrainCoords(z){let ht={};for(let Et of this._renderableTilesKeys){let Ot=this._tiles[Et].tileID;if(Ot.canonical.equals(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16),e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),ht[Et]=Ht}else if(Ot.canonical.isChildOf(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let Te=Ot.canonical.z-z.canonical.z,Fe=Ot.canonical.x-(Ot.canonical.x>>Te<>Te<>Te;e.aP(Ht.posMatrix,0,vr,0,vr,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[-Fe*vr,-Ke*vr,0]),ht[Et]=Ht}else if(z.canonical.isChildOf(Ot.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let Te=z.canonical.z-Ot.canonical.z,Fe=z.canonical.x-(z.canonical.x>>Te<>Te<>Te;e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[Fe*vr,Ke*vr,0]),e.K(Ht.posMatrix,Ht.posMatrix,[1/2**Te,1/2**Te,0]),ht[Et]=Ht}}return ht}getSourceTile(z,ht){let Et=this.sourceCache._source,Ot=z.overscaledZ-this.deltaZoom;if(Ot>Et.maxzoom&&(Ot=Et.maxzoom),Ot=Et.minzoom&&(!Ht||!Ht.dem);)Ht=this.sourceCache.getTileByID(z.scaledTo(Ot--).key);return Ht}tilesAfterTime(z=Date.now()){return Object.values(this._tiles).filter(ht=>ht.timeAdded>=z)}}class Il{constructor(z,ht,Et){this.painter=z,this.sourceCache=new el(ht),this.options=Et,this.exaggeration=typeof Et.exaggeration=="number"?Et.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(z,ht,Et,Ot=e.X){var Ht;if(!(ht>=0&&ht=0&&Etz.canonical.z&&(z.canonical.z>=Ot?Ht=z.canonical.z-Ot:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Te=z.canonical.x-(z.canonical.x>>Ht<>Ht<>8<<4|Ht>>8,ht[Te+3]=0;let Et=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ht.buffer)),Ot=new p(z,Et,z.gl.RGBA,{premultiply:!1});return Ot.bind(z.gl.NEAREST,z.gl.CLAMP_TO_EDGE),this._coordsTexture=Ot,Ot}pointCoordinate(z){this.painter.maybeDrawDepthAndCoords(!0);let ht=new Uint8Array(4),Et=this.painter.context,Ot=Et.gl,Ht=Math.round(z.x*this.painter.pixelRatio/devicePixelRatio),Te=Math.round(z.y*this.painter.pixelRatio/devicePixelRatio),Fe=Math.round(this.painter.height/devicePixelRatio);Et.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Ot.readPixels(Ht,Fe-Te-1,1,1,Ot.RGBA,Ot.UNSIGNED_BYTE,ht),Et.bindFramebuffer.set(null);let Ke=ht[0]+(ht[2]>>4<<8),vr=ht[1]+((15&ht[2])<<8),Dr=this.coordsIndex[255-ht[3]],Fr=Dr&&this.sourceCache.getTileByID(Dr);if(!Fr)return null;let un=this._coordsTextureSize,Sn=(1<z.id!==ht),this._recentlyUsed.push(z.id)}stampObject(z){z.stamp=++this._stamp}getOrCreateFreeObject(){for(let ht of this._recentlyUsed)if(!this._objects[ht].inUse)return this._objects[ht];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let z=this._createObject(this._objects.length);return this._objects.push(z),z}freeObject(z){z.inUse=!1}freeAllObjects(){for(let z of this._objects)this.freeObject(z)}isFull(){return!(this._objects.length!z.inUse)===!1}}let $l={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class lu{constructor(z,ht){this.painter=z,this.terrain=ht,this.pool=new su(z.context,30,ht.sourceCache.tileSize*ht.qualityFactor)}destruct(){this.pool.destruct()}getTexture(z){return this.pool.getObjectForId(z.rtt[this._stacks.length-1].id).texture}prepareForRender(z,ht){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=z._order.filter(Et=>!z._layers[Et].isHidden(ht)),this._coordsDescendingInv={};for(let Et in z.sourceCaches){this._coordsDescendingInv[Et]={};let Ot=z.sourceCaches[Et].getVisibleCoordinates();for(let Ht of Ot){let Te=this.terrain.sourceCache.getTerrainCoords(Ht);for(let Fe in Te)this._coordsDescendingInv[Et][Fe]||(this._coordsDescendingInv[Et][Fe]=[]),this._coordsDescendingInv[Et][Fe].push(Te[Fe])}}this._coordsDescendingInvStr={};for(let Et of z._order){let Ot=z._layers[Et],Ht=Ot.source;if($l[Ot.type]&&!this._coordsDescendingInvStr[Ht]){this._coordsDescendingInvStr[Ht]={};for(let Te in this._coordsDescendingInv[Ht])this._coordsDescendingInvStr[Ht][Te]=this._coordsDescendingInv[Ht][Te].map(Fe=>Fe.key).sort().join()}}for(let Et of this._renderableTiles)for(let Ot in this._coordsDescendingInvStr){let Ht=this._coordsDescendingInvStr[Ot][Et.tileID.key];Ht&&Ht!==Et.rttCoords[Ot]&&(Et.rtt=[])}}renderLayer(z){if(z.isHidden(this.painter.transform.zoom))return!1;let ht=z.type,Et=this.painter,Ot=this._renderableLayerIds[this._renderableLayerIds.length-1]===z.id;if($l[ht]&&(this._prevType&&$l[this._prevType]||this._stacks.push([]),this._prevType=ht,this._stacks[this._stacks.length-1].push(z.id),!Ot))return!0;if($l[this._prevType]||$l[ht]&&Ot){this._prevType=ht;let Ht=this._stacks.length-1,Te=this._stacks[Ht]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(Du(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[Ht]){let vr=this.pool.getObjectForId(Fe.rtt[Ht].id);if(vr.stamp===Fe.rtt[Ht].stamp){this.pool.useObject(vr);continue}}let Ke=this.pool.getOrCreateFreeObject();this.pool.useObject(Ke),this.pool.stampObject(Ke),Fe.rtt[Ht]={id:Ke.id,stamp:Ke.stamp},Et.context.bindFramebuffer.set(Ke.fbo.framebuffer),Et.context.clear({color:e.aM.transparent,stencil:0}),Et.currentStencilSource=void 0;for(let vr=0;vr{$t.touchstart=$t.dragStart,$t.touchmoveWindow=$t.dragMove,$t.touchend=$t.dragEnd},Oo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Es{constructor(z,ht,Et=!1){this.mousedown=Te=>{this.startMouse(e.e({},Te,{ctrlKey:!0,preventDefault:()=>Te.preventDefault()}),i.mousePos(this.element,Te)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Te=>{this.moveMouse(Te,i.mousePos(this.element,Te))},this.mouseup=Te=>{this.mouseRotate.dragEnd(Te),this.mousePitch&&this.mousePitch.dragEnd(Te),this.offTemp()},this.touchstart=Te=>{Te.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,Te.targetTouches)[0],this.startTouch(Te,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=Te=>{Te.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,Te.targetTouches)[0],this.moveTouch(Te,this._lastPos))},this.touchend=Te=>{Te.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let Ot=z.dragRotate._mouseRotate.getClickTolerance(),Ht=z.dragRotate._mousePitch.getClickTolerance();this.element=ht,this.mouseRotate=gc({clickTolerance:Ot,enable:!0}),this.touchRotate=(({enable:Te,clickTolerance:Fe,bearingDegreesPerPixelMoved:Ke=.8})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({bearingDelta:(Fr.x-Dr.x)*Ke}),moveStateManager:vr,enable:Te,assignEvents:fu})})({clickTolerance:Ot,enable:!0}),this.map=z,Et&&(this.mousePitch=Qf({clickTolerance:Ht,enable:!0}),this.touchPitch=(({enable:Te,clickTolerance:Fe,pitchDegreesPerPixelMoved:Ke=-.5})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({pitchDelta:(Fr.y-Dr.y)*Ke}),moveStateManager:vr,enable:Te,assignEvents:fu})})({clickTolerance:Ht,enable:!0})),i.addEventListener(ht,"mousedown",this.mousedown),i.addEventListener(ht,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ht,"touchcancel",this.reset)}startMouse(z,ht){this.mouseRotate.dragStart(z,ht),this.mousePitch&&this.mousePitch.dragStart(z,ht),i.disableDrag()}startTouch(z,ht){this.touchRotate.dragStart(z,ht),this.touchPitch&&this.touchPitch.dragStart(z,ht),i.disableDrag()}moveMouse(z,ht){let Et=this.map,{bearingDelta:Ot}=this.mouseRotate.dragMove(z,ht)||{};if(Ot&&Et.setBearing(Et.getBearing()+Ot),this.mousePitch){let{pitchDelta:Ht}=this.mousePitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}moveTouch(z,ht){let Et=this.map,{bearingDelta:Ot}=this.touchRotate.dragMove(z,ht)||{};if(Ot&&Et.setBearing(Et.getBearing()+Ot),this.touchPitch){let{pitchDelta:Ht}=this.touchPitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}off(){let z=this.element;i.removeEventListener(z,"mousedown",this.mousedown),i.removeEventListener(z,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(z,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Kl;function Rl($t,z,ht){let Et=new e.N($t.lng,$t.lat);if($t=new e.N($t.lng,$t.lat),z){let Ot=new e.N($t.lng-360,$t.lat),Ht=new e.N($t.lng+360,$t.lat),Te=ht.locationPoint($t).distSqr(z);ht.locationPoint(Ot).distSqr(z)180;){let Ot=ht.locationPoint($t);if(Ot.x>=0&&Ot.y>=0&&Ot.x<=ht.width&&Ot.y<=ht.height)break;$t.lng>ht.center.lng?$t.lng-=360:$t.lng+=360}return $t.lng!==Et.lng&&ht.locationPoint($t).y>ht.height/2-ht.getHorizon()?$t:Et}let vc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hc($t,z,ht){let Et=$t.classList;for(let Ot in vc)Et.remove(`maplibregl-${ht}-anchor-${Ot}`);Et.add(`maplibregl-${ht}-anchor-${z}`)}class Pc extends e.E{constructor(z){if(super(),this._onKeyPress=ht=>{let Et=ht.code,Ot=ht.charCode||ht.keyCode;Et!=="Space"&&Et!=="Enter"&&Ot!==32&&Ot!==13||this.togglePopup()},this._onMapClick=ht=>{let Et=ht.originalEvent.target,Ot=this._element;this._popup&&(Et===Ot||Ot.contains(Et))&&this.togglePopup()},this._update=ht=>{var Et;if(!this._map)return;let Ot=this._map.loaded()&&!this._map.isMoving();(ht?.type==="terrain"||ht?.type==="render"&&!Ot)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rl(this._lngLat,this._flatPos,this._map.transform):(Et=this._lngLat)===null||Et===void 0?void 0:Et.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ht="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Ht=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Ht=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Te="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Te="rotateX(0deg)":this._pitchAlignment==="map"&&(Te=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ht&&ht.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${vc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Te} ${Ht}`),o.frameAsync(new AbortController).then(()=>{this._updateOpacity(ht&&ht.type==="moveend")}).catch(()=>{})},this._onMove=ht=>{if(!this._isDragging){let Et=this._clickTolerance||this._map._clickTolerance;this._isDragging=ht.point.dist(this._pointerdownPos)>=Et}this._isDragging&&(this._pos=ht.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=ht=>{this._element.contains(ht.originalEvent.target)&&(ht.preventDefault(),this._positionDelta=ht.point.sub(this._pos).add(this._offset),this._pointerdownPos=ht.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=z&&z.anchor||"center",this._color=z&&z.color||"#3FB1CE",this._scale=z&&z.scale||1,this._draggable=z&&z.draggable||!1,this._clickTolerance=z&&z.clickTolerance||0,this._subpixelPositioning=z&&z.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=z&&z.rotation||0,this._rotationAlignment=z&&z.rotationAlignment||"auto",this._pitchAlignment=z&&z.pitchAlignment&&z.pitchAlignment!=="auto"?z.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(z?.opacity,z?.opacityWhenCovered),z&&z.element)this._element=z.element,this._offset=e.P.convert(z&&z.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ht=i.createNS("http://www.w3.org/2000/svg","svg"),Et=41,Ot=27;ht.setAttributeNS(null,"display","block"),ht.setAttributeNS(null,"height",`${Et}px`),ht.setAttributeNS(null,"width",`${Ot}px`),ht.setAttributeNS(null,"viewBox",`0 0 ${Ot} ${Et}`);let Ht=i.createNS("http://www.w3.org/2000/svg","g");Ht.setAttributeNS(null,"stroke","none"),Ht.setAttributeNS(null,"stroke-width","1"),Ht.setAttributeNS(null,"fill","none"),Ht.setAttributeNS(null,"fill-rule","evenodd");let Te=i.createNS("http://www.w3.org/2000/svg","g");Te.setAttributeNS(null,"fill-rule","nonzero");let Fe=i.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Fe.setAttributeNS(null,"fill","#000000");let Ke=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Me of Ke){let je=i.createNS("http://www.w3.org/2000/svg","ellipse");je.setAttributeNS(null,"opacity","0.04"),je.setAttributeNS(null,"cx","10.5"),je.setAttributeNS(null,"cy","5.80029008"),je.setAttributeNS(null,"rx",Me.rx),je.setAttributeNS(null,"ry",Me.ry),Fe.appendChild(je)}let vr=i.createNS("http://www.w3.org/2000/svg","g");vr.setAttributeNS(null,"fill",this._color);let Dr=i.createNS("http://www.w3.org/2000/svg","path");Dr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),vr.appendChild(Dr);let Fr=i.createNS("http://www.w3.org/2000/svg","g");Fr.setAttributeNS(null,"opacity","0.25"),Fr.setAttributeNS(null,"fill","#000000");let un=i.createNS("http://www.w3.org/2000/svg","path");un.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Fr.appendChild(un);let Sn=i.createNS("http://www.w3.org/2000/svg","g");Sn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sn.setAttributeNS(null,"fill","#FFFFFF");let Xt=i.createNS("http://www.w3.org/2000/svg","g");Xt.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=i.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let _e=i.createNS("http://www.w3.org/2000/svg","circle");_e.setAttributeNS(null,"fill","#FFFFFF"),_e.setAttributeNS(null,"cx","5.5"),_e.setAttributeNS(null,"cy","5.5"),_e.setAttributeNS(null,"r","5.4999962"),Xt.appendChild(ae),Xt.appendChild(_e),Te.appendChild(Fe),Te.appendChild(vr),Te.appendChild(Fr),Te.appendChild(Sn),Te.appendChild(Xt),ht.appendChild(Te),ht.setAttributeNS(null,"height",Et*this._scale+"px"),ht.setAttributeNS(null,"width",Ot*this._scale+"px"),this._element.appendChild(ht),this._offset=e.P.convert(z&&z.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ht=>{ht.preventDefault()}),this._element.addEventListener("mousedown",ht=>{ht.preventDefault()}),Hc(this._element,this._anchor,"marker"),z&&z.className)for(let ht of z.className.split(" "))this._element.classList.add(ht);this._popup=null}addTo(z){return this.remove(),this._map=z,this._element.setAttribute("aria-label",z._getUIString("Marker.Title")),z.getCanvasContainer().appendChild(this._element),z.on("move",this._update),z.on("moveend",this._update),z.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(z){return this._lngLat=e.N.convert(z),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(z){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),z){if(!("offset"in z.options)){let ht=Math.abs(13.5)/Math.SQRT2;z.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ht,-1*(38.1-13.5+ht)],"bottom-right":[-ht,-1*(38.1-13.5+ht)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=z,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(z){return this._subpixelPositioning=z,this}getPopup(){return this._popup}togglePopup(){let z=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:z?(z.isOpen()?z.remove():(z.setLngLat(this._lngLat),z.addTo(this._map)),this):this}_updateOpacity(z=!1){var ht,Et;if(!(!((ht=this._map)===null||ht===void 0)&&ht.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(z)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Ot=this._map,Ht=Ot.terrain.depthAtPoint(this._pos),Te=Ot.terrain.getElevationForLngLatZoom(this._lngLat,Ot.transform.tileZoom);if(Ot.transform.lngLatToCameraDepth(this._lngLat,Te)-Ht<.006)return void(this._element.style.opacity=this._opacity);let Fe=-this._offset.y/Ot.transform._pixelPerMeter,Ke=Math.sin(Ot.getPitch()*Math.PI/180)*Fe,vr=Ot.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Dr=Ot.transform.lngLatToCameraDepth(this._lngLat,Te+Ke)-vr>.006;!((Et=this._popup)===null||Et===void 0)&&Et.isOpen()&&Dr&&this._popup.remove(),this._element.style.opacity=Dr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(z){return this._offset=e.P.convert(z),this._update(),this}addClassName(z){this._element.classList.add(z)}removeClassName(z){this._element.classList.remove(z)}toggleClassName(z){return this._element.classList.toggle(z)}setDraggable(z){return this._draggable=!!z,this._map&&(z?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(z){return this._rotation=z||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(z){return this._rotationAlignment=z||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(z){return this._pitchAlignment=z&&z!=="auto"?z:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(z,ht){return z===void 0&&ht===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),z!==void 0&&(this._opacity=z),ht!==void 0&&(this._opacityWhenCovered=ht),this._map&&this._updateOpacity(!0),this}}let zh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wc=0,Oh=!1,Fu={maxWidth:100,unit:"metric"};function Dh($t,z,ht){let Et=ht&&ht.maxWidth||100,Ot=$t._container.clientHeight/2,Ht=$t.unproject([0,Ot]),Te=$t.unproject([Et,Ot]),Fe=Ht.distanceTo(Te);if(ht&&ht.unit==="imperial"){let Ke=3.2808*Fe;Ke>5280?ns(z,Et,Ke/5280,$t._getUIString("ScaleControl.Miles")):ns(z,Et,Ke,$t._getUIString("ScaleControl.Feet"))}else ht&&ht.unit==="nautical"?ns(z,Et,Fe/1852,$t._getUIString("ScaleControl.NauticalMiles")):Fe>=1e3?ns(z,Et,Fe/1e3,$t._getUIString("ScaleControl.Kilometers")):ns(z,Et,Fe,$t._getUIString("ScaleControl.Meters"))}function ns($t,z,ht,Et){let Ot=function(Ht){let Te=Math.pow(10,`${Math.floor(Ht)}`.length-1),Fe=Ht/Te;return Fe=Fe>=10?10:Fe>=5?5:Fe>=3?3:Fe>=2?2:Fe>=1?1:function(Ke){let vr=Math.pow(10,Math.ceil(-Math.log(Ke)/Math.LN10));return Math.round(Ke*vr)/vr}(Fe),Te*Fe}(ht);$t.style.width=z*(Ot/ht)+"px",$t.innerHTML=`${Ot} ${Et}`}let zs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function $u($t){if($t){if(typeof $t=="number"){let z=Math.round(Math.abs($t)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,$t),"top-left":new e.P(z,z),"top-right":new e.P(-z,z),bottom:new e.P(0,-$t),"bottom-left":new e.P(z,-z),"bottom-right":new e.P(-z,-z),left:new e.P($t,0),right:new e.P(-$t,0)}}if($t instanceof e.P||Array.isArray($t)){let z=e.P.convert($t);return{center:z,top:z,"top-left":z,"top-right":z,bottom:z,"bottom-left":z,"bottom-right":z,left:z,right:z}}return{center:e.P.convert($t.center||[0,0]),top:e.P.convert($t.top||[0,0]),"top-left":e.P.convert($t["top-left"]||[0,0]),"top-right":e.P.convert($t["top-right"]||[0,0]),bottom:e.P.convert($t.bottom||[0,0]),"bottom-left":e.P.convert($t["bottom-left"]||[0,0]),"bottom-right":e.P.convert($t["bottom-right"]||[0,0]),left:e.P.convert($t.left||[0,0]),right:e.P.convert($t.right||[0,0])}}return $u(new e.P(0,0))}let Zf=r;t.AJAXError=e.bh,t.Evented=e.E,t.LngLat=e.N,t.MercatorCoordinate=e.Z,t.Point=e.P,t.addProtocol=e.bi,t.config=e.a,t.removeProtocol=e.bj,t.AttributionControl=ps,t.BoxZoomHandler=Vc,t.CanvasSource=pe,t.CooperativeGesturesHandler=Oa,t.DoubleClickZoomHandler=gi,t.DragPanHandler=Ra,t.DragRotateHandler=Ga,t.EdgeInsets=Mc,t.FullscreenControl=class extends e.E{constructor($t={}){super(),this._onFullscreenChange=()=>{var z;let ht=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((z=ht?.shadowRoot)===null||z===void 0)&&z.fullscreenElement;)ht=ht.shadowRoot.fullscreenElement;ht===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,$t&&$t.container&&($t.container instanceof HTMLElement?this._container=$t.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd($t){return this._map=$t,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let $t=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",$t).setAttribute("aria-hidden","true"),$t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let $t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$t),this._fullscreenButton.title=$t}_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 e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Wt,t.GeolocateControl=class extends e.E{constructor($t){super(),this._onSuccess=z=>{if(this._map){if(this._isOutOfMapMaxBounds(z))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",z)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=z,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(z),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(z),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",z)),this._finish()}},this._updateCamera=z=>{let ht=new e.N(z.coords.longitude,z.coords.latitude),Et=z.coords.accuracy,Ot=this._map.getBearing(),Ht=e.e({bearing:Ot},this.options.fitBoundsOptions),Te=ut.fromLngLat(ht,Et);this._map.fitBounds(Te,Ht,{geolocateSource:!0})},this._updateMarker=z=>{if(z){let ht=new e.N(z.coords.longitude,z.coords.latitude);this._accuracyCircleMarker.setLngLat(ht).addTo(this._map),this._userLocationDotMarker.setLngLat(ht).addTo(this._map),this._accuracy=z.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=z=>{if(this._map){if(this.options.trackUserLocation)if(z.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 ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(z.code===3&&Oh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",z)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",z=>z.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=z=>{if(this._map){if(z===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}else{let ht=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Pc({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Pc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ht=>{ht.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ht.originalEvent&&ht.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},zh,$t)}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(z=!1){if(Kl!==void 0&&!z)return Kl;if(window.navigator.permissions===void 0)return Kl=!!window.navigator.geolocation,Kl;try{Kl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Kl=!!window.navigator.geolocation}return Kl})}().then(z=>this._finishSetupUI(z)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wc=0,Oh=!1}_isOutOfMapMaxBounds($t){let z=this._map.getMaxBounds(),ht=$t.coords;return z&&(ht.longitudez.getEast()||ht.latitudez.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let $t=this._map.getBounds(),z=$t.getSouthEast(),ht=$t.getNorthEast(),Et=z.distanceTo(ht),Ot=Math.ceil(this._accuracy/(Et/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Ot}px`,this._circleElement.style.height=`${Ot}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wc--,Oh=!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 e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let $t;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wc++,Wc>1?($t={maximumAge:6e5,timeout:0},Oh=!0):($t=this.options.positionOptions,Oh=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,$t)}}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)}},t.Hash=yh,t.ImageSource=ge,t.KeyboardHandler=Ur,t.LngLatBounds=ut,t.LogoControl=so,t.Map=class extends Xo{constructor($t){e.bf.mark(e.bg.create);let z=Object.assign(Object.assign({},zu),$t);if(z.minZoom!=null&&z.maxZoom!=null&&z.minZoom>z.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(z.minPitch!=null&&z.maxPitch!=null&&z.minPitch>z.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(z.minPitch!=null&&z.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(z.maxPitch!=null&&z.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new wu(z.minZoom,z.maxZoom,z.minPitch,z.maxPitch,z.renderWorldCopies),{bearingSnap:z.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new $a,this._controls=[],this._mapId=e.a4(),this._contextLost=ht=>{ht.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:ht}))},this._contextRestored=ht=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:ht}))},this._onMapScroll=ht=>{if(ht.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=z.interactive,this._maxTileCacheSize=z.maxTileCacheSize,this._maxTileCacheZoomLevels=z.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=z.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=z.preserveDrawingBuffer===!0,this._antialias=z.antialias===!0,this._trackResize=z.trackResize===!0,this._bearingSnap=z.bearingSnap,this._refreshExpiredTiles=z.refreshExpiredTiles===!0,this._fadeDuration=z.fadeDuration,this._crossSourceCollisions=z.crossSourceCollisions===!0,this._collectResourceTiming=z.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ml),z.locale),this._clickTolerance=z.clickTolerance,this._overridePixelRatio=z.pixelRatio,this._maxCanvasSize=z.maxCanvasSize,this.transformCameraUpdate=z.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=z.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=u.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(z.transformRequest),typeof z.container=="string"){if(this._container=document.getElementById(z.container),!this._container)throw new Error(`Container '${z.container}' not found.`)}else{if(!(z.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=z.container}if(z.maxBounds&&this.setMaxBounds(z.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ht=!1,Et=uf(Ot=>{this._trackResize&&!this._removed&&(this.resize(Ot),this.redraw())},50);this._resizeObserver=new ResizeObserver(Ot=>{ht?Et(Ot):ht=!0}),this._resizeObserver.observe(this._container)}this.handlers=new is(this,z),this._hash=z.hash&&new yh(typeof z.hash=="string"&&z.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:z.center,zoom:z.zoom,bearing:z.bearing,pitch:z.pitch}),z.bounds&&(this.resize(),this.fitBounds(z.bounds,e.e({},z.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=z.localIdeographFontFamily,this._validateStyle=z.validateStyle,z.style&&this.setStyle(z.style,{localIdeographFontFamily:z.localIdeographFontFamily}),z.attributionControl&&this.addControl(new ps(typeof z.attributionControl=="boolean"?void 0:z.attributionControl)),z.maplibreLogo&&this.addControl(new so,z.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ht=>{this._update(ht.dataType==="style"),this.fire(new e.k(`${ht.dataType}data`,ht))}),this.on("dataloading",ht=>{this.fire(new e.k(`${ht.dataType}dataloading`,ht))}),this.on("dataabort",ht=>{this.fire(new e.k("sourcedataabort",ht))})}_getMapId(){return this._mapId}addControl($t,z){if(z===void 0&&(z=$t.getDefaultPosition?$t.getDefaultPosition():"top-right"),!$t||!$t.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ht=$t.onAdd(this);this._controls.push($t);let Et=this._controlPositions[z];return z.indexOf("bottom")!==-1?Et.insertBefore(ht,Et.firstChild):Et.appendChild(ht),this}removeControl($t){if(!$t||!$t.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let z=this._controls.indexOf($t);return z>-1&&this._controls.splice(z,1),$t.onRemove(this),this}hasControl($t){return this._controls.indexOf($t)>-1}calculateCameraOptionsFromTo($t,z,ht,Et){return Et==null&&this.terrain&&(Et=this.terrain.getElevationForLngLatZoom(ht,this.transform.tileZoom)),super.calculateCameraOptionsFromTo($t,z,ht,Et)}resize($t){var z;let ht=this._containerDimensions(),Et=ht[0],Ot=ht[1],Ht=this._getClampedPixelRatio(Et,Ot);if(this._resizeCanvas(Et,Ot,Ht),this.painter.resize(Et,Ot,Ht),this.painter.overLimit()){let Fe=this.painter.context.gl;this._maxCanvasSize=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];let Ke=this._getClampedPixelRatio(Et,Ot);this._resizeCanvas(Et,Ot,Ke),this.painter.resize(Et,Ot,Ke)}this.transform.resize(Et,Ot),(z=this._requestedCameraState)===null||z===void 0||z.resize(Et,Ot);let Te=!this._moving;return Te&&(this.stop(),this.fire(new e.k("movestart",$t)).fire(new e.k("move",$t))),this.fire(new e.k("resize",$t)),Te&&this.fire(new e.k("moveend",$t)),this}_getClampedPixelRatio($t,z){let{0:ht,1:Et}=this._maxCanvasSize,Ot=this.getPixelRatio(),Ht=$t*Ot,Te=z*Ot;return Math.min(Ht>ht?ht/Ht:1,Te>Et?Et/Te:1)*Ot}getPixelRatio(){var $t;return($t=this._overridePixelRatio)!==null&&$t!==void 0?$t:devicePixelRatio}setPixelRatio($t){this._overridePixelRatio=$t,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds($t){return this.transform.setMaxBounds(ut.convert($t)),this._update()}setMinZoom($t){if(($t=$t??-2)>=-2&&$t<=this.transform.maxZoom)return this.transform.minZoom=$t,this._update(),this.getZoom()<$t&&this.setZoom($t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom($t){if(($t=$t??22)>=this.transform.minZoom)return this.transform.maxZoom=$t,this._update(),this.getZoom()>$t&&this.setZoom($t),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch($t){if(($t=$t??0)<0)throw new Error("minPitch must be greater than or equal to 0");if($t>=0&&$t<=this.transform.maxPitch)return this.transform.minPitch=$t,this._update(),this.getPitch()<$t&&this.setPitch($t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch($t){if(($t=$t??60)>85)throw new Error("maxPitch must be less than or equal to 85");if($t>=this.transform.minPitch)return this.transform.maxPitch=$t,this._update(),this.getPitch()>$t&&this.setPitch($t),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies($t){return this.transform.renderWorldCopies=$t,this._update()}project($t){return this.transform.locationPoint(e.N.convert($t),this.style&&this.terrain)}unproject($t){return this.transform.pointLocation(e.P.convert($t),this.terrain)}isMoving(){var $t;return this._moving||(($t=this.handlers)===null||$t===void 0?void 0:$t.isMoving())}isZooming(){var $t;return this._zooming||(($t=this.handlers)===null||$t===void 0?void 0:$t.isZooming())}isRotating(){var $t;return this._rotating||(($t=this.handlers)===null||$t===void 0?void 0:$t.isRotating())}_createDelegatedListener($t,z,ht){if($t==="mouseenter"||$t==="mouseover"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:Ot=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),Te=Ht.length!==0?this.queryRenderedFeatures(Ot.point,{layers:Ht}):[];Te.length?Et||(Et=!0,ht.call(this,new Qc($t,this,Ot.originalEvent,{features:Te}))):Et=!1},mouseout:()=>{Et=!1}}}}if($t==="mouseleave"||$t==="mouseout"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:Ot=>{let Ht=z.filter(Te=>this.getLayer(Te));(Ht.length!==0?this.queryRenderedFeatures(Ot.point,{layers:Ht}):[]).length?Et=!0:Et&&(Et=!1,ht.call(this,new Qc($t,this,Ot.originalEvent)))},mouseout:Ot=>{Et&&(Et=!1,ht.call(this,new Qc($t,this,Ot.originalEvent)))}}}}{let Et=Ot=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),Te=Ht.length!==0?this.queryRenderedFeatures(Ot.point,{layers:Ht}):[];Te.length&&(Ot.features=Te,ht.call(this,Ot),delete Ot.features)};return{layers:z,listener:ht,delegates:{[$t]:Et}}}}_saveDelegatedListener($t,z){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$t]=this._delegatedListeners[$t]||[],this._delegatedListeners[$t].push(z)}_removeDelegatedListener($t,z,ht){if(!this._delegatedListeners||!this._delegatedListeners[$t])return;let Et=this._delegatedListeners[$t];for(let Ot=0;Otz.includes(Te))){for(let Te in Ht.delegates)this.off(Te,Ht.delegates[Te]);return void Et.splice(Ot,1)}}}on($t,z,ht){if(ht===void 0)return super.on($t,z);let Et=this._createDelegatedListener($t,typeof z=="string"?[z]:z,ht);this._saveDelegatedListener($t,Et);for(let Ot in Et.delegates)this.on(Ot,Et.delegates[Ot]);return this}once($t,z,ht){if(ht===void 0)return super.once($t,z);let Et=typeof z=="string"?[z]:z,Ot=this._createDelegatedListener($t,Et,ht);for(let Ht in Ot.delegates){let Te=Ot.delegates[Ht];Ot.delegates[Ht]=(...Fe)=>{this._removeDelegatedListener($t,Et,ht),Te(...Fe)}}this._saveDelegatedListener($t,Ot);for(let Ht in Ot.delegates)this.once(Ht,Ot.delegates[Ht]);return this}off($t,z,ht){return ht===void 0?super.off($t,z):(this._removeDelegatedListener($t,typeof z=="string"?[z]:z,ht),this)}queryRenderedFeatures($t,z){if(!this.style)return[];let ht,Et=$t instanceof e.P||Array.isArray($t),Ot=Et?$t:[[0,0],[this.transform.width,this.transform.height]];if(z=z||(Et?{}:$t)||{},Ot instanceof e.P||typeof Ot[0]=="number")ht=[e.P.convert(Ot)];else{let Ht=e.P.convert(Ot[0]),Te=e.P.convert(Ot[1]);ht=[Ht,new e.P(Te.x,Ht.y),Te,new e.P(Ht.x,Te.y),Ht]}return this.style.queryRenderedFeatures(ht,z,this.transform)}querySourceFeatures($t,z){return this.style.querySourceFeatures($t,z)}setStyle($t,z){return(z=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},z)).diff!==!1&&z.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&$t?(this._diffStyle($t,z),this):(this._localIdeographFontFamily=z.localIdeographFontFamily,this._updateStyle($t,z))}setTransformRequest($t){return this._requestManager.setTransformRequest($t),this}_getUIString($t){let z=this._locale[$t];if(z==null)throw new Error(`Missing UI string '${$t}'`);return z}_updateStyle($t,z){if(z.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle($t,z));let ht=this.style&&z.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!$t)),$t?(this.style=new Yr(this,z||{}),this.style.setEventedParent(this,{style:this.style}),typeof $t=="string"?this.style.loadURL($t,z,ht):this.style.loadJSON($t,z,ht),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Yr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle($t,z){if(typeof $t=="string"){let ht=this._requestManager.transformRequest($t,"Style");e.h(ht,new AbortController).then(Et=>{this._updateDiff(Et.data,z)}).catch(Et=>{Et&&this.fire(new e.j(Et))})}else typeof $t=="object"&&this._updateDiff($t,z)}_updateDiff($t,z){try{this.style.setState($t,z)&&this._update(!0)}catch(ht){e.w(`Unable to perform style diff: ${ht.message||ht.error||ht}. Rebuilding the style from scratch.`),this._updateStyle($t,z)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource($t,z){return this._lazyInitEmptyStyle(),this.style.addSource($t,z),this._update(!0)}isSourceLoaded($t){let z=this.style&&this.style.sourceCaches[$t];if(z!==void 0)return z.loaded();this.fire(new e.j(new Error(`There is no source with ID '${$t}'`)))}setTerrain($t){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),$t){let z=this.style.sourceCaches[$t.source];if(!z)throw new Error(`cannot load terrain, because there exists no source with ID: ${$t.source}`);this.terrain===null&&z.reload();for(let ht in this.style._layers){let Et=this.style._layers[ht];Et.type==="hillshade"&&Et.source===$t.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Il(this.painter,z,$t),this.painter.renderToTexture=new lu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ht=>{ht.dataType==="style"?this.terrain.sourceCache.freeRtt():ht.dataType==="source"&&ht.tile&&(ht.sourceId!==$t.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ht.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:$t})),this}getTerrain(){var $t,z;return(z=($t=this.terrain)===null||$t===void 0?void 0:$t.options)!==null&&z!==void 0?z:null}areTilesLoaded(){let $t=this.style&&this.style.sourceCaches;for(let z in $t){let ht=$t[z]._tiles;for(let Et in ht){let Ot=ht[Et];if(Ot.state!=="loaded"&&Ot.state!=="errored")return!1}}return!0}removeSource($t){return this.style.removeSource($t),this._update(!0)}getSource($t){return this.style.getSource($t)}addImage($t,z,ht={}){let{pixelRatio:Et=1,sdf:Ot=!1,stretchX:Ht,stretchY:Te,content:Fe,textFitWidth:Ke,textFitHeight:vr}=ht;if(this._lazyInitEmptyStyle(),!(z instanceof HTMLImageElement||e.b(z))){if(z.width===void 0||z.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Dr,height:Fr,data:un}=z,Sn=z;return this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},new Uint8Array(un)),pixelRatio:Et,stretchX:Ht,stretchY:Te,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:Ot,version:0,userImage:Sn}),Sn.onAdd&&Sn.onAdd(this,$t),this}}{let{width:Dr,height:Fr,data:un}=o.getImageData(z);this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},un),pixelRatio:Et,stretchX:Ht,stretchY:Te,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:Ot,version:0})}}updateImage($t,z){let ht=this.style.getImage($t);if(!ht)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Et=z instanceof HTMLImageElement||e.b(z)?o.getImageData(z):z,{width:Ot,height:Ht,data:Te}=Et;if(Ot===void 0||Ht===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Ot!==ht.data.width||Ht!==ht.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Fe=!(z instanceof HTMLImageElement||e.b(z));return ht.data.replace(Te,Fe),this.style.updateImage($t,ht),this}getImage($t){return this.style.getImage($t)}hasImage($t){return $t?!!this.style.getImage($t):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage($t){this.style.removeImage($t)}loadImage($t){return u.getImage(this._requestManager.transformRequest($t,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer($t,z){return this._lazyInitEmptyStyle(),this.style.addLayer($t,z),this._update(!0)}moveLayer($t,z){return this.style.moveLayer($t,z),this._update(!0)}removeLayer($t){return this.style.removeLayer($t),this._update(!0)}getLayer($t){return this.style.getLayer($t)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange($t,z,ht){return this.style.setLayerZoomRange($t,z,ht),this._update(!0)}setFilter($t,z,ht={}){return this.style.setFilter($t,z,ht),this._update(!0)}getFilter($t){return this.style.getFilter($t)}setPaintProperty($t,z,ht,Et={}){return this.style.setPaintProperty($t,z,ht,Et),this._update(!0)}getPaintProperty($t,z){return this.style.getPaintProperty($t,z)}setLayoutProperty($t,z,ht,Et={}){return this.style.setLayoutProperty($t,z,ht,Et),this._update(!0)}getLayoutProperty($t,z){return this.style.getLayoutProperty($t,z)}setGlyphs($t,z={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs($t,z),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite($t,z,ht={}){return this._lazyInitEmptyStyle(),this.style.addSprite($t,z,ht,Et=>{Et||this._update(!0)}),this}removeSprite($t){return this._lazyInitEmptyStyle(),this.style.removeSprite($t),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite($t,z={}){return this._lazyInitEmptyStyle(),this.style.setSprite($t,z,ht=>{ht||this._update(!0)}),this}setLight($t,z={}){return this._lazyInitEmptyStyle(),this.style.setLight($t,z),this._update(!0)}getLight(){return this.style.getLight()}setSky($t){return this._lazyInitEmptyStyle(),this.style.setSky($t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState($t,z){return this.style.setFeatureState($t,z),this._update()}removeFeatureState($t,z){return this.style.removeFeatureState($t,z),this._update()}getFeatureState($t){return this.style.getFeatureState($t)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let $t=0,z=0;return this._container&&($t=this._container.clientWidth||400,z=this._container.clientHeight||300),[$t,z]}_setupContainer(){let $t=this._container;$t.classList.add("maplibregl-map");let z=this._canvasContainer=i.create("div","maplibregl-canvas-container",$t);this._interactive&&z.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",z),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 ht=this._containerDimensions(),Et=this._getClampedPixelRatio(ht[0],ht[1]);this._resizeCanvas(ht[0],ht[1],Et);let Ot=this._controlContainer=i.create("div","maplibregl-control-container",$t),Ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Te=>{Ht[Te]=i.create("div",`maplibregl-ctrl-${Te} `,Ot)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas($t,z,ht){this._canvas.width=Math.floor(ht*$t),this._canvas.height=Math.floor(ht*z),this._canvas.style.width=`${$t}px`,this._canvas.style.height=`${z}px`}_setupPainter(){let $t={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},z=null;this._canvas.addEventListener("webglcontextcreationerror",Et=>{z={requestedAttributes:$t},Et&&(z.statusMessage=Et.statusMessage,z.type=Et.type)},{once:!0});let ht=this._canvas.getContext("webgl2",$t)||this._canvas.getContext("webgl",$t);if(!ht){let Et="Failed to initialize WebGL";throw z?(z.message=Et,new Error(JSON.stringify(z))):new Error(Et)}this.painter=new qh(ht,this.transform),l.testSupport(ht)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update($t){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||$t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame($t){return this._update(),this._renderTaskQueue.add($t)}_cancelRenderFrame($t){this._renderTaskQueue.remove($t)}_render($t){let z=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run($t),this._removed)return;let ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Ot=this.transform.zoom,Ht=o.now();this.style.zoomHistory.update(Ot,Ht);let Te=new e.z(Ot,{now:Ht,fadeDuration:z,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fe=Te.crossFadingFactor();Fe===1&&Fe===this._crossFadingFactor||(ht=!0,this._crossFadingFactor=Fe),this.style.update(Te)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,z,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:z,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Et=this._sourcesDirty||this._styleDirty||this._placementDirty;return Et||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||Et||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var $t;this._hash&&this._hash.remove();for(let ht of this._controls)ht.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),u.removeThrottleControl(this._imageQueueHandle),($t=this._resizeObserver)===null||$t===void 0||$t.disconnect();let z=this.painter.context.gl.getExtension("WEBGL_lose_context");z!=null&&z.loseContext&&z.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then($t=>{e.bf.frame($t),this._frameRequest=null,this._render($t)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries($t){this._showTileBoundaries!==$t&&(this._showTileBoundaries=$t,this._update())}get showPadding(){return!!this._showPadding}set showPadding($t){this._showPadding!==$t&&(this._showPadding=$t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes($t){this._showCollisionBoxes!==$t&&(this._showCollisionBoxes=$t,$t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector($t){this._showOverdrawInspector!==$t&&(this._showOverdrawInspector=$t,this._update())}get repaint(){return!!this._repaint}set repaint($t){this._repaint!==$t&&(this._repaint=$t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices($t){this._vertices=$t,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=Qc,t.MapTouchEvent=ff,t.MapWheelEvent=Pf,t.Marker=Pc,t.NavigationControl=class{constructor($t){this._updateZoomButtons=()=>{let z=this._map.getZoom(),ht=z===this._map.getMaxZoom(),Et=z===this._map.getMinZoom();this._zoomInButton.disabled=ht,this._zoomOutButton.disabled=Et,this._zoomInButton.setAttribute("aria-disabled",ht.toString()),this._zoomOutButton.setAttribute("aria-disabled",Et.toString())},this._rotateCompassArrow=()=>{let z=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=z},this._setButtonTitle=(z,ht)=>{let Et=this._map._getUIString(`NavigationControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)},this.options=e.e({},Oo,$t),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",z=>z.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",z=>this._map.zoomIn({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",z=>this._map.zoomOut({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",z=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:z}):this._map.resetNorth({},{originalEvent:z})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd($t){return this._map=$t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Es(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton($t,z){let ht=i.create("button",$t,this._container);return ht.type="button",ht.addEventListener("click",z),ht}},t.Popup=class extends e.E{constructor($t){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=z=>{this._update(z.point)},this._onMouseMove=z=>{this._update(z.point)},this._onDrag=z=>{this._update(z.point)},this._update=z=>{var ht;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Fe of this.options.className.split(" "))this._container.classList.add(Fe);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Rl(this._lngLat,this._flatPos,this._map.transform):(ht=this._lngLat)===null||ht===void 0?void 0:ht.wrap(),this._trackPointer&&!z)return;let Et=this._flatPos=this._pos=this._trackPointer&&z?z:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&z?z:this._map.transform.locationPoint(this._lngLat));let Ot=this.options.anchor,Ht=$u(this.options.offset);if(!Ot){let Fe=this._container.offsetWidth,Ke=this._container.offsetHeight,vr;vr=Et.y+Ht.bottom.ythis._map.transform.height-Ke?["bottom"]:[],Et.xthis._map.transform.width-Fe/2&&vr.push("right"),Ot=vr.length===0?"bottom":vr.join("-")}let Te=Et.add(Ht[Ot]);this.options.subpixelPositioning||(Te=Te.round()),i.setTransform(this._container,`${vc[Ot]} translate(${Te.x}px,${Te.y}px)`),Hc(this._container,Ot,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(zs),$t)}addTo($t){return this._map&&this.remove(),this._map=$t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat($t){return this._lngLat=e.N.convert($t),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText($t){return this.setDOMContent(document.createTextNode($t))}setHTML($t){let z=document.createDocumentFragment(),ht=document.createElement("body"),Et;for(ht.innerHTML=$t;Et=ht.firstChild,Et;)z.appendChild(Et);return this.setDOMContent(z)}getMaxWidth(){var $t;return($t=this._container)===null||$t===void 0?void 0:$t.style.maxWidth}setMaxWidth($t){return this.options.maxWidth=$t,this._update(),this}setDOMContent($t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild($t),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName($t){return this._container&&this._container.classList.add($t),this}removeClassName($t){return this._container&&this._container.classList.remove($t),this}setOffset($t){return this.options.offset=$t,this._update(),this}toggleClassName($t){if(this._container)return this._container.classList.toggle($t)}setSubpixelPositioning($t){this.options.subpixelPositioning=$t}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let $t=this._container.querySelector(qc);$t&&$t.focus()}},t.RasterDEMTileSource=qt,t.RasterTileSource=Pt,t.ScaleControl=class{constructor($t){this._onMove=()=>{Dh(this._map,this._container,this.options)},this.setUnit=z=>{this.options.unit=z,Dh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Fu),$t)}getDefaultPosition(){return"bottom-left"}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",$t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=Zn,t.Style=Yr,t.TerrainControl=class{constructor($t){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=$t}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=$f,t.TwoFingersTouchRotateHandler=df,t.TwoFingersTouchZoomHandler=iu,t.TwoFingersTouchZoomRotateHandler=fa,t.VectorTileSource=It,t.VideoSource=fe,t.addSourceType=($t,z)=>e._(void 0,void 0,void 0,function*(){if(Tt($t))throw new Error(`A source type called "${$t}" already exists.`);((ht,Et)=>{se[ht]=Et})($t,z)}),t.clearPrewarmedResources=function(){let $t=st;$t&&($t.isPreloaded()&&$t.numActive()===1?($t.release(lt),st=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()"))},t.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return ve().getRTLTextPluginStatus()},t.getVersion=function(){return Zf},t.getWorkerCount=function(){return yt.workerCount},t.getWorkerUrl=function(){return e.a.WORKER_URL},t.importScriptInWorkers=function($t){return at().broadcast("IS",$t)},t.prewarm=function(){pt().acquire(lt)},t.setMaxParallelImageRequests=function($t){e.a.MAX_PARALLEL_IMAGE_REQUESTS=$t},t.setRTLTextPlugin=function($t,z){return ve().setRTLTextPlugin($t,z)},t.setWorkerCount=function($t){yt.workerCount=$t},t.setWorkerUrl=function($t){e.a.WORKER_URL=$t}});var S=c;return S})}),mq=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=IE(),S=K1();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),gq=Dt((Q,Z)=>{var c=pq(),g=kn(),I=$1(),S=Qo(),t=Ls(),e=cp(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=K1(),v=mq();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k;p.map?k=new Promise(function(w,B){p.updateMap(C,A,w,B)}):k=new Promise(function(w,B){p.createMap(C,A,w,B)}),h.push(k)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],B=k.styleObj=_(w.style),O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:B.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0})),H={};V.on("styleimagemissing",function(U){var W=U.id;if(!H[W]&&W.includes("-15")){H[W]=!0;var q=new Image(15,15);q.onload=function(){V.addImage(W,q)},q.crossOrigin="Anonymous",q.src="https://unpkg.com/maki@2.1.0/icons/"+W+".svg"}}),V.setTransformRequest(function(U){return U=U.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:U}}),V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var F=[];F.push(new Promise(function(U){V.once("load",U)})),F=F.concat(I.fetchTraceGeoData(C)),Promise.all(F).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,B=A[this.id];k.rejectOnError(p);var O=[],j=_(B.style);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,B=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,B;B=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:B},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=D1(),I=Ad(),S=z3();Z.exports=function(r,a,n){g(r,a,n,{type:"map",attributes:S,handleDefaults:t,partition:"y"})};function t(r,a,n){n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var o=n("bounds.west"),i=n("bounds.east"),l=n("bounds.south"),f=n("bounds.north");(o===void 0||i===void 0||l===void 0||f===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),MT=Dt(Q=>{var Z=kn(),c=Z.strTranslate,g=Z.strScale,I=ud().getSubplotCalcData,S=Dp(),t=Wr(),e=Vs(),r=ec(),a=gq(),n="map";Q.name=n,Q.attr="subplot",Q.idRoot=n,Q.idRegex=Q.attrRegex=Z.counterRegex(n),Q.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Q.layoutAttributes=z3(),Q.supplyLayoutDefaults=vq(),Q.plot=function(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[n],x=0;xh/2){var p=P.split("|").join("
");C.text(p).attr("data-unformatted",p).call(r.convertToTspans,o),A=e.bBox(C.node())}C.attr("transform",c(-3,-A.height+8)),M.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;A.width+6>h&&(k=h/(A.width+6));var w=[f.l+f.w*v.x[1],f.t+f.h*(1-v.y[0])];M.attr("transform",c(w[0],w[1])+g(k))}},Q.updateFx=function(o){for(var i=o._fullLayout,l=i._subplots[n],f=0;f{Z.exports={attributes:TT(),supplyDefaults:uq(),colorbar:xo(),formatLabels:PE(),calc:eT(),plot:hq(),hoverPoints:AT().hoverPoints,eventData:fq(),selectPoints:dq(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermap",basePlotModule:MT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}),xq=Dt((Q,Z)=>{Z.exports=yq()}),zE=Dt((Q,Z)=>{var c=vb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=qo(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),_q=Dt((Q,Z)=>{var c=kn(),g=mc(),I=zE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),OE=Dt((Q,Z)=>{var c=Hn(),g=kn(),I=Xc(),S=Vs(),t=q1().makeBlank,e=$1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=OE().convert,g=OE().convertOnSelect,I=K1().traceLayerPrefix;function S(e,r){this.type="choroplethmap",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),wq=Dt((Q,Z)=>{Z.exports={attributes:zE(),supplyDefaults:_q(),colorbar:O1(),calc:aT(),plot:bq(),hoverPoints:sT(),eventData:lT(),selectPoints:uT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=wq()}),DE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=qo(),t=TT(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),Tq=Dt((Q,Z)=>{var c=kn(),g=mc(),I=DE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),Aq=Dt((Q,Z)=>{var c=Hn(),g=kn().isArrayOrTypedArray,I=sa().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Hn(),g=kn(),I=pi(),S=Xc(),t=sa().BADNUM,e=q1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=Mq(),g=K1().traceLayerPrefix;function I(t,e){this.type="densitymap",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),Eq=Dt((Q,Z)=>{var c=Ls(),g=AT().hoverPoints,I=AT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),Cq=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),Lq=Dt((Q,Z)=>{Z.exports={attributes:DE(),supplyDefaults:Tq(),colorbar:O1(),formatLabels:PE(),calc:Aq(),plot:Sq(),hoverPoints:Eq(),eventData:Cq(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=Lq()}),FE=Dt((Q,Z)=>{var c=ma(),g=qo(),I=Ai(),S=us(),t=Uh().attributes,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=kc(),n=mu().templatedArray,o=ph().descriptionOnlyNumbers,i=Ia().extendFlat,l=Yc().overrideAll;Z.exports=l({hoverinfo:i({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:S.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:c({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:I.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:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:I.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:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:n("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(a().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}),Iq=Dt((Q,Z)=>{var c=kn(),g=FE(),I=pi(),S=ro(),t=Uh().defaults,e=Ag(),r=mu(),a=Ad();Z.exports=function(o,i,l,f){function x(B,O){return c.coerce(o,i,g,B,O)}var y=c.extendDeep(f.hoverlabel,o.hoverlabel),v=o.node,T=r.newContainer(i,"node");function u(B,O){return c.coerce(v,T,g.node,B,O)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",o.hoverinfo),e(v,T,u,y),u("hovertemplate"),u("align");var b=f.colorway,_=function(B){return b[B%b.length]};u("color",T.label.map(function(B,O){return I.addOpacity(_(O),.8)})),u("customdata");var P=o.link||{},M=r.newContainer(i,"link");function C(B,O){return c.coerce(P,M,g.link,B,O)}C("label"),C("arrowlen"),C("source"),C("target"),C("value"),C("line.color"),C("line.width"),C("hoverinfo",o.hoverinfo),e(P,M,C,y),C("hovertemplate");var A=S(f.paper_bgcolor).getLuminance()<.333,h=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=C("color",h);function k(B){var O=S(B);if(!O.isValid())return B;var j=O.getAlpha();return j<=.8?O.setAlpha(j+.2):O=A?O.brighten():O.darken(),O.toRgbString()}C("hovercolor",Array.isArray(p)?p.map(k):k(p)),C("customdata"),a(P,M,{name:"colorscales",handleItemDefaults:n}),t(i,f,x),x("orientation"),x("valueformat"),x("valuesuffix");var w;T.x.length&&T.y.length&&(w="freeform"),x("arrangement",w),c.coerceFont(x,"textfont",f.font,{autoShadowDflt:!0}),i._length=null};function n(o,i){function l(f,x){return c.coerce(o,i,g.link.colorscales,f,x)}l("label"),l("cmin"),l("cmax"),l("colorscale")}}),BE=Dt((Q,Z)=>{Z.exports=c;function c(g){for(var I=g.length,S=new Array(I),t=new Array(I),e=new Array(I),r=new Array(I),a=new Array(I),n=new Array(I),o=0;o0;){u=_[_.length-1];var P=g[u];if(r[u]=0&&n[u].push(a[C])}r[u]=M}else{if(t[u]===S[u]){for(var A=[],h=[],p=0,M=b.length-1;M>=0;--M){var k=b[M];if(e[k]=!1,A.push(k),h.push(n[k]),p+=n[k].length,a[k]=l.length,k===u){b.length=M;break}}l.push(A);for(var w=new Array(p),M=0;M{var c=BE(),g=kn(),I=Og().wrap,S=g.isArrayOrTypedArray,t=g.isIndex,e=Xc();function r(n){var o=n.node,i=n.link,l=[],f=S(i.color),x=S(i.hovercolor),y=S(i.customdata),v={},T={},u=i.colorscales.length,b;for(b=0;bC&&(C=i.source[b]),i.target[b]>C&&(C=i.target[b]);var A=C+1;n.node._count=A;var h,p=n.node.groups,k={};for(b=0;b0&&t(H,A)&&t(F,A)&&!(k.hasOwnProperty(H)&&k.hasOwnProperty(F)&&k[H]===k[F])){k.hasOwnProperty(F)&&(F=k[F]),k.hasOwnProperty(H)&&(H=k[H]),H=+H,F=+F,v[H]=v[F]=!0;var U="";i.label&&i.label[b]&&(U=i.label[b]);var W=null;U&&T.hasOwnProperty(U)&&(W=T[U]),l.push({pointNumber:b,label:U,color:f?i.color[b]:i.color,hovercolor:x?i.hovercolor[b]:i.hovercolor,customdata:y?i.customdata[b]:i.customdata,concentrationscale:W,source:H,target:F,value:+V}),j.source.push(H),j.target.push(F)}}var q=A+p.length,J=S(o.color),lt=S(o.customdata),yt=[];for(b=0;bA-1,childrenNodes:[],pointNumber:b,label:mt,color:J?o.color[b]:o.color,customdata:lt?o.customdata[b]:o.customdata})}var st=!1;return a(q,j.source,j.target)&&(st=!0),{circular:st,links:l,nodes:yt,groups:p,groupLookup:k}}function a(n,o,i){for(var l=g.init2dArray(n,0),f=0;f1})}Z.exports=function(n,o){var i=r(o);return I({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}}),Oq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){var h=+this._x.call(null,A),p=+this._y.call(null,A);return I(this.cover(h,p),h,p,A)}function I(A,h,p,k){if(isNaN(h)||isNaN(p))return A;var w,B=A._root,O={data:k},j=A._x0,V=A._y0,H=A._x1,F=A._y1,U,W,q,J,lt,yt,mt,st;if(!B)return A._root=O,A;for(;B.length;)if((lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W,w=B,!(B=B[mt=yt<<1|lt]))return w[mt]=O,A;if(q=+A._x.call(null,B.data),J=+A._y.call(null,B.data),h===q&&p===J)return O.next=B,w?w[mt]=O:A._root=O,A;do w=w?w[mt]=new Array(4):A._root=new Array(4),(lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W;while((mt=yt<<1|lt)===(st=(J>=W)<<1|q>=U));return w[st]=B,w[mt]=O,A}function S(A){var h,p,k=A.length,w,B,O=new Array(k),j=new Array(k),V=1/0,H=1/0,F=-1/0,U=-1/0;for(p=0;pF&&(F=w),BU&&(U=B));if(V>F||H>U)return this;for(this.cover(V,H).cover(F,U),p=0;pA||A>=w||k>h||h>=B;)switch(H=(hF||(j=J.y0)>U||(V=J.x1)=mt)<<1|A>=yt)&&(J=W[W.length-1],W[W.length-1]=W[W.length-1-lt],W[W.length-1-lt]=J)}else{var st=A-+this._x.call(null,q.data),tt=h-+this._y.call(null,q.data),pt=st*st+tt*tt;if(pt=(W=(O+V)/2))?O=W:V=W,(lt=U>=(q=(j+H)/2))?j=q:H=q,h=p,!(p=p[yt=lt<<1|J]))return this;if(!p.length)break;(h[yt+1&3]||h[yt+2&3]||h[yt+3&3])&&(k=h,mt=yt)}for(;p.data!==A;)if(w=p,!(p=p.next))return this;return(B=p.next)&&delete p.next,w?(B?w.next=B:delete w.next,this):h?(B?h[yt]=B:delete h[yt],(p=h[0]||h[1]||h[2]||h[3])&&p===(h[3]||h[2]||h[1]||h[0])&&!p.length&&(k?k[mt]=p:this._root=p),this):(this._root=B,this)}function i(A){for(var h=0,p=A.length;h{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){var g="$";function I(){}I.prototype=S.prototype={constructor:I,has:function(v){return g+v in this},get:function(v){return this[g+v]},set:function(v,T){return this[g+v]=T,this},remove:function(v){var T=g+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===g&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===g&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===g&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===g&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===g&&++v;return v},empty:function(){for(var v in this)if(v[0]===g)return!1;return!0},each:function(v){for(var T in this)T[0]===g&&v(this[T],T.slice(1),this)}};function S(v,T){var u=new I;if(v instanceof I)v.each(function(C,A){u.set(A,C)});else if(Array.isArray(v)){var b=-1,_=v.length,P;if(T==null)for(;++b<_;)u.set(b,v[b]);else for(;++b<_;)u.set(T(P=v[b],b,v),P)}else if(v)for(var M in v)u.set(M,v[M]);return u}function t(){var v=[],T=[],u,b,_;function P(C,A,h,p){if(A>=v.length)return u!=null&&C.sort(u),b!=null?b(C):C;for(var k=-1,w=C.length,B=v[A++],O,j,V=S(),H,F=h();++kv.length)return C;var h,p=T[A-1];return b!=null&&A>=v.length?h=C.entries():(h=[],C.each(function(k,w){h.push({key:w,values:M(k,A)})})),p!=null?h.sort(function(k,w){return p(k.key,w.key)}):h}return _={object:function(C){return P(C,0,e,r)},map:function(C){return P(C,0,a,n)},entries:function(C){return M(P(C,0,a,n),0)},key:function(C){return v.push(C),_},sortKeys:function(C){return T[v.length-1]=C,_},sortValues:function(C){return u=C,_},rollup:function(C){return b=C,_}}}function e(){return{}}function r(v,T,u){v[T]=u}function a(){return S()}function n(v,T,u){v.set(T,u)}function o(){}var i=S.prototype;o.prototype=l.prototype={constructor:o,has:i.has,add:function(v){return v+="",this[g+v]=v,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function l(v,T){var u=new o;if(v instanceof o)v.each(function(P){u.add(P)});else if(v){var b=-1,_=v.length;if(T==null)for(;++b<_;)u.add(v[b]);else for(;++b<_;)u.add(T(v[b],b,v))}return u}function f(v){var T=[];for(var u in v)T.push(u);return T}function x(v){var T=[];for(var u in v)T.push(v[u]);return T}function y(v){var T=[];for(var u in v)T.push({key:u,value:v[u]});return T}c.nest=t,c.set=l,c.map=S,c.keys=f,c.values=x,c.entries=y,Object.defineProperty(c,"__esModule",{value:!0})})}),Dq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g={value:function(){}};function I(){for(var a=0,n=arguments.length,o={},i;a=0&&(i=o.slice(l+1),o=o.slice(0,l)),o&&!n.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:i}})}S.prototype=I.prototype={constructor:S,on:function(a,n){var o=this._,i=t(a+"",o),l,f=-1,x=i.length;if(arguments.length<2){for(;++f0)for(var o=new Array(l),i=0,l,f;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=0,I=0,S=0,t=1e3,e,r,a=0,n=0,o=0,i=typeof performance=="object"&&performance.now?performance:Date,l=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function f(){return n||(l(x),n=i.now()+o)}function x(){n=0}function y(){this._call=this._time=this._next=null}y.prototype=v.prototype={constructor:y,restart:function(A,h,p){if(typeof A!="function")throw new TypeError("callback is not a function");p=(p==null?f():+p)+(h==null?0:+h),!this._next&&r!==this&&(r?r._next=this:e=this,r=this),this._call=A,this._time=p,P()},stop:function(){this._call&&(this._call=null,this._time=1/0,P())}};function v(A,h,p){var k=new y;return k.restart(A,h,p),k}function T(){f(),++g;for(var A=e,h;A;)(h=n-A._time)>=0&&A._call.call(null,h),A=A._next;--g}function u(){n=(a=i.now())+o,g=I=0;try{T()}finally{g=0,_(),n=0}}function b(){var A=i.now(),h=A-a;h>t&&(o-=h,a=A)}function _(){for(var A,h=e,p,k=1/0;h;)h._call?(k>h._time&&(k=h._time),A=h,h=h._next):(p=h._next,h._next=null,h=A?A._next=p:e=p);r=A,P(k)}function P(A){if(!g){I&&(I=clearTimeout(I));var h=A-n;h>24?(A<1/0&&(I=setTimeout(u,A-i.now()-o)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,t)),g=1,l(u))}}function M(A,h,p){var k=new y;return h=h==null?0:+h,k.restart(function(w){k.stop(),A(w+h)},h,p),k}function C(A,h,p){var k=new y,w=h;return h==null?(k.restart(A,h,p),k):(h=+h,p=p==null?f():+p,k.restart(function B(O){O+=w,k.restart(B,w+=h,p),A(O)},h,p),k)}c.interval=C,c.now=f,c.timeout=M,c.timer=v,c.timerFlush=T,Object.defineProperty(c,"__esModule",{value:!0})})}),Bq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,Oq(),ST(),Dq(),Fq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,c.d3)})(Q,function(c,g,I,S,t){function e(A,h){var p;A==null&&(A=0),h==null&&(h=0);function k(){var w,B=p.length,O,j=0,V=0;for(w=0;wU.index){var ft=W-vt.x-vt.vx,ut=q-vt.y-vt.vy,kt=ft*ft+ut*ut;ktW+K||rtq+K||atV.r&&(V.r=V[H].r)}function j(){if(h){var V,H=h.length,F;for(p=new Array(H),V=0;V1?(lt==null?j.remove(J):j.set(J,q(lt)),h):j.get(J)},find:function(J,lt,yt){var mt=0,st=A.length,tt,pt,rt,at,vt;for(yt==null?yt=1/0:yt*=yt,mt=0;mt1?(H.on(J,lt),h):H.on(J)}}}function _(){var A,h,p,k=r(-30),w,B=1,O=1/0,j=.81;function V(W){var q,J=A.length,lt=g.quadtree(A,y,v).visitAfter(F);for(p=W,q=0;q=O)){(W.data!==h||W.next)&&(yt===0&&(yt=a(),tt+=yt*yt),mt===0&&(mt=a(),tt+=mt*mt),tt{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=Math.PI,I=2*g,S=1e-6,t=I-S;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new e}e.prototype=r.prototype={constructor:e,moveTo:function(a,n){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,n){this._+="L"+(this._x1=+a)+","+(this._y1=+n)},quadraticCurveTo:function(a,n,o,i){this._+="Q"+ +a+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},bezierCurveTo:function(a,n,o,i,l,f){this._+="C"+ +a+","+ +n+","+ +o+","+ +i+","+(this._x1=+l)+","+(this._y1=+f)},arcTo:function(a,n,o,i,l){a=+a,n=+n,o=+o,i=+i,l=+l;var f=this._x1,x=this._y1,y=o-a,v=i-n,T=f-a,u=x-n,b=T*T+u*u;if(l<0)throw new Error("negative radius: "+l);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=n);else if(b>S)if(!(Math.abs(u*y-v*T)>S)||!l)this._+="L"+(this._x1=a)+","+(this._y1=n);else{var _=o-f,P=i-x,M=y*y+v*v,C=_*_+P*P,A=Math.sqrt(M),h=Math.sqrt(b),p=l*Math.tan((g-Math.acos((M+b-C)/(2*A*h)))/2),k=p/h,w=p/A;Math.abs(k-1)>S&&(this._+="L"+(a+k*T)+","+(n+k*u)),this._+="A"+l+","+l+",0,0,"+ +(u*_>T*P)+","+(this._x1=a+w*y)+","+(this._y1=n+w*v)}},arc:function(a,n,o,i,l,f){a=+a,n=+n,o=+o,f=!!f;var x=o*Math.cos(i),y=o*Math.sin(i),v=a+x,T=n+y,u=1^f,b=f?i-l:l-i;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>S||Math.abs(this._y1-T)>S)&&(this._+="L"+v+","+T),o&&(b<0&&(b=b%I+I),b>t?this._+="A"+o+","+o+",0,1,"+u+","+(a-x)+","+(n-y)+"A"+o+","+o+",0,1,"+u+","+(this._x1=v)+","+(this._y1=T):b>S&&(this._+="A"+o+","+o+",0,"+ +(b>=g)+","+u+","+(this._x1=a+o*Math.cos(l))+","+(this._y1=n+o*Math.sin(l))))},rect:function(a,n,o,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +i+"h"+-o+"Z"},toString:function(){return this._}},c.path=r,Object.defineProperty(c,"__esModule",{value:!0})})}),RE=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,Rq()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Ce){return function(){return Ce}}var S=Math.abs,t=Math.atan2,e=Math.cos,r=Math.max,a=Math.min,n=Math.sin,o=Math.sqrt,i=1e-12,l=Math.PI,f=l/2,x=2*l;function y(Ce){return Ce>1?0:Ce<-1?l:Math.acos(Ce)}function v(Ce){return Ce>=1?f:Ce<=-1?-f:Math.asin(Ce)}function T(Ce){return Ce.innerRadius}function u(Ce){return Ce.outerRadius}function b(Ce){return Ce.startAngle}function _(Ce){return Ce.endAngle}function P(Ce){return Ce&&Ce.padAngle}function M(Ce,pr,Hr,_n,Bn,ri,Pn,En){var Yn=Hr-Ce,La=_n-pr,qi=Pn-Bn,Qa=En-ri,Ja=Qa*Yn-qi*La;if(!(Ja*Jakl*kl+ql*ql&&(Qs=cs,jl=Ps),{cx:Qs,cy:jl,x01:-qi,y01:-Qa,x11:Qs*(Bn/Ks-1),y11:jl*(Bn/Ks-1)}}function A(){var Ce=T,pr=u,Hr=I(0),_n=null,Bn=b,ri=_,Pn=P,En=null;function Yn(){var La,qi,Qa=+Ce.apply(this,arguments),Ja=+pr.apply(this,arguments),Do=Bn.apply(this,arguments)-f,yo=ri.apply(this,arguments)-f,Bo=S(yo-Do),Da=yo>Do;if(En||(En=La=g.path()),Jai))En.moveTo(0,0);else if(Bo>x-i)En.moveTo(Ja*e(Do),Ja*n(Do)),En.arc(0,0,Ja,Do,yo,!Da),Qa>i&&(En.moveTo(Qa*e(yo),Qa*n(yo)),En.arc(0,0,Qa,yo,Do,Da));else{var ys=Do,os=yo,ul=Do,Go=yo,Ks=Bo,ss=Bo,cl=Pn.apply(this,arguments)/2,Qs=cl>i&&(_n?+_n.apply(this,arguments):o(Qa*Qa+Ja*Ja)),jl=a(S(Ja-Qa)/2,+Hr.apply(this,arguments)),cs=jl,Ps=jl,Po,As;if(Qs>i){var kl=v(Qs/Qa*n(cl)),ql=v(Qs/Ja*n(cl));(Ks-=kl*2)>i?(kl*=Da?1:-1,ul+=kl,Go-=kl):(Ks=0,ul=Go=(Do+yo)/2),(ss-=ql*2)>i?(ql*=Da?1:-1,ys+=ql,os-=ql):(ss=0,ys=os=(Do+yo)/2)}var Jl=Ja*e(ys),Us=Ja*n(ys),Pa=Qa*e(Go),fo=Qa*n(Go);if(jl>i){var qs=Ja*e(os),Ql=Ja*n(os),Jo=Qa*e(ul),Gl=Qa*n(ul),al;if(Boi?Ps>i?(Po=C(Jo,Gl,Jl,Us,Ja,Ps,Da),As=C(qs,Ql,Pa,fo,Ja,Ps,Da),En.moveTo(Po.cx+Po.x01,Po.cy+Po.y01),Psi)||!(Ks>i)?En.lineTo(Pa,fo):cs>i?(Po=C(Pa,fo,qs,Ql,Qa,-cs,Da),As=C(Jl,Us,Jo,Gl,Qa,-cs,Da),En.lineTo(Po.cx+Po.x01,Po.cy+Po.y01),cs=Ja;--Do)En.point(os[Do],ul[Do]);En.lineEnd(),En.areaEnd()}Da&&(os[Qa]=+Ce(Bo,Qa,qi),ul[Qa]=+Hr(Bo,Qa,qi),En.point(pr?+pr(Bo,Qa,qi):os[Qa],_n?+_n(Bo,Qa,qi):ul[Qa]))}if(ys)return En=null,ys+""||null}function La(){return B().defined(Bn).curve(Pn).context(ri)}return Yn.x=function(qi){return arguments.length?(Ce=typeof qi=="function"?qi:I(+qi),pr=null,Yn):Ce},Yn.x0=function(qi){return arguments.length?(Ce=typeof qi=="function"?qi:I(+qi),Yn):Ce},Yn.x1=function(qi){return arguments.length?(pr=qi==null?null:typeof qi=="function"?qi:I(+qi),Yn):pr},Yn.y=function(qi){return arguments.length?(Hr=typeof qi=="function"?qi:I(+qi),_n=null,Yn):Hr},Yn.y0=function(qi){return arguments.length?(Hr=typeof qi=="function"?qi:I(+qi),Yn):Hr},Yn.y1=function(qi){return arguments.length?(_n=qi==null?null:typeof qi=="function"?qi:I(+qi),Yn):_n},Yn.lineX0=Yn.lineY0=function(){return La().x(Ce).y(Hr)},Yn.lineY1=function(){return La().x(Ce).y(_n)},Yn.lineX1=function(){return La().x(pr).y(Hr)},Yn.defined=function(qi){return arguments.length?(Bn=typeof qi=="function"?qi:I(!!qi),Yn):Bn},Yn.curve=function(qi){return arguments.length?(Pn=qi,ri!=null&&(En=Pn(ri)),Yn):Pn},Yn.context=function(qi){return arguments.length?(qi==null?ri=En=null:En=Pn(ri=qi),Yn):ri},Yn}function j(Ce,pr){return prCe?1:pr>=Ce?0:NaN}function V(Ce){return Ce}function H(){var Ce=V,pr=j,Hr=null,_n=I(0),Bn=I(x),ri=I(0);function Pn(En){var Yn,La=En.length,qi,Qa,Ja=0,Do=new Array(La),yo=new Array(La),Bo=+_n.apply(this,arguments),Da=Math.min(x,Math.max(-x,Bn.apply(this,arguments)-Bo)),ys,os=Math.min(Math.abs(Da)/La,ri.apply(this,arguments)),ul=os*(Da<0?-1:1),Go;for(Yn=0;Yn0&&(Ja+=Go);for(pr!=null?Do.sort(function(Ks,ss){return pr(yo[Ks],yo[ss])}):Hr!=null&&Do.sort(function(Ks,ss){return Hr(En[Ks],En[ss])}),Yn=0,Qa=Ja?(Da-La*ul)/Ja:0;Yn0?Go*Qa:0)+ul,yo[qi]={data:En[qi],index:Yn,value:Go,startAngle:Bo,endAngle:ys,padAngle:os};return yo}return Pn.value=function(En){return arguments.length?(Ce=typeof En=="function"?En:I(+En),Pn):Ce},Pn.sortValues=function(En){return arguments.length?(pr=En,Hr=null,Pn):pr},Pn.sort=function(En){return arguments.length?(Hr=En,pr=null,Pn):Hr},Pn.startAngle=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.endAngle=function(En){return arguments.length?(Bn=typeof En=="function"?En:I(+En),Pn):Bn},Pn.padAngle=function(En){return arguments.length?(ri=typeof En=="function"?En:I(+En),Pn):ri},Pn}var F=W(p);function U(Ce){this._curve=Ce}U.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ce,pr){this._curve.point(pr*Math.sin(Ce),pr*-Math.cos(Ce))}};function W(Ce){function pr(Hr){return new U(Ce(Hr))}return pr._curve=Ce,pr}function q(Ce){var pr=Ce.curve;return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce.curve=function(Hr){return arguments.length?pr(W(Hr)):pr()._curve},Ce}function J(){return q(B().curve(F))}function lt(){var Ce=O().curve(F),pr=Ce.curve,Hr=Ce.lineX0,_n=Ce.lineX1,Bn=Ce.lineY0,ri=Ce.lineY1;return Ce.angle=Ce.x,delete Ce.x,Ce.startAngle=Ce.x0,delete Ce.x0,Ce.endAngle=Ce.x1,delete Ce.x1,Ce.radius=Ce.y,delete Ce.y,Ce.innerRadius=Ce.y0,delete Ce.y0,Ce.outerRadius=Ce.y1,delete Ce.y1,Ce.lineStartAngle=function(){return q(Hr())},delete Ce.lineX0,Ce.lineEndAngle=function(){return q(_n())},delete Ce.lineX1,Ce.lineInnerRadius=function(){return q(Bn())},delete Ce.lineY0,Ce.lineOuterRadius=function(){return q(ri())},delete Ce.lineY1,Ce.curve=function(Pn){return arguments.length?pr(W(Pn)):pr()._curve},Ce}function yt(Ce,pr){return[(pr=+pr)*Math.cos(Ce-=Math.PI/2),pr*Math.sin(Ce)]}var mt=Array.prototype.slice;function st(Ce){return Ce.source}function tt(Ce){return Ce.target}function pt(Ce){var pr=st,Hr=tt,_n=k,Bn=w,ri=null;function Pn(){var En,Yn=mt.call(arguments),La=pr.apply(this,Yn),qi=Hr.apply(this,Yn);if(ri||(ri=En=g.path()),Ce(ri,+_n.apply(this,(Yn[0]=La,Yn)),+Bn.apply(this,Yn),+_n.apply(this,(Yn[0]=qi,Yn)),+Bn.apply(this,Yn)),En)return ri=null,En+""||null}return Pn.source=function(En){return arguments.length?(pr=En,Pn):pr},Pn.target=function(En){return arguments.length?(Hr=En,Pn):Hr},Pn.x=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.y=function(En){return arguments.length?(Bn=typeof En=="function"?En:I(+En),Pn):Bn},Pn.context=function(En){return arguments.length?(ri=En??null,Pn):ri},Pn}function rt(Ce,pr,Hr,_n,Bn){Ce.moveTo(pr,Hr),Ce.bezierCurveTo(pr=(pr+_n)/2,Hr,pr,Bn,_n,Bn)}function at(Ce,pr,Hr,_n,Bn){Ce.moveTo(pr,Hr),Ce.bezierCurveTo(pr,Hr=(Hr+Bn)/2,_n,Hr,_n,Bn)}function vt(Ce,pr,Hr,_n,Bn){var ri=yt(pr,Hr),Pn=yt(pr,Hr=(Hr+Bn)/2),En=yt(_n,Hr),Yn=yt(_n,Bn);Ce.moveTo(ri[0],ri[1]),Ce.bezierCurveTo(Pn[0],Pn[1],En[0],En[1],Yn[0],Yn[1])}function it(){return pt(rt)}function K(){return pt(at)}function ft(){var Ce=pt(vt);return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce}var ut={draw:function(Ce,pr){var Hr=Math.sqrt(pr/l);Ce.moveTo(Hr,0),Ce.arc(0,0,Hr,0,x)}},kt={draw:function(Ce,pr){var Hr=Math.sqrt(pr/5)/2;Ce.moveTo(-3*Hr,-Hr),Ce.lineTo(-Hr,-Hr),Ce.lineTo(-Hr,-3*Hr),Ce.lineTo(Hr,-3*Hr),Ce.lineTo(Hr,-Hr),Ce.lineTo(3*Hr,-Hr),Ce.lineTo(3*Hr,Hr),Ce.lineTo(Hr,Hr),Ce.lineTo(Hr,3*Hr),Ce.lineTo(-Hr,3*Hr),Ce.lineTo(-Hr,Hr),Ce.lineTo(-3*Hr,Hr),Ce.closePath()}},It=Math.sqrt(1/3),Pt=It*2,qt={draw:function(Ce,pr){var Hr=Math.sqrt(pr/Pt),_n=Hr*It;Ce.moveTo(0,-Hr),Ce.lineTo(_n,0),Ce.lineTo(0,Hr),Ce.lineTo(-_n,0),Ce.closePath()}},Wt=.8908130915292852,Jt=Math.sin(l/10)/Math.sin(7*l/10),ge=Math.sin(x/10)*Jt,fe=-Math.cos(x/10)*Jt,pe={draw:function(Ce,pr){var Hr=Math.sqrt(pr*Wt),_n=ge*Hr,Bn=fe*Hr;Ce.moveTo(0,-Hr),Ce.lineTo(_n,Bn);for(var ri=1;ri<5;++ri){var Pn=x*ri/5,En=Math.cos(Pn),Yn=Math.sin(Pn);Ce.lineTo(Yn*Hr,-En*Hr),Ce.lineTo(En*_n-Yn*Bn,Yn*_n+En*Bn)}Ce.closePath()}},se={draw:function(Ce,pr){var Hr=Math.sqrt(pr),_n=-Hr/2;Ce.rect(_n,_n,Hr,Hr)}},Tt=Math.sqrt(3),Lt={draw:function(Ce,pr){var Hr=-Math.sqrt(pr/(Tt*3));Ce.moveTo(0,Hr*2),Ce.lineTo(-Tt*Hr,-Hr),Ce.lineTo(Tt*Hr,-Hr),Ce.closePath()}},Mt=-.5,ee=Math.sqrt(3)/2,ve=1/Math.sqrt(12),oe=(ve/2+1)*3,Ae={draw:function(Ce,pr){var Hr=Math.sqrt(pr/oe),_n=Hr/2,Bn=Hr*ve,ri=_n,Pn=Hr*ve+Hr,En=-ri,Yn=Pn;Ce.moveTo(_n,Bn),Ce.lineTo(ri,Pn),Ce.lineTo(En,Yn),Ce.lineTo(Mt*_n-ee*Bn,ee*_n+Mt*Bn),Ce.lineTo(Mt*ri-ee*Pn,ee*ri+Mt*Pn),Ce.lineTo(Mt*En-ee*Yn,ee*En+Mt*Yn),Ce.lineTo(Mt*_n+ee*Bn,Mt*Bn-ee*_n),Ce.lineTo(Mt*ri+ee*Pn,Mt*Pn-ee*ri),Ce.lineTo(Mt*En+ee*Yn,Mt*Yn-ee*En),Ce.closePath()}},He=[ut,kt,qt,se,pe,Lt,Ae];function Ge(){var Ce=I(ut),pr=I(64),Hr=null;function _n(){var Bn;if(Hr||(Hr=Bn=g.path()),Ce.apply(this,arguments).draw(Hr,+pr.apply(this,arguments)),Bn)return Hr=null,Bn+""||null}return _n.type=function(Bn){return arguments.length?(Ce=typeof Bn=="function"?Bn:I(Bn),_n):Ce},_n.size=function(Bn){return arguments.length?(pr=typeof Bn=="function"?Bn:I(+Bn),_n):pr},_n.context=function(Bn){return arguments.length?(Hr=Bn??null,_n):Hr},_n}function cr(){}function ur(Ce,pr,Hr){Ce._context.bezierCurveTo((2*Ce._x0+Ce._x1)/3,(2*Ce._y0+Ce._y1)/3,(Ce._x0+2*Ce._x1)/3,(Ce._y0+2*Ce._y1)/3,(Ce._x0+4*Ce._x1+pr)/6,(Ce._y0+4*Ce._y1+Hr)/6)}function jr(Ce){this._context=Ce}jr.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:ur(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(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,pr):this._context.moveTo(Ce,pr);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:ur(this,Ce,pr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=pr}};function qr(Ce){return new jr(Ce)}function br(Ce){this._context=Ce}br.prototype={areaStart:cr,areaEnd:cr,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(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1,this._x2=Ce,this._y2=pr;break;case 1:this._point=2,this._x3=Ce,this._y3=pr;break;case 2:this._point=3,this._x4=Ce,this._y4=pr,this._context.moveTo((this._x0+4*this._x1+Ce)/6,(this._y0+4*this._y1+pr)/6);break;default:ur(this,Ce,pr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=pr}};function Xr(Ce){return new br(Ce)}function nn(Ce){this._context=Ce}nn.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(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Hr=(this._x0+4*this._x1+Ce)/6,_n=(this._y0+4*this._y1+pr)/6;this._line?this._context.lineTo(Hr,_n):this._context.moveTo(Hr,_n);break;case 3:this._point=4;default:ur(this,Ce,pr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=pr}};function Le(Ce){return new nn(Ce)}function Gt(Ce,pr){this._basis=new jr(Ce),this._beta=pr}Gt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ce=this._x,pr=this._y,Hr=Ce.length-1;if(Hr>0)for(var _n=Ce[0],Bn=pr[0],ri=Ce[Hr]-_n,Pn=pr[Hr]-Bn,En=-1,Yn;++En<=Hr;)Yn=En/Hr,this._basis.point(this._beta*Ce[En]+(1-this._beta)*(_n+Yn*ri),this._beta*pr[En]+(1-this._beta)*(Bn+Yn*Pn));this._x=this._y=null,this._basis.lineEnd()},point:function(Ce,pr){this._x.push(+Ce),this._y.push(+pr)}};var ne=function Ce(pr){function Hr(_n){return pr===1?new jr(_n):new Gt(_n,pr)}return Hr.beta=function(_n){return Ce(+_n)},Hr}(.85);function Ct(Ce,pr,Hr){Ce._context.bezierCurveTo(Ce._x1+Ce._k*(Ce._x2-Ce._x0),Ce._y1+Ce._k*(Ce._y2-Ce._y0),Ce._x2+Ce._k*(Ce._x1-pr),Ce._y2+Ce._k*(Ce._y1-Hr),Ce._x2,Ce._y2)}function gt(Ce,pr){this._context=Ce,this._k=(1-pr)/6}gt.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:Ct(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,pr):this._context.moveTo(Ce,pr);break;case 1:this._point=2,this._x1=Ce,this._y1=pr;break;case 2:this._point=3;default:Ct(this,Ce,pr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var St=function Ce(pr){function Hr(_n){return new gt(_n,pr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Nt(Ce,pr){this._context=Ce,this._k=(1-pr)/6}Nt.prototype={areaStart:cr,areaEnd:cr,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(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1,this._x3=Ce,this._y3=pr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=pr);break;case 2:this._point=3,this._x5=Ce,this._y5=pr;break;default:Ct(this,Ce,pr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var re=function Ce(pr){function Hr(_n){return new Nt(_n,pr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function le(Ce,pr){this._context=Ce,this._k=(1-pr)/6}le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,Ce,pr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var ke=function Ce(pr){function Hr(_n){return new le(_n,pr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Ue(Ce,pr,Hr){var _n=Ce._x1,Bn=Ce._y1,ri=Ce._x2,Pn=Ce._y2;if(Ce._l01_a>i){var En=2*Ce._l01_2a+3*Ce._l01_a*Ce._l12_a+Ce._l12_2a,Yn=3*Ce._l01_a*(Ce._l01_a+Ce._l12_a);_n=(_n*En-Ce._x0*Ce._l12_2a+Ce._x2*Ce._l01_2a)/Yn,Bn=(Bn*En-Ce._y0*Ce._l12_2a+Ce._y2*Ce._l01_2a)/Yn}if(Ce._l23_a>i){var La=2*Ce._l23_2a+3*Ce._l23_a*Ce._l12_a+Ce._l12_2a,qi=3*Ce._l23_a*(Ce._l23_a+Ce._l12_a);ri=(ri*La+Ce._x1*Ce._l23_2a-pr*Ce._l12_2a)/qi,Pn=(Pn*La+Ce._y1*Ce._l23_2a-Hr*Ce._l12_2a)/qi}Ce._context.bezierCurveTo(_n,Bn,ri,Pn,Ce._x2,Ce._y2)}function qe(Ce,pr){this._context=Ce,this._alpha=pr}qe.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(Ce,pr){if(Ce=+Ce,pr=+pr,this._point){var Hr=this._x2-Ce,_n=this._y2-pr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,pr):this._context.moveTo(Ce,pr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ue(this,Ce,pr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var or=function Ce(pr){function Hr(_n){return pr?new qe(_n,pr):new gt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Sr(Ce,pr){this._context=Ce,this._alpha=pr}Sr.prototype={areaStart:cr,areaEnd:cr,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(Ce,pr){if(Ce=+Ce,pr=+pr,this._point){var Hr=this._x2-Ce,_n=this._y2-pr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ce,this._y3=pr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=pr);break;case 2:this._point=3,this._x5=Ce,this._y5=pr;break;default:Ue(this,Ce,pr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var Mr=function Ce(pr){function Hr(_n){return pr?new Sr(_n,pr):new Nt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function mr(Ce,pr){this._context=Ce,this._alpha=pr}mr.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(Ce,pr){if(Ce=+Ce,pr=+pr,this._point){var Hr=this._x2-Ce,_n=this._y2-pr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,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:Ue(this,Ce,pr);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=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=pr}};var Qr=function Ce(pr){function Hr(_n){return pr?new mr(_n,pr):new le(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Wn(Ce){this._context=Ce}Wn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ce,pr){Ce=+Ce,pr=+pr,this._point?this._context.lineTo(Ce,pr):(this._point=1,this._context.moveTo(Ce,pr))}};function qn(Ce){return new Wn(Ce)}function ei(Ce){return Ce<0?-1:1}function Di(Ce,pr,Hr){var _n=Ce._x1-Ce._x0,Bn=pr-Ce._x1,ri=(Ce._y1-Ce._y0)/(_n||Bn<0&&-0),Pn=(Hr-Ce._y1)/(Bn||_n<0&&-0),En=(ri*Bn+Pn*_n)/(_n+Bn);return(ei(ri)+ei(Pn))*Math.min(Math.abs(ri),Math.abs(Pn),.5*Math.abs(En))||0}function ui(Ce,pr){var Hr=Ce._x1-Ce._x0;return Hr?(3*(Ce._y1-Ce._y0)/Hr-pr)/2:pr}function Gn(Ce,pr,Hr){var _n=Ce._x0,Bn=Ce._y0,ri=Ce._x1,Pn=Ce._y1,En=(ri-_n)/3;Ce._context.bezierCurveTo(_n+En,Bn+En*pr,ri-En,Pn-En*Hr,ri,Pn)}function ua(Ce){this._context=Ce}ua.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:Gn(this,this._t0,ui(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,pr){var Hr=NaN;if(Ce=+Ce,pr=+pr,!(Ce===this._x1&&pr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,pr):this._context.moveTo(Ce,pr);break;case 1:this._point=2;break;case 2:this._point=3,Gn(this,ui(this,Hr=Di(this,Ce,pr)),Hr);break;default:Gn(this,this._t0,Hr=Di(this,Ce,pr));break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=pr,this._t0=Hr}}};function Yi(Ce){this._context=new We(Ce)}(Yi.prototype=Object.create(ua.prototype)).point=function(Ce,pr){ua.prototype.point.call(this,pr,Ce)};function We(Ce){this._context=Ce}We.prototype={moveTo:function(Ce,pr){this._context.moveTo(pr,Ce)},closePath:function(){this._context.closePath()},lineTo:function(Ce,pr){this._context.lineTo(pr,Ce)},bezierCurveTo:function(Ce,pr,Hr,_n,Bn,ri){this._context.bezierCurveTo(pr,Ce,_n,Hr,ri,Bn)}};function nr(Ce){return new ua(Ce)}function dr(Ce){return new Yi(Ce)}function _r(Ce){this._context=Ce}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ce=this._x,pr=this._y,Hr=Ce.length;if(Hr)if(this._line?this._context.lineTo(Ce[0],pr[0]):this._context.moveTo(Ce[0],pr[0]),Hr===2)this._context.lineTo(Ce[1],pr[1]);else for(var _n=tn(Ce),Bn=tn(pr),ri=0,Pn=1;Pn=0;--pr)Bn[pr]=(Pn[pr]-Bn[pr+1])/ri[pr];for(ri[Hr-1]=(Ce[Hr]+Bn[Hr-1])/2,pr=0;pr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ce,pr){switch(Ce=+Ce,pr=+pr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,pr):this._context.moveTo(Ce,pr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,pr),this._context.lineTo(Ce,pr);else{var Hr=this._x*(1-this._t)+Ce*this._t;this._context.lineTo(Hr,this._y),this._context.lineTo(Hr,pr)}break}}this._x=Ce,this._y=pr}};function Mn(Ce){return new Tn(Ce,.5)}function mi(Ce){return new Tn(Ce,0)}function Mi(Ce){return new Tn(Ce,1)}function Ni(Ce,pr){if((Pn=Ce.length)>1)for(var Hr=1,_n,Bn,ri=Ce[pr[0]],Pn,En=ri.length;Hr=0;)Hr[pr]=pr;return Hr}function Ji(Ce,pr){return Ce[pr]}function di(){var Ce=I([]),pr=Hi,Hr=Ni,_n=Ji;function Bn(ri){var Pn=Ce.apply(this,arguments),En,Yn=ri.length,La=Pn.length,qi=new Array(La),Qa;for(En=0;En0){for(var Hr,_n,Bn=0,ri=Ce[0].length,Pn;Bn0)for(var Hr,_n=0,Bn,ri,Pn,En,Yn,La=Ce[pr[0]].length;_n0?(Bn[0]=Pn,Bn[1]=Pn+=ri):ri<0?(Bn[1]=En,Bn[0]=En+=ri):(Bn[0]=0,Bn[1]=ri)}function Oe(Ce,pr){if((Bn=Ce.length)>0){for(var Hr=0,_n=Ce[pr[0]],Bn,ri=_n.length;Hr0)||!((ri=(Bn=Ce[pr[0]]).length)>0))){for(var Hr=0,_n=1,Bn,ri,Pn;_nri&&(ri=Bn,Hr=pr);return Hr}function Gr(Ce){var pr=Ce.map(Rr);return Hi(Ce).sort(function(Hr,_n){return pr[Hr]-pr[_n]})}function Rr(Ce){for(var pr=0,Hr=-1,_n=Ce.length,Bn;++Hr<_n;)(Bn=+Ce[Hr][1])&&(pr+=Bn);return pr}function Yr(Ce){return Gr(Ce).reverse()}function mn(Ce){var pr=Ce.length,Hr,_n,Bn=Ce.map(Rr),ri=Br(Ce),Pn=0,En=0,Yn=[],La=[];for(Hr=0;Hr{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,T3(),ST(),RE()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3)})(Q,function(c,g,I,S){function t(p){return p.target.depth}function e(p){return p.depth}function r(p,k){return k-1-p.height}function a(p,k){return p.sourceLinks.length?p.depth:k-1}function n(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?g.min(p.sourceLinks,t)-1:0}function o(p){return function(){return p}}function i(p,k){return f(p.source,k.source)||p.index-k.index}function l(p,k){return f(p.target,k.target)||p.index-k.index}function f(p,k){return p.y0-k.y0}function x(p){return p.value}function y(p){return(p.y0+p.y1)/2}function v(p){return y(p.source)*p.value}function T(p){return y(p.target)*p.value}function u(p){return p.index}function b(p){return p.nodes}function _(p){return p.links}function P(p,k){var w=p.get(k);if(!w)throw new Error("missing: "+k);return w}var M=function(){var p=0,k=0,w=1,B=1,O=24,j=8,V=u,H=a,F=b,U=_,W=32,q=2/3;function J(){var pt={nodes:F.apply(null,arguments),links:U.apply(null,arguments)};return lt(pt),yt(pt),mt(pt),st(pt),tt(pt),pt}J.update=function(pt){return tt(pt),pt},J.nodeId=function(pt){return arguments.length?(V=typeof pt=="function"?pt:o(pt),J):V},J.nodeAlign=function(pt){return arguments.length?(H=typeof pt=="function"?pt:o(pt),J):H},J.nodeWidth=function(pt){return arguments.length?(O=+pt,J):O},J.nodePadding=function(pt){return arguments.length?(j=+pt,J):j},J.nodes=function(pt){return arguments.length?(F=typeof pt=="function"?pt:o(pt),J):F},J.links=function(pt){return arguments.length?(U=typeof pt=="function"?pt:o(pt),J):U},J.size=function(pt){return arguments.length?(p=k=0,w=+pt[0],B=+pt[1],J):[w-p,B-k]},J.extent=function(pt){return arguments.length?(p=+pt[0][0],w=+pt[1][0],k=+pt[0][1],B=+pt[1][1],J):[[p,k],[w,B]]},J.iterations=function(pt){return arguments.length?(W=+pt,J):W};function lt(pt){pt.nodes.forEach(function(at,vt){at.index=vt,at.sourceLinks=[],at.targetLinks=[]});var rt=I.map(pt.nodes,V);pt.links.forEach(function(at,vt){at.index=vt;var it=at.source,K=at.target;typeof it!="object"&&(it=at.source=P(rt,it)),typeof K!="object"&&(K=at.target=P(rt,K)),it.sourceLinks.push(at),K.targetLinks.push(at)})}function yt(pt){pt.nodes.forEach(function(rt){rt.value=Math.max(g.sum(rt.sourceLinks,x),g.sum(rt.targetLinks,x))})}function mt(pt){var rt,at,vt;for(rt=pt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(K){K.depth=vt,K.sourceLinks.forEach(function(ft){at.indexOf(ft.target)<0&&at.push(ft.target)})});for(rt=pt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(K){K.height=vt,K.targetLinks.forEach(function(ft){at.indexOf(ft.source)<0&&at.push(ft.source)})});var it=(w-p-O)/(vt-1);pt.nodes.forEach(function(K){K.x1=(K.x0=p+Math.max(0,Math.min(vt-1,Math.floor(H.call(null,K,vt))))*it)+O})}function st(pt){var rt=I.nest().key(function(kt){return kt.x0}).sortKeys(g.ascending).entries(pt.nodes).map(function(kt){return kt.values});it(),ut();for(var at=1,vt=W;vt>0;--vt)ft(at*=.99),ut(),K(at),ut();function it(){var kt=g.max(rt,function(qt){return qt.length}),It=q*(B-k)/(kt-1);j>It&&(j=It);var Pt=g.min(rt,function(qt){return(B-k-(qt.length-1)*j)/g.sum(qt,x)});rt.forEach(function(qt){qt.forEach(function(Wt,Jt){Wt.y1=(Wt.y0=Jt)+Wt.value*Pt})}),pt.links.forEach(function(qt){qt.width=qt.value*Pt})}function K(kt){rt.forEach(function(It){It.forEach(function(Pt){if(Pt.targetLinks.length){var qt=(g.sum(Pt.targetLinks,v)/g.sum(Pt.targetLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ft(kt){rt.slice().reverse().forEach(function(It){It.forEach(function(Pt){if(Pt.sourceLinks.length){var qt=(g.sum(Pt.sourceLinks,T)/g.sum(Pt.sourceLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ut(){rt.forEach(function(kt){var It,Pt,qt=k,Wt=kt.length,Jt;for(kt.sort(f),Jt=0;Jt0&&(It.y0+=Pt,It.y1+=Pt),qt=It.y1+j;if(Pt=qt-j-B,Pt>0)for(qt=It.y0-=Pt,It.y1-=Pt,Jt=Wt-2;Jt>=0;--Jt)It=kt[Jt],Pt=It.y1+j-qt,Pt>0&&(It.y0-=Pt,It.y1-=Pt),qt=It.y0})}}function tt(pt){pt.nodes.forEach(function(rt){rt.sourceLinks.sort(l),rt.targetLinks.sort(i)}),pt.nodes.forEach(function(rt){var at=rt.y0,vt=at;rt.sourceLinks.forEach(function(it){it.y0=at+it.width/2,at+=it.width}),rt.targetLinks.forEach(function(it){it.y1=vt+it.width/2,vt+=it.width})})}return J};function C(p){return[p.source.x1,p.y0]}function A(p){return[p.target.x0,p.y1]}var h=function(){return S.linkHorizontal().source(C).target(A)};c.sankey=M,c.sankeyCenter=n,c.sankeyLeft=e,c.sankeyRight=r,c.sankeyJustify=a,c.sankeyLinkHorizontal=h,Object.defineProperty(c,"__esModule",{value:!0})})}),jq=Dt((Q,Z)=>{var c=BE();Z.exports=function(g,I){var S=[],t=[],e=[],r={},a=[],n;function o(_){e[_]=!1,r.hasOwnProperty(_)&&Object.keys(r[_]).forEach(function(P){delete r[_][P],e[P]&&o(P)})}function i(_){var P=!1;t.push(_),e[_]=!0;var M,C;for(M=0;M=_})}function x(_){f(_);for(var P=g,M=c(P),C=M.components.filter(function(O){return O.length>1}),A=1/0,h,p=0;p{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,T3(),ST(),RE(),jq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,null)})(Q,function(c,g,I,S,t){t=t&&t.hasOwnProperty("default")?t.default:t;function e(Wt){return Wt.target.depth}function r(Wt){return Wt.depth}function a(Wt,Jt){return Jt-1-Wt.height}function n(Wt,Jt){return Wt.sourceLinks.length?Wt.depth:Jt-1}function o(Wt){return Wt.targetLinks.length?Wt.depth:Wt.sourceLinks.length?g.min(Wt.sourceLinks,e)-1:0}function i(Wt){return function(){return Wt}}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Wt){return typeof Wt}:function(Wt){return Wt&&typeof Symbol=="function"&&Wt.constructor===Symbol&&Wt!==Symbol.prototype?"symbol":typeof Wt};function f(Wt,Jt){return y(Wt.source,Jt.source)||Wt.index-Jt.index}function x(Wt,Jt){return y(Wt.target,Jt.target)||Wt.index-Jt.index}function y(Wt,Jt){return Wt.partOfCycle===Jt.partOfCycle?Wt.y0-Jt.y0:Wt.circularLinkType==="top"||Jt.circularLinkType==="bottom"?-1:1}function v(Wt){return Wt.value}function T(Wt){return(Wt.y0+Wt.y1)/2}function u(Wt){return T(Wt.source)}function b(Wt){return T(Wt.target)}function _(Wt){return Wt.index}function P(Wt){return Wt.nodes}function M(Wt){return Wt.links}function C(Wt,Jt){var ge=Wt.get(Jt);if(!ge)throw new Error("missing: "+Jt);return ge}function A(Wt,Jt){return Jt(Wt)}var h=25,p=10,k=.3;function w(){var Wt=0,Jt=0,ge=1,fe=1,pe=24,se,Tt=_,Lt=n,Mt=P,ee=M,ve=32,oe=2,Ae,He=null;function Ge(){var Le={nodes:Mt.apply(null,arguments),links:ee.apply(null,arguments)};cr(Le),B(Le,Tt,He),ur(Le),br(Le),O(Le,Tt),Xr(Le,ve,Tt),nn(Le);for(var Gt=4,ne=0;ne"u"?"undefined":l(gt))!=="object"&&(gt=ne.source=C(Gt,gt)),(typeof St>"u"?"undefined":l(St))!=="object"&&(St=ne.target=C(Gt,St)),gt.sourceLinks.push(ne),St.targetLinks.push(ne)}),Le}function ur(Le){Le.nodes.forEach(function(Gt){Gt.partOfCycle=!1,Gt.value=Math.max(g.sum(Gt.sourceLinks,v),g.sum(Gt.targetLinks,v)),Gt.sourceLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)}),Gt.targetLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)})})}function jr(Le){var Gt=0,ne=0,Ct=0,gt=0,St=g.max(Le.nodes,function(Nt){return Nt.column});return Le.links.forEach(function(Nt){Nt.circular&&(Nt.circularLinkType=="top"?Gt=Gt+Nt.width:ne=ne+Nt.width,Nt.target.column==0&&(gt=gt+Nt.width),Nt.source.column==St&&(Ct=Ct+Nt.width))}),Gt=Gt>0?Gt+h+p:Gt,ne=ne>0?ne+h+p:ne,Ct=Ct>0?Ct+h+p:Ct,gt=gt>0?gt+h+p:gt,{top:Gt,bottom:ne,left:gt,right:Ct}}function qr(Le,Gt){var ne=g.max(Le.nodes,function(ke){return ke.column}),Ct=ge-Wt,gt=fe-Jt,St=Ct+Gt.right+Gt.left,Nt=gt+Gt.top+Gt.bottom,re=Ct/St,le=gt/Nt;return Wt=Wt*re+Gt.left,ge=Gt.right==0?ge:ge*re,Jt=Jt*le+Gt.top,fe=fe*le,Le.nodes.forEach(function(ke){ke.x0=Wt+ke.column*((ge-Wt-pe)/ne),ke.x1=ke.x0+pe}),le}function br(Le){var Gt,ne,Ct;for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.depth=Ct,gt.sourceLinks.forEach(function(St){ne.indexOf(St.target)<0&&!St.circular&&ne.push(St.target)})});for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.height=Ct,gt.targetLinks.forEach(function(St){ne.indexOf(St.source)<0&&!St.circular&&ne.push(St.source)})});Le.nodes.forEach(function(gt){gt.column=Math.floor(Lt.call(null,gt,Ct))})}function Xr(Le,Gt,ne){var Ct=I.nest().key(function(ke){return ke.column}).sortKeys(g.ascending).entries(Le.nodes).map(function(ke){return ke.values});Nt(ne),le();for(var gt=1,St=Gt;St>0;--St)re(gt*=.99,ne),le();function Nt(ke){if(Ae){var Ue=1/0;Ct.forEach(function(Mr){var mr=fe*Ae/(Mr.length+1);Ue=mr0))if(Mr==0&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else if(Mr==qe-1&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else{var Wn=0,qn=g.mean(mr.sourceLinks,b),ei=g.mean(mr.targetLinks,u);qn&&ei?Wn=(qn+ei)/2:Wn=qn||ei;var Di=(Wn-T(mr))*ke;mr.y0+=Di,mr.y1+=Di}})})}function le(){Ct.forEach(function(ke){var Ue,qe,or=Jt,Sr=ke.length,Mr;for(ke.sort(y),Mr=0;Mr0&&(Ue.y0+=qe,Ue.y1+=qe),or=Ue.y1+se;if(qe=or-se-fe,qe>0)for(or=Ue.y0-=qe,Ue.y1-=qe,Mr=Sr-2;Mr>=0;--Mr)Ue=ke[Mr],qe=Ue.y1+se-or,qe>0&&(Ue.y0-=qe,Ue.y1-=qe),or=Ue.y0})}}function nn(Le){Le.nodes.forEach(function(Gt){Gt.sourceLinks.sort(x),Gt.targetLinks.sort(f)}),Le.nodes.forEach(function(Gt){var ne=Gt.y0,Ct=ne,gt=Gt.y1,St=gt;Gt.sourceLinks.forEach(function(Nt){Nt.circular?(Nt.y0=gt-Nt.width/2,gt=gt-Nt.width):(Nt.y0=ne+Nt.width/2,ne+=Nt.width)}),Gt.targetLinks.forEach(function(Nt){Nt.circular?(Nt.y1=St-Nt.width/2,St=St-Nt.width):(Nt.y1=Ct+Nt.width/2,Ct+=Nt.width)})})}return Ge}function B(Wt,Jt,ge){var fe=0;if(ge===null){for(var pe=[],se=0;seJt.source.column)}function H(Wt,Jt){var ge=0;Wt.sourceLinks.forEach(function(pe){ge=pe.circular&&!Pt(pe,Jt)?ge+1:ge});var fe=0;return Wt.targetLinks.forEach(function(pe){fe=pe.circular&&!Pt(pe,Jt)?fe+1:fe}),ge+fe}function F(Wt){var Jt=Wt.source.sourceLinks,ge=0;Jt.forEach(function(se){ge=se.circular?ge+1:ge});var fe=Wt.target.targetLinks,pe=0;return fe.forEach(function(se){pe=se.circular?pe+1:pe}),!(ge>1||pe>1)}function U(Wt,Jt,ge){return Wt.sort(J),Wt.forEach(function(fe,pe){var se=0;if(Pt(fe,ge)&&F(fe))fe.circularPathData.verticalBuffer=se+fe.width/2;else{var Tt=0;for(Tt;Ttse?Lt:se}fe.circularPathData.verticalBuffer=se+fe.width/2}}),Wt}function W(Wt,Jt,ge,fe){var pe=5,se=g.min(Wt.links,function(Mt){return Mt.source.y0});Wt.links.forEach(function(Mt){Mt.circular&&(Mt.circularPathData={})});var Tt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="top"});U(Tt,Jt,fe);var Lt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="bottom"});U(Lt,Jt,fe),Wt.links.forEach(function(Mt){if(Mt.circular){if(Mt.circularPathData.arcRadius=Mt.width+p,Mt.circularPathData.leftNodeBuffer=pe,Mt.circularPathData.rightNodeBuffer=pe,Mt.circularPathData.sourceWidth=Mt.source.x1-Mt.source.x0,Mt.circularPathData.sourceX=Mt.source.x0+Mt.circularPathData.sourceWidth,Mt.circularPathData.targetX=Mt.target.x0,Mt.circularPathData.sourceY=Mt.y0,Mt.circularPathData.targetY=Mt.y1,Pt(Mt,fe)&&F(Mt))Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2,Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2,Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Mt.source.y1+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=Mt.source.y0-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius);else{var ee=Mt.source.column,ve=Mt.circularLinkType,oe=Wt.links.filter(function(Ge){return Ge.source.column==ee&&Ge.circularLinkType==ve});Mt.circularLinkType=="bottom"?oe.sort(yt):oe.sort(lt);var Ae=0;oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2+Ae,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2+cr*Jt+Ae),Ae=Ae+Ge.width}),ee=Mt.target.column,oe=Wt.links.filter(function(Ge){return Ge.target.column==ee&&Ge.circularLinkType==ve}),Mt.circularLinkType=="bottom"?oe.sort(st):oe.sort(mt),Ae=0,oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2+Ae,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2+cr*Jt+Ae),Ae=Ae+Ge.width}),Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Math.max(ge,Mt.source.y1,Mt.target.y1)+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=se-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius)}Mt.circularPathData.leftInnerExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightInnerExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightNodeBuffer,Mt.circularPathData.leftFullExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftLargeArcRadius+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightFullExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightLargeArcRadius-Mt.circularPathData.rightNodeBuffer}if(Mt.circular)Mt.path=q(Mt);else{var He=S.linkHorizontal().source(function(Ge){var cr=Ge.source.x0+(Ge.source.x1-Ge.source.x0),ur=Ge.y0;return[cr,ur]}).target(function(Ge){var cr=Ge.target.x0,ur=Ge.y1;return[cr,ur]});Mt.path=He(Mt)}})}function q(Wt){var Jt="";return Wt.circularLinkType=="top"?Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY-Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY-Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY:Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY+Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY+Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY,Jt}function J(Wt,Jt){return tt(Wt)==tt(Jt)?Wt.circularLinkType=="bottom"?yt(Wt,Jt):lt(Wt,Jt):tt(Jt)-tt(Wt)}function lt(Wt,Jt){return Wt.y0-Jt.y0}function yt(Wt,Jt){return Jt.y0-Wt.y0}function mt(Wt,Jt){return Wt.y1-Jt.y1}function st(Wt,Jt){return Jt.y1-Wt.y1}function tt(Wt){return Wt.target.column-Wt.source.column}function pt(Wt){return Wt.target.x0-Wt.source.x1}function rt(Wt,Jt){var ge=j(Wt),fe=pt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1+fe:Wt.y1-fe;return pe}function at(Wt,Jt){var ge=j(Wt),fe=pt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1-fe:Wt.y1+fe;return pe}function vt(Wt,Jt,ge,fe){Wt.links.forEach(function(pe){if(!pe.circular&&pe.target.column-pe.source.column>1){var se=pe.source.column+1,Tt=pe.target.column-1,Lt=1,Mt=Tt-se+1;for(Lt=1;se<=Tt;se++,Lt++)Wt.nodes.forEach(function(ee){if(ee.column==se){var ve=Lt/(Mt+1),oe=Math.pow(1-ve,3),Ae=3*ve*Math.pow(1-ve,2),He=3*Math.pow(ve,2)*(1-ve),Ge=Math.pow(ve,3),cr=oe*pe.y0+Ae*pe.y0+He*pe.y1+Ge*pe.y1,ur=cr-pe.width/2,jr=cr+pe.width/2,qr;ur>ee.y0&&uree.y0&&jree.y1&&K(br,qr,Jt,ge)})):uree.y1&&(qr=jr-ee.y0+10,ee=K(ee,qr,Jt,ge),Wt.nodes.forEach(function(br){A(br,fe)==A(ee,fe)||br.column!=ee.column||br.y0ee.y1&&K(br,qr,Jt,ge)}))}})}})}function it(Wt,Jt){return Wt.y0>Jt.y0&&Wt.y0Jt.y0&&Wt.y1Jt.y1}function K(Wt,Jt,ge,fe){return Wt.y0+Jt>=ge&&Wt.y1+Jt<=fe&&(Wt.y0=Wt.y0+Jt,Wt.y1=Wt.y1+Jt,Wt.targetLinks.forEach(function(pe){pe.y1=pe.y1+Jt}),Wt.sourceLinks.forEach(function(pe){pe.y0=pe.y0+Jt})),Wt}function ft(Wt,Jt,ge,fe){Wt.nodes.forEach(function(pe){fe&&pe.y+(pe.y1-pe.y0)>Jt&&(pe.y=pe.y-(pe.y+(pe.y1-pe.y0)-Jt));var se=Wt.links.filter(function(Mt){return A(Mt.source,ge)==A(pe,ge)}),Tt=se.length;Tt>1&&se.sort(function(Mt,ee){if(!Mt.circular&&!ee.circular){if(Mt.target.column==ee.target.column)return Mt.y1-ee.y1;if(kt(Mt,ee)){if(Mt.target.column>ee.target.column){var ve=at(ee,Mt);return Mt.y1-ve}if(ee.target.column>Mt.target.column){var oe=at(Mt,ee);return oe-ee.y1}}else return Mt.y1-ee.y1}if(Mt.circular&&!ee.circular)return Mt.circularLinkType=="top"?-1:1;if(ee.circular&&!Mt.circular)return ee.circularLinkType=="top"?1:-1;if(Mt.circular&&ee.circular)return Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="top"?Mt.target.column===ee.target.column?Mt.target.y1-ee.target.y1:ee.target.column-Mt.target.column:Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="bottom"?Mt.target.column===ee.target.column?ee.target.y1-Mt.target.y1:Mt.target.column-ee.target.column:Mt.circularLinkType=="top"?-1:1});var Lt=pe.y0;se.forEach(function(Mt){Mt.y0=Lt+Mt.width/2,Lt=Lt+Mt.width}),se.forEach(function(Mt,ee){if(Mt.circularLinkType=="bottom"){var ve=ee+1,oe=0;for(ve;ve1&&pe.sort(function(Lt,Mt){if(!Lt.circular&&!Mt.circular){if(Lt.source.column==Mt.source.column)return Lt.y0-Mt.y0;if(kt(Lt,Mt)){if(Mt.source.column0?"up":"down"}function Pt(Wt,Jt){return A(Wt.source,Jt)==A(Wt.target,Jt)}function qt(Wt,Jt,ge){var fe=Wt.nodes,pe=Wt.links,se=!1,Tt=!1;if(pe.forEach(function(Ae){Ae.circularLinkType=="top"?se=!0:Ae.circularLinkType=="bottom"&&(Tt=!0)}),se==!1||Tt==!1){var Lt=g.min(fe,function(Ae){return Ae.y0}),Mt=g.max(fe,function(Ae){return Ae.y1}),ee=Mt-Lt,ve=ge-Jt,oe=ve/ee;fe.forEach(function(Ae){var He=(Ae.y1-Ae.y0)*oe;Ae.y0=(Ae.y0-Lt)*oe,Ae.y1=Ae.y0+He}),pe.forEach(function(Ae){Ae.y0=(Ae.y0-Lt)*oe,Ae.y1=(Ae.y1-Lt)*oe,Ae.width=Ae.width*oe})}}c.sankeyCircular=w,c.sankeyCenter=o,c.sankeyLeft=r,c.sankeyRight=a,c.sankeyJustify=n,Object.defineProperty(c,"__esModule",{value:!0})})}),NE=Dt((Q,Z)=>{Z.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"}}}),Vq=Dt((Q,Z)=>{var c=Bq(),g=(vx(),ii(V1)).interpolateNumber,I=Wr(),S=Nq(),t=Uq(),e=NE(),r=ro(),a=pi(),n=Vs(),o=kn(),i=o.strTranslate,l=o.strRotate,f=Og(),x=f.keyFun,y=f.repeat,v=f.unwrap,T=ec(),u=Qo(),b=Af(),_=b.CAP_SHIFT,P=b.LINE_SPACING,M=3;function C(rt,at,vt){var it=v(at),K=it.trace,ft=K.domain,ut=K.orientation==="h",kt=K.node.pad,It=K.node.thickness,Pt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[K.node.align],qt=rt.width*(ft.x[1]-ft.x[0]),Wt=rt.height*(ft.y[1]-ft.y[0]),Jt=it._nodes,ge=it._links,fe=it.circular,pe;fe?pe=t.sankeyCircular().circularLinkGap(0):pe=S.sankey(),pe.iterations(e.sankeyIterations).size(ut?[qt,Wt]:[Wt,qt]).nodeWidth(It).nodePadding(kt).nodeId(function(br){return br.pointNumber}).nodeAlign(Pt).nodes(Jt).links(ge);var se=pe();pe.nodePadding()=Gt||(Le=Gt-nn.y0,Le>1e-6&&(nn.y0+=Le,nn.y1+=Le)),Gt=nn.y1+kt})}function cr(br){var Xr=br.map(function(St,Nt){return{x0:St.x0,index:Nt}}).sort(function(St,Nt){return St.x0-Nt.x0}),nn=[],Le=-1,Gt,ne=-1/0,Ct;for(Tt=0;Ttne+It&&(Le+=1,Gt=gt.x0),ne=gt.x0,nn[Le]||(nn[Le]=[]),nn[Le].push(gt),Ct=Gt-gt.x0,gt.x0+=Ct,gt.x1+=Ct}return nn}if(K.node.x.length&&K.node.y.length){for(Tt=0;Tt0?" L "+K.targetX+" "+K.targetY:"")+"Z"):(vt="M "+(K.targetX-at)+" "+(K.targetY-it)+" L "+(K.rightInnerExtent-at)+" "+(K.targetY-it)+" A "+(K.rightLargeArcRadius+it)+" "+(K.rightSmallArcRadius+it)+" 0 0 0 "+(K.rightFullExtent-it-at)+" "+(K.targetY+K.rightSmallArcRadius)+" L "+(K.rightFullExtent-it-at)+" "+K.verticalRightInnerExtent,ft&&ut?vt+=" A "+(K.rightLargeArcRadius+it)+" "+(K.rightLargeArcRadius+it)+" 0 0 0 "+(K.rightInnerExtent-it-at)+" "+(K.verticalFullExtent+it)+" L "+(K.rightFullExtent+it-at-(K.rightLargeArcRadius-it))+" "+(K.verticalFullExtent+it)+" A "+(K.rightLargeArcRadius+it)+" "+(K.rightLargeArcRadius+it)+" 0 0 0 "+(K.leftFullExtent+it)+" "+K.verticalLeftInnerExtent:ft?vt+=" A "+(K.rightLargeArcRadius-it)+" "+(K.rightSmallArcRadius-it)+" 0 0 1 "+(K.rightFullExtent-at-it-(K.rightLargeArcRadius-it))+" "+(K.verticalFullExtent-it)+" L "+(K.leftFullExtent+it+(K.rightLargeArcRadius-it))+" "+(K.verticalFullExtent-it)+" A "+(K.rightLargeArcRadius-it)+" "+(K.rightSmallArcRadius-it)+" 0 0 1 "+(K.leftFullExtent+it)+" "+K.verticalLeftInnerExtent:vt+=" A "+(K.rightLargeArcRadius+it)+" "+(K.rightLargeArcRadius+it)+" 0 0 0 "+(K.rightInnerExtent-at)+" "+(K.verticalFullExtent+it)+" L "+K.leftInnerExtent+" "+(K.verticalFullExtent+it)+" A "+(K.leftLargeArcRadius+it)+" "+(K.leftLargeArcRadius+it)+" 0 0 0 "+(K.leftFullExtent+it)+" "+K.verticalLeftInnerExtent,vt+=" L "+(K.leftFullExtent+it)+" "+(K.sourceY+K.leftSmallArcRadius)+" A "+(K.leftLargeArcRadius+it)+" "+(K.leftSmallArcRadius+it)+" 0 0 0 "+K.leftInnerExtent+" "+(K.sourceY-it)+" L "+K.sourceX+" "+(K.sourceY-it)+" L "+K.sourceX+" "+(K.sourceY+it)+" L "+K.leftInnerExtent+" "+(K.sourceY+it)+" A "+(K.leftLargeArcRadius-it)+" "+(K.leftSmallArcRadius-it)+" 0 0 1 "+(K.leftFullExtent-it)+" "+(K.sourceY+K.leftSmallArcRadius)+" L "+(K.leftFullExtent-it)+" "+K.verticalLeftInnerExtent,ft&&ut?vt+=" A "+(K.rightLargeArcRadius-it)+" "+(K.rightSmallArcRadius-it)+" 0 0 1 "+(K.leftFullExtent-it-(K.rightLargeArcRadius-it))+" "+(K.verticalFullExtent-it)+" L "+(K.rightFullExtent+it-at+(K.rightLargeArcRadius-it))+" "+(K.verticalFullExtent-it)+" A "+(K.rightLargeArcRadius-it)+" "+(K.rightSmallArcRadius-it)+" 0 0 1 "+(K.rightFullExtent+it-at)+" "+K.verticalRightInnerExtent:ft?vt+=" A "+(K.rightLargeArcRadius+it)+" "+(K.rightLargeArcRadius+it)+" 0 0 0 "+(K.leftFullExtent+it)+" "+(K.verticalFullExtent+it)+" L "+(K.rightFullExtent-at-it)+" "+(K.verticalFullExtent+it)+" A "+(K.rightLargeArcRadius+it)+" "+(K.rightLargeArcRadius+it)+" 0 0 0 "+(K.rightFullExtent+it-at)+" "+K.verticalRightInnerExtent:vt+=" A "+(K.leftLargeArcRadius-it)+" "+(K.leftLargeArcRadius-it)+" 0 0 1 "+K.leftInnerExtent+" "+(K.verticalFullExtent-it)+" L "+(K.rightInnerExtent-at)+" "+(K.verticalFullExtent-it)+" A "+(K.rightLargeArcRadius-it)+" "+(K.rightLargeArcRadius-it)+" 0 0 1 "+(K.rightFullExtent+it-at)+" "+K.verticalRightInnerExtent,vt+=" L "+(K.rightFullExtent+it-at)+" "+(K.targetY+K.rightSmallArcRadius)+" A "+(K.rightLargeArcRadius-it)+" "+(K.rightSmallArcRadius-it)+" 0 0 1 "+(K.rightInnerExtent-at)+" "+(K.targetY+it)+" L "+(K.targetX-at)+" "+(K.targetY+it)+(at>0?" L "+K.targetX+" "+K.targetY:"")+"Z"),vt}function p(){var rt=.5;function at(vt){var it=vt.linkArrowLength;if(vt.link.circular)return h(vt.link,it);var K=Math.abs((vt.link.target.x0-vt.link.source.x1)/2);it>K&&(it=K);var ft=vt.link.source.x1,ut=vt.link.target.x0-it,kt=g(ft,ut),It=kt(rt),Pt=kt(1-rt),qt=vt.link.y0-vt.link.width/2,Wt=vt.link.y0+vt.link.width/2,Jt=vt.link.y1-vt.link.width/2,ge=vt.link.y1+vt.link.width/2,fe="M"+ft+","+qt,pe="C"+It+","+qt+" "+Pt+","+Jt+" "+ut+","+Jt,se="C"+Pt+","+ge+" "+It+","+Wt+" "+ft+","+Wt,Tt=it>0?"L"+(ut+it)+","+(Jt+vt.link.width/2):"";return Tt+="L"+ut+","+ge,fe+pe+Tt+se+"Z"}return at}function k(rt,at){var vt=r(at.color),it=e.nodePadAcross,K=rt.nodePad/2;at.dx=at.x1-at.x0,at.dy=at.y1-at.y0;var ft=at.dx,ut=Math.max(.5,at.dy),kt="node_"+at.pointNumber;return at.group&&(kt=o.randstr()),at.trace=rt.trace,at.curveNumber=rt.trace.index,{index:at.pointNumber,key:kt,partOfGroup:at.partOfGroup||!1,group:at.group,traceId:rt.key,trace:rt.trace,node:at,nodePad:rt.nodePad,nodeLineColor:rt.nodeLineColor,nodeLineWidth:rt.nodeLineWidth,textFont:rt.textFont,size:rt.horizontal?rt.height:rt.width,visibleWidth:Math.ceil(ft),visibleHeight:ut,zoneX:-it,zoneY:-K,zoneWidth:ft+2*it,zoneHeight:ut+2*K,labelY:rt.horizontal?at.dy/2+1:at.dx/2+1,left:at.originalLayer===1,sizeAcross:rt.width,forceLayouts:rt.forceLayouts,horizontal:rt.horizontal,darkBackground:vt.getBrightness()<=128,tinyColorHue:a.tinyRGB(vt),tinyColorAlpha:vt.getAlpha(),valueFormat:rt.valueFormat,valueSuffix:rt.valueSuffix,sankey:rt.sankey,graph:rt.graph,arrangement:rt.arrangement,uniqueNodeLabelPathId:[rt.guid,rt.key,kt].join("_"),interactionState:rt.interactionState,figure:rt}}function w(rt){rt.attr("transform",function(at){return i(at.node.x0.toFixed(3),at.node.y0.toFixed(3))})}function B(rt){rt.call(w)}function O(rt,at){rt.call(B),at.attr("d",p())}function j(rt){rt.attr("width",function(at){return at.node.x1-at.node.x0}).attr("height",function(at){return at.visibleHeight})}function V(rt){return rt.link.width>1||rt.linkLineWidth>0}function H(rt){var at=i(rt.translateX,rt.translateY);return at+(rt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(rt,at,vt){rt.on(".basic",null).on("mouseover.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.hover(this,it,at),it.interactionState.hovered=[this,it])}).on("mousemove.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.follow(this,it),it.interactionState.hovered=[this,it])}).on("mouseout.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.unhover(this,it,at),it.interactionState.hovered=!1)}).on("click.basic",function(it){it.interactionState.hovered&&(vt.unhover(this,it,at),it.interactionState.hovered=!1),!it.interactionState.dragInProgress&&!it.partOfGroup&&vt.select(this,it,at)})}function U(rt,at,vt,it){var K=I.behavior.drag().origin(function(ft){return{x:ft.node.x0+ft.visibleWidth/2,y:ft.node.y0+ft.visibleHeight/2}}).on("dragstart",function(ft){if(ft.arrangement!=="fixed"&&(o.ensureSingle(it._fullLayout._infolayer,"g","dragcover",function(kt){it._fullLayout._dragCover=kt}),o.raiseToTop(this),ft.interactionState.dragInProgress=ft.node,mt(ft.node),ft.interactionState.hovered&&(vt.nodeEvents.unhover.apply(0,ft.interactionState.hovered),ft.interactionState.hovered=!1),ft.arrangement==="snap")){var ut=ft.traceId+"|"+ft.key;ft.forceLayouts[ut]?ft.forceLayouts[ut].alpha(1):W(rt,ut,ft),q(rt,at,ft,ut,it)}}).on("drag",function(ft){if(ft.arrangement!=="fixed"){var ut=I.event.x,kt=I.event.y;ft.arrangement==="snap"?(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2,ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2):(ft.arrangement==="freeform"&&(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2),kt=Math.max(0,Math.min(ft.size-ft.visibleHeight/2,kt)),ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2),mt(ft.node),ft.arrangement!=="snap"&&(ft.sankey.update(ft.graph),O(rt.filter(st(ft)),at))}}).on("dragend",function(ft){if(ft.arrangement!=="fixed"){ft.interactionState.dragInProgress=!1;for(var ut=0;ut0)window.requestAnimationFrame(ft);else{var It=vt.node.originalX;vt.node.x0=It-vt.visibleWidth/2,vt.node.x1=It+vt.visibleWidth/2,lt(vt,K)}})}function J(rt,at,vt,it){return function(){for(var K=0,ft=0;ft0&&it.forceLayouts[at].alpha(0)}}function lt(rt,at){for(var vt=[],it=[],K=0;K{var c=Wr(),g=kn(),I=g.numberFormat,S=Vq(),t=tf(),e=pi(),r=NE().cn,a=g._;function n(_){return _!==""}function o(_,P){return _.filter(function(M){return M.key===P.traceId})}function i(_,P){c.select(_).select("path").style("fill-opacity",P),c.select(_).select("rect").style("fill-opacity",P)}function l(_){c.select(_).select("text.name").style("fill","black")}function f(_){return function(P){return _.node.sourceLinks.indexOf(P.link)!==-1||_.node.targetLinks.indexOf(P.link)!==-1}}function x(_){return function(P){return P.node.sourceLinks.indexOf(_.link)!==-1||P.node.targetLinks.indexOf(_.link)!==-1}}function y(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(T.bind(0,P,M,!1))}function v(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(u.bind(0,P,M,!1))}function T(_,P,M,C){C.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha})}),M&&o(P,_).selectAll("."+r.sankeyNode).filter(x(_)).call(y)}function u(_,P,M,C){C.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha})}),M&&o(P,_).selectAll(r.sankeyNode).filter(x(_)).call(v)}function b(_,P){var M=_.hoverlabel||{},C=g.nestedProperty(M,P).get();return Array.isArray(C)?!1:C}Z.exports=function(_,P){for(var M=_._fullLayout,C=M._paper,A=M._size,h=0;h<_._fullData.length;h++)if(_._fullData[h].visible&&_._fullData[h].type===r.sankey&&!_._fullData[h]._viewInitial){var p=_._fullData[h].node;_._fullData[h]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var k=function(yt,mt){var st=mt.link;st.originalEvent=c.event,_._hoverdata=[st],t.click(_,{target:!0})},w=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(T.bind(0,mt,st,!0)),mt.link.trace.link.hoverinfo!=="skip"&&(mt.link.fullData=mt.link.trace,_.emit("plotly_hover",{event:c.event,points:[mt.link]})))},B=a(_,"source:")+" ",O=a(_,"target:")+" ",j=a(_,"concentration:")+" ",V=a(_,"incoming flow count:")+" ",H=a(_,"outgoing flow count:")+" ",F=function(yt,mt){if(_._fullLayout.hovermode===!1)return;var st=mt.link.trace.link;if(st.hoverinfo==="none"||st.hoverinfo==="skip")return;var tt=[];function pt(ut){var kt,It;ut.circular?(kt=(ut.circularPathData.leftInnerExtent+ut.circularPathData.rightInnerExtent)/2,It=ut.circularPathData.verticalFullExtent):(kt=(ut.source.x1+ut.target.x0)/2,It=(ut.y0+ut.y1)/2);var Pt=[kt,It];return ut.trace.orientation==="v"&&Pt.reverse(),Pt[0]+=mt.parent.translateX,Pt[1]+=mt.parent.translateY,Pt}for(var rt=0,at=0;at"),color:b(st,"bgcolor")||e.addOpacity(vt.color,1),borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:c.event.x"),color:b(st,"bgcolor")||mt.tinyColorHue,borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:"left",hovertemplate:st.hovertemplate,hovertemplateLabels:K,eventData:[mt.node]},{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:_});i(kt,.85),l(kt)}}},lt=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(v,mt,st),mt.node.trace.node.hoverinfo!=="skip"&&(mt.node.fullData=mt.node.trace,_.emit("plotly_unhover",{event:c.event,points:[mt.node]})),t.loneUnhover(M._hoverlayer.node()))};S(_,C,P,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{linkEvents:{hover:w,follow:F,unhover:U,select:k},nodeEvents:{hover:q,follow:J,unhover:lt,select:W}})}}),Hq=Dt(Q=>{var Z=Yc().overrideAll,c=ud().getModuleCalcData,g=jE(),I=po(),S=I0(),t=cp(),e=vf().prepSelect,r=kn(),a=Qo(),n="sankey";Q.name=n,Q.baseLayoutAttrOverrides=Z({hoverlabel:I.hoverlabel},"plot","nested"),Q.plot=function(i){var l=c(i.calcdata,n)[0];g(i,l),Q.updateFx(i)},Q.clean=function(i,l,f,x){var y=x._has&&x._has(n),v=l._has&&l._has(n);y&&!v&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},Q.updateFx=function(i){for(var l=0;l{Z.exports=function(c,g){for(var I=c.cd,S=[],t=I[0].trace,e=t._sankey.graph.nodes,r=0;r{Z.exports={attributes:FE(),supplyDefaults:Iq(),calc:zq(),plot:jE(),moduleType:"trace",name:"sankey",basePlotModule:Hq(),selectPoints:Wq(),categories:["noOpacity"],meta:{}}}),$q=Dt((Q,Z)=>{Z.exports=qq()}),Zq=Dt(Q=>{var Z=Kc();Q.name="indicator",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),UE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Ia().extendDeep,I=Yc().overrideAll,S=ma(),t=Ai(),e=Uh().attributes,r=Td(),a=mu().templatedArray,n=nb(),o=ph().descriptionOnlyNumbers,i=S({editType:"plot",colorEditType:"plot"}),l={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.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"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=a("step",g({},l,{range:f}));Z.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:e({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:c({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:o("value")},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:o("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},l,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:I({range:f,visible:c({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:c({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:S({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:c({},l.line.color,{}),width:c({},l.line.width,{dflt:1}),editType:"plot"},thickness:c({},l.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}),VE=Dt((Q,Z)=>{Z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}),Gq=Dt((Q,Z)=>{var c=kn(),g=UE(),I=Uh().defaults,S=mu(),t=Ad(),e=VE(),r=xg(),a=_g(),n=n0(),o=dm();function i(f,x,y,v){function T(U,W){return c.coerce(f,x,g,U,W)}I(x,v,T),T("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var u=T("value");x._range=[0,typeof u=="number"?1.5*u:1];var b=new Array(2),_;if(x._hasNumber){T("number.valueformat");var P=c.extendFlat({},v.font);P.size=void 0,c.coerceFont(T,"number.font",P),x.number.font.size===void 0&&(x.number.font.size=e.defaultNumberFontSize,b[0]=!0),T("number.prefix"),T("number.suffix"),_=x.number.font.size}var M;if(x._hasDelta){var C=c.extendFlat({},v.font);C.size=void 0,c.coerceFont(T,"delta.font",C),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(_||e.defaultNumberFontSize),b[1]=!0),T("delta.reference",x.value),T("delta.relative"),T("delta.valueformat",x.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||b[0])&&(!x._hasDelta||b[1])||!1;var A=c.extendFlat({},v.font);A.size=.25*(_||M||e.defaultNumberFontSize),c.coerceFont(T,"title.font",A),T("title.text");var h,p,k,w;function B(U,W){return c.coerce(h,p,g.gauge,U,W)}function O(U,W){return c.coerce(k,w,g.gauge.axis,U,W)}if(x._hasGauge){h=f.gauge,h||(h={}),p=S.newContainer(x,"gauge"),B("shape");var j=x._isBullet=x.gauge.shape==="bullet";j||T("title.align","center");var V=x._isAngular=x.gauge.shape==="angular";V||T("align","center"),B("bgcolor",v.paper_bgcolor),B("borderwidth"),B("bordercolor"),B("bar.color"),B("bar.line.color"),B("bar.line.width");var H=e.valueThickness*(x.gauge.shape==="bullet"?.5:1);B("bar.thickness",H),t(h,p,{name:"steps",handleItemDefaults:l}),B("threshold.value"),B("threshold.thickness"),B("threshold.line.width"),B("threshold.line.color"),k={},h&&(k=h.axis||{}),w=S.newContainer(p,"axis"),O("visible"),x._range=O("range",x._range);var F={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(k,w,O,"linear"),o(k,w,O,"linear",F),n(k,w,O,"linear",F),a(k,w,O,F)}else T("title.align","center"),T("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function l(f,x){function y(v,T){return c.coerce(f,x,g.gauge.steps,v,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}Z.exports={supplyDefaults:i}}),Yq=Dt((Q,Z)=>{function c(g,I){var S=[],t=I.value;typeof I._lastValue!="number"&&(I._lastValue=I.value);var e=I._lastValue,r=e;return I._hasDelta&&typeof I.delta.reference=="number"&&(r=I.delta.reference),S[0]={y:t,lastY:e,delta:t-r,relativeDelta:(t-r)/r},S}Z.exports={calc:c}}),Kq=Dt((Q,Z)=>{var c=Wr(),g=(vx(),ii(V1)).interpolate,I=(vx(),ii(V1)).interpolateNumber,S=kn(),t=S.strScale,e=S.strTranslate,r=S.rad2deg,a=Af().MID_SHIFT,n=Vs(),o=VE(),i=ec(),l=Ls(),f=rx(),x=X_(),y=Td(),v=pi(),T={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},b=/[yzafpnµmkMGTPEZY]/;function _(j){return j&&j.duration>0}Z.exports=function(j,V,H,F){var U=j._fullLayout,W;_(H)&&F&&(W=F()),S.makeTraceGroups(U._indicatorlayer,V,"trace").each(function(q){var J=q[0],lt=J.trace,yt=c.select(this),mt=lt._hasGauge,st=lt._isAngular,tt=lt._isBullet,pt=lt.domain,rt={w:U._size.w*(pt.x[1]-pt.x[0]),h:U._size.h*(pt.y[1]-pt.y[0]),l:U._size.l+U._size.w*pt.x[0],r:U._size.r+U._size.w*(1-pt.x[1]),t:U._size.t+U._size.h*(1-pt.y[1]),b:U._size.b+U._size.h*pt.y[0]},at=rt.l+rt.w/2,vt=rt.t+rt.h/2,it=Math.min(rt.w/2,rt.h),K=o.innerRadius*it,ft,ut,kt,It=lt.align||"center";if(ut=vt,!mt)ft=rt.l+u[It]*rt.w,kt=function(Lt){return k(Lt,rt.w,rt.h)};else if(st&&(ft=at,ut=vt+it/2,kt=function(Lt){return w(Lt,.9*K)}),tt){var Pt=o.bulletPadding,qt=1-o.bulletNumberDomainSize+Pt;ft=rt.l+(qt+(1-qt)*u[It])*rt.w,kt=function(Lt){return k(Lt,(o.bulletNumberDomainSize-Pt)*rt.w,rt.h)}}C(j,yt,q,{numbersX:ft,numbersY:ut,numbersScaler:kt,transitionOpts:H,onComplete:W});var Wt,Jt;mt&&(Wt={range:lt.gauge.axis.range,color:lt.gauge.bgcolor,line:{color:lt.gauge.bordercolor,width:0},thickness:1},Jt={range:lt.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:lt.gauge.bordercolor,width:lt.gauge.borderwidth},thickness:1});var ge=yt.selectAll("g.angular").data(st?q:[]);ge.exit().remove();var fe=yt.selectAll("g.angularaxis").data(st?q:[]);fe.exit().remove(),st&&M(j,yt,q,{radius:it,innerRadius:K,gauge:ge,layer:fe,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var pe=yt.selectAll("g.bullet").data(tt?q:[]);pe.exit().remove();var se=yt.selectAll("g.bulletaxis").data(tt?q:[]);se.exit().remove(),tt&&P(j,yt,q,{gauge:pe,layer:se,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var Tt=yt.selectAll("text.title").data(q);Tt.exit().remove(),Tt.enter().append("text").classed("title",!0),Tt.attr("text-anchor",function(){return tt?T.right:T[lt.title.align]}).text(lt.title.text).call(n.font,lt.title.font).call(i.convertToTspans,j),Tt.attr("transform",function(){var Lt=rt.l+rt.w*u[lt.title.align],Mt,ee=o.titlePadding,ve=n.bBox(Tt.node());if(mt){if(st)if(lt.gauge.axis.visible){var oe=n.bBox(fe.node());Mt=oe.top-ee-ve.bottom}else Mt=rt.t+rt.h/2-it/2-ve.bottom-ee;tt&&(Mt=ut-(ve.top+ve.bottom)/2,Lt=rt.l-o.bulletPadding*rt.w)}else Mt=lt._numbersTop-ee-ve.bottom;return e(Lt,Mt)})})};function P(j,V,H,F){var U=H[0].trace,W=F.gauge,q=F.layer,J=F.gaugeBg,lt=F.gaugeOutline,yt=F.size,mt=U.domain,st=F.transitionOpts,tt=F.onComplete,pt,rt,at,vt,it;W.enter().append("g").classed("bullet",!0),W.attr("transform",e(yt.l,yt.t)),q.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),q.selectAll("g.xbulletaxistick,path,text").remove();var K=yt.h,ft=U.gauge.bar.thickness*K,ut=mt.x[0],kt=mt.x[0]+(mt.x[1]-mt.x[0])*(U._hasNumber||U._hasDelta?1-o.bulletNumberDomainSize:1);pt=p(j,U.gauge.axis),pt._id="xbulletaxis",pt.domain=[ut,kt],pt.setScale(),rt=l.calcTicks(pt),at=l.makeTransTickFn(pt),vt=l.getTickSigns(pt)[2],it=yt.t+yt.h,pt.visible&&(l.drawTicks(j,pt,{vals:pt.ticks==="inside"?l.clipEnds(pt,rt):rt,layer:q,path:l.makeTickPath(pt,it,vt),transFn:at}),l.drawLabels(j,pt,{vals:rt,layer:q,transFn:at,labelFns:l.makeLabelFns(pt,it)}));function It(pe){pe.attr("width",function(se){return Math.max(0,pt.c2p(se.range[1])-pt.c2p(se.range[0]))}).attr("x",function(se){return pt.c2p(se.range[0])}).attr("y",function(se){return .5*(1-se.thickness)*K}).attr("height",function(se){return se.thickness*K})}var Pt=[J].concat(U.gauge.steps),qt=W.selectAll("g.bg-bullet").data(Pt);qt.enter().append("g").classed("bg-bullet",!0).append("rect"),qt.select("rect").call(It).call(A),qt.exit().remove();var Wt=W.selectAll("g.value-bullet").data([U.gauge.bar]);Wt.enter().append("g").classed("value-bullet",!0).append("rect"),Wt.select("rect").attr("height",ft).attr("y",(K-ft)/2).call(A),_(st)?Wt.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,pt.c2p(Math.min(U.gauge.axis.range[1],H[0].y)))):Wt.select("rect").attr("width",typeof H[0].y=="number"?Math.max(0,pt.c2p(Math.min(U.gauge.axis.range[1],H[0].y))):0),Wt.exit().remove();var Jt=H.filter(function(){return U.gauge.threshold.value||U.gauge.threshold.value===0}),ge=W.selectAll("g.threshold-bullet").data(Jt);ge.enter().append("g").classed("threshold-bullet",!0).append("line"),ge.select("line").attr("x1",pt.c2p(U.gauge.threshold.value)).attr("x2",pt.c2p(U.gauge.threshold.value)).attr("y1",(1-U.gauge.threshold.thickness)/2*K).attr("y2",(1-(1-U.gauge.threshold.thickness)/2)*K).call(v.stroke,U.gauge.threshold.line.color).style("stroke-width",U.gauge.threshold.line.width),ge.exit().remove();var fe=W.selectAll("g.gauge-outline").data([lt]);fe.enter().append("g").classed("gauge-outline",!0).append("rect"),fe.select("rect").call(It).call(A),fe.exit().remove()}function M(j,V,H,F){var U=H[0].trace,W=F.size,q=F.radius,J=F.innerRadius,lt=F.gaugeBg,yt=F.gaugeOutline,mt=[W.l+W.w/2,W.t+W.h/2+q/2],st=F.gauge,tt=F.layer,pt=F.transitionOpts,rt=F.onComplete,at=Math.PI/2;function vt(He){var Ge=U.gauge.axis.range[0],cr=U.gauge.axis.range[1],ur=(He-Ge)/(cr-Ge)*Math.PI-at;return ur<-at?-at:ur>at?at:ur}function it(He){return c.svg.arc().innerRadius((J+q)/2-He/2*(q-J)).outerRadius((J+q)/2+He/2*(q-J)).startAngle(-at)}function K(He){He.attr("d",function(Ge){return it(Ge.thickness).startAngle(vt(Ge.range[0])).endAngle(vt(Ge.range[1]))()})}var ft,ut,kt,It;st.enter().append("g").classed("angular",!0),st.attr("transform",e(mt[0],mt[1])),tt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),tt.selectAll("g.xangularaxistick,path,text").remove(),ft=p(j,U.gauge.axis),ft.type="linear",ft.range=U.gauge.axis.range,ft._id="xangularaxis",ft.ticklabeloverflow="allow",ft.setScale();var Pt=function(He){return(ft.range[0]-He.x)/(ft.range[1]-ft.range[0])*Math.PI+Math.PI},qt={},Wt=l.makeLabelFns(ft,0),Jt=Wt.labelStandoff;qt.xFn=function(He){var Ge=Pt(He);return Math.cos(Ge)*Jt},qt.yFn=function(He){var Ge=Pt(He),cr=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(Jt+He.fontSize*cr)+Math.abs(Math.cos(Ge))*(He.fontSize*a)},qt.anchorFn=function(He){var Ge=Pt(He),cr=Math.cos(Ge);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},qt.heightFn=function(He,Ge,cr){var ur=Pt(He);return-.5*(1+Math.sin(ur))*cr};var ge=function(He){return e(mt[0]+q*Math.cos(He),mt[1]-q*Math.sin(He))};kt=function(He){return ge(Pt(He))};var fe=function(He){var Ge=Pt(He);return ge(Ge)+"rotate("+-r(Ge)+")"};if(ut=l.calcTicks(ft),It=l.getTickSigns(ft)[2],ft.visible){It=ft.ticks==="inside"?-1:1;var pe=(ft.linewidth||1)/2;l.drawTicks(j,ft,{vals:ut,layer:tt,path:"M"+It*pe+",0h"+It*ft.ticklen,transFn:fe}),l.drawLabels(j,ft,{vals:ut,layer:tt,transFn:kt,labelFns:qt})}var se=[lt].concat(U.gauge.steps),Tt=st.selectAll("g.bg-arc").data(se);Tt.enter().append("g").classed("bg-arc",!0).append("path"),Tt.select("path").call(K).call(A),Tt.exit().remove();var Lt=it(U.gauge.bar.thickness),Mt=st.selectAll("g.value-arc").data([U.gauge.bar]);Mt.enter().append("g").classed("value-arc",!0).append("path");var ee=Mt.select("path");_(pt)?(ee.transition().duration(pt.duration).ease(pt.easing).each("end",function(){rt&&rt()}).each("interrupt",function(){rt&&rt()}).attrTween("d",h(Lt,vt(H[0].lastY),vt(H[0].y))),U._lastValue=H[0].y):ee.attr("d",typeof H[0].y=="number"?Lt.endAngle(vt(H[0].y)):"M0,0Z"),ee.call(A),Mt.exit().remove(),se=[];var ve=U.gauge.threshold.value;(ve||ve===0)&&se.push({range:[ve,ve],color:U.gauge.threshold.color,line:{color:U.gauge.threshold.line.color,width:U.gauge.threshold.line.width},thickness:U.gauge.threshold.thickness});var oe=st.selectAll("g.threshold-arc").data(se);oe.enter().append("g").classed("threshold-arc",!0).append("path"),oe.select("path").call(K).call(A),oe.exit().remove();var Ae=st.selectAll("g.gauge-outline").data([yt]);Ae.enter().append("g").classed("gauge-outline",!0).append("path"),Ae.select("path").call(K).call(A),Ae.exit().remove()}function C(j,V,H,F){var U=H[0].trace,W=F.numbersX,q=F.numbersY,J=U.align||"center",lt=T[J],yt=F.transitionOpts,mt=F.onComplete,st=S.ensureSingle(V,"g","numbers"),tt,pt,rt,at=[];U._hasNumber&&at.push("number"),U._hasDelta&&(at.push("delta"),U.delta.position==="left"&&at.reverse());var vt=st.selectAll("text").data(at);vt.enter().append("text"),vt.attr("text-anchor",function(){return lt}).attr("class",function(ge){return ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();function it(ge,fe,pe,se){if(ge.match("s")&&pe>=0!=se>=0&&!fe(pe).slice(-1).match(b)&&!fe(se).slice(-1).match(b)){var Tt=ge.slice().replace("s","f").replace(/\d+/,function(Mt){return parseInt(Mt)-1}),Lt=p(j,{tickformat:Tt});return function(Mt){return Math.abs(Mt)<1?l.tickText(Lt,Mt).text:fe(Mt)}}else return fe}function K(){var ge=p(j,{tickformat:U.number.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(Mt){return l.tickText(ge,Mt).text},pe=U.number.suffix,se=U.number.prefix,Tt=st.select("text.number");function Lt(){var Mt=typeof H[0].y=="number"?se+fe(H[0].y)+pe:"-";Tt.text(Mt).call(n.font,U.number.font).call(i.convertToTspans,j)}return _(yt)?Tt.transition().duration(yt.duration).ease(yt.easing).each("end",function(){Lt(),mt&&mt()}).each("interrupt",function(){Lt(),mt&&mt()}).attrTween("text",function(){var Mt=c.select(this),ee=I(H[0].lastY,H[0].y);U._lastValue=H[0].y;var ve=it(U.number.valueformat,fe,H[0].lastY,H[0].y);return function(oe){Mt.text(se+ve(ee(oe))+pe)}}):Lt(),tt=B(se+fe(H[0].y)+pe,U.number.font,lt,j),Tt}function ft(){var ge=p(j,{tickformat:U.delta.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(oe){return l.tickText(ge,oe).text},pe=U.delta.suffix,se=U.delta.prefix,Tt=function(oe){var Ae=U.delta.relative?oe.relativeDelta:oe.delta;return Ae},Lt=function(oe,Ae){return oe===0||typeof oe!="number"||isNaN(oe)?"-":(oe>0?U.delta.increasing.symbol:U.delta.decreasing.symbol)+se+Ae(oe)+pe},Mt=function(oe){return oe.delta>=0?U.delta.increasing.color:U.delta.decreasing.color};U._deltaLastValue===void 0&&(U._deltaLastValue=Tt(H[0]));var ee=st.select("text.delta");ee.call(n.font,U.delta.font).call(v.fill,Mt({delta:U._deltaLastValue}));function ve(){ee.text(Lt(Tt(H[0]),fe)).call(v.fill,Mt(H[0])).call(i.convertToTspans,j)}return _(yt)?ee.transition().duration(yt.duration).ease(yt.easing).tween("text",function(){var oe=c.select(this),Ae=Tt(H[0]),He=U._deltaLastValue,Ge=it(U.delta.valueformat,fe,He,Ae),cr=I(He,Ae);return U._deltaLastValue=Ae,function(ur){oe.text(Lt(cr(ur),Ge)),oe.call(v.fill,Mt({delta:cr(ur)}))}}).each("end",function(){ve(),mt&&mt()}).each("interrupt",function(){ve(),mt&&mt()}):ve(),pt=B(Lt(Tt(H[0]),fe),U.delta.font,lt,j),ee}var ut=U.mode+U.align,kt;if(U._hasDelta&&(kt=ft(),ut+=U.delta.position+U.delta.font.size+U.delta.font.family+U.delta.valueformat,ut+=U.delta.increasing.symbol+U.delta.decreasing.symbol,rt=pt),U._hasNumber&&(K(),ut+=U.number.font.size+U.number.font.family+U.number.valueformat+U.number.suffix+U.number.prefix,rt=tt),U._hasDelta&&U._hasNumber){var It=[(tt.left+tt.right)/2,(tt.top+tt.bottom)/2],Pt=[(pt.left+pt.right)/2,(pt.top+pt.bottom)/2],qt,Wt,Jt=.75*U.delta.font.size;U.delta.position==="left"&&(qt=O(U,"deltaPos",0,-1*(tt.width*u[U.align]+pt.width*(1-u[U.align])+Jt),ut,Math.min),Wt=It[1]-Pt[1],rt={width:tt.width+pt.width+Jt,height:Math.max(tt.height,pt.height),left:pt.left+qt,right:tt.right,top:Math.min(tt.top,pt.top+Wt),bottom:Math.max(tt.bottom,pt.bottom+Wt)}),U.delta.position==="right"&&(qt=O(U,"deltaPos",0,tt.width*(1-u[U.align])+pt.width*u[U.align]+Jt,ut,Math.max),Wt=It[1]-Pt[1],rt={width:tt.width+pt.width+Jt,height:Math.max(tt.height,pt.height),left:tt.left,right:pt.right+qt,top:Math.min(tt.top,pt.top+Wt),bottom:Math.max(tt.bottom,pt.bottom+Wt)}),U.delta.position==="bottom"&&(qt=null,Wt=pt.height,rt={width:Math.max(tt.width,pt.width),height:tt.height+pt.height,left:Math.min(tt.left,pt.left),right:Math.max(tt.right,pt.right),top:tt.bottom-tt.height,bottom:tt.bottom+pt.height}),U.delta.position==="top"&&(qt=null,Wt=tt.top,rt={width:Math.max(tt.width,pt.width),height:tt.height+pt.height,left:Math.min(tt.left,pt.left),right:Math.max(tt.right,pt.right),top:tt.bottom-tt.height-pt.height,bottom:tt.bottom}),kt.attr({dx:qt,dy:Wt})}(U._hasNumber||U._hasDelta)&&st.attr("transform",function(){var ge=F.numbersScaler(rt);ut+=ge[2];var fe=O(U,"numbersScale",1,ge[0],ut,Math.min),pe;U._scaleNumbers||(fe=1),U._isAngular?pe=q-fe*rt.bottom:pe=q-fe*(rt.top+rt.bottom)/2,U._numbersTop=fe*rt.top+pe;var se=rt[J];J==="center"&&(se=(rt.left+rt.right)/2);var Tt=W-fe*se;return Tt=O(U,"numbersTranslate",0,Tt,ut,Math.max),e(Tt,pe)+t(fe)})}function A(j){j.each(function(V){v.stroke(c.select(this),V.line.color)}).each(function(V){v.fill(c.select(this),V.color)}).style("stroke-width",function(V){return V.line.width})}function h(j,V,H){return function(){var F=g(V,H);return function(U){return j.endAngle(F(U))()}}}function p(j,V,H){var F=j._fullLayout,U=S.extendFlat({type:"linear",ticks:"outside",range:H,showline:!0},V),W={type:"linear",_id:"x"+V._id},q={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function J(lt,yt){return S.coerce(U,W,y,lt,yt)}return f(U,W,J,q,F),x(U,W,J,q),W}function k(j,V,H){var F=Math.min(V/j.width,H/j.height);return[F,j,V+"x"+H]}function w(j,V){var H=Math.sqrt(j.width/2*(j.width/2)+j.height*j.height),F=V/H;return[F,j,V]}function B(j,V,H,F){var U=document.createElementNS("http://www.w3.org/2000/svg","text"),W=c.select(U);return W.text(j).attr("x",0).attr("y",0).attr("text-anchor",H).attr("data-unformatted",j).call(i.convertToTspans,F).call(n.font,V),n.bBox(W.node())}function O(j,V,H,F,U,W){var q="_cache"+V;j[q]&&j[q].key===U||(j[q]={key:U,value:H});var J=S.aggNums(W,null,[j[q].value,F],2);return j[q].value=J,J}}),Xq=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"indicator",basePlotModule:Zq(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:UE(),supplyDefaults:Gq().supplyDefaults,calc:Yq().calc,plot:Kq(),meta:{}}}),Jq=Dt((Q,Z)=>{Z.exports=Xq()}),HE=Dt((Q,Z)=>{var c=gm(),g=Ia().extendFlat,I=Yc().overrideAll,S=ma(),t=Uh().attributes,e=ph().descriptionOnlyNumbers;Z.exports=I({domain:t({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:g({},c.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:g({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:g({},c.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:g({},S({arrayOk:!0}))}},"calc","from-root")}),Qq=Dt((Q,Z)=>{var c=kn(),g=HE(),I=Uh().defaults;function S(t,e){for(var r=t.columnorder||[],a=t.header.values.length,n=r.slice(0,a),o=n.slice().sort(function(f,x){return f-x}),i=n.map(function(f){return o.indexOf(f)}),l=i.length;l{var c=Og().wrap;Z.exports=function(){return c({})}}),WE=Dt((Q,Z)=>{Z.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}),e$=Dt((Q,Z)=>{var c=WE(),g=Ia().extendFlat,I=Hn(),S=la().isTypedArray,t=la().isArrayOrTypedArray;Z.exports=function(x,y){var v=a(y.cells.values),T=function(J){return J.slice(y.header.values.length,J.length)},u=a(y.header.values);u.length&&!u[0].length&&(u[0]=[""],u=a(u));var b=u.concat(T(v).map(function(){return n((u[0]||[""]).length)})),_=y.domain,P=Math.floor(x._fullLayout._size.w*(_.x[1]-_.x[0])),M=Math.floor(x._fullLayout._size.h*(_.y[1]-_.y[0])),C=y.header.values.length?b[0].map(function(){return y.header.height}):[c.emptyHeaderHeight],A=v.length?v[0].map(function(){return y.cells.height}):[],h=C.reduce(r,0),p=M-h,k=p+c.uplift,w=l(A,k),B=l(C,h),O=i(B,[]),j=i(w,O),V={},H=y._fullInput.columnorder;t(H)&&(H=Array.from(H)),H=H.concat(T(v.map(function(J,lt){return lt})));var F=b.map(function(J,lt){var yt=t(y.columnwidth)?y.columnwidth[Math.min(lt,y.columnwidth.length-1)]:y.columnwidth;return I(yt)?Number(yt):1}),U=F.reduce(r,0);F=F.map(function(J){return J/U*P});var W=Math.max(e(y.header.line.width),e(y.cells.line.width)),q={key:y.uid+x._context.staticPlot,translateX:_.x[0]*x._fullLayout._size.w,translateY:x._fullLayout._size.h*(1-_.y[1]),size:x._fullLayout._size,width:P,maxLineWidth:W,height:M,columnOrder:H,groupHeight:M,rowBlocks:j,headerRowBlocks:O,scrollY:0,cells:g({},y.cells,{values:v}),headerCells:g({},y.header,{values:b}),gdColumns:b.map(function(J){return J[0]}),gdColumnsOriginalOrder:b.map(function(J){return J[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:b.map(function(J,lt){var yt=V[J];V[J]=(yt||0)+1;var mt=J+"__"+V[J];return{key:mt,label:J,specIndex:lt,xIndex:H[lt],xScale:o,x:void 0,calcdata:void 0,columnWidth:F[lt]}})};return q.columns.forEach(function(J){J.calcdata=q,J.x=o(J)}),q};function e(x){if(t(x)){for(var y=0,v=0;v=y||C===x.length-1)&&(v[u]=_,_.key=M++,_.firstRowIndex=P,_.lastRowIndex=C,_=f(),u+=b,P=C+1,b=0);return v}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}),r$=Dt(Q=>{var Z=Ia().extendFlat;Q.splitToPanels=function(g){var I=[0,0],S=Z({},g,{key:"header",type:"header",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:Z({},g.calcdata,{cells:g.calcdata.headerCells})}),t=Z({},g,{key:"cells1",type:"cells",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),e=Z({},g,{key:"cells2",type:"cells",page:1,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks});return[t,e,S]},Q.splitToCells=function(g){var I=c(g);return(g.values||[]).slice(I[0],I[1]).map(function(S,t){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+e,key:I[0]+t,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:S}})};function c(g){var I=g.rowBlocks[g.page],S=I?I.rows[0].rowIndex:0,t=I?S+I.rows.length:0;return[S,t]}}),qE=Dt((Q,Z)=>{var c=WE(),g=Wr(),I=kn(),S=I.numberFormat,t=Og(),e=Vs(),r=ec(),a=kn().raiseToTop,n=kn().strTranslate,o=kn().cancelTransition,i=e$(),l=r$(),f=pi();Z.exports=function(ft,ut){var kt=!ft._context.staticPlot,It=ft._fullLayout._paper.selectAll("."+c.cn.table).data(ut.map(function(oe){var Ae=t.unwrap(oe),He=Ae.trace;return i(ft,He)}),t.keyFun);It.exit().remove(),It.enter().append("g").classed(c.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"),It.attr("width",function(oe){return oe.width+oe.size.l+oe.size.r}).attr("height",function(oe){return oe.height+oe.size.t+oe.size.b}).attr("transform",function(oe){return n(oe.translateX,oe.translateY)});var Pt=It.selectAll("."+c.cn.tableControlView).data(t.repeat,t.keyFun),qt=Pt.enter().append("g").classed(c.cn.tableControlView,!0).style("box-sizing","content-box");if(kt){var Wt="onwheel"in document?"wheel":"mousewheel";qt.on("mousemove",function(oe){Pt.filter(function(Ae){return oe===Ae}).call(u,ft)}).on(Wt,function(oe){if(!oe.scrollbarState.wheeling){oe.scrollbarState.wheeling=!0;var Ae=oe.scrollY+g.event.deltaY,He=lt(ft,Pt,null,Ae)(oe);He||(g.event.stopPropagation(),g.event.preventDefault()),oe.scrollbarState.wheeling=!1}}).call(u,ft,!0)}Pt.attr("transform",function(oe){return n(oe.size.l,oe.size.t)});var Jt=Pt.selectAll("."+c.cn.scrollBackground).data(t.repeat,t.keyFun);Jt.enter().append("rect").classed(c.cn.scrollBackground,!0).attr("fill","none"),Jt.attr("width",function(oe){return oe.width}).attr("height",function(oe){return oe.height}),Pt.each(function(oe){e.setClipUrl(g.select(this),y(ft,oe),ft)});var ge=Pt.selectAll("."+c.cn.yColumn).data(function(oe){return oe.columns},t.keyFun);ge.enter().append("g").classed(c.cn.yColumn,!0),ge.exit().remove(),ge.attr("transform",function(oe){return n(oe.x,0)}),kt&&ge.call(g.behavior.drag().origin(function(oe){var Ae=g.select(this);return H(Ae,oe,-c.uplift),a(this),oe.calcdata.columnDragInProgress=!0,u(Pt.filter(function(He){return oe.calcdata.key===He.key}),ft),oe}).on("drag",function(oe){var Ae=g.select(this),He=function(ur){return(oe===ur?g.event.x:ur.x)+ur.columnWidth/2};oe.x=Math.max(-c.overdrag,Math.min(oe.calcdata.width+c.overdrag-oe.columnWidth,g.event.x));var Ge=T(ge).filter(function(ur){return ur.calcdata.key===oe.calcdata.key}),cr=Ge.sort(function(ur,jr){return He(ur)-He(jr)});cr.forEach(function(ur,jr){ur.xIndex=jr,ur.x=oe===ur?ur.x:ur.xScale(ur)}),ge.filter(function(ur){return oe!==ur}).transition().ease(c.transitionEase).duration(c.transitionDuration).attr("transform",function(ur){return n(ur.x,0)}),Ae.call(o).attr("transform",n(oe.x,-c.uplift))}).on("dragend",function(oe){var Ae=g.select(this),He=oe.calcdata;oe.x=oe.xScale(oe),oe.calcdata.columnDragInProgress=!1,H(Ae,oe,0),j(ft,He,He.columns.map(function(Ge){return Ge.xIndex}))})),ge.each(function(oe){e.setClipUrl(g.select(this),v(ft,oe),ft)});var fe=ge.selectAll("."+c.cn.columnBlock).data(l.splitToPanels,t.keyFun);fe.enter().append("g").classed(c.cn.columnBlock,!0).attr("id",function(oe){return oe.key}),fe.style("cursor",function(oe){return oe.dragHandle?"ew-resize":oe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var pe=fe.filter(U),se=fe.filter(F);kt&&se.call(g.behavior.drag().origin(function(oe){return g.event.stopPropagation(),oe}).on("drag",lt(ft,Pt,-1)).on("dragend",function(){})),b(ft,Pt,pe,fe),b(ft,Pt,se,fe);var Tt=Pt.selectAll("."+c.cn.scrollAreaClip).data(t.repeat,t.keyFun);Tt.enter().append("clipPath").classed(c.cn.scrollAreaClip,!0).attr("id",function(oe){return y(ft,oe)});var Lt=Tt.selectAll("."+c.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);Lt.enter().append("rect").classed(c.cn.scrollAreaClipRect,!0).attr("x",-c.overdrag).attr("y",-c.uplift).attr("fill","none"),Lt.attr("width",function(oe){return oe.width+2*c.overdrag}).attr("height",function(oe){return oe.height+c.uplift});var Mt=ge.selectAll("."+c.cn.columnBoundary).data(t.repeat,t.keyFun);Mt.enter().append("g").classed(c.cn.columnBoundary,!0);var ee=ge.selectAll("."+c.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);ee.enter().append("clipPath").classed(c.cn.columnBoundaryClippath,!0),ee.attr("id",function(oe){return v(ft,oe)});var ve=ee.selectAll("."+c.cn.columnBoundaryRect).data(t.repeat,t.keyFun);ve.enter().append("rect").classed(c.cn.columnBoundaryRect,!0).attr("fill","none"),ve.attr("width",function(oe){return oe.columnWidth+2*x(oe)}).attr("height",function(oe){return oe.calcdata.height+2*x(oe)+c.uplift}).attr("x",function(oe){return-x(oe)}).attr("y",function(oe){return-x(oe)}),J(null,se,Pt)};function x(ft){return Math.ceil(ft.calcdata.maxLineWidth/2)}function y(ft,ut){return"clip"+ft._fullLayout._uid+"_scrollAreaBottomClip_"+ut.key}function v(ft,ut){return"clip"+ft._fullLayout._uid+"_columnBoundaryClippath_"+ut.calcdata.key+"_"+ut.specIndex}function T(ft){return[].concat.apply([],ft.map(function(ut){return ut})).map(function(ut){return ut.__data__})}function u(ft,ut,kt){function It(fe){var pe=fe.rowBlocks;return rt(pe,pe.length-1)+(pe.length?at(pe[pe.length-1],1/0):1)}var Pt=ft.selectAll("."+c.cn.scrollbarKit).data(t.repeat,t.keyFun);Pt.enter().append("g").classed(c.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Pt.each(function(fe){var pe=fe.scrollbarState;pe.totalHeight=It(fe),pe.scrollableAreaHeight=fe.groupHeight-W(fe),pe.currentlyVisibleHeight=Math.min(pe.totalHeight,pe.scrollableAreaHeight),pe.ratio=pe.currentlyVisibleHeight/pe.totalHeight,pe.barLength=Math.max(pe.ratio*pe.currentlyVisibleHeight,c.goldenRatio*c.scrollbarWidth),pe.barWiggleRoom=pe.currentlyVisibleHeight-pe.barLength,pe.wiggleRoom=Math.max(0,pe.totalHeight-pe.scrollableAreaHeight),pe.topY=pe.barWiggleRoom===0?0:fe.scrollY/pe.wiggleRoom*pe.barWiggleRoom,pe.bottomY=pe.topY+pe.barLength,pe.dragMultiplier=pe.wiggleRoom/pe.barWiggleRoom}).attr("transform",function(fe){var pe=fe.width+c.scrollbarWidth/2+c.scrollbarOffset;return n(pe,W(fe))});var qt=Pt.selectAll("."+c.cn.scrollbar).data(t.repeat,t.keyFun);qt.enter().append("g").classed(c.cn.scrollbar,!0);var Wt=qt.selectAll("."+c.cn.scrollbarSlider).data(t.repeat,t.keyFun);Wt.enter().append("g").classed(c.cn.scrollbarSlider,!0),Wt.attr("transform",function(fe){return n(0,fe.scrollbarState.topY||0)});var Jt=Wt.selectAll("."+c.cn.scrollbarGlyph).data(t.repeat,t.keyFun);Jt.enter().append("line").classed(c.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",c.scrollbarWidth).attr("stroke-linecap","round").attr("y1",c.scrollbarWidth/2),Jt.attr("y2",function(fe){return fe.scrollbarState.barLength-c.scrollbarWidth/2}).attr("stroke-opacity",function(fe){return fe.columnDragInProgress||!fe.scrollbarState.barWiggleRoom||kt?0:.4}),Jt.transition().delay(0).duration(0),Jt.transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration).attr("stroke-opacity",0);var ge=qt.selectAll("."+c.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);ge.enter().append("line").classed(c.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",c.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(fe){var pe=g.event.y,se=this.getBoundingClientRect(),Tt=fe.scrollbarState,Lt=pe-se.top,Mt=g.scale.linear().domain([0,Tt.scrollableAreaHeight]).range([0,Tt.totalHeight]).clamp(!0);Tt.topY<=Lt&&Lt<=Tt.bottomY||lt(ut,ft,null,Mt(Lt-Tt.barLength/2))(fe)}).call(g.behavior.drag().origin(function(fe){return g.event.stopPropagation(),fe.scrollbarState.scrollbarScrollInProgress=!0,fe}).on("drag",lt(ut,ft)).on("dragend",function(){})),ge.attr("y2",function(fe){return fe.scrollbarState.scrollableAreaHeight}),ut._context.staticPlot&&(Jt.remove(),ge.remove())}function b(ft,ut,kt,It){var Pt=_(kt),qt=P(Pt);h(qt);var Wt=M(qt);k(Wt);var Jt=A(qt),ge=C(Jt);p(ge),w(ge,ut,It,ft),pt(qt)}function _(ft){var ut=ft.selectAll("."+c.cn.columnCells).data(t.repeat,t.keyFun);return ut.enter().append("g").classed(c.cn.columnCells,!0),ut.exit().remove(),ut}function P(ft){var ut=ft.selectAll("."+c.cn.columnCell).data(l.splitToCells,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.columnCell,!0),ut.exit().remove(),ut}function M(ft){var ut=ft.selectAll("."+c.cn.cellRect).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("rect").classed(c.cn.cellRect,!0),ut}function C(ft){var ut=ft.selectAll("."+c.cn.cellText).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("text").classed(c.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),ut}function A(ft){var ut=ft.selectAll("."+c.cn.cellTextHolder).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ut}function h(ft){ft.each(function(ut,kt){var It=ut.calcdata.cells.font,Pt=ut.column.specIndex,qt={size:V(It.size,Pt,kt),color:V(It.color,Pt,kt),family:V(It.family,Pt,kt),weight:V(It.weight,Pt,kt),style:V(It.style,Pt,kt),variant:V(It.variant,Pt,kt),textcase:V(It.textcase,Pt,kt),lineposition:V(It.lineposition,Pt,kt),shadow:V(It.shadow,Pt,kt)};ut.rowNumber=ut.key,ut.align=V(ut.calcdata.cells.align,Pt,kt),ut.cellBorderWidth=V(ut.calcdata.cells.line.width,Pt,kt),ut.font=qt})}function p(ft){ft.each(function(ut){e.font(g.select(this),ut.font)})}function k(ft){ft.attr("width",function(ut){return ut.column.columnWidth}).attr("stroke-width",function(ut){return ut.cellBorderWidth}).each(function(ut){var kt=g.select(this);f.stroke(kt,V(ut.calcdata.cells.line.color,ut.column.specIndex,ut.rowNumber)),f.fill(kt,V(ut.calcdata.cells.fill.color,ut.column.specIndex,ut.rowNumber))})}function w(ft,ut,kt,It){ft.text(function(Pt){var qt=Pt.column.specIndex,Wt=Pt.rowNumber,Jt=Pt.value,ge=typeof Jt=="string",fe=ge&&Jt.match(/
/i),pe=!ge||fe;Pt.mayHaveMarkup=ge&&Jt.match(/[<&>]/);var se=B(Jt);Pt.latex=se;var Tt=se?"":V(Pt.calcdata.cells.prefix,qt,Wt)||"",Lt=se?"":V(Pt.calcdata.cells.suffix,qt,Wt)||"",Mt=se?null:V(Pt.calcdata.cells.format,qt,Wt)||null,ee=Tt+(Mt?S(Mt)(Pt.value):Pt.value)+Lt,ve;Pt.wrappingNeeded=!Pt.wrapped&&!pe&&!se&&(ve=O(ee)),Pt.cellHeightMayIncrease=fe||se||Pt.mayHaveMarkup||(ve===void 0?O(ee):ve),Pt.needsConvertToTspans=Pt.mayHaveMarkup||Pt.wrappingNeeded||Pt.latex;var oe;if(Pt.wrappingNeeded){var Ae=c.wrapSplitCharacter===" "?ee.replace(/Pt&&It.push(qt),Pt+=ge}return It}function J(ft,ut,kt){var It=T(ut)[0];if(It!==void 0){var Pt=It.rowBlocks,qt=It.calcdata,Wt=rt(Pt,Pt.length),Jt=It.calcdata.groupHeight-W(It),ge=qt.scrollY=Math.max(0,Math.min(Wt-Jt,qt.scrollY)),fe=q(Pt,ge,Jt);fe.length===1&&(fe[0]===Pt.length-1?fe.unshift(fe[0]-1):fe.push(fe[0]+1)),fe[0]%2&&fe.reverse(),ut.each(function(pe,se){pe.page=fe[se],pe.scrollY=ge}),ut.attr("transform",function(pe){var se=rt(pe.rowBlocks,pe.page)-pe.scrollY;return n(0,se)}),ft&&(yt(ft,kt,ut,fe,It.prevPages,It,0),yt(ft,kt,ut,fe,It.prevPages,It,1),u(kt,ft))}}function lt(ft,ut,kt,It){return function(Pt){var qt=Pt.calcdata?Pt.calcdata:Pt,Wt=ut.filter(function(pe){return qt.key===pe.key}),Jt=kt||qt.scrollbarState.dragMultiplier,ge=qt.scrollY;qt.scrollY=It===void 0?qt.scrollY+Jt*g.event.dy:It;var fe=Wt.selectAll("."+c.cn.yColumn).selectAll("."+c.cn.columnBlock).filter(F);return J(ft,fe,Wt),qt.scrollY===ge}}function yt(ft,ut,kt,It,Pt,qt,Wt){var Jt=It[Wt]!==Pt[Wt];Jt&&(clearTimeout(qt.currentRepaint[Wt]),qt.currentRepaint[Wt]=setTimeout(function(){var ge=kt.filter(function(fe,pe){return pe===Wt&&It[pe]!==Pt[pe]});b(ft,ut,ge,kt),Pt[Wt]=It[Wt]}))}function mt(ft,ut,kt,It){return function(){var Pt=g.select(ut.parentNode);Pt.each(function(qt){var Wt=qt.fragments;Pt.selectAll("tspan.line").each(function(Mt,ee){Wt[ee].width=this.getComputedTextLength()});var Jt=Wt[Wt.length-1].width,ge=Wt.slice(0,-1),fe=[],pe,se,Tt=0,Lt=qt.column.columnWidth-2*c.cellPad;for(qt.value="";ge.length;)pe=ge.shift(),se=pe.width+Jt,Tt+se>Lt&&(qt.value+=fe.join(c.wrapSpacer)+c.lineBreaker,fe=[],Tt=0),fe.push(pe.text),Tt+=se;Tt&&(qt.value+=fe.join(c.wrapSpacer)),qt.wrapped=!0}),Pt.selectAll("tspan.line").remove(),w(Pt.select("."+c.cn.cellText),kt,ft,It),g.select(ut.parentNode.parentNode).call(pt)}}function st(ft,ut,kt,It,Pt){return function(){if(!Pt.settledY){var qt=g.select(ut.parentNode),Wt=it(Pt),Jt=Pt.key-Wt.firstRowIndex,ge=Wt.rows[Jt].rowHeight,fe=Pt.cellHeightMayIncrease?ut.parentNode.getBoundingClientRect().height+2*c.cellPad:ge,pe=Math.max(fe,ge),se=pe-Wt.rows[Jt].rowHeight;se&&(Wt.rows[Jt].rowHeight=pe,ft.selectAll("."+c.cn.columnCell).call(pt),J(null,ft.filter(F),0),u(kt,It,!0)),qt.attr("transform",function(){var Tt=this,Lt=Tt.parentNode,Mt=Lt.getBoundingClientRect(),ee=g.select(Tt.parentNode).select("."+c.cn.cellRect).node().getBoundingClientRect(),ve=Tt.transform.baseVal.consolidate(),oe=ee.top-Mt.top+(ve?ve.matrix.f:c.cellPad);return n(tt(Pt,g.select(Tt.parentNode).select("."+c.cn.cellTextHolder).node().getBoundingClientRect().width),oe)}),Pt.settledY=!0}}}function tt(ft,ut){switch(ft.align){case"left":return c.cellPad;case"right":return ft.column.columnWidth-(ut||0)-c.cellPad;case"center":return(ft.column.columnWidth-(ut||0))/2;default:return c.cellPad}}function pt(ft){ft.attr("transform",function(ut){var kt=ut.rowBlocks[0].auxiliaryBlocks.reduce(function(Wt,Jt){return Wt+at(Jt,1/0)},0),It=it(ut),Pt=at(It,ut.key),qt=Pt+kt;return n(0,qt)}).selectAll("."+c.cn.cellRect).attr("height",function(ut){return K(it(ut),ut.key).rowHeight})}function rt(ft,ut){for(var kt=0,It=ut-1;It>=0;It--)kt+=vt(ft[It]);return kt}function at(ft,ut){for(var kt=0,It=0;It{var Z=ud().getModuleCalcData,c=qE(),g="table";Q.name=g,Q.plot=function(I){var S=Z(I.calcdata,g)[0];S.length&&c(I,S)},Q.clean=function(I,S,t,e){var r=e._has&&e._has(g),a=S._has&&S._has(g);r&&!a&&e._paperdiv.selectAll(".table").remove()}}),i$=Dt((Q,Z)=>{Z.exports={attributes:HE(),supplyDefaults:Qq(),calc:t$(),plot:qE(),moduleType:"trace",name:"table",basePlotModule:n$(),categories:["noOpacity"],meta:{}}}),a$=Dt((Q,Z)=>{Z.exports=i$()}),o$=Dt((Q,Z)=>{var c=ma(),g=Ai(),I=Td(),S=ph().descriptionWithDates,t=Yc().overrideAll,e=kd().dash,r=Ia().extendFlat;Z.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:c({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:I.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},I.labelalias,{editType:"calc"}),tickfont:c({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:S("tick label")},tickformatstops:t(I.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g.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"}}),ET=Dt((Q,Z)=>{var c=ma(),g=o$(),I=Ai(),S=c({editType:"calc"}),t=ef().zorder;S.family.dflt='"Open Sans", verdana, arial, sans-serif',S.size.dflt=12,S.color.dflt=I.defaultLine,Z.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:g,baxis:g,font:S,color:{valType:"color",dflt:I.defaultLine,editType:"plot"},zorder:t}}),s$=Dt((Q,Z)=>{var c=kn().isArray1D;Z.exports=function(g,I,S){var t=S("x"),e=t&&t.length,r=S("y"),a=r&&r.length;if(!e&&!a)return!1;if(I._cheater=!t,(!e||c(t))&&(!a||c(r))){var n=e?t.length:1/0;a&&(n=Math.min(n,r.length)),I.a&&I.a.length&&(n=Math.min(n,I.a.length)),I.b&&I.b.length&&(n=Math.min(n,I.b.length)),I._length=n}else I._length=null;return!0}}),l$=Dt((Q,Z)=>{var c=ET(),g=pi().addOpacity,I=Qo(),S=kn(),t=xg(),e=n0(),r=dm(),a=qm(),n=i0(),o=mv();Z.exports=function(l,f,x){var y=x.letter,v=x.font||{},T=c[y+"axis"];function u(W,q){return S.coerce(l,f,T,W,q)}function b(W,q){return S.coerce2(l,f,T,W,q)}x.name&&(f._name=x.name,f._id=x.name),u("autotypenumbers",x.autotypenumbersDflt);var _=u("type");if(_==="-"&&(x.data&&i(f,x.data),f.type==="-"?f.type="linear":_=l.type=f.type),u("smoothing"),u("cheatertype"),u("showticklabels"),u("labelprefix",y+" = "),u("labelsuffix"),u("showtickprefix"),u("showticksuffix"),u("separatethousands"),u("tickformat"),u("exponentformat"),u("minexponent"),u("showexponent"),u("categoryorder"),u("tickmode"),u("tickvals"),u("ticktext"),u("tick0"),u("dtick"),f.tickmode==="array"&&(u("arraytick0"),u("arraydtick")),u("labelpadding"),f._hovertitle=y,_==="date"){var P=I.getComponentMethod("calendars","handleDefaults");P(l,f,"calendar",x.calendar)}n(f,x.fullLayout),f.c2p=S.identity;var M=u("color",x.dfltColor),C=M===l.color?M:v.color,A=u("title.text");A&&(S.coerceFont(u,"title.font",v,{overrideDflt:{size:S.bigFont(v.size),color:C}}),u("title.offset")),u("tickangle");var h=u("autorange",!f.isValidRange(l.range));h&&u("rangemode"),u("range"),f.cleanRange(),u("fixedrange"),t(l,f,u,_),r(l,f,u,_,x),e(l,f,u,_,x),a(l,f,u,{data:x.data,dataAttr:y});var p=b("gridcolor",g(M,.3)),k=b("gridwidth"),w=b("griddash"),B=u("showgrid");B||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var O=b("startlinecolor",M),j=b("startlinewidth",k),V=u("startline",f.showgrid||!!O||!!j);V||(delete f.startlinecolor,delete f.startlinewidth);var H=b("endlinecolor",M),F=b("endlinewidth",k),U=u("endline",f.showgrid||!!H||!!F);return U||(delete f.endlinecolor,delete f.endlinewidth),B?(u("minorgridcount"),u("minorgridwidth",k),u("minorgriddash",w),u("minorgridcolor",g(p,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,u("tickmode"),f};function i(l,f){if(l.type==="-"){var x=l._id,y=x.charAt(0),v=y+"calendar",T=l[v];l.type=o(f,T,{autotypenumbers:l.autotypenumbers})}}}),u$=Dt((Q,Z)=>{var c=l$(),g=mu();Z.exports=function(S,t,e,r,a){var n=r("a");n||(r("da"),r("a0"));var o=r("b");o||(r("db"),r("b0")),I(S,t,e,a)};function I(S,t,e,r){var a=["aaxis","baxis"];a.forEach(function(n){var o=n.charAt(0),i=S[n]||{},l=g.newContainer(t,n),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:n,data:S[o],calendar:t.calendar,dfltColor:r,bgColor:e.paper_bgcolor,autotypenumbersDflt:e.autotypenumbers,fullLayout:e};c(i,l,f),l._categories=l._categories||[],!S[n]&&i.type!=="-"&&(S[n]={type:i.type})})}}),c$=Dt((Q,Z)=>{var c=kn(),g=s$(),I=u$(),S=ET(),t=Ai();Z.exports=function(e,r,a,n){function o(f,x){return c.coerce(e,r,S,f,x)}r._clipPathId="clip"+r.uid+"carpet";var i=o("color",t.defaultLine);if(c.coerceFont(o,"font",n.font),o("carpet"),I(e,r,n,o,i),!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 l=g(e,r,o);l||(r.visible=!1),r._cheater&&o("cheaterslope"),o("zorder")}}),$E=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t;for(c(g)?g.length>I.length&&(g=g.slice(0,I.length)):g=[],t=0;t{Z.exports=function(c,g,I){if(c.length===0)return"";var S,t=[],e=I?3:1;for(S=0;S{Z.exports=function(c,g,I,S,t,e){var r=t[0]*c.dpdx(g),a=t[1]*c.dpdy(I),n=1,o=1;if(e){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=(t[0]*e[0]+t[1]*e[1])/i/l;o=Math.max(0,f)}var x=Math.atan2(a,r)*180/Math.PI;return x<-90?(x+=180,n=-n):x>90&&(x-=180,n=-n),{angle:x,flip:n,p:c.c2p(S,g,I),offsetMultplier:o}}}),f$=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=$E(),S=ZE(),t=h$(),e=ec(),r=kn(),a=r.strRotate,n=r.strTranslate,o=Af();Z.exports=function(u,b,_,P){var M=u._context.staticPlot,C=b.xaxis,A=b.yaxis,h=u._fullLayout,p=h._clips;r.makeTraceGroups(P,_,"trace").each(function(k){var w=c.select(this),B=k[0],O=B.trace,j=O.aaxis,V=O.baxis,H=r.ensureSingle(w,"g","minorlayer"),F=r.ensureSingle(w,"g","majorlayer"),U=r.ensureSingle(w,"g","boundarylayer"),W=r.ensureSingle(w,"g","labellayer");w.style("opacity",O.opacity),l(C,A,F,j,"a",j._gridlines,!0),l(C,A,F,V,"b",V._gridlines,!0),l(C,A,H,j,"a",j._minorgridlines,!0),l(C,A,H,V,"b",V._minorgridlines,!0),l(C,A,U,j,"a-boundary",j._boundarylines,M),l(C,A,U,V,"b-boundary",V._boundarylines,M);var q=f(u,C,A,O,B,W,j._labels,"a-label"),J=f(u,C,A,O,B,W,V._labels,"b-label");x(u,W,O,B,C,A,q,J),i(O,B,p,C,A)})};function i(u,b,_,P,M){var C,A,h,p,k=_.select("#"+u._clipPathId);k.size()||(k=_.append("clipPath").classed("carpetclip",!0));var w=r.ensureSingle(k,"path","carpetboundary"),B=b.clipsegments,O=[];for(p=0;p0?"start":"end","data-notex":1}).call(g.font,B.font).text(B.text).call(e.convertToTspans,u),U=g.bBox(this);F.attr("transform",n(j.p[0],j.p[1])+a(j.angle)+n(B.axis.labelpadding*H,U.height*.3)),k=Math.max(k,U.width+B.axis.labelpadding)}),p.exit().remove(),w.maxExtent=k,w}function x(u,b,_,P,M,C,A,h){var p,k,w,B,O=r.aggNums(Math.min,null,_.a),j=r.aggNums(Math.max,null,_.a),V=r.aggNums(Math.min,null,_.b),H=r.aggNums(Math.max,null,_.b);p=.5*(O+j),k=V,w=_.ab2xy(p,k,!0),B=_.dxyda_rough(p,k),A.angle===void 0&&r.extendFlat(A,t(_,M,C,w,_.dxydb_rough(p,k))),T(u,b,_,P,w,B,_.aaxis,M,C,A,"a-title"),p=O,k=.5*(V+H),w=_.ab2xy(p,k,!0),B=_.dxydb_rough(p,k),h.angle===void 0&&r.extendFlat(h,t(_,M,C,w,_.dxyda_rough(p,k))),T(u,b,_,P,w,B,_.baxis,M,C,h,"b-title")}var y=o.LINE_SPACING,v=(1-o.MID_SHIFT)/y+1;function T(u,b,_,P,M,C,A,h,p,k,w){var B=[];A.title.text&&B.push(A.title.text);var O=b.selectAll("text."+w).data(B),j=k.maxExtent;O.enter().append("text").classed(w,!0),O.each(function(){var V=t(_,h,p,M,C);["start","both"].indexOf(A.showticklabels)===-1&&(j=0);var H=A.title.font.size;j+=H+A.title.offset;var F=k.angle+(k.flip<0?180:0),U=(F-V.angle+450)%360,W=U>90&&U<270,q=c.select(this);q.text(A.title.text).call(e.convertToTspans,u),W&&(j=(-e.lineCount(q)+v)*y*H-j),q.attr("transform",n(V.p[0],V.p[1])+a(V.angle)+n(0,j)).attr("text-anchor","middle").call(g.font,A.title.font)}),O.exit().remove()}}),d$=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t,e,r,a,n,o,i=[],l=c(g)?g.length:g,f=c(I)?I.length:I,x=c(g)?g:null,y=c(I)?I:null;x&&(r=(x.length-1)/(x[x.length-1]-x[0])/(l-1)),y&&(a=(y.length-1)/(y[y.length-1]-y[0])/(f-1));var v,T=1/0,u=-1/0;for(e=0;e{var c=kn().isArrayOrTypedArray;Z.exports=function(I){return g(I,0)};function g(I,S){if(!c(I)||S>=10)return null;for(var t=1/0,e=-1/0,r=I.length,a=0;a{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b,_=I["_"+S],P=I[S+"axis"],M=P._gridlines=[],C=P._minorgridlines=[],A=P._boundarylines=[],h=I["_"+t],p=I[t+"axis"];P.tickmode==="array"&&(P.tickvals=_.slice());var k=I._xctrl,w=I._yctrl,B=k[0].length,O=k.length,j=I._a.length,V=I._b.length;c.prepTicks(P),P.tickmode==="array"&&delete P.tickvals;var H=P.smoothing?3:1;function F(W){var q,J,lt,yt,mt,st,tt,pt,rt,at,vt,it,K=[],ft=[],ut={};if(S==="b")for(J=I.b2j(W),lt=Math.floor(Math.max(0,Math.min(V-2,J))),yt=J-lt,ut.length=V,ut.crossLength=j,ut.xy=function(kt){return I.evalxy([],kt,J)},ut.dxy=function(kt,It){return I.dxydi([],kt,lt,It,yt)},q=0;q0&&(rt=I.dxydi([],q-1,lt,0,yt),K.push(mt[0]+rt[0]/3),ft.push(mt[1]+rt[1]/3),at=I.dxydi([],q-1,lt,1,yt),K.push(pt[0]-at[0]/3),ft.push(pt[1]-at[1]/3)),K.push(pt[0]),ft.push(pt[1]),mt=pt;else for(q=I.a2i(W),st=Math.floor(Math.max(0,Math.min(j-2,q))),tt=q-st,ut.length=j,ut.crossLength=V,ut.xy=function(kt){return I.evalxy([],q,kt)},ut.dxy=function(kt,It){return I.dxydj([],st,kt,tt,It)},J=0;J0&&(vt=I.dxydj([],st,J-1,tt,0),K.push(mt[0]+vt[0]/3),ft.push(mt[1]+vt[1]/3),it=I.dxydj([],st,J-1,tt,1),K.push(pt[0]-it[0]/3),ft.push(pt[1]-it[1]/3)),K.push(pt[0]),ft.push(pt[1]),mt=pt;return ut.axisLetter=S,ut.axis=P,ut.crossAxis=p,ut.value=W,ut.constvar=t,ut.index=f,ut.x=K,ut.y=ft,ut.smoothing=p.smoothing,ut}function U(W){var q,J,lt,yt,mt,st=[],tt=[],pt={};if(pt.length=_.length,pt.crossLength=h.length,S==="b")for(lt=Math.max(0,Math.min(V-2,W)),mt=Math.min(1,Math.max(0,W-lt)),pt.xy=function(rt){return I.evalxy([],rt,W)},pt.dxy=function(rt,at){return I.dxydi([],rt,lt,at,mt)},q=0;q_.length-1)&&M.push(g(U(r),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i;f_.length-1)&&!(v<0||v>_.length-1))for(T=_[a],u=_[v],e=0;e_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash})));P.startline&&A.push(g(U(0),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(U(_.length-1),{color:P.endlinecolor,width:P.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((_[_.length-1]-P.tick0)/P.dtick*(1+n)),Math.ceil((_[0]-P.tick0)/P.dtick/(1+n))].sort(function(W,q){return W-q}),i=o[0],l=o[1],f=i;f<=l;f++)x=P.tick0+P.dtick*f,M.push(g(F(x),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i-1;f_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash}));P.startline&&A.push(g(F(_[0]),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(F(_[_.length-1]),{color:P.endlinecolor,width:P.endlinewidth}))}}}),g$=Dt((Q,Z)=>{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S){var t,e,r,a,n,o=S._labels=[],i=S._gridlines;for(t=0;t{Z.exports=function(c,g,I,S){var t,e,r,a=[],n=!!I.smoothing,o=!!S.smoothing,i=c[0].length-1,l=c.length-1;for(t=0,e=[],r=[];t<=i;t++)e[t]=c[0][t],r[t]=g[0][t];for(a.push({x:e,y:r,bicubic:n}),t=0,e=[],r=[];t<=l;t++)e[t]=c[t][i],r[t]=g[t][i];for(a.push({x:e,y:r,bicubic:o}),t=i,e=[],r=[];t>=0;t--)e[i-t]=c[l][t],r[i-t]=g[l][t];for(a.push({x:e,y:r,bicubic:n}),t=l,e=[],r=[];t>=0;t--)e[l-t]=c[t][0],r[l-t]=g[t][0];return a.push({x:e,y:r,bicubic:o}),a}}),y$=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S){var t,e,r,a=[],n=[],o=g[0].length,i=g.length;function l(J,lt){var yt=0,mt,st=0;return J>0&&(mt=g[lt][J-1])!==void 0&&(st++,yt+=mt),J0&&(mt=g[lt-1][J])!==void 0&&(st++,yt+=mt),lt0&&e0&&th);return c.log("Smoother converged to",p,"after",w,"iterations"),g}}),x$=Dt((Q,Z)=>{Z.exports={RELATIVE_CULL_TOLERANCE:1e-6}}),_$=Dt((Q,Z)=>{var c=.5;Z.exports=function(g,I,S,t){var e=g[0]-I[0],r=g[1]-I[1],a=S[0]-I[0],n=S[1]-I[1],o=Math.pow(e*e+r*r,c/2),i=Math.pow(a*a+n*n,c/2),l=(i*i*e-o*o*a)*t,f=(i*i*r-o*o*n)*t,x=i*(o+i)*3,y=o*(o+i)*3;return[[I[0]+(x&&l/x),I[1]+(x&&f/x)],[I[0]-(y&&l/y),I[1]-(y&&f/y)]]}}),b$=Dt((Q,Z)=>{var c=_$(),g=kn().ensureArray;function I(S,t,e){var r=-.5*e[0]+1.5*t[0],a=-.5*e[1]+1.5*t[1];return[(2*r+S[0])/3,(2*a+S[1])/3]}Z.exports=function(S,t,e,r,a,n){var o,i,l,f,x,y,v,T,u,b,_=e[0].length,P=e.length,M=a?3*_-2:_,C=n?3*P-2:P;for(S=g(S,C),t=g(t,C),l=0;l{Z.exports=function(c,g,I,S,t){var e=g-2,r=I-2;return S&&t?function(a,n,o){a||(a=[]);var i,l,f,x,y,v,T=Math.max(0,Math.min(Math.floor(n),e)),u=Math.max(0,Math.min(Math.floor(o),r)),b=Math.max(0,Math.min(1,n-T)),_=Math.max(0,Math.min(1,o-u));T*=3,u*=3;var P=b*b,M=P*b,C=1-b,A=C*C,h=A*C,p=_*_,k=p*_,w=1-_,B=w*w,O=B*w;for(v=0;v{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=1-r,T=v*v,u=v*r*2,b=-3*T,_=3*(T-u),P=3*(u-y),M=3*y,C=a*a,A=C*a,h=1-a,p=h*h,k=p*h;for(x=0;x{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=y*r,T=1-r,u=T*T,b=u*T,_=a*a,P=1-a,M=P*P,C=P*a*2,A=-3*M,h=3*(M-C),p=3*(C-_),k=3*_;for(x=0;x{var c=x$(),g=C_().findBin,I=b$(),S=w$(),t=k$(),e=T$();Z.exports=function(r){var a=r._a,n=r._b,o=a.length,i=n.length,l=r.aaxis,f=r.baxis,x=a[0],y=a[o-1],v=n[0],T=n[i-1],u=a[a.length-1]-a[0],b=n[n.length-1]-n[0],_=u*c.RELATIVE_CULL_TOLERANCE,P=b*c.RELATIVE_CULL_TOLERANCE;x-=_,y+=_,v-=P,T+=P,r.isVisible=function(M,C){return M>x&&Mv&&Cy||CT},r.setScale=function(){var M=r._x,C=r._y,A=I(r._xctrl,r._yctrl,M,C,l.smoothing,f.smoothing);r._xctrl=A[0],r._yctrl=A[1],r.evalxy=S([r._xctrl,r._yctrl],o,i,l.smoothing,f.smoothing),r.dxydi=t([r._xctrl,r._yctrl],l.smoothing,f.smoothing),r.dxydj=e([r._xctrl,r._yctrl],l.smoothing,f.smoothing)},r.i2a=function(M){var C=Math.max(0,Math.floor(M[0]),o-2),A=M[0]-C;return(1-A)*a[C]+A*a[C+1]},r.j2b=function(M){var C=Math.max(0,Math.floor(M[1]),o-2),A=M[1]-C;return(1-A)*n[C]+A*n[C+1]},r.ij2ab=function(M){return[r.i2a(M[0]),r.j2b(M[1])]},r.a2i=function(M){var C=Math.max(0,Math.min(g(M,a),o-2)),A=a[C],h=a[C+1];return Math.max(0,Math.min(o-1,C+(M-A)/(h-A)))},r.b2j=function(M){var C=Math.max(0,Math.min(g(M,n),i-2)),A=n[C],h=n[C+1];return Math.max(0,Math.min(i-1,C+(M-A)/(h-A)))},r.ab2ij=function(M){return[r.a2i(M[0]),r.b2j(M[1])]},r.i2c=function(M,C){return r.evalxy([],M,C)},r.ab2xy=function(M,C,A){if(!A&&(Ma[o-1]|Cn[i-1]))return[!1,!1];var h=r.a2i(M),p=r.b2j(C),k=r.evalxy([],h,p);if(A){var w=0,B=0,O=[],j,V,H,F;Ma[o-1]?(j=o-2,V=1,w=(M-a[o-1])/(a[o-1]-a[o-2])):(j=Math.max(0,Math.min(o-2,Math.floor(h))),V=h-j),Cn[i-1]?(H=i-2,F=1,B=(C-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(p))),F=p-H),w&&(r.dxydi(O,j,H,V,F),k[0]+=O[0]*w,k[1]+=O[1]*w),B&&(r.dxydj(O,j,H,V,F),k[0]+=O[0]*B,k[1]+=O[1]*B)}return k},r.c2p=function(M,C,A){return[C.c2p(M[0]),A.c2p(M[1])]},r.p2x=function(M,C,A){return[C.p2c(M[0]),A.p2c(M[1])]},r.dadi=function(M){var C=Math.max(0,Math.min(a.length-2,M));return a[C+1]-a[C]},r.dbdj=function(M){var C=Math.max(0,Math.min(n.length-2,M));return n[C+1]-n[C]},r.dxyda=function(M,C,A,h){var p=r.dxydi(null,M,C,A,h),k=r.dadi(M,A);return[p[0]/k,p[1]/k]},r.dxydb=function(M,C,A,h){var p=r.dxydj(null,M,C,A,h),k=r.dbdj(C,h);return[p[0]/k,p[1]/k]},r.dxyda_rough=function(M,C,A){var h=u*(A||.1),p=r.ab2xy(M+h,C,!0),k=r.ab2xy(M-h,C,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dxydb_rough=function(M,C,A){var h=b*(A||.1),p=r.ab2xy(M,C+h,!0),k=r.ab2xy(M,C-h,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dpdx=function(M){return M._m},r.dpdy=function(M){return M._m}}}),M$=Dt((Q,Z)=>{var c=Ls(),g=kn().isArray1D,I=d$(),S=p$(),t=m$(),e=g$(),r=v$(),a=$6(),n=y$(),o=q6(),i=A$();Z.exports=function(l,f){var x=c.getFromId(l,f.xaxis),y=c.getFromId(l,f.yaxis),v=f.aaxis,T=f.baxis,u=f.x,b=f.y,_=[];u&&g(u)&&_.push("x"),b&&g(b)&&_.push("y"),_.length&&o(f,v,T,"a","b",_);var P=f._a=f._a||f.a,M=f._b=f._b||f.b;u=f._x||f.x,b=f._y||f.y;var C={};if(f._cheater){var A=v.cheatertype==="index"?P.length:P,h=T.cheatertype==="index"?M.length:M;u=I(A,h,f.cheaterslope)}f._x=u=a(u),f._y=b=a(b),n(u,P,M),n(b,P,M),i(f),f.setScale();var p=S(u),k=S(b),w=.5*(p[1]-p[0]),B=.5*(p[1]+p[0]),O=.5*(k[1]-k[0]),j=.5*(k[1]+k[0]),V=1.3;return p=[B-w*V,B+w*V],k=[j-O*V,j+O*V],f._extremes[x._id]=c.findExtremes(x,p,{padded:!0}),f._extremes[y._id]=c.findExtremes(y,k,{padded:!0}),t(f,"a","b"),t(f,"b","a"),e(f,v),e(f,T),C.clipsegments=r(f._xctrl,f._yctrl,v,T),C.x=u,C.y=b,C.a=P,C.b=M,[C]}}),S$=Dt((Q,Z)=>{Z.exports={attributes:ET(),supplyDefaults:c$(),plot:f$(),calc:M$(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}),E$=Dt((Q,Z)=>{Z.exports=S$()}),GE=Dt((Q,Z)=>{var c=z0(),g=ef(),I=qo(),{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=kc(),a=Ia().extendFlat,n=g.marker,o=g.line,i=n.line;Z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},g.mode,{dflt:"markers"}),text:a({},g.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:a({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:a({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c(),marker:a({symbol:n.symbol,opacity:n.opacity,maxdisplayed:n.maxdisplayed,angle:n.angle,angleref:n.angleref,standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:i.width,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:a({},I.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:g.zorder}}),C$=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=O0(),e=bv(),r=x0(),a=D0(),n=GE();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}x("carpet"),i.xaxis="x",i.yaxis="y";var y=x("a"),v=x("b"),T=Math.min(y.length,v.length);if(!T){i.visible=!1;return}i._length=T,x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext");var u=T{Z.exports=function(c,g){var I={},S=g._carpet,t=S.ab2ij([c.a,c.b]),e=Math.floor(t[0]),r=t[0]-e,a=Math.floor(t[1]),n=t[1]-a,o=S.evalxy([],e,a,r,n);return I.yLabel=o[1].toFixed(3),I}}),CT=Dt((Q,Z)=>{Z.exports=function(c,g){for(var I=c._fullData.length,S,t=0;t{var c=Hn(),g=B0(),I=ct(),S=Rt(),t=me().calcMarkerSize,e=CT();Z.exports=function(r,a){var n=a._carpetTrace=e(r,a);if(!(!n||!n.visible||n.visible==="legendonly")){var o;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var i=a._length,l=new Array(i),f,x,y=!1;for(o=0;o{var c=Ka(),g=Ls(),I=Vs();Z.exports=function(S,t,e,r){var a,n,o,i=e[0][0].carpet,l=g.getFromId(S,i.xaxis||"x"),f=g.getFromId(S,i.yaxis||"y"),x={xaxis:l,yaxis:f,plot:t.plot};for(a=0;a{var c=Md(),g=kn().fillText;Z.exports=function(I,S,t,e){var r=c(I,S,t,e);if(!r||r[0].index===!1)return;var a=r[0];if(a.index===void 0){var n=1-a.y0/I.ya._length,o=I.xa._length,i=o*n/2,l=o-i;return a.x0=Math.max(Math.min(a.x0,l),i),a.x1=Math.max(Math.min(a.x1,l),i),r}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var x=a.trace,y=x._carpet,v=x._module.formatLabels(f,x);a.yLabel=v.yLabel,delete a.text;var T=[];function u(P,M){var C;P.labelprefix&&P.labelprefix.length>0?C=P.labelprefix.replace(/ = $/,""):C=P._hovertitle,T.push(C+": "+M.toFixed(3)+P.labelsuffix)}if(!x.hovertemplate){var b=f.hi||x.hoverinfo,_=b.split("+");_.indexOf("all")!==-1&&(_=["a","b","text"]),_.indexOf("a")!==-1&&u(y.aaxis,f.a),_.indexOf("b")!==-1&&u(y.baxis,f.b),T.push("y: "+a.yLabel),_.indexOf("text")!==-1&&g(f,x,T),a.extraText=T.join("
")}return r}}),O$=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=S[t];return c.a=e.a,c.b=e.b,c.y=e.y,c}}),D$=Dt((Q,Z)=>{Z.exports={attributes:GE(),supplyDefaults:C$(),colorbar:xo(),formatLabels:L$(),calc:P$(),plot:I$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:z$(),selectPoints:Nf(),eventData:O$(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}),F$=Dt((Q,Z)=>{Z.exports=D$()}),YE=Dt((Q,Z)=>{var c=rb(),g=Gw(),I=kc(),S=Ia().extendFlat,t=g.contours;Z.exports=S({carpet:{valType:"string",editType:"calc"},z:c.z,a:c.x,a0:c.x0,da:c.dx,b:c.y,b0:c.y0,db:c.dy,text:c.text,hovertext:c.hovertext,transpose:c.transpose,atype:c.xtype,btype:c.ytype,fillcolor:g.fillcolor,autocontour:g.autocontour,ncontours:g.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},zorder:g.zorder},I("",{cLetter:"z",autoColorDflt:!1}))}),KE=Dt((Q,Z)=>{var c=kn(),g=W6(),I=YE(),S=b7(),t=ik(),e=ak();Z.exports=function(r,a,n,o){function i(y,v){return c.coerce(r,a,I,y,v)}function l(y){return c.coerce2(r,a,I,y)}if(i("carpet"),r.a&&r.b){var f=g(r,a,i,o,"a","b");if(!f){a.visible=!1;return}i("text");var x=i("contours.type")==="constraint";x?S(r,a,i,o,n,{hasHover:!1}):(t(r,a,i,l),e(r,a,i,o,{hasHover:!1}))}else a._defaultColor=n,a._length=null;i("zorder")}}),B$=Dt((Q,Z)=>{var c=Xd(),g=kn(),I=q6(),S=$6(),t=Z6(),e=G6(),r=a7(),a=KE(),n=CT(),o=f7();Z.exports=function(l,f){var x=f._carpetTrace=n(l,f);if(!(!x||!x.visible||x.visible==="legendonly")){if(!f.a||!f.b){var y=l.data[x.index],v=l.data[f.index];v.a||(v.a=y.a),v.b||(v.b=y.b),a(v,f,f._defaultColor,l._fullLayout)}var T=i(l,f);return o(f,f._z),T}};function i(l,f){var x=f._carpetTrace,y=x.aaxis,v=x.baxis,T,u,b,_,P,M,C;y._minDtick=0,v._minDtick=0,g.isArray1D(f.z)&&I(f,y,v,"a","b",["z"]),T=f._a=f._a||f.a,_=f._b=f._b||f.b,T=T?y.makeCalcdata(f,"_a"):[],_=_?v.makeCalcdata(f,"_b"):[],u=f.a0||0,b=f.da||1,P=f.b0||0,M=f.db||1,C=f._z=S(f._z||f.z,f.transpose),f._emptypoints=e(C),t(C,f._emptypoints);var A=g.maxRowLength(C),h=f.xtype==="scaled"?"":T,p=r(f,h,u,b,A,y),k=f.ytype==="scaled"?"":_,w=r(f,k,P,M,C.length,v),B={a:p,b:w,z:C};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&c(l,f,{vals:C,containerStr:"",cLetter:"z"}),[B]}}),R$=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b=c(S)?"a":"b",_=b==="a"?g.aaxis:g.baxis,P=_.smoothing,M=b==="a"?g.a2i:g.b2j,C=b==="a"?S:t,A=b==="a"?t:S,h=b==="a"?I.a.length:I.b.length,p=b==="a"?I.b.length:I.a.length,k=Math.floor(b==="a"?g.b2j(A):g.a2i(A)),w=b==="a"?function(yt){return g.evalxy([],yt,k)}:function(yt){return g.evalxy([],k,yt)};P&&(a=Math.max(0,Math.min(p-2,k)),n=k-a,r=b==="a"?function(yt,mt){return g.dxydi([],yt,a,mt,n)}:function(yt,mt){return g.dxydj([],a,yt,n,mt)});var B=M(C[0]),O=M(C[1]),j=B0?Math.floor:Math.ceil,F=j>0?Math.ceil:Math.floor,U=j>0?Math.min:Math.max,W=j>0?Math.max:Math.min,q=H(B+V),J=F(O-V);l=w(B);var lt=[[l]];for(e=q;e*j{var c=Wr(),g=$E(),I=ZE(),S=Vs(),t=kn(),e=p7(),r=m7(),a=ok(),n=Kw(),o=v7(),i=g7(),l=y7(),f=CT(),x=R$();Z.exports=function(A,h,p,k){var w=h.xaxis,B=h.yaxis;t.makeTraceGroups(k,p,"contour").each(function(O){var j=c.select(this),V=O[0],H=V.trace,F=H._carpetTrace=f(A,H),U=A.calcdata[F.index][0];if(!F.visible||F.visible==="legendonly")return;var W=V.a,q=V.b,J=H.contours,lt=i(J,h,V),yt=J.type==="constraint",mt=J._operation,st=yt?mt==="="?"lines":"fill":J.coloring;function tt(Pt){var qt=F.ab2xy(Pt[0],Pt[1],!0);return[w.c2p(qt[0]),B.c2p(qt[1])]}var pt=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];e(lt);var rt=(W[W.length-1]-W[0])*1e-8,at=(q[q.length-1]-q[0])*1e-8;r(lt,rt,at);var vt=lt;J.type==="constraint"&&(vt=o(lt,mt)),y(lt,tt);var it,K,ft,ut,kt=[];for(ut=U.clipsegments.length-1;ut>=0;ut--)it=U.clipsegments[ut],K=g([],it.x,w.c2p),ft=g([],it.y,B.c2p),K.reverse(),ft.reverse(),kt.push(I(K,ft,it.bicubic));var It="M"+kt.join("L")+"Z";P(j,U.clipsegments,w,B,yt,st),M(H,j,w,B,vt,pt,tt,F,U,st,It),v(j,lt,A,V,J,h,F),S.setClipUrl(j,F._clipPathId,A)})};function y(A,h){var p,k,w,B,O,j,V,H,F;for(p=0;pyt&&(k.max=yt),k.len=k.max-k.min}function u(A,h,p){var k=A.getPointAtLength(h),w=A.getPointAtLength(p),B=w.x-k.x,O=w.y-k.y,j=Math.sqrt(B*B+O*O);return[B/j,O/j]}function b(A){var h=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/h,A[1]/h]}function _(A,h){var p=Math.abs(A[0]*h[0]+A[1]*h[1]),k=Math.sqrt(1-p*p);return k/p}function P(A,h,p,k,w,B){var O,j,V,H,F=t.ensureSingle(A,"g","contourbg"),U=F.selectAll("path").data(B==="fill"&&!w?[0]:[]);U.enter().append("path"),U.exit().remove();var W=[];for(H=0;H=0&&(q=ft,lt=yt):Math.abs(W[1]-q[1])=0&&(q=ft,lt=yt):t.log("endpt to newendpt is not vert. or horz.",W,q,ft)}if(lt>=0)break;H+=it(W,q),W=q}if(lt===h.edgepaths.length){t.log("unclosed perimeter path");break}V=lt,U=F.indexOf(V)===-1,U&&(V=F[0],H+=it(W,q)+"Z",W=null)}for(V=0;V{Z.exports={attributes:YE(),supplyDefaults:KE(),colorbar:lk(),calc:B$(),plot:N$(),style:sk(),moduleType:"trace",name:"contourcarpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}),U$=Dt((Q,Z)=>{Z.exports=j$()}),LT=Dt((Q,Z)=>{var c=kn().extendFlat,g=ef(),I=ph().axisHoverFormat,S=kd().dash,t=us(),e=nb(),r=e.INCREASING.COLOR,a=e.DECREASING.COLOR,n=g.line;function o(i){return{line:{color:c({},n.color,{dflt:i}),width:n.width,dash:S,editType:"style"},editType:"style"}}Z.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.xperiodalignment,xhoverformat:I("x"),yhoverformat:I("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:c({},n.width,{}),dash:c({},S,{}),editType:"style"},increasing:o(r),decreasing:o(a),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:c({},t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:g.zorder}}),XE=Dt((Q,Z)=>{var c=Qo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("open"),n=t("high"),o=t("low"),i=t("close");t("hoverlabel.split");var l=c.getComponentMethod("calendars","handleTraceDefaults");if(l(I,S,["x"],e),!!(a&&n&&o&&i)){var f=Math.min(a.length,n.length,o.length,i.length);return r&&(f=Math.min(f,g.minRowLength(r))),S._length=f,f}}}),V$=Dt((Q,Z)=>{var c=kn(),g=XE(),I=Bp(),S=LT();Z.exports=function(e,r,a,n){function o(l,f){return c.coerce(e,r,S,l,f)}var i=g(e,r,o,n);if(!i){r.visible=!1;return}I(e,r,n,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(e,r,o,"increasing"),t(e,r,o,"decreasing"),o("text"),o("hovertext"),o("tickwidth"),n._requestRangeslider[r.xaxis]=!0,o("zorder")};function t(e,r,a,n){a(n+".line.color"),a(n+".line.width",r.line.width),a(n+".line.dash",r.line.dash)}}),JE=Dt((Q,Z)=>{var c=kn(),g=c._,I=Ls(),S=F0(),t=sa().BADNUM;function e(o,i){var l=I.getFromId(o,i.xaxis),f=I.getFromId(o,i.yaxis),x=n(o,l,i),y=i._minDiff;i._minDiff=null;var v=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var u=a(o,i,v,T,f,r);return i._extremes[l._id]=I.findExtremes(l,T,{vpad:y/2}),u.length?(c.extendFlat(u[0].t,{wHover:y/2,tickLen:x}),u):[{t:{empty:!0}}]}function r(o,i,l,f){return{o,h:i,l,c:f}}function a(o,i,l,f,x,y){for(var v=x.makeCalcdata(i,"open"),T=x.makeCalcdata(i,"high"),u=x.makeCalcdata(i,"low"),b=x.makeCalcdata(i,"close"),_=c.isArrayOrTypedArray(i.text),P=c.isArrayOrTypedArray(i.hovertext),M=!0,C=null,A=!!i.xperiodalignment,h=[],p=0;pC):M=j>w,C=j;var V=y(w,B,O,j);V.pos=k,V.yc=(w+j)/2,V.i=p,V.dir=M?"increasing":"decreasing",V.x=V.pos,V.y=[O,B],A&&(V.orig_p=l[p]),_&&(V.tx=i.text[p]),P&&(V.htx=i.hovertext[p]),h.push(V)}else h.push({pos:k,empty:!0})}return i._extremes[x._id]=I.findExtremes(x,c.concat(u,T),{padded:!0}),h.length&&(h[0].t={labels:{open:g(o,"open:")+" ",high:g(o,"high:")+" ",low:g(o,"low:")+" ",close:g(o,"close:")+" "}}),h}function n(o,i,l){var f=l._minDiff;if(!f){var x=o._fullData,y=[];f=1/0;var v;for(v=0;v{var c=Wr(),g=kn();Z.exports=function(I,S,t,e){var r=S.yaxis,a=S.xaxis,n=!!a.rangebreaks;g.makeTraceGroups(e,t,"trace ohlc").each(function(o){var i=c.select(this),l=o[0],f=l.t,x=l.trace;if(x.visible!==!0||f.empty){i.remove();return}var y=f.tickLen,v=i.selectAll("path").data(g.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(T){if(T.empty)return"M0,0Z";var u=a.c2p(T.pos-y,!0),b=a.c2p(T.pos+y,!0),_=n?(u+b)/2:a.c2p(T.pos,!0),P=r.c2p(T.o,!0),M=r.c2p(T.h,!0),C=r.c2p(T.l,!0),A=r.c2p(T.c,!0);return"M"+u+","+P+"H"+_+"M"+_+","+M+"V"+C+"M"+b+","+A+"H"+_})})}}),W$=Dt((Q,Z)=>{var c=Wr(),g=Vs(),I=pi();Z.exports=function(S,t,e){var r=e||c.select(S).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var n=a[0].trace;c.select(this).selectAll("path").each(function(o){if(!o.empty){var i=n[o.dir].line;c.select(this).style("fill","none").call(I.stroke,i.color).call(g.dashLine,i.dash,i.width).style("opacity",n.selectedpoints&&!o.selected?.3:1)}})})}}),QE=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=pi(),t=kn().fillText,e=nb(),r={increasing:e.INCREASING.SYMBOL,decreasing:e.DECREASING.SYMBOL};function a(l,f,x,y){var v=l.cd,T=v[0].trace;return T.hoverlabel.split?o(l,f,x,y):i(l,f,x,y)}function n(l,f,x,y){var v=l.cd,T=l.xa,u=v[0].trace,b=v[0].t,_=u.type,P=_==="ohlc"?"l":"min",M=_==="ohlc"?"h":"max",C,A,h=b.bPos||0,p=function(J){return J.pos+h-f},k=b.bdPos||b.tickLen,w=b.wHover,B=Math.min(1,k/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));C=l.maxHoverDistance-B,A=l.maxSpikeDistance-B;function O(J){var lt=p(J);return I.inbox(lt-w,lt+w,C)}function j(J){var lt=J[P],yt=J[M];return lt===yt||I.inbox(lt-x,yt-x,C)}function V(J){return(O(J)+j(J))/2}var H=I.getDistanceFunction(y,O,j,V);if(I.getClosest(v,H,l),l.index===!1)return null;var F=v[l.index];if(F.empty)return null;var U=F.dir,W=u[U],q=W.line.color;return S.opacity(q)&&W.line.width?l.color=q:l.color=W.fillcolor,l.x0=T.c2p(F.pos+h-k,!0),l.x1=T.c2p(F.pos+h+k,!0),l.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,l.spikeDistance=V(F)*A/C,l.xSpike=T.c2p(F.pos,!0),l}function o(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=[],P=n(l,f,x,y);if(!P)return[];var M=P.index,C=v[M],A=C.hi||u.hoverinfo,h=A.split("+"),p=A==="all",k=p||h.indexOf("y")!==-1;if(!k)return[];for(var w=["high","open","close","low"],B={},O=0;O"+b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat)):(F=g.extendFlat({},P),F.y0=F.y1=H,F.yLabelVal=V,F.yLabel=b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat),F.name="",_.push(F),B[V]=F)}return _}function i(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=n(l,f,x,y);if(!_)return[];var P=_.index,M=v[P],C=_.index=M.i,A=M.dir;function h(V){return b.labels[V]+c.hoverLabelText(T,u[V][C],u.yhoverformat)}var p=M.hi||u.hoverinfo,k=p.split("+"),w=p==="all",B=w||k.indexOf("y")!==-1,O=w||k.indexOf("text")!==-1,j=B?[h("open"),h("high"),h("low"),h("close")+" "+r[A]]:[];return O&&t(M,u,j),_.extraText=j.join("
"),_.y0=_.y1=T.c2p(M.yc,!0),[_]}Z.exports={hoverPoints:a,hoverSplit:o,hoverOnPoints:i}}),tC=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a=I[0].t.bPos||0;if(g===!1)for(r=0;r{Z.exports={moduleType:"trace",name:"ohlc",basePlotModule:Mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:LT(),supplyDefaults:V$(),calc:JE().calc,plot:H$(),style:W$(),hoverPoints:QE().hoverPoints,selectPoints:tC()}}),$$=Dt((Q,Z)=>{Z.exports=q$()}),eC=Dt((Q,Z)=>{var c=kn().extendFlat,g=ph().axisHoverFormat,I=LT(),S=Ww();function t(e){return{line:{color:c({},S.line.color,{dflt:e}),width:S.line.width,editType:"style"},fillcolor:S.fillcolor,editType:"style"}}Z.exports={xperiod:I.xperiod,xperiod0:I.xperiod0,xperiodalignment:I.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:I.x,open:I.open,high:I.high,low:I.low,close:I.close,line:{width:c({},S.line.width,{}),editType:"style"},increasing:t(I.increasing.line.color.dflt),decreasing:t(I.decreasing.line.color.dflt),text:I.text,hovertext:I.hovertext,whiskerwidth:c({},S.whiskerwidth,{dflt:0}),hoverlabel:I.hoverlabel,zorder:S.zorder}}),Z$=Dt((Q,Z)=>{var c=kn(),g=pi(),I=XE(),S=Bp(),t=eC();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,t,f,x)}var l=I(r,a,i,o);if(!l){a.visible=!1;return}S(r,a,o,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),e(r,a,i,"increasing"),e(r,a,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),o._requestRangeslider[a.xaxis]=!0,i("zorder")};function e(r,a,n,o){var i=n(o+".line.color");n(o+".line.width",a.line.width),n(o+".fillcolor",g.addOpacity(i,.5))}}),G$=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=F0(),S=JE().calcCommon;Z.exports=function(e,r){var a=e._fullLayout,n=g.getFromId(e,r.xaxis),o=g.getFromId(e,r.yaxis),i=n.makeCalcdata(r,"x"),l=I(r,n,"x",i).vals,f=S(e,r,i,l,o,t);return f.length?(c.extendFlat(f[0].t,{num:a._numBoxes,dPos:c.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),a._numBoxes++,f):[{t:{empty:!0}}]};function t(e,r,a,n){return{min:a,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:r}}}),Y$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"candlestick",basePlotModule:Mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:eC(),layoutAttributes:qw(),supplyLayoutDefaults:j6().supplyLayoutDefaults,crossTraceCalc:U6().crossTraceCalc,supplyDefaults:Z$(),calc:G$(),plot:V6().plot,layerName:"boxlayer",style:H6().style,hoverPoints:QE().hoverPoints,selectPoints:tC()}}),K$=Dt((Q,Z)=>{Z.exports=Y$()}),rC=Dt((Q,Z)=>{var c=kn(),g=i0(),I=c.deg2rad,S=c.rad2deg;Z.exports=function(n,o,i){switch(g(n,i),n._id){case"x":case"radialaxis":t(n,o);break;case"angularaxis":a(n,o);break}};function t(n,o){var i=o._subplot;n.setGeometry=function(){var l=n._rl[0],f=n._rl[1],x=i.innerRadius,y=(i.radius-x)/(f-l),v=x/y,T=l>f?function(u){return u<=0}:function(u){return u>=0};n.c2g=function(u){var b=n.c2l(u)-l;return(T(b)?b:0)+v},n.g2c=function(u){return n.l2c(u+l-v)},n.g2p=function(u){return u*y},n.c2p=function(u){return n.g2p(n.c2g(u))}}}function e(n,o){return o==="degrees"?I(n):n}function r(n,o){return o==="degrees"?S(n):n}function a(n,o){var i=n.type;if(i==="linear"){var l=n.d2c,f=n.c2d;n.d2c=function(x,y){return e(l(x),y)},n.c2d=function(x,y){return f(r(x,y))}}n.makeCalcdata=function(x,y){var v=x[y],T=x._length,u,b,_=function(h){return n.d2c(h,x.thetaunit)};if(v)for(u=new Array(T),b=0;b{Z.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}}),IT=Dt((Q,Z)=>{var c=kn(),g=mm().tester,I=c.findIndexOfMin,S=c.isAngleInsideSector,t=c.angleDelta,e=c.angleDist;function r(b,_,P,M,C){if(!S(_,M))return!1;var A,h;P[0]0?h:1/0},M=I(_,P),C=c.mod(M+1,_.length);return[_[M],_[C]]}function y(b){return Math.abs(b)>1e-10?b:0}function v(b,_,P){_=_||0,P=P||0;for(var M=b.length,C=new Array(M),A=0;A{function c(r){return r<0?-1:r>0?1:0}function g(r){var a=r[0],n=r[1];if(!isFinite(a)||!isFinite(n))return[1,0];var o=(a+1)*(a+1)+n*n;return[(a*a+n*n-1)/o,2*n/o]}function I(r,a){var n=a[0],o=a[1];return[n*r.radius+r.cx,-o*r.radius+r.cy]}function S(r,a){return a*r.radius}function t(r,a,n,o){var i=I(r,g([n,a])),l=i[0],f=i[1],x=I(r,g([o,a])),y=x[0],v=x[1];if(a===0)return["M"+l+","+f,"L"+y+","+v].join(" ");var T=S(r,1/Math.abs(a));return["M"+l+","+f,"A"+T+","+T+" 0 0,"+(a<0?1:0)+" "+y+","+v].join(" ")}function e(r,a,n,o){var i=S(r,1/(a+1)),l=I(r,g([a,n])),f=l[0],x=l[1],y=I(r,g([a,o])),v=y[0],T=y[1];if(c(n)!==c(o)){var u=I(r,g([a,0])),b=u[0],_=u[1];return["M"+f+","+x,"A"+i+","+i+" 0 0,"+(0{var c=Wr(),g=ro(),I=Qo(),S=kn(),t=S.strRotate,e=S.strTranslate,r=pi(),a=Vs(),n=Kc(),o=Ls(),i=i0(),l=rC(),f=K0().doAutoRange,x=P1(),y=cp(),v=tf(),T=up(),u=vf().prepSelect,b=vf().selectOnClick,_=vf().clearOutline,P=I0(),M=vv(),C=y0().redrawReglTraces,A=Af().MID_SHIFT,h=PT(),p=IT(),k=nC(),w=k.smith,B=k.reactanceArc,O=k.resistanceArc,j=k.smithTransform,V=S._,H=S.mod,F=S.deg2rad,U=S.rad2deg;function W(st,tt,pt){this.isSmith=pt||!1,this.id=tt,this.gd=st,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var rt=st._fullLayout,at="clip"+rt._uid+tt;this.clipIds.forTraces=at+"-for-traces",this.clipPaths.forTraces=rt._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=rt["_"+(pt?"smith":"polar")+"layer"].append("g").attr("class",tt),this.getHole=function(vt){return this.isSmith?0:vt.hole},this.getSector=function(vt){return this.isSmith?[0,360]:vt.sector},this.getRadial=function(vt){return this.isSmith?vt.realaxis:vt.radialaxis},this.getAngular=function(vt){return this.isSmith?vt.imaginaryaxis:vt.angularaxis},pt||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=W.prototype;Z.exports=function(st,tt,pt){return new W(st,tt,pt)},q.plot=function(st,tt){for(var pt=this,rt=tt[pt.id],at=!1,vt=0;vtge?(fe=ut,pe=ut*ge,Lt=(kt-pe)/at.h/2,se=[K[0],K[1]],Tt=[ft[0]+Lt,ft[1]-Lt]):(fe=kt/ge,pe=kt,Lt=(ut-fe)/at.w/2,se=[K[0]+Lt,K[1]-Lt],Tt=[ft[0],ft[1]]),pt.xLength2=fe,pt.yLength2=pe,pt.xDomain2=se,pt.yDomain2=Tt;var Mt=pt.xOffset2=at.l+at.w*se[0],ee=pt.yOffset2=at.t+at.h*(1-Tt[1]),ve=pt.radius=fe/qt,oe=pt.innerRadius=pt.getHole(tt)*ve,Ae=pt.cx=Mt-ve*Pt[0],He=pt.cy=ee+ve*Pt[3],Ge=pt.cxx=Ae-Mt,cr=pt.cyy=He-ee,ur=vt.side,jr;ur==="counterclockwise"?(jr=ur,ur="top"):ur==="clockwise"&&(jr=ur,ur="bottom"),pt.radialAxis=pt.mockAxis(st,tt,vt,{_id:"x",side:ur,_trueSide:jr,domain:[oe/at.w,ve/at.w]}),pt.angularAxis=pt.mockAxis(st,tt,it,{side:"right",domain:[0,Math.PI],autorange:!1}),pt.doAutoRange(st,tt),pt.updateAngularAxis(st,tt),pt.updateRadialAxis(st,tt),pt.updateRadialAxisTitle(st,tt),pt.xaxis=pt.mockCartesianAxis(st,tt,{_id:"x",domain:se}),pt.yaxis=pt.mockCartesianAxis(st,tt,{_id:"y",domain:Tt});var qr=pt.pathSubplot();pt.clipPaths.forTraces.select("path").attr("d",qr).attr("transform",e(Ge,cr)),rt.frontplot.attr("transform",e(Mt,ee)).call(a.setClipUrl,pt._hasClipOnAxisFalse?null:pt.clipIds.forTraces,pt.gd),rt.bg.attr("d",qr).attr("transform",e(Ae,He)).call(r.fill,tt.bgcolor)},q.mockAxis=function(st,tt,pt,rt){var at=S.extendFlat({},pt,rt);return l(at,tt,st),at},q.mockCartesianAxis=function(st,tt,pt){var rt=this,at=rt.isSmith,vt=pt._id,it=S.extendFlat({type:"linear"},pt);i(it,st);var K={x:[0,2],y:[1,3]};return it.setRange=function(){var ft=rt.sectorBBox,ut=K[vt],kt=rt.radialAxis._rl,It=(kt[1]-kt[0])/(1-rt.getHole(tt));it.range=[ft[ut[0]]*It,ft[ut[1]]*It]},it.isPtWithinRange=vt==="x"&&!at?function(ft){return rt.isPtInside(ft)}:function(){return!0},it.setRange(),it.setScale(),it},q.doAutoRange=function(st,tt){var pt=this,rt=pt.gd,at=pt.radialAxis,vt=pt.getRadial(tt);f(rt,at);var it=at.range;if(vt.range=it.slice(),vt._input.range=it.slice(),at._rl=[at.r2l(it[0],null,"gregorian"),at.r2l(it[1],null,"gregorian")],at.minallowed!==void 0){var K=at.r2l(at.minallowed);at._rl[0]>at._rl[1]?at._rl[1]=Math.max(at._rl[1],K):at._rl[0]=Math.max(at._rl[0],K)}if(at.maxallowed!==void 0){var ft=at.r2l(at.maxallowed);at._rl[0]90&&kt<=270&&(It.tickangle=180);var Wt=qt?function(ve){var oe=j(pt,w([ve.x,0]));return e(oe[0]-K,oe[1]-ft)}:function(ve){return e(It.l2p(ve.x)+it,0)},Jt=qt?function(ve){return O(pt,ve.x,-1/0,1/0)}:function(ve){return pt.pathArc(It.r2p(ve.x)+it)},ge=J(ut);if(pt.radialTickLayout!==ge&&(at["radial-axis"].selectAll(".xtick").remove(),pt.radialTickLayout=ge),Pt){It.setScale();var fe=0,pe=qt?(It.tickvals||[]).filter(function(ve){return ve>=0}).map(function(ve){return o.tickText(It,ve,!0,!1)}):o.calcTicks(It),se=qt?pe:o.clipEnds(It,pe),Tt=o.getTickSigns(It)[2];qt&&((It.ticks==="top"&&It.side==="bottom"||It.ticks==="bottom"&&It.side==="top")&&(Tt=-Tt),It.ticks==="top"&&It.side==="top"&&(fe=-It.ticklen),It.ticks==="bottom"&&It.side==="bottom"&&(fe=It.ticklen)),o.drawTicks(rt,It,{vals:pe,layer:at["radial-axis"],path:o.makeTickPath(It,0,Tt),transFn:Wt,crisp:!1}),o.drawGrid(rt,It,{vals:se,layer:at["radial-grid"],path:Jt,transFn:S.noop,crisp:!1}),o.drawLabels(rt,It,{vals:pe,layer:at["radial-axis"],transFn:Wt,labelFns:o.makeLabelFns(It,fe)})}var Lt=pt.radialAxisAngle=pt.vangles?U(yt(F(ut.angle),pt.vangles)):ut.angle,Mt=e(K,ft),ee=Mt+t(-Lt);mt(at["radial-axis"],Pt&&(ut.showticklabels||ut.ticks),{transform:ee}),mt(at["radial-grid"],Pt&&ut.showgrid,{transform:qt?"":Mt}),mt(at["radial-line"].select("line"),Pt&&ut.showline,{x1:qt?-vt:it,y1:0,x2:vt,y2:0,transform:ee}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateRadialAxisTitle=function(st,tt,pt){if(!this.isSmith){var rt=this,at=rt.gd,vt=rt.radius,it=rt.cx,K=rt.cy,ft=rt.getRadial(tt),ut=rt.id+"title",kt=0;if(ft.title){var It=a.bBox(rt.layers["radial-axis"].node()).height,Pt=ft.title.font.size,qt=ft.side;kt=qt==="top"?Pt:qt==="counterclockwise"?-(It+Pt*.4):It+Pt*.8}var Wt=pt!==void 0?pt:rt.radialAxisAngle,Jt=F(Wt),ge=Math.cos(Jt),fe=Math.sin(Jt),pe=it+vt/2*ge+kt*fe,se=K-vt/2*fe+kt*ge;rt.layers["radial-axis-title"]=T.draw(at,ut,{propContainer:ft,propName:rt.id+".radialaxis.title.text",placeholder:V(at,"Click to enter radial axis title"),attributes:{x:pe,y:se,"text-anchor":"middle"},transform:{rotate:-Wt}})}},q.updateAngularAxis=function(st,tt){var pt=this,rt=pt.gd,at=pt.layers,vt=pt.radius,it=pt.innerRadius,K=pt.cx,ft=pt.cy,ut=pt.getAngular(tt),kt=pt.angularAxis,It=pt.isSmith;It||(pt.fillViewInitialKey("angularaxis.rotation",ut.rotation),kt.setGeometry(),kt.setScale());var Pt=It?function(oe){var Ae=j(pt,w([0,oe.x]));return Math.atan2(Ae[0]-K,Ae[1]-ft)-Math.PI/2}:function(oe){return kt.t2g(oe.x)};kt.type==="linear"&&kt.thetaunit==="radians"&&(kt.tick0=U(kt.tick0),kt.dtick=U(kt.dtick));var qt=function(oe){return e(K+vt*Math.cos(oe),ft-vt*Math.sin(oe))},Wt=It?function(oe){var Ae=j(pt,w([0,oe.x]));return e(Ae[0],Ae[1])}:function(oe){return qt(Pt(oe))},Jt=It?function(oe){var Ae=j(pt,w([0,oe.x])),He=Math.atan2(Ae[0]-K,Ae[1]-ft)-Math.PI/2;return e(Ae[0],Ae[1])+t(-U(He))}:function(oe){var Ae=Pt(oe);return qt(Ae)+t(-U(Ae))},ge=It?function(oe){return B(pt,oe.x,0,1/0)}:function(oe){var Ae=Pt(oe),He=Math.cos(Ae),Ge=Math.sin(Ae);return"M"+[K+it*He,ft-it*Ge]+"L"+[K+vt*He,ft-vt*Ge]},fe=o.makeLabelFns(kt,0),pe=fe.labelStandoff,se={};se.xFn=function(oe){var Ae=Pt(oe);return Math.cos(Ae)*pe},se.yFn=function(oe){var Ae=Pt(oe),He=Math.sin(Ae)>0?.2:1;return-Math.sin(Ae)*(pe+oe.fontSize*He)+Math.abs(Math.cos(Ae))*(oe.fontSize*A)},se.anchorFn=function(oe){var Ae=Pt(oe),He=Math.cos(Ae);return Math.abs(He)<.1?"middle":He>0?"start":"end"},se.heightFn=function(oe,Ae,He){var Ge=Pt(oe);return-.5*(1+Math.sin(Ge))*He};var Tt=J(ut);pt.angularTickLayout!==Tt&&(at["angular-axis"].selectAll("."+kt._id+"tick").remove(),pt.angularTickLayout=Tt);var Lt=It?[1/0].concat(kt.tickvals||[]).map(function(oe){return o.tickText(kt,oe,!0,!1)}):o.calcTicks(kt);It&&(Lt[0].text="∞",Lt[0].fontSize*=1.75);var Mt;if(tt.gridshape==="linear"?(Mt=Lt.map(Pt),S.angleDelta(Mt[0],Mt[1])<0&&(Mt=Mt.slice().reverse())):Mt=null,pt.vangles=Mt,kt.type==="category"&&(Lt=Lt.filter(function(oe){return S.isAngleInsideSector(Pt(oe),pt.sectorInRad)})),kt.visible){var ee=kt.ticks==="inside"?-1:1,ve=(kt.linewidth||1)/2;o.drawTicks(rt,kt,{vals:Lt,layer:at["angular-axis"],path:"M"+ee*ve+",0h"+ee*kt.ticklen,transFn:Jt,crisp:!1}),o.drawGrid(rt,kt,{vals:Lt,layer:at["angular-grid"],path:ge,transFn:S.noop,crisp:!1}),o.drawLabels(rt,kt,{vals:Lt,layer:at["angular-axis"],repositionOnUpdate:!0,transFn:Wt,labelFns:se})}mt(at["angular-line"].select("path"),ut.showline,{d:pt.pathSubplot(),transform:e(K,ft)}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateFx=function(st,tt){if(!this.gd._context.staticPlot){var pt=!this.isSmith;pt&&(this.updateAngularDrag(st),this.updateRadialDrag(st,tt,0),this.updateRadialDrag(st,tt,1)),this.updateHoverAndMainDrag(st)}},q.updateHoverAndMainDrag=function(st){var tt=this,pt=tt.isSmith,rt=tt.gd,at=tt.layers,vt=st._zoomlayer,it=h.MINZOOM,K=h.OFFEDGE,ft=tt.radius,ut=tt.innerRadius,kt=tt.cx,It=tt.cy,Pt=tt.cxx,qt=tt.cyy,Wt=tt.sectorInRad,Jt=tt.vangles,ge=tt.radialAxis,fe=p.clampTiny,pe=p.findXYatLength,se=p.findEnclosingVertexAngles,Tt=h.cornerHalfWidth,Lt=h.cornerLen/2,Mt,ee,ve=x.makeDragger(at,"path","maindrag",st.dragmode===!1?"none":"crosshair");c.select(ve).attr("d",tt.pathSubplot()).attr("transform",e(kt,It)),ve.onmousemove=function(Mr){v.hover(rt,Mr,tt.id),rt._fullLayout._lasthover=ve,rt._fullLayout._hoversubplot=tt.id},ve.onmouseout=function(Mr){rt._dragging||y.unhover(rt,Mr)};var oe={element:ve,gd:rt,subplot:tt.id,plotinfo:{id:tt.id,xaxis:tt.xaxis,yaxis:tt.yaxis},xaxes:[tt.xaxis],yaxes:[tt.yaxis]},Ae,He,Ge,cr,ur,jr,qr,br,Xr;function nn(Mr,mr){return Math.sqrt(Mr*Mr+mr*mr)}function Le(Mr,mr){return nn(Mr-Pt,mr-qt)}function Gt(Mr,mr){return Math.atan2(qt-mr,Mr-Pt)}function ne(Mr,mr){return[Mr*Math.cos(mr),Mr*Math.sin(-mr)]}function Ct(Mr,mr){if(Mr===0)return tt.pathSector(2*Tt);var Qr=Lt/Mr,Wn=mr-Qr,qn=mr+Qr,ei=Math.max(0,Math.min(Mr,ft)),Di=ei-Tt,ui=ei+Tt;return"M"+ne(Di,Wn)+"A"+[Di,Di]+" 0,0,0 "+ne(Di,qn)+"L"+ne(ui,qn)+"A"+[ui,ui]+" 0,0,1 "+ne(ui,Wn)+"Z"}function gt(Mr,mr,Qr){if(Mr===0)return tt.pathSector(2*Tt);var Wn=ne(Mr,mr),qn=ne(Mr,Qr),ei=fe((Wn[0]+qn[0])/2),Di=fe((Wn[1]+qn[1])/2),ui,Gn;if(ei&&Di){var ua=Di/ei,Yi=-1/ua,We=pe(Tt,ua,ei,Di);ui=pe(Lt,Yi,We[0][0],We[0][1]),Gn=pe(Lt,Yi,We[1][0],We[1][1])}else{var nr,dr;Di?(nr=Lt,dr=Tt):(nr=Tt,dr=Lt),ui=[[ei-nr,Di-dr],[ei+nr,Di-dr]],Gn=[[ei-nr,Di+dr],[ei+nr,Di+dr]]}return"M"+ui.join("L")+"L"+Gn.reverse().join("L")+"Z"}function St(){Ge=null,cr=null,ur=tt.pathSubplot(),jr=!1;var Mr=rt._fullLayout[tt.id];qr=g(Mr.bgcolor).getLuminance(),br=x.makeZoombox(vt,qr,kt,It,ur),br.attr("fill-rule","evenodd"),Xr=x.makeCorners(vt,kt,It),_(rt)}function Nt(Mr,mr){return mr=Math.max(Math.min(mr,ft),ut),Mrit?(Mr-1&&Mr===1&&b(mr,rt,[tt.xaxis],[tt.yaxis],tt.id,oe),Qr.indexOf("event")>-1&&v.click(rt,mr,tt.id)}oe.prepFn=function(Mr,mr,Qr){var Wn=rt._fullLayout.dragmode,qn=ve.getBoundingClientRect();rt._fullLayout._calcInverseTransform(rt);var ei=rt._fullLayout._invTransform;Mt=rt._fullLayout._invScaleX,ee=rt._fullLayout._invScaleY;var Di=S.apply3DTransform(ei)(mr-qn.left,Qr-qn.top);if(Ae=Di[0],He=Di[1],Jt){var ui=p.findPolygonOffset(ft,Wt[0],Wt[1],Jt);Ae+=Pt+ui[0],He+=qt+ui[1]}switch(Wn){case"zoom":oe.clickFn=Sr,pt||(Jt?oe.moveFn=Ue:oe.moveFn=le,oe.doneFn=qe,St());break;case"select":case"lasso":u(Mr,mr,Qr,oe,Wn);break}},y.init(oe)},q.updateRadialDrag=function(st,tt,pt){var rt=this,at=rt.gd,vt=rt.layers,it=rt.radius,K=rt.innerRadius,ft=rt.cx,ut=rt.cy,kt=rt.radialAxis,It=h.radialDragBoxSize,Pt=It/2;if(!kt.visible)return;var qt=F(rt.radialAxisAngle),Wt=kt._rl,Jt=Wt[0],ge=Wt[1],fe=Wt[pt],pe=.75*(Wt[1]-Wt[0])/(1-rt.getHole(tt))/it,se,Tt,Lt;pt?(se=ft+(it+Pt)*Math.cos(qt),Tt=ut-(it+Pt)*Math.sin(qt),Lt="radialdrag"):(se=ft+(K-Pt)*Math.cos(qt),Tt=ut-(K-Pt)*Math.sin(qt),Lt="radialdrag-inner");var Mt=x.makeRectDragger(vt,Lt,"crosshair",-Pt,-Pt,It,It),ee={element:Mt,gd:at};st.dragmode===!1&&(ee.dragmode=!1),mt(c.select(Mt),kt.visible&&K0!=(pt?Ae>Jt:Ae=90||at>90&&vt>=450?qt=1:K<=0&&ut<=0?qt=0:qt=Math.max(K,ut),at<=180&&vt>=180||at>180&&vt>=540?kt=-1:it>=0&&ft>=0?kt=0:kt=Math.min(it,ft),at<=270&&vt>=270||at>270&&vt>=630?It=-1:K>=0&&ut>=0?It=0:It=Math.min(K,ut),vt>=360?Pt=1:it<=0&&ft<=0?Pt=0:Pt=Math.max(it,ft),[kt,It,Pt,qt]}function yt(st,tt){var pt=function(at){return S.angleDist(st,at)},rt=S.findIndexOfMin(tt,pt);return tt[rt]}function mt(st,tt,pt){return tt?(st.attr("display",null),st.attr(pt)):st&&st.attr("display","none"),st}}),aC=Dt((Q,Z)=>{var c=Ai(),g=Td(),I=Uh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,minorloglabels:g.minorloglabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),a={visible:S({},g.visible,{dflt:!0}),type:S({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},autorange:S({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},g.minallowed,{editType:"plot"}),maxallowed:S({},g.maxallowed,{editType:"plot"}),range:S({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:g.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},g.title.text,{editType:"plot",dflt:""}),font:S({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,r);var n={visible:S({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.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:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(n,e,r),Z.exports={domain:I({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:c.background},radialaxis:a,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),X$=Dt((Q,Z)=>{var c=kn(),g=pi(),I=mu(),S=D1(),t=ud().getSubplotData,e=xg(),r=_g(),a=n0(),n=dm(),o=qm(),i=ex(),l=ww(),f=mv(),x=aC(),y=rC(),v=PT(),T=v.axisNames;function u(_,P,M,C){var A=M("bgcolor");C.bgColor=g.combine(A,C.paper_bgcolor);var h=M("sector");M("hole");var p=t(C.fullData,v.name,C.id),k=C.layoutOut,w;function B(It,Pt){return M(w+"."+It,Pt)}for(var O=0;O{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=iC(),S=PT(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=z0(),e=ef(),r=qo(),a=e.line;Z.exports={mode:e.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:e.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),OT=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=O0(),t=bv(),e=x0(),r=D0(),a=vm().PTS_LINESONLY,n=O3();function o(l,f,x,y){function v(b,_){return c.coerce(l,f,n,b,_)}var T=i(l,f,y,v);if(!T){f.visible=!1;return}v("thetaunit"),v("mode",T{var c=kn(),g=Ls();Z.exports=function(I,S,t){var e={},r=t[S.subplot]._subplot,a,n;r?(a=r.radialAxis,n=r.angularAxis):(r=t[S.subplot],a=r.radialaxis,n=r.angularaxis);var o=a.c2l(I.r);e.rLabel=g.tickText(a,o,!0).text;var i=n.thetaunit==="degrees"?c.rad2deg(I.theta):I.theta;return e.thetaLabel=g.tickText(n,i,!0).text,e}}),J$=Dt((Q,Z)=>{var c=Hn(),g=sa().BADNUM,I=Ls(),S=B0(),t=ct(),e=Rt(),r=me().calcMarkerSize;Z.exports=function(a,n){for(var o=a._fullLayout,i=n.subplot,l=o[i].radialaxis,f=o[i].angularaxis,x=l.makeCalcdata(n,"r"),y=f.makeCalcdata(n,"theta"),v=n._length,T=new Array(v),u=0;u{var c=Ka(),g=sa().BADNUM;Z.exports=function(I,S,t){for(var e=S.layers.frontplot.select("g.scatterlayer"),r=S.xaxis,a=S.yaxis,n={xaxis:r,yaxis:a,plot:S.framework,layerClipId:S._hasClipOnAxisFalse?S.clipIds.forTraces:null},o=S.radialAxis,i=S.angularAxis,l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="r",n._hovertitle="θ";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&x(a,r.rLabel),y.indexOf("theta")!==-1&&x(n,r.thetaLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),tZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:zT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:O3(),supplyDefaults:OT().supplyDefaults,colorbar:xo(),formatLabels:DT(),calc:J$(),plot:Q$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:FT().hoverPoints,selectPoints:Nf(),meta:{}}}),eZ=Dt((Q,Z)=>{Z.exports=tZ()}),oC=Dt((Q,Z)=>{var c=O3(),{cliponaxis:g,hoveron:I}=c,S=Vr(c,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:e,dash:r,width:a},fill:n,fillcolor:o,marker:i,textfont:l,textposition:f}=A3();Z.exports=kr(Ar({},S),{connectgaps:t,fill:n,fillcolor:o,line:{color:e,dash:r,editType:"calc",width:a},marker:i,textfont:l,textposition:f})}),rZ=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=OT().handleRThetaDefaults,S=s0(),t=O0(),e=x0(),r=D0(),a=vm().PTS_LINESONLY,n=oC();Z.exports=function(o,i,l,f){function x(v,T){return c.coerce(o,i,n,v,T)}var y=I(o,i,f,x);if(!y){i.visible=!1;return}x("thetaunit"),x("mode",y{var c=DT();Z.exports=function(g,I,S){var t=g.i;return"r"in g||(g.r=I._r[t]),"theta"in g||(g.theta=I._theta[t]),c(g,I,S)}}),iZ=Dt((Q,Z)=>{var c=B0(),g=me().calcMarkerSize,I=wx(),S=Ls(),t=Z1().TOO_MANY_POINTS;Z.exports=function(e,r){var a=e._fullLayout,n=r.subplot,o=a[n].radialaxis,i=a[n].angularaxis,l=r._r=o.makeCalcdata(r,"r"),f=r._theta=i.makeCalcdata(r,"theta"),x=r._length,y={};x{var c=cT(),g=FT().makeHoverPointText;function I(S,t,e,r){var a=S.cd,n=a[0].t,o=n.r,i=n.theta,l=c.hoverPoints(S,t,e,r);if(!(!l||l[0].index===!1)){var f=l[0];if(f.index===void 0)return l;var x=S.subplot,y=f.cd[f.index],v=f.trace;if(y.r=o[f.index],y.theta=i[f.index],!!x.isPtInside(y))return f.xLabelVal=void 0,f.yLabelVal=void 0,g(y,v,x,f),l}}Z.exports={hoverPoints:I}}),oZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:zT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:oC(),supplyDefaults:rZ(),colorbar:xo(),formatLabels:nZ(),calc:iZ(),hoverPoints:aZ().hoverPoints,selectPoints:US(),meta:{}}}),sZ=Dt((Q,Z)=>{var c=fT(),g=Hn(),I=hE(),S=NS(),t=wx(),e=kn(),r=Z1().TOO_MANY_POINTS,a={};Z.exports=function(n,o,i){if(i.length){var l=o.radialAxis,f=o.angularAxis,x=S(n,o);return i.forEach(function(y){if(!(!y||!y[0]||!y[0].trace)){var v=y[0],T=v.trace,u=v.t,b=T._length,_=u.r,P=u.theta,M=u.opts,C,A=_.slice(),h=P.slice();for(C=0;C<_.length;C++)o.isPtInside({r:_[C],theta:P[C]})||(A[C]=NaN,h[C]=NaN);var p=new Array(b*2),k=Array(b),w=Array(b);for(C=0;C=r&&(M.marker.cluster=u.tree),M.marker&&(M.markerSel.positions=M.markerUnsel.positions=M.marker.positions=p),M.line&&p.length>1&&e.extendFlat(M.line,t.linePositions(n,T,p)),M.text&&(e.extendFlat(M.text,{positions:p},t.textPosition(n,T,M.text,M.marker)),e.extendFlat(M.textSel,{positions:p},t.textPosition(n,T,M.text,M.markerSel)),e.extendFlat(M.textUnsel,{positions:p},t.textPosition(n,T,M.text,M.markerUnsel))),M.fill&&!x.fill2d&&(x.fill2d=!0),M.marker&&!x.scatter2d&&(x.scatter2d=!0),M.line&&!x.line2d&&(x.line2d=!0),M.text&&!x.glText&&(x.glText=!0),x.lineOptions.push(M.line),x.fillOptions.push(M.fill),x.markerOptions.push(M.marker),x.markerSelectedOptions.push(M.markerSel),x.markerUnselectedOptions.push(M.markerUnsel),x.textOptions.push(M.text),x.textSelectedOptions.push(M.textSel),x.textUnselectedOptions.push(M.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),u.x=k,u.y=w,u.rawx=k,u.rawy=w,u.r=_,u.theta=P,u.positions=p,u._scene=x,u.index=x.count,x.count++}}),I(n,o,i)}},Z.exports.reglPrecompiled=a}),lZ=Dt((Q,Z)=>{var c=oZ();c.plot=sZ(),Z.exports=c}),uZ=Dt((Q,Z)=>{Z.exports=lZ()}),sC=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=Ia().extendFlat,S=O3(),t=Pg();Z.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:I({},t.base,{}),offset:I({},t.offset,{}),width:I({},t.width,{}),text:I({},t.text,{}),hovertext:I({},t.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:c(),hovertemplatefallback:g(),selected:t.selected,unselected:t.unselected};function e(){var r=I({},t.marker);return delete r.cornerradius,r}}),lC=Dt((Q,Z)=>{Z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}),cZ=Dt((Q,Z)=>{var c=kn(),g=OT().handleRThetaDefaults,I=R6(),S=sC();Z.exports=function(t,e,r,a){function n(i,l){return c.coerce(t,e,S,i,l)}var o=g(t,e,a,n);if(!o){e.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),I(t,e,n,r,a),c.coerceSelectionMarkerOpacity(e,n)}}),hZ=Dt((Q,Z)=>{var c=kn(),g=lC();Z.exports=function(I,S,t){var e={},r;function a(i,l){return c.coerce(I[r]||{},S[r],g,i,l)}for(var n=0;n{var c=Ud().hasColorscale,g=Xd(),I=kn().isArrayOrTypedArray,S=Hw(),t=zr().setGroupPositions,e=Rt(),r=Qo().traceIs,a=kn().extendFlat;function n(i,l){for(var f=i._fullLayout,x=l.subplot,y=f[x].radialaxis,v=f[x].angularaxis,T=y.makeCalcdata(l,"r"),u=v.makeCalcdata(l,"theta"),b=l._length,_=new Array(b),P=T,M=u,C=0;C{var c=Wr(),g=Hn(),I=kn(),S=Vs(),t=IT();Z.exports=function(r,a,n){var o=r._context.staticPlot,i=a.xaxis,l=a.yaxis,f=a.radialAxis,x=a.angularAxis,y=e(a),v=a.layers.frontplot.select("g.barlayer");I.makeTraceGroups(v,n,"trace bars").each(function(){var T=c.select(this),u=I.ensureSingle(T,"g","points"),b=u.selectAll("g.point").data(I.identity);b.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(_){var P=c.select(this),M=_.rp0=f.c2p(_.s0),C=_.rp1=f.c2p(_.s1),A=_.thetag0=x.c2g(_.p0),h=_.thetag1=x.c2g(_.p1),p;if(!g(M)||!g(C)||!g(A)||!g(h)||M===C||A===h)p="M0,0Z";else{var k=f.c2g(_.s1),w=(A+h)/2;_.ct=[i.c2p(k*Math.cos(w)),l.c2p(k*Math.sin(w))],p=y(M,C,A,h)}I.ensureSingle(P,"path").attr("d",p)}),S.setClipUrl(T,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,r)})};function e(r){var a=r.cxx,n=r.cyy;return r.vangles?function(o,i,l,f){var x,y;I.angleDelta(l,f)>0?(x=l,y=f):(x=f,y=l);var v=t.findEnclosingVertexAngles(x,r.vangles)[0],T=t.findEnclosingVertexAngles(y,r.vangles)[1],u=[v,(x+y)/2,T];return t.pathPolygonAnnulus(o,i,x,y,u,a,n)}:function(o,i,l,f){return I.pathAnnulus(o,i,l,f,a,n)}}}),dZ=Dt((Q,Z)=>{var c=tf(),g=kn(),I=tb().getTraceColor,S=g.fillText,t=FT().makeHoverPointText,e=IT().isPtInsidePolygon;Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.subplot,f=l.radialAxis,x=l.angularAxis,y=l.vangles,v=y?e:g.isPtInsideSector,T=r.maxHoverDistance,u=x._period||2*Math.PI,b=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),_=Math.atan2(n,a);f.range[0]>f.range[1]&&(_+=Math.PI);var P=function(h){return v(b,_,[h.rp0,h.rp1],[h.thetag0,h.thetag1],y)?T+Math.min(1,Math.abs(h.thetag1-h.thetag0)/u)-1+(h.rp1-b)/(h.rp1-h.rp0)-1:1/0};if(c.getClosest(o,P,r),r.index!==!1){var M=r.index,C=o[M];r.x0=r.x1=C.ct[0],r.y0=r.y1=C.ct[1];var A=g.extendFlat({},C,{r:C.s,theta:C.p});return S(C,i,r),t(A,i,l,r),r.hovertemplate=i.hovertemplate,r.color=I(i,C),r.xLabelVal=r.yLabelVal=void 0,C.s<0&&(r.idealAlign="left"),[r]}}}),pZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"barpolar",basePlotModule:zT(),categories:["polar","bar","showLegend"],attributes:sC(),layoutAttributes:lC(),supplyDefaults:cZ(),supplyLayoutDefaults:hZ(),calc:uC().calc,crossTraceCalc:uC().crossTraceCalc,plot:fZ(),colorbar:xo(),formatLabels:DT(),style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:dZ(),selectPoints:eb(),meta:{}}}),mZ=Dt((Q,Z)=>{Z.exports=pZ()}),cC=Dt((Q,Z)=>{Z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}),hC=Dt((Q,Z)=>{var c=Ai(),g=Td(),I=Uh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({ticklen:g.ticklen,tickwidth:S({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),a=S({visible:S({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},g.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,r),n=S({visible:S({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},e,r);Z.exports={domain:I({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:c.background},realaxis:a,imaginaryaxis:n,editType:"calc"}}),gZ=Dt((Q,Z)=>{var c=kn(),g=pi(),I=mu(),S=D1(),t=ud().getSubplotData,e=dm(),r=n0(),a=ex(),n=i0(),o=hC(),i=cC(),l=i.axisNames,f=y(function(v){return c.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function x(v,T,u,b){var _=u("bgcolor");b.bgColor=g.combine(_,b.paper_bgcolor);var P=t(b.fullData,i.name,b.id),M=b.layoutOut,C;function A(q,J){return u(C+"."+q,J)}for(var h=0;h{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=iC(),S=cC(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=z0(),e=ef(),r=qo(),a=e.line;Z.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),yZ=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=O0(),t=bv(),e=x0(),r=D0(),a=vm().PTS_LINESONLY,n=fC();Z.exports=function(i,l,f,x){function y(u,b){return c.coerce(i,l,n,u,b)}var v=o(i,l,x,y);if(!v){l.visible=!1;return}y("mode",v{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.realLabel=c.tickText(e.radialAxis,g.real,!0).text,t.imagLabel=c.tickText(e.angularAxis,g.imag,!0).text,t}}),_Z=Dt((Q,Z)=>{var c=Hn(),g=sa().BADNUM,I=B0(),S=ct(),t=Rt(),e=me().calcMarkerSize;Z.exports=function(r,a){for(var n=r._fullLayout,o=a.subplot,i=n[o].realaxis,l=n[o].imaginaryaxis,f=i.makeCalcdata(a,"real"),x=l.makeCalcdata(a,"imag"),y=a._length,v=new Array(y),T=0;T{var c=Ka(),g=sa().BADNUM,I=nC(),S=I.smith;Z.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),n=e.xaxis,o=e.yaxis,i={xaxis:n,yaxis:o,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="real",n._hovertitle="imag";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&x(a,r.realLabel),y.indexOf("imag")!==-1&&x(n,r.imagLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),kZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:vZ(),categories:["smith","symbols","showLegend","scatter-like"],attributes:fC(),supplyDefaults:yZ(),colorbar:xo(),formatLabels:xZ(),calc:_Z(),plot:bZ(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:wZ().hoverPoints,selectPoints:Nf(),meta:{}}}),TZ=Dt((Q,Z)=>{Z.exports=kZ()}),Np=Dt((Q,Z)=>{var c=Sd();function g(){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={}}c(g.prototype,{instance:function(a,n){a=(a||"gregorian").toLowerCase(),n=n||"";var o=this._localCals[a+"-"+n];if(!o&&this.calendars[a]&&(o=new this.calendars[a](n),this._localCals[a+"-"+n]=o),!o)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return o},newDate:function(a,n,o,i,l){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,l):i)||this.instance(),i.newDate(a,n,o)},substituteDigits:function(a){return function(n){return(n+"").replace(/[0-9]/g,function(o){return a[o]})}},substituteChineseDigits:function(a,n){return function(o){for(var i="",l=0;o>0;){var f=o%10;i=(f===0?"":a[f]+n[l])+i,l++,o=Math.floor(o/10)}return i.indexOf(a[1]+n[1])===0&&(i=i.substr(1)),i||a[0]}}});function I(a,n,o,i){if(this._calendar=a,this._year=n,this._month=o,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,n){return a=""+a,"000000".substring(0,n-a.length)+a}c(I.prototype,{newDate:function(a,n,o){return this._calendar.newDate(a??this,n,o)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,n,o){if(!this._calendar.isValid(a,n,o))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=n,this._day=o,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(a,n){return this._calendar.add(this,a,n)},set:function(a,n){return this._calendar.set(this,a,n)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var n=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function t(){this.shortYearCutoff="+10"}c(t.prototype,{_validateLevel:0,newDate:function(a,n,o){return a==null?this.today():(a.year&&(this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),o=a.day(),n=a.month(),a=a.year()),new I(this,a,n,o))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+S(Math.abs(n.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(a,n){var o=this._validate(a,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(o.month()+this.monthsInYear(o)-this.firstMonth)%this.monthsInYear(o)+this.minMonth},fromMonthOfYear:function(a,n){var o=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,o,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),o},daysInYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,n,o){return this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(a,n,o){return this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,n,o),n,o)},_add:function(a,n,o){if(this._validateLevel++,o==="d"||o==="w"){var i=a.toJD()+n*(o==="w"?this.daysInWeek():1),l=a.calendar().fromJD(i);return this._validateLevel--,[l.year(),l.month(),l.day()]}try{var f=a.year()+(o==="y"?n:0),x=a.monthOfYear()+(o==="m"?n:0),l=a.day(),y=function(u){for(;xb-1+u.minMonth;)f++,x-=b,b=u.monthsInYear(f)};o==="y"?(a.month()!==this.fromMonthOfYear(f,x)&&(x=this.newDate(f,a.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(f)),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x)))):o==="m"&&(y(this),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x))));var v=[f,this.fromMonthOfYear(f,x),l];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(a,n,o,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||a.year()>0!=n[0]>0)){var l={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],f=o<0?-1:1;n=this._add(a,o*l[0]+f*l[1],l[2])}return a.date(n[0],n[1],n[2])},set:function(a,n,o){this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=o==="y"?n:a.year(),l=o==="m"?n:a.month(),f=o==="d"?n:a.day();return(o==="y"||o==="m")&&(f=Math.min(f,this.daysInMonth(i,l))),a.date(i,l,f)},isValid:function(a,n,o){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var l=this.newDate(a,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth=this.minDay&&o-this.minDay13.5?13:1),T=l-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,y)},toJSDate:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),l=new Date(i.year(),i.month()-1,i.day());return l.setHours(0),l.setMinutes(0),l.setSeconds(0),l.setMilliseconds(0),l.setHours(l.getHours()>12?l.getHours()+2:0),l},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var r=Z.exports=new g;r.cdate=I,r.baseCalendar=t,r.calendars.gregorian=e}),AZ=Dt(()=>{var Q=Sd(),Z=Np();Q(Z.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"}),Z.local=Z.regionalOptions[""],Q(Z.cdate.prototype,{formatDate:function(c,g){return typeof c!="string"&&(g=c,c=""),this._calendar.formatDate(c||"",this,g)}}),Q(Z.baseCalendar.prototype,{UNIX_EPOCH:Z.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Z.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(c,g,I){if(typeof c!="string"&&(I=g,g=c,c=""),!g)return"";if(g.calendar()!==this)throw Z.local.invalidFormat||Z.regionalOptions[""].invalidFormat;c=c||this.local.dateFormat,I=I||{};for(var S=I.dayNamesShort||this.local.dayNamesShort,t=I.dayNames||this.local.dayNames,e=I.monthNumbers||this.local.monthNumbers,r=I.monthNamesShort||this.local.monthNamesShort,a=I.monthNames||this.local.monthNames,n=I.calculateWeek||this.local.calculateWeek,o=function(P,M){for(var C=1;_+C1},i=function(P,M,C,A){var h=""+M;if(o(P,A))for(;h.length1},b=function(B,O){var j=u(B,O),V=[2,3,j?4:2,j?4:2,10,11,20]["oyYJ@!".indexOf(B)+1],H=new RegExp("^-?\\d{1,"+V+"}"),F=g.substring(h).match(H);if(!F)throw(Z.local.missingNumberAt||Z.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},_=this,P=function(){if(typeof a=="function"){u("m");var B=a.call(_,g.substring(h));return h+=B.length,B}return b("m")},M=function(B,O,j,V){for(var H=u(B,V)?j:O,F=0;F-1){f=1,x=y;for(var w=this.daysInMonth(l,f);x>w;w=this.daysInMonth(l,f))f++,x-=w}return i>-1?this.fromJD(i):this.newDate(l,f,x)},determineDate:function(c,g,I,S,t){I&&typeof I!="object"&&(t=S,S=I,I=null),typeof S!="string"&&(t=S,S="");var e=this,r=function(a){try{return e.parseDate(S,a,t)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&I?I.newDate():null)||e.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=o.exec(a);i;)n.add(parseInt(i[1],10),i[2]||"d"),i=o.exec(a);return n};return g=g?g.newDate():null,c=c==null?g:typeof c=="string"?r(c):typeof c=="number"?isNaN(c)||c===1/0||c===-1/0?g:e.today().add(c,"d"):e.newDate(c),c}})}),MZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,l){if(typeof i=="string"){var f=i.match(S);return f?f[0]:""}var x=this._validateYear(i),y=i.month(),v=""+this.toChineseMonth(x,y);return l&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(x,y)&&(v+="i"),v},monthNames:function(i){if(typeof i=="string"){var l=i.match(t);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},monthNamesShort:function(i){if(typeof i=="string"){var l=i.match(e);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},parseMonth:function(i,l){i=this._validateYear(i);var f=parseInt(l),x;if(isNaN(f))l[0]==="闰"&&(x=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var y=l[l.length-1];x=y==="i"||y==="I"}var v=this.toMonthIndex(i,f,x);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,l){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw l.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,l,f){var x=this.intercalaryMonth(i),y=f&&l!==x;if(y||l<1||l>12)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return x?!f&&l<=x?v=l-1:v=l:v=l-1,v},toChineseMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i),x=f?12:11;if(l<0||l>x)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return f?l>13;return f},isIntercalaryMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i);return!!f&&f===l},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,l,f){var x=this._validateYear(i,Q.local.invalidyear),y=a[x-a[0]],v=y>>9&4095,T=y>>5&15,u=y&31,b;b=c.newDate(v,T,u),b.add(4-(b.dayOfWeek()||7),"d");var _=this.toJD(i,l,f)-b.toJD();return 1+Math.floor(_/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,l){i.year&&(l=i.month(),i=i.year()),i=this._validateYear(i);var f=r[i-r[0]],x=f>>13,y=x?12:11;if(l>y)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=f&1<<12-l?30:29;return v},weekDay:function(i,l,f){return(this.dayOfWeek(i,l,f)||7)<6},toJD:function(i,l,f){var x=this._validate(i,v,f,Q.local.invalidDate);i=this._validateYear(x.year()),l=x.month(),f=x.day();var y=this.isIntercalaryMonth(i,l),v=this.toChineseMonth(i,l),T=o(i,v,f,y);return c.toJD(T.year,T.month,T.day)},fromJD:function(i){var l=c.fromJD(i),f=n(l.year(),l.month(),l.day()),x=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,x,f.day)},fromString:function(i){var l=i.match(I),f=this._validateYear(+l[1]),x=+l[2],y=!!l[3],v=this.toMonthIndex(f,x,y),T=+l[4];return this.newDate(f,v,T)},add:function(i,l,f){var x=i.year(),y=i.month(),v=this.isIntercalaryMonth(x,y),T=this.toChineseMonth(x,y),u=Object.getPrototypeOf(g.prototype).add.call(this,i,l,f);if(f==="y"){var b=u.year(),_=u.month(),P=this.isIntercalaryMonth(b,T),M=v&&P?this.toMonthIndex(b,T,!0):this.toMonthIndex(b,T,!1);M!==_&&u.month(M)}return u}});var I=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;Q.calendars.chinese=g;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[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 n(i,l,f,x){var y,v;if(typeof i=="object")y=i,v=l||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var u=typeof l=="number"&&l>=1&&l<=12;if(!u)throw new Error("Solar month outside range 1 - 12");var b=typeof f=="number"&&f>=1&&f<=31;if(!b)throw new Error("Solar day outside range 1 - 31");y={year:i,month:l,day:f},v={}}var _=a[y.year-a[0]],P=y.year<<9|y.month<<5|y.day;v.year=P>=_?y.year:y.year-1,_=a[v.year-a[0]];var M=_>>9&4095,C=_>>5&15,A=_&31,h,p=new Date(M,C-1,A),k=new Date(y.year,y.month-1,y.day);h=Math.round((k-p)/(24*3600*1e3));var w=r[v.year-r[0]],B;for(B=0;B<13;B++){var O=w&1<<12-B?30:29;if(h>13;return!j||B=1888&&i<=2111;if(!u)throw new Error("Lunar year outside range 1888-2111");var b=typeof l=="number"&&l>=1&&l<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var _=typeof f=="number"&&f>=1&&f<=30;if(!_)throw new Error("Lunar day outside range 1 - 30");var P;typeof x=="object"?(P=!1,v=x):(P=!!x,v={}),T={year:i,month:l,day:f,isIntercalary:P}}var M;M=T.day-1;var C=r[T.year-r[0]],A=C>>13,h;A&&(T.month>A||T.isIntercalary)?h=T.month:h=T.month-1;for(var p=0;p>9&4095,O=w>>5&15,j=w&31,V=new Date(B,O-1,j+M);return v.year=V.getFullYear(),v.month=1+V.getMonth(),v.day=V.getDate(),v}}),SZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.coptic=c}),EZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),!1},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),13},daysInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),400},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return(e.day()+1)%8},weekDay:function(I,S,t){var e=this.dayOfWeek(I,S,t);return e>=2&&e<=6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{century:g[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return I=e.year()+(e.year()<0?1:0),S=e.month(),t=e.day(),t+(S>1?16:0)+(S>2?(S-2)*32:0)+(I-1)*400+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(I/400)+1;I-=(S-1)*400,I+=I>15?16:0;var t=Math.floor(I/32)+1,e=I-(t-1)*32+1;return this.newDate(S<=0?S-1:S,t,e)}});var g={20:"Fruitbat",21:"Anchovy"};Q.calendars.discworld=c}),CZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.ethiopian=c}),LZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(I){return I=I<0?I+1:I,g(I*7+1,19)<7},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),this._leapYear(I.year?I.year():I)?13:12},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return I=S.year(),this.toJD(I===-1?1:I+1,7,1)-this.toJD(I,7,1)},daysInMonth:function(I,S){return I.year&&(S=I.month(),I=I.year()),this._validate(I,S,this.minDay,Q.local.invalidMonth),S===12&&this.leapYear(I)||S===8&&g(this.daysInYear(I),10)===5?30:S===9&&g(this.daysInYear(I),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=I<=0?I+1:I,a=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(S<7){for(var n=7;n<=this.monthsInYear(I);n++)a+=this.daysInMonth(I,n);for(var n=1;n=this.toJD(S===-1?1:S+1,7,1);)S++;for(var t=Ithis.toJD(S,t,this.daysInMonth(S,t));)t++;var e=I-this.toJD(S,t,1)+1;return this.newDate(S,t,e)}});function g(I,S){return I-S*Math.floor(I/S)}Q.calendars.hebrew=c}),PZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);return(I.year()*11+14)%30<11},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){return this.leapYear(g)?355:354},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==5},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g=g<=0?g+1:g,S+Math.ceil(29.5*(I-1))+(g-1)*354+Math.floor((3+11*g)/30)+this.jdEpoch-1},fromJD:function(g){g=Math.floor(g)+.5;var I=Math.floor((30*(g-this.jdEpoch)+10646)/10631);I=I<=0?I-1:I;var S=Math.min(12,Math.ceil((g-29-this.toJD(I,1,1))/29.5)+1),t=g-this.toJD(I,S,1)+1;return this.newDate(I,S,t)}}),Q.calendars.islamic=c}),IZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()<0?I.year()+1:I.year();return S%4===0},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g<0&&g++,I<=2&&(g--,I+=12),Math.floor(365.25*(g+4716))+Math.floor(30.6001*(I+1))+S-1524.5},fromJD:function(g){var I=Math.floor(g+.5),S=I+1524,t=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*t),r=Math.floor((S-e)/30.6001),a=r-Math.floor(r<14?1:13),n=t-Math.floor(a>2?4716:4715),o=S-e-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,a,o)}}),Q.calendars.julian=c}),zZ=Dt(()=>{var Q=Np(),Z=Sd();function c(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),!1},formatYear:function(S){var t=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear);S=t.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var r=Math.floor(S/20);return e+"."+r+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var t=0,e=0;e19||e>0&&r<0)throw"Invalid Mayan year";t=t*20+r}return t},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),18},weekOfYear:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),360},daysInMonth:function(S,t){return this._validate(S,t,this.minDay,Q.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()},weekDay:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),!0},extraInfo:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate),a=r.toJD(),n=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(S){S-=this.jdEpoch;var t=g(S+8+340,365);return[Math.floor(t/20)+1,g(t,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[I(S+20,20),I(S+4,13)]},toJD:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var t=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),r=S%20;return this.newDate(t,e,r)}});function g(S,t){return S-t*Math.floor(S/t)}function I(S,t){return g(S-1,t)+1}Q.calendars.mayan=c}),OZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar;var g=Q.instance("gregorian");Z(c.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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear);return g.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidMonth),r=e.year();r<0&&r++;for(var a=e.day(),n=1;n=this.toJD(S+1,1,1);)S++;for(var t=I-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;t>this.daysInMonth(S,e);)t-=this.daysInMonth(S,e),e++;return this.newDate(S,e,t)}}),Q.calendars.nanakshahi=c}),DZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.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(g){return this.daysInYear(g)!==this.daysPerYear},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);if(g=I.year(),typeof this.NEPALI_CALENDAR_DATA[g]>"u")return this.daysPerYear;for(var S=0,t=this.minMonth;t<=12;t++)S+=this.NEPALI_CALENDAR_DATA[g][t];return S},daysInMonth:function(g,I){return g.year&&(I=g.month(),g=g.year()),this._validate(g,I,this.minDay,Q.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[g]>"u"?this.daysPerMonth[I-1]:this.NEPALI_CALENDAR_DATA[g][I]},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);g=t.year(),I=t.month(),S=t.day();var e=Q.instance(),r=0,a=I,n=g;this._createMissingCalendarData(g);var o=g-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(I!==9&&(r=S,a--);a!==9;)a<=0&&(a=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][a],a--;return I===9?(r+=S-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=e.daysInYear(o))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],e.newDate(o,1,1).add(r,"d").toJD()},fromJD:function(g){var I=Q.instance(),S=I.fromJD(g),t=S.year(),e=S.dayOfYear(),r=t+56;this._createMissingCalendarData(r);for(var a=9,n=this.NEPALI_CALENDAR_DATA[r][0],o=this.NEPALI_CALENDAR_DATA[r][a]-n+1;e>o;)a++,a>12&&(a=1,r++),o+=this.NEPALI_CALENDAR_DATA[r][a];var i=this.NEPALI_CALENDAR_DATA[r][a]-(o-e);return this.newDate(r,a,i)},_createMissingCalendarData:function(g){var I=this.daysPerMonth.slice(0);I.unshift(17);for(var S=g-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=I)},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]}}),Q.calendars.nepali=c}),FZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}function g(I){var S=I-475;I<0&&S++;var t=.242197,e=t*S,r=t*(S+1),a=e-Math.floor(e),n=r-Math.floor(r);return a>n}c.prototype=new Q.baseCalendar,Z(c.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ārshanbeh","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(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return g(S.year())},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=0;if(I>0)for(var a=1;a0?I-1:I)*365+r+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I)+.5;var S=475+(I-this.toJD(475,1,1))/365.242197,t=Math.floor(S);t<=0&&t--,I>this.toJD(t,12,g(t)?30:29)&&(t++,t===0&&t++);var e=I-this.toJD(t,1,1)+1,r=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=I-this.toJD(t,r,1)+1;return this.newDate(t,r,a)}}),Q.calendars.persian=c,Q.calendars.jalali=c}),BZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.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(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)},_g2tYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)}}),Q.calendars.taiwan=g}),RZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.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(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)},_g2tYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)}}),Q.calendars.thai=g}),NZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){for(var S=0,t=1;t<=12;t++)S+=this.daysInMonth(I,t);return S},daysInMonth:function(I,S){for(var t=this._validate(I,S,this.minDay,Q.local.invalidMonth),e=t.toJD()-24e5+.5,r=0,a=0;ae)return g[r]-g[r-1];r++}return 30},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate),r=12*(e.year()-1)+e.month()-15292,a=e.day()+g[r-1]-1;return a+24e5-.5},fromJD:function(I){for(var S=I-24e5+.5,t=0,e=0;eS);e++)t++;var r=t+15292,a=Math.floor((r-1)/12),n=a+1,o=r-12*a,i=S-g[t-1]+1;return this.newDate(n,o,i)},isValid:function(I,S,t){var e=Q.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(I=I.year!=null?I.year:I,e=I>=1276&&I<=1500),e},_validate:function(I,S,t,e){var r=Q.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw e.replace(/\{0\}/,this.local.name);return r}}),Q.calendars.ummalqura=c;var g=[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]}),jZ=Dt((Q,Z)=>{Z.exports=Np(),AZ(),MZ(),SZ(),EZ(),CZ(),LZ(),PZ(),IZ(),zZ(),OZ(),DZ(),FZ(),BZ(),RZ(),NZ()}),UZ=Dt((Q,Z)=>{var c=jZ(),g=kn(),I=sa(),S=I.EPOCHJD,t=I.ONEDAY,e={valType:"enumerated",values:g.sortObjectKeys(c.calendars),editType:"calc",dflt:"gregorian"},r=function(C,A,h,p){var k={};return k[h]=e,g.coerce(C,A,k,h,p)},a=function(C,A,h,p){for(var k=0;k{Z.exports=UZ()}),HZ=Dt((Q,Z)=>{var c=_B();c.register([TB(),SB(),PB(),FB(),jB(),WB(),ZB(),iR(),dR(),TR(),OR(),tj(),oj(),$j(),eU(),uU(),gU(),zU(),BU(),NU(),HU(),GU(),QU(),nV(),yV(),bV(),iW(),xW(),IW(),RW(),GW(),JW(),oq(),xq(),kq(),Pq(),$q(),Jq(),a$(),E$(),F$(),U$(),$$(),K$(),eZ(),uZ(),mZ(),TZ(),VZ()]),Z.exports=c});return HZ()})();/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. @@ -3988,4 +3988,4 @@ maplibre-gl/dist/maplibre-gl.js: * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt *) -*/return window.Plotly=E,E})}(a4)),a4.exports}var Wpt=Hpt();const c1=KO(Wpt),qpt={class:"p-6 space-y-6"},$pt={class:"flex justify-between items-center"},Zpt={class:"flex items-center gap-3"},Gpt=["value"],Ypt={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},Kpt={class:"glass-card rounded-[15px] p-6"},Xpt={class:"mb-6"},Jpt={class:"relative h-48 bg-white/5 rounded-lg p-4"},Qpt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},t0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},e0t={class:"mb-6"},r0t={class:"relative h-48 bg-white/5 rounded-lg p-4"},n0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},i0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},a0t={class:"glass-card rounded-[15px] p-6"},o0t={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},s0t={class:"lg:col-span-2"},l0t={class:"relative h-64 bg-white/5 rounded-lg p-4"},u0t={class:"flex flex-col items-center justify-center"},c0t={class:"relative w-48 h-48"},h0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm rounded-full z-20"},f0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 rounded-full z-20"},d0t={key:0,class:"glass-card rounded-[15px] p-8 text-center"},p0t={key:1,class:"glass-card rounded-[15px] p-8 text-center"},m0t={class:"text-white/60 text-sm"},g0t=Dc({name:"StatisticsView",__name:"Statistics",setup(d){x2.register(Xht,tft,aht,Q4,Out,Put,zut,Nht,Zht,Rht,Yct,hht,Pht,OA);const s=sw(),E=Ga(null),B=Ga(!1),K=Ga(24),pt=[{value:1,label:"1 Hour"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"24 Hours"},{value:48,label:"2 Days"},{value:168,label:"1 Week"}],_t=Ga(null),Ot=Ga(null),jt=Ga([]),te=Ga(null),he=Ga([]),De=Ga(!0),er=Ga(null),pr=Ga({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0}),Mr=Ga(!1),Tr=Ga(!1),Vr=Ga(!1),mn=Ga(null),Dt=Ga(null),cn=Ga(null),Jn=Ga(null),Bn=Ga(null),ni=Ga(null),Wi=Ga(null),Un=$o(()=>{const ko=s.packetStats;return ko?{totalRx:ko.total_packets||0,totalTx:ko.transmitted_packets||0}:{totalRx:0,totalTx:0}}),qr=$o(()=>{let ko=[],ro=[];if(_t.value?.series){const Ia=_t.value.series.find(no=>no.type==="rx_count"),da=_t.value.series.find(no=>no.type==="tx_count");Ia?.data&&(ko=Ia.data.map(([,no])=>no)),da?.data&&(ro=da.data.map(([,no])=>no))}return{totalPackets:ko,transmittedPackets:ro,droppedPackets:[]}}),Di=async()=>{try{De.value=!0,er.value=null,await Promise.all([s.fetchPacketStats({hours:K.value}),s.fetchSystemStats()]),De.value=!1,Fi()}catch(ko){er.value=ko instanceof Error?ko.message:"Failed to fetch data",De.value=!1}},Fi=async()=>{pr.value={packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0};const ko=[Pi(),bi(),Yi(),Ca()];try{await Promise.allSettled(ko),await om(),!Jn.value||!Bn.value?setTimeout(()=>{Ma()},100):Ma()}catch(ro){console.error("Error loading chart data:",ro)}},Pi=async()=>{pr.value.packetRate=!0;try{const ko=await Ah.get("/metrics_graph_data",{hours:K.value,resolution:"average",metrics:"rx_count,tx_count"});ko?.success&&(_t.value=ko.data)}catch{_t.value=null}},bi=async()=>{pr.value.packetType=!0;try{const ko=await Ah.get("/packet_type_graph_data",{hours:K.value,resolution:"average",types:"all"});if(ko?.success&&ko.data){const ro=ko.data;jt.value=ro.series||[]}}catch{jt.value=[]}},Yi=async()=>{pr.value.routePie=!0;try{const ko=await Ah.get("/route_stats",{hours:K.value});ko?.success&&ko.data&&(te.value=ko.data)}catch{te.value=null}},Ca=async()=>{try{const ko=await Ah.get("/noise_floor_history",{hours:K.value});if(ko.success&&ko.data){const Ia=ko.data.history||[];Array.isArray(Ia)&&Ia.length>0&&(Ot.value={chart_data:Ia.map(da=>({timestamp:da.timestamp||Date.now()/1e3,noise_floor_dbm:da.noise_floor_dbm||da.noise_floor||-120}))},si())}}catch{Ot.value={chart_data:[]}}},Ni=()=>{zo(),Mr.value=!1,Tr.value=!1,Vr.value=!1,Di()},si=()=>{if(he.value=[],Ot.value?.chart_data&&Ot.value.chart_data.length>0){const ko=Ot.value.chart_data,ro=Math.max(1,Math.floor(ko.length/100));he.value=ko.filter((Ia,da)=>da%ro===0).map(Ia=>({timestamp:Ia.timestamp*1e3,snr:null,rssi:null,noiseFloor:Ia.noise_floor_dbm}))}},Ma=()=>{if(!B.value){B.value=!0;try{ho(),mo(),Ts(),xl(),setTimeout(()=>{pr.value.packetRate&&mn.value&&(pr.value.packetRate=!1),pr.value.packetType&&Dt.value&&(pr.value.packetType=!1),pr.value.routePie&&Wi.value&&(pr.value.routePie=!1),pr.value.routePie&&Wi.value&&(pr.value.routePie=!1),setTimeout(()=>{const ko=Uu(mn.value),ro=Uu(Dt.value),Ia=Uu(cn.value);ko&&ko.update("none"),ro&&ro.update("none"),Ia&&Ia.update("none")},50)},100)}catch(ko){console.error("Error creating/updating charts:",ko),zo()}finally{B.value=!1}}},zo=()=>{try{mn.value&&(mn.value.destroy(),mn.value=null),Dt.value&&(Dt.value.destroy(),Dt.value=null),cn.value&&(cn.value.destroy(),cn.value=null),Wi.value&&c1.purge(Wi.value)}catch(ko){console.error("Error destroying charts:",ko)}},ho=()=>{if(!Jn.value){pr.value.packetRate=!1;return}const ko=Jn.value.getContext("2d");if(!ko){pr.value.packetRate=!1;return}let ro=[],Ia=[];if(_t.value?.series){const da=_t.value.series.find(po=>po.type==="rx_count"),no=_t.value.series.find(po=>po.type==="tx_count");da?.data&&(ro=da.data.map(([po,us])=>{let Ho=po;return po>1e15?Ho=po/1e3:po>1e12?Ho=po:po>1e9?Ho=po*1e3:Ho=Date.now(),{x:Ho,y:us}})),no?.data&&(Ia=no.data.map(([po,us])=>{let Ho=po;return po>1e15?Ho=po/1e3:po>1e12?Ho=po:po>1e9?Ho=po*1e3:Ho=Date.now(),{x:Ho,y:us}}))}if(ro.length===0&&Ia.length===0){Mr.value=!0,pr.value.packetRate=!1;return}Mr.value=!1,mn.value&&(mn.value.destroy(),mn.value=null);try{const da=JSON.parse(JSON.stringify(ro)),no=JSON.parse(JSON.stringify(Ia)),po=new x2(ko,{type:"line",data:{datasets:[{label:"RX/hr",data:da,borderColor:"#C084FC",backgroundColor:"rgba(192, 132, 252, 0.1)",borderWidth:2,fill:!0,tension:.4},{label:"TX/hr",data:no,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,fill:!0,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1},title:{display:!1}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{beginAtZero:!1,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",callback:function(us){return typeof us=="number"?us.toFixed(3):us},stepSize:.002},min:0,max:.012}}}});mn.value=Uu(po),pr.value.packetRate=!1,setTimeout(()=>{pr.value.packetRate&&(pr.value.packetRate=!1)},50)}catch(da){console.error("Error creating packet rate chart:",da),Mr.value=!0,pr.value.packetRate=!1}},mo=()=>{if(!Bn.value){pr.value.packetType=!1;return}const ko=Bn.value.getContext("2d");if(!ko){pr.value.packetType=!1;return}const ro=[],Ia=[],da=["#60A5FA","#34D399","#FBBF24","#A78BFA","#F87171","#06B6D4","#84CC16","#F472B6","#10B981"];if(jt.value.length>0)jt.value.forEach(no=>{const po=no.data?no.data.reduce((us,Ho)=>us+Ho[1],0):0;po>0&&(ro.push(no.name.replace(/\([^)]*\)/g,"").trim()),Ia.push(po))});else{Tr.value=!0,pr.value.packetType=!1;return}Tr.value=!1,Dt.value&&(Dt.value.destroy(),Dt.value=null);try{const no=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=new x2(ko,{type:"bar",data:{labels:no,datasets:[{data:po,backgroundColor:da.slice(0,po.length),borderRadius:8,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{color:"rgba(255, 255, 255, 0.7)",font:{size:10}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)"}}}}});Dt.value=Uu(us),pr.value.packetType=!1,setTimeout(()=>{pr.value.packetType&&(pr.value.packetType=!1)},50)}catch(no){console.error("Error creating packet type chart:",no),Tr.value=!0,pr.value.packetType=!1}},Ts=()=>{if(!ni.value)return;const ko=ni.value.getContext("2d");if(!ko)return;const ro=he.value.map(no=>({x:no.timestamp,y:no.noiseFloor})).filter(no=>no.y!==null&&no.y!==void 0);if(cn.value)try{const no=Uu(cn.value),po=JSON.parse(JSON.stringify(ro));no.data.datasets[0]&&(no.data.datasets[0].data=po),no.update("active");return}catch{cn.value.destroy(),cn.value=null}const Ia=JSON.parse(JSON.stringify(ro)),da=new x2(ko,{type:"line",data:{datasets:[{label:"Noise Floor (dBm)",data:Ia,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,tension:.3,pointRadius:0,pointHoverRadius:3,fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{color:"rgba(255, 255, 255, 0.8)",usePointStyle:!0,padding:20}}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{type:"linear",display:!0,title:{display:!0,text:"Noise Floor (dBm)",color:"rgba(255, 255, 255, 0.8)"},grid:{color:"rgba(245, 158, 11, 0.2)"},ticks:{color:"#F59E0B",stepSize:.5,callback:function(no){return typeof no=="number"?no.toFixed(1):no}},min:-117,max:-113}}}});cn.value=Uu(da)},xl=()=>{if(!Wi.value){pr.value.routePie=!1;return}if(!te.value||!te.value.route_totals){Vr.value=!0,pr.value.routePie=!1;return}Vr.value=!1;const ko=te.value.route_totals,ro=Object.keys(ko),Ia=Object.values(ko),da=["#3B82F6","#F87171","#10B981","#F59E0B","#A78BFA"];try{const no=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=[{type:"pie",labels:no,values:po,marker:{colors:da.slice(0,po.length)},hovertemplate:"%{label}
Count: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",pull:.1,hole:.3}],Ho={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},vi={responsive:!0,displayModeBar:!1,staticPlot:!1};c1.newPlot(Wi.value,us,Ho,vi),pr.value.routePie=!1,setTimeout(()=>{pr.value.routePie&&(pr.value.routePie=!1)},50)}catch(no){console.error("Error creating 3D route pie chart:",no),Vr.value=!0,pr.value.routePie=!1}};return bp(async()=>{await om(),Di(),E.value=window.setInterval(Di,3e4),window.addEventListener("resize",()=>{setTimeout(()=>{Uu(mn.value)?.resize(),Uu(Dt.value)?.resize(),Uu(cn.value)?.resize(),Wi.value&&c1.Plots&&c1.Plots.resize(Wi.value)},100)})}),gg(()=>{E.value&&clearInterval(E.value),mn.value?.destroy(),Dt.value?.destroy(),cn.value?.destroy(),Wi.value&&c1.purge(Wi.value),window.removeEventListener("resize",()=>{})}),(ko,ro)=>(_i(),zi("div",qpt,[Ee("div",$pt,[ro[2]||(ro[2]=Ee("h2",{class:"text-2xl font-bold text-white"},"Statistics",-1)),Ee("div",Zpt,[ro[1]||(ro[1]=Ee("label",{class:"text-white/70 text-sm"},"Time Range:",-1)),Gp(Ee("select",{"onUpdate:modelValue":ro[0]||(ro[0]=Ia=>K.value=Ia),onChange:Ni,class:"bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-accent-purple/50 transition-colors"},[(_i(),zi(Pu,null,Jh(pt,Ia=>Ee("option",{key:Ia.value,value:Ia.value,class:"bg-gray-800 text-white"},Qi(Ia.label),9,Gpt)),64))],544),[[pA,K.value]])])]),Ee("div",Ypt,[Wl(o_,{title:"Total RX",value:Un.value.totalRx,color:"#AAE8E8",data:qr.value.totalPackets},null,8,["value","data"]),Wl(o_,{title:"Total TX",value:Un.value.totalTx,color:"#FFC246",data:qr.value.transmittedPackets},null,8,["value","data"])]),Ee("div",Kpt,[ro[9]||(ro[9]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Performance Metrics",-1)),Ee("div",Xpt,[ro[5]||(ro[5]=$f('

Packet Rate (RX/TX PER HOUR)

RX/hr
TX/hr
',2)),Ee("div",Jpt,[Ee("canvas",{ref_key:"packetRateCanvasRef",ref:Jn,class:"w-full h-full relative z-10"},null,512),pr.value.packetRate?(_i(),zi("div",Qpt,ro[3]||(ro[3]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-purple-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading packet rate data...")],-1)]))):is("",!0),Mr.value&&!pr.value.packetRate?(_i(),zi("div",t0t,ro[4]||(ro[4]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Packet rate data not found")],-1)]))):is("",!0)])]),Ee("div",e0t,[ro[8]||(ro[8]=Ee("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Packet Type Distribution",-1)),Ee("div",r0t,[Ee("canvas",{ref_key:"packetTypeCanvasRef",ref:Bn,class:"w-full h-full relative z-10"},null,512),pr.value.packetType?(_i(),zi("div",n0t,ro[6]||(ro[6]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-blue-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading packet type data...")],-1)]))):is("",!0),Tr.value&&!pr.value.packetType?(_i(),zi("div",i0t,ro[7]||(ro[7]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Packet type data not found")],-1)]))):is("",!0)])])]),Ee("div",a0t,[ro[13]||(ro[13]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Noise Floor Over Time",-1)),Ee("div",o0t,[Ee("div",s0t,[Ee("div",l0t,[Ee("canvas",{ref_key:"signalMetricsCanvasRef",ref:ni,class:"w-full h-full"},null,512)])]),Ee("div",u0t,[ro[12]||(ro[12]=Ee("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Route Distribution",-1)),Ee("div",c0t,[Ee("div",{ref_key:"signalPie3DRef",ref:Wi,class:"w-full h-full relative z-10"},null,512),pr.value.routePie?(_i(),zi("div",h0t,ro[10]||(ro[10]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading route data...")],-1)]))):is("",!0),Vr.value&&!pr.value.routePie?(_i(),zi("div",f0t,ro[11]||(ro[11]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Route statistics not found")],-1)]))):is("",!0)])])])]),De.value?(_i(),zi("div",d0t,ro[14]||(ro[14]=[Ee("div",{class:"text-white/70 mb-2"},"Loading statistics...",-1),Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):is("",!0),er.value?(_i(),zi("div",p0t,[ro[15]||(ro[15]=Ee("div",{class:"text-red-400 mb-2"},"Failed to load statistics",-1)),Ee("p",m0t,Qi(er.value),1),Ee("button",{onClick:Di,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):is("",!0)]))}}),v0t=ld(g0t,[["__scopeId","data-v-9766a4d1"]]),y0t={class:"space-y-4"},x0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},_0t={class:"flex justify-between items-center py-2 border-b border-white/10"},b0t={class:"text-white font-mono"},w0t={class:"flex justify-between items-center py-2 border-b border-white/10"},k0t={class:"text-white font-mono"},T0t={class:"flex justify-between items-center py-2 border-b border-white/10"},A0t={class:"text-white font-mono"},M0t={class:"flex justify-between items-center py-2 border-b border-white/10"},S0t={class:"text-white font-mono"},E0t={class:"flex justify-between items-center py-2 border-b border-white/10"},C0t={class:"text-white font-mono"},L0t={class:"flex justify-between items-center py-2"},P0t={class:"text-white font-mono"},I0t=Dc({__name:"RadioSettings",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.radio||{}),B=$o(()=>{const te=E.value.frequency;return te?(te/1e6).toFixed(3)+" MHz":"Not set"}),K=$o(()=>{const te=E.value.bandwidth;return te?(te/1e3).toFixed(1)+" kHz":"Not set"}),pt=$o(()=>{const te=E.value.tx_power;return te!==void 0?te+" dBm":"Not set"}),_t=$o(()=>{const te=E.value.coding_rate;return te?"4/"+te:"Not set"}),Ot=$o(()=>{const te=E.value.preamble_length;return te?te+" symbols":"Not set"}),jt=$o(()=>E.value.spreading_factor??"Not set");return(te,he)=>(_i(),zi("div",y0t,[Ee("div",x0t,[Ee("div",_0t,[he[0]||(he[0]=Ee("span",{class:"text-white/70 text-sm"},"Frequency",-1)),Ee("span",b0t,Qi(B.value),1)]),Ee("div",w0t,[he[1]||(he[1]=Ee("span",{class:"text-white/70 text-sm"},"Spreading Factor",-1)),Ee("span",k0t,Qi(jt.value),1)]),Ee("div",T0t,[he[2]||(he[2]=Ee("span",{class:"text-white/70 text-sm"},"Bandwidth",-1)),Ee("span",A0t,Qi(K.value),1)]),Ee("div",M0t,[he[3]||(he[3]=Ee("span",{class:"text-white/70 text-sm"},"TX Power",-1)),Ee("span",S0t,Qi(pt.value),1)]),Ee("div",E0t,[he[4]||(he[4]=Ee("span",{class:"text-white/70 text-sm"},"Coding Rate",-1)),Ee("span",C0t,Qi(_t.value),1)]),Ee("div",L0t,[he[5]||(he[5]=Ee("span",{class:"text-white/70 text-sm"},"Preamble Length",-1)),Ee("span",P0t,Qi(Ot.value),1)])])]))}}),z0t={class:"space-y-4"},O0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},D0t={class:"flex justify-between items-center py-2 border-b border-white/10"},F0t={class:"text-white font-mono"},R0t={class:"flex justify-between items-center py-2 border-b border-white/10"},B0t={class:"text-white font-mono text-xs"},N0t={class:"flex justify-between items-start py-2 border-b border-white/10"},j0t={class:"text-white font-mono text-xs text-right break-all max-w-xs"},U0t={class:"flex justify-between items-center py-2 border-b border-white/10"},V0t={class:"text-white font-mono"},H0t={class:"flex justify-between items-center py-2 border-b border-white/10"},W0t={class:"text-white font-mono"},q0t={class:"flex justify-between items-center py-2 border-b border-white/10"},$0t={class:"text-white font-mono"},Z0t={class:"flex justify-between items-start py-2"},G0t={class:"text-white font-mono ml-4"},Y0t=Dc({__name:"RepeaterSettings",setup(d){const s=Om(),E=$o(()=>s.stats?.config||{}),B=$o(()=>E.value.repeater||{}),K=$o(()=>s.stats),pt=$o(()=>E.value.node_name||"Not set"),_t=$o(()=>K.value?.local_hash||"Not available"),Ot=$o(()=>{const er=K.value?.public_key;return!er||er==="Not set"?"Not set":er}),jt=$o(()=>{const er=B.value.latitude;return er&&er!==0?er.toFixed(6):"Not set"}),te=$o(()=>{const er=B.value.longitude;return er&&er!==0?er.toFixed(6):"Not set"}),he=$o(()=>{const er=B.value.mode;return er?er.charAt(0).toUpperCase()+er.slice(1):"Not set"}),De=$o(()=>{const er=B.value.send_advert_interval_hours;return er===void 0?"Not set":er===0?"Disabled":er+" hour"+(er!==1?"s":"")});return(er,pr)=>(_i(),zi("div",z0t,[Ee("div",O0t,[Ee("div",D0t,[pr[0]||(pr[0]=Ee("span",{class:"text-white/70 text-sm"},"Node Name",-1)),Ee("span",F0t,Qi(pt.value),1)]),Ee("div",R0t,[pr[1]||(pr[1]=Ee("span",{class:"text-white/70 text-sm"},"Local Hash",-1)),Ee("span",B0t,Qi(_t.value),1)]),Ee("div",N0t,[pr[2]||(pr[2]=Ee("span",{class:"text-white/70 text-sm"},"Public Key",-1)),Ee("span",j0t,Qi(Ot.value),1)]),Ee("div",U0t,[pr[3]||(pr[3]=Ee("span",{class:"text-white/70 text-sm"},"Latitude",-1)),Ee("span",V0t,Qi(jt.value),1)]),Ee("div",H0t,[pr[4]||(pr[4]=Ee("span",{class:"text-white/70 text-sm"},"Longitude",-1)),Ee("span",W0t,Qi(te.value),1)]),Ee("div",q0t,[pr[5]||(pr[5]=Ee("span",{class:"text-white/70 text-sm"},"Mode",-1)),Ee("span",$0t,Qi(he.value),1)]),Ee("div",Z0t,[pr[6]||(pr[6]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Periodic Advertisement Interval"),Ee("span",{class:"text-white/50 text-xs mt-1"},"How often the repeater sends an advertisement packet (0 = disabled)")],-1)),Ee("span",G0t,Qi(De.value),1)])])]))}}),K0t={class:"space-y-4"},X0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},J0t={class:"flex justify-between items-center py-2 border-b border-white/10"},Q0t={class:"text-white font-mono"},tmt={class:"flex justify-between items-center py-2"},emt={class:"text-white font-mono"},rmt=Dc({__name:"DutyCycle",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.duty_cycle||{}),B=$o(()=>{const pt=E.value.max_airtime_percent;return typeof pt=="number"?pt.toFixed(1)+"%":pt&&typeof pt=="object"&&"parsedValue"in pt?(pt.parsedValue||0).toFixed(1)+"%":"Not set"}),K=$o(()=>E.value.enforcement_enabled?"Enabled":"Disabled");return(pt,_t)=>(_i(),zi("div",K0t,[Ee("div",X0t,[Ee("div",J0t,[_t[0]||(_t[0]=Ee("span",{class:"text-white/70 text-sm"},"Max Airtime %",-1)),Ee("span",Q0t,Qi(B.value),1)]),Ee("div",tmt,[_t[1]||(_t[1]=Ee("span",{class:"text-white/70 text-sm"},"Enforcement",-1)),Ee("span",emt,Qi(K.value),1)])])]))}}),nmt={class:"space-y-4"},imt={class:"bg-white/5 rounded-lg p-4 space-y-3"},amt={class:"flex justify-between items-start py-2 border-b border-white/10"},omt={class:"text-white font-mono ml-4"},smt={class:"flex justify-between items-start py-2"},lmt={class:"text-white font-mono ml-4"},umt=Dc({__name:"TransmissionDelays",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.delays||{}),B=$o(()=>{const pt=E.value.tx_delay_factor;if(pt&&typeof pt=="object"&&pt!==null&&"parsedValue"in pt){const _t=pt.parsedValue;if(typeof _t=="number")return _t.toFixed(2)+"x"}return"Not set"}),K=$o(()=>{const pt=E.value.direct_tx_delay_factor;return typeof pt=="number"?pt.toFixed(2)+"s":"Not set"});return(pt,_t)=>(_i(),zi("div",nmt,[Ee("div",imt,[Ee("div",amt,[_t[0]||(_t[0]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Flood TX Delay Factor"),Ee("span",{class:"text-white/50 text-xs mt-1"},"Multiplier for flood packet transmission delays (collision avoidance)")],-1)),Ee("span",omt,Qi(B.value),1)]),Ee("div",smt,[_t[1]||(_t[1]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Direct TX Delay Factor"),Ee("span",{class:"text-white/50 text-xs mt-1"},"Base delay for direct-routed packet transmission (seconds)")],-1)),Ee("span",lmt,Qi(K.value),1)])])]))}}),dF=oM("treeState",()=>{const d=My(new Set),s=My({value:null}),E=Ot=>{d.add(Ot)},B=Ot=>{d.delete(Ot)};return{expandedNodes:d,selectedNodeId:s,addExpandedNode:E,removeExpandedNode:B,isNodeExpanded:Ot=>d.has(Ot),setSelectedNode:Ot=>{s.value=Ot},toggleExpanded:Ot=>{d.has(Ot)?B(Ot):E(Ot)}}}),cmt={class:"select-none"},hmt={class:"flex-shrink-0"},fmt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},dmt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},pmt={key:0,class:"flex items-center gap-1 ml-2"},mmt={class:"relative group"},gmt=["title"],vmt={key:0,class:"text-xs font-mono text-white/50 bg-white/5 px-1.5 py-0.5 rounded border border-white/10"},ymt={class:"flex justify-between items-start mb-4"},xmt={class:"bg-black/20 border border-white/10 rounded-md p-4 mb-4"},_mt={class:"text-sm font-mono text-white/80 break-all leading-relaxed"},bmt={class:"flex items-center gap-2 ml-auto"},wmt={key:0,class:"flex items-center gap-1"},kmt=["title"],Tmt={key:1,class:"flex items-center gap-1"},Amt={key:2,class:"px-2 py-1 bg-white/10 text-white/60 text-xs rounded-full ml-1"},Mmt={key:0,class:"space-y-1"},Smt=Dc({__name:"TreeNode",props:{node:{},selectedNodeId:{},level:{},disabled:{type:Boolean}},emits:["select"],setup(d,{emit:s}){const E=d,B=s,K=dF(),pt=Ga(!1),_t=$o({get:()=>K.isNodeExpanded(E.node.id),set:Tr=>{Tr?K.addExpandedNode(E.node.id):K.removeExpandedNode(E.node.id)}}),Ot=$o(()=>E.node.children.length>0);function jt(Tr){if(!Tr)return"Never";const mn=new Date().getTime()-Tr.getTime(),Dt=Math.floor(mn/(1e3*60)),cn=Math.floor(mn/(1e3*60*60)),Jn=Math.floor(mn/(1e3*60*60*24)),Bn=Math.floor(Jn/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:Jn<365?`${Jn}d ago`:`${Bn}y ago`}function te(Tr){return Tr?Tr.length<=16?Tr:`${Tr.slice(0,8)}...${Tr.slice(-8)}`:"No key"}function he(){if(Ot.value){const Tr=!_t.value;_t.value=Tr}}function De(){B("select",E.node.id)}function er(Tr){B("select",Tr)}function pr(Tr){Tr.stopPropagation(),pt.value=!pt.value}function Mr(Tr){Tr.stopPropagation(),E.node.transport_key&&window.navigator?.clipboard&&window.navigator.clipboard.writeText(E.node.transport_key)}return(Tr,Vr)=>{const mn=QA("TreeNode",!0);return _i(),zi("div",cmt,[Ee("div",{class:jo(["flex items-center gap-2 py-2 px-3 rounded-lg cursor-pointer transition-all duration-200",E.disabled?"opacity-50 cursor-not-allowed":"hover:bg-white/5",Tr.selectedNodeId===Tr.node.id&&!E.disabled?"bg-primary/20 text-primary":"text-white/80 hover:text-white",`ml-${Tr.level*4}`]),onClick:Vr[3]||(Vr[3]=Dt=>!E.disabled&&De())},[Ee("div",{class:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:Pm(he,["stop"])},[Ot.value?(_i(),zi("svg",{key:0,class:jo(["w-3 h-3 transition-transform duration-200",_t.value?"rotate-90":"rotate-0"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vr[4]||(Vr[4]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)]),2)):is("",!0)]),Ee("div",hmt,[E.node.name.startsWith("#")?(_i(),zi("svg",fmt,Vr[5]||(Vr[5]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",dmt,Vr[6]||(Vr[6]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])))]),Ee("span",{class:jo(["font-mono text-sm transition-colors duration-200",Tr.selectedNodeId===Tr.node.id?"text-primary font-medium":""])},Qi(Tr.node.name),3),Tr.node.transport_key?(_i(),zi("div",pmt,[Ee("div",mmt,[Ee("button",{onClick:pr,class:"p-1 rounded hover:bg-white/10 transition-colors",title:pt.value?"Hide full key":"Show full key"},Vr[7]||(Vr[7]=[Ee("svg",{class:"w-3 h-3 text-white/60 hover:text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,gmt),pt.value?is("",!0):(_i(),zi("span",vmt,Qi(te(Tr.node.transport_key)),1)),pt.value?(_i(),zi("div",{key:1,class:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-md",onClick:Vr[2]||(Vr[2]=Dt=>pt.value=!1)},[Ee("div",{class:"bg-black/20 border border-white/20 rounded-lg shadow-lg p-6 max-w-2xl w-full mx-4",onClick:Vr[1]||(Vr[1]=Pm(()=>{},["stop"]))},[Ee("div",ymt,[Vr[9]||(Vr[9]=Ee("h3",{class:"text-lg font-semibold text-white"},"Transport Key",-1)),Ee("button",{onClick:Vr[0]||(Vr[0]=Dt=>pt.value=!1),class:"text-white/60 hover:text-white transition-colors"},Vr[8]||(Vr[8]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",xmt,[Ee("div",_mt,Qi(Tr.node.transport_key),1)]),Ee("div",{class:"flex justify-end"},[Ee("button",{onClick:Mr,class:"px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green rounded-lg transition-colors flex items-center gap-2",title:"Copy to clipboard"},Vr[10]||(Vr[10]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])])):is("",!0)])])):is("",!0),Ee("div",bmt,[Tr.node.last_used?(_i(),zi("div",wmt,[Vr[11]||(Vr[11]=Ee("svg",{class:"w-3 h-3 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Ee("span",{class:"text-xs text-white/50",title:Tr.node.last_used.toLocaleString()},Qi(jt(Tr.node.last_used)),9,kmt)])):(_i(),zi("div",Tmt,Vr[12]||(Vr[12]=[Ee("svg",{class:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Ee("span",{class:"text-xs text-white/30 italic"},"Never",-1)]))),Ee("span",{class:jo(["px-2 py-0.5 text-xs font-medium rounded-md transition-colors",Tr.node.floodPolicy==="allow"?"bg-accent-green/10 text-accent-green/90 border border-accent-green/20":"bg-accent-red/10 text-accent-red/90 border border-accent-red/20"])},Qi(Tr.node.floodPolicy==="allow"?"FLOOD ALLOW":"FLOOD DENY"),3),Ot.value?(_i(),zi("span",Amt,Qi(Tr.node.children.length),1)):is("",!0)])],2),Wl($z,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0 overflow-hidden","enter-to-class":"opacity-100 max-h-screen overflow-visible","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-screen overflow-visible","leave-to-class":"opacity-0 max-h-0 overflow-hidden"},{default:ew(()=>[_t.value&&Tr.node.children.length>0?(_i(),zi("div",Mmt,[(_i(!0),zi(Pu,null,Jh(Tr.node.children,Dt=>(_i(),Z0(mn,{key:Dt.id,node:Dt,"selected-node-id":Tr.selectedNodeId,level:Tr.level+1,disabled:E.disabled,onSelect:er},null,8,["node","selected-node-id","level","disabled"]))),128))])):is("",!0)]),_:1})])}}}),Emt=ld(Smt,[["__scopeId","data-v-4afde13e"]]),Cmt={class:"flex items-center justify-between mb-6"},Lmt={class:"text-white/60 text-sm mt-1"},Pmt={key:0},Imt={class:"text-primary font-mono"},zmt={key:1},Omt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},Dmt={class:"flex items-center gap-2"},Fmt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Rmt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Bmt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},Nmt={class:"flex items-center gap-3 mb-2"},jmt={class:"flex items-center gap-2"},Umt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vmt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Hmt={class:"text-white/70 text-sm"},Wmt={class:"grid grid-cols-2 gap-3"},qmt={class:"relative cursor-pointer group"},$mt={class:"relative cursor-pointer group"},Zmt={class:"flex gap-3 pt-4"},Gmt=["disabled"],Ymt=Dc({__name:"AddKeyModal",props:{show:{type:Boolean},selectedNodeName:{},selectedNodeId:{}},emits:["close","add"],setup(d,{emit:s}){const E=d,B=s,K=Ga(""),pt=Ga(""),_t=Ga("allow"),Ot=$o(()=>K.value.startsWith("#")),jt=$o(()=>({type:Ot.value?"Region":"Private Key",description:Ot.value?"Regional organizational key":"Individual assigned key"}));Em(Ot,pr=>{pr?pt.value="This will create a new region for organizing keys":pt.value="This will create a new private key entry"},{immediate:!0});const te=$o(()=>K.value.trim().length>0),he=()=>{te.value&&(B("add",{name:K.value.trim(),floodPolicy:_t.value,parentId:E.selectedNodeId}),K.value="",pt.value="",_t.value="allow")},De=()=>{K.value="",pt.value="",_t.value="allow",B("close")},er=pr=>{pr.target===pr.currentTarget&&De()};return(pr,Mr)=>pr.show?(_i(),zi("div",{key:0,onClick:er,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Mr[3]||(Mr[3]=Pm(()=>{},["stop"]))},[Ee("div",Cmt,[Ee("div",null,[Mr[5]||(Mr[5]=Ee("h3",{class:"text-xl font-semibold text-white"},"Add New Entry",-1)),Ee("p",Lmt,[E.selectedNodeName?(_i(),zi("span",Pmt,[Mr[4]||(Mr[4]=Qu(" Add to: ",-1)),Ee("span",Imt,Qi(E.selectedNodeName),1)])):(_i(),zi("span",zmt," Add to root level (#uk) "))])]),Ee("button",{onClick:De,class:"text-white/60 hover:text-white transition-colors"},Mr[6]||(Mr[6]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("form",{onSubmit:Pm(he,["prevent"]),class:"space-y-4"},[Ee("div",null,[Ee("label",Omt,[Ee("div",Dmt,[Ot.value?(_i(),zi("svg",Fmt,Mr[7]||(Mr[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Rmt,Mr[8]||(Mr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))),Mr[9]||(Mr[9]=Qu(" Region/Key Name ",-1))])]),Gp(Ee("input",{id:"keyName","onUpdate:modelValue":Mr[0]||(Mr[0]=Tr=>K.value=Tr),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[aM,K.value]])]),Ee("div",Bmt,[Ee("div",Nmt,[Ee("div",jmt,[Ot.value?(_i(),zi("svg",Umt,Mr[10]||(Mr[10]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Vmt,Mr[11]||(Mr[11]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1221 9z"},null,-1)]))),Ee("span",{class:jo([Ot.value?"text-secondary":"text-accent-green","font-medium"])},Qi(jt.value.type),3)]),Ee("div",{class:jo(["flex-1 h-px",Ot.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Ee("p",Hmt,Qi(jt.value.description),1)]),Ee("div",null,[Mr[14]||(Mr[14]=Ee("label",{class:"block text-sm font-medium text-white mb-3"},[Ee("div",{class:"flex items-center gap-2"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),Ee("div",Wmt,[Ee("label",qmt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Mr[1]||(Mr[1]=Tr=>_t.value=Tr),value:"allow",class:"sr-only"},null,512),[[V2,_t.value]]),Mr[12]||(Mr[12]=$f('
Allow

Permit flooding

',1))]),Ee("label",$mt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Mr[2]||(Mr[2]=Tr=>_t.value=Tr),value:"deny",class:"sr-only"},null,512),[[V2,_t.value]]),Mr[13]||(Mr[13]=$f('
Deny

Block flooding

',1))])])]),Ee("div",Zmt,[Ee("button",{type:"button",onClick:De,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{type:"submit",disabled:!te.value,class:jo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",te.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Add "+Qi(jt.value.type),11,Gmt)])],32)])])):is("",!0)}}),Kmt={class:"flex bg-black items-center justify-between mb-6"},Xmt={class:"text-white/60 text-sm mt-1"},Jmt={class:"text-primary font-mono"},Qmt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},tgt={class:"flex items-center gap-2"},egt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},rgt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ngt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},igt={class:"flex items-center gap-3 mb-2"},agt={class:"flex items-center gap-2"},ogt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},sgt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},lgt={class:"text-white/70 text-sm"},ugt={key:0,class:"space-y-4"},cgt={key:0,class:"bg-white/5 border border-white/10 rounded-lg p-4"},hgt={class:"bg-black/20 border border-white/10 rounded-md p-3"},fgt={class:"text-xs font-mono text-white/80 break-all"},dgt={key:1,class:"bg-white/5 border border-white/10 rounded-lg p-4"},pgt={class:"flex items-center justify-between"},mgt={class:"text-sm text-white/70"},ggt={class:"text-xs text-white/50"},vgt={class:"grid grid-cols-2 gap-3"},ygt={class:"relative cursor-pointer group"},xgt={class:"relative cursor-pointer group"},_gt={class:"flex gap-3 pt-4"},bgt=["disabled"],wgt=Dc({__name:"EditKeyModal",props:{show:{type:Boolean},node:{}},emits:["close","save","request-delete"],setup(d,{emit:s}){const E=d,B=s,K=Ga(""),pt=Ga("allow"),_t=$o(()=>K.value.startsWith("#")),Ot=$o(()=>({type:_t.value?"Region":"Private Key",description:_t.value?"Regional organizational key":"Individual assigned key"}));Em(()=>E.node,Tr=>{Tr?(K.value=Tr.name,pt.value=Tr.floodPolicy):(K.value="",pt.value="allow")},{immediate:!0});const jt=$o(()=>K.value.trim().length>0&&E.node),te=Tr=>{const mn=new Date().getTime()-Tr.getTime(),Dt=Math.floor(mn/(1e3*60)),cn=Math.floor(mn/(1e3*60*60)),Jn=Math.floor(mn/(1e3*60*60*24)),Bn=Math.floor(Jn/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:Jn<365?`${Jn}d ago`:`${Bn}y ago`},he=Tr=>{window.navigator?.clipboard&&window.navigator.clipboard.writeText(Tr)},De=()=>{!jt.value||!E.node||(B("save",{id:E.node.id,name:K.value.trim(),floodPolicy:pt.value}),pr())},er=()=>{E.node&&(B("request-delete",E.node),pr())},pr=()=>{B("close")},Mr=Tr=>{Tr.target===Tr.currentTarget&&pr()};return(Tr,Vr)=>Tr.show?(_i(),zi("div",{key:0,onClick:Mr,class:"fixed inset-0 bg-black/50 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Vr[4]||(Vr[4]=Pm(()=>{},["stop"]))},[Ee("div",Kmt,[Ee("div",null,[Vr[6]||(Vr[6]=Ee("h3",{class:"text-xl font-semibold text-white"},"Edit Entry",-1)),Ee("p",Xmt,[Vr[5]||(Vr[5]=Qu(" Modify ",-1)),Ee("span",Jmt,Qi(Tr.node?.name),1)])]),Ee("button",{onClick:pr,class:"text-white/60 hover:text-white transition-colors"},Vr[7]||(Vr[7]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("form",{onSubmit:Pm(De,["prevent"]),class:"space-y-4"},[Ee("div",null,[Ee("label",Qmt,[Ee("div",tgt,[_t.value?(_i(),zi("svg",egt,Vr[8]||(Vr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",rgt,Vr[9]||(Vr[9]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Vr[10]||(Vr[10]=Qu(" Region/Key Name ",-1))])]),Gp(Ee("input",{id:"keyName","onUpdate:modelValue":Vr[0]||(Vr[0]=mn=>K.value=mn),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[aM,K.value]])]),Ee("div",ngt,[Ee("div",igt,[Ee("div",agt,[_t.value?(_i(),zi("svg",ogt,Vr[11]||(Vr[11]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",sgt,Vr[12]||(Vr[12]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Ee("span",{class:jo([_t.value?"text-secondary":"text-accent-green","font-medium"])},Qi(Ot.value.type),3)]),Ee("div",{class:jo(["flex-1 h-px",_t.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Ee("p",lgt,Qi(Ot.value.description),1)]),Tr.node?(_i(),zi("div",ugt,[Tr.node.transport_key?(_i(),zi("div",cgt,[Vr[14]||(Vr[14]=$f('
Transport Key
',1)),Ee("div",hgt,[Ee("div",fgt,Qi(Tr.node.transport_key),1),Ee("button",{onClick:Vr[1]||(Vr[1]=mn=>he(Tr.node.transport_key||"")),class:"mt-2 text-xs text-accent-green hover:text-accent-green/80 flex items-center gap-1",title:"Copy to clipboard"},Vr[13]||(Vr[13]=[Ee("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])):is("",!0),Tr.node.last_used?(_i(),zi("div",dgt,[Vr[15]||(Vr[15]=Ee("div",{class:"flex items-center gap-2 mb-3"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),Ee("span",{class:"text-sm font-medium text-white"},"Last Used")],-1)),Ee("div",pgt,[Ee("div",mgt,Qi(Tr.node.last_used.toLocaleDateString())+" at "+Qi(Tr.node.last_used.toLocaleTimeString()),1),Ee("div",ggt,Qi(te(Tr.node.last_used)),1)])])):is("",!0)])):is("",!0),Ee("div",null,[Vr[18]||(Vr[18]=Ee("label",{class:"block text-sm font-medium text-white mb-3"},[Ee("div",{class:"flex items-center gap-2"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),Ee("div",vgt,[Ee("label",ygt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Vr[2]||(Vr[2]=mn=>pt.value=mn),value:"allow",class:"sr-only"},null,512),[[V2,pt.value]]),Vr[16]||(Vr[16]=$f('
Allow

Permit flooding

',1))]),Ee("label",xgt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Vr[3]||(Vr[3]=mn=>pt.value=mn),value:"deny",class:"sr-only"},null,512),[[V2,pt.value]]),Vr[17]||(Vr[17]=$f('
Deny

Block flooding

',1))])])]),Ee("div",_gt,[Ee("button",{type:"button",onClick:er,class:"px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors"}," Delete "),Ee("button",{type:"button",onClick:pr,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{type:"submit",disabled:!jt.value,class:jo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",jt.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Save Changes ",10,bgt)])],32)])])):is("",!0)}}),kgt={class:"flex items-center gap-3 mb-6"},Tgt={class:"text-white/60 text-sm mt-1"},Agt={class:"text-accent-red font-mono"},Mgt={key:0,class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},Sgt={class:"flex items-start gap-3"},Egt={class:"flex-1"},Cgt={class:"text-accent-red font-medium text-sm mb-2"},Lgt={class:"space-y-1 max-h-32 overflow-y-auto"},Pgt={key:0,class:"w-3 h-3 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Igt={key:1,class:"w-3 h-3 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},zgt={class:"font-mono"},Ogt={key:0,class:"text-white/60 text-xs"},Dgt={key:1,class:"mb-6"},Fgt={class:"mb-3"},Rgt={class:"relative"},Bgt={class:"space-y-2 max-h-40 overflow-y-auto border border-white/20 rounded-lg p-3 bg-white/5"},Ngt={key:0,class:"text-center py-4 text-white/60 text-sm"},jgt={class:"relative"},Ugt=["value"],Vgt={class:"flex items-center gap-2 flex-1"},Hgt={class:"text-white font-mono text-sm"},Wgt={key:0,class:"ml-auto px-2 py-0.5 bg-white/10 text-white/60 text-xs rounded-full"},qgt={class:"flex gap-3"},$gt=Dc({__name:"DeleteConfirmModal",props:{show:{type:Boolean},node:{},allNodes:{}},emits:["close","delete-all","move-children"],setup(d,{emit:s}){const E=d,B=s,K=Ga(null),pt=Ga(""),_t=Mr=>{const Tr=[],Vr=mn=>{for(const Dt of mn.children)Tr.push(Dt),Vr(Dt)};return Vr(Mr),Tr},Ot=$o(()=>E.node?_t(E.node):[]),jt=$o(()=>{if(!E.node)return[];const Mr=new Set([E.node.id,...Ot.value.map(Vr=>Vr.id)]),Tr=Vr=>{const mn=[];for(const Dt of Vr)Dt.name.startsWith("#")&&!Mr.has(Dt.id)&&mn.push(Dt),Dt.children.length>0&&mn.push(...Tr(Dt.children));return mn};return Tr(E.allNodes)}),te=$o(()=>{if(!pt.value.trim())return jt.value;const Mr=pt.value.toLowerCase();return jt.value.filter(Tr=>Tr.name.toLowerCase().includes(Mr))}),he=()=>{E.node&&(B("delete-all",E.node.id),er())},De=()=>{!E.node||!K.value||(B("move-children",{nodeId:E.node.id,targetParentId:K.value}),er())},er=()=>{K.value=null,pt.value="",B("close")},pr=Mr=>{Mr.target===Mr.currentTarget&&er()};return(Mr,Tr)=>Mr.show&&Mr.node?(_i(),zi("div",{key:0,onClick:pr,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-lg border border-white/10",onClick:Tr[2]||(Tr[2]=Pm(()=>{},["stop"]))},[Ee("div",kgt,[Tr[6]||(Tr[6]=Ee("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Ee("div",null,[Tr[4]||(Tr[4]=Ee("h3",{class:"text-xl font-semibold text-white"},"Confirm Deletion",-1)),Ee("p",Tgt,[Tr[3]||(Tr[3]=Qu(" Deleting ",-1)),Ee("span",Agt,Qi(Mr.node?.name),1)])]),Ee("button",{onClick:er,class:"ml-auto text-white/60 hover:text-white transition-colors"},Tr[5]||(Tr[5]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ot.value.length>0?(_i(),zi("div",Mgt,[Ee("div",Sgt,[Tr[9]||(Tr[9]=Ee("svg",{class:"w-5 h-5 text-accent-red flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Ee("div",Egt,[Ee("h4",Cgt," This will affect "+Qi(Ot.value.length)+" child "+Qi(Ot.value.length===1?"entry":"entries")+": ",1),Ee("div",Lgt,[(_i(!0),zi(Pu,null,Jh(Ot.value.slice(0,10),Vr=>(_i(),zi("div",{key:Vr.id,class:"flex items-center gap-2 text-xs text-white/80"},[Vr.name.startsWith("#")?(_i(),zi("svg",Pgt,Tr[7]||(Tr[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Igt,Tr[8]||(Tr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Ee("span",zgt,Qi(Vr.name),1),Ee("span",{class:jo(["px-1 py-0.5 text-xs rounded",Vr.floodPolicy==="allow"?"bg-accent-green/20 text-accent-green":"bg-accent-red/20 text-accent-red"])},Qi(Vr.floodPolicy),3)]))),128)),Ot.value.length>10?(_i(),zi("div",Ogt," ...and "+Qi(Ot.value.length-10)+" more ",1)):is("",!0)])])])])):is("",!0),Ot.value.length>0&&jt.value.length>0?(_i(),zi("div",Dgt,[Tr[13]||(Tr[13]=Ee("h4",{class:"text-white font-medium text-sm mb-3"},"Move children to another region:",-1)),Ee("div",Fgt,[Ee("div",Rgt,[Tr[10]||(Tr[10]=Ee("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Gp(Ee("input",{"onUpdate:modelValue":Tr[0]||(Tr[0]=Vr=>pt.value=Vr),type:"text",placeholder:"Search regions...",class:"w-full pl-9 pr-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors text-sm"},null,512),[[aM,pt.value]])])]),Ee("div",Bgt,[te.value.length===0?(_i(),zi("div",Ngt,Qi(pt.value?"No regions match your search":"No available regions"),1)):is("",!0),(_i(!0),zi(Pu,null,Jh(te.value,Vr=>(_i(),zi("label",{key:Vr.id,class:"flex items-center gap-3 p-2 rounded cursor-pointer hover:bg-white/10 transition-colors group"},[Ee("div",jgt,[Gp(Ee("input",{type:"radio",value:Vr.id,"onUpdate:modelValue":Tr[1]||(Tr[1]=mn=>K.value=mn),class:"sr-only peer"},null,8,Ugt),[[V2,K.value]]),Tr[11]||(Tr[11]=Ee("div",{class:"w-4 h-4 border-2 border-white/30 rounded-full group-hover:border-white/50 peer-checked:border-primary peer-checked:bg-primary/20 transition-all"},[Ee("div",{class:"w-2 h-2 rounded-full bg-primary scale-0 peer-checked:scale-100 transition-transform absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})],-1))]),Ee("div",Vgt,[Tr[12]||(Tr[12]=Ee("svg",{class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})],-1)),Ee("span",Hgt,Qi(Vr.name),1),Vr.children.length>0?(_i(),zi("span",Wgt,Qi(Vr.children.length),1)):is("",!0)])]))),128))])])):is("",!0),Ee("div",qgt,[Ee("button",{onClick:er,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ot.value.length>0&&K.value?(_i(),zi("button",{key:0,onClick:De,class:"flex-1 px-4 py-3 bg-primary/20 hover:bg-primary/30 border border-primary/50 text-primary rounded-lg transition-colors"}," Move & Delete ")):is("",!0),Ee("button",{onClick:he,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"},Qi(Ot.value.length>0?"Delete All":"Delete"),1)])])])):is("",!0)}}),Zgt={class:"space-y-6"},Ggt={class:"flex justify-between items-start"},Ygt={class:"flex gap-2"},Kgt=["disabled"],Xgt=["disabled"],Jgt=["disabled"],Qgt={class:"glass-card rounded-[15px] p-4 border border-white/10 bg-white/5"},tvt={class:"flex items-center justify-between"},evt={class:"flex items-center gap-3"},rvt={class:"flex bg-white/5 rounded-lg border border-white/20 p-1"},nvt={class:"glass-card rounded-[15px] p-6 border border-white/10"},ivt={key:0,class:"flex items-center justify-center py-8"},avt={key:1,class:"text-center py-8"},ovt={class:"text-white/70 text-sm"},svt={key:2,class:"text-center py-8"},lvt={key:3,class:"space-y-2"},uvt=Dc({name:"TransportKeys",__name:"TransportKeys",setup(d){const s=dF(),E=Ga(!1),B=Ga(!1),K=Ga(!1),pt=Ga(null),_t=Ga(null),Ot=Ga("deny"),jt=Ga([]),te=Ga(!1),he=Ga(null),De=Pi=>{const bi=new Map,Yi=[];return Pi.forEach(Ca=>{const Ni={id:Ca.id,name:Ca.name,floodPolicy:Ca.flood_policy,transport_key:Ca.transport_key,last_used:Ca.last_used?new Date(Ca.last_used*1e3):void 0,parent_id:Ca.parent_id,children:[]};bi.set(Ca.id,Ni)}),bi.forEach(Ca=>{Ca.parent_id&&bi.has(Ca.parent_id)?bi.get(Ca.parent_id).children.push(Ca):Yi.push(Ca)}),Yi},er=async()=>{try{te.value=!0,he.value=null;const Pi=await Ah.getTransportKeys();Pi.success&&Pi.data?jt.value=De(Pi.data):he.value=Pi.error||"Failed to load transport keys"}catch(Pi){he.value=Pi instanceof Error?Pi.message:"Unknown error occurred",console.error("Error loading transport keys:",Pi)}finally{te.value=!1}};bp(()=>{er()});function pr(Pi,bi){for(const Yi of Pi){if(Yi.id===bi)return Yi;if(Yi.children){const Ca=pr(Yi.children,bi);if(Ca)return Ca}}return null}function Mr(){const Pi=s.selectedNodeId.value;return Pi?pr(jt.value,Pi)?.name:void 0}function Tr(Pi){Ot.value==="deny"&&s.setSelectedNode(Pi)}function Vr(){Ot.value==="deny"&&(E.value=!0)}function mn(){if(Ot.value==="deny"&&s.selectedNodeId.value){const Pi=pr(jt.value,s.selectedNodeId.value);Pi&&(_t.value=Pi,K.value=!0)}}function Dt(){if(Ot.value==="deny"&&s.selectedNodeId.value){const Pi=pr(jt.value,s.selectedNodeId.value);Pi&&(pt.value=Pi,B.value=!0)}}const cn=async Pi=>{try{const bi=await Ah.createTransportKey(Pi.name,Pi.floodPolicy,void 0,Pi.parentId,void 0);bi.success?await er():(console.error("Failed to add transport key:",bi.error),he.value=bi.error||"Failed to add transport key")}catch(bi){console.error("Error adding transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{E.value=!1}};function Jn(){E.value=!1}async function Bn(Pi){try{const bi=Pi==="allow",Yi=await Ah.updateGlobalFloodPolicy(bi);Yi.success?Ot.value=Pi:(console.error("Failed to update global flood policy:",Yi.error),he.value=Yi.error||"Failed to update global flood policy")}catch(bi){console.error("Error updating global flood policy:",bi),he.value=bi instanceof Error?bi.message:"Failed to update global flood policy"}}function ni(){B.value=!1,pt.value=null}async function Wi(Pi){try{const bi=await Ah.updateTransportKey(Pi.id,Pi.name,Pi.floodPolicy);bi.success?await er():(console.error("Failed to update transport key:",bi.error),he.value=bi.error||"Failed to update transport key")}catch(bi){console.error("Error updating transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{ni()}}function Un(Pi){B.value=!1,pt.value=null,_t.value=Pi,K.value=!0}function qr(){K.value=!1,_t.value=null}async function Di(Pi){try{const bi=await Ah.deleteTransportKey(Pi);bi.success?(await er(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",bi.error),he.value=bi.error||"Failed to delete transport key")}catch(bi){console.error("Error deleting transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{qr()}}async function Fi(Pi){try{const bi=await Ah.deleteTransportKey(Pi.nodeId);bi.success?(await er(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",bi.error),he.value=bi.error||"Failed to delete transport key")}catch(bi){console.error("Error deleting transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{qr()}}return(Pi,bi)=>(_i(),zi("div",Zgt,[Ee("div",Ggt,[bi[3]||(bi[3]=Ee("div",null,[Ee("h3",{class:"text-lg font-semibold text-white mb-2"},"Regions/Keys"),Ee("p",{class:"text-white/70 text-sm"},"Manage regional key hierarchy")],-1)),Ee("div",Ygt,[Ee("button",{onClick:Vr,disabled:Ot.value==="allow",class:jo(["flex items-center gap-2 px-3 py-2 rounded-lg border transition-colors text-sm",Ot.value==="allow"?"bg-white/5 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/10 hover:bg-accent-green/20 text-accent-green border-accent-green/30"])},bi[2]||(bi[2]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),Qu(" Add ",-1)]),10,Kgt),Ee("button",{onClick:Dt,disabled:!zl(s).selectedNodeId.value||Ot.value==="allow",class:jo(["px-4 py-2 rounded-lg border transition-colors",!zl(s).selectedNodeId.value||Ot.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border-accent-green/50"])}," Edit ",10,Xgt),Ee("button",{onClick:mn,disabled:!zl(s).selectedNodeId.value||Ot.value==="allow",class:jo(["px-4 py-2 rounded-lg border transition-colors",!zl(s).selectedNodeId.value||Ot.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border-accent-red/50"])}," Delete ",10,Jgt)])]),Ee("div",Qgt,[Ee("div",tvt,[bi[4]||(bi[4]=Ee("div",null,[Ee("h4",{class:"text-sm font-medium text-white mb-1"},"Global Flood Policy (*)"),Ee("p",{class:"text-white/60 text-xs"},"Master control for repeater flooding")],-1)),Ee("div",evt,[Ee("div",rvt,[Ee("button",{onClick:bi[0]||(bi[0]=Yi=>Bn("deny")),class:jo(["px-3 py-1 text-xs font-medium rounded transition-colors",Ot.value==="deny"?"bg-accent-red/20 text-accent-red border border-accent-red/50":"text-white/60 hover:text-white/80"])}," DENY ",2),Ee("button",{onClick:bi[1]||(bi[1]=Yi=>Bn("allow")),class:jo(["px-3 py-1 text-xs font-medium rounded transition-colors",Ot.value==="allow"?"bg-accent-green/20 text-accent-green border border-accent-green/50":"text-white/60 hover:text-white/80"])}," ALLOW ",2)])])])]),Ee("div",nvt,[te.value?(_i(),zi("div",ivt,bi[5]||(bi[5]=[Ee("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-green"},null,-1),Ee("span",{class:"ml-2 text-white/70"},"Loading transport keys...",-1)]))):he.value?(_i(),zi("div",avt,[bi[6]||(bi[6]=Ee("div",{class:"text-accent-red mb-2"},"⚠️ Error loading transport keys",-1)),Ee("div",ovt,Qi(he.value),1),Ee("button",{onClick:er,class:"mt-4 px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded-lg transition-colors"}," Retry ")])):jt.value.length===0?(_i(),zi("div",svt,bi[7]||(bi[7]=[Ee("div",{class:"text-white/50 mb-2"},"📝 No transport keys found",-1),Ee("div",{class:"text-white/30 text-sm"},"Add your first transport key to get started",-1)]))):(_i(),zi("div",lvt,[(_i(!0),zi(Pu,null,Jh(jt.value,Yi=>(_i(),Z0(Emt,{key:Yi.id,node:Yi,"selected-node-id":zl(s).selectedNodeId.value,level:0,disabled:Ot.value==="allow",onSelect:Tr},null,8,["node","selected-node-id","disabled"]))),128))]))]),Wl(Ymt,{show:E.value,"selected-node-name":Mr(),"selected-node-id":zl(s).selectedNodeId.value||void 0,onClose:Jn,onAdd:cn},null,8,["show","selected-node-name","selected-node-id"]),Wl(wgt,{show:B.value,node:pt.value,onClose:ni,onSave:Wi,onRequestDelete:Un},null,8,["show","node"]),Wl($gt,{show:K.value,node:_t.value,"all-nodes":jt.value,onClose:qr,onDeleteAll:Di,onMoveChildren:Fi},null,8,["show","node","all-nodes"])]))}}),cvt={class:"p-6 space-y-6"},hvt={class:"glass-card rounded-[15px] z-10 p-4 border border-primary/30 bg-primary/10"},fvt={class:"text-primary"},dvt={class:"mt-2 text-primary/80"},pvt={class:"glass-card rounded-[15px] p-6"},mvt={class:"flex flex-wrap border-b border-white/10 mb-6"},gvt=["onClick"],vvt={class:"flex items-center gap-2"},yvt={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},xvt={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},_vt={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},bvt={key:3,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},wvt={key:4,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},kvt={class:"min-h-[400px]"},Tvt={key:0,class:"flex items-center justify-center py-12"},Avt={key:1,class:"flex items-center justify-center py-12"},Mvt={class:"text-center"},Svt={class:"text-white/60 text-sm mb-4"},Evt={key:2},Cvt=Dc({name:"ConfigurationView",__name:"Configuration",setup(d){const s=Om(),E=Ga("radio"),B=Ga(!1),K=[{id:"radio",label:"Radio Settings",icon:"radio"},{id:"repeater",label:"Repeater Settings",icon:"repeater"},{id:"duty",label:"Duty Cycle",icon:"duty"},{id:"delays",label:"TX Delays",icon:"delays"},{id:"transport",label:"Regions/Keys",icon:"keys"}];bp(async()=>{try{await s.fetchStats(),B.value=!0}catch(_t){console.error("Failed to load configuration data:",_t),B.value=!0}});function pt(_t){E.value=_t}return(_t,Ot)=>{const jt=QA("router-link");return _i(),zi("div",cvt,[Ot[11]||(Ot[11]=Ee("div",null,[Ee("h1",{class:"text-2xl font-bold text-white"},"Configuration"),Ee("p",{class:"text-white/70 mt-2"},"System configuration and settings")],-1)),Ot[12]||(Ot[12]=Ee("div",{class:"glass-card rounded-[15px] p-4 border border-blue-500/30 bg-blue-500/10"},[Ee("div",{class:"text-blue-200"},[Ee("strong",null,"Configuration is read-only."),Qu(" To modify settings, edit the config file and restart the daemon. ")])],-1)),Ee("div",hvt,[Ee("div",fvt,[Ot[3]||(Ot[3]=Ee("strong",null,"CAD Calibration Tool Available",-1)),Ee("p",dvt,[Ot[2]||(Ot[2]=Qu(" Optimize your Channel Activity Detection settings. ",-1)),Wl(jt,{to:"/cad-calibration",class:"underline hover:text-primary transition-colors"},{default:ew(()=>Ot[1]||(Ot[1]=[Qu(" Launch CAD Calibration Tool → ",-1)])),_:1,__:[1]})])])]),Ee("div",pvt,[Ee("div",mvt,[(_i(),zi(Pu,null,Jh(K,te=>Ee("button",{key:te.id,onClick:he=>pt(te.id),class:jo(["px-4 py-2 text-sm font-medium transition-colors duration-200 border-b-2 mr-6 mb-2",E.value===te.id?"text-primary border-primary":"text-white/70 border-transparent hover:text-white hover:border-white/30"])},[Ee("div",vvt,[te.icon==="radio"?(_i(),zi("svg",yvt,Ot[4]||(Ot[4]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.822c5.716-5.716 14.976-5.716 20.692 0"},null,-1)]))):te.icon==="repeater"?(_i(),zi("svg",xvt,Ot[5]||(Ot[5]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12l4-4m-4 4l4 4"},null,-1)]))):te.icon==="duty"?(_i(),zi("svg",_vt,Ot[6]||(Ot[6]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):te.icon==="delays"?(_i(),zi("svg",bvt,Ot[7]||(Ot[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"},null,-1)]))):te.icon==="keys"?(_i(),zi("svg",wvt,Ot[8]||(Ot[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))):is("",!0),Qu(" "+Qi(te.label),1)])],10,gvt)),64))]),Ee("div",kvt,[!B.value&&zl(s).isLoading?(_i(),zi("div",Tvt,Ot[9]||(Ot[9]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-primary rounded-full mx-auto mb-4"}),Ee("div",{class:"text-white/70"},"Loading configuration...")],-1)]))):zl(s).error&&!B.value?(_i(),zi("div",Avt,[Ee("div",Mvt,[Ot[10]||(Ot[10]=Ee("div",{class:"text-red-400 mb-2"},"Failed to load configuration",-1)),Ee("div",Svt,Qi(zl(s).error),1),Ee("button",{onClick:Ot[0]||(Ot[0]=te=>zl(s).fetchStats()),class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors"}," Retry ")])])):(_i(),zi("div",Evt,[Gp(Ee("div",null,[Wl(I0t,{key:"radio-settings"})],512),[[t2,E.value==="radio"]]),Gp(Ee("div",null,[Wl(Y0t,{key:"repeater-settings"})],512),[[t2,E.value==="repeater"]]),Gp(Ee("div",null,[Wl(rmt,{key:"duty-cycle"})],512),[[t2,E.value==="duty"]]),Gp(Ee("div",null,[Wl(umt,{key:"transmission-delays"})],512),[[t2,E.value==="delays"]]),Gp(Ee("div",null,[Wl(uvt,{key:"transport-keys"})],512),[[t2,E.value==="transport"]])]))])])])}}}),Lvt={class:"p-6 space-y-6"},Pvt={class:"glass-card rounded-[15px] p-6"},Ivt={class:"flex justify-center"},zvt={class:"flex gap-4"},Ovt=["disabled"],Dvt=["disabled"],Fvt={class:"glass-card rounded-[15px] p-6 space-y-4"},Rvt={class:"text-white"},Bvt={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},Nvt={class:"text-primary/90"},jvt={class:"space-y-2"},Uvt={class:"w-full bg-white/10 rounded-full h-2"},Vvt={class:"text-white/70 text-sm"},Hvt={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Wvt={class:"glass-card rounded-[15px] p-4 text-center"},qvt={class:"text-2xl font-bold text-primary"},$vt={class:"glass-card rounded-[15px] p-4 text-center"},Zvt={class:"text-2xl font-bold text-primary"},Gvt={class:"glass-card rounded-[15px] p-4 text-center"},Yvt={class:"text-2xl font-bold text-primary"},Kvt={class:"glass-card rounded-[15px] p-4 text-center"},Xvt={class:"text-2xl font-bold text-primary"},Jvt={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},Qvt={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},t1t={class:"text-white/80 mb-4"},e1t={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},r1t=Dc({name:"CADCalibrationView",__name:"CADCalibration",setup(d){const s=Om(),E=Ga(!1),B=Ga(null),K=Ga(null),pt=Ga({}),_t=Ga(null),Ot=Ga([]),jt=Ga({}),te=Ga("Ready to start calibration"),he=Ga(0),De=Ga(0),er=Ga(0),pr=Ga(0),Mr=Ga(0),Tr=Ga(0),Vr=Ga(null),mn=Ga(!1),Dt=Ga(!1),cn=Ga(!1),Jn=Ga(!1);let Bn=null;const ni={responsive:!0,displayModeBar:!0,modeBarButtonsToRemove:["pan2d","select2d","lasso2d","autoScale2d"],displaylogo:!1,toImageButtonOptions:{format:"png",filename:"cad-calibration-heatmap",height:600,width:800,scale:2}};function Wi(){const Ni=[{x:[],y:[],z:[],mode:"markers",type:"scatter",marker:{size:12,color:[],colorscale:[[0,"rgba(75, 85, 99, 0.4)"],[.1,"rgba(6, 182, 212, 0.3)"],[.5,"rgba(6, 182, 212, 0.6)"],[1,"rgba(16, 185, 129, 0.9)"]],showscale:!0,colorbar:{title:{text:"Detection Rate (%)",font:{color:"#ffffff",size:14}},tickfont:{color:"#ffffff"},bgcolor:"rgba(0,0,0,0)",bordercolor:"rgba(255,255,255,0.2)",borderwidth:1,thickness:15},line:{color:"rgba(255,255,255,0.2)",width:1}},hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
",name:"Test Results"}],si={title:{text:'CAD Detection Rate
Channel Activity Detection Calibration',font:{color:"#ffffff",size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},yaxis:{title:{text:"CAD Min Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:"#ffffff",family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};c1.newPlot("plotly-chart",Ni,si,ni)}function Un(){if(Object.keys(pt.value).length===0)return;const Ni=Object.values(pt.value),si=[],Ma=[],zo=[];for(const mo of Ni)si.push(mo.det_peak),Ma.push(mo.det_min),zo.push(mo.detection_rate);const ho={x:[si],y:[Ma],"marker.color":[zo],hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
Status: Tested
"};c1.restyle("plotly-chart",ho,[0])}async function qr(){try{const Ma=await Ah.post("/cad-calibration-start",{samples:10,delay_ms:50});if(Ma.success)E.value=!0,B.value=Date.now(),s.setCadCalibrationRunning(!0),pt.value={},Ot.value=[],jt.value={},_t.value=null,mn.value=!1,Dt.value=!1,cn.value=!1,Jn.value=!1,er.value=0,pr.value=0,Mr.value=0,Tr.value=0,he.value=0,De.value=0,Bn=setInterval(()=>{B.value&&(Tr.value=Math.floor((Date.now()-B.value)/1e3))},1e3),Fi();else throw new Error(Ma.error||"Failed to start calibration")}catch(Ma){te.value=`Error: ${Ma instanceof Error?Ma.message:"Unknown error"}`}}async function Di(){try{(await Ah.post("/cad-calibration-stop")).success&&(E.value=!1,s.setCadCalibrationRunning(!1),K.value&&(K.value.close(),K.value=null),Bn&&(clearInterval(Bn),Bn=null))}catch(Ni){console.error("Failed to stop calibration:",Ni)}}function Fi(){K.value&&K.value.close(),K.value=new EventSource(`${CQ}/api/cad-calibration-stream`),K.value.onmessage=function(Ni){try{const si=JSON.parse(Ni.data);Pi(si)}catch(si){console.error("Failed to parse SSE data:",si)}},K.value.onerror=function(Ni){console.error("SSE connection error:",Ni),E.value||K.value&&(K.value.close(),K.value=null)}}function Pi(Ni){switch(Ni.type){case"status":te.value=Ni.message||"Status update",Ni.test_ranges&&(Vr.value=Ni.test_ranges,mn.value=!0);break;case"progress":he.value=Ni.current||0,De.value=Ni.total||0,er.value=Ni.current||0;break;case"result":if(Ni.det_peak!==void 0&&Ni.det_min!==void 0&&Ni.detection_rate!==void 0&&Ni.detections!==void 0&&Ni.samples!==void 0){const si=`${Ni.det_peak}_${Ni.det_min}`;pt.value[si]={det_peak:Ni.det_peak,det_min:Ni.det_min,detection_rate:Ni.detection_rate,detections:Ni.detections,samples:Ni.samples},Un(),bi()}break;case"complete":case"completed":E.value=!1,te.value=Ni.message||"Calibration completed",s.setCadCalibrationRunning(!1),Yi(),K.value&&(K.value.close(),K.value=null),Bn&&(clearInterval(Bn),Bn=null);break;case"error":te.value=`Error: ${Ni.message}`,s.setCadCalibrationRunning(!1),Di();break}}function bi(){const Ni=Object.values(pt.value).map(si=>si.detection_rate);Ni.length!==0&&(pr.value=Math.max(...Ni),Mr.value=Ni.reduce((si,Ma)=>si+Ma,0)/Ni.length)}function Yi(){Dt.value=!0;let Ni=null,si=0;for(const Ma of Object.values(pt.value))Ma.detection_rate>si&&(si=Ma.detection_rate,Ni=Ma);_t.value=Ni,Ni&&si>0?(cn.value=!0,Jn.value=!1):(cn.value=!1,Jn.value=!0)}async function Ca(){if(!_t.value){te.value="Error: No calibration results to save";return}try{const Ni=await Ah.post("/save_cad_settings",{peak:_t.value.det_peak,min_val:_t.value.det_min,detection_rate:_t.value.detection_rate});if(Ni.success)te.value=`Settings saved! Peak=${_t.value.det_peak}, Min=${_t.value.det_min} applied to configuration.`;else throw new Error(Ni.error||"Failed to save settings")}catch(Ni){te.value=`Error: Failed to save settings: ${Ni instanceof Error?Ni.message:"Unknown error"}`}}return bp(()=>{Wi()}),Iy(()=>{K.value&&K.value.close(),Bn&&clearInterval(Bn),s.setCadCalibrationRunning(!1),document.getElementById("plotly-chart")&&c1.purge("plotly-chart")}),(Ni,si)=>(_i(),zi("div",Lvt,[si[14]||(si[14]=Ee("div",null,[Ee("h1",{class:"text-2xl font-bold text-white"},"CAD Calibration Tool"),Ee("p",{class:"text-white/70 mt-2"},"Channel Activity Detection calibration")],-1)),Ee("div",Pvt,[Ee("div",Ivt,[Ee("div",zvt,[Ee("button",{onClick:qr,disabled:E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-green/10 hover:bg-accent-green/20 disabled:bg-gray-500/10 text-accent-green disabled:text-gray-400 rounded-lg border border-accent-green/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},si[0]||(si[0]=[$f('
Start Calibration
Begin testing
',2)]),8,Ovt),Ee("button",{onClick:Di,disabled:!E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-red/10 hover:bg-accent-red/20 disabled:bg-gray-500/10 text-accent-red disabled:text-gray-400 rounded-lg border border-accent-red/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},si[1]||(si[1]=[$f('
Stop
Halt calibration
',2)]),8,Dvt)])])]),Ee("div",Fvt,[Ee("div",Rvt,Qi(te.value),1),mn.value&&Vr.value?(_i(),zi("div",Bvt,[Ee("div",Nvt,[si[2]||(si[2]=Ee("strong",null,"Configuration:",-1)),Qu(" SF"+Qi(Vr.value.spreading_factor)+" | Peak: "+Qi(Vr.value.peak_min)+" - "+Qi(Vr.value.peak_max)+" | Min: "+Qi(Vr.value.min_min)+" - "+Qi(Vr.value.min_max)+" | "+Qi((Vr.value.peak_max-Vr.value.peak_min+1)*(Vr.value.min_max-Vr.value.min_min+1))+" tests ",1)])])):is("",!0),Ee("div",jvt,[Ee("div",Uvt,[Ee("div",{class:"bg-gradient-to-r from-primary to-accent-green h-2 rounded-full transition-all duration-300",style:hm({width:De.value>0?`${he.value/De.value*100}%`:"0%"})},null,4)]),Ee("div",Vvt,Qi(he.value)+" / "+Qi(De.value)+" tests completed",1)])]),Ee("div",Hvt,[Ee("div",Wvt,[Ee("div",qvt,Qi(er.value),1),si[3]||(si[3]=Ee("div",{class:"text-white/70 text-sm"},"Tests Completed",-1))]),Ee("div",$vt,[Ee("div",Zvt,Qi(pr.value.toFixed(1))+"%",1),si[4]||(si[4]=Ee("div",{class:"text-white/70 text-sm"},"Best Detection Rate",-1))]),Ee("div",Gvt,[Ee("div",Yvt,Qi(Mr.value.toFixed(1))+"%",1),si[5]||(si[5]=Ee("div",{class:"text-white/70 text-sm"},"Average Rate",-1))]),Ee("div",Kvt,[Ee("div",Xvt,Qi(Tr.value)+"s",1),si[6]||(si[6]=Ee("div",{class:"text-white/70 text-sm"},"Elapsed Time",-1))])]),si[15]||(si[15]=Ee("div",{class:"glass-card rounded-[15px] p-6"},[Ee("div",{id:"plotly-chart",class:"w-full h-96"})],-1)),Dt.value?(_i(),zi("div",Jvt,[si[13]||(si[13]=Ee("h3",{class:"text-xl font-bold text-white"},"Calibration Results",-1)),cn.value&&_t.value?(_i(),zi("div",Qvt,[si[11]||(si[11]=Ee("h4",{class:"font-medium text-accent-green mb-2"},"Optimal Settings Found:",-1)),Ee("p",t1t,[si[7]||(si[7]=Qu(" Peak: ",-1)),Ee("strong",null,Qi(_t.value.det_peak),1),si[8]||(si[8]=Qu(", Min: ",-1)),Ee("strong",null,Qi(_t.value.det_min),1),si[9]||(si[9]=Qu(", Rate: ",-1)),Ee("strong",null,Qi(_t.value.detection_rate.toFixed(1))+"%",1)]),Ee("div",{class:"flex justify-center"},[Ee("button",{onClick:Ca,class:"flex items-center gap-3 px-6 py-3 bg-primary/20 hover:bg-primary/30 text-primary rounded-lg border border-primary/50 transition-colors"},si[10]||(si[10]=[$f('
Save Settings
Apply to configuration
',2)]))])])):is("",!0),Jn.value?(_i(),zi("div",e1t,si[12]||(si[12]=[Ee("h4",{class:"font-medium text-secondary mb-2"},"No Optimal Settings Found",-1),Ee("p",{class:"text-white/70"},"All tested combinations showed low detection rates. Consider running calibration again or adjusting test parameters.",-1)]))):is("",!0)])):is("",!0)]))}}),n1t=ld(r1t,[["__scopeId","data-v-854f5f55"]]),i1t={class:"space-y-6"},a1t={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},o1t={class:"flex items-center justify-between mb-4"},s1t=["disabled"],l1t={class:"bg-white/5 border border-white/10 rounded-lg p-4"},u1t={class:"flex flex-wrap gap-2"},c1t=["onClick"],h1t={key:0,class:"w-px h-6 bg-white/20 mx-2 self-center"},f1t=["onClick"],d1t={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},p1t={key:0,class:"p-8 text-center"},m1t={key:1,class:"p-8 text-center"},g1t={class:"text-dark-text mb-4"},v1t={key:2,class:"max-h-[600px] overflow-y-auto"},y1t={key:0,class:"p-8 text-center"},x1t={key:1,class:"divide-y divide-white/5"},_1t={class:"flex-shrink-0 text-dark-text"},b1t={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-400"},w1t={class:"text-white flex-1 break-all"},k1t=Dc({name:"LogsView",__name:"Logs",setup(d){const s=Ga([]),E=Ga(new Set),B=Ga(new Set(["DEBUG","INFO","WARNING","ERROR"])),K=Ga(new Set),pt=Ga(new Set),_t=Ga(!0),Ot=Ga(null);let jt=null;const te=Fi=>{const Pi=Fi.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return Pi?Pi[1].trim():"Unknown"},he=Fi=>{const Pi=Fi.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return Pi?Pi[1]:Fi},De=(Fi,Pi)=>{if(Fi.size!==Pi.size)return!1;for(const bi of Fi)if(!Pi.has(bi))return!1;return!0},er=async()=>{try{const Fi=await Ah.getLogs();if(Fi.logs&&Fi.logs.length>0){s.value=Fi.logs;const Pi=new Set;s.value.forEach(Ni=>{const si=te(Ni.message);Pi.add(si)});const bi=new Set;s.value.forEach(Ni=>{bi.add(Ni.level)}),E.value.size===0&&(E.value=new Set(Pi));const Yi=!De(K.value,Pi),Ca=!De(pt.value,bi);Yi&&(K.value=Pi),Ca&&(pt.value=bi),Ot.value=null}}catch(Fi){console.error("Error loading logs:",Fi),Ot.value=Fi instanceof Error?Fi.message:"Failed to load logs"}finally{_t.value=!1}},pr=$o(()=>s.value.filter(Pi=>{const bi=te(Pi.message),Yi=E.value.has(bi),Ca=B.value.has(Pi.level);return Yi&&Ca})),Mr=$o(()=>Array.from(K.value).sort()),Tr=$o(()=>{const Fi=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(pt.value).sort((bi,Yi)=>{const Ca=Fi.indexOf(bi),Ni=Fi.indexOf(Yi);return Ca!==-1&&Ni!==-1?Ca-Ni:bi.localeCompare(Yi)})}),Vr=Fi=>{B.value.has(Fi)?B.value.delete(Fi):B.value.add(Fi),B.value=new Set(B.value)},mn=Fi=>new Date(Fi).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Dt=Fi=>({ERROR:"text-red-400 bg-red-900/20",WARNING:"text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-400 bg-yellow-900/20",INFO:"text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[Fi]||"text-gray-400 bg-gray-900/20",cn=(Fi,Pi)=>Pi?{ERROR:"bg-red-500/20 text-red-400 border-red-500/50",WARNING:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[Fi]||"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10",Jn=Fi=>{E.value.has(Fi)?E.value.delete(Fi):E.value.add(Fi),E.value=new Set(E.value)},Bn=()=>{E.value=new Set(K.value)},ni=()=>{E.value=new Set},Wi=()=>{B.value=new Set(pt.value)},Un=()=>{B.value=new Set},qr=()=>{jt&&clearInterval(jt),jt=setInterval(er,5e3)},Di=()=>{jt&&(clearInterval(jt),jt=null)};return bp(()=>{er(),qr()}),gg(()=>{Di()}),(Fi,Pi)=>(_i(),zi("div",i1t,[Ee("div",a1t,[Ee("div",o1t,[Pi[1]||(Pi[1]=Ee("div",null,[Ee("h1",{class:"text-white text-2xl font-semibold mb-2"},"System Logs"),Ee("p",{class:"text-dark-text"},"Real-time system events and diagnostics")],-1)),Ee("button",{onClick:er,disabled:_t.value,class:"flex items-center gap-2 px-4 py-2 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors disabled:opacity-50"},[(_i(),zi("svg",{class:jo(["w-4 h-4",{"animate-spin":_t.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Pi[0]||(Pi[0]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),Qu(" "+Qi(_t.value?"Loading...":"Refresh"),1)],8,s1t)]),Ee("div",l1t,[Ee("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[Pi[2]||(Pi[2]=Ee("span",{class:"text-white font-medium"},"Filters:",-1)),Ee("button",{onClick:Bn,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Loggers "),Ee("button",{onClick:ni,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Loggers "),Pi[3]||(Pi[3]=Ee("div",{class:"w-px h-4 bg-white/20 mx-1"},null,-1)),Ee("button",{onClick:Wi,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Levels "),Ee("button",{onClick:Un,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Levels ")]),Ee("div",u1t,[(_i(!0),zi(Pu,null,Jh(Mr.value,bi=>(_i(),zi("button",{key:"logger-"+bi,onClick:Yi=>Jn(bi),class:jo(["px-3 py-1 text-xs border rounded-full transition-colors",E.value.has(bi)?"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10"])},Qi(bi),11,c1t))),128)),Mr.value.length>0&&Tr.value.length>0?(_i(),zi("div",h1t)):is("",!0),(_i(!0),zi(Pu,null,Jh(Tr.value,bi=>(_i(),zi("button",{key:"level-"+bi,onClick:Yi=>Vr(bi),class:jo(["px-3 py-1 text-xs border rounded-full transition-colors font-medium",B.value.has(bi)?cn(bi,!0):cn(bi,!1)])},Qi(bi),11,f1t))),128))])])]),Ee("div",d1t,[_t.value&&s.value.length===0?(_i(),zi("div",p1t,Pi[4]||(Pi[4]=[Ee("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"},null,-1),Ee("p",{class:"text-dark-text"},"Loading system logs...",-1)]))):Ot.value?(_i(),zi("div",m1t,[Pi[5]||(Pi[5]=Ee("div",{class:"text-red-400 mb-4"},[Ee("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),Pi[6]||(Pi[6]=Ee("h3",{class:"text-white text-lg font-medium mb-2"},"Error Loading Logs",-1)),Ee("p",g1t,Qi(Ot.value),1),Ee("button",{onClick:er,class:"px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/50 rounded-lg transition-colors"}," Try Again ")])):(_i(),zi("div",v1t,[pr.value.length===0?(_i(),zi("div",y1t,Pi[7]||(Pi[7]=[$f('

No Logs to Display

No logs match the current filter criteria.

',3)]))):(_i(),zi("div",x1t,[(_i(!0),zi(Pu,null,Jh(pr.value,(bi,Yi)=>(_i(),zi("div",{key:Yi,class:"flex items-start gap-4 p-4 hover:bg-white/5 transition-colors font-mono text-sm"},[Ee("span",_1t," ["+Qi(mn(bi.timestamp))+"] ",1),Ee("span",b1t,Qi(te(bi.message)),1),Ee("span",{class:jo(["flex-shrink-0 px-2 py-1 text-xs font-medium rounded",Dt(bi.level)])},Qi(bi.level),3),Ee("span",w1t,Qi(he(bi.message)),1)]))),128))]))]))])]))}}),T1t=Dc({name:"HelpView",__name:"Help",setup(d){return(s,E)=>(_i(),zi("div",null,E[0]||(E[0]=[$f('

Help

Help & Documentation

Find answers to common questions and access user guides.

',1)])))}}),A1t=KX({history:EX("/"),routes:[{path:"/",name:"dashboard",component:dot},{path:"/neighbors",name:"neighbors",component:mst},{path:"/statistics",name:"statistics",component:v0t},{path:"/configuration",name:"configuration",component:Cvt},{path:"/cad-calibration",name:"cad-calibration",component:n1t},{path:"/logs",name:"logs",component:k1t},{path:"/help",name:"help",component:T1t}]}),DM=FK(jrt);DM.use(NK());DM.use(A1t);DM.mount("#app"); +*/return window.Plotly=E,E})}(o4)),o4.exports}var CF=Jpt();const nv=tD(CF),nA=MG({__proto__:null,default:nv},[CF]),Qpt={class:"p-6 space-y-6"},t0t={class:"flex justify-between items-center"},e0t={class:"flex items-center gap-3"},r0t=["value"],n0t={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},i0t={class:"glass-card rounded-[15px] p-6"},a0t={class:"mb-6"},o0t={class:"relative h-48 bg-white/5 rounded-lg p-4"},s0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},l0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},u0t={class:"mb-6"},c0t={class:"relative h-48 bg-white/5 rounded-lg p-4"},h0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},f0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},d0t={class:"glass-card rounded-[15px] p-6"},p0t={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},m0t={class:"lg:col-span-2"},g0t={class:"relative h-64 bg-white/5 rounded-lg p-4"},v0t={class:"flex flex-col items-center justify-center"},y0t={class:"relative w-48 h-48"},x0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm rounded-full z-20"},_0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 rounded-full z-20"},b0t={key:0,class:"glass-card rounded-[15px] p-8 text-center"},w0t={key:1,class:"glass-card rounded-[15px] p-8 text-center"},k0t={class:"text-white/60 text-sm"},T0t=Ec({name:"StatisticsView",__name:"Statistics",setup(d){p1.register(oF,sF,GD,uw,OD,ID,zD,nF,aF,eF,qD,KD,QD,M4);const s=sw(),E=Ha(null),R=Ha(!1),Y=Ha(24),dt=[{value:1,label:"1 Hour"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"24 Hours"},{value:48,label:"2 Days"},{value:168,label:"1 Week"}],_t=Ha(null),zt=Ha(null),jt=Ha([]),te=Ha(null),ce=Ha([]),Ie=Ha(!0),Je=Ha(null),fr=Ha({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0}),Ar=Ha(!1),kr=Ha(!1),Vr=Ha(!1),fn=Ha(null),Dt=Ha(null),cn=Ha(null),ti=Ha(null),Dn=Ha(null),ii=Ha(null),Vi=Ha(null),Nn=Wo(()=>{const ko=s.packetStats;return ko?{totalRx:ko.total_packets||0,totalTx:ko.transmitted_packets||0}:{totalRx:0,totalTx:0}}),Wr=Wo(()=>{let ko=[],ro=[];if(_t.value?.series){const Ia=_t.value.series.find(io=>io.type==="rx_count"),ma=_t.value.series.find(io=>io.type==="tx_count");Ia?.data&&(ko=Ia.data.map(([,io])=>io)),ma?.data&&(ro=ma.data.map(([,io])=>io))}return{totalPackets:ko,transmittedPackets:ro,droppedPackets:[]}}),Bi=async()=>{try{Ie.value=!0,Je.value=null,await Promise.all([s.fetchPacketStats({hours:Y.value}),s.fetchSystemStats()]),Ie.value=!1,Ri()}catch(ko){Je.value=ko instanceof Error?ko.message:"Failed to fetch data",Ie.value=!1}},Ri=async()=>{fr.value={packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0};const ko=[Li(),$n(),Hn(),sa()];try{await Promise.allSettled(ko),await S0(),!ti.value||!Dn.value?setTimeout(()=>{la()},100):la()}catch(ro){console.error("Error loading chart data:",ro)}},Li=async()=>{fr.value.packetRate=!0;try{const ko=await ah.get("/metrics_graph_data",{hours:Y.value,resolution:"average",metrics:"rx_count,tx_count"});ko?.success&&(_t.value=ko.data)}catch{_t.value=null}},$n=async()=>{fr.value.packetType=!0;try{const ko=await ah.get("/packet_type_graph_data",{hours:Y.value,resolution:"average",types:"all"});if(ko?.success&&ko.data){const ro=ko.data;jt.value=ro.series||[]}}catch{jt.value=[]}},Hn=async()=>{fr.value.routePie=!0;try{const ko=await ah.get("/route_stats",{hours:Y.value});ko?.success&&ko.data&&(te.value=ko.data)}catch{te.value=null}},sa=async()=>{try{const ko=await ah.get("/noise_floor_history",{hours:Y.value});if(ko.success&&ko.data){const Ia=ko.data.history||[];Array.isArray(Ia)&&Ia.length>0&&(zt.value={chart_data:Ia.map(ma=>({timestamp:ma.timestamp||Date.now()/1e3,noise_floor_dbm:ma.noise_floor_dbm||ma.noise_floor||-120}))},Qn())}}catch{zt.value={chart_data:[]}}},Ti=()=>{Eo(),Ar.value=!1,kr.value=!1,Vr.value=!1,Bi()},Qn=()=>{if(ce.value=[],zt.value?.chart_data&&zt.value.chart_data.length>0){const ko=zt.value.chart_data,ro=Math.max(1,Math.floor(ko.length/100));ce.value=ko.filter((Ia,ma)=>ma%ro===0).map(Ia=>({timestamp:Ia.timestamp*1e3,snr:null,rssi:null,noiseFloor:Ia.noise_floor_dbm}))}},la=()=>{if(!R.value){R.value=!0;try{no(),mo(),Ts(),xl(),setTimeout(()=>{fr.value.packetRate&&fn.value&&(fr.value.packetRate=!1),fr.value.packetType&&Dt.value&&(fr.value.packetType=!1),fr.value.routePie&&Vi.value&&(fr.value.routePie=!1),fr.value.routePie&&Vi.value&&(fr.value.routePie=!1),setTimeout(()=>{const ko=Eu(fn.value),ro=Eu(Dt.value),Ia=Eu(cn.value);ko&&ko.update("none"),ro&&ro.update("none"),Ia&&Ia.update("none")},50)},100)}catch(ko){console.error("Error creating/updating charts:",ko),Eo()}finally{R.value=!1}}},Eo=()=>{try{fn.value&&(fn.value.destroy(),fn.value=null),Dt.value&&(Dt.value.destroy(),Dt.value=null),cn.value&&(cn.value.destroy(),cn.value=null),Vi.value&&nv.purge(Vi.value)}catch(ko){console.error("Error destroying charts:",ko)}},no=()=>{if(!ti.value){fr.value.packetRate=!1;return}const ko=ti.value.getContext("2d");if(!ko){fr.value.packetRate=!1;return}let ro=[],Ia=[];if(_t.value?.series){const ma=_t.value.series.find(po=>po.type==="rx_count"),io=_t.value.series.find(po=>po.type==="tx_count");ma?.data&&(ro=ma.data.map(([po,us])=>{let qo=po;return po>1e15?qo=po/1e3:po>1e12?qo=po:po>1e9?qo=po*1e3:qo=Date.now(),{x:qo,y:us}})),io?.data&&(Ia=io.data.map(([po,us])=>{let qo=po;return po>1e15?qo=po/1e3:po>1e12?qo=po:po>1e9?qo=po*1e3:qo=Date.now(),{x:qo,y:us}}))}if(ro.length===0&&Ia.length===0){Ar.value=!0,fr.value.packetRate=!1;return}Ar.value=!1,fn.value&&(fn.value.destroy(),fn.value=null);try{const ma=JSON.parse(JSON.stringify(ro)),io=JSON.parse(JSON.stringify(Ia)),po=new p1(ko,{type:"line",data:{datasets:[{label:"RX/hr",data:ma,borderColor:"#C084FC",backgroundColor:"rgba(192, 132, 252, 0.1)",borderWidth:2,fill:!0,tension:.4},{label:"TX/hr",data:io,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,fill:!0,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1},title:{display:!1}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{beginAtZero:!1,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",callback:function(us){return typeof us=="number"?us.toFixed(3):us},stepSize:.002},min:0,max:.012}}}});fn.value=Eu(po),fr.value.packetRate=!1,setTimeout(()=>{fr.value.packetRate&&(fr.value.packetRate=!1)},50)}catch(ma){console.error("Error creating packet rate chart:",ma),Ar.value=!0,fr.value.packetRate=!1}},mo=()=>{if(!Dn.value){fr.value.packetType=!1;return}const ko=Dn.value.getContext("2d");if(!ko){fr.value.packetType=!1;return}const ro=[],Ia=[],ma=["#60A5FA","#34D399","#FBBF24","#A78BFA","#F87171","#06B6D4","#84CC16","#F472B6","#10B981"];if(jt.value.length>0)jt.value.forEach(io=>{const po=io.data?io.data.reduce((us,qo)=>us+qo[1],0):0;po>0&&(ro.push(io.name.replace(/\([^)]*\)/g,"").trim()),Ia.push(po))});else{kr.value=!0,fr.value.packetType=!1;return}kr.value=!1,Dt.value&&(Dt.value.destroy(),Dt.value=null);try{const io=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=new p1(ko,{type:"bar",data:{labels:io,datasets:[{data:po,backgroundColor:ma.slice(0,po.length),borderRadius:8,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{color:"rgba(255, 255, 255, 0.7)",font:{size:10}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)"}}}}});Dt.value=Eu(us),fr.value.packetType=!1,setTimeout(()=>{fr.value.packetType&&(fr.value.packetType=!1)},50)}catch(io){console.error("Error creating packet type chart:",io),kr.value=!0,fr.value.packetType=!1}},Ts=()=>{if(!ii.value)return;const ko=ii.value.getContext("2d");if(!ko)return;const ro=ce.value.map(io=>({x:io.timestamp,y:io.noiseFloor})).filter(io=>io.y!==null&&io.y!==void 0);if(cn.value)try{const io=Eu(cn.value),po=JSON.parse(JSON.stringify(ro));io.data.datasets[0]&&(io.data.datasets[0].data=po),io.update("active");return}catch{cn.value.destroy(),cn.value=null}const Ia=JSON.parse(JSON.stringify(ro)),ma=new p1(ko,{type:"line",data:{datasets:[{label:"Noise Floor (dBm)",data:Ia,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,tension:.3,pointRadius:0,pointHoverRadius:3,fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{color:"rgba(255, 255, 255, 0.8)",usePointStyle:!0,padding:20}}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{type:"linear",display:!0,title:{display:!0,text:"Noise Floor (dBm)",color:"rgba(255, 255, 255, 0.8)"},grid:{color:"rgba(245, 158, 11, 0.2)"},ticks:{color:"#F59E0B",stepSize:.5,callback:function(io){return typeof io=="number"?io.toFixed(1):io}},min:-117,max:-113}}}});cn.value=Eu(ma)},xl=()=>{if(!Vi.value){fr.value.routePie=!1;return}if(!te.value||!te.value.route_totals){Vr.value=!0,fr.value.routePie=!1;return}Vr.value=!1;const ko=te.value.route_totals,ro=Object.keys(ko),Ia=Object.values(ko),ma=["#3B82F6","#F87171","#10B981","#F59E0B","#A78BFA"];try{const io=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=[{type:"pie",labels:io,values:po,marker:{colors:ma.slice(0,po.length)},hovertemplate:"%{label}
Count: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",pull:.1,hole:.3}],qo={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},_i={responsive:!0,displayModeBar:!1,staticPlot:!1};nv.newPlot(Vi.value,us,qo,_i),fr.value.routePie=!1,setTimeout(()=>{fr.value.routePie&&(fr.value.routePie=!1)},50)}catch(io){console.error("Error creating 3D route pie chart:",io),Vr.value=!0,fr.value.routePie=!1}};return op(async()=>{await S0(),Bi(),E.value=window.setInterval(Bi,3e4),window.addEventListener("resize",()=>{setTimeout(()=>{Eu(fn.value)?.resize(),Eu(Dt.value)?.resize(),Eu(cn.value)?.resize(),Vi.value&&nv.Plots&&nv.Plots.resize(Vi.value)},100)})}),zm(()=>{E.value&&clearInterval(E.value),fn.value?.destroy(),Dt.value?.destroy(),cn.value?.destroy(),Vi.value&&nv.purge(Vi.value),window.removeEventListener("resize",()=>{})}),(ko,ro)=>(ci(),wi("div",Qpt,[ye("div",t0t,[ro[2]||(ro[2]=ye("h2",{class:"text-2xl font-bold text-white"},"Statistics",-1)),ye("div",e0t,[ro[1]||(ro[1]=ye("label",{class:"text-white/70 text-sm"},"Time Range:",-1)),Gp(ye("select",{"onUpdate:modelValue":ro[0]||(ro[0]=Ia=>Y.value=Ia),onChange:Ti,class:"bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-accent-purple/50 transition-colors"},[(ci(),wi(_u,null,Mh(dt,Ia=>ye("option",{key:Ia.value,value:Ia.value,class:"bg-gray-800 text-white"},Fi(Ia.label),9,r0t)),64))],544),[[vA,Y.value]])])]),ye("div",n0t,[El(pg,{title:"Total RX",value:Nn.value.totalRx,color:"#AAE8E8",data:Wr.value.totalPackets},null,8,["value","data"]),El(pg,{title:"Total TX",value:Nn.value.totalTx,color:"#FFC246",data:Wr.value.transmittedPackets},null,8,["value","data"])]),ye("div",i0t,[ro[9]||(ro[9]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Performance Metrics",-1)),ye("div",a0t,[ro[5]||(ro[5]=Ff('

Packet Rate (RX/TX PER HOUR)

RX/hr
TX/hr
',2)),ye("div",o0t,[ye("canvas",{ref_key:"packetRateCanvasRef",ref:ti,class:"w-full h-full relative z-10"},null,512),fr.value.packetRate?(ci(),wi("div",s0t,ro[3]||(ro[3]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-purple-400 rounded-full mx-auto mb-2"}),ye("div",{class:"text-white/50 text-xs"},"Loading packet rate data...")],-1)]))):Uo("",!0),Ar.value&&!fr.value.packetRate?(ci(),wi("div",l0t,ro[4]||(ro[4]=[ye("div",{class:"text-center"},[ye("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),ye("div",{class:"text-white/50 text-xs"},"Packet rate data not found")],-1)]))):Uo("",!0)])]),ye("div",u0t,[ro[8]||(ro[8]=ye("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Packet Type Distribution",-1)),ye("div",c0t,[ye("canvas",{ref_key:"packetTypeCanvasRef",ref:Dn,class:"w-full h-full relative z-10"},null,512),fr.value.packetType?(ci(),wi("div",h0t,ro[6]||(ro[6]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-blue-400 rounded-full mx-auto mb-2"}),ye("div",{class:"text-white/50 text-xs"},"Loading packet type data...")],-1)]))):Uo("",!0),kr.value&&!fr.value.packetType?(ci(),wi("div",f0t,ro[7]||(ro[7]=[ye("div",{class:"text-center"},[ye("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),ye("div",{class:"text-white/50 text-xs"},"Packet type data not found")],-1)]))):Uo("",!0)])])]),ye("div",d0t,[ro[13]||(ro[13]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Noise Floor Over Time",-1)),ye("div",p0t,[ye("div",m0t,[ye("div",g0t,[ye("canvas",{ref_key:"signalMetricsCanvasRef",ref:ii,class:"w-full h-full"},null,512)])]),ye("div",v0t,[ro[12]||(ro[12]=ye("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Route Distribution",-1)),ye("div",y0t,[ye("div",{ref_key:"signalPie3DRef",ref:Vi,class:"w-full h-full relative z-10"},null,512),fr.value.routePie?(ci(),wi("div",x0t,ro[10]||(ro[10]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),ye("div",{class:"text-white/50 text-xs"},"Loading route data...")],-1)]))):Uo("",!0),Vr.value&&!fr.value.routePie?(ci(),wi("div",_0t,ro[11]||(ro[11]=[ye("div",{class:"text-center"},[ye("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),ye("div",{class:"text-white/50 text-xs"},"Route statistics not found")],-1)]))):Uo("",!0)])])])]),Ie.value?(ci(),wi("div",b0t,ro[14]||(ro[14]=[ye("div",{class:"text-white/70 mb-2"},"Loading statistics...",-1),ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):Uo("",!0),Je.value?(ci(),wi("div",w0t,[ro[15]||(ro[15]=ye("div",{class:"text-red-400 mb-2"},"Failed to load statistics",-1)),ye("p",k0t,Fi(Je.value),1),ye("button",{onClick:Bi,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):Uo("",!0)]))}}),A0t=Bf(T0t,[["__scopeId","data-v-9766a4d1"]]),M0t="modulepreload",S0t=function(d){return"/"+d},PI={},iA=function(s,E,R){let Y=Promise.resolve();if(E&&E.length>0){let te=function(ce){return Promise.all(ce.map(Ie=>Promise.resolve(Ie).then(Je=>({status:"fulfilled",value:Je}),Je=>({status:"rejected",reason:Je}))))};var _t=te;document.getElementsByTagName("link");const zt=document.querySelector("meta[property=csp-nonce]"),jt=zt?.nonce||zt?.getAttribute("nonce");Y=te(E.map(ce=>{if(ce=S0t(ce),ce in PI)return;PI[ce]=!0;const Ie=ce.endsWith(".css"),Je=Ie?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${ce}"]${Je}`))return;const fr=document.createElement("link");if(fr.rel=Ie?"stylesheet":M0t,Ie||(fr.as="script"),fr.crossOrigin="",fr.href=ce,jt&&fr.setAttribute("nonce",jt),document.head.appendChild(fr),Ie)return new Promise((Ar,kr)=>{fr.addEventListener("load",Ar),fr.addEventListener("error",()=>kr(new Error(`Unable to preload CSS for ${ce}`)))})}))}function dt(zt){const jt=new Event("vite:preloadError",{cancelable:!0});if(jt.payload=zt,window.dispatchEvent(jt),!jt.defaultPrevented)throw zt}return Y.then(zt=>{for(const jt of zt||[])jt.status==="rejected"&&dt(jt.reason);return s().catch(dt)})},E0t={class:"p-6 space-y-6"},C0t={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},L0t={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},P0t={class:"glass-card rounded-[15px] p-6"},I0t={class:"relative h-32 bg-white/5 rounded-lg p-4 mb-4 chart-container"},z0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},O0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},D0t={key:0,class:"grid grid-cols-2 gap-4 text-sm"},F0t={class:"text-white font-semibold"},B0t={class:"text-white font-semibold"},R0t={class:"text-white font-semibold"},N0t={class:"text-white font-semibold"},j0t={class:"glass-card rounded-[15px] p-6"},U0t={class:"relative h-32 bg-white/5 rounded-lg p-4 mb-4 chart-container"},V0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},H0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},W0t={key:0,class:"grid grid-cols-2 gap-4 text-sm"},q0t={class:"text-white font-semibold"},$0t={class:"text-white font-semibold"},Z0t={class:"text-white font-semibold"},G0t={class:"text-white font-semibold"},Y0t={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},K0t={class:"glass-card rounded-[15px] p-6"},X0t={class:"relative h-48"},J0t={key:0,class:"grid grid-cols-3 gap-4 text-sm mt-4"},Q0t={class:"text-center"},tmt={class:"text-white font-semibold"},emt={class:"text-center"},rmt={class:"font-semibold text-red-400"},nmt={class:"text-center"},imt={class:"font-semibold text-green-400"},amt={class:"glass-card rounded-[15px] p-6"},omt={key:0,class:"space-y-4"},smt={class:"grid grid-cols-2 gap-4 text-sm"},lmt={class:"text-white font-semibold"},umt={class:"text-white font-semibold"},cmt={class:"text-white font-semibold"},hmt={class:"text-white font-semibold"},fmt={key:0,class:"pt-4 border-t border-white/10"},dmt={class:"grid grid-cols-2 gap-2 text-sm"},pmt={class:"text-white/60"},mmt={class:"text-white font-semibold ml-1"},gmt={class:"glass-card rounded-[15px] p-6"},vmt={key:0,class:"overflow-x-auto"},ymt={class:"w-full text-sm"},xmt={class:"text-white/80 py-2 transition-all duration-300"},_mt={class:"text-white font-semibold py-2 transition-all duration-300"},bmt={class:"text-center text-orange-400 py-2 transition-all duration-300"},wmt={class:"text-center text-green-400 py-2 transition-all duration-300"},kmt={class:"text-right text-white/80 py-2 transition-all duration-300"},Tmt={key:0,class:"mt-4 text-center text-white/60 text-sm transition-all duration-300"},Amt={key:1,class:"text-center text-white/60 py-8"},Mmt={key:0,class:"glass-card rounded-[15px] p-8 text-center"},Smt={key:1,class:"glass-card rounded-[15px] p-8 text-center"},Emt={class:"text-white/60 text-sm"},Cmt=Ec({name:"SystemStatsView",__name:"SystemStats",setup(d){p1.register(oF,sF,GD,uw,OD,ID,zD,nF,aF,eF,qD,KD,QD,M4);const s=Ha(null),E=Ha(!0),R=Ha(null),Y=Ha(null),dt=Ha(null),_t=Ha([]),zt=Ha(null),jt=Ha({cpuChart:!0,memoryChart:!0,diskChart:!1,processChart:!0}),te=Ha(!1),ce=Ha(!1),Ie=Ha(null),Je=Ha(null),fr=Ha(null),Ar=Ha(null),kr=Ha(null),Vr=Wo(()=>Y.value?{cpuUsage:Y.value.cpu.usage_percent,memoryUsage:Y.value.memory.usage_percent,diskUsage:Y.value.disk.usage_percent,uptime:Y.value.system.uptime}:{cpuUsage:0,memoryUsage:0,diskUsage:0,uptime:0}),fn=Wo(()=>_t.value.length===0?{cpu:[],memory:[],disk:[],network:[]}:{cpu:_t.value.map($n=>$n.cpu.usage_percent),memory:_t.value.map($n=>$n.memory.usage_percent),disk:_t.value.map($n=>$n.disk.usage_percent),network:_t.value.map($n=>$n.network.bytes_recv/1024/1024)}),Dt=$n=>{const Hn=["B","KB","MB","GB","TB"];if($n===0)return"0 B";const sa=Math.floor(Math.log($n)/Math.log(1024));return parseFloat(($n/Math.pow(1024,sa)).toFixed(2))+" "+Hn[sa]},cn=$n=>{const Hn=Math.floor($n/86400),sa=Math.floor($n%86400/3600),Ti=Math.floor($n%3600/60);return Hn>0?`${Hn}d ${sa}h ${Ti}m`:sa>0?`${sa}h ${Ti}m`:`${Ti}m`},ti=async()=>{try{const $n=await ah.get("/hardware_stats");if($n?.success&&$n.data){const Hn=$n.data;if(Y.value=Hn,_t.value.length===0)for(let Ti=0;Ti<12;Ti++)_t.value.push(JSON.parse(JSON.stringify(Hn)));else _t.value.push(Hn),_t.value.length>20&&_t.value.shift()}}catch($n){console.error("Failed to fetch hardware stats:",$n),R.value="Failed to fetch hardware stats"}},Dn=async()=>{try{const $n=await ah.get("/hardware_processes");$n?.success&&$n.data&&(zt.value=dt.value,dt.value=$n.data)}catch($n){console.error("Failed to fetch process stats:",$n)}},ii=($n,Hn)=>{if(!zt.value)return!1;const sa=zt.value.processes.find(Ti=>Ti.pid===$n.pid);return sa?sa[Hn]!==$n[Hn]:!0},Vi=async()=>{try{E.value=!0,R.value=null,await Promise.all([ti(),Dn()]),E.value=!1,await S0(),Nn()}catch($n){R.value=$n instanceof Error?$n.message:"Failed to fetch system data",E.value=!1}},Nn=()=>{Y.value&&(Wr(),Bi(),Ri())},Wr=()=>{if(!fr.value||!Y.value){jt.value.cpuChart=!1;return}const $n=fr.value.getContext("2d");if(!$n){jt.value.cpuChart=!1;return}const Hn=Y.value.cpu.usage_percent,sa=100-Hn;if(Ie.value)try{Ie.value.data.datasets[0].data=[Hn,sa],Ie.value.update("none");return}catch(Ti){console.warn("Failed to update CPU chart, recreating...",Ti),Ie.value.destroy(),Ie.value=null}try{const Ti=new p1($n,{type:"doughnut",data:{labels:["Used","Available"],datasets:[{data:[Hn,sa],backgroundColor:["#FFC246","rgba(255, 255, 255, 0.1)"],borderColor:["#FFC246","rgba(255, 255, 255, 0.2)"],borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",animation:{animateRotate:!1,animateScale:!1,duration:0},plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(Qn){return`${Qn.label}: ${Qn.parsed.toFixed(1)}%`}}}}},plugins:[{id:"centerText",beforeDraw:function(Qn){const la=Qn.ctx;la.save();const Eo=(Qn.chartArea.left+Qn.chartArea.right)/2,no=(Qn.chartArea.top+Qn.chartArea.bottom)/2;la.textAlign="center",la.textBaseline="middle",la.fillStyle="#FFC246",la.font="bold 18px sans-serif",la.fillText(`${Hn.toFixed(1)}%`,Eo,no-5),la.fillStyle="rgba(255, 255, 255, 0.6)",la.font="10px sans-serif",la.fillText("CPU",Eo,no+12),la.restore()}}]});Ie.value=Eu(Ti),te.value=!1,jt.value.cpuChart=!1}catch(Ti){console.error("Error creating CPU chart:",Ti),te.value=!0,jt.value.cpuChart=!1}},Bi=()=>{if(!Ar.value||!Y.value){jt.value.memoryChart=!1;return}const $n=Ar.value.getContext("2d");if(!$n){jt.value.memoryChart=!1;return}const Hn=Y.value.memory.usage_percent,sa=100-Hn;if(Je.value)try{Je.value.data.datasets[0].data=[Hn,sa],Je.value.update("none");return}catch(Ti){console.warn("Failed to update Memory chart, recreating...",Ti),Je.value.destroy(),Je.value=null}try{const Ti=new p1($n,{type:"doughnut",data:{labels:["Used","Available"],datasets:[{data:[Hn,sa],backgroundColor:["#A5E5B6","rgba(255, 255, 255, 0.1)"],borderColor:["#A5E5B6","rgba(255, 255, 255, 0.2)"],borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",animation:{animateRotate:!1,animateScale:!1,duration:0},plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(Qn){return`${Qn.label}: ${Qn.parsed.toFixed(1)}%`}}}}},plugins:[{id:"centerText",beforeDraw:function(Qn){const la=Qn.ctx;la.save();const Eo=(Qn.chartArea.left+Qn.chartArea.right)/2,no=(Qn.chartArea.top+Qn.chartArea.bottom)/2;la.textAlign="center",la.textBaseline="middle",la.fillStyle="#A5E5B6",la.font="bold 18px sans-serif",la.fillText(`${Hn.toFixed(1)}%`,Eo,no-5),la.fillStyle="rgba(255, 255, 255, 0.6)",la.font="10px sans-serif",la.fillText("Memory",Eo,no+12),la.restore()}}]});Je.value=Eu(Ti),ce.value=!1,jt.value.memoryChart=!1}catch(Ti){console.error("Error creating Memory chart:",Ti),ce.value=!0,jt.value.memoryChart=!1}},Ri=()=>{if(!(!kr.value||!Y.value))try{iA(()=>Promise.resolve().then(()=>nA),void 0).then($n=>{const Hn=$n.default||$n,sa=Y.value.disk,Ti=[{type:"pie",labels:["Used","Free"],values:[sa.used,sa.free],marker:{colors:["#FB787B","#A5E5B6"]},hovertemplate:"%{label}
Size: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",hole:.4}],Qn={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},la={responsive:!0,displayModeBar:!1,staticPlot:!1};Hn.newPlot(kr.value,Ti,Qn,la)})}catch($n){console.error("Error creating disk chart:",$n)}},Li=()=>{try{if(Ie.value&&(Ie.value.destroy(),Ie.value=null),Je.value&&(Je.value.destroy(),Je.value=null),kr.value)try{iA(()=>Promise.resolve().then(()=>nA),void 0).then($n=>{const Hn=$n?.default||$n;Hn?.purge&&Hn.purge(kr.value)}).catch(()=>{})}catch{}}catch($n){console.error("Error destroying charts:",$n)}};return op(async()=>{await S0(),Vi(),s.value=window.setInterval(Vi,5e3),window.addEventListener("resize",()=>{setTimeout(()=>{Eu(Ie.value)?.resize(),Eu(Je.value)?.resize();try{iA(()=>Promise.resolve().then(()=>nA),void 0).then($n=>{const Hn=$n?.default||$n;Hn?.Plots&&Hn.Plots.resize(kr.value)}).catch(()=>{})}catch{}},100)})}),zm(()=>{s.value&&clearInterval(s.value),Li(),window.removeEventListener("resize",()=>{})}),($n,Hn)=>(ci(),wi("div",E0t,[Hn[28]||(Hn[28]=ye("div",{class:"flex justify-between items-center"},[ye("h2",{class:"text-2xl font-bold text-white"},"System Statistics"),ye("div",{class:"text-white/60 text-sm"}," Updates every 5 seconds ")],-1)),ye("div",C0t,[El(pg,{title:"CPU Usage",value:`${Vr.value.cpuUsage.toFixed(1)}%`,color:"#FFC246",data:fn.value.cpu},null,8,["value","data"]),El(pg,{title:"Memory Usage",value:`${Vr.value.memoryUsage.toFixed(1)}%`,color:"#A5E5B6",data:fn.value.memory},null,8,["value","data"]),El(pg,{title:"Disk Usage",value:`${Vr.value.diskUsage.toFixed(1)}%`,color:"#FB787B",data:fn.value.disk},null,8,["value","data"]),El(pg,{title:"Uptime",value:cn(Vr.value.uptime),color:"#EBA0FC",data:fn.value.network},null,8,["value","data"])]),ye("div",L0t,[ye("div",P0t,[Hn[6]||(Hn[6]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"CPU Performance",-1)),ye("div",I0t,[ye("canvas",{ref_key:"cpuCanvasRef",ref:fr,class:"w-full h-full relative z-10"},null,512),jt.value.cpuChart?(ci(),wi("div",z0t,Hn[0]||(Hn[0]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-6 h-6 border-2 border-white/20 border-t-orange-400 rounded-full mx-auto mb-2"}),ye("div",{class:"text-white/50 text-xs"},"Loading CPU data...")],-1)]))):Uo("",!0),te.value&&!jt.value.cpuChart?(ci(),wi("div",O0t,Hn[1]||(Hn[1]=[ye("div",{class:"text-center"},[ye("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),ye("div",{class:"text-white/50 text-xs"},"CPU data not found")],-1)]))):Uo("",!0)]),Y.value?(ci(),wi("div",D0t,[ye("div",null,[Hn[2]||(Hn[2]=ye("div",{class:"text-white/60"},"CPU Count",-1)),ye("div",F0t,Fi(Y.value.cpu.count)+" cores",1)]),ye("div",null,[Hn[3]||(Hn[3]=ye("div",{class:"text-white/60"},"Frequency",-1)),ye("div",B0t,Fi(Y.value.cpu.frequency.toFixed(0))+" MHz",1)]),ye("div",null,[Hn[4]||(Hn[4]=ye("div",{class:"text-white/60"},"Load (1m)",-1)),ye("div",R0t,Fi(Y.value.cpu.load_avg["1min"].toFixed(2)),1)]),ye("div",null,[Hn[5]||(Hn[5]=ye("div",{class:"text-white/60"},"Load (5m)",-1)),ye("div",N0t,Fi(Y.value.cpu.load_avg["5min"].toFixed(2)),1)])])):Uo("",!0)]),ye("div",j0t,[Hn[13]||(Hn[13]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Memory Usage",-1)),ye("div",U0t,[ye("canvas",{ref_key:"memoryCanvasRef",ref:Ar,class:"w-full h-full relative z-10"},null,512),jt.value.memoryChart?(ci(),wi("div",V0t,Hn[7]||(Hn[7]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-6 h-6 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),ye("div",{class:"text-white/50 text-xs"},"Loading memory data...")],-1)]))):Uo("",!0),ce.value&&!jt.value.memoryChart?(ci(),wi("div",H0t,Hn[8]||(Hn[8]=[ye("div",{class:"text-center"},[ye("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),ye("div",{class:"text-white/50 text-xs"},"Memory data not found")],-1)]))):Uo("",!0)]),Y.value?(ci(),wi("div",W0t,[ye("div",null,[Hn[9]||(Hn[9]=ye("div",{class:"text-white/60"},"Total",-1)),ye("div",q0t,Fi(Dt(Y.value.memory.total)),1)]),ye("div",null,[Hn[10]||(Hn[10]=ye("div",{class:"text-white/60"},"Used",-1)),ye("div",$0t,Fi(Dt(Y.value.memory.used)),1)]),ye("div",null,[Hn[11]||(Hn[11]=ye("div",{class:"text-white/60"},"Available",-1)),ye("div",Z0t,Fi(Dt(Y.value.memory.available)),1)]),ye("div",null,[Hn[12]||(Hn[12]=ye("div",{class:"text-white/60"},"Usage",-1)),ye("div",G0t,Fi(Y.value.memory.usage_percent.toFixed(1))+"%",1)])])):Uo("",!0)])]),ye("div",Y0t,[ye("div",K0t,[Hn[17]||(Hn[17]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Storage Usage",-1)),ye("div",X0t,[ye("div",{ref_key:"diskCanvasRef",ref:kr,class:"w-full h-full"},null,512)]),Y.value?(ci(),wi("div",J0t,[ye("div",Q0t,[Hn[14]||(Hn[14]=ye("div",{class:"text-white/60"},"Total",-1)),ye("div",tmt,Fi(Dt(Y.value.disk.total)),1)]),ye("div",emt,[Hn[15]||(Hn[15]=ye("div",{class:"text-white/60"},"Used",-1)),ye("div",rmt,Fi(Dt(Y.value.disk.used)),1)]),ye("div",nmt,[Hn[16]||(Hn[16]=ye("div",{class:"text-white/60"},"Free",-1)),ye("div",imt,Fi(Dt(Y.value.disk.free)),1)])])):Uo("",!0)]),ye("div",amt,[Hn[23]||(Hn[23]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Network Statistics",-1)),Y.value?(ci(),wi("div",omt,[ye("div",smt,[ye("div",null,[Hn[18]||(Hn[18]=ye("div",{class:"text-white/60"},"Bytes Sent",-1)),ye("div",lmt,Fi(Dt(Y.value.network.bytes_sent)),1)]),ye("div",null,[Hn[19]||(Hn[19]=ye("div",{class:"text-white/60"},"Bytes Received",-1)),ye("div",umt,Fi(Dt(Y.value.network.bytes_recv)),1)]),ye("div",null,[Hn[20]||(Hn[20]=ye("div",{class:"text-white/60"},"Packets Sent",-1)),ye("div",cmt,Fi(Y.value.network.packets_sent.toLocaleString()),1)]),ye("div",null,[Hn[21]||(Hn[21]=ye("div",{class:"text-white/60"},"Packets Received",-1)),ye("div",hmt,Fi(Y.value.network.packets_recv.toLocaleString()),1)])]),Y.value.temperatures&&Object.keys(Y.value.temperatures).length>0?(ci(),wi("div",fmt,[Hn[22]||(Hn[22]=ye("div",{class:"text-white/60 mb-2"},"System Temperatures",-1)),ye("div",dmt,[(ci(!0),wi(_u,null,Mh(Y.value.temperatures,(sa,Ti)=>(ci(),wi("div",{key:Ti},[ye("span",pmt,Fi(Ti)+":",1),ye("span",mmt,Fi(sa.toFixed(1))+"°C",1)]))),128))])])):Uo("",!0)])):Uo("",!0)])]),ye("div",gmt,[Hn[25]||(Hn[25]=ye("h3",{class:"text-white text-xl font-semibold mb-4"},"Top Processes",-1)),dt.value?.processes&&dt.value.processes.length>0?(ci(),wi("div",vmt,[ye("table",ymt,[Hn[24]||(Hn[24]=ye("thead",null,[ye("tr",{class:"border-b border-white/10"},[ye("th",{class:"text-left text-white/70 py-2"},"PID"),ye("th",{class:"text-left text-white/70 py-2"},"Name"),ye("th",{class:"text-center text-white/70 py-2"},"CPU %"),ye("th",{class:"text-center text-white/70 py-2"},"Memory %"),ye("th",{class:"text-right text-white/70 py-2"},"Memory")])],-1)),ye("tbody",null,[(ci(!0),wi(_u,null,Mh(dt.value.processes.slice(0,10),sa=>(ci(),wi("tr",{key:sa.pid,class:"border-b border-white/5 process-row"},[ye("td",xmt,Fi(sa.pid),1),ye("td",_mt,Fi(sa.name),1),ye("td",bmt,[ye("span",{class:Fo(["cpu-value",{"value-updated":ii(sa,"cpu_percent")}])},Fi(sa.cpu_percent.toFixed(1))+"% ",3)]),ye("td",wmt,[ye("span",{class:Fo(["memory-value",{"value-updated":ii(sa,"memory_percent")}])},Fi(sa.memory_percent.toFixed(1))+"% ",3)]),ye("td",kmt,[ye("span",{class:Fo({"value-updated":ii(sa,"memory_mb")})},Fi(sa.memory_mb.toFixed(1))+" MB ",3)])]))),128))])]),dt.value.total_processes?(ci(),wi("div",Tmt," Showing top 10 of "+Fi(dt.value.total_processes)+" total processes ",1)):Uo("",!0)])):E.value?Uo("",!0):(ci(),wi("div",Amt," No process data available "))]),E.value?(ci(),wi("div",Mmt,Hn[26]||(Hn[26]=[ye("div",{class:"text-white/70 mb-2"},"Loading system statistics...",-1),ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):Uo("",!0),R.value?(ci(),wi("div",Smt,[Hn[27]||(Hn[27]=ye("div",{class:"text-red-400 mb-2"},"Failed to load system statistics",-1)),ye("p",Emt,Fi(R.value),1),ye("button",{onClick:Vi,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):Uo("",!0)]))}}),Lmt=Bf(Cmt,[["__scopeId","data-v-04026a5d"]]),Pmt={class:"space-y-4"},Imt={class:"bg-white/5 rounded-lg p-4 space-y-3"},zmt={class:"flex justify-between items-center py-2 border-b border-white/10"},Omt={class:"text-white font-mono"},Dmt={class:"flex justify-between items-center py-2 border-b border-white/10"},Fmt={class:"text-white font-mono"},Bmt={class:"flex justify-between items-center py-2 border-b border-white/10"},Rmt={class:"text-white font-mono"},Nmt={class:"flex justify-between items-center py-2 border-b border-white/10"},jmt={class:"text-white font-mono"},Umt={class:"flex justify-between items-center py-2 border-b border-white/10"},Vmt={class:"text-white font-mono"},Hmt={class:"flex justify-between items-center py-2"},Wmt={class:"text-white font-mono"},qmt=Ec({__name:"RadioSettings",setup(d){const s=Dm(),E=Wo(()=>s.stats?.config?.radio||{}),R=Wo(()=>{const te=E.value.frequency;return te?(te/1e6).toFixed(3)+" MHz":"Not set"}),Y=Wo(()=>{const te=E.value.bandwidth;return te?(te/1e3).toFixed(1)+" kHz":"Not set"}),dt=Wo(()=>{const te=E.value.tx_power;return te!==void 0?te+" dBm":"Not set"}),_t=Wo(()=>{const te=E.value.coding_rate;return te?"4/"+te:"Not set"}),zt=Wo(()=>{const te=E.value.preamble_length;return te?te+" symbols":"Not set"}),jt=Wo(()=>E.value.spreading_factor??"Not set");return(te,ce)=>(ci(),wi("div",Pmt,[ye("div",Imt,[ye("div",zmt,[ce[0]||(ce[0]=ye("span",{class:"text-white/70 text-sm"},"Frequency",-1)),ye("span",Omt,Fi(R.value),1)]),ye("div",Dmt,[ce[1]||(ce[1]=ye("span",{class:"text-white/70 text-sm"},"Spreading Factor",-1)),ye("span",Fmt,Fi(jt.value),1)]),ye("div",Bmt,[ce[2]||(ce[2]=ye("span",{class:"text-white/70 text-sm"},"Bandwidth",-1)),ye("span",Rmt,Fi(Y.value),1)]),ye("div",Nmt,[ce[3]||(ce[3]=ye("span",{class:"text-white/70 text-sm"},"TX Power",-1)),ye("span",jmt,Fi(dt.value),1)]),ye("div",Umt,[ce[4]||(ce[4]=ye("span",{class:"text-white/70 text-sm"},"Coding Rate",-1)),ye("span",Vmt,Fi(_t.value),1)]),ye("div",Hmt,[ce[5]||(ce[5]=ye("span",{class:"text-white/70 text-sm"},"Preamble Length",-1)),ye("span",Wmt,Fi(zt.value),1)])])]))}}),$mt={class:"space-y-4"},Zmt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Gmt={class:"flex justify-between items-center py-2 border-b border-white/10"},Ymt={class:"text-white font-mono"},Kmt={class:"flex justify-between items-center py-2 border-b border-white/10"},Xmt={class:"text-white font-mono text-xs"},Jmt={class:"flex justify-between items-start py-2 border-b border-white/10"},Qmt={class:"text-white font-mono text-xs text-right break-all max-w-xs"},tgt={class:"flex justify-between items-center py-2 border-b border-white/10"},egt={class:"text-white font-mono"},rgt={class:"flex justify-between items-center py-2 border-b border-white/10"},ngt={class:"text-white font-mono"},igt={class:"flex justify-between items-center py-2 border-b border-white/10"},agt={class:"text-white font-mono"},ogt={class:"flex justify-between items-start py-2"},sgt={class:"text-white font-mono ml-4"},lgt=Ec({__name:"RepeaterSettings",setup(d){const s=Dm(),E=Wo(()=>s.stats?.config||{}),R=Wo(()=>E.value.repeater||{}),Y=Wo(()=>s.stats),dt=Wo(()=>E.value.node_name||"Not set"),_t=Wo(()=>Y.value?.local_hash||"Not available"),zt=Wo(()=>{const Je=Y.value?.public_key;return!Je||Je==="Not set"?"Not set":Je}),jt=Wo(()=>{const Je=R.value.latitude;return Je&&Je!==0?Je.toFixed(6):"Not set"}),te=Wo(()=>{const Je=R.value.longitude;return Je&&Je!==0?Je.toFixed(6):"Not set"}),ce=Wo(()=>{const Je=R.value.mode;return Je?Je.charAt(0).toUpperCase()+Je.slice(1):"Not set"}),Ie=Wo(()=>{const Je=R.value.send_advert_interval_hours;return Je===void 0?"Not set":Je===0?"Disabled":Je+" hour"+(Je!==1?"s":"")});return(Je,fr)=>(ci(),wi("div",$mt,[ye("div",Zmt,[ye("div",Gmt,[fr[0]||(fr[0]=ye("span",{class:"text-white/70 text-sm"},"Node Name",-1)),ye("span",Ymt,Fi(dt.value),1)]),ye("div",Kmt,[fr[1]||(fr[1]=ye("span",{class:"text-white/70 text-sm"},"Local Hash",-1)),ye("span",Xmt,Fi(_t.value),1)]),ye("div",Jmt,[fr[2]||(fr[2]=ye("span",{class:"text-white/70 text-sm"},"Public Key",-1)),ye("span",Qmt,Fi(zt.value),1)]),ye("div",tgt,[fr[3]||(fr[3]=ye("span",{class:"text-white/70 text-sm"},"Latitude",-1)),ye("span",egt,Fi(jt.value),1)]),ye("div",rgt,[fr[4]||(fr[4]=ye("span",{class:"text-white/70 text-sm"},"Longitude",-1)),ye("span",ngt,Fi(te.value),1)]),ye("div",igt,[fr[5]||(fr[5]=ye("span",{class:"text-white/70 text-sm"},"Mode",-1)),ye("span",agt,Fi(ce.value),1)]),ye("div",ogt,[fr[6]||(fr[6]=ye("div",{class:"flex flex-col"},[ye("span",{class:"text-white/70 text-sm"},"Periodic Advertisement Interval"),ye("span",{class:"text-white/50 text-xs mt-1"},"How often the repeater sends an advertisement packet (0 = disabled)")],-1)),ye("span",sgt,Fi(Ie.value),1)])])]))}}),ugt={class:"space-y-4"},cgt={class:"bg-white/5 rounded-lg p-4 space-y-3"},hgt={class:"flex justify-between items-center py-2 border-b border-white/10"},fgt={class:"text-white font-mono"},dgt={class:"flex justify-between items-center py-2"},pgt={class:"text-white font-mono"},mgt=Ec({__name:"DutyCycle",setup(d){const s=Dm(),E=Wo(()=>s.stats?.config?.duty_cycle||{}),R=Wo(()=>{const dt=E.value.max_airtime_percent;return typeof dt=="number"?dt.toFixed(1)+"%":dt&&typeof dt=="object"&&"parsedValue"in dt?(dt.parsedValue||0).toFixed(1)+"%":"Not set"}),Y=Wo(()=>E.value.enforcement_enabled?"Enabled":"Disabled");return(dt,_t)=>(ci(),wi("div",ugt,[ye("div",cgt,[ye("div",hgt,[_t[0]||(_t[0]=ye("span",{class:"text-white/70 text-sm"},"Max Airtime %",-1)),ye("span",fgt,Fi(R.value),1)]),ye("div",dgt,[_t[1]||(_t[1]=ye("span",{class:"text-white/70 text-sm"},"Enforcement",-1)),ye("span",pgt,Fi(Y.value),1)])])]))}}),ggt={class:"space-y-4"},vgt={class:"bg-white/5 rounded-lg p-4 space-y-3"},ygt={class:"flex justify-between items-start py-2 border-b border-white/10"},xgt={class:"text-white font-mono ml-4"},_gt={class:"flex justify-between items-start py-2"},bgt={class:"text-white font-mono ml-4"},wgt=Ec({__name:"TransmissionDelays",setup(d){const s=Dm(),E=Wo(()=>s.stats?.config?.delays||{}),R=Wo(()=>{const dt=E.value.tx_delay_factor;if(dt&&typeof dt=="object"&&dt!==null&&"parsedValue"in dt){const _t=dt.parsedValue;if(typeof _t=="number")return _t.toFixed(2)+"x"}return"Not set"}),Y=Wo(()=>{const dt=E.value.direct_tx_delay_factor;return typeof dt=="number"?dt.toFixed(2)+"s":"Not set"});return(dt,_t)=>(ci(),wi("div",ggt,[ye("div",vgt,[ye("div",ygt,[_t[0]||(_t[0]=ye("div",{class:"flex flex-col"},[ye("span",{class:"text-white/70 text-sm"},"Flood TX Delay Factor"),ye("span",{class:"text-white/50 text-xs mt-1"},"Multiplier for flood packet transmission delays (collision avoidance)")],-1)),ye("span",xgt,Fi(R.value),1)]),ye("div",_gt,[_t[1]||(_t[1]=ye("div",{class:"flex flex-col"},[ye("span",{class:"text-white/70 text-sm"},"Direct TX Delay Factor"),ye("span",{class:"text-white/50 text-xs mt-1"},"Base delay for direct-routed packet transmission (seconds)")],-1)),ye("span",bgt,Fi(Y.value),1)])])]))}}),LF=lM("treeState",()=>{const d=Ey(new Set),s=Ey({value:null}),E=zt=>{d.add(zt)},R=zt=>{d.delete(zt)};return{expandedNodes:d,selectedNodeId:s,addExpandedNode:E,removeExpandedNode:R,isNodeExpanded:zt=>d.has(zt),setSelectedNode:zt=>{s.value=zt},toggleExpanded:zt=>{d.has(zt)?R(zt):E(zt)}}}),kgt={class:"select-none"},Tgt={class:"flex-shrink-0"},Agt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Mgt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Sgt={key:0,class:"flex items-center gap-1 ml-2"},Egt={class:"relative group"},Cgt=["title"],Lgt={key:0,class:"text-xs font-mono text-white/50 bg-white/5 px-1.5 py-0.5 rounded border border-white/10"},Pgt={class:"flex justify-between items-start mb-4"},Igt={class:"bg-black/20 border border-white/10 rounded-md p-4 mb-4"},zgt={class:"text-sm font-mono text-white/80 break-all leading-relaxed"},Ogt={class:"flex items-center gap-2 ml-auto"},Dgt={key:0,class:"flex items-center gap-1"},Fgt=["title"],Bgt={key:1,class:"flex items-center gap-1"},Rgt={key:2,class:"px-2 py-1 bg-white/10 text-white/60 text-xs rounded-full ml-1"},Ngt={key:0,class:"space-y-1"},jgt=Ec({__name:"TreeNode",props:{node:{},selectedNodeId:{},level:{},disabled:{type:Boolean}},emits:["select"],setup(d,{emit:s}){const E=d,R=s,Y=LF(),dt=Ha(!1),_t=Wo({get:()=>Y.isNodeExpanded(E.node.id),set:kr=>{kr?Y.addExpandedNode(E.node.id):Y.removeExpandedNode(E.node.id)}}),zt=Wo(()=>E.node.children.length>0);function jt(kr){if(!kr)return"Never";const fn=new Date().getTime()-kr.getTime(),Dt=Math.floor(fn/(1e3*60)),cn=Math.floor(fn/(1e3*60*60)),ti=Math.floor(fn/(1e3*60*60*24)),Dn=Math.floor(ti/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:ti<365?`${ti}d ago`:`${Dn}y ago`}function te(kr){return kr?kr.length<=16?kr:`${kr.slice(0,8)}...${kr.slice(-8)}`:"No key"}function ce(){if(zt.value){const kr=!_t.value;_t.value=kr}}function Ie(){R("select",E.node.id)}function Je(kr){R("select",kr)}function fr(kr){kr.stopPropagation(),dt.value=!dt.value}function Ar(kr){kr.stopPropagation(),E.node.transport_key&&window.navigator?.clipboard&&window.navigator.clipboard.writeText(E.node.transport_key)}return(kr,Vr)=>{const fn=eM("TreeNode",!0);return ci(),wi("div",kgt,[ye("div",{class:Fo(["flex items-center gap-2 py-2 px-3 rounded-lg cursor-pointer transition-all duration-200",E.disabled?"opacity-50 cursor-not-allowed":"hover:bg-white/5",kr.selectedNodeId===kr.node.id&&!E.disabled?"bg-primary/20 text-primary":"text-white/80 hover:text-white",`ml-${kr.level*4}`]),onClick:Vr[3]||(Vr[3]=Dt=>!E.disabled&&Ie())},[ye("div",{class:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:Pm(ce,["stop"])},[zt.value?(ci(),wi("svg",{key:0,class:Fo(["w-3 h-3 transition-transform duration-200",_t.value?"rotate-90":"rotate-0"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vr[4]||(Vr[4]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)]),2)):Uo("",!0)]),ye("div",Tgt,[E.node.name.startsWith("#")?(ci(),wi("svg",Agt,Vr[5]||(Vr[5]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",Mgt,Vr[6]||(Vr[6]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])))]),ye("span",{class:Fo(["font-mono text-sm transition-colors duration-200",kr.selectedNodeId===kr.node.id?"text-primary font-medium":""])},Fi(kr.node.name),3),kr.node.transport_key?(ci(),wi("div",Sgt,[ye("div",Egt,[ye("button",{onClick:fr,class:"p-1 rounded hover:bg-white/10 transition-colors",title:dt.value?"Hide full key":"Show full key"},Vr[7]||(Vr[7]=[ye("svg",{class:"w-3 h-3 text-white/60 hover:text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,Cgt),dt.value?Uo("",!0):(ci(),wi("span",Lgt,Fi(te(kr.node.transport_key)),1)),dt.value?(ci(),wi("div",{key:1,class:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-md",onClick:Vr[2]||(Vr[2]=Dt=>dt.value=!1)},[ye("div",{class:"bg-black/20 border border-white/20 rounded-lg shadow-lg p-6 max-w-2xl w-full mx-4",onClick:Vr[1]||(Vr[1]=Pm(()=>{},["stop"]))},[ye("div",Pgt,[Vr[9]||(Vr[9]=ye("h3",{class:"text-lg font-semibold text-white"},"Transport Key",-1)),ye("button",{onClick:Vr[0]||(Vr[0]=Dt=>dt.value=!1),class:"text-white/60 hover:text-white transition-colors"},Vr[8]||(Vr[8]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),ye("div",Igt,[ye("div",zgt,Fi(kr.node.transport_key),1)]),ye("div",{class:"flex justify-end"},[ye("button",{onClick:Ar,class:"px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green rounded-lg transition-colors flex items-center gap-2",title:"Copy to clipboard"},Vr[10]||(Vr[10]=[ye("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])])):Uo("",!0)])])):Uo("",!0),ye("div",Ogt,[kr.node.last_used?(ci(),wi("div",Dgt,[Vr[11]||(Vr[11]=ye("svg",{class:"w-3 h-3 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),ye("span",{class:"text-xs text-white/50",title:kr.node.last_used.toLocaleString()},Fi(jt(kr.node.last_used)),9,Fgt)])):(ci(),wi("div",Bgt,Vr[12]||(Vr[12]=[ye("svg",{class:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),ye("span",{class:"text-xs text-white/30 italic"},"Never",-1)]))),ye("span",{class:Fo(["px-2 py-0.5 text-xs font-medium rounded-md transition-colors",kr.node.floodPolicy==="allow"?"bg-accent-green/10 text-accent-green/90 border border-accent-green/20":"bg-accent-red/10 text-accent-red/90 border border-accent-red/20"])},Fi(kr.node.floodPolicy==="allow"?"FLOOD ALLOW":"FLOOD DENY"),3),zt.value?(ci(),wi("span",Rgt,Fi(kr.node.children.length),1)):Uo("",!0)])],2),El(Yz,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0 overflow-hidden","enter-to-class":"opacity-100 max-h-screen overflow-visible","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-screen overflow-visible","leave-to-class":"opacity-0 max-h-0 overflow-hidden"},{default:ew(()=>[_t.value&&kr.node.children.length>0?(ci(),wi("div",Ngt,[(ci(!0),wi(_u,null,Mh(kr.node.children,Dt=>(ci(),G0(fn,{key:Dt.id,node:Dt,"selected-node-id":kr.selectedNodeId,level:kr.level+1,disabled:E.disabled,onSelect:Je},null,8,["node","selected-node-id","level","disabled"]))),128))])):Uo("",!0)]),_:1})])}}}),Ugt=Bf(jgt,[["__scopeId","data-v-4afde13e"]]),Vgt={class:"flex items-center justify-between mb-6"},Hgt={class:"text-white/60 text-sm mt-1"},Wgt={key:0},qgt={class:"text-primary font-mono"},$gt={key:1},Zgt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},Ggt={class:"flex items-center gap-2"},Ygt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Kgt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Xgt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},Jgt={class:"flex items-center gap-3 mb-2"},Qgt={class:"flex items-center gap-2"},tvt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},evt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},rvt={class:"text-white/70 text-sm"},nvt={class:"grid grid-cols-2 gap-3"},ivt={class:"relative cursor-pointer group"},avt={class:"relative cursor-pointer group"},ovt={class:"flex gap-3 pt-4"},svt=["disabled"],lvt=Ec({__name:"AddKeyModal",props:{show:{type:Boolean},selectedNodeName:{},selectedNodeId:{}},emits:["close","add"],setup(d,{emit:s}){const E=d,R=s,Y=Ha(""),dt=Ha(""),_t=Ha("allow"),zt=Wo(()=>Y.value.startsWith("#")),jt=Wo(()=>({type:zt.value?"Region":"Private Key",description:zt.value?"Regional organizational key":"Individual assigned key"}));Em(zt,fr=>{fr?dt.value="This will create a new region for organizing keys":dt.value="This will create a new private key entry"},{immediate:!0});const te=Wo(()=>Y.value.trim().length>0),ce=()=>{te.value&&(R("add",{name:Y.value.trim(),floodPolicy:_t.value,parentId:E.selectedNodeId}),Y.value="",dt.value="",_t.value="allow")},Ie=()=>{Y.value="",dt.value="",_t.value="allow",R("close")},Je=fr=>{fr.target===fr.currentTarget&&Ie()};return(fr,Ar)=>fr.show?(ci(),wi("div",{key:0,onClick:Je,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[ye("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Ar[3]||(Ar[3]=Pm(()=>{},["stop"]))},[ye("div",Vgt,[ye("div",null,[Ar[5]||(Ar[5]=ye("h3",{class:"text-xl font-semibold text-white"},"Add New Entry",-1)),ye("p",Hgt,[E.selectedNodeName?(ci(),wi("span",Wgt,[Ar[4]||(Ar[4]=Qu(" Add to: ",-1)),ye("span",qgt,Fi(E.selectedNodeName),1)])):(ci(),wi("span",$gt," Add to root level (#uk) "))])]),ye("button",{onClick:Ie,class:"text-white/60 hover:text-white transition-colors"},Ar[6]||(Ar[6]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),ye("form",{onSubmit:Pm(ce,["prevent"]),class:"space-y-4"},[ye("div",null,[ye("label",Zgt,[ye("div",Ggt,[zt.value?(ci(),wi("svg",Ygt,Ar[7]||(Ar[7]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",Kgt,Ar[8]||(Ar[8]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))),Ar[9]||(Ar[9]=Qu(" Region/Key Name ",-1))])]),Gp(ye("input",{id:"keyName","onUpdate:modelValue":Ar[0]||(Ar[0]=kr=>Y.value=kr),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[sM,Y.value]])]),ye("div",Xgt,[ye("div",Jgt,[ye("div",Qgt,[zt.value?(ci(),wi("svg",tvt,Ar[10]||(Ar[10]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",evt,Ar[11]||(Ar[11]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1221 9z"},null,-1)]))),ye("span",{class:Fo([zt.value?"text-secondary":"text-accent-green","font-medium"])},Fi(jt.value.type),3)]),ye("div",{class:Fo(["flex-1 h-px",zt.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),ye("p",rvt,Fi(jt.value.description),1)]),ye("div",null,[Ar[14]||(Ar[14]=ye("label",{class:"block text-sm font-medium text-white mb-3"},[ye("div",{class:"flex items-center gap-2"},[ye("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),ye("div",nvt,[ye("label",ivt,[Gp(ye("input",{type:"radio","onUpdate:modelValue":Ar[1]||(Ar[1]=kr=>_t.value=kr),value:"allow",class:"sr-only"},null,512),[[V2,_t.value]]),Ar[12]||(Ar[12]=Ff('
Allow

Permit flooding

',1))]),ye("label",avt,[Gp(ye("input",{type:"radio","onUpdate:modelValue":Ar[2]||(Ar[2]=kr=>_t.value=kr),value:"deny",class:"sr-only"},null,512),[[V2,_t.value]]),Ar[13]||(Ar[13]=Ff('
Deny

Block flooding

',1))])])]),ye("div",ovt,[ye("button",{type:"button",onClick:Ie,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),ye("button",{type:"submit",disabled:!te.value,class:Fo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",te.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Add "+Fi(jt.value.type),11,svt)])],32)])])):Uo("",!0)}}),uvt={class:"flex bg-black items-center justify-between mb-6"},cvt={class:"text-white/60 text-sm mt-1"},hvt={class:"text-primary font-mono"},fvt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},dvt={class:"flex items-center gap-2"},pvt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},mvt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},gvt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},vvt={class:"flex items-center gap-3 mb-2"},yvt={class:"flex items-center gap-2"},xvt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},_vt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},bvt={class:"text-white/70 text-sm"},wvt={key:0,class:"space-y-4"},kvt={key:0,class:"bg-white/5 border border-white/10 rounded-lg p-4"},Tvt={class:"bg-black/20 border border-white/10 rounded-md p-3"},Avt={class:"text-xs font-mono text-white/80 break-all"},Mvt={key:1,class:"bg-white/5 border border-white/10 rounded-lg p-4"},Svt={class:"flex items-center justify-between"},Evt={class:"text-sm text-white/70"},Cvt={class:"text-xs text-white/50"},Lvt={class:"grid grid-cols-2 gap-3"},Pvt={class:"relative cursor-pointer group"},Ivt={class:"relative cursor-pointer group"},zvt={class:"flex gap-3 pt-4"},Ovt=["disabled"],Dvt=Ec({__name:"EditKeyModal",props:{show:{type:Boolean},node:{}},emits:["close","save","request-delete"],setup(d,{emit:s}){const E=d,R=s,Y=Ha(""),dt=Ha("allow"),_t=Wo(()=>Y.value.startsWith("#")),zt=Wo(()=>({type:_t.value?"Region":"Private Key",description:_t.value?"Regional organizational key":"Individual assigned key"}));Em(()=>E.node,kr=>{kr?(Y.value=kr.name,dt.value=kr.floodPolicy):(Y.value="",dt.value="allow")},{immediate:!0});const jt=Wo(()=>Y.value.trim().length>0&&E.node),te=kr=>{const fn=new Date().getTime()-kr.getTime(),Dt=Math.floor(fn/(1e3*60)),cn=Math.floor(fn/(1e3*60*60)),ti=Math.floor(fn/(1e3*60*60*24)),Dn=Math.floor(ti/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:ti<365?`${ti}d ago`:`${Dn}y ago`},ce=kr=>{window.navigator?.clipboard&&window.navigator.clipboard.writeText(kr)},Ie=()=>{!jt.value||!E.node||(R("save",{id:E.node.id,name:Y.value.trim(),floodPolicy:dt.value}),fr())},Je=()=>{E.node&&(R("request-delete",E.node),fr())},fr=()=>{R("close")},Ar=kr=>{kr.target===kr.currentTarget&&fr()};return(kr,Vr)=>kr.show?(ci(),wi("div",{key:0,onClick:Ar,class:"fixed inset-0 bg-black/50 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[ye("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Vr[4]||(Vr[4]=Pm(()=>{},["stop"]))},[ye("div",uvt,[ye("div",null,[Vr[6]||(Vr[6]=ye("h3",{class:"text-xl font-semibold text-white"},"Edit Entry",-1)),ye("p",cvt,[Vr[5]||(Vr[5]=Qu(" Modify ",-1)),ye("span",hvt,Fi(kr.node?.name),1)])]),ye("button",{onClick:fr,class:"text-white/60 hover:text-white transition-colors"},Vr[7]||(Vr[7]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),ye("form",{onSubmit:Pm(Ie,["prevent"]),class:"space-y-4"},[ye("div",null,[ye("label",fvt,[ye("div",dvt,[_t.value?(ci(),wi("svg",pvt,Vr[8]||(Vr[8]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",mvt,Vr[9]||(Vr[9]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Vr[10]||(Vr[10]=Qu(" Region/Key Name ",-1))])]),Gp(ye("input",{id:"keyName","onUpdate:modelValue":Vr[0]||(Vr[0]=fn=>Y.value=fn),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[sM,Y.value]])]),ye("div",gvt,[ye("div",vvt,[ye("div",yvt,[_t.value?(ci(),wi("svg",xvt,Vr[11]||(Vr[11]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",_vt,Vr[12]||(Vr[12]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),ye("span",{class:Fo([_t.value?"text-secondary":"text-accent-green","font-medium"])},Fi(zt.value.type),3)]),ye("div",{class:Fo(["flex-1 h-px",_t.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),ye("p",bvt,Fi(zt.value.description),1)]),kr.node?(ci(),wi("div",wvt,[kr.node.transport_key?(ci(),wi("div",kvt,[Vr[14]||(Vr[14]=Ff('
Transport Key
',1)),ye("div",Tvt,[ye("div",Avt,Fi(kr.node.transport_key),1),ye("button",{onClick:Vr[1]||(Vr[1]=fn=>ce(kr.node.transport_key||"")),class:"mt-2 text-xs text-accent-green hover:text-accent-green/80 flex items-center gap-1",title:"Copy to clipboard"},Vr[13]||(Vr[13]=[ye("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])):Uo("",!0),kr.node.last_used?(ci(),wi("div",Mvt,[Vr[15]||(Vr[15]=ye("div",{class:"flex items-center gap-2 mb-3"},[ye("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),ye("span",{class:"text-sm font-medium text-white"},"Last Used")],-1)),ye("div",Svt,[ye("div",Evt,Fi(kr.node.last_used.toLocaleDateString())+" at "+Fi(kr.node.last_used.toLocaleTimeString()),1),ye("div",Cvt,Fi(te(kr.node.last_used)),1)])])):Uo("",!0)])):Uo("",!0),ye("div",null,[Vr[18]||(Vr[18]=ye("label",{class:"block text-sm font-medium text-white mb-3"},[ye("div",{class:"flex items-center gap-2"},[ye("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),ye("div",Lvt,[ye("label",Pvt,[Gp(ye("input",{type:"radio","onUpdate:modelValue":Vr[2]||(Vr[2]=fn=>dt.value=fn),value:"allow",class:"sr-only"},null,512),[[V2,dt.value]]),Vr[16]||(Vr[16]=Ff('
Allow

Permit flooding

',1))]),ye("label",Ivt,[Gp(ye("input",{type:"radio","onUpdate:modelValue":Vr[3]||(Vr[3]=fn=>dt.value=fn),value:"deny",class:"sr-only"},null,512),[[V2,dt.value]]),Vr[17]||(Vr[17]=Ff('
Deny

Block flooding

',1))])])]),ye("div",zvt,[ye("button",{type:"button",onClick:Je,class:"px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors"}," Delete "),ye("button",{type:"button",onClick:fr,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),ye("button",{type:"submit",disabled:!jt.value,class:Fo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",jt.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Save Changes ",10,Ovt)])],32)])])):Uo("",!0)}}),Fvt={class:"flex items-center gap-3 mb-6"},Bvt={class:"text-white/60 text-sm mt-1"},Rvt={class:"text-accent-red font-mono"},Nvt={key:0,class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},jvt={class:"flex items-start gap-3"},Uvt={class:"flex-1"},Vvt={class:"text-accent-red font-medium text-sm mb-2"},Hvt={class:"space-y-1 max-h-32 overflow-y-auto"},Wvt={key:0,class:"w-3 h-3 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},qvt={key:1,class:"w-3 h-3 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},$vt={class:"font-mono"},Zvt={key:0,class:"text-white/60 text-xs"},Gvt={key:1,class:"mb-6"},Yvt={class:"mb-3"},Kvt={class:"relative"},Xvt={class:"space-y-2 max-h-40 overflow-y-auto border border-white/20 rounded-lg p-3 bg-white/5"},Jvt={key:0,class:"text-center py-4 text-white/60 text-sm"},Qvt={class:"relative"},t1t=["value"],e1t={class:"flex items-center gap-2 flex-1"},r1t={class:"text-white font-mono text-sm"},n1t={key:0,class:"ml-auto px-2 py-0.5 bg-white/10 text-white/60 text-xs rounded-full"},i1t={class:"flex gap-3"},a1t=Ec({__name:"DeleteConfirmModal",props:{show:{type:Boolean},node:{},allNodes:{}},emits:["close","delete-all","move-children"],setup(d,{emit:s}){const E=d,R=s,Y=Ha(null),dt=Ha(""),_t=Ar=>{const kr=[],Vr=fn=>{for(const Dt of fn.children)kr.push(Dt),Vr(Dt)};return Vr(Ar),kr},zt=Wo(()=>E.node?_t(E.node):[]),jt=Wo(()=>{if(!E.node)return[];const Ar=new Set([E.node.id,...zt.value.map(Vr=>Vr.id)]),kr=Vr=>{const fn=[];for(const Dt of Vr)Dt.name.startsWith("#")&&!Ar.has(Dt.id)&&fn.push(Dt),Dt.children.length>0&&fn.push(...kr(Dt.children));return fn};return kr(E.allNodes)}),te=Wo(()=>{if(!dt.value.trim())return jt.value;const Ar=dt.value.toLowerCase();return jt.value.filter(kr=>kr.name.toLowerCase().includes(Ar))}),ce=()=>{E.node&&(R("delete-all",E.node.id),Je())},Ie=()=>{!E.node||!Y.value||(R("move-children",{nodeId:E.node.id,targetParentId:Y.value}),Je())},Je=()=>{Y.value=null,dt.value="",R("close")},fr=Ar=>{Ar.target===Ar.currentTarget&&Je()};return(Ar,kr)=>Ar.show&&Ar.node?(ci(),wi("div",{key:0,onClick:fr,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[ye("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-lg border border-white/10",onClick:kr[2]||(kr[2]=Pm(()=>{},["stop"]))},[ye("div",Fvt,[kr[6]||(kr[6]=ye("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),ye("div",null,[kr[4]||(kr[4]=ye("h3",{class:"text-xl font-semibold text-white"},"Confirm Deletion",-1)),ye("p",Bvt,[kr[3]||(kr[3]=Qu(" Deleting ",-1)),ye("span",Rvt,Fi(Ar.node?.name),1)])]),ye("button",{onClick:Je,class:"ml-auto text-white/60 hover:text-white transition-colors"},kr[5]||(kr[5]=[ye("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),zt.value.length>0?(ci(),wi("div",Nvt,[ye("div",jvt,[kr[9]||(kr[9]=ye("svg",{class:"w-5 h-5 text-accent-red flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),ye("div",Uvt,[ye("h4",Vvt," This will affect "+Fi(zt.value.length)+" child "+Fi(zt.value.length===1?"entry":"entries")+": ",1),ye("div",Hvt,[(ci(!0),wi(_u,null,Mh(zt.value.slice(0,10),Vr=>(ci(),wi("div",{key:Vr.id,class:"flex items-center gap-2 text-xs text-white/80"},[Vr.name.startsWith("#")?(ci(),wi("svg",Wvt,kr[7]||(kr[7]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(ci(),wi("svg",qvt,kr[8]||(kr[8]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),ye("span",$vt,Fi(Vr.name),1),ye("span",{class:Fo(["px-1 py-0.5 text-xs rounded",Vr.floodPolicy==="allow"?"bg-accent-green/20 text-accent-green":"bg-accent-red/20 text-accent-red"])},Fi(Vr.floodPolicy),3)]))),128)),zt.value.length>10?(ci(),wi("div",Zvt," ...and "+Fi(zt.value.length-10)+" more ",1)):Uo("",!0)])])])])):Uo("",!0),zt.value.length>0&&jt.value.length>0?(ci(),wi("div",Gvt,[kr[13]||(kr[13]=ye("h4",{class:"text-white font-medium text-sm mb-3"},"Move children to another region:",-1)),ye("div",Yvt,[ye("div",Kvt,[kr[10]||(kr[10]=ye("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Gp(ye("input",{"onUpdate:modelValue":kr[0]||(kr[0]=Vr=>dt.value=Vr),type:"text",placeholder:"Search regions...",class:"w-full pl-9 pr-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors text-sm"},null,512),[[sM,dt.value]])])]),ye("div",Xvt,[te.value.length===0?(ci(),wi("div",Jvt,Fi(dt.value?"No regions match your search":"No available regions"),1)):Uo("",!0),(ci(!0),wi(_u,null,Mh(te.value,Vr=>(ci(),wi("label",{key:Vr.id,class:"flex items-center gap-3 p-2 rounded cursor-pointer hover:bg-white/10 transition-colors group"},[ye("div",Qvt,[Gp(ye("input",{type:"radio",value:Vr.id,"onUpdate:modelValue":kr[1]||(kr[1]=fn=>Y.value=fn),class:"sr-only peer"},null,8,t1t),[[V2,Y.value]]),kr[11]||(kr[11]=ye("div",{class:"w-4 h-4 border-2 border-white/30 rounded-full group-hover:border-white/50 peer-checked:border-primary peer-checked:bg-primary/20 transition-all"},[ye("div",{class:"w-2 h-2 rounded-full bg-primary scale-0 peer-checked:scale-100 transition-transform absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})],-1))]),ye("div",e1t,[kr[12]||(kr[12]=ye("svg",{class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})],-1)),ye("span",r1t,Fi(Vr.name),1),Vr.children.length>0?(ci(),wi("span",n1t,Fi(Vr.children.length),1)):Uo("",!0)])]))),128))])])):Uo("",!0),ye("div",i1t,[ye("button",{onClick:Je,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),zt.value.length>0&&Y.value?(ci(),wi("button",{key:0,onClick:Ie,class:"flex-1 px-4 py-3 bg-primary/20 hover:bg-primary/30 border border-primary/50 text-primary rounded-lg transition-colors"}," Move & Delete ")):Uo("",!0),ye("button",{onClick:ce,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"},Fi(zt.value.length>0?"Delete All":"Delete"),1)])])])):Uo("",!0)}}),o1t={class:"space-y-6"},s1t={class:"flex justify-between items-start"},l1t={class:"flex gap-2"},u1t=["disabled"],c1t=["disabled"],h1t=["disabled"],f1t={class:"glass-card rounded-[15px] p-4 border border-white/10 bg-white/5"},d1t={class:"flex items-center justify-between"},p1t={class:"flex items-center gap-3"},m1t={class:"flex bg-white/5 rounded-lg border border-white/20 p-1"},g1t={class:"glass-card rounded-[15px] p-6 border border-white/10"},v1t={key:0,class:"flex items-center justify-center py-8"},y1t={key:1,class:"text-center py-8"},x1t={class:"text-white/70 text-sm"},_1t={key:2,class:"text-center py-8"},b1t={key:3,class:"space-y-2"},w1t=Ec({name:"TransportKeys",__name:"TransportKeys",setup(d){const s=LF(),E=Ha(!1),R=Ha(!1),Y=Ha(!1),dt=Ha(null),_t=Ha(null),zt=Ha("deny"),jt=Ha([]),te=Ha(!1),ce=Ha(null),Ie=Li=>{const $n=new Map,Hn=[];return Li.forEach(sa=>{const Ti={id:sa.id,name:sa.name,floodPolicy:sa.flood_policy,transport_key:sa.transport_key,last_used:sa.last_used?new Date(sa.last_used*1e3):void 0,parent_id:sa.parent_id,children:[]};$n.set(sa.id,Ti)}),$n.forEach(sa=>{sa.parent_id&&$n.has(sa.parent_id)?$n.get(sa.parent_id).children.push(sa):Hn.push(sa)}),Hn},Je=async()=>{try{te.value=!0,ce.value=null;const Li=await ah.getTransportKeys();Li.success&&Li.data?jt.value=Ie(Li.data):ce.value=Li.error||"Failed to load transport keys"}catch(Li){ce.value=Li instanceof Error?Li.message:"Unknown error occurred",console.error("Error loading transport keys:",Li)}finally{te.value=!1}};op(()=>{Je()});function fr(Li,$n){for(const Hn of Li){if(Hn.id===$n)return Hn;if(Hn.children){const sa=fr(Hn.children,$n);if(sa)return sa}}return null}function Ar(){const Li=s.selectedNodeId.value;return Li?fr(jt.value,Li)?.name:void 0}function kr(Li){zt.value==="deny"&&s.setSelectedNode(Li)}function Vr(){zt.value==="deny"&&(E.value=!0)}function fn(){if(zt.value==="deny"&&s.selectedNodeId.value){const Li=fr(jt.value,s.selectedNodeId.value);Li&&(_t.value=Li,Y.value=!0)}}function Dt(){if(zt.value==="deny"&&s.selectedNodeId.value){const Li=fr(jt.value,s.selectedNodeId.value);Li&&(dt.value=Li,R.value=!0)}}const cn=async Li=>{try{const $n=await ah.createTransportKey(Li.name,Li.floodPolicy,void 0,Li.parentId,void 0);$n.success?await Je():(console.error("Failed to add transport key:",$n.error),ce.value=$n.error||"Failed to add transport key")}catch($n){console.error("Error adding transport key:",$n),ce.value=$n instanceof Error?$n.message:"Unknown error occurred"}finally{E.value=!1}};function ti(){E.value=!1}async function Dn(Li){try{const $n=Li==="allow",Hn=await ah.updateGlobalFloodPolicy($n);Hn.success?zt.value=Li:(console.error("Failed to update global flood policy:",Hn.error),ce.value=Hn.error||"Failed to update global flood policy")}catch($n){console.error("Error updating global flood policy:",$n),ce.value=$n instanceof Error?$n.message:"Failed to update global flood policy"}}function ii(){R.value=!1,dt.value=null}async function Vi(Li){try{const $n=await ah.updateTransportKey(Li.id,Li.name,Li.floodPolicy);$n.success?await Je():(console.error("Failed to update transport key:",$n.error),ce.value=$n.error||"Failed to update transport key")}catch($n){console.error("Error updating transport key:",$n),ce.value=$n instanceof Error?$n.message:"Unknown error occurred"}finally{ii()}}function Nn(Li){R.value=!1,dt.value=null,_t.value=Li,Y.value=!0}function Wr(){Y.value=!1,_t.value=null}async function Bi(Li){try{const $n=await ah.deleteTransportKey(Li);$n.success?(await Je(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",$n.error),ce.value=$n.error||"Failed to delete transport key")}catch($n){console.error("Error deleting transport key:",$n),ce.value=$n instanceof Error?$n.message:"Unknown error occurred"}finally{Wr()}}async function Ri(Li){try{const $n=await ah.deleteTransportKey(Li.nodeId);$n.success?(await Je(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",$n.error),ce.value=$n.error||"Failed to delete transport key")}catch($n){console.error("Error deleting transport key:",$n),ce.value=$n instanceof Error?$n.message:"Unknown error occurred"}finally{Wr()}}return(Li,$n)=>(ci(),wi("div",o1t,[ye("div",s1t,[$n[3]||($n[3]=ye("div",null,[ye("h3",{class:"text-lg font-semibold text-white mb-2"},"Regions/Keys"),ye("p",{class:"text-white/70 text-sm"},"Manage regional key hierarchy")],-1)),ye("div",l1t,[ye("button",{onClick:Vr,disabled:zt.value==="allow",class:Fo(["flex items-center gap-2 px-3 py-2 rounded-lg border transition-colors text-sm",zt.value==="allow"?"bg-white/5 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/10 hover:bg-accent-green/20 text-accent-green border-accent-green/30"])},$n[2]||($n[2]=[ye("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),Qu(" Add ",-1)]),10,u1t),ye("button",{onClick:Dt,disabled:!Ol(s).selectedNodeId.value||zt.value==="allow",class:Fo(["px-4 py-2 rounded-lg border transition-colors",!Ol(s).selectedNodeId.value||zt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border-accent-green/50"])}," Edit ",10,c1t),ye("button",{onClick:fn,disabled:!Ol(s).selectedNodeId.value||zt.value==="allow",class:Fo(["px-4 py-2 rounded-lg border transition-colors",!Ol(s).selectedNodeId.value||zt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border-accent-red/50"])}," Delete ",10,h1t)])]),ye("div",f1t,[ye("div",d1t,[$n[4]||($n[4]=ye("div",null,[ye("h4",{class:"text-sm font-medium text-white mb-1"},"Global Flood Policy (*)"),ye("p",{class:"text-white/60 text-xs"},"Master control for repeater flooding")],-1)),ye("div",p1t,[ye("div",m1t,[ye("button",{onClick:$n[0]||($n[0]=Hn=>Dn("deny")),class:Fo(["px-3 py-1 text-xs font-medium rounded transition-colors",zt.value==="deny"?"bg-accent-red/20 text-accent-red border border-accent-red/50":"text-white/60 hover:text-white/80"])}," DENY ",2),ye("button",{onClick:$n[1]||($n[1]=Hn=>Dn("allow")),class:Fo(["px-3 py-1 text-xs font-medium rounded transition-colors",zt.value==="allow"?"bg-accent-green/20 text-accent-green border border-accent-green/50":"text-white/60 hover:text-white/80"])}," ALLOW ",2)])])])]),ye("div",g1t,[te.value?(ci(),wi("div",v1t,$n[5]||($n[5]=[ye("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-green"},null,-1),ye("span",{class:"ml-2 text-white/70"},"Loading transport keys...",-1)]))):ce.value?(ci(),wi("div",y1t,[$n[6]||($n[6]=ye("div",{class:"text-accent-red mb-2"},"⚠️ Error loading transport keys",-1)),ye("div",x1t,Fi(ce.value),1),ye("button",{onClick:Je,class:"mt-4 px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded-lg transition-colors"}," Retry ")])):jt.value.length===0?(ci(),wi("div",_1t,$n[7]||($n[7]=[ye("div",{class:"text-white/50 mb-2"},"📝 No transport keys found",-1),ye("div",{class:"text-white/30 text-sm"},"Add your first transport key to get started",-1)]))):(ci(),wi("div",b1t,[(ci(!0),wi(_u,null,Mh(jt.value,Hn=>(ci(),G0(Ugt,{key:Hn.id,node:Hn,"selected-node-id":Ol(s).selectedNodeId.value,level:0,disabled:zt.value==="allow",onSelect:kr},null,8,["node","selected-node-id","disabled"]))),128))]))]),El(lvt,{show:E.value,"selected-node-name":Ar(),"selected-node-id":Ol(s).selectedNodeId.value||void 0,onClose:ti,onAdd:cn},null,8,["show","selected-node-name","selected-node-id"]),El(Dvt,{show:R.value,node:dt.value,onClose:ii,onSave:Vi,onRequestDelete:Nn},null,8,["show","node"]),El(a1t,{show:Y.value,node:_t.value,"all-nodes":jt.value,onClose:Wr,onDeleteAll:Bi,onMoveChildren:Ri},null,8,["show","node","all-nodes"])]))}}),k1t={class:"p-6 space-y-6"},T1t={class:"glass-card rounded-[15px] z-10 p-4 border border-primary/30 bg-primary/10"},A1t={class:"text-primary"},M1t={class:"mt-2 text-primary/80"},S1t={class:"glass-card rounded-[15px] p-6"},E1t={class:"flex flex-wrap border-b border-white/10 mb-6"},C1t=["onClick"],L1t={class:"flex items-center gap-2"},P1t={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},I1t={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},z1t={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},O1t={key:3,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},D1t={key:4,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},F1t={class:"min-h-[400px]"},B1t={key:0,class:"flex items-center justify-center py-12"},R1t={key:1,class:"flex items-center justify-center py-12"},N1t={class:"text-center"},j1t={class:"text-white/60 text-sm mb-4"},U1t={key:2},V1t=Ec({name:"ConfigurationView",__name:"Configuration",setup(d){const s=Dm(),E=Ha("radio"),R=Ha(!1),Y=[{id:"radio",label:"Radio Settings",icon:"radio"},{id:"repeater",label:"Repeater Settings",icon:"repeater"},{id:"duty",label:"Duty Cycle",icon:"duty"},{id:"delays",label:"TX Delays",icon:"delays"},{id:"transport",label:"Regions/Keys",icon:"keys"}];op(async()=>{try{await s.fetchStats(),R.value=!0}catch(_t){console.error("Failed to load configuration data:",_t),R.value=!0}});function dt(_t){E.value=_t}return(_t,zt)=>{const jt=eM("router-link");return ci(),wi("div",k1t,[zt[11]||(zt[11]=ye("div",null,[ye("h1",{class:"text-2xl font-bold text-white"},"Configuration"),ye("p",{class:"text-white/70 mt-2"},"System configuration and settings")],-1)),zt[12]||(zt[12]=ye("div",{class:"glass-card rounded-[15px] p-4 border border-blue-500/30 bg-blue-500/10"},[ye("div",{class:"text-blue-200"},[ye("strong",null,"Configuration is read-only."),Qu(" To modify settings, edit the config file and restart the daemon. ")])],-1)),ye("div",T1t,[ye("div",A1t,[zt[3]||(zt[3]=ye("strong",null,"CAD Calibration Tool Available",-1)),ye("p",M1t,[zt[2]||(zt[2]=Qu(" Optimize your Channel Activity Detection settings. ",-1)),El(jt,{to:"/cad-calibration",class:"underline hover:text-primary transition-colors"},{default:ew(()=>zt[1]||(zt[1]=[Qu(" Launch CAD Calibration Tool → ",-1)])),_:1,__:[1]})])])]),ye("div",S1t,[ye("div",E1t,[(ci(),wi(_u,null,Mh(Y,te=>ye("button",{key:te.id,onClick:ce=>dt(te.id),class:Fo(["px-4 py-2 text-sm font-medium transition-colors duration-200 border-b-2 mr-6 mb-2",E.value===te.id?"text-primary border-primary":"text-white/70 border-transparent hover:text-white hover:border-white/30"])},[ye("div",L1t,[te.icon==="radio"?(ci(),wi("svg",P1t,zt[4]||(zt[4]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.822c5.716-5.716 14.976-5.716 20.692 0"},null,-1)]))):te.icon==="repeater"?(ci(),wi("svg",I1t,zt[5]||(zt[5]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12l4-4m-4 4l4 4"},null,-1)]))):te.icon==="duty"?(ci(),wi("svg",z1t,zt[6]||(zt[6]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):te.icon==="delays"?(ci(),wi("svg",O1t,zt[7]||(zt[7]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"},null,-1)]))):te.icon==="keys"?(ci(),wi("svg",D1t,zt[8]||(zt[8]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))):Uo("",!0),Qu(" "+Fi(te.label),1)])],10,C1t)),64))]),ye("div",F1t,[!R.value&&Ol(s).isLoading?(ci(),wi("div",B1t,zt[9]||(zt[9]=[ye("div",{class:"text-center"},[ye("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-primary rounded-full mx-auto mb-4"}),ye("div",{class:"text-white/70"},"Loading configuration...")],-1)]))):Ol(s).error&&!R.value?(ci(),wi("div",R1t,[ye("div",N1t,[zt[10]||(zt[10]=ye("div",{class:"text-red-400 mb-2"},"Failed to load configuration",-1)),ye("div",j1t,Fi(Ol(s).error),1),ye("button",{onClick:zt[0]||(zt[0]=te=>Ol(s).fetchStats()),class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors"}," Retry ")])])):(ci(),wi("div",U1t,[Gp(ye("div",null,[El(qmt,{key:"radio-settings"})],512),[[e2,E.value==="radio"]]),Gp(ye("div",null,[El(lgt,{key:"repeater-settings"})],512),[[e2,E.value==="repeater"]]),Gp(ye("div",null,[El(mgt,{key:"duty-cycle"})],512),[[e2,E.value==="duty"]]),Gp(ye("div",null,[El(wgt,{key:"transmission-delays"})],512),[[e2,E.value==="delays"]]),Gp(ye("div",null,[El(w1t,{key:"transport-keys"})],512),[[e2,E.value==="transport"]])]))])])])}}}),H1t={class:"p-6 space-y-6"},W1t={class:"glass-card rounded-[15px] p-6"},q1t={class:"flex justify-center"},$1t={class:"flex gap-4"},Z1t=["disabled"],G1t=["disabled"],Y1t={class:"glass-card rounded-[15px] p-6 space-y-4"},K1t={class:"text-white"},X1t={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},J1t={class:"text-primary/90"},Q1t={class:"space-y-2"},tyt={class:"w-full bg-white/10 rounded-full h-2"},eyt={class:"text-white/70 text-sm"},ryt={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},nyt={class:"glass-card rounded-[15px] p-4 text-center"},iyt={class:"text-2xl font-bold text-primary"},ayt={class:"glass-card rounded-[15px] p-4 text-center"},oyt={class:"text-2xl font-bold text-primary"},syt={class:"glass-card rounded-[15px] p-4 text-center"},lyt={class:"text-2xl font-bold text-primary"},uyt={class:"glass-card rounded-[15px] p-4 text-center"},cyt={class:"text-2xl font-bold text-primary"},hyt={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},fyt={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},dyt={class:"text-white/80 mb-4"},pyt={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},myt=Ec({name:"CADCalibrationView",__name:"CADCalibration",setup(d){const s=Dm(),E=Ha(!1),R=Ha(null),Y=Ha(null),dt=Ha({}),_t=Ha(null),zt=Ha([]),jt=Ha({}),te=Ha("Ready to start calibration"),ce=Ha(0),Ie=Ha(0),Je=Ha(0),fr=Ha(0),Ar=Ha(0),kr=Ha(0),Vr=Ha(null),fn=Ha(!1),Dt=Ha(!1),cn=Ha(!1),ti=Ha(!1);let Dn=null;const ii={responsive:!0,displayModeBar:!0,modeBarButtonsToRemove:["pan2d","select2d","lasso2d","autoScale2d"],displaylogo:!1,toImageButtonOptions:{format:"png",filename:"cad-calibration-heatmap",height:600,width:800,scale:2}};function Vi(){const Ti=[{x:[],y:[],z:[],mode:"markers",type:"scatter",marker:{size:12,color:[],colorscale:[[0,"rgba(75, 85, 99, 0.4)"],[.1,"rgba(6, 182, 212, 0.3)"],[.5,"rgba(6, 182, 212, 0.6)"],[1,"rgba(16, 185, 129, 0.9)"]],showscale:!0,colorbar:{title:{text:"Detection Rate (%)",font:{color:"#ffffff",size:14}},tickfont:{color:"#ffffff"},bgcolor:"rgba(0,0,0,0)",bordercolor:"rgba(255,255,255,0.2)",borderwidth:1,thickness:15},line:{color:"rgba(255,255,255,0.2)",width:1}},hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
",name:"Test Results"}],Qn={title:{text:'CAD Detection Rate
Channel Activity Detection Calibration',font:{color:"#ffffff",size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},yaxis:{title:{text:"CAD Min Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:"#ffffff",family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};nv.newPlot("plotly-chart",Ti,Qn,ii)}function Nn(){if(Object.keys(dt.value).length===0)return;const Ti=Object.values(dt.value),Qn=[],la=[],Eo=[];for(const mo of Ti)Qn.push(mo.det_peak),la.push(mo.det_min),Eo.push(mo.detection_rate);const no={x:[Qn],y:[la],"marker.color":[Eo],hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
Status: Tested
"};nv.restyle("plotly-chart",no,[0])}async function Wr(){try{const la=await ah.post("/cad-calibration-start",{samples:10,delay_ms:50});if(la.success)E.value=!0,R.value=Date.now(),s.setCadCalibrationRunning(!0),dt.value={},zt.value=[],jt.value={},_t.value=null,fn.value=!1,Dt.value=!1,cn.value=!1,ti.value=!1,Je.value=0,fr.value=0,Ar.value=0,kr.value=0,ce.value=0,Ie.value=0,Dn=setInterval(()=>{R.value&&(kr.value=Math.floor((Date.now()-R.value)/1e3))},1e3),Ri();else throw new Error(la.error||"Failed to start calibration")}catch(la){te.value=`Error: ${la instanceof Error?la.message:"Unknown error"}`}}async function Bi(){try{(await ah.post("/cad-calibration-stop")).success&&(E.value=!1,s.setCadCalibrationRunning(!1),Y.value&&(Y.value.close(),Y.value=null),Dn&&(clearInterval(Dn),Dn=null))}catch(Ti){console.error("Failed to stop calibration:",Ti)}}function Ri(){Y.value&&Y.value.close(),Y.value=new EventSource(`${ZQ}/api/cad-calibration-stream`),Y.value.onmessage=function(Ti){try{const Qn=JSON.parse(Ti.data);Li(Qn)}catch(Qn){console.error("Failed to parse SSE data:",Qn)}},Y.value.onerror=function(Ti){console.error("SSE connection error:",Ti),E.value||Y.value&&(Y.value.close(),Y.value=null)}}function Li(Ti){switch(Ti.type){case"status":te.value=Ti.message||"Status update",Ti.test_ranges&&(Vr.value=Ti.test_ranges,fn.value=!0);break;case"progress":ce.value=Ti.current||0,Ie.value=Ti.total||0,Je.value=Ti.current||0;break;case"result":if(Ti.det_peak!==void 0&&Ti.det_min!==void 0&&Ti.detection_rate!==void 0&&Ti.detections!==void 0&&Ti.samples!==void 0){const Qn=`${Ti.det_peak}_${Ti.det_min}`;dt.value[Qn]={det_peak:Ti.det_peak,det_min:Ti.det_min,detection_rate:Ti.detection_rate,detections:Ti.detections,samples:Ti.samples},Nn(),$n()}break;case"complete":case"completed":E.value=!1,te.value=Ti.message||"Calibration completed",s.setCadCalibrationRunning(!1),Hn(),Y.value&&(Y.value.close(),Y.value=null),Dn&&(clearInterval(Dn),Dn=null);break;case"error":te.value=`Error: ${Ti.message}`,s.setCadCalibrationRunning(!1),Bi();break}}function $n(){const Ti=Object.values(dt.value).map(Qn=>Qn.detection_rate);Ti.length!==0&&(fr.value=Math.max(...Ti),Ar.value=Ti.reduce((Qn,la)=>Qn+la,0)/Ti.length)}function Hn(){Dt.value=!0;let Ti=null,Qn=0;for(const la of Object.values(dt.value))la.detection_rate>Qn&&(Qn=la.detection_rate,Ti=la);_t.value=Ti,Ti&&Qn>0?(cn.value=!0,ti.value=!1):(cn.value=!1,ti.value=!0)}async function sa(){if(!_t.value){te.value="Error: No calibration results to save";return}try{const Ti=await ah.post("/save_cad_settings",{peak:_t.value.det_peak,min_val:_t.value.det_min,detection_rate:_t.value.detection_rate});if(Ti.success)te.value=`Settings saved! Peak=${_t.value.det_peak}, Min=${_t.value.det_min} applied to configuration.`;else throw new Error(Ti.error||"Failed to save settings")}catch(Ti){te.value=`Error: Failed to save settings: ${Ti instanceof Error?Ti.message:"Unknown error"}`}}return op(()=>{Vi()}),Oy(()=>{Y.value&&Y.value.close(),Dn&&clearInterval(Dn),s.setCadCalibrationRunning(!1),document.getElementById("plotly-chart")&&nv.purge("plotly-chart")}),(Ti,Qn)=>(ci(),wi("div",H1t,[Qn[14]||(Qn[14]=ye("div",null,[ye("h1",{class:"text-2xl font-bold text-white"},"CAD Calibration Tool"),ye("p",{class:"text-white/70 mt-2"},"Channel Activity Detection calibration")],-1)),ye("div",W1t,[ye("div",q1t,[ye("div",$1t,[ye("button",{onClick:Wr,disabled:E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-green/10 hover:bg-accent-green/20 disabled:bg-gray-500/10 text-accent-green disabled:text-gray-400 rounded-lg border border-accent-green/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Qn[0]||(Qn[0]=[Ff('
Start Calibration
Begin testing
',2)]),8,Z1t),ye("button",{onClick:Bi,disabled:!E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-red/10 hover:bg-accent-red/20 disabled:bg-gray-500/10 text-accent-red disabled:text-gray-400 rounded-lg border border-accent-red/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Qn[1]||(Qn[1]=[Ff('
Stop
Halt calibration
',2)]),8,G1t)])])]),ye("div",Y1t,[ye("div",K1t,Fi(te.value),1),fn.value&&Vr.value?(ci(),wi("div",X1t,[ye("div",J1t,[Qn[2]||(Qn[2]=ye("strong",null,"Configuration:",-1)),Qu(" SF"+Fi(Vr.value.spreading_factor)+" | Peak: "+Fi(Vr.value.peak_min)+" - "+Fi(Vr.value.peak_max)+" | Min: "+Fi(Vr.value.min_min)+" - "+Fi(Vr.value.min_max)+" | "+Fi((Vr.value.peak_max-Vr.value.peak_min+1)*(Vr.value.min_max-Vr.value.min_min+1))+" tests ",1)])])):Uo("",!0),ye("div",Q1t,[ye("div",tyt,[ye("div",{class:"bg-gradient-to-r from-primary to-accent-green h-2 rounded-full transition-all duration-300",style:hm({width:Ie.value>0?`${ce.value/Ie.value*100}%`:"0%"})},null,4)]),ye("div",eyt,Fi(ce.value)+" / "+Fi(Ie.value)+" tests completed",1)])]),ye("div",ryt,[ye("div",nyt,[ye("div",iyt,Fi(Je.value),1),Qn[3]||(Qn[3]=ye("div",{class:"text-white/70 text-sm"},"Tests Completed",-1))]),ye("div",ayt,[ye("div",oyt,Fi(fr.value.toFixed(1))+"%",1),Qn[4]||(Qn[4]=ye("div",{class:"text-white/70 text-sm"},"Best Detection Rate",-1))]),ye("div",syt,[ye("div",lyt,Fi(Ar.value.toFixed(1))+"%",1),Qn[5]||(Qn[5]=ye("div",{class:"text-white/70 text-sm"},"Average Rate",-1))]),ye("div",uyt,[ye("div",cyt,Fi(kr.value)+"s",1),Qn[6]||(Qn[6]=ye("div",{class:"text-white/70 text-sm"},"Elapsed Time",-1))])]),Qn[15]||(Qn[15]=ye("div",{class:"glass-card rounded-[15px] p-6"},[ye("div",{id:"plotly-chart",class:"w-full h-96"})],-1)),Dt.value?(ci(),wi("div",hyt,[Qn[13]||(Qn[13]=ye("h3",{class:"text-xl font-bold text-white"},"Calibration Results",-1)),cn.value&&_t.value?(ci(),wi("div",fyt,[Qn[11]||(Qn[11]=ye("h4",{class:"font-medium text-accent-green mb-2"},"Optimal Settings Found:",-1)),ye("p",dyt,[Qn[7]||(Qn[7]=Qu(" Peak: ",-1)),ye("strong",null,Fi(_t.value.det_peak),1),Qn[8]||(Qn[8]=Qu(", Min: ",-1)),ye("strong",null,Fi(_t.value.det_min),1),Qn[9]||(Qn[9]=Qu(", Rate: ",-1)),ye("strong",null,Fi(_t.value.detection_rate.toFixed(1))+"%",1)]),ye("div",{class:"flex justify-center"},[ye("button",{onClick:sa,class:"flex items-center gap-3 px-6 py-3 bg-primary/20 hover:bg-primary/30 text-primary rounded-lg border border-primary/50 transition-colors"},Qn[10]||(Qn[10]=[Ff('
Save Settings
Apply to configuration
',2)]))])])):Uo("",!0),ti.value?(ci(),wi("div",pyt,Qn[12]||(Qn[12]=[ye("h4",{class:"font-medium text-secondary mb-2"},"No Optimal Settings Found",-1),ye("p",{class:"text-white/70"},"All tested combinations showed low detection rates. Consider running calibration again or adjusting test parameters.",-1)]))):Uo("",!0)])):Uo("",!0)]))}}),gyt=Bf(myt,[["__scopeId","data-v-854f5f55"]]),vyt={class:"space-y-6"},yyt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},xyt={class:"flex items-center justify-between mb-4"},_yt=["disabled"],byt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},wyt={class:"flex flex-wrap gap-2"},kyt=["onClick"],Tyt={key:0,class:"w-px h-6 bg-white/20 mx-2 self-center"},Ayt=["onClick"],Myt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},Syt={key:0,class:"p-8 text-center"},Eyt={key:1,class:"p-8 text-center"},Cyt={class:"text-dark-text mb-4"},Lyt={key:2,class:"max-h-[600px] overflow-y-auto"},Pyt={key:0,class:"p-8 text-center"},Iyt={key:1,class:"divide-y divide-white/5"},zyt={class:"flex-shrink-0 text-dark-text"},Oyt={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-400"},Dyt={class:"text-white flex-1 break-all"},Fyt=Ec({name:"LogsView",__name:"Logs",setup(d){const s=Ha([]),E=Ha(new Set),R=Ha(new Set(["DEBUG","INFO","WARNING","ERROR"])),Y=Ha(new Set),dt=Ha(new Set),_t=Ha(!0),zt=Ha(null);let jt=null;const te=Ri=>{const Li=Ri.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return Li?Li[1].trim():"Unknown"},ce=Ri=>{const Li=Ri.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return Li?Li[1]:Ri},Ie=(Ri,Li)=>{if(Ri.size!==Li.size)return!1;for(const $n of Ri)if(!Li.has($n))return!1;return!0},Je=async()=>{try{const Ri=await ah.getLogs();if(Ri.logs&&Ri.logs.length>0){s.value=Ri.logs;const Li=new Set;s.value.forEach(Ti=>{const Qn=te(Ti.message);Li.add(Qn)});const $n=new Set;s.value.forEach(Ti=>{$n.add(Ti.level)}),E.value.size===0&&(E.value=new Set(Li));const Hn=!Ie(Y.value,Li),sa=!Ie(dt.value,$n);Hn&&(Y.value=Li),sa&&(dt.value=$n),zt.value=null}}catch(Ri){console.error("Error loading logs:",Ri),zt.value=Ri instanceof Error?Ri.message:"Failed to load logs"}finally{_t.value=!1}},fr=Wo(()=>s.value.filter(Li=>{const $n=te(Li.message),Hn=E.value.has($n),sa=R.value.has(Li.level);return Hn&&sa})),Ar=Wo(()=>Array.from(Y.value).sort()),kr=Wo(()=>{const Ri=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(dt.value).sort(($n,Hn)=>{const sa=Ri.indexOf($n),Ti=Ri.indexOf(Hn);return sa!==-1&&Ti!==-1?sa-Ti:$n.localeCompare(Hn)})}),Vr=Ri=>{R.value.has(Ri)?R.value.delete(Ri):R.value.add(Ri),R.value=new Set(R.value)},fn=Ri=>new Date(Ri).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Dt=Ri=>({ERROR:"text-red-400 bg-red-900/20",WARNING:"text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-400 bg-yellow-900/20",INFO:"text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[Ri]||"text-gray-400 bg-gray-900/20",cn=(Ri,Li)=>Li?{ERROR:"bg-red-500/20 text-red-400 border-red-500/50",WARNING:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[Ri]||"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10",ti=Ri=>{E.value.has(Ri)?E.value.delete(Ri):E.value.add(Ri),E.value=new Set(E.value)},Dn=()=>{E.value=new Set(Y.value)},ii=()=>{E.value=new Set},Vi=()=>{R.value=new Set(dt.value)},Nn=()=>{R.value=new Set},Wr=()=>{jt&&clearInterval(jt),jt=setInterval(Je,5e3)},Bi=()=>{jt&&(clearInterval(jt),jt=null)};return op(()=>{Je(),Wr()}),zm(()=>{Bi()}),(Ri,Li)=>(ci(),wi("div",vyt,[ye("div",yyt,[ye("div",xyt,[Li[1]||(Li[1]=ye("div",null,[ye("h1",{class:"text-white text-2xl font-semibold mb-2"},"System Logs"),ye("p",{class:"text-dark-text"},"Real-time system events and diagnostics")],-1)),ye("button",{onClick:Je,disabled:_t.value,class:"flex items-center gap-2 px-4 py-2 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors disabled:opacity-50"},[(ci(),wi("svg",{class:Fo(["w-4 h-4",{"animate-spin":_t.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Li[0]||(Li[0]=[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),Qu(" "+Fi(_t.value?"Loading...":"Refresh"),1)],8,_yt)]),ye("div",byt,[ye("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[Li[2]||(Li[2]=ye("span",{class:"text-white font-medium"},"Filters:",-1)),ye("button",{onClick:Dn,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Loggers "),ye("button",{onClick:ii,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Loggers "),Li[3]||(Li[3]=ye("div",{class:"w-px h-4 bg-white/20 mx-1"},null,-1)),ye("button",{onClick:Vi,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Levels "),ye("button",{onClick:Nn,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Levels ")]),ye("div",wyt,[(ci(!0),wi(_u,null,Mh(Ar.value,$n=>(ci(),wi("button",{key:"logger-"+$n,onClick:Hn=>ti($n),class:Fo(["px-3 py-1 text-xs border rounded-full transition-colors",E.value.has($n)?"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10"])},Fi($n),11,kyt))),128)),Ar.value.length>0&&kr.value.length>0?(ci(),wi("div",Tyt)):Uo("",!0),(ci(!0),wi(_u,null,Mh(kr.value,$n=>(ci(),wi("button",{key:"level-"+$n,onClick:Hn=>Vr($n),class:Fo(["px-3 py-1 text-xs border rounded-full transition-colors font-medium",R.value.has($n)?cn($n,!0):cn($n,!1)])},Fi($n),11,Ayt))),128))])])]),ye("div",Myt,[_t.value&&s.value.length===0?(ci(),wi("div",Syt,Li[4]||(Li[4]=[ye("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"},null,-1),ye("p",{class:"text-dark-text"},"Loading system logs...",-1)]))):zt.value?(ci(),wi("div",Eyt,[Li[5]||(Li[5]=ye("div",{class:"text-red-400 mb-4"},[ye("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[ye("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),Li[6]||(Li[6]=ye("h3",{class:"text-white text-lg font-medium mb-2"},"Error Loading Logs",-1)),ye("p",Cyt,Fi(zt.value),1),ye("button",{onClick:Je,class:"px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/50 rounded-lg transition-colors"}," Try Again ")])):(ci(),wi("div",Lyt,[fr.value.length===0?(ci(),wi("div",Pyt,Li[7]||(Li[7]=[Ff('

No Logs to Display

No logs match the current filter criteria.

',3)]))):(ci(),wi("div",Iyt,[(ci(!0),wi(_u,null,Mh(fr.value,($n,Hn)=>(ci(),wi("div",{key:Hn,class:"flex items-start gap-4 p-4 hover:bg-white/5 transition-colors font-mono text-sm"},[ye("span",zyt," ["+Fi(fn($n.timestamp))+"] ",1),ye("span",Oyt,Fi(te($n.message)),1),ye("span",{class:Fo(["flex-shrink-0 px-2 py-1 text-xs font-medium rounded",Dt($n.level)])},Fi($n.level),3),ye("span",Dyt,Fi(ce($n.message)),1)]))),128))]))]))])]))}}),Byt=Ec({name:"HelpView",__name:"Help",setup(d){return(s,E)=>(ci(),wi("div",null,E[0]||(E[0]=[Ff('

Help

Help & Documentation

Find answers to common questions and access user guides.

',1)])))}}),Ryt=pJ({history:$X("/"),routes:[{path:"/",name:"dashboard",component:Oot},{path:"/neighbors",name:"neighbors",component:Fst},{path:"/statistics",name:"statistics",component:A0t},{path:"/system-stats",name:"system-stats",component:Lmt},{path:"/configuration",name:"configuration",component:V1t},{path:"/cad-calibration",name:"cad-calibration",component:gyt},{path:"/logs",name:"logs",component:Fyt},{path:"/help",name:"help",component:Byt}]}),BM=tX(snt);BM.use(nX());BM.use(Ryt);BM.mount("#app"); diff --git a/repeater/web/html/assets/index-DB3Eq_QU.css b/repeater/web/html/assets/index-DB3Eq_QU.css new file mode 100644 index 0000000..377c58c --- /dev/null +++ b/repeater/web/html/assets/index-DB3Eq_QU.css @@ -0,0 +1 @@ +@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-2)}}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[92px\]{left:-92px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-\[79px\]{top:-79px}.-top-\[94px\]{top:-94px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-5{left:1.25rem}.left-\[246px\]{left:246px}.left-\[575px\]{left:575px}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[373px\]{top:373px}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[999999\]{z-index:999999}.z-\[99999\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-32{margin-left:8rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[30px\]{height:30px}.h-\[35px\]{height:35px}.h-\[512px\]{height:512px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-\[600px\]{max-height:600px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[196px\]{width:196px}.w-\[285px\]{width:285px}.w-\[35px\]{width:35px}.w-\[705px\]{width:705px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[120px\]{min-width:120px}.min-w-full{min-width:100%}.max-w-20{max-width:5rem}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-\[24\.22deg\]{--tw-rotate: -24.22deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-accent-green\/20{border-color:#a5e5b633}.border-accent-green\/30{border-color:#a5e5b64d}.border-accent-green\/40{border-color:#a5e5b666}.border-accent-green\/50{border-color:#a5e5b680}.border-accent-green\/60{border-color:#a5e5b699}.border-accent-purple\/50{border-color:#eba0fc80}.border-accent-red\/20{border-color:#fb787b33}.border-accent-red\/30{border-color:#fb787b4d}.border-accent-red\/50{border-color:#fb787b80}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-400\/40{border-color:#22d3ee66}.border-dark-border{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.border-dark-border\/50{border-color:#4b4b4b80}.border-gray-400\/30{border-color:#9ca3af4d}.border-gray-500\/50{border-color:#6b728080}.border-gray-700\/50{border-color:#37415180}.border-green-400\/30{border-color:#4ade804d}.border-green-500\/30{border-color:#22c55e4d}.border-orange-400\/30{border-color:#fb923c4d}.border-orange-400\/40{border-color:#fb923c66}.border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#aae8e833}.border-primary\/30{border-color:#aae8e84d}.border-primary\/40{border-color:#aae8e866}.border-primary\/50{border-color:#aae8e880}.border-primary\/60{border-color:#aae8e899}.border-red-500\/50{border-color:#ef444480}.border-secondary{--tw-border-opacity: 1;border-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-secondary\/30{border-color:#ffc2464d}.border-secondary\/40{border-color:#ffc24666}.border-secondary\/50{border-color:#ffc24680}.border-secondary\/70{border-color:#ffc246b3}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-400\/30{border-color:#facc154d}.border-yellow-500\/50{border-color:#eab30880}.border-l-accent-cyan{--tw-border-opacity: 1;border-left-color:rgb(209 230 228 / var(--tw-border-opacity, 1))}.border-l-accent-green{--tw-border-opacity: 1;border-left-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-l-accent-purple{--tw-border-opacity: 1;border-left-color:rgb(235 160 252 / var(--tw-border-opacity, 1))}.border-l-accent-red{--tw-border-opacity: 1;border-left-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-primary{--tw-border-opacity: 1;border-left-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-l-secondary{--tw-border-opacity: 1;border-left-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-t-blue-400{--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-t-green-400{--tw-border-opacity: 1;border-top-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-t-orange-400{--tw-border-opacity: 1;border-top-color:rgb(251 146 60 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-t-purple-400{--tw-border-opacity: 1;border-top-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#0B1014\]{--tw-bg-opacity: 1;background-color:rgb(11 16 20 / var(--tw-bg-opacity, 1))}.bg-\[\#1A1E1F\]{--tw-bg-opacity: 1;background-color:rgb(26 30 31 / var(--tw-bg-opacity, 1))}.bg-\[\#223231\]{--tw-bg-opacity: 1;background-color:rgb(34 50 49 / var(--tw-bg-opacity, 1))}.bg-\[\#588187\]{--tw-bg-opacity: 1;background-color:rgb(88 129 135 / var(--tw-bg-opacity, 1))}.bg-accent-cyan{--tw-bg-opacity: 1;background-color:rgb(209 230 228 / var(--tw-bg-opacity, 1))}.bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.bg-accent-green\/10{background-color:#a5e5b61a}.bg-accent-green\/20{background-color:#a5e5b633}.bg-accent-purple{--tw-bg-opacity: 1;background-color:rgb(235 160 252 / var(--tw-bg-opacity, 1))}.bg-accent-purple\/20{background-color:#eba0fc33}.bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.bg-accent-red\/10{background-color:#fb787b1a}.bg-accent-red\/20{background-color:#fb787b33}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-current{background-color:currentColor}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-dark-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-dark-bg\/30{background-color:#09090b4d}.bg-dark-bg\/50{background-color:#09090b80}.bg-dark-card\/30{background-color:#0000004d}.bg-dark-card\/90{background-color:#000000e6}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#11182733}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500\/20{background-color:#22c55e33}.bg-green-600\/20{background-color:#16a34a33}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500\/20{background-color:#f9731633}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(170 232 232 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#aae8e81a}.bg-primary\/20{background-color:#aae8e833}.bg-primary\/5{background-color:#aae8e80d}.bg-primary\/70{background-color:#aae8e8b3}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(255 194 70 / var(--tw-bg-opacity, 1))}.bg-secondary\/20{background-color:#ffc24633}.bg-secondary\/30{background-color:#ffc2464d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/20{background-color:#eab30833}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400\/25{--tw-gradient-from: rgb(34 211 238 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from: rgb(6 182 212 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500\/20{--tw-gradient-from: rgb(249 115 22 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: #AAE8E8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(170 232 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400\/30{--tw-gradient-from: rgb(250 204 21 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-green{--tw-gradient-to: #A5E5B6 var(--tw-gradient-to-position)}.to-cyan-200\/10{--tw-gradient-to: rgb(165 243 252 / .1) var(--tw-gradient-to-position)}.to-cyan-400\/20{--tw-gradient-to: rgb(34 211 238 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-orange-400\/30{--tw-gradient-to: rgb(251 146 60 / .3) var(--tw-gradient-to-position)}.to-yellow-500\/20{--tw-gradient-to: rgb(234 179 8 / .2) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[15px\]{padding:15px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[35px\]{font-size:35px}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#212122\]{--tw-text-opacity: 1;color:rgb(33 33 34 / var(--tw-text-opacity, 1))}.text-\[\#C3C3C3\]{--tw-text-opacity: 1;color:rgb(195 195 195 / var(--tw-text-opacity, 1))}.text-accent-cyan{--tw-text-opacity: 1;color:rgb(209 230 228 / var(--tw-text-opacity, 1))}.text-accent-green{--tw-text-opacity: 1;color:rgb(165 229 182 / var(--tw-text-opacity, 1))}.text-accent-green\/90{color:#a5e5b6e6}.text-accent-purple{--tw-text-opacity: 1;color:rgb(235 160 252 / var(--tw-text-opacity, 1))}.text-accent-red{--tw-text-opacity: 1;color:rgb(251 120 123 / var(--tw-text-opacity, 1))}.text-accent-red\/80{color:#fb787bcc}.text-accent-red\/90{color:#fb787be6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/60{color:#22d3ee99}.text-dark-bg{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-dark-text{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.text-dark-text\/60{color:#adadad99}.text-dark-text\/80{color:#adadadcc}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/60{color:#fb923c99}.text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.text-primary\/80{color:#aae8e8cc}.text-primary\/90{color:#aae8e8e6}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary{--tw-text-opacity: 1;color:rgb(255 194 70 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/50{color:#ffffff80}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-green-400\/60{text-decoration-color:#4ade8099}.decoration-white\/30{text-decoration-color:#ffffff4d}.underline-offset-2{text-underline-offset:2px}.placeholder-white\/50::-moz-placeholder{color:#ffffff80}.placeholder-white\/50::placeholder{color:#ffffff80}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.mix-blend-screen{mix-blend-mode:screen}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_0_rgba\(170\,232\,232\,0\.20\)\]{--tw-shadow: 0 0 6px 0 rgba(170,232,232,.2);--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-accent-green\/50{--tw-shadow-color: rgb(165 229 182 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/30{--tw-shadow-color: rgb(170 232 232 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-400\/20{--tw-shadow-color: rgb(250 204 21 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[50px\]{--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.glass-card{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:#0006}.glass-card-green{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#2222226e 1.17%,#8787881a 99.82%)}.glass-card-orange{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#fb787b33 1.17%,#fb787b1a 99.82%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-dark-border:hover{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.hover\:border-orange-400\/60:hover{border-color:#fb923c99}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:#aae8e880}.hover\:border-white\/30:hover{border-color:#ffffff4d}.hover\:bg-\[\#2A2E2F\]:hover{--tw-bg-opacity: 1;background-color:rgb(42 46 47 / var(--tw-bg-opacity, 1))}.hover\:bg-accent-green\/10:hover{background-color:#a5e5b61a}.hover\:bg-accent-green\/20:hover{background-color:#a5e5b633}.hover\:bg-accent-green\/30:hover{background-color:#a5e5b64d}.hover\:bg-accent-purple\/30:hover{background-color:#eba0fc4d}.hover\:bg-accent-red\/10:hover{background-color:#fb787b1a}.hover\:bg-accent-red\/20:hover{background-color:#fb787b33}.hover\:bg-accent-red\/30:hover{background-color:#fb787b4d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:#aae8e81a}.hover\:bg-primary\/30:hover{background-color:#aae8e84d}.hover\:bg-primary\/5:hover{background-color:#aae8e80d}.hover\:bg-primary\/90:hover{background-color:#aae8e8e6}.hover\:bg-red-500\/30:hover{background-color:#ef44444d}.hover\:bg-secondary\/90:hover{background-color:#ffc246e6}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-cyan-500\/30:hover{--tw-gradient-from: rgb(6 182 212 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400\/30:hover{--tw-gradient-to: rgb(34 211 238 / .3) var(--tw-gradient-to-position)}.hover\:text-accent-green\/80:hover{color:#a5e5b6cc}.hover\:text-accent-red\/80:hover{color:#fb787bcc}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-dark-text:hover{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#aae8e8cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:shadow-primary\/20:hover{--tw-shadow-color: rgb(170 232 232 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-secondary\/20:hover{--tw-shadow-color: rgb(255 194 70 / .2);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-accent-purple\/50:focus{border-color:#eba0fc80}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(170 232 232 / .2)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-500\/20:disabled{border-color:#6b728033}.disabled\:bg-gray-500\/10:disabled{background-color:#6b72801a}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-white\/50{border-color:#ffffff80}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.peer:checked~.peer-checked\:bg-primary\/20{background-color:#aae8e833}.group:has(:checked) .group-has-\[\:checked\]\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green\/50{border-color:#a5e5b680}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red{--tw-border-opacity: 1;border-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red\/50{border-color:#fb787b80}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green\/10{background-color:#a5e5b61a}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red\/10{background-color:#fb787b1a}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:p-\[15px\]{padding:15px}}@keyframes sparkline-draw-ad12b3cb{0%{stroke-dasharray:1000;stroke-dashoffset:1000}to{stroke-dasharray:1000;stroke-dashoffset:0}}.sparkline-animate[data-v-ad12b3cb]{animation:sparkline-draw-ad12b3cb 1s ease-out}.glass-card[data-v-a5eb8c7f]{background:#000000b3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}@keyframes ping-a5eb8c7f{75%,to{transform:scale(2);opacity:0}}@keyframes ping-fast-a5eb8c7f{0%{transform:scale(1);opacity:1}75%,to{transform:scale(4);opacity:0}}.animate-ping[data-v-a5eb8c7f]{animation:ping-a5eb8c7f cubic-bezier(0,0,.2,1) infinite}.animate-ping-fast[data-v-a5eb8c7f]{animation:ping-fast-a5eb8c7f .8s cubic-bezier(0,0,.2,1) 3}body{background-color:#09090b!important;color:#fff!important;margin:0;padding:0}html{scrollbar-width:thin;scrollbar-color:#374151 #1f2937}html::-webkit-scrollbar{width:8px}html::-webkit-scrollbar-track{background:#1f2937}html::-webkit-scrollbar-thumb{background-color:#374151;border-radius:4px}html::-webkit-scrollbar-thumb:hover{background-color:#4b5563}.sparkline-container[data-v-574bf55e]{background:#0006;border-radius:10px;padding:24px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.sparkline-svg[data-v-574bf55e]{transition:all .2s ease-out}.sparkline-path[data-v-574bf55e]{transition:stroke-width .2s ease-out}.sparkline-path.animate-draw[data-v-574bf55e]{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawPath-574bf55e 1s ease-out forwards}.sparkline-fill[data-v-574bf55e]{transition:opacity .3s ease-out}.sparkline-dot[data-v-574bf55e]{transition:all .2s ease-out}@keyframes drawPath-574bf55e{to{stroke-dashoffset:0}}@keyframes fadeInFill-574bf55e{to{opacity:1}}@keyframes fadeInDot-574bf55e{to{opacity:1}}.sparkline-container:hover .sparkline-path[data-v-574bf55e]{stroke-width:2.5}.sparkline-container:hover .sparkline-dot[data-v-574bf55e]{r:3;animation:pulse-574bf55e 2s infinite}@keyframes pulse-574bf55e{0%,to{opacity:1}50%{opacity:.7}}canvas[data-v-2ece57e8]{width:100%;height:100%}.modal-enter-active[data-v-3b73bfd6]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-3b73bfd6]{transition:all .2s ease-in}.modal-enter-from[data-v-3b73bfd6]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-3b73bfd6]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-3b73bfd6]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-3b73bfd6]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.packet-list-enter-active[data-v-125cb209],.packet-list-leave-active[data-v-125cb209],.packet-list-move[data-v-125cb209]{transition:all .4s ease-out}.packet-list-enter-from[data-v-125cb209]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-125cb209],.packet-list-leave-from[data-v-125cb209]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-125cb209]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-125cb209]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-125cb209]{background:linear-gradient(90deg,rgba(78,201,176,.1) 0%,rgba(78,201,176,.05) 50%,transparent 100%);box-shadow:0 0 20px #4ec9b033;border-left:3px solid rgba(78,201,176,.6);border-radius:8px;padding-left:12px}.packet-row[data-v-125cb209]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.grid-cols-12[data-v-125cb209]{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-12>div[data-v-125cb209]:nth-child(n+7){display:none}.flex.justify-between[data-v-125cb209]{flex-direction:column;gap:1rem;align-items:stretch}.flex.items-center.gap-3[data-v-125cb209]:last-child{flex-direction:column;gap:1rem}.flex.flex-col[data-v-125cb209]{flex-direction:row;align-items:center;gap:.75rem}.flex.flex-col label[data-v-125cb209]{margin-bottom:0;min-width:60px}}@media (max-width: 640px){.grid-cols-12[data-v-125cb209]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12>div[data-v-125cb209]:nth-child(n+4){display:none}.flex.items-center.gap-3[data-v-125cb209]:last-child{flex-direction:column;gap:.75rem}.flex.flex-col[data-v-125cb209]{flex-direction:column;align-items:stretch}.flex.flex-col label[data-v-125cb209]{margin-bottom:.25rem;min-width:auto}}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.map-container[data-v-ab4f1a7c]{position:relative;background:transparent;border-radius:15px;overflow:hidden}.leaflet-map-container[data-v-ab4f1a7c]{background:linear-gradient(135deg,#09090bcc,#0009);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.map-legend[data-v-ab4f1a7c]{position:absolute;top:10px;right:10px;background:#0006;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:12px;font-size:12px;color:#fff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000;min-width:150px;max-width:180px;box-shadow:0 8px 32px #0000004d}.legend-title[data-v-ab4f1a7c]{font-weight:700;margin-bottom:10px;color:#fff;font-size:13px}.legend-section[data-v-ab4f1a7c]{margin-bottom:10px}.legend-section[data-v-ab4f1a7c]:last-of-type{margin-bottom:8px}.legend-subtitle[data-v-ab4f1a7c]{font-weight:600;margin-bottom:6px;color:#fffc;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.legend-footer[data-v-ab4f1a7c]{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:10px;text-align:center}.legend-items[data-v-ab4f1a7c]{display:flex;flex-direction:column;gap:4px}.legend-item[data-v-ab4f1a7c]{display:flex;align-items:center;gap:6px}.legend-icon[data-v-ab4f1a7c]{width:8px;height:8px;border-radius:50%;border:1px solid rgba(255,255,255,.8);box-shadow:0 1px 2px #0003;flex-shrink:0}.legend-icon.cluster-icon[data-v-ab4f1a7c]{width:16px;height:16px;border-radius:50%;border:1px solid #AAE8E8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.legend-line[data-v-ab4f1a7c]{width:16px;height:2px;border-radius:1px;flex-shrink:0;position:relative}.legend-line-dashed[data-v-ab4f1a7c]{background-image:repeating-linear-gradient(90deg,currentColor 0px,currentColor 4px,transparent 4px,transparent 8px)!important;background-color:transparent!important}.legend-line-dashed[style*="#FFC246"][data-v-ab4f1a7c]{color:#ffc246!important}.legend-line-dashed[style*="#ea580c"][data-v-ab4f1a7c]{color:#ea580c!important}.marker-highlight{position:relative!important;z-index:1000!important;animation:marker-glow-ab4f1a7c 1s ease-in-out infinite!important;border-radius:50%!important;box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6!important;transform:scale(1.2)!important}@keyframes marker-glow-ab4f1a7c{0%,to{box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6;filter:brightness(1)}50%{box-shadow:0 0 0 5px #a5e5b6,0 0 12px #a5e5b6,0 0 24px #a5e5b6;filter:brightness(1.3)}}@keyframes pulse-highlight-ab4f1a7c{0%{box-shadow:0 0 #3b82f6b3}70%{box-shadow:0 0 0 8px #3b82f600}to{box-shadow:0 0 #3b82f600}}.leaflet-popup-content-wrapper{background:#0006!important;color:#fff!important;border-radius:15px!important;box-shadow:0 8px 32px #0000004d!important;border:1px solid rgba(255,255,255,.1)!important;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-popup-tip{background:#0006!important;border:1px solid rgba(255,255,255,.1)!important}.leaflet-popup-close-button{color:#fff9!important;font-size:18px!important}.leaflet-popup-close-button:hover{color:#fff!important}.custom-div-icon,.custom-cluster-icon{background:transparent!important;border:none!important}.custom-cluster-icon div{transition:all .3s ease!important;cursor:pointer!important}.custom-cluster-icon:hover div{transform:scale(1.1)!important;box-shadow:0 6px 16px #aae8e880!important}.leaflet-control-zoom{border:1px solid rgba(255,255,255,.1)!important;border-radius:15px!important;overflow:hidden;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-control-zoom a{background-color:#0006!important;color:#fff!important;border-bottom:1px solid rgba(255,255,255,.1)!important;transition:all .2s ease!important}.leaflet-control-zoom a:hover{background-color:#ffffff1a!important;color:#fff!important}.leaflet-control-attribution{background-color:#1f2937cc!important;color:#9ca3af!important;border-top:1px solid rgba(75,85,99,.3)!important;border-radius:4px!important;padding:4px 8px!important;font-size:11px!important}.leaflet-control-attribution a{color:#60a5fa!important;text-decoration:none}.leaflet-control-attribution a:hover{color:#93c5fd!important;text-decoration:underline}.leaflet-bottom.leaflet-left .leaflet-control-attribution{margin-left:10px!important;margin-bottom:10px!important}.map-attribution[data-v-ab4f1a7c]{position:absolute;bottom:10px;left:10px;background:#0006;color:#fff9;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:4px 8px;font-size:10px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000}@media (max-width: 640px){.leaflet-control-attribution{display:none!important}}.plotly-chart[data-v-9766a4d1]{background:transparent!important}.glass-card[data-v-04026a5d]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff0d;border:1px solid rgba(255,255,255,.1)}.chart-updating[data-v-04026a5d]{animation:subtle-pulse-04026a5d .8s ease-in-out}@keyframes subtle-pulse-04026a5d{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.chart-container[data-v-04026a5d]{position:relative;transition:all .3s ease}.chart-container[data-v-04026a5d]:hover{background:#ffffff14}.process-row[data-v-04026a5d]{transition:all .3s ease}.process-row[data-v-04026a5d]:hover{background:#ffffff0d;transform:translate(2px)}.process-row-enter-active[data-v-04026a5d],.process-row-leave-active[data-v-04026a5d]{transition:all .4s ease}.process-row-enter-from[data-v-04026a5d]{opacity:0;transform:translateY(-10px) scale(.95)}.process-row-leave-to[data-v-04026a5d]{opacity:0;transform:translateY(10px) scale(.95)}.process-row-move[data-v-04026a5d]{transition:transform .4s ease}.cpu-value[data-v-04026a5d],.memory-value[data-v-04026a5d]{transition:all .3s ease;padding:2px 6px;border-radius:4px}.cpu-value[data-v-04026a5d]:hover,.memory-value[data-v-04026a5d]:hover{background:#f59e0b1a;transform:scale(1.05)}@keyframes value-update-04026a5d{0%{background:#f59e0b4d}to{background:transparent}}.value-updated[data-v-04026a5d]{animation:value-update-04026a5d .6s ease-out}.ml-0[data-v-4afde13e]{margin-left:0rem}.ml-4[data-v-4afde13e]{margin-left:1rem}.ml-8[data-v-4afde13e]{margin-left:2rem}.ml-12[data-v-4afde13e]{margin-left:3rem}.ml-16[data-v-4afde13e]{margin-left:4rem}.ml-20[data-v-4afde13e]{margin-left:5rem}.ml-24[data-v-4afde13e]{margin-left:6rem}.ml-28[data-v-4afde13e]{margin-left:7rem}.ml-32[data-v-4afde13e]{margin-left:8rem}.glass-card[data-v-854f5f55]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)} diff --git a/repeater/web/html/assets/index-Dmg9lJJT.css b/repeater/web/html/assets/index-Dmg9lJJT.css deleted file mode 100644 index 346e0c5..0000000 --- a/repeater/web/html/assets/index-Dmg9lJJT.css +++ /dev/null @@ -1 +0,0 @@ -@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-2)}}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[92px\]{left:-92px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-\[79px\]{top:-79px}.-top-\[94px\]{top:-94px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-5{left:1.25rem}.left-\[246px\]{left:246px}.left-\[575px\]{left:575px}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[373px\]{top:373px}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[999999\]{z-index:999999}.z-\[99999\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-32{margin-left:8rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[30px\]{height:30px}.h-\[35px\]{height:35px}.h-\[512px\]{height:512px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-\[600px\]{max-height:600px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[196px\]{width:196px}.w-\[285px\]{width:285px}.w-\[35px\]{width:35px}.w-\[705px\]{width:705px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[120px\]{min-width:120px}.min-w-full{min-width:100%}.max-w-20{max-width:5rem}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-\[24\.22deg\]{--tw-rotate: -24.22deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-accent-green\/20{border-color:#a5e5b633}.border-accent-green\/30{border-color:#a5e5b64d}.border-accent-green\/40{border-color:#a5e5b666}.border-accent-green\/50{border-color:#a5e5b680}.border-accent-green\/60{border-color:#a5e5b699}.border-accent-purple\/50{border-color:#eba0fc80}.border-accent-red\/20{border-color:#fb787b33}.border-accent-red\/30{border-color:#fb787b4d}.border-accent-red\/50{border-color:#fb787b80}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-400\/40{border-color:#22d3ee66}.border-dark-border{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.border-dark-border\/50{border-color:#4b4b4b80}.border-gray-400\/30{border-color:#9ca3af4d}.border-gray-500\/50{border-color:#6b728080}.border-gray-700\/50{border-color:#37415180}.border-green-400\/30{border-color:#4ade804d}.border-green-500\/30{border-color:#22c55e4d}.border-orange-400\/30{border-color:#fb923c4d}.border-orange-400\/40{border-color:#fb923c66}.border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#aae8e833}.border-primary\/30{border-color:#aae8e84d}.border-primary\/40{border-color:#aae8e866}.border-primary\/50{border-color:#aae8e880}.border-primary\/60{border-color:#aae8e899}.border-red-500\/50{border-color:#ef444480}.border-secondary{--tw-border-opacity: 1;border-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-secondary\/30{border-color:#ffc2464d}.border-secondary\/40{border-color:#ffc24666}.border-secondary\/50{border-color:#ffc24680}.border-secondary\/70{border-color:#ffc246b3}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-400\/30{border-color:#facc154d}.border-yellow-500\/50{border-color:#eab30880}.border-l-accent-cyan{--tw-border-opacity: 1;border-left-color:rgb(209 230 228 / var(--tw-border-opacity, 1))}.border-l-accent-green{--tw-border-opacity: 1;border-left-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-l-accent-purple{--tw-border-opacity: 1;border-left-color:rgb(235 160 252 / var(--tw-border-opacity, 1))}.border-l-accent-red{--tw-border-opacity: 1;border-left-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-primary{--tw-border-opacity: 1;border-left-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-l-secondary{--tw-border-opacity: 1;border-left-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-t-blue-400{--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-t-green-400{--tw-border-opacity: 1;border-top-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-t-purple-400{--tw-border-opacity: 1;border-top-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#0B1014\]{--tw-bg-opacity: 1;background-color:rgb(11 16 20 / var(--tw-bg-opacity, 1))}.bg-\[\#1A1E1F\]{--tw-bg-opacity: 1;background-color:rgb(26 30 31 / var(--tw-bg-opacity, 1))}.bg-\[\#223231\]{--tw-bg-opacity: 1;background-color:rgb(34 50 49 / var(--tw-bg-opacity, 1))}.bg-\[\#588187\]{--tw-bg-opacity: 1;background-color:rgb(88 129 135 / var(--tw-bg-opacity, 1))}.bg-accent-cyan{--tw-bg-opacity: 1;background-color:rgb(209 230 228 / var(--tw-bg-opacity, 1))}.bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.bg-accent-green\/10{background-color:#a5e5b61a}.bg-accent-green\/20{background-color:#a5e5b633}.bg-accent-purple{--tw-bg-opacity: 1;background-color:rgb(235 160 252 / var(--tw-bg-opacity, 1))}.bg-accent-purple\/20{background-color:#eba0fc33}.bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.bg-accent-red\/10{background-color:#fb787b1a}.bg-accent-red\/20{background-color:#fb787b33}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-current{background-color:currentColor}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-dark-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-dark-bg\/30{background-color:#09090b4d}.bg-dark-bg\/50{background-color:#09090b80}.bg-dark-card\/30{background-color:#0000004d}.bg-dark-card\/90{background-color:#000000e6}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#11182733}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500\/20{background-color:#22c55e33}.bg-green-600\/20{background-color:#16a34a33}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500\/20{background-color:#f9731633}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(170 232 232 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#aae8e81a}.bg-primary\/20{background-color:#aae8e833}.bg-primary\/5{background-color:#aae8e80d}.bg-primary\/70{background-color:#aae8e8b3}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(255 194 70 / var(--tw-bg-opacity, 1))}.bg-secondary\/20{background-color:#ffc24633}.bg-secondary\/30{background-color:#ffc2464d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/20{background-color:#eab30833}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400\/25{--tw-gradient-from: rgb(34 211 238 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from: rgb(6 182 212 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500\/20{--tw-gradient-from: rgb(249 115 22 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: #AAE8E8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(170 232 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400\/30{--tw-gradient-from: rgb(250 204 21 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-green{--tw-gradient-to: #A5E5B6 var(--tw-gradient-to-position)}.to-cyan-200\/10{--tw-gradient-to: rgb(165 243 252 / .1) var(--tw-gradient-to-position)}.to-cyan-400\/20{--tw-gradient-to: rgb(34 211 238 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-orange-400\/30{--tw-gradient-to: rgb(251 146 60 / .3) var(--tw-gradient-to-position)}.to-yellow-500\/20{--tw-gradient-to: rgb(234 179 8 / .2) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[15px\]{padding:15px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[35px\]{font-size:35px}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#212122\]{--tw-text-opacity: 1;color:rgb(33 33 34 / var(--tw-text-opacity, 1))}.text-\[\#C3C3C3\]{--tw-text-opacity: 1;color:rgb(195 195 195 / var(--tw-text-opacity, 1))}.text-accent-cyan{--tw-text-opacity: 1;color:rgb(209 230 228 / var(--tw-text-opacity, 1))}.text-accent-green{--tw-text-opacity: 1;color:rgb(165 229 182 / var(--tw-text-opacity, 1))}.text-accent-green\/90{color:#a5e5b6e6}.text-accent-purple{--tw-text-opacity: 1;color:rgb(235 160 252 / var(--tw-text-opacity, 1))}.text-accent-red{--tw-text-opacity: 1;color:rgb(251 120 123 / var(--tw-text-opacity, 1))}.text-accent-red\/80{color:#fb787bcc}.text-accent-red\/90{color:#fb787be6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/60{color:#22d3ee99}.text-dark-bg{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-dark-text{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.text-dark-text\/60{color:#adadad99}.text-dark-text\/80{color:#adadadcc}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/60{color:#fb923c99}.text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.text-primary\/80{color:#aae8e8cc}.text-primary\/90{color:#aae8e8e6}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary{--tw-text-opacity: 1;color:rgb(255 194 70 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/50{color:#ffffff80}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-green-400\/60{text-decoration-color:#4ade8099}.decoration-white\/30{text-decoration-color:#ffffff4d}.underline-offset-2{text-underline-offset:2px}.placeholder-white\/50::-moz-placeholder{color:#ffffff80}.placeholder-white\/50::placeholder{color:#ffffff80}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.mix-blend-screen{mix-blend-mode:screen}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_0_rgba\(170\,232\,232\,0\.20\)\]{--tw-shadow: 0 0 6px 0 rgba(170,232,232,.2);--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-accent-green\/50{--tw-shadow-color: rgb(165 229 182 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/30{--tw-shadow-color: rgb(170 232 232 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-400\/20{--tw-shadow-color: rgb(250 204 21 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[50px\]{--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.glass-card{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:#0006}.glass-card-green{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#2222226e 1.17%,#8787881a 99.82%)}.glass-card-orange{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#fb787b33 1.17%,#fb787b1a 99.82%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-dark-border:hover{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.hover\:border-orange-400\/60:hover{border-color:#fb923c99}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:#aae8e880}.hover\:border-white\/30:hover{border-color:#ffffff4d}.hover\:bg-\[\#2A2E2F\]:hover{--tw-bg-opacity: 1;background-color:rgb(42 46 47 / var(--tw-bg-opacity, 1))}.hover\:bg-accent-green\/10:hover{background-color:#a5e5b61a}.hover\:bg-accent-green\/20:hover{background-color:#a5e5b633}.hover\:bg-accent-green\/30:hover{background-color:#a5e5b64d}.hover\:bg-accent-purple\/30:hover{background-color:#eba0fc4d}.hover\:bg-accent-red\/10:hover{background-color:#fb787b1a}.hover\:bg-accent-red\/20:hover{background-color:#fb787b33}.hover\:bg-accent-red\/30:hover{background-color:#fb787b4d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:#aae8e81a}.hover\:bg-primary\/30:hover{background-color:#aae8e84d}.hover\:bg-primary\/5:hover{background-color:#aae8e80d}.hover\:bg-primary\/90:hover{background-color:#aae8e8e6}.hover\:bg-red-500\/30:hover{background-color:#ef44444d}.hover\:bg-secondary\/90:hover{background-color:#ffc246e6}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-cyan-500\/30:hover{--tw-gradient-from: rgb(6 182 212 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400\/30:hover{--tw-gradient-to: rgb(34 211 238 / .3) var(--tw-gradient-to-position)}.hover\:text-accent-green\/80:hover{color:#a5e5b6cc}.hover\:text-accent-red\/80:hover{color:#fb787bcc}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-dark-text:hover{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#aae8e8cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:shadow-primary\/20:hover{--tw-shadow-color: rgb(170 232 232 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-secondary\/20:hover{--tw-shadow-color: rgb(255 194 70 / .2);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-accent-purple\/50:focus{border-color:#eba0fc80}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(170 232 232 / .2)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-500\/20:disabled{border-color:#6b728033}.disabled\:bg-gray-500\/10:disabled{background-color:#6b72801a}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-white\/50{border-color:#ffffff80}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.peer:checked~.peer-checked\:bg-primary\/20{background-color:#aae8e833}.group:has(:checked) .group-has-\[\:checked\]\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green\/50{border-color:#a5e5b680}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red{--tw-border-opacity: 1;border-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red\/50{border-color:#fb787b80}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green\/10{background-color:#a5e5b61a}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red\/10{background-color:#fb787b1a}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:p-\[15px\]{padding:15px}}@keyframes sparkline-draw-ad12b3cb{0%{stroke-dasharray:1000;stroke-dashoffset:1000}to{stroke-dasharray:1000;stroke-dashoffset:0}}.sparkline-animate[data-v-ad12b3cb]{animation:sparkline-draw-ad12b3cb 1s ease-out}.glass-card[data-v-a5eb8c7f]{background:#000000b3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}@keyframes ping-a5eb8c7f{75%,to{transform:scale(2);opacity:0}}@keyframes ping-fast-a5eb8c7f{0%{transform:scale(1);opacity:1}75%,to{transform:scale(4);opacity:0}}.animate-ping[data-v-a5eb8c7f]{animation:ping-a5eb8c7f cubic-bezier(0,0,.2,1) infinite}.animate-ping-fast[data-v-a5eb8c7f]{animation:ping-fast-a5eb8c7f .8s cubic-bezier(0,0,.2,1) 3}body{background-color:#09090b!important;color:#fff!important;margin:0;padding:0}html{scrollbar-width:thin;scrollbar-color:#374151 #1f2937}html::-webkit-scrollbar{width:8px}html::-webkit-scrollbar-track{background:#1f2937}html::-webkit-scrollbar-thumb{background-color:#374151;border-radius:4px}html::-webkit-scrollbar-thumb:hover{background-color:#4b5563}.sparkline-container[data-v-574bf55e]{background:#0006;border-radius:10px;padding:24px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.sparkline-svg[data-v-574bf55e]{transition:all .2s ease-out}.sparkline-path[data-v-574bf55e]{transition:stroke-width .2s ease-out}.sparkline-path.animate-draw[data-v-574bf55e]{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawPath-574bf55e 1s ease-out forwards}.sparkline-fill[data-v-574bf55e]{transition:opacity .3s ease-out}.sparkline-dot[data-v-574bf55e]{transition:all .2s ease-out}@keyframes drawPath-574bf55e{to{stroke-dashoffset:0}}@keyframes fadeInFill-574bf55e{to{opacity:1}}@keyframes fadeInDot-574bf55e{to{opacity:1}}.sparkline-container:hover .sparkline-path[data-v-574bf55e]{stroke-width:2.5}.sparkline-container:hover .sparkline-dot[data-v-574bf55e]{r:3;animation:pulse-574bf55e 2s infinite}@keyframes pulse-574bf55e{0%,to{opacity:1}50%{opacity:.7}}canvas[data-v-2ece57e8]{width:100%;height:100%}.modal-enter-active[data-v-3b73bfd6]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-3b73bfd6]{transition:all .2s ease-in}.modal-enter-from[data-v-3b73bfd6]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-3b73bfd6]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-3b73bfd6]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-3b73bfd6]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.packet-list-enter-active[data-v-125cb209],.packet-list-leave-active[data-v-125cb209],.packet-list-move[data-v-125cb209]{transition:all .4s ease-out}.packet-list-enter-from[data-v-125cb209]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-125cb209],.packet-list-leave-from[data-v-125cb209]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-125cb209]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-125cb209]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-125cb209]{background:linear-gradient(90deg,rgba(78,201,176,.1) 0%,rgba(78,201,176,.05) 50%,transparent 100%);box-shadow:0 0 20px #4ec9b033;border-left:3px solid rgba(78,201,176,.6);border-radius:8px;padding-left:12px}.packet-row[data-v-125cb209]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.grid-cols-12[data-v-125cb209]{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-12>div[data-v-125cb209]:nth-child(n+7){display:none}.flex.justify-between[data-v-125cb209]{flex-direction:column;gap:1rem;align-items:stretch}.flex.items-center.gap-3[data-v-125cb209]:last-child{flex-direction:column;gap:1rem}.flex.flex-col[data-v-125cb209]{flex-direction:row;align-items:center;gap:.75rem}.flex.flex-col label[data-v-125cb209]{margin-bottom:0;min-width:60px}}@media (max-width: 640px){.grid-cols-12[data-v-125cb209]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12>div[data-v-125cb209]:nth-child(n+4){display:none}.flex.items-center.gap-3[data-v-125cb209]:last-child{flex-direction:column;gap:.75rem}.flex.flex-col[data-v-125cb209]{flex-direction:column;align-items:stretch}.flex.flex-col label[data-v-125cb209]{margin-bottom:.25rem;min-width:auto}}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.map-container[data-v-ab4f1a7c]{position:relative;background:transparent;border-radius:15px;overflow:hidden}.leaflet-map-container[data-v-ab4f1a7c]{background:linear-gradient(135deg,#09090bcc,#0009);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.map-legend[data-v-ab4f1a7c]{position:absolute;top:10px;right:10px;background:#0006;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:12px;font-size:12px;color:#fff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000;min-width:150px;max-width:180px;box-shadow:0 8px 32px #0000004d}.legend-title[data-v-ab4f1a7c]{font-weight:700;margin-bottom:10px;color:#fff;font-size:13px}.legend-section[data-v-ab4f1a7c]{margin-bottom:10px}.legend-section[data-v-ab4f1a7c]:last-of-type{margin-bottom:8px}.legend-subtitle[data-v-ab4f1a7c]{font-weight:600;margin-bottom:6px;color:#fffc;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.legend-footer[data-v-ab4f1a7c]{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:10px;text-align:center}.legend-items[data-v-ab4f1a7c]{display:flex;flex-direction:column;gap:4px}.legend-item[data-v-ab4f1a7c]{display:flex;align-items:center;gap:6px}.legend-icon[data-v-ab4f1a7c]{width:8px;height:8px;border-radius:50%;border:1px solid rgba(255,255,255,.8);box-shadow:0 1px 2px #0003;flex-shrink:0}.legend-icon.cluster-icon[data-v-ab4f1a7c]{width:16px;height:16px;border-radius:50%;border:1px solid #AAE8E8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.legend-line[data-v-ab4f1a7c]{width:16px;height:2px;border-radius:1px;flex-shrink:0;position:relative}.legend-line-dashed[data-v-ab4f1a7c]{background-image:repeating-linear-gradient(90deg,currentColor 0px,currentColor 4px,transparent 4px,transparent 8px)!important;background-color:transparent!important}.legend-line-dashed[style*="#FFC246"][data-v-ab4f1a7c]{color:#ffc246!important}.legend-line-dashed[style*="#ea580c"][data-v-ab4f1a7c]{color:#ea580c!important}.marker-highlight{position:relative!important;z-index:1000!important;animation:marker-glow-ab4f1a7c 1s ease-in-out infinite!important;border-radius:50%!important;box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6!important;transform:scale(1.2)!important}@keyframes marker-glow-ab4f1a7c{0%,to{box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6;filter:brightness(1)}50%{box-shadow:0 0 0 5px #a5e5b6,0 0 12px #a5e5b6,0 0 24px #a5e5b6;filter:brightness(1.3)}}@keyframes pulse-highlight-ab4f1a7c{0%{box-shadow:0 0 #3b82f6b3}70%{box-shadow:0 0 0 8px #3b82f600}to{box-shadow:0 0 #3b82f600}}.leaflet-popup-content-wrapper{background:#0006!important;color:#fff!important;border-radius:15px!important;box-shadow:0 8px 32px #0000004d!important;border:1px solid rgba(255,255,255,.1)!important;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-popup-tip{background:#0006!important;border:1px solid rgba(255,255,255,.1)!important}.leaflet-popup-close-button{color:#fff9!important;font-size:18px!important}.leaflet-popup-close-button:hover{color:#fff!important}.custom-div-icon,.custom-cluster-icon{background:transparent!important;border:none!important}.custom-cluster-icon div{transition:all .3s ease!important;cursor:pointer!important}.custom-cluster-icon:hover div{transform:scale(1.1)!important;box-shadow:0 6px 16px #aae8e880!important}.leaflet-control-zoom{border:1px solid rgba(255,255,255,.1)!important;border-radius:15px!important;overflow:hidden;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-control-zoom a{background-color:#0006!important;color:#fff!important;border-bottom:1px solid rgba(255,255,255,.1)!important;transition:all .2s ease!important}.leaflet-control-zoom a:hover{background-color:#ffffff1a!important;color:#fff!important}.leaflet-control-attribution{background-color:#1f2937cc!important;color:#9ca3af!important;border-top:1px solid rgba(75,85,99,.3)!important;border-radius:4px!important;padding:4px 8px!important;font-size:11px!important}.leaflet-control-attribution a{color:#60a5fa!important;text-decoration:none}.leaflet-control-attribution a:hover{color:#93c5fd!important;text-decoration:underline}.leaflet-bottom.leaflet-left .leaflet-control-attribution{margin-left:10px!important;margin-bottom:10px!important}.map-attribution[data-v-ab4f1a7c]{position:absolute;bottom:10px;left:10px;background:#0006;color:#fff9;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:4px 8px;font-size:10px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000}@media (max-width: 640px){.leaflet-control-attribution{display:none!important}}.plotly-chart[data-v-9766a4d1]{background:transparent!important}.ml-0[data-v-4afde13e]{margin-left:0rem}.ml-4[data-v-4afde13e]{margin-left:1rem}.ml-8[data-v-4afde13e]{margin-left:2rem}.ml-12[data-v-4afde13e]{margin-left:3rem}.ml-16[data-v-4afde13e]{margin-left:4rem}.ml-20[data-v-4afde13e]{margin-left:5rem}.ml-24[data-v-4afde13e]{margin-left:6rem}.ml-28[data-v-4afde13e]{margin-left:7rem}.ml-32[data-v-4afde13e]{margin-left:8rem}.glass-card[data-v-854f5f55]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)} diff --git a/repeater/web/html/index.html b/repeater/web/html/index.html index 91773c6..9b52c9d 100644 --- a/repeater/web/html/index.html +++ b/repeater/web/html/index.html @@ -8,8 +8,8 @@ - - + +